summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-10 16:55:21 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-10 20:21:13 -0500
commit12343c15568dcc2c9209d8ca41fda2263122448f (patch)
tree3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source
parent99745dbcbb25b61437914c9782475d0b67a4b0bd (diff)
parentce6308e4fad2281241bf4ca78280eba29f744d43 (diff)
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/attarray.cxx308
-rw-r--r--sc/source/core/data/attrib.cxx144
-rw-r--r--sc/source/core/data/bcaslot.cxx36
-rw-r--r--sc/source/core/data/cell.cxx308
-rw-r--r--sc/source/core/data/cell2.cxx238
-rw-r--r--sc/source/core/data/clipparam.cxx10
-rw-r--r--sc/source/core/data/column3.cxx142
-rw-r--r--sc/source/core/data/compressedarray.cxx10
-rw-r--r--sc/source/core/data/conditio.cxx292
-rw-r--r--sc/source/core/data/dbdocutl.cxx26
-rwxr-xr-x[-rw-r--r--]sc/source/core/data/dociter.cxx148
-rw-r--r--sc/source/core/data/docpool.cxx238
-rw-r--r--sc/source/core/data/documen2.cxx206
-rw-r--r--sc/source/core/data/documen3.cxx257
-rw-r--r--sc/source/core/data/documen4.cxx170
-rw-r--r--sc/source/core/data/documen5.cxx80
-rw-r--r--sc/source/core/data/documen6.cxx22
-rw-r--r--sc/source/core/data/documen7.cxx58
-rw-r--r--sc/source/core/data/documen8.cxx321
-rw-r--r--sc/source/core/data/documen9.cxx112
-rw-r--r--sc/source/core/data/document.cxx806
-rw-r--r--sc/source/core/data/dpcachetable.cxx2
-rw-r--r--sc/source/core/data/dpdimsave.cxx4
-rw-r--r--sc/source/core/data/dpgroup.cxx54
-rw-r--r--sc/source/core/data/dpobject.cxx170
-rw-r--r--sc/source/core/data/dpoutput.cxx184
-rw-r--r--sc/source/core/data/dpsave.cxx2
-rw-r--r--sc/source/core/data/dpsdbtab.cxx8
-rw-r--r--sc/source/core/data/dpshttab.cxx22
-rw-r--r--sc/source/core/data/dptabdat.cxx30
-rw-r--r--sc/source/core/data/dptablecache.cxx40
-rw-r--r--sc/source/core/data/dptabres.cxx414
-rw-r--r--sc/source/core/data/dptabsrc.cxx178
-rw-r--r--sc/source/core/data/drwlayer.cxx170
-rw-r--r--sc/source/core/data/fillinfo.cxx186
-rw-r--r--sc/source/core/data/global.cxx82
-rw-r--r--sc/source/core/data/global2.cxx89
-rw-r--r--sc/source/core/data/markarr.cxx60
-rw-r--r--sc/source/core/data/markdata.cxx98
-rw-r--r--sc/source/core/data/olinetab.cxx232
-rw-r--r--sc/source/core/data/pagepar.cxx14
-rw-r--r--sc/source/core/data/patattr.cxx282
-rw-r--r--sc/source/core/data/pivot2.cxx55
-rw-r--r--sc/source/core/data/poolhelp.cxx4
-rw-r--r--sc/source/core/data/postit.cxx25
-rw-r--r--sc/source/core/data/scdpoutputimpl.cxx26
-rw-r--r--sc/source/core/data/scdpoutputimpl.hxx10
-rw-r--r--sc/source/core/data/sortparam.cxx70
-rw-r--r--sc/source/core/data/stlpool.cxx32
-rw-r--r--sc/source/core/data/stlsheet.cxx47
-rw-r--r--sc/source/core/data/table1.cxx322
-rw-r--r--sc/source/core/data/table2.cxx464
-rw-r--r--sc/source/core/data/table3.cxx280
-rw-r--r--sc/source/core/data/table4.cxx314
-rw-r--r--sc/source/core/data/table5.cxx76
-rw-r--r--sc/source/core/data/table6.cxx108
-rw-r--r--sc/source/core/data/validat.cxx147
-rw-r--r--sc/source/core/inc/addinhelpid.hxx4
-rw-r--r--sc/source/core/inc/adiasync.hxx18
-rw-r--r--sc/source/core/inc/bcaslot.hxx30
-rw-r--r--sc/source/core/inc/core_pch.hxx2
-rw-r--r--sc/source/core/inc/ddelink.hxx14
-rw-r--r--sc/source/core/inc/interpre.hxx196
-rw-r--r--sc/source/core/inc/jumpmatrix.hxx8
-rw-r--r--sc/source/core/inc/parclass.hxx12
-rw-r--r--sc/source/core/inc/refupdat.hxx4
-rw-r--r--sc/source/core/tool/addincol.cxx142
-rw-r--r--sc/source/core/tool/addinhelpid.cxx10
-rw-r--r--sc/source/core/tool/address.cxx100
-rw-r--r--sc/source/core/tool/adiasync.cxx22
-rw-r--r--sc/source/core/tool/appoptio.cxx32
-rw-r--r--sc/source/core/tool/autoform.cxx234
-rw-r--r--sc/source/core/tool/callform.cxx100
-rw-r--r--sc/source/core/tool/cellform.cxx12
-rw-r--r--sc/source/core/tool/chartarr.cxx38
-rw-r--r--sc/source/core/tool/charthelper.cxx21
-rw-r--r--sc/source/core/tool/chartlis.cxx94
-rw-r--r--sc/source/core/tool/chartpos.cxx145
-rw-r--r--sc/source/core/tool/chgtrack.cxx550
-rw-r--r--sc/source/core/tool/chgviset.cxx8
-rw-r--r--sc/source/core/tool/collect.cxx104
-rw-r--r--sc/source/core/tool/compiler.cxx402
-rw-r--r--sc/source/core/tool/consoli.cxx76
-rw-r--r--sc/source/core/tool/dbcolect.cxx112
-rw-r--r--sc/source/core/tool/ddelink.cxx28
-rw-r--r--sc/source/core/tool/detdata.cxx24
-rw-r--r--sc/source/core/tool/detfunc.cxx320
-rw-r--r--sc/source/core/tool/docoptio.cxx36
-rw-r--r--sc/source/core/tool/doubleref.cxx20
-rw-r--r--sc/source/core/tool/editutil.cxx168
-rw-r--r--sc/source/core/tool/filtopt.cxx2
-rw-r--r--sc/source/core/tool/formulaparserpool.cxx15
-rw-r--r--sc/source/core/tool/hints.cxx8
-rw-r--r--sc/source/core/tool/inputopt.cxx22
-rw-r--r--sc/source/core/tool/interpr1.cxx456
-rw-r--r--sc/source/core/tool/interpr2.cxx284
-rw-r--r--sc/source/core/tool/interpr3.cxx166
-rwxr-xr-x[-rw-r--r--]sc/source/core/tool/interpr4.cxx404
-rw-r--r--sc/source/core/tool/interpr5.cxx76
-rw-r--r--sc/source/core/tool/navicfg.cxx6
-rw-r--r--sc/source/core/tool/optutil.cxx2
-rw-r--r--sc/source/core/tool/parclass.cxx18
-rw-r--r--sc/source/core/tool/printopt.cxx6
-rw-r--r--sc/source/core/tool/prnsave.cxx14
-rw-r--r--sc/source/core/tool/progress.cxx44
-rw-r--r--sc/source/core/tool/queryparam.cxx18
-rw-r--r--sc/source/core/tool/rangelst.cxx28
-rw-r--r--sc/source/core/tool/rangenam.cxx92
-rw-r--r--sc/source/core/tool/rangeseq.cxx66
-rw-r--r--sc/source/core/tool/rangeutl.cxx112
-rw-r--r--sc/source/core/tool/rechead.cxx24
-rw-r--r--sc/source/core/tool/refdata.cxx16
-rw-r--r--sc/source/core/tool/reffind.cxx18
-rw-r--r--sc/source/core/tool/refreshtimer.cxx6
-rw-r--r--sc/source/core/tool/reftokenhelper.cxx2
-rw-r--r--sc/source/core/tool/refupdat.cxx178
-rw-r--r--sc/source/core/tool/scmatrix.cxx42
-rw-r--r--sc/source/core/tool/subtotal.cxx18
-rw-r--r--sc/source/core/tool/token.cxx136
-rw-r--r--sc/source/core/tool/unitconv.cxx12
-rw-r--r--sc/source/core/tool/userlist.cxx54
-rw-r--r--sc/source/core/tool/viewopti.cxx16
-rw-r--r--sc/source/core/tool/zforauto.cxx12
-rw-r--r--sc/source/filter/dif/difexp.cxx16
-rw-r--r--sc/source/filter/dif/difimp.cxx81
-rw-r--r--sc/source/filter/excel/colrowst.cxx4
-rw-r--r--sc/source/filter/excel/excdoc.cxx6
-rw-r--r--sc/source/filter/excel/excel.cxx25
-rw-r--r--sc/source/filter/excel/excform.cxx256
-rw-r--r--sc/source/filter/excel/excform8.cxx186
-rw-r--r--sc/source/filter/excel/excimp8.cxx111
-rw-r--r--sc/source/filter/excel/excrecds.cxx106
-rw-r--r--sc/source/filter/excel/exctools.cxx18
-rw-r--r--sc/source/filter/excel/expop2.cxx4
-rw-r--r--sc/source/filter/excel/fontbuff.cxx14
-rw-r--r--sc/source/filter/excel/frmbase.cxx20
-rw-r--r--sc/source/filter/excel/impop.cxx156
-rw-r--r--sc/source/filter/excel/namebuff.cxx54
-rw-r--r--sc/source/filter/excel/read.cxx6
-rw-r--r--sc/source/filter/excel/tokstack.cxx102
-rw-r--r--sc/source/filter/excel/xechart.cxx257
-rw-r--r--sc/source/filter/excel/xecontent.cxx16
-rw-r--r--sc/source/filter/excel/xeescher.cxx16
-rw-r--r--sc/source/filter/excel/xeformula.cxx24
-rw-r--r--sc/source/filter/excel/xehelper.cxx24
-rw-r--r--sc/source/filter/excel/xelink.cxx6
-rw-r--r--sc/source/filter/excel/xename.cxx25
-rw-r--r--sc/source/filter/excel/xepage.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx4
-rw-r--r--sc/source/filter/excel/xerecord.cxx2
-rw-r--r--sc/source/filter/excel/xeroot.cxx64
-rw-r--r--sc/source/filter/excel/xestream.cxx120
-rw-r--r--sc/source/filter/excel/xestring.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx36
-rw-r--r--sc/source/filter/excel/xetable.cxx30
-rw-r--r--sc/source/filter/excel/xeview.cxx2
-rw-r--r--sc/source/filter/excel/xichart.cxx226
-rw-r--r--sc/source/filter/excel/xicontent.cxx11
-rw-r--r--sc/source/filter/excel/xiescher.cxx34
-rw-r--r--sc/source/filter/excel/xihelper.cxx4
-rw-r--r--sc/source/filter/excel/xiname.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx14
-rw-r--r--sc/source/filter/excel/xistream.cxx110
-rw-r--r--sc/source/filter/excel/xistyle.cxx37
-rw-r--r--sc/source/filter/excel/xiview.cxx4
-rw-r--r--sc/source/filter/excel/xlchart.cxx31
-rwxr-xr-x[-rw-r--r--]sc/source/filter/excel/xlformula.cxx4
-rw-r--r--sc/source/filter/excel/xlroot.cxx24
-rw-r--r--sc/source/filter/excel/xltools.cxx16
-rw-r--r--sc/source/filter/ftools/fapihelper.cxx34
-rw-r--r--sc/source/filter/ftools/fprogressbar.cxx10
-rw-r--r--sc/source/filter/ftools/ftools.cxx6
-rw-r--r--sc/source/filter/html/htmlexp.cxx136
-rw-r--r--sc/source/filter/html/htmlexp2.cxx26
-rw-r--r--sc/source/filter/html/htmlimp.cxx12
-rw-r--r--sc/source/filter/html/htmlpars.cxx266
-rw-r--r--sc/source/filter/inc/XclExpChangeTrack.hxx40
-rw-r--r--sc/source/filter/inc/XclImpChangeTrack.hxx2
-rw-r--r--sc/source/filter/inc/decl.h2
-rw-r--r--sc/source/filter/inc/dif.hxx54
-rw-r--r--sc/source/filter/inc/eeimport.hxx6
-rw-r--r--sc/source/filter/inc/eeparser.hxx6
-rw-r--r--sc/source/filter/inc/excdoc.hxx6
-rw-r--r--sc/source/filter/inc/excform.hxx34
-rw-r--r--sc/source/filter/inc/excimp8.hxx24
-rw-r--r--sc/source/filter/inc/excrecds.hxx90
-rw-r--r--sc/source/filter/inc/excscen.hxx6
-rw-r--r--sc/source/filter/inc/exp_op.hxx16
-rw-r--r--sc/source/filter/inc/expbase.hxx10
-rw-r--r--sc/source/filter/inc/fapihelper.hxx7
-rw-r--r--sc/source/filter/inc/filt_pch.hxx6
-rw-r--r--sc/source/filter/inc/formel.hxx34
-rw-r--r--sc/source/filter/inc/fprogressbar.hxx6
-rw-r--r--sc/source/filter/inc/ftools.hxx18
-rw-r--r--sc/source/filter/inc/htmlexp.hxx56
-rw-r--r--sc/source/filter/inc/htmlimp.hxx4
-rw-r--r--sc/source/filter/inc/htmlpars.hxx86
-rw-r--r--sc/source/filter/inc/imp_op.hxx10
-rw-r--r--sc/source/filter/inc/lotattr.hxx8
-rw-r--r--sc/source/filter/inc/lotfntbf.hxx14
-rw-r--r--sc/source/filter/inc/lotform.hxx28
-rw-r--r--sc/source/filter/inc/lotimpop.hxx40
-rw-r--r--sc/source/filter/inc/lotrange.hxx22
-rw-r--r--sc/source/filter/inc/namebuff.hxx90
-rw-r--r--sc/source/filter/inc/op.h60
-rw-r--r--sc/source/filter/inc/optab.h2
-rw-r--r--sc/source/filter/inc/rtfexp.hxx4
-rw-r--r--sc/source/filter/inc/rtfparse.hxx14
-rw-r--r--sc/source/filter/inc/scflt.hxx370
-rw-r--r--sc/source/filter/inc/scfobj.hxx2
-rw-r--r--sc/source/filter/inc/scmem.h2
-rw-r--r--sc/source/filter/inc/tokstack.hxx110
-rw-r--r--sc/source/filter/inc/tool.h38
-rw-r--r--sc/source/filter/inc/xcl97dum.hxx20
-rw-r--r--sc/source/filter/inc/xcl97esc.hxx12
-rw-r--r--sc/source/filter/inc/xcl97rec.hxx62
-rw-r--r--sc/source/filter/inc/xechart.hxx19
-rw-r--r--sc/source/filter/inc/xecontent.hxx10
-rw-r--r--sc/source/filter/inc/xename.hxx4
-rw-r--r--sc/source/filter/inc/xerecord.hxx2
-rw-r--r--sc/source/filter/inc/xeroot.hxx6
-rw-r--r--sc/source/filter/inc/xestream.hxx20
-rw-r--r--sc/source/filter/inc/xestyle.hxx24
-rw-r--r--sc/source/filter/inc/xichart.hxx10
-rw-r--r--sc/source/filter/inc/xiescher.hxx6
-rw-r--r--sc/source/filter/inc/xihelper.hxx2
-rw-r--r--sc/source/filter/inc/xistream.hxx24
-rw-r--r--sc/source/filter/inc/xistyle.hxx17
-rw-r--r--sc/source/filter/inc/xlchart.hxx36
-rw-r--r--sc/source/filter/inc/xlconst.hxx2
-rw-r--r--sc/source/filter/inc/xlescher.hxx2
-rw-r--r--sc/source/filter/inc/xlformula.hxx4
-rw-r--r--sc/source/filter/inc/xlpage.hxx2
-rw-r--r--sc/source/filter/inc/xlpivot.hxx2
-rw-r--r--sc/source/filter/inc/xlroot.hxx7
-rw-r--r--sc/source/filter/inc/xlstyle.hxx4
-rw-r--r--sc/source/filter/inc/xltools.hxx8
-rw-r--r--sc/source/filter/inc/xlview.hxx2
-rw-r--r--sc/source/filter/lotus/expop.cxx142
-rw-r--r--sc/source/filter/lotus/filter.cxx16
-rw-r--r--sc/source/filter/lotus/lotattr.cxx10
-rw-r--r--sc/source/filter/lotus/lotform.cxx82
-rw-r--r--sc/source/filter/lotus/lotimpop.cxx88
-rw-r--r--sc/source/filter/lotus/lotread.cxx22
-rw-r--r--sc/source/filter/lotus/lotus.cxx4
-rw-r--r--sc/source/filter/lotus/memory.cxx18
-rw-r--r--sc/source/filter/lotus/op.cxx164
-rw-r--r--sc/source/filter/lotus/tool.cxx128
-rw-r--r--sc/source/filter/qpro/qpro.cxx14
-rw-r--r--sc/source/filter/qpro/qproform.cxx28
-rw-r--r--sc/source/filter/qpro/qprostyle.cxx6
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx76
-rw-r--r--sc/source/filter/rtf/expbase.cxx10
-rw-r--r--sc/source/filter/rtf/rtfexp.cxx28
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx44
-rw-r--r--sc/source/filter/starcalc/scflt.cxx342
-rw-r--r--sc/source/filter/starcalc/scfobj.cxx2
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx50
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx24
-rw-r--r--sc/source/filter/xcl97/xcl97dum.cxx20
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx8
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx117
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.cxx24
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.hxx12
-rw-r--r--sc/source/filter/xml/XMLCellRangeSourceContext.cxx6
-rw-r--r--sc/source/filter/xml/XMLCellRangeSourceContext.hxx4
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx22
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx8
-rw-r--r--sc/source/filter/xml/XMLCodeNameProvider.cxx8
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.cxx10
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.cxx22
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.hxx4
-rw-r--r--sc/source/filter/xml/XMLConverter.cxx6
-rw-r--r--sc/source/filter/xml/XMLConverter.hxx10
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.cxx46
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.hxx28
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.cxx26
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.hxx12
-rw-r--r--sc/source/filter/xml/XMLEmptyContext.cxx4
-rw-r--r--sc/source/filter/xml/XMLEmptyContext.hxx4
-rw-r--r--sc/source/filter/xml/XMLExportDDELinks.cxx8
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx12
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx18
-rw-r--r--sc/source/filter/xml/XMLExportIterator.cxx76
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.hxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx46
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableHeaderFooterContext.cxx8
-rw-r--r--sc/source/filter/xml/XMLTableMasterPageExport.cxx36
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapesContext.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableShapesContext.hxx4
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.cxx10
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.hxx4
-rw-r--r--sc/source/filter/xml/XMLTextPContext.cxx8
-rw-r--r--sc/source/filter/xml/XMLTextPContext.hxx6
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx224
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.hxx4
-rw-r--r--sc/source/filter/xml/xmlannoi.cxx8
-rw-r--r--sc/source/filter/xml/xmlannoi.hxx4
-rw-r--r--sc/source/filter/xml/xmlbodyi.cxx14
-rw-r--r--sc/source/filter/xml/xmlbodyi.hxx4
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx88
-rw-r--r--sc/source/filter/xml/xmlcelli.hxx4
-rw-r--r--sc/source/filter/xml/xmlcoli.cxx18
-rw-r--r--sc/source/filter/xml/xmlcoli.hxx8
-rw-r--r--sc/source/filter/xml/xmlconti.cxx6
-rw-r--r--sc/source/filter/xml/xmlconti.hxx4
-rw-r--r--sc/source/filter/xml/xmlcvali.cxx56
-rw-r--r--sc/source/filter/xml/xmlcvali.hxx4
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx156
-rw-r--r--sc/source/filter/xml/xmldpimp.hxx76
-rw-r--r--sc/source/filter/xml/xmldrani.cxx96
-rw-r--r--sc/source/filter/xml/xmldrani.hxx40
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx140
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.cxx20
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.hxx20
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx76
-rw-r--r--sc/source/filter/xml/xmlfilti.hxx32
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx20
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx74
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx6
-rw-r--r--sc/source/filter/xml/xmllabri.cxx12
-rw-r--r--sc/source/filter/xml/xmllabri.hxx8
-rw-r--r--sc/source/filter/xml/xmlnexpi.cxx18
-rw-r--r--sc/source/filter/xml/xmlnexpi.hxx12
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx24
-rw-r--r--sc/source/filter/xml/xmlrowi.hxx8
-rw-r--r--sc/source/filter/xml/xmlsceni.cxx14
-rw-r--r--sc/source/filter/xml/xmlsceni.hxx4
-rw-r--r--sc/source/filter/xml/xmlsorti.cxx20
-rw-r--r--sc/source/filter/xml/xmlsorti.hxx8
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx116
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx10
-rw-r--r--sc/source/filter/xml/xmlstyli.hxx4
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx22
-rw-r--r--sc/source/filter/xml/xmltabi.cxx44
-rw-r--r--sc/source/filter/xml/xmltabi.hxx10
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx68
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx8
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx106
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx60
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx32
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx8
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx30
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx78
-rw-r--r--sc/source/ui/app/client.cxx6
-rw-r--r--sc/source/ui/app/drwtrans.cxx64
-rw-r--r--sc/source/ui/app/inputhdl.cxx705
-rwxr-xr-x[-rw-r--r--]sc/source/ui/app/inputwin.cxx165
-rw-r--r--sc/source/ui/app/lnktrans.cxx2
-rw-r--r--sc/source/ui/app/msgpool.cxx8
-rw-r--r--sc/source/ui/app/rfindlst.cxx2
-rw-r--r--sc/source/ui/app/scdll.cxx54
-rw-r--r--sc/source/ui/app/scmod.cxx311
-rw-r--r--sc/source/ui/app/scmod2.cxx12
-rw-r--r--sc/source/ui/app/seltrans.cxx28
-rw-r--r--sc/source/ui/app/template.cxx10
-rw-r--r--sc/source/ui/app/transobj.cxx84
-rw-r--r--sc/source/ui/app/uiitems.cxx48
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx4
-rw-r--r--sc/source/ui/attrdlg/condfrmt.cxx76
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx152
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx146
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx32
-rw-r--r--sc/source/ui/cctrl/cbuttonw.cxx16
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx10
-rw-r--r--sc/source/ui/cctrl/popmenu.cxx2
-rw-r--r--sc/source/ui/cctrl/tbinsert.cxx10
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx44
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx46
-rw-r--r--sc/source/ui/dbgui/asciiopt.src17
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx46
-rw-r--r--sc/source/ui/dbgui/consdlg.src16
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx8
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx2
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx4
-rw-r--r--sc/source/ui/dbgui/dapitype.cxx4
-rw-r--r--sc/source/ui/dbgui/dapitype.src8
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx83
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.cxx16
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.src16
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx80
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx291
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx26
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx39
-rw-r--r--sc/source/ui/dbgui/imoptdlg.src15
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx52
-rw-r--r--sc/source/ui/dbgui/pivot.hrc4
-rw-r--r--sc/source/ui/dbgui/pivot.src39
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx74
-rw-r--r--sc/source/ui/dbgui/pvfundlg.src23
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx474
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx41
-rw-r--r--sc/source/ui/dbgui/scendlg.hrc3
-rw-r--r--sc/source/ui/dbgui/scendlg.src15
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx86
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx34
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx67
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx8
-rw-r--r--sc/source/ui/dbgui/textimportoptions.src5
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx109
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx111
-rw-r--r--sc/source/ui/dbgui/validate.cxx98
-rw-r--r--sc/source/ui/dbgui/validate.src17
-rw-r--r--sc/source/ui/docshell/arealink.cxx53
-rw-r--r--sc/source/ui/docshell/autostyl.cxx24
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx306
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx100
-rw-r--r--sc/source/ui/docshell/docfunc.cxx849
-rw-r--r--sc/source/ui/docshell/docsh.cxx439
-rw-r--r--sc/source/ui/docshell/docsh2.cxx16
-rw-r--r--sc/source/ui/docshell/docsh3.cxx168
-rw-r--r--sc/source/ui/docshell/docsh4.cxx311
-rw-r--r--sc/source/ui/docshell/docsh5.cxx174
-rw-r--r--sc/source/ui/docshell/docsh6.cxx70
-rw-r--r--sc/source/ui/docshell/docsh8.cxx92
-rw-r--r--sc/source/ui/docshell/editable.cxx44
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx6
-rw-r--r--sc/source/ui/docshell/impex.cxx304
-rw-r--r--sc/source/ui/docshell/olinefun.cxx226
-rw-r--r--sc/source/ui/docshell/pagedata.cxx14
-rw-r--r--sc/source/ui/docshell/pntlock.cxx6
-rw-r--r--sc/source/ui/docshell/servobj.cxx36
-rw-r--r--sc/source/ui/docshell/sizedev.cxx6
-rw-r--r--sc/source/ui/docshell/tablink.cxx105
-rw-r--r--sc/source/ui/docshell/tpstat.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx56
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx54
-rw-r--r--sc/source/ui/drawfunc/drawsh4.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx52
-rw-r--r--sc/source/ui/drawfunc/drformsh.src14
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx126
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx12
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx28
-rw-r--r--sc/source/ui/drawfunc/fuconarc.cxx22
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx26
-rw-r--r--sc/source/ui/drawfunc/fuconpol.cxx38
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx22
-rw-r--r--sc/source/ui/drawfunc/fuconstr.cxx48
-rw-r--r--sc/source/ui/drawfunc/fuconuno.cxx24
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx110
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx22
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx48
-rw-r--r--sc/source/ui/drawfunc/fumark.cxx44
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx32
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx126
-rw-r--r--sc/source/ui/drawfunc/fusel2.cxx20
-rw-r--r--sc/source/ui/drawfunc/futext.cxx88
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx4
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx8
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx4
-rw-r--r--sc/source/ui/drawfunc/objdraw.src890
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx70
-rw-r--r--sc/source/ui/formdlg/dwfunctr.src4
-rw-r--r--sc/source/ui/formdlg/formula.cxx76
-rw-r--r--sc/source/ui/formdlg/privsplt.cxx12
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx8
-rw-r--r--sc/source/ui/inc/IAnyRefDialog.hxx8
-rw-r--r--sc/source/ui/inc/acredlin.hxx60
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx52
-rw-r--r--sc/source/ui/inc/areasave.hxx10
-rw-r--r--sc/source/ui/inc/areasdlg.hxx16
-rw-r--r--sc/source/ui/inc/asciiopt.hxx30
-rw-r--r--sc/source/ui/inc/attrdlg.hxx2
-rw-r--r--sc/source/ui/inc/auditsh.hxx2
-rw-r--r--sc/source/ui/inc/autofmt.hxx16
-rw-r--r--sc/source/ui/inc/autostyl.hxx10
-rw-r--r--sc/source/ui/inc/cbutton.hxx14
-rw-r--r--sc/source/ui/inc/cellsh.hxx4
-rw-r--r--sc/source/ui/inc/colrowba.hxx26
-rw-r--r--sc/source/ui/inc/condfrmt.hrc6
-rw-r--r--sc/source/ui/inc/condfrmt.hxx13
-rw-r--r--sc/source/ui/inc/conflictsdlg.hxx26
-rw-r--r--sc/source/ui/inc/consdlg.hxx16
-rw-r--r--sc/source/ui/inc/content.hxx48
-rw-r--r--sc/source/ui/inc/corodlg.hxx8
-rw-r--r--sc/source/ui/inc/crdlg.hxx4
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx12
-rw-r--r--sc/source/ui/inc/csvruler.hxx6
-rw-r--r--sc/source/ui/inc/dapitype.hxx2
-rw-r--r--sc/source/ui/inc/datafdlg.hxx2
-rw-r--r--sc/source/ui/inc/dbdocfun.hxx36
-rw-r--r--sc/source/ui/inc/dbfunc.hxx62
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx8
-rw-r--r--sc/source/ui/inc/delcldlg.hxx4
-rw-r--r--sc/source/ui/inc/delcodlg.hxx14
-rw-r--r--sc/source/ui/inc/docfunc.hxx144
-rw-r--r--sc/source/ui/inc/docsh.hxx207
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx2
-rw-r--r--sc/source/ui/inc/drawsh.hxx8
-rw-r--r--sc/source/ui/inc/drawview.hxx12
-rw-r--r--sc/source/ui/inc/drtxtob.hxx10
-rw-r--r--sc/source/ui/inc/drwtrans.hxx20
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx22
-rw-r--r--sc/source/ui/inc/editable.hxx10
-rw-r--r--sc/source/ui/inc/editsh.hxx6
-rw-r--r--sc/source/ui/inc/fieldwnd.hxx33
-rw-r--r--sc/source/ui/inc/filldlg.hxx33
-rw-r--r--sc/source/ui/inc/filtdlg.hxx36
-rw-r--r--sc/source/ui/inc/foptmgr.hxx2
-rw-r--r--sc/source/ui/inc/formula.hxx22
-rw-r--r--sc/source/ui/inc/fuconarc.hxx8
-rw-r--r--sc/source/ui/inc/fuconcustomshape.hxx8
-rw-r--r--sc/source/ui/inc/fuconpol.hxx8
-rw-r--r--sc/source/ui/inc/fuconrec.hxx8
-rw-r--r--sc/source/ui/inc/fuconstr.hxx12
-rw-r--r--sc/source/ui/inc/fuconuno.hxx12
-rw-r--r--sc/source/ui/inc/fudraw.hxx10
-rw-r--r--sc/source/ui/inc/fuedipo.hxx8
-rw-r--r--sc/source/ui/inc/fumark.hxx14
-rw-r--r--sc/source/ui/inc/funcpage.hxx14
-rw-r--r--sc/source/ui/inc/funcutl.hxx6
-rw-r--r--sc/source/ui/inc/fupoor.hxx16
-rw-r--r--sc/source/ui/inc/fusel.hxx14
-rw-r--r--sc/source/ui/inc/futext.hxx14
-rw-r--r--sc/source/ui/inc/gridmerg.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx104
-rw-r--r--sc/source/ui/inc/groupdlg.hxx10
-rw-r--r--sc/source/ui/inc/hdrcont.hxx36
-rw-r--r--sc/source/ui/inc/hfedtdlg.hxx4
-rw-r--r--sc/source/ui/inc/highred.hxx6
-rw-r--r--sc/source/ui/inc/hiranges.hxx4
-rw-r--r--sc/source/ui/inc/imoptdlg.hxx24
-rw-r--r--sc/source/ui/inc/impex.hxx86
-rw-r--r--sc/source/ui/inc/inputhdl.hxx102
-rw-r--r--sc/source/ui/inc/inputwin.hxx36
-rw-r--r--sc/source/ui/inc/inscldlg.hxx4
-rw-r--r--sc/source/ui/inc/inscodlg.hxx42
-rw-r--r--sc/source/ui/inc/instbdlg.hxx16
-rw-r--r--sc/source/ui/inc/lbseldlg.hxx2
-rw-r--r--sc/source/ui/inc/linkarea.hxx4
-rw-r--r--sc/source/ui/inc/msgpool.hxx2
-rw-r--r--sc/source/ui/inc/mtrindlg.hxx6
-rw-r--r--sc/source/ui/inc/mvtabdlg.hxx10
-rw-r--r--sc/source/ui/inc/namecrea.hxx6
-rw-r--r--sc/source/ui/inc/namedlg.hxx8
-rw-r--r--sc/source/ui/inc/namepast.hxx4
-rw-r--r--sc/source/ui/inc/navcitem.hxx4
-rw-r--r--sc/source/ui/inc/navipi.hxx24
-rw-r--r--sc/source/ui/inc/navsett.hxx18
-rw-r--r--sc/source/ui/inc/notemark.hxx10
-rw-r--r--sc/source/ui/inc/olinefun.hxx24
-rw-r--r--sc/source/ui/inc/olinewin.hxx2
-rw-r--r--sc/source/ui/inc/opredlin.hxx2
-rw-r--r--sc/source/ui/inc/optload.hxx2
-rw-r--r--sc/source/ui/inc/optsolver.hxx20
-rw-r--r--sc/source/ui/inc/output.hxx86
-rw-r--r--sc/source/ui/inc/pagedata.hxx14
-rw-r--r--sc/source/ui/inc/parawin.hxx46
-rw-r--r--sc/source/ui/inc/pfiltdlg.hxx10
-rw-r--r--sc/source/ui/inc/pfuncache.hxx4
-rw-r--r--sc/source/ui/inc/pntlock.hxx24
-rw-r--r--sc/source/ui/inc/popmenu.hxx12
-rw-r--r--sc/source/ui/inc/preview.hxx64
-rw-r--r--sc/source/ui/inc/prevloc.hxx40
-rw-r--r--sc/source/ui/inc/prevwsh.hxx30
-rw-r--r--sc/source/ui/inc/printfun.hxx118
-rw-r--r--sc/source/ui/inc/privsplt.hxx4
-rw-r--r--sc/source/ui/inc/pvfundlg.hxx26
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx46
-rw-r--r--sc/source/ui/inc/redcom.hxx2
-rw-r--r--sc/source/ui/inc/reffact.hxx16
-rw-r--r--sc/source/ui/inc/refundo.hxx2
-rw-r--r--sc/source/ui/inc/rfindlst.hxx10
-rw-r--r--sc/source/ui/inc/scendlg.hxx10
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx12
-rw-r--r--sc/source/ui/inc/scuiautofmt.hxx8
-rw-r--r--sc/source/ui/inc/scuiimoptdlg.hxx13
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx16
-rw-r--r--sc/source/ui/inc/select.hxx26
-rw-r--r--sc/source/ui/inc/seltrans.hxx2
-rw-r--r--sc/source/ui/inc/servobj.hxx6
-rw-r--r--sc/source/ui/inc/shtabdlg.hxx12
-rw-r--r--sc/source/ui/inc/simpref.hxx22
-rw-r--r--sc/source/ui/inc/sizedev.hxx4
-rw-r--r--sc/source/ui/inc/solvrdlg.hxx8
-rw-r--r--sc/source/ui/inc/sortdlg.hxx20
-rw-r--r--sc/source/ui/inc/spelldialog.hxx2
-rw-r--r--sc/source/ui/inc/spelleng.hxx4
-rw-r--r--sc/source/ui/inc/strindlg.hxx4
-rw-r--r--sc/source/ui/inc/styledlg.hxx6
-rw-r--r--sc/source/ui/inc/tabbgcolordlg.hxx7
-rw-r--r--sc/source/ui/inc/tabcont.hxx12
-rw-r--r--sc/source/ui/inc/tabopdlg.hxx6
-rw-r--r--sc/source/ui/inc/tabpages.hxx16
-rw-r--r--sc/source/ui/inc/tabsplit.hxx4
-rw-r--r--sc/source/ui/inc/tabview.hxx163
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx144
-rw-r--r--sc/source/ui/inc/tbinsert.hxx8
-rw-r--r--sc/source/ui/inc/tbzoomsliderctrl.hxx10
-rw-r--r--sc/source/ui/inc/textdlgs.hxx4
-rw-r--r--sc/source/ui/inc/tpcalc.hxx6
-rw-r--r--sc/source/ui/inc/tpcompatibility.hxx2
-rw-r--r--sc/source/ui/inc/tpformula.hxx2
-rw-r--r--sc/source/ui/inc/tphf.hxx14
-rw-r--r--sc/source/ui/inc/tphfedit.hxx4
-rw-r--r--sc/source/ui/inc/tpprint.hxx4
-rw-r--r--sc/source/ui/inc/tpsort.hxx24
-rw-r--r--sc/source/ui/inc/tpstat.hxx2
-rw-r--r--sc/source/ui/inc/tpsubt.hxx30
-rw-r--r--sc/source/ui/inc/tptable.hxx4
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx22
-rw-r--r--sc/source/ui/inc/tpview.hxx4
-rw-r--r--sc/source/ui/inc/transobj.hxx17
-rw-r--r--sc/source/ui/inc/ui_pch.hxx4
-rw-r--r--sc/source/ui/inc/uiitems.hxx56
-rw-r--r--sc/source/ui/inc/undobase.hxx19
-rw-r--r--sc/source/ui/inc/undoblk.hxx258
-rw-r--r--sc/source/ui/inc/undocell.hxx76
-rw-r--r--sc/source/ui/inc/undodat.hxx122
-rw-r--r--sc/source/ui/inc/undodraw.hxx10
-rw-r--r--sc/source/ui/inc/undoolk.hxx2
-rw-r--r--sc/source/ui/inc/undostyl.hxx4
-rw-r--r--sc/source/ui/inc/undotab.hxx90
-rw-r--r--sc/source/ui/inc/validate.hxx26
-rw-r--r--sc/source/ui/inc/viewdata.hxx122
-rw-r--r--sc/source/ui/inc/viewfunc.hxx203
-rw-r--r--sc/source/ui/inc/viewutil.hxx14
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx394
-rw-r--r--sc/source/ui/miscdlgs/acredlin.src4
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx130
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx36
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx34
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.src4
-rw-r--r--sc/source/ui/miscdlgs/crdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx107
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx20
-rw-r--r--sc/source/ui/miscdlgs/delcldlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/delcodlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/filldlg.cxx48
-rw-r--r--sc/source/ui/miscdlgs/groupdlg.cxx8
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx27
-rw-r--r--sc/source/ui/miscdlgs/highred.src9
-rw-r--r--sc/source/ui/miscdlgs/inscldlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx68
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx17
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.src10
-rw-r--r--sc/source/ui/miscdlgs/lbseldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx33
-rw-r--r--sc/source/ui/miscdlgs/linkarea.src6
-rw-r--r--sc/source/ui/miscdlgs/mtrindlg.cxx10
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx36
-rw-r--r--sc/source/ui/miscdlgs/namecrea.cxx14
-rw-r--r--sc/source/ui/miscdlgs/namepast.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx37
-rw-r--r--sc/source/ui/miscdlgs/protectiondlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/protectiondlg.src4
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx10
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.src12
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx58
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx14
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.src3
-rw-r--r--sc/source/ui/miscdlgs/shtabdlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx34
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx28
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx21
-rw-r--r--sc/source/ui/miscdlgs/strindlg.cxx24
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx20
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/textdlgs.cxx4
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx64
-rw-r--r--sc/source/ui/navipi/content.cxx218
-rw-r--r--sc/source/ui/navipi/navcitem.cxx4
-rw-r--r--sc/source/ui/navipi/navipi.cxx84
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx10
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx28
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx18
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx2
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx2
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx16
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx68
-rw-r--r--sc/source/ui/optdlg/tpview.cxx98
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx106
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.cxx10
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.src48
-rw-r--r--sc/source/ui/pagedlg/pagedlg.src26
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx34
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx22
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx24
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx105
-rw-r--r--sc/source/ui/src/attrdlg.src4
-rw-r--r--sc/source/ui/src/autofmt.src12
-rw-r--r--sc/source/ui/src/condfrmt.src27
-rw-r--r--sc/source/ui/src/crnrdlg.src9
-rw-r--r--sc/source/ui/src/dbnamdlg.src12
-rw-r--r--sc/source/ui/src/filter.src78
-rw-r--r--sc/source/ui/src/globstr.src38
-rw-r--r--sc/source/ui/src/hdrcont.src22
-rw-r--r--sc/source/ui/src/miscdlgs.src109
-rw-r--r--sc/source/ui/src/namedlg.src12
-rw-r--r--sc/source/ui/src/opredlin.src6
-rw-r--r--sc/source/ui/src/optdlg.src57
-rw-r--r--sc/source/ui/src/optsolver.src37
-rw-r--r--sc/source/ui/src/popup.src108
-rw-r--r--sc/source/ui/src/scfuncs.src11
-rw-r--r--sc/source/ui/src/scstring.src39
-rw-r--r--sc/source/ui/src/simpref.src2
-rw-r--r--sc/source/ui/src/solveroptions.src4
-rw-r--r--sc/source/ui/src/solvrdlg.src7
-rw-r--r--sc/source/ui/src/sortdlg.src21
-rw-r--r--sc/source/ui/src/subtdlg.src8
-rw-r--r--sc/source/ui/src/tabopdlg.src8
-rw-r--r--sc/source/ui/styleui/styledlg.cxx8
-rw-r--r--sc/source/ui/undo/areasave.cxx34
-rw-r--r--sc/source/ui/undo/refundo.cxx6
-rw-r--r--sc/source/ui/undo/undobase.cxx61
-rw-r--r--sc/source/ui/undo/undoblk.cxx271
-rw-r--r--sc/source/ui/undo/undoblk2.cxx33
-rw-r--r--sc/source/ui/undo/undoblk3.cxx241
-rw-r--r--sc/source/ui/undo/undocell.cxx130
-rw-r--r--sc/source/ui/undo/undodat.cxx332
-rw-r--r--sc/source/ui/undo/undodraw.cxx16
-rw-r--r--sc/source/ui/undo/undoolk.cxx2
-rw-r--r--sc/source/ui/undo/undostyl.cxx24
-rw-r--r--sc/source/ui/undo/undotab.cxx305
-rw-r--r--sc/source/ui/undo/undoutil.cxx15
-rw-r--r--sc/source/ui/unoobj/addruno.cxx16
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx20
-rw-r--r--sc/source/ui/unoobj/appluno.cxx181
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx871
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx14
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx12
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx25
-rw-r--r--sc/source/ui/unoobj/confuno.cxx14
-rw-r--r--sc/source/ui/unoobj/cursuno.cxx10
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx89
-rw-r--r--sc/source/ui/unoobj/datauno.cxx138
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx4
-rw-r--r--sc/source/ui/unoobj/detreg.cxx21
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx20
-rw-r--r--sc/source/ui/unoobj/docuno.cxx299
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx16
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx2
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx54
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx8
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx71
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx52
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx94
-rw-r--r--sc/source/ui/unoobj/miscuno.cxx2
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx14
-rw-r--r--sc/source/ui/unoobj/optuno.cxx8
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx122
-rw-r--r--sc/source/ui/unoobj/servuno.cxx10
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx28
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx22
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx160
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
-rw-r--r--sc/source/ui/unoobj/textuno.cxx66
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx227
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx82
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx32
-rw-r--r--sc/source/ui/vba/makefile.mk12
-rw-r--r--sc/source/ui/vba/testvba/makefile.mk5
-rw-r--r--sc/source/ui/vba/testvba/testvba.cxx6
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx83
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx10
-rw-r--r--sc/source/ui/vba/vbaassistant.cxx4
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxis.cxx32
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx4
-rw-r--r--sc/source/ui/vba/vbacharacters.hxx2
-rw-r--r--sc/source/ui/vba/vbachart.cxx34
-rw-r--r--sc/source/ui/vba/vbacomment.cxx6
-rw-r--r--sc/source/ui/vba/vbaeventshelper.cxx217
-rw-r--r--sc/source/ui/vba/vbaeventshelper.hxx9
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx2
-rw-r--r--sc/source/ui/vba/vbafiledialogselecteditems.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx28
-rw-r--r--sc/source/ui/vba/vbaformat.cxx14
-rw-r--r--sc/source/ui/vba/vbaformatcondition.cxx2
-rw-r--r--sc/source/ui/vba/vbafoundfiles.cxx2
-rw-r--r--sc/source/ui/vba/vbahelper.cxx24
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx2
-rw-r--r--sc/source/ui/vba/vbanames.cxx2
-rw-r--r--sc/source/ui/vba/vbapagebreak.cxx8
-rw-r--r--sc/source/ui/vba/vbapagebreaks.cxx2
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx26
-rw-r--r--sc/source/ui/vba/vbaquerytable.cxx4
-rw-r--r--sc/source/ui/vba/vbarange.cxx353
-rw-r--r--sc/source/ui/vba/vbarange.hxx23
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx43
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx10
-rw-r--r--sc/source/ui/vba/vbawindow.cxx6
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx12
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx76
-rw-r--r--sc/source/ui/vba/vbaworkbooks.hxx5
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx71
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx1
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx14
-rw-r--r--sc/source/ui/vba/vbawsfunction.cxx6
-rw-r--r--sc/source/ui/view/auditsh.cxx14
-rw-r--r--sc/source/ui/view/cellsh.cxx101
-rw-r--r--sc/source/ui/view/cellsh1.cxx236
-rw-r--r--sc/source/ui/view/cellsh2.cxx200
-rw-r--r--sc/source/ui/view/cellsh3.cxx118
-rw-r--r--sc/source/ui/view/cellsh4.cxx48
-rw-r--r--sc/source/ui/view/colrowba.cxx50
-rw-r--r--sc/source/ui/view/dbfunc.cxx74
-rw-r--r--sc/source/ui/view/dbfunc2.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx296
-rw-r--r--sc/source/ui/view/dbfunc4.cxx14
-rw-r--r--sc/source/ui/view/drawattr.cxx6
-rw-r--r--sc/source/ui/view/drawutil.cxx4
-rw-r--r--sc/source/ui/view/drawvie3.cxx24
-rw-r--r--sc/source/ui/view/drawvie4.cxx42
-rw-r--r--sc/source/ui/view/drawview.cxx97
-rw-r--r--sc/source/ui/view/editsh.cxx132
-rw-r--r--sc/source/ui/view/formatsh.cxx254
-rw-r--r--sc/source/ui/view/galwrap.cxx4
-rw-r--r--sc/source/ui/view/gridmerg.cxx6
-rw-r--r--sc/source/ui/view/gridwin.cxx684
-rw-r--r--sc/source/ui/view/gridwin2.cxx158
-rw-r--r--sc/source/ui/view/gridwin3.cxx66
-rw-r--r--sc/source/ui/view/gridwin4.cxx212
-rw-r--r--sc/source/ui/view/gridwin5.cxx46
-rw-r--r--sc/source/ui/view/hdrcont.cxx124
-rw-r--r--sc/source/ui/view/hintwin.cxx2
-rw-r--r--sc/source/ui/view/imapwrap.cxx2
-rw-r--r--sc/source/ui/view/invmerge.cxx6
-rw-r--r--sc/source/ui/view/notemark.cxx10
-rw-r--r--sc/source/ui/view/olinewin.cxx64
-rw-r--r--sc/source/ui/view/output.cxx280
-rw-r--r--sc/source/ui/view/output2.cxx542
-rw-r--r--sc/source/ui/view/output3.cxx8
-rw-r--r--sc/source/ui/view/pfuncache.cxx6
-rw-r--r--sc/source/ui/view/pgbrksh.cxx2
-rw-r--r--sc/source/ui/view/pivotsh.cxx8
-rw-r--r--sc/source/ui/view/preview.cxx254
-rw-r--r--sc/source/ui/view/prevloc.cxx136
-rw-r--r--sc/source/ui/view/prevwsh.cxx105
-rw-r--r--sc/source/ui/view/prevwsh2.cxx18
-rw-r--r--sc/source/ui/view/printfun.cxx360
-rw-r--r--sc/source/ui/view/reffact.cxx28
-rw-r--r--sc/source/ui/view/select.cxx204
-rw-r--r--sc/source/ui/view/selectionstate.cxx6
-rw-r--r--sc/source/ui/view/spelldialog.cxx8
-rw-r--r--sc/source/ui/view/spelleng.cxx14
-rw-r--r--sc/source/ui/view/tabcont.cxx70
-rw-r--r--sc/source/ui/view/tabsplit.cxx6
-rw-r--r--sc/source/ui/view/tabview.cxx272
-rw-r--r--sc/source/ui/view/tabview2.cxx108
-rw-r--r--sc/source/ui/view/tabview3.cxx302
-rw-r--r--sc/source/ui/view/tabview4.cxx50
-rw-r--r--sc/source/ui/view/tabview5.cxx72
-rw-r--r--sc/source/ui/view/tabvwsh.cxx3
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx48
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx166
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx367
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx31
-rw-r--r--sc/source/ui/view/tabvwsh8.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx32
-rw-r--r--sc/source/ui/view/tabvwsha.cxx81
-rw-r--r--sc/source/ui/view/tabvwshb.cxx122
-rw-r--r--sc/source/ui/view/tabvwshc.cxx14
-rw-r--r--sc/source/ui/view/tabvwshd.cxx2
-rw-r--r--sc/source/ui/view/tabvwshe.cxx24
-rw-r--r--sc/source/ui/view/tabvwshf.cxx82
-rw-r--r--sc/source/ui/view/tabvwshh.cxx12
-rw-r--r--sc/source/ui/view/viewdata.cxx294
-rw-r--r--sc/source/ui/view/viewfun2.cxx430
-rw-r--r--sc/source/ui/view/viewfun3.cxx294
-rw-r--r--sc/source/ui/view/viewfun4.cxx88
-rw-r--r--sc/source/ui/view/viewfun5.cxx72
-rw-r--r--sc/source/ui/view/viewfun6.cxx18
-rw-r--r--sc/source/ui/view/viewfun7.cxx87
-rw-r--r--sc/source/ui/view/viewfunc.cxx514
-rw-r--r--sc/source/ui/view/viewutil.cxx64
879 files changed, 26878 insertions, 25922 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index aaf279429900..5327df0afd10 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -97,7 +97,7 @@ ScAttrArray::~ScAttrArray()
void ScAttrArray::TestData() const
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
if (pData)
{
SCSIZE nPos;
@@ -124,7 +124,7 @@ void ScAttrArray::TestData() const
//------------------------------------------------------------------------
-void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
+void ScAttrArray::Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc )
{
if (pData)
{
@@ -137,7 +137,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
{
// ensure that attributing changes text width of cell
pOldPattern = pData[i].pPattern;
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
pPattern->GetItemSet(), pOldPattern->GetItemSet() ) )
{
@@ -158,7 +158,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
delete[] pData;
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, false);
if (bAlloc)
{
@@ -180,9 +180,9 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
}
-BOOL ScAttrArray::Concat(SCSIZE nPos)
+sal_Bool ScAttrArray::Concat(SCSIZE nPos)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if (pData && (nPos < nCount))
{
if (nPos > 0)
@@ -196,7 +196,7 @@ BOOL ScAttrArray::Concat(SCSIZE nPos)
pData[nCount - 1].nRow = 0;
nCount--;
nPos--;
- bRet = TRUE;
+ bRet = sal_True;
}
}
if (nPos + 1 < nCount)
@@ -209,7 +209,7 @@ BOOL ScAttrArray::Concat(SCSIZE nPos)
pData[nCount - 1].pPattern = NULL;
pData[nCount - 1].nRow = 0;
nCount--;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -218,11 +218,11 @@ BOOL ScAttrArray::Concat(SCSIZE nPos)
//------------------------------------------------------------------------
-BOOL ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
+sal_Bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
{
long nHi = static_cast<long>(nCount) - 1;
long i = 0;
- BOOL bFound = (nCount == 1);
+ sal_Bool bFound = (nCount == 1);
if (pData)
{
long nLo = 0;
@@ -242,11 +242,11 @@ BOOL ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
if (nStartRow >= (long) nRow)
nHi = --i;
else
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
- bFound = FALSE;
+ bFound = false;
if (bFound)
nIndex=(SCSIZE)i;
@@ -284,7 +284,7 @@ const ScPatternAttr* ScAttrArray::GetPatternRange( SCROW& rStartRow,
//------------------------------------------------------------------------
-void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bPutToPool )
+void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, sal_Bool bPutToPool )
{
SetPatternArea( nRow, nRow, pPattern, bPutToPool );
}
@@ -313,7 +313,7 @@ void ScAttrArray::RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow,
}
void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern,
- BOOL bPutToPool, ScEditDataArray* pDataArray )
+ sal_Bool bPutToPool, ScEditDataArray* pDataArray )
{
if (ValidRow(nStartRow) && ValidRow(nEndRow))
{
@@ -363,7 +363,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
const SfxItemSet& rNewSet = pPattern->GetItemSet();
const SfxItemSet& rOldSet = pData[nx].pPattern->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rNewSet, rOldSet ) )
{
@@ -385,8 +385,8 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
// continue modifying data array
SCSIZE nInsert; // insert position (MAXROWCOUNT := no insert)
- BOOL bCombined = FALSE;
- BOOL bSplit = FALSE;
+ sal_Bool bCombined = false;
+ sal_Bool bSplit = false;
if ( nStartRow > 0 )
{
nInsert = MAXROWCOUNT;
@@ -396,7 +396,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
{ // may be a split or a simple insert or just a shrink,
// row adjustment is done further down
if ( pData[ni].nRow > nEndRow )
- bSplit = TRUE;
+ bSplit = sal_True;
ni++;
nInsert = ni;
}
@@ -407,7 +407,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
{ // combine
pData[ni-1].nRow = nEndRow;
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
}
else
@@ -431,7 +431,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
pData[ni-1].nRow = nStartRow - 1; // shrink
}
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
else if ( ni > 0 && ni == nInsert )
pData[ni-1].nRow = nStartRow - 1; // shrink
@@ -490,7 +490,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
}
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, false);
}
}
@@ -534,7 +534,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
{
if (nY1 < nStartRow) nY1=nStartRow;
if (nY2 > nEndRow) nY2=nEndRow;
- SetPatternArea( nY1, nY2, pNewPattern, TRUE );
+ SetPatternArea( nY1, nY2, pNewPattern, sal_True );
Search( nStart, nPos );
}
else
@@ -544,7 +544,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
const SfxItemSet& rNewSet = pNewPattern->GetItemSet();
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rNewSet, rOldSet ) )
{
@@ -566,7 +566,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
while ((nStart <= nEndRow) && (nPos < nCount));
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, false);
}
#ifdef DBG_UTIL
@@ -592,7 +592,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
}
void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
- const SvxBorderLine* pLine, BOOL bColorOnly )
+ const SvxBorderLine* pLine, sal_Bool bColorOnly )
{
if ( bColorOnly && !pLine )
return;
@@ -612,11 +612,11 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
const ScPatternAttr* pOldPattern = pData[nPos].pPattern;
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
const SfxPoolItem* pBoxItem = 0;
- SfxItemState eState = rOldSet.GetItemState( ATTR_BORDER, TRUE, &pBoxItem );
+ SfxItemState eState = rOldSet.GetItemState( ATTR_BORDER, sal_True, &pBoxItem );
const SfxPoolItem* pTLBRItem = 0;
- SfxItemState eTLBRState = rOldSet.GetItemState( ATTR_BORDER_TLBR, TRUE, &pTLBRItem );
+ SfxItemState eTLBRState = rOldSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pTLBRItem );
const SfxPoolItem* pBLTRItem = 0;
- SfxItemState eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, TRUE, &pBLTRItem );
+ SfxItemState eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pBLTRItem );
if ( (SFX_ITEM_SET == eState) || (SFX_ITEM_SET == eTLBRState) || (SFX_ITEM_SET == eBLTRState) )
{
@@ -687,7 +687,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
{
if (nY1 < nStartRow) nY1=nStartRow;
if (nY2 > nEndRow) nY2=nEndRow;
- SetPatternArea( nY1, nY2, pNewPattern, TRUE );
+ SetPatternArea( nY1, nY2, pNewPattern, sal_True );
Search( nStart, nPos );
}
else
@@ -743,7 +743,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
do
{
const ScPatternAttr* pOldPattern = pData[nPos].pPattern;
- const ScPatternAttr* pNewPattern = (const ScPatternAttr*) &pCache->ApplyTo( *pOldPattern, TRUE );
+ const ScPatternAttr* pNewPattern = (const ScPatternAttr*) &pCache->ApplyTo( *pOldPattern, sal_True );
ScDocumentPool::CheckRef( *pOldPattern );
ScDocumentPool::CheckRef( *pNewPattern );
if (pNewPattern != pOldPattern)
@@ -766,7 +766,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
const SfxItemSet& rNewSet = pNewPattern->GetItemSet();
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rNewSet, rOldSet ) )
{
@@ -802,7 +802,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
while (nStart <= nEndRow);
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, false);
}
#ifdef DBG_UTIL
@@ -830,14 +830,14 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
{
const SfxPoolItem* pNewItem;
const SfxPoolItem* pOldItem;
- for (USHORT nId=ATTR_PATTERN_START; nId<=ATTR_PATTERN_END; nId++)
+ for (sal_uInt16 nId=ATTR_PATTERN_START; nId<=ATTR_PATTERN_END; nId++)
{
// pMergeSet has no parent
- SfxItemState eOldState = rMergeSet.GetItemState( nId, FALSE, &pOldItem );
+ SfxItemState eOldState = rMergeSet.GetItemState( nId, false, &pOldItem );
if ( eOldState == SFX_ITEM_DEFAULT )
{
- SfxItemState eNewState = rSource.GetItemState( nId, TRUE, &pNewItem );
+ SfxItemState eNewState = rSource.GetItemState( nId, sal_True, &pNewItem );
if ( eNewState == SFX_ITEM_SET )
{
if ( *pNewItem != rMergeSet.GetPool()->GetDefaultItem(nId) )
@@ -846,7 +846,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
}
else if ( eOldState == SFX_ITEM_SET ) // Item gesetzt
{
- SfxItemState eNewState = rSource.GetItemState( nId, TRUE, &pNewItem );
+ SfxItemState eNewState = rSource.GetItemState( nId, sal_True, &pNewItem );
if ( eNewState == SFX_ITEM_SET )
{
if ( pNewItem != pOldItem ) // beide gepuhlt
@@ -864,7 +864,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
- ScMergePatternState& rState, BOOL bDeep ) const
+ ScMergePatternState& rState, sal_Bool bDeep ) const
{
if (ValidRow(nStartRow) && ValidRow(nEndRow))
{
@@ -889,7 +889,7 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
if (bDeep)
lcl_MergeDeep( *rState.pItemSet, rThisSet );
else
- rState.pItemSet->MergeValues( rThisSet, FALSE );
+ rState.pItemSet->MergeValues( rThisSet, false );
}
else
{
@@ -913,41 +913,41 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
// assemble border
-BOOL lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
- BYTE& rModified, const SvxBorderLine*& rpNew )
+sal_Bool lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
+ sal_uInt8& rModified, const SvxBorderLine*& rpNew )
{
if (rModified == SC_LINE_DONTCARE)
- return FALSE; // don't go again
+ return false; // don't go again
if (rModified == SC_LINE_EMPTY)
{
rModified = SC_LINE_SET;
rpNew = pNewLine;
- return TRUE; // initial value
+ return true; // initial value
}
if (pOldLine == pNewLine)
{
rpNew = pOldLine;
- return FALSE;
+ return false;
}
if (pOldLine && pNewLine)
if (*pOldLine == *pNewLine)
{
rpNew = pOldLine;
- return FALSE;
+ return false;
}
rModified = SC_LINE_DONTCARE;
rpNew = NULL;
- return TRUE; // another line -> don't care
+ return true; // another line -> don't care
}
void lcl_MergeToFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags, const ScPatternAttr* pPattern,
- BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom )
+ sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom )
{
// right/bottom border set when connected together
const ScMergeAttr& rMerge = (const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE);
@@ -1011,19 +1011,19 @@ void lcl_MergeToFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags,
- SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight ) const
+ SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ) const
{
const ScPatternAttr* pPattern;
if (nStartRow == nEndRow)
{
pPattern = GetPattern( nStartRow );
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, TRUE, 0 );
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_True, 0 );
}
else
{
pPattern = GetPattern( nStartRow );
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, TRUE,
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_True,
nEndRow-nStartRow );
SCSIZE nStartIndex;
@@ -1033,13 +1033,13 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
for (SCSIZE i=nStartIndex; i<=nEndIndex; i++)
{
pPattern = (ScPatternAttr*) pData[i].pPattern;
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, FALSE,
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, false,
nEndRow - Min( pData[i].nRow, (SCROW)(nEndRow-1) ) );
// nDistBottom here always > 0
}
pPattern = GetPattern( nEndRow );
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, FALSE, 0 );
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, false, 0 );
}
}
@@ -1049,10 +1049,10 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
// ApplyFrame - on an entry into the array
-BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
+sal_Bool ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
const SvxBoxInfoItem* pBoxInfoItem,
SCROW nStartRow, SCROW nEndRow,
- BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom )
+ sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom )
{
DBG_ASSERT( pBoxItem && pBoxInfoItem, "Linienattribute fehlen!" );
@@ -1085,27 +1085,27 @@ BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
if (aNewFrame == *pOldFrame)
{
// nothing to do
- return FALSE;
+ return false;
}
else
{
SfxItemPoolCache aCache( pDocument->GetPool(), &aNewFrame );
ApplyCacheArea( nStartRow, nEndRow, &aCache );
- return TRUE;
+ return true;
}
}
void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight )
+ SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight )
{
if (nStartRow == nEndRow)
- ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, TRUE, 0 );
+ ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, sal_True, 0 );
else
{
ApplyFrame( pLineOuter, pLineInner, nStartRow, nStartRow, bLeft, nDistRight,
- TRUE, nEndRow-nStartRow );
+ sal_True, nEndRow-nStartRow );
if ( nEndRow > nStartRow+1 ) // inner part available?
{
@@ -1118,8 +1118,8 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
for (SCSIZE i=nStartIndex; i<=nEndIndex;)
{
nTmpEnd = Min( (SCROW)(nEndRow-1), (SCROW)(pData[i].nRow) );
- BOOL bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
- bLeft, nDistRight, FALSE, nEndRow-nTmpEnd );
+ sal_Bool bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
+ bLeft, nDistRight, false, nEndRow-nTmpEnd );
nTmpStart = nTmpEnd+1;
if (bChanged)
{
@@ -1131,7 +1131,7 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
}
}
- ApplyFrame( pLineOuter, pLineInner, nEndRow, nEndRow, bLeft, nDistRight, FALSE, 0 );
+ ApplyFrame( pLineOuter, pLineInner, nEndRow, nEndRow, bLeft, nDistRight, false, 0 );
}
}
@@ -1142,8 +1142,8 @@ long lcl_LineSize( const SvxBorderLine& rLine )
// double line -> half line spacing + (per min. 20)
long nTotal = 0;
- USHORT nWidth = Max( rLine.GetOutWidth(), rLine.GetInWidth() );
- USHORT nDist = rLine.GetDistance();
+ sal_uInt16 nWidth = Max( rLine.GetOutWidth(), rLine.GetInWidth() );
+ sal_uInt16 nDist = rLine.GetDistance();
if (nDist)
{
DBG_ASSERT( rLine.GetOutWidth() && rLine.GetInWidth(),
@@ -1160,14 +1160,14 @@ long lcl_LineSize( const SvxBorderLine& rLine )
return nTotal;
}
-BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
- BOOL bLeft, BOOL bRight ) const
+sal_Bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
+ sal_Bool bLeft, sal_Bool bRight ) const
{
SCSIZE nStartIndex;
SCSIZE nEndIndex;
Search( nRow1, nStartIndex );
Search( nRow2, nEndIndex );
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
const SvxBoxItem* pItem = 0;
const SvxBorderLine* pLine = 0;
@@ -1182,7 +1182,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Top() )
rSizes.Top() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
// down
@@ -1195,7 +1195,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Bottom() )
rSizes.Bottom() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
if ( bLeft || bRight )
@@ -1211,7 +1211,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Left() )
rSizes.Left() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -1223,7 +1223,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Right() )
rSizes.Right() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1233,7 +1233,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
// Test if field contains specific attribute
-bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
+bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
{
SCSIZE nStartIndex;
SCSIZE nEndIndex;
@@ -1296,7 +1296,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
(const SfxInt32Item*) &pPattern->GetItem( ATTR_ROTATE_VALUE );
// 90 or 270 degrees is former SvxOrientationItem - only look for other values
// (see ScPatternAttr::GetCellOrientation)
- INT32 nAngle = pRotate->GetValue();
+ sal_Int32 nAngle = pRotate->GetValue();
if ( nAngle != 0 && nAngle != 9000 && nAngle != 27000 )
bFound = true;
}
@@ -1347,9 +1347,9 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
}
// Area around any given summaries expand and adapt any MergeFlag (bRefresh)
-BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
+sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL& rPaintCol, SCROW& rPaintRow,
- BOOL bRefresh, BOOL bAttrs )
+ sal_Bool bRefresh, sal_Bool bAttrs )
{
const ScPatternAttr* pPattern;
const ScMergeAttr* pItem;
@@ -1357,7 +1357,7 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCSIZE nEndIndex;
Search( nStartRow, nStartIndex );
Search( nEndRow, nEndIndex );
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
for (SCSIZE i=nStartIndex; i<=nEndIndex; i++)
{
@@ -1374,7 +1374,7 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
rPaintCol = nMergeEndCol;
if (nMergeEndRow > rPaintRow && nMergeEndRow <= MAXROW)
rPaintRow = nMergeEndRow;
- bFound = TRUE;
+ bFound = sal_True;
if (bAttrs)
{
@@ -1412,9 +1412,9 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
}
-BOOL ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
+sal_Bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
const ScPatternAttr* pPattern;
const ScMergeAttr* pItem;
SCSIZE nIndex;
@@ -1476,12 +1476,12 @@ BOOL ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
void ScAttrArray::DeleteAreaSafe(SCROW nStartRow, SCROW nEndRow)
{
- SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), TRUE );
+ SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), sal_True );
}
void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
- const ScPatternAttr* pWantedPattern, BOOL bDefault )
+ const ScPatternAttr* pWantedPattern, sal_Bool bDefault )
{
const ScPatternAttr* pOldPattern;
const ScMergeFlagAttr* pItem;
@@ -1489,7 +1489,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
- BOOL bFirstUse = TRUE;
+ sal_Bool bFirstUse = sal_True;
Search( nStartRow, nIndex );
nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1512,7 +1512,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
ScPatternAttr* pNewPattern = new ScPatternAttr( *pWantedPattern );
SfxItemSet* pSet = &pNewPattern->GetItemSet();
pSet->Put( *pItem );
- SetPatternArea( nThisRow, nAttrRow, pNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, pNewPattern, sal_True );
delete pNewPattern;
}
else
@@ -1520,7 +1520,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
if ( !bDefault )
{
if (bFirstUse)
- bFirstUse = FALSE;
+ bFirstUse = false;
else
// it's in the pool
pDocument->GetPool()->Put( *pWantedPattern );
@@ -1537,15 +1537,15 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
}
-BOOL ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
+sal_Bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
{
const ScPatternAttr* pOldPattern;
- INT16 nOldValue;
+ sal_Int16 nOldValue;
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
Search( nStartRow, nIndex );
nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1561,9 +1561,9 @@ BOOL ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue | nFlags ) );
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, true );
Search( nThisRow, nIndex ); // data changed
- bChanged = TRUE;
+ bChanged = true;
}
++nIndex;
@@ -1574,15 +1574,15 @@ BOOL ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
}
-BOOL ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
+sal_Bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
{
const ScPatternAttr* pOldPattern;
- INT16 nOldValue;
+ sal_Int16 nOldValue;
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
Search( nStartRow, nIndex );
nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1598,9 +1598,9 @@ BOOL ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue & ~nFlags ) );
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, true );
Search( nThisRow, nIndex ); // data changed
- bChanged = TRUE;
+ bChanged = true;
}
++nIndex;
@@ -1611,7 +1611,7 @@ BOOL ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
}
-void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhich )
+void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich )
{
const ScPatternAttr* pOldPattern;
@@ -1633,7 +1633,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhi
nRow = pData[nIndex].nRow;
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, true );
Search( nThisRow, nIndex ); // data changed
}
@@ -1643,7 +1643,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhi
}
-void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement )
+void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrement )
{
SCSIZE nIndex;
Search( nStartRow, nIndex );
@@ -1656,10 +1656,10 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
const SfxPoolItem* pItem;
- BOOL bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, FALSE, &pItem ) != SFX_ITEM_SET
+ sal_Bool bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem ) != SFX_ITEM_SET
|| ((const SvxHorJustifyItem*)pItem)->GetValue() != SVX_HOR_JUSTIFY_LEFT );
- USHORT nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue();
- USHORT nNewValue = nOldValue;
+ sal_uInt16 nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue();
+ sal_uInt16 nNewValue = nOldValue;
if ( bIncrement )
{
if ( nNewValue < SC_MAX_INDENT )
@@ -1688,7 +1688,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement
if ( bNeedJust )
aNewPattern.GetItemSet().Put(
SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
- SetPatternArea( nThisStart, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisStart, nAttrRow, &aNewPattern, sal_True );
nThisStart = nThisEnd + 1;
Search( nThisStart, nIndex ); // data changed
@@ -1702,7 +1702,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement
}
-SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, BOOL bUp ) const
+SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, sal_Bool bUp ) const
{
long nRet = nRow;
if (VALIDROW(nRow))
@@ -1768,10 +1768,10 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
}
-BOOL ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
- BOOL bGatherAllStyles ) const
+sal_Bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
+ sal_Bool bGatherAllStyles ) const
{
- BOOL bIsUsed = FALSE;
+ sal_Bool bIsUsed = false;
SCSIZE nPos = 0;
while ( nPos < nCount )
@@ -1783,8 +1783,8 @@ BOOL ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
if ( pStyle == &rStyle )
{
if ( !bGatherAllStyles )
- return TRUE;
- bIsUsed = TRUE;
+ return sal_True;
+ bIsUsed = sal_True;
}
}
nPos++;
@@ -1794,25 +1794,25 @@ BOOL ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
}
-BOOL ScAttrArray::IsEmpty() const
+sal_Bool ScAttrArray::IsEmpty() const
{
if (nCount == 1)
{
if ( pData[0].pPattern != pDocument->GetDefPattern() )
- return FALSE;
+ return false;
else
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-BOOL ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
+sal_Bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
{
DBG_ASSERT( nCount, "nCount == 0" );
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCSIZE nStart = 0;
// Skip first entry if more than 1 row.
@@ -1829,7 +1829,7 @@ BOOL ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
if ( pData[nStart].pPattern->IsVisible() )
{
rFirstRow = nStart ? ( pData[nStart-1].nRow + 1 ) : 0;
- bFound = TRUE;
+ bFound = sal_True;
}
else
++nStart;
@@ -1843,7 +1843,7 @@ BOOL ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
const SCROW SC_VISATTR_STOP = 84;
-BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
+sal_Bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
{
// #i30830# changed behavior:
// ignore all attributes starting with the first run of SC_VISATTR_STOP equal rows
@@ -1852,10 +1852,10 @@ BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
if ( nLastData == MAXROW )
{
rLastRow = MAXROW; // can't look for attributes below MAXROW
- return TRUE;
+ return sal_True;
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
// loop backwards from the end instead of using Search, assuming that
// there usually aren't many attributes below the last cell
@@ -1876,12 +1876,12 @@ BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
SCROW nAttrSize = pData[nEndPos].nRow + 1 - nAttrStartRow;
if ( nAttrSize >= SC_VISATTR_STOP )
{
- bFound = FALSE; // ignore this range and below
+ bFound = false; // ignore this range and below
}
else if ( !bFound && pData[nEndPos].pPattern->IsVisible() )
{
rLastRow = pData[nEndPos].nRow;
- bFound = TRUE;
+ bFound = sal_True;
}
nPos = nStartPos; // look further from the top of the range
@@ -1891,16 +1891,16 @@ BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
}
-BOOL ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
{
SCSIZE nIndex;
Search( nStartRow, nIndex );
SCROW nThisStart = nStartRow;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
while ( nIndex < nCount && nThisStart <= nEndRow && !bFound )
{
if ( pData[nIndex].pPattern->IsVisible() )
- bFound = TRUE;
+ bFound = sal_True;
nThisStart = pData[nIndex].nRow + 1;
++nIndex;
@@ -1910,10 +1910,10 @@ BOOL ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
}
-BOOL ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
+sal_Bool ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
SCROW nStartRow, SCROW nEndRow ) const
{
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
SCSIZE nThisPos = 0;
SCSIZE nOtherPos = 0;
if ( nStartRow > 0 )
@@ -1947,11 +1947,11 @@ BOOL ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
}
-BOOL ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const
{
// summarised with IsVisibleEqual
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
SCSIZE nThisPos = 0;
SCSIZE nOtherPos = 0;
if ( nStartRow > 0 )
@@ -1984,12 +1984,12 @@ BOOL ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW
}
-BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
+sal_Bool ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
{
// Horizontal aggregate are not allowed to be moved out; if whole summary,
// here is not recognized
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
if (!IsEmpty())
{
SCSIZE nIndex = 0;
@@ -2001,7 +2001,7 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
if ( ((const ScMergeFlagAttr&)pData[nIndex].pPattern->
GetItem(ATTR_MERGE_FLAG)).IsHorOverlapped() )
{
- bTest = FALSE; // may not be pushed out
+ bTest = false; // may not be pushed out
break;
}
if ( pData[nIndex].nRow >= nEndRow ) // end of range
@@ -2012,7 +2012,7 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
}
-BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const
+sal_Bool ScAttrArray::TestInsertRow( SCSIZE nSize ) const
{
// if 1st row pushed out is vertically overlapped, summary would be broken
@@ -2026,10 +2026,10 @@ BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const
if ( ((const ScMergeFlagAttr&)pData[nFirstLost].pPattern->
GetItem(ATTR_MERGE_FLAG)).IsVerOverlapped() )
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
@@ -2044,7 +2044,7 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
// set ScMergeAttr may not be extended (so behind delete again)
- BOOL bDoMerge = ((const ScMergeAttr&) pData[nIndex].pPattern->GetItem(ATTR_MERGE)).IsMerged();
+ sal_Bool bDoMerge = ((const ScMergeAttr&) pData[nIndex].pPattern->GetItem(ATTR_MERGE)).IsMerged();
SCSIZE nRemove = 0;
SCSIZE i;
@@ -2086,7 +2086,7 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
{
if (pData)
{
- BOOL bFirst=TRUE;
+ sal_Bool bFirst=sal_True;
SCSIZE nStartIndex = 0;
SCSIZE nEndIndex = 0;
SCSIZE i;
@@ -2097,7 +2097,7 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
if (bFirst)
{
nStartIndex = i;
- bFirst = FALSE;
+ bFirst = false;
}
nEndIndex = i;
}
@@ -2179,14 +2179,14 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
ScPatternAttr aNewPattern(*pOldPattern);
SfxItemSet& rSet = aNewPattern.GetItemSet();
- for (USHORT nId = ATTR_PATTERN_START; nId <= ATTR_PATTERN_END; nId++)
+ for (sal_uInt16 nId = ATTR_PATTERN_START; nId <= ATTR_PATTERN_END; nId++)
if (nId != ATTR_MERGE && nId != ATTR_MERGE_FLAG)
rSet.ClearItem(nId);
if ( aNewPattern == *pDefPattern )
- SetPatternArea( nThisRow, nAttrRow, pDefPattern, FALSE );
+ SetPatternArea( nThisRow, nAttrRow, pDefPattern, false );
else
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True );
Search( nThisRow, nIndex ); // data changed
}
@@ -2204,11 +2204,11 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
SCROW nStart = nStartRow;
for (SCSIZE i = 0; i < nCount; i++)
{
- if ((pData[i].nRow >= nStartRow) && ((i==0) ? TRUE : pData[i-1].nRow < nEndRow))
+ if ((pData[i].nRow >= nStartRow) && ((i==0) ? sal_True : pData[i-1].nRow < nEndRow))
{
// copy (bPutToPool=TRUE)
rAttrArray.SetPatternArea( nStart, Min( (SCROW)pData[i].nRow, (SCROW)nEndRow ),
- pData[i].pPattern, TRUE );
+ pData[i].pPattern, sal_True );
}
nStart = Max( (SCROW)nStart, (SCROW)(pData[i].nRow + 1) );
}
@@ -2219,7 +2219,7 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
// copy between documents (Clipboard)
void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray,
- INT16 nStripFlags )
+ sal_Int16 nStripFlags )
{
nStartRow -= nDy; // Source
nEndRow -= nDy;
@@ -2229,7 +2229,7 @@ void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArra
ScDocumentPool* pSourceDocPool = pDocument->GetPool();
ScDocumentPool* pDestDocPool = rAttrArray.pDocument->GetPool();
- BOOL bSamePool = (pSourceDocPool==pDestDocPool);
+ sal_Bool bSamePool = (pSourceDocPool==pDestDocPool);
for (SCSIZE i = 0; (i < nCount) && (nDestStart <= nDestEnd); i++)
{
@@ -2248,7 +2248,7 @@ void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArra
else if ( nStripFlags )
{
ScPatternAttr* pTmpPattern = new ScPatternAttr( *pOldPattern );
- INT16 nNewFlags = 0;
+ sal_Int16 nNewFlags = 0;
if ( nStripFlags != SC_MF_ALL )
nNewFlags = ((const ScMergeFlagAttr&)pTmpPattern->GetItem(ATTR_MERGE_FLAG)).
GetValue() & ~nStripFlags;
@@ -2302,7 +2302,7 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
ScDocumentPool* pSourceDocPool = pDocument->GetPool();
ScDocumentPool* pDestDocPool = rAttrArray.pDocument->GetPool();
- BOOL bSamePool = (pSourceDocPool==pDestDocPool);
+ sal_Bool bSamePool = (pSourceDocPool==pDestDocPool);
for (SCSIZE i = 0; (i < nCount) && (nDestStart <= nDestEnd); i++)
{
@@ -2317,7 +2317,7 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
pNewPattern = pOldPattern->PutInPool( rAttrArray.pDocument, pDocument );
rAttrArray.SetPatternAreaSafe(nDestStart,
- Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern, FALSE);
+ Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern, false);
}
// when pasting from clipboard and skipping filtered rows, the adjusted
@@ -2328,9 +2328,9 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
- BOOL bUp, ScMarkArray* pMarkArray )
+ sal_Bool bUp, ScMarkArray* pMarkArray )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if (pMarkArray)
{
@@ -2352,10 +2352,10 @@ SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
nRow = pMarkArray->GetNextMarked( nRow, bUp );
SCROW nStart = nIndex ? pData[nIndex-1].nRow+1 : 0;
if (nRow >= nStart && nRow <= pData[nIndex].nRow)
- bFound = TRUE;
+ bFound = sal_True;
}
else
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
@@ -2390,8 +2390,8 @@ SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
}
-BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
- const ScStyleSheet* pSearchStyle, BOOL bUp, ScMarkArray* pMarkArray )
+sal_Bool ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
+ const ScStyleSheet* pSearchStyle, sal_Bool bUp, ScMarkArray* pMarkArray )
{
SCsROW nStartRow = SearchStyle( rRow, pSearchStyle, bUp, pMarkArray );
if (VALIDROW(nStartRow))
@@ -2408,7 +2408,7 @@ BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
rEndRow = 0;
if (pMarkArray)
{
- SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, TRUE );
+ SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, sal_True );
if (nMarkEnd>rEndRow)
rEndRow = nMarkEnd;
}
@@ -2418,16 +2418,16 @@ BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
rEndRow = pData[nIndex].nRow;
if (pMarkArray)
{
- SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, FALSE );
+ SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, false );
if (nMarkEnd<rEndRow)
rEndRow = nMarkEnd;
}
}
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 98404f7a944e..7474fb580d72 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -75,30 +75,30 @@ TYPEINIT1(ScPageScaleToItem, SfxPoolItem);
// allgemeine Hilfsfunktionen
//
-BOOL ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther )
+sal_Bool ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther )
{
if (!pThis)
- return FALSE;
+ return false;
if (!pOther)
- return TRUE;
+ return sal_True;
- USHORT nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth();
- USHORT nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth();
+ sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth();
+ sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth();
if (nThisSize > nOtherSize)
- return TRUE;
+ return sal_True;
else if (nThisSize < nOtherSize)
- return FALSE;
+ return false;
else
{
if ( pOther->GetInWidth() && !pThis->GetInWidth() )
- return TRUE;
+ return sal_True;
else if ( pThis->GetInWidth() && !pOther->GetInWidth() )
- return FALSE;
+ return false;
else
{
- return TRUE; //! ???
+ return sal_True; //! ???
}
}
}
@@ -170,10 +170,10 @@ SfxPoolItem* ScMergeAttr::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-SfxPoolItem* ScMergeAttr::Create( SvStream& rStream, USHORT /* nVer */ ) const
+SfxPoolItem* ScMergeAttr::Create( SvStream& rStream, sal_uInt16 /* nVer */ ) const
{
- INT16 nCol;
- INT16 nRow;
+ sal_Int16 nCol;
+ sal_Int16 nRow;
rStream >> nCol;
rStream >> nRow;
return new ScMergeAttr(static_cast<SCCOL>(nCol),static_cast<SCROW>(nRow));
@@ -190,7 +190,7 @@ ScMergeFlagAttr::ScMergeFlagAttr():
//------------------------------------------------------------------------
-ScMergeFlagAttr::ScMergeFlagAttr(INT16 nFlags):
+ScMergeFlagAttr::ScMergeFlagAttr(sal_Int16 nFlags):
SfxInt16Item(ATTR_MERGE_FLAG, nFlags)
{
}
@@ -205,17 +205,17 @@ ScMergeFlagAttr::~ScMergeFlagAttr()
ScProtectionAttr::ScProtectionAttr():
SfxPoolItem(ATTR_PROTECTION),
- bProtection(TRUE),
- bHideFormula(FALSE),
- bHideCell(FALSE),
- bHidePrint(FALSE)
+ bProtection(sal_True),
+ bHideFormula(false),
+ bHideCell(false),
+ bHidePrint(false)
{
}
//------------------------------------------------------------------------
-ScProtectionAttr::ScProtectionAttr( BOOL bProtect, BOOL bHFormula,
- BOOL bHCell, BOOL bHPrint):
+ScProtectionAttr::ScProtectionAttr( sal_Bool bProtect, sal_Bool bHFormula,
+ sal_Bool bHCell, sal_Bool bHPrint):
SfxPoolItem(ATTR_PROTECTION),
bProtection(bProtect),
bHideFormula(bHFormula),
@@ -241,7 +241,7 @@ ScProtectionAttr::~ScProtectionAttr()
//------------------------------------------------------------------------
-bool ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -272,7 +272,7 @@ bool ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bRet = false;
sal_Bool bVal = sal_Bool();
@@ -395,12 +395,12 @@ SfxPoolItem* ScProtectionAttr::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, USHORT /* n */ ) const
+SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) const
{
- BOOL bProtect;
- BOOL bHFormula;
- BOOL bHCell;
- BOOL bHPrint;
+ sal_Bool bProtect;
+ sal_Bool bHFormula;
+ sal_Bool bHCell;
+ sal_Bool bHPrint;
rStream >> bProtect;
rStream >> bHFormula;
@@ -412,34 +412,34 @@ SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, USHORT /* n */ ) const
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetProtection( BOOL bProtect)
+sal_Bool ScProtectionAttr::SetProtection( sal_Bool bProtect)
{
bProtection = bProtect;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetHideFormula( BOOL bHFormula)
+sal_Bool ScProtectionAttr::SetHideFormula( sal_Bool bHFormula)
{
bHideFormula = bHFormula;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetHideCell( BOOL bHCell)
+sal_Bool ScProtectionAttr::SetHideCell( sal_Bool bHCell)
{
bHideCell = bHCell;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetHidePrint( BOOL bHPrint)
+sal_Bool ScProtectionAttr::SetHidePrint( sal_Bool bHPrint)
{
bHidePrint = bHPrint;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -510,7 +510,7 @@ ScTableListItem::ScTableListItem( const ScTableListItem& rCpy )
{
pTabArr = new SCTAB [nCount];
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
pTabArr[i] = rCpy.pTabArr[i];
}
else
@@ -534,7 +534,7 @@ ScTableListItem& ScTableListItem::operator=( const ScTableListItem& rCpy )
if ( rCpy.nCount > 0 )
{
pTabArr = new SCTAB [rCpy.nCount];
- for ( USHORT i=0; i<rCpy.nCount; i++ )
+ for ( sal_uInt16 i=0; i<rCpy.nCount; i++ )
pTabArr[i] = rCpy.pTabArr[i];
}
else
@@ -552,11 +552,11 @@ int ScTableListItem::operator==( const SfxPoolItem& rAttr ) const
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
ScTableListItem& rCmp = (ScTableListItem&)rAttr;
- BOOL bEqual = (nCount == rCmp.nCount);
+ sal_Bool bEqual = (nCount == rCmp.nCount);
if ( nCount > 0 )
{
- USHORT i=0;
+ sal_uInt16 i=0;
bEqual = ( pTabArr && rCmp.pTabArr );
@@ -599,7 +599,7 @@ SfxItemPresentation ScTableListItem::GetPresentation
{
rText = '(';
if ( nCount>0 && pTabArr )
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
rText += String::CreateFromInt32( pTabArr[i] );
if ( i<(nCount-1) )
@@ -627,7 +627,7 @@ SfxItemPresentation ScTableListItem::GetPresentation
// ScPageHFItem - Daten der Kopf-/Fusszeilen
// -----------------------------------------------------------------------
-ScPageHFItem::ScPageHFItem( USHORT nWhichP )
+ScPageHFItem::ScPageHFItem( sal_uInt16 nWhichP )
: SfxPoolItem ( nWhichP ),
pLeftArea ( NULL ),
pCenterArea ( NULL ),
@@ -662,7 +662,7 @@ ScPageHFItem::~ScPageHFItem()
//------------------------------------------------------------------------
-bool ScPageHFItem::QueryValue( uno::Any& rVal, BYTE /* nMemberId */ ) const
+bool ScPageHFItem::QueryValue( uno::Any& rVal, sal_uInt8 /* nMemberId */ ) const
{
uno::Reference<sheet::XHeaderFooterContent> xContent =
new ScHeaderFooterContentObj( pLeftArea, pCenterArea, pRightArea );
@@ -671,7 +671,7 @@ bool ScPageHFItem::QueryValue( uno::Any& rVal, BYTE /* nMemberId */ ) const
return true;
}
-bool ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
+bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
{
bool bRet = false;
uno::Reference<sheet::XHeaderFooterContent> xContent;
@@ -698,7 +698,7 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
if ( !pLeftArea || !pCenterArea || !pRightArea )
{
// keine Texte auf NULL stehen lassen
- ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), TRUE );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
if (!pLeftArea)
pLeftArea = aEngine.CreateTextObject();
if (!pCenterArea)
@@ -758,11 +758,11 @@ void lcl_SetSpace( String& rStr, const ESelection& rSel )
rStr.SetChar( rSel.nStartPos, ' ' );
}
-BOOL lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
+sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
{
- BOOL bChange = FALSE;
- USHORT nParCnt = rEng.GetParagraphCount();
- for (USHORT nPar = 0; nPar<nParCnt; nPar++)
+ sal_Bool bChange = false;
+ sal_uInt16 nParCnt = rEng.GetParagraphCount();
+ for (sal_uInt16 nPar = 0; nPar<nParCnt; nPar++)
{
String aStr = rEng.GetText( nPar );
xub_StrLen nPos;
@@ -771,37 +771,37 @@ BOOL lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[1])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[2])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[3])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD ), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[4])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[5])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
}
return bChange;
@@ -809,7 +809,7 @@ BOOL lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
#define SC_FIELD_COUNT 6
-SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
+SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
{
EditTextObject* pLeft = EditTextObject::Create(rStream);
EditTextObject* pCenter = EditTextObject::Create(rStream);
@@ -825,7 +825,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
// 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 );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 )
{
delete pLeft;
@@ -845,7 +845,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
if ( nVer < 1 ) // alte Feldbefehle umsetzen
{
- USHORT i;
+ sal_uInt16 i;
const String& rDel = ScGlobal::GetRscString( STR_HFCMD_DELIMITER );
String aCommands[SC_FIELD_COUNT];
for (i=0; i<SC_FIELD_COUNT; i++)
@@ -859,7 +859,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
for (i=0; i<SC_FIELD_COUNT; i++)
aCommands[i] += rDel;
- ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), TRUE );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
aEngine.SetText(*pLeft);
if (lcl_ConvertFields(aEngine,aCommands))
{
@@ -932,15 +932,15 @@ void ScPageHFItem::SetArea( EditTextObject *pNew, int nArea )
// ScViewObjectModeItem - Darstellungsmodus von ViewObjekten
//-----------------------------------------------------------------------
-ScViewObjectModeItem::ScViewObjectModeItem( USHORT nWhichP )
+ScViewObjectModeItem::ScViewObjectModeItem( sal_uInt16 nWhichP )
: SfxEnumItem( nWhichP, VOBJ_MODE_SHOW )
{
}
//------------------------------------------------------------------------
-ScViewObjectModeItem::ScViewObjectModeItem( USHORT nWhichP, ScVObjMode eMode )
- : SfxEnumItem( nWhichP, sal::static_int_cast<USHORT>(eMode) )
+ScViewObjectModeItem::ScViewObjectModeItem( sal_uInt16 nWhichP, ScVObjMode eMode )
+ : SfxEnumItem( nWhichP, sal::static_int_cast<sal_uInt16>(eMode) )
{
}
@@ -1005,7 +1005,7 @@ SfxItemPresentation ScViewObjectModeItem::GetPresentation
//------------------------------------------------------------------------
-String ScViewObjectModeItem::GetValueText( USHORT nVal ) const
+String ScViewObjectModeItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= VOBJ_MODE_HIDE, "enum overflow!" );
@@ -1014,7 +1014,7 @@ String ScViewObjectModeItem::GetValueText( USHORT nVal ) const
//------------------------------------------------------------------------
-USHORT ScViewObjectModeItem::GetValueCount() const
+sal_uInt16 ScViewObjectModeItem::GetValueCount() const
{
return 2;
}
@@ -1028,7 +1028,7 @@ SfxPoolItem* ScViewObjectModeItem::Clone( SfxItemPool* ) const
//------------------------------------------------------------------------
-USHORT ScViewObjectModeItem::GetVersion( USHORT /* nFileVersion */ ) const
+sal_uInt16 ScViewObjectModeItem::GetVersion( sal_uInt16 /* nFileVersion */ ) const
{
return 1;
}
@@ -1037,7 +1037,7 @@ USHORT ScViewObjectModeItem::GetVersion( USHORT /* nFileVersion */ ) const
SfxPoolItem* ScViewObjectModeItem::Create(
SvStream& rStream,
- USHORT nVersion ) const
+ sal_uInt16 nVersion ) const
{
if ( nVersion == 0 )
{
@@ -1046,11 +1046,11 @@ SfxPoolItem* ScViewObjectModeItem::Create(
}
else
{
- USHORT nVal;
+ sal_uInt16 nVal;
rStream >> nVal;
//#i80528# adapt to new range eventually
- if((USHORT)VOBJ_MODE_HIDE < nVal) nVal = (USHORT)VOBJ_MODE_SHOW;
+ if((sal_uInt16)VOBJ_MODE_HIDE < nVal) nVal = (sal_uInt16)VOBJ_MODE_SHOW;
return new ScViewObjectModeItem( Which(), (ScVObjMode)nVal);
}
@@ -1060,7 +1060,7 @@ SfxPoolItem* ScViewObjectModeItem::Create(
// double
// -----------------------------------------------------------------------
-ScDoubleItem::ScDoubleItem( USHORT nWhichP, double nVal )
+ScDoubleItem::ScDoubleItem( sal_uInt16 nWhichP, double nVal )
: SfxPoolItem ( nWhichP ),
nValue ( nVal )
{
@@ -1099,7 +1099,7 @@ SfxPoolItem* ScDoubleItem::Clone( SfxItemPool* ) const
//------------------------------------------------------------------------
-SfxPoolItem* ScDoubleItem::Create( SvStream& rStream, USHORT /* nVer */ ) const
+SfxPoolItem* ScDoubleItem::Create( SvStream& rStream, sal_uInt16 /* nVer */ ) const
{
double nTmp=0;
rStream >> nTmp;
@@ -1200,7 +1200,7 @@ SfxItemPresentation ScPageScaleToItem::GetPresentation(
return ePres;
}
-bool ScPageScaleToItem::QueryValue( uno::Any& rAny, BYTE nMemberId ) const
+bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const
{
bool bRet = true;
switch( nMemberId )
@@ -1214,9 +1214,9 @@ bool ScPageScaleToItem::QueryValue( uno::Any& rAny, BYTE nMemberId ) const
return bRet;
}
-bool ScPageScaleToItem::PutValue( const uno::Any& rAny, BYTE nMemberId )
+bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId )
{
- BOOL bRet = false;
+ sal_Bool bRet = false;
switch( nMemberId )
{
case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break;
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 356a980c06a1..f31bd26958e2 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -164,7 +164,7 @@ bool ScBroadcastAreaSlot::CheckHardRecalcStateCondition() const
if ( pShell )
pShell->SetError( SCWARN_CORE_HARD_RECALC, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- pDoc->SetAutoCalc( FALSE );
+ pDoc->SetAutoCalc( false );
pDoc->SetHardRecalcState( 2 );
}
return true;
@@ -276,11 +276,11 @@ ScBroadcastAreas::iterator ScBroadcastAreaSlot::FindBroadcastArea(
}
-BOOL ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
+sal_Bool ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
{
if (aBroadcastAreaTbl.empty())
- return FALSE;
- BOOL bIsBroadcasted = FALSE;
+ return false;
+ sal_Bool bIsBroadcasted = false;
const ScAddress& rAddress = rHint.GetAddress();
for (ScBroadcastAreas::const_iterator aIter( aBroadcastAreaTbl.begin());
aIter != aBroadcastAreaTbl.end(); /* increment in body */ )
@@ -296,7 +296,7 @@ BOOL ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
if (!pBASM->IsInBulkBroadcast() || pBASM->InsertBulkArea( pArea))
{
pArea->GetBroadcaster().Broadcast( rHint);
- bIsBroadcasted = TRUE;
+ bIsBroadcasted = sal_True;
}
}
}
@@ -304,12 +304,12 @@ BOOL ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
}
-BOOL ScBroadcastAreaSlot::AreaBroadcastInRange( const ScRange& rRange,
+sal_Bool ScBroadcastAreaSlot::AreaBroadcastInRange( const ScRange& rRange,
const ScHint& rHint) const
{
if (aBroadcastAreaTbl.empty())
- return FALSE;
- BOOL bIsBroadcasted = FALSE;
+ return false;
+ sal_Bool bIsBroadcasted = false;
for (ScBroadcastAreas::const_iterator aIter( aBroadcastAreaTbl.begin());
aIter != aBroadcastAreaTbl.end(); /* increment in body */ )
{
@@ -324,7 +324,7 @@ BOOL ScBroadcastAreaSlot::AreaBroadcastInRange( const ScRange& rRange,
if (!pBASM->IsInBulkBroadcast() || pBASM->InsertBulkArea( pArea))
{
pArea->GetBroadcaster().Broadcast( rHint);
- bIsBroadcasted = TRUE;
+ bIsBroadcasted = sal_True;
}
}
}
@@ -387,7 +387,7 @@ void ScBroadcastAreaSlot::UpdateRemove( UpdateRefMode eUpdateRefMode,
pArea->DecRef();
if (pBASM->IsInBulkBroadcast())
pBASM->RemoveBulkArea( pArea);
- pArea->SetInUpdateChain( TRUE );
+ pArea->SetInUpdateChain( sal_True );
ScBroadcastArea* pUC = pBASM->GetEOUpdateChain();
if ( pUC )
pUC->SetUpdateChainNext( pArea );
@@ -639,7 +639,7 @@ void ScBroadcastAreaSlotMachine::EndListeningArea( const ScRange& rRange,
}
-BOOL ScBroadcastAreaSlotMachine::AreaBroadcast( const ScHint& rHint ) const
+sal_Bool ScBroadcastAreaSlotMachine::AreaBroadcast( const ScHint& rHint ) const
{
const ScAddress& rAddress = rHint.GetAddress();
if ( rAddress == BCA_BRDCST_ALWAYS )
@@ -647,30 +647,30 @@ BOOL ScBroadcastAreaSlotMachine::AreaBroadcast( const ScHint& rHint ) const
if ( pBCAlways )
{
pBCAlways->Broadcast( rHint );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
else
{
TableSlotsMap::const_iterator iTab( aTableSlotsMap.find( rAddress.Tab()));
if (iTab == aTableSlotsMap.end())
- return FALSE;
+ return false;
ScBroadcastAreaSlot* pSlot = (*iTab).second->getAreaSlot(
ComputeSlotOffset( rAddress));
if ( pSlot )
return pSlot->AreaBroadcast( rHint );
else
- return FALSE;
+ return false;
}
}
-BOOL ScBroadcastAreaSlotMachine::AreaBroadcastInRange( const ScRange& rRange,
+sal_Bool ScBroadcastAreaSlotMachine::AreaBroadcastInRange( const ScRange& rRange,
const ScHint& rHint ) const
{
- BOOL bBroadcasted = FALSE;
+ sal_Bool bBroadcasted = false;
SCTAB nEndTab = rRange.aEnd.Tab();
for (TableSlotsMap::const_iterator iTab( aTableSlotsMap.lower_bound( rRange.aStart.Tab()));
iTab != aTableSlotsMap.end() && (*iTab).first <= nEndTab; ++iTab)
@@ -894,7 +894,7 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas(
// unchain
pArea->SetUpdateChainNext( NULL );
- pArea->SetInUpdateChain( FALSE );
+ pArea->SetInUpdateChain( false );
// Delete if not inserted to any slot. RemoveBulkArea(pArea) was
// already executed in UpdateRemove().
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 8c8b3e07392a..d3e9cb8db5a5 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -66,16 +66,16 @@ using namespace formula;
// hand, if the value fits all recursions, execution is quicker as no resumes
// are necessary. Could be made a configurable option.
// Allow for a year's calendar (366).
-const USHORT MAXRECURSION = 400;
+const sal_uInt16 MAXRECURSION = 400;
// STATIC DATA -----------------------------------------------------------
#ifdef USE_MEMPOOL
// MemPools auf 4k Boundaries - 64 Bytes ausrichten
-const USHORT nMemPoolValueCell = (0x8000 - 64) / sizeof(ScValueCell);
-const USHORT nMemPoolFormulaCell = (0x8000 - 64) / sizeof(ScFormulaCell);
-const USHORT nMemPoolStringCell = (0x4000 - 64) / sizeof(ScStringCell);
-const USHORT nMemPoolNoteCell = (0x1000 - 64) / sizeof(ScNoteCell);
+const sal_uInt16 nMemPoolValueCell = (0x8000 - 64) / sizeof(ScValueCell);
+const sal_uInt16 nMemPoolFormulaCell = (0x8000 - 64) / sizeof(ScFormulaCell);
+const sal_uInt16 nMemPoolStringCell = (0x4000 - 64) / sizeof(ScStringCell);
+const sal_uInt16 nMemPoolNoteCell = (0x1000 - 64) / sizeof(ScNoteCell);
IMPL_FIXEDMEMPOOL_NEWDEL( ScValueCell, nMemPoolValueCell, nMemPoolValueCell )
IMPL_FIXEDMEMPOOL_NEWDEL( ScFormulaCell, nMemPoolFormulaCell, nMemPoolFormulaCell )
IMPL_FIXEDMEMPOOL_NEWDEL( ScStringCell, nMemPoolStringCell, nMemPoolStringCell )
@@ -88,7 +88,7 @@ ScBaseCell::ScBaseCell( CellType eNewType ) :
mpNote( 0 ),
mpBroadcaster( 0 ),
nTextWidth( TEXTWIDTH_DIRTY ),
- eCellType( sal::static_int_cast<BYTE>(eNewType) ),
+ eCellType( sal::static_int_cast<sal_uInt8>(eNewType) ),
nScriptType( SC_SCRIPTTYPE_UNKNOWN )
{
}
@@ -242,7 +242,7 @@ void ScBaseCell::StartListeningTo( ScDocument* pDoc )
&& !((ScFormulaCell*)this)->IsInChangeTrack()
)
{
- pDoc->SetDetectiveDirty(TRUE); // es hat sich was geaendert...
+ pDoc->SetDetectiveDirty(sal_True); // es hat sich was geaendert...
ScFormulaCell* pFormCell = (ScFormulaCell*)this;
ScTokenArray* pArr = pFormCell->GetCode();
@@ -314,7 +314,7 @@ void ScBaseCell::StartListeningTo( ScDocument* pDoc )
}
}
}
- pFormCell->SetNeedsListening( FALSE);
+ pFormCell->SetNeedsListening( false);
}
}
@@ -328,7 +328,7 @@ void ScBaseCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
&& !((ScFormulaCell*)this)->IsInChangeTrack()
)
{
- pDoc->SetDetectiveDirty(TRUE); // es hat sich was geaendert...
+ pDoc->SetDetectiveDirty(sal_True); // es hat sich was geaendert...
ScFormulaCell* pFormCell = (ScFormulaCell*)this;
if( pFormCell->GetCode()->IsRecalcModeAlways() )
@@ -408,7 +408,7 @@ void ScBaseCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
}
-USHORT ScBaseCell::GetErrorCode() const
+sal_uInt16 ScBaseCell::GetErrorCode() const
{
switch ( eCellType )
{
@@ -420,45 +420,45 @@ USHORT ScBaseCell::GetErrorCode() const
}
-BOOL ScBaseCell::HasEmptyData() const
+sal_Bool ScBaseCell::HasEmptyData() const
{
switch ( eCellType )
{
case CELLTYPE_NOTE :
- return TRUE;
+ return sal_True;
case CELLTYPE_FORMULA :
return ((ScFormulaCell*)this)->IsEmpty();
default:
- return FALSE;
+ return false;
}
}
-BOOL ScBaseCell::HasValueData() const
+sal_Bool ScBaseCell::HasValueData() const
{
switch ( eCellType )
{
case CELLTYPE_VALUE :
- return TRUE;
+ return sal_True;
case CELLTYPE_FORMULA :
return ((ScFormulaCell*)this)->IsValue();
default:
- return FALSE;
+ return false;
}
}
-BOOL ScBaseCell::HasStringData() const
+sal_Bool ScBaseCell::HasStringData() const
{
switch ( eCellType )
{
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
- return TRUE;
+ return sal_True;
case CELLTYPE_FORMULA :
return !((ScFormulaCell*)this)->IsValue();
default:
- return FALSE;
+ return false;
}
}
@@ -480,7 +480,7 @@ String ScBaseCell::GetStringData() const
return aStr;
}
-BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
+sal_Bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
{
CellType eType1 = CELLTYPE_NONE;
CellType eType2 = CELLTYPE_NONE;
@@ -501,12 +501,12 @@ BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
eType2 = CELLTYPE_NONE;
}
if ( eType1 != eType2 )
- return FALSE;
+ return false;
switch ( eType1 ) // beide Typen gleich
{
case CELLTYPE_NONE: // beide leer
- return TRUE;
+ return sal_True;
case CELLTYPE_VALUE: // wirklich Value-Zellen
return ( ((const ScValueCell*)pCell1)->GetValue() ==
((const ScValueCell*)pCell2)->GetValue() );
@@ -535,27 +535,27 @@ BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
if (pCode1->GetLen() == pCode2->GetLen()) // nicht-UPN
{
- BOOL bEqual = TRUE;
- USHORT nLen = pCode1->GetLen();
+ sal_Bool bEqual = sal_True;
+ sal_uInt16 nLen = pCode1->GetLen();
FormulaToken** ppToken1 = pCode1->GetArray();
FormulaToken** ppToken2 = pCode2->GetArray();
- for (USHORT i=0; i<nLen; i++)
+ for (sal_uInt16 i=0; i<nLen; i++)
if ( !ppToken1[i]->TextEqual(*(ppToken2[i])) )
{
- bEqual = FALSE;
+ bEqual = false;
break;
}
if (bEqual)
- return TRUE;
+ return sal_True;
}
- return FALSE; // unterschiedlich lang oder unterschiedliche Tokens
+ return false; // unterschiedlich lang oder unterschiedliche Tokens
}
default:
OSL_FAIL("huch, was fuer Zellen???");
}
- return FALSE;
+ return false;
}
// ============================================================================
@@ -640,15 +640,15 @@ ScFormulaCell::ScFormulaCell() :
nFormatType( NUMBERFORMAT_NUMBER ),
nSeenInIteration(0),
cMatrixFlag ( MM_NONE ),
- bDirty( FALSE ),
- bChanged( FALSE ),
- bRunning( FALSE ),
- bCompile( FALSE ),
- bSubTotal( FALSE ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bDirty( false ),
+ bChanged( false ),
+ bRunning( false ),
+ bCompile( false ),
+ bSubTotal( false ),
+ bIsIterCell( false ),
+ bInChangeTrack( false ),
+ bTableOpDirty( false ),
+ bNeedListening( false ),
aPos(0,0,0)
{
}
@@ -656,7 +656,7 @@ ScFormulaCell::ScFormulaCell() :
ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
const String& rFormula,
const FormulaGrammar::Grammar eGrammar,
- BYTE cMatInd ) :
+ sal_uInt8 cMatInd ) :
ScBaseCell( CELLTYPE_FORMULA ),
eTempGrammar( eGrammar),
pCode( NULL ),
@@ -669,25 +669,25 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
nFormatType( NUMBERFORMAT_NUMBER ),
nSeenInIteration(0),
cMatrixFlag ( cMatInd ),
- bDirty( TRUE ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cMatInd != 0
- bChanged( FALSE ),
- bRunning( FALSE ),
- bCompile( FALSE ),
- bSubTotal( FALSE ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bDirty( sal_True ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cMatInd != 0
+ bChanged( false ),
+ bRunning( false ),
+ bCompile( false ),
+ bSubTotal( false ),
+ bIsIterCell( false ),
+ bInChangeTrack( false ),
+ bTableOpDirty( false ),
+ bNeedListening( false ),
aPos( rPos )
{
- Compile( rFormula, TRUE, eGrammar ); // bNoListening, Insert does that
+ Compile( rFormula, sal_True, eGrammar ); // bNoListening, Insert does that
}
// Wird von den Importfiltern verwendet
ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
const ScTokenArray* pArr,
- const FormulaGrammar::Grammar eGrammar, BYTE cInd ) :
+ const FormulaGrammar::Grammar eGrammar, sal_uInt8 cInd ) :
ScBaseCell( CELLTYPE_FORMULA ),
eTempGrammar( eGrammar),
pCode( pArr ? new ScTokenArray( *pArr ) : new ScTokenArray ),
@@ -701,14 +701,14 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
nSeenInIteration(0),
cMatrixFlag ( cInd ),
bDirty( NULL != pArr ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cInd != 0
- bChanged( FALSE ),
- bRunning( FALSE ),
- bCompile( FALSE ),
- bSubTotal( FALSE ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bChanged( false ),
+ bRunning( false ),
+ bCompile( false ),
+ bSubTotal( false ),
+ bIsIterCell( false ),
+ bInChangeTrack( false ),
+ bTableOpDirty( false ),
+ bNeedListening( false ),
aPos( rPos )
{
// UPN-Array erzeugen
@@ -723,7 +723,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
{
pCode->Reset();
if ( pCode->GetNextOpCodeRPN( ocSubTotal ) )
- bSubTotal = TRUE;
+ bSubTotal = sal_True;
}
if (bSubTotal)
@@ -746,13 +746,13 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
cMatrixFlag ( rCell.cMatrixFlag ),
bDirty( rCell.bDirty ),
bChanged( rCell.bChanged ),
- bRunning( FALSE ),
+ bRunning( false ),
bCompile( rCell.bCompile ),
bSubTotal( rCell.bSubTotal ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bIsIterCell( false ),
+ bInChangeTrack( false ),
+ bTableOpDirty( false ),
+ bNeedListening( false ),
aPos( rPos )
{
pCode = rCell.pCode->Clone();
@@ -766,11 +766,11 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
if ( pCode->GetCodeError() && !pDocument->IsClipboard() && pCode->GetLen() )
{
pCode->SetCodeError( 0 );
- bCompile = TRUE;
+ bCompile = sal_True;
}
//! Compile ColRowNames on URM_MOVE/URM_COPY _after_ UpdateReference
- BOOL bCompileLater = FALSE;
- BOOL bClipMode = rCell.pDocument->IsClipboard();
+ sal_Bool bCompileLater = false;
+ sal_Bool bClipMode = rCell.pDocument->IsClipboard();
if( !bCompile )
{ // Name references with references and ColRowNames
pCode->Reset();
@@ -788,14 +788,14 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
if( pRangeData )
{
if( pRangeData->HasReferences() )
- bCompile = TRUE;
+ bCompile = sal_True;
}
else
- bCompile = TRUE; // invalid reference!
+ bCompile = sal_True; // invalid reference!
}
else if ( t->GetOpCode() == ocColRowName )
{
- bCompile = TRUE; // new lookup needed
+ bCompile = sal_True; // new lookup needed
bCompileLater = bClipMode;
}
}
@@ -812,7 +812,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
{
// bNoListening, not at all if in Clipboard/Undo,
// and not from Clipboard either, instead after Insert(Clone) and UpdateReference.
- CompileTokenArray( TRUE );
+ CompileTokenArray( sal_True );
}
}
@@ -922,11 +922,11 @@ void ScFormulaCell::GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows )
}
}
-void ScFormulaCell::Compile( const String& rFormula, BOOL bNoListening,
+void ScFormulaCell::Compile( const String& rFormula, sal_Bool bNoListening,
const FormulaGrammar::Grammar eGrammar )
{
if ( pDocument->IsClipOrUndo() ) return;
- BOOL bWasInFormulaTree = pDocument->IsInFormulaTree( this );
+ sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
if ( bWasInFormulaTree )
pDocument->RemoveFromFormulaTree( this );
// pCode darf fuer Abfragen noch nicht geloescht, muss aber leer sein
@@ -947,12 +947,12 @@ void ScFormulaCell::Compile( const String& rFormula, BOOL bNoListening,
else
pCode->AddBad( rFormula.GetBuffer() );
}
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray( bNoListening );
}
else
{
- bChanged = TRUE;
+ bChanged = sal_True;
SetTextWidth( TEXTWIDTH_DIRTY );
SetScriptType( SC_SCRIPTTYPE_UNKNOWN );
}
@@ -961,7 +961,7 @@ void ScFormulaCell::Compile( const String& rFormula, BOOL bNoListening,
}
-void ScFormulaCell::CompileTokenArray( BOOL bNoListening )
+void ScFormulaCell::CompileTokenArray( sal_Bool bNoListening )
{
// Not already compiled?
if( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
@@ -969,13 +969,13 @@ void ScFormulaCell::CompileTokenArray( BOOL bNoListening )
else if( bCompile && !pDocument->IsClipOrUndo() && !pCode->GetCodeError() )
{
// RPN length may get changed
- BOOL bWasInFormulaTree = pDocument->IsInFormulaTree( this );
+ sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
if ( bWasInFormulaTree )
pDocument->RemoveFromFormulaTree( this );
// Loading from within filter? No listening yet!
if( pDocument->IsInsertingFromOtherDoc() )
- bNoListening = TRUE;
+ bNoListening = sal_True;
if( !bNoListening && pCode->GetCodeLen() )
EndListeningTo( pDocument );
@@ -986,9 +986,9 @@ void ScFormulaCell::CompileTokenArray( BOOL bNoListening )
{
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bChanged = TRUE;
+ bChanged = sal_True;
aResult.SetToken( NULL);
- bCompile = FALSE;
+ bCompile = false;
if ( !bNoListening )
StartListeningTo( pDocument );
}
@@ -1036,8 +1036,8 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
{
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bChanged = TRUE;
- bCompile = FALSE;
+ bChanged = sal_True;
+ bCompile = false;
StartListeningTo( pDocument );
}
@@ -1046,7 +1046,7 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
}
else
{
- bChanged = TRUE;
+ bChanged = sal_True;
SetTextWidth( TEXTWIDTH_DIRTY );
SetScriptType( SC_SCRIPTTYPE_UNKNOWN );
}
@@ -1054,21 +1054,21 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
// Same as in Load: after loading, it must be known if ocMacro is in any formula
// (for macro warning, CompileXML is called at the end of loading XML file)
if ( !pDocument->GetHasMacroFunc() && pCode->HasOpCodeRPN( ocMacro ) )
- pDocument->SetHasMacroFunc( TRUE );
+ pDocument->SetHasMacroFunc( sal_True );
}
void ScFormulaCell::CalcAfterLoad()
{
- BOOL bNewCompiled = FALSE;
+ sal_Bool bNewCompiled = false;
// Falls ein Calc 1.0-Doc eingelesen wird, haben wir ein Ergebnis,
// aber kein TokenArray
if( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
{
- Compile( aResult.GetHybridFormula(), TRUE, eTempGrammar);
+ Compile( aResult.GetHybridFormula(), sal_True, eTempGrammar);
aResult.SetToken( NULL);
- bDirty = TRUE;
- bNewCompiled = TRUE;
+ bDirty = sal_True;
+ bNewCompiled = sal_True;
}
// Das UPN-Array wird nicht erzeugt, wenn ein Calc 3.0-Doc eingelesen
// wurde, da die RangeNames erst jetzt existieren.
@@ -1079,9 +1079,9 @@ void ScFormulaCell::CalcAfterLoad()
bSubTotal = aComp.CompileTokenArray();
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bDirty = TRUE;
- bCompile = FALSE;
- bNewCompiled = TRUE;
+ bDirty = true;
+ bCompile = false;
+ bNewCompiled = true;
if (bSubTotal)
pDocument->AddSubTotalCell(this);
@@ -1094,7 +1094,7 @@ void ScFormulaCell::CalcAfterLoad()
{
DBG_ERRORFILE("Formelzelle INFINITY !!! Woher kommt das Dokument?");
aResult.SetResultError( errIllegalFPOperation );
- bDirty = TRUE;
+ bDirty = sal_True;
}
// DoubleRefs bei binaeren Operatoren waren vor v5.0 immer Matrix,
// jetzt nur noch wenn in Matrixformel, sonst implizite Schnittmenge
@@ -1111,12 +1111,12 @@ void ScFormulaCell::CalcAfterLoad()
{
StartListeningTo( pDocument );
if( !pCode->IsRecalcModeNormal() )
- bDirty = TRUE;
+ bDirty = sal_True;
}
if ( pCode->IsRecalcModeAlways() )
{ // zufall(), heute(), jetzt() bleiben immer im FormulaTree, damit sie
// auch bei jedem F9 berechnet werden.
- bDirty = TRUE;
+ bDirty = sal_True;
}
// Noch kein SetDirty weil noch nicht alle Listener bekannt, erst in
// SetDirtyAfterLoad.
@@ -1167,10 +1167,10 @@ void ScFormulaCell::Interpret()
return ;
ScRecursionHelper& rRecursionHelper = pDocument->GetRecursionHelper();
- BOOL bOldRunning = bRunning;
+ sal_Bool bOldRunning = bRunning;
if (rRecursionHelper.GetRecursionCount() > MAXRECURSION)
{
- bRunning = TRUE;
+ bRunning = sal_True;
rRecursionHelper.SetInRecursionReturn( true);
}
else
@@ -1210,13 +1210,13 @@ void ScFormulaCell::Interpret()
aOldStart; ++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = TRUE;
+ pIterCell->bIsIterCell = sal_True;
}
// Mark older cells dirty again, in case they converted
// without accounting for all remaining cells in the circle
// that weren't touched so far, e.g. conditional. Restore
// backuped result.
- USHORT nIteration = rRecursionHelper.GetIteration();
+ sal_uInt16 nIteration = rRecursionHelper.GetIteration();
for (ScFormulaRecursionList::const_iterator aIter(
aOldStart); aIter !=
rRecursionHelper.GetIterationEnd(); ++aIter)
@@ -1230,7 +1230,7 @@ void ScFormulaCell::Interpret()
}
--pIterCell->nSeenInIteration;
}
- pIterCell->bDirty = TRUE;
+ pIterCell->bDirty = sal_True;
}
}
else
@@ -1247,11 +1247,11 @@ void ScFormulaCell::Interpret()
rRecursionHelper.GetIterationEnd(); ++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = TRUE;
+ pIterCell->bIsIterCell = sal_True;
}
}
bIterationFromRecursion = false;
- USHORT nIterMax = pDocument->GetDocOptions().GetIterCount();
+ sal_uInt16 nIterMax = pDocument->GetDocOptions().GetIterCount();
for ( ; rRecursionHelper.GetIteration() <= nIterMax && !rDone;
rRecursionHelper.IncIteration())
{
@@ -1288,7 +1288,7 @@ void ScFormulaCell::Interpret()
++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = FALSE;
+ pIterCell->bIsIterCell = false;
pIterCell->nSeenInIteration = 0;
pIterCell->bRunning = (*aIter).bOldRunning;
}
@@ -1301,16 +1301,16 @@ void ScFormulaCell::Interpret()
++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = FALSE;
+ pIterCell->bIsIterCell = false;
pIterCell->nSeenInIteration = 0;
pIterCell->bRunning = (*aIter).bOldRunning;
// If one cell didn't converge, all cells of this
// circular dependency don't, no matter whether
// single cells did.
- pIterCell->bDirty = FALSE;
- pIterCell->bTableOpDirty = FALSE;
+ pIterCell->bDirty = false;
+ pIterCell->bTableOpDirty = false;
pIterCell->aResult.SetResultError( errNoConvergence);
- pIterCell->bChanged = TRUE;
+ pIterCell->bChanged = sal_True;
pIterCell->SetTextWidth( TEXTWIDTH_DIRTY);
pIterCell->SetScriptType( SC_SCRIPTTYPE_UNKNOWN);
}
@@ -1425,12 +1425,12 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
pDocument->IncInterpretLevel();
ScInterpreter* p = new ScInterpreter( this, pDocument, aPos, *pCode );
StackCleaner aStackCleaner( pDocument, p);
- USHORT nOldErrCode = aResult.GetResultError();
+ sal_uInt16 nOldErrCode = aResult.GetResultError();
if ( nSeenInIteration == 0 )
{ // Only the first time
- // With bChanged=FALSE, if a newly compiled cell has a result of
+ // With bChanged=sal_False, if a newly compiled cell has a result of
// 0.0, no change is detected and the cell will not be repainted.
- // bChanged = FALSE;
+ // bChanged = sal_False;
aResult.SetResultError( 0 );
}
@@ -1441,8 +1441,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
break;
}
- BOOL bOldRunning = bRunning;
- bRunning = TRUE;
+ sal_Bool bOldRunning = bRunning;
+ bRunning = sal_True;
p->Interpret();
if (pDocument->GetRecursionHelper().IsInReturn() && eTailParam != SCITP_CLOSE_ITERATION_CIRCLE)
{
@@ -1454,17 +1454,17 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// #i102616# For single-sheet saving consider only content changes, not format type,
// because format type isn't set on loading (might be changed later)
- BOOL bContentChanged = FALSE;
+ sal_Bool bContentChanged = false;
// Do not create a HyperLink() cell if the formula results in an error.
if( p->GetError() && pCode->IsHyperLink())
- pCode->SetHyperLink(FALSE);
+ pCode->SetHyperLink(false);
if( p->GetError() && p->GetError() != errCircularReference)
{
- bDirty = FALSE;
- bTableOpDirty = FALSE;
- bChanged = TRUE;
+ bDirty = false;
+ bTableOpDirty = false;
+ bChanged = sal_True;
}
if (eTailParam == SCITP_FROM_ITERATION && IsDirtyOrInTableOpDirty())
{
@@ -1486,8 +1486,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if (nSeenInIteration > 1 ||
pDocument->GetDocOptions().GetIterCount() == 1)
{
- bDirty = FALSE;
- bTableOpDirty = FALSE;
+ bDirty = false;
+ bTableOpDirty = false;
}
}
}
@@ -1495,21 +1495,21 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// New error code?
if( p->GetError() != nOldErrCode )
{
- bChanged = TRUE;
+ bChanged = sal_True;
// bContentChanged only has to be set if the file content would be changed
if ( aResult.GetCellResultType() != svUnknown )
- bContentChanged = TRUE;
+ bContentChanged = sal_True;
}
// Different number format?
if( nFormatType != p->GetRetFormatType() )
{
nFormatType = p->GetRetFormatType();
- bChanged = TRUE;
+ bChanged = sal_True;
}
if( nFormatIndex != p->GetRetFormatIndex() )
{
nFormatIndex = p->GetRetFormatIndex();
- bChanged = TRUE;
+ bChanged = sal_True;
}
// In case of changes just obtain the result, no temporary and
@@ -1562,7 +1562,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// no change, see above
}
else
- bContentChanged = TRUE;
+ bContentChanged = sal_True;
}
aResult.Assign( aNewResult);
@@ -1575,7 +1575,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
&& nFormatType != NUMBERFORMAT_TIME
&& nFormatType != NUMBERFORMAT_DATETIME )
{
- ULONG nFormat = pDocument->GetNumberFormat( aPos );
+ sal_uLong nFormat = pDocument->GetNumberFormat( aPos );
if ( nFormatIndex && (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
nFormat = nFormatIndex;
if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
@@ -1586,8 +1586,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
}
if (eTailParam == SCITP_NORMAL)
{
- bDirty = FALSE;
- bTableOpDirty = FALSE;
+ bDirty = false;
+ bTableOpDirty = false;
}
if( aResult.GetMatrix() )
{
@@ -1599,7 +1599,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if ( aResult.IsValue() && !::rtl::math::isFinite( aResult.GetDouble() ) )
{
// Coded double error may occur via filter import.
- USHORT nErr = GetDoubleErrorValue( aResult.GetDouble());
+ sal_uInt16 nErr = GetDoubleErrorValue( aResult.GetDouble());
aResult.SetResultError( nErr);
bChanged = bContentChanged = true;
}
@@ -1610,9 +1610,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
}
if (bContentChanged && pDocument->IsStreamValid(aPos.Tab()))
{
- // pass bIgnoreLock=TRUE, because even if called from pending row height update,
+ // pass bIgnoreLock=sal_True, because even if called from pending row height update,
// a changed result must still reset the stream flag
- pDocument->SetStreamValid(aPos.Tab(), FALSE, TRUE);
+ pDocument->SetStreamValid(aPos.Tab(), false, sal_True);
}
if ( !pCode->IsRecalcModeAlways() )
pDocument->RemoveFromFormulaTree( this );
@@ -1621,7 +1621,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if ( pCode->IsRecalcModeForced() )
{
- ULONG nValidation = ((const SfxUInt32Item*) pDocument->GetAttr(
+ sal_uLong nValidation = ((const SfxUInt32Item*) pDocument->GetAttr(
aPos.Col(), aPos.Row(), aPos.Tab(), ATTR_VALIDDATA ))->GetValue();
if ( nValidation )
{
@@ -1669,8 +1669,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
{
// Zelle bei Compiler-Fehlern nicht ewig auf dirty stehenlassen
DBG_ASSERT( pCode->GetCodeError(), "kein UPN-Code und kein Fehler ?!?!" );
- bDirty = FALSE;
- bTableOpDirty = FALSE;
+ bDirty = false;
+ bTableOpDirty = false;
}
}
@@ -1698,7 +1698,7 @@ void ScFormulaCell::GetMatColsRows( SCCOL & nCols, SCROW & nRows ) const
}
-ULONG ScFormulaCell::GetStandardFormat( SvNumberFormatter& rFormatter, ULONG nFormat ) const
+sal_uLong ScFormulaCell::GetStandardFormat( SvNumberFormatter& rFormatter, sal_uLong nFormat ) const
{
if ( nFormatIndex && (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
return nFormatIndex;
@@ -1715,17 +1715,17 @@ void ScFormulaCell::Notify( SvtBroadcaster&, const SfxHint& rHint)
if ( !pDocument->IsInDtorClear() && !pDocument->GetHardRecalcState() )
{
const ScHint* p = PTR_CAST( ScHint, &rHint );
- ULONG nHint = (p ? p->GetId() : 0);
+ sal_uLong nHint = (p ? p->GetId() : 0);
if (nHint & (SC_HINT_DATACHANGED | SC_HINT_DYING | SC_HINT_TABLEOPDIRTY))
{
- BOOL bForceTrack = FALSE;
+ sal_Bool bForceTrack = false;
if ( nHint & SC_HINT_TABLEOPDIRTY )
{
bForceTrack = !bTableOpDirty;
if ( !bTableOpDirty )
{
pDocument->AddTableOpFormulaCell( this );
- bTableOpDirty = TRUE;
+ bTableOpDirty = sal_True;
}
}
else
@@ -1759,7 +1759,7 @@ void ScFormulaCell::SetDirty()
{
// Mehrfach-FormulaTracking in Load und in CompileAll
// nach CopyScenario und CopyBlockFromClip vermeiden.
- // Wenn unbedingtes FormulaTracking noetig, vor SetDirty bDirty=FALSE
+ // Wenn unbedingtes FormulaTracking noetig, vor SetDirty bDirty=sal_False
// setzen, z.B. in CompileTokenArray
if ( !bDirty || !pDocument->IsInFormulaTree( this ) )
{
@@ -1770,20 +1770,20 @@ void ScFormulaCell::SetDirty()
}
if (pDocument->IsStreamValid(aPos.Tab()))
- pDocument->SetStreamValid(aPos.Tab(), FALSE);
+ pDocument->SetStreamValid(aPos.Tab(), false);
}
}
void ScFormulaCell::SetDirtyVar()
{
- bDirty = TRUE;
+ bDirty = true;
// mark the sheet of this cell to be calculated
//#FIXME do we need to revert this remnant of old fake vba events? pDocument->AddCalculateTable( aPos.Tab() );
}
void ScFormulaCell::SetDirtyAfterLoad()
{
- bDirty = TRUE;
+ bDirty = sal_True;
if ( !pDocument->GetHardRecalcState() )
pDocument->PutInFormulaTree( this );
}
@@ -1793,7 +1793,7 @@ void ScFormulaCell::SetTableOpDirty()
if ( !IsInChangeTrack() )
{
if ( pDocument->GetHardRecalcState() )
- bTableOpDirty = TRUE;
+ bTableOpDirty = sal_True;
else
{
if ( !bTableOpDirty || !pDocument->IsInFormulaTree( this ) )
@@ -1801,7 +1801,7 @@ void ScFormulaCell::SetTableOpDirty()
if ( !bTableOpDirty )
{
pDocument->AddTableOpFormulaCell( this );
- bTableOpDirty = TRUE;
+ bTableOpDirty = sal_True;
}
pDocument->AppendToFormulaTrack( this );
pDocument->TrackFormulas( SC_HINT_TABLEOPDIRTY );
@@ -1811,13 +1811,13 @@ void ScFormulaCell::SetTableOpDirty()
}
-BOOL ScFormulaCell::IsDirtyOrInTableOpDirty() const
+sal_Bool ScFormulaCell::IsDirtyOrInTableOpDirty() const
{
return bDirty || (bTableOpDirty && pDocument->IsInInterpreterTableOp());
}
-void ScFormulaCell::SetErrCode( USHORT n )
+void ScFormulaCell::SetErrCode( sal_uInt16 n )
{
/* FIXME: check the numerous places where ScTokenArray::GetCodeError() is
* used whether it is solely for transport of a simple result error and get
@@ -1832,7 +1832,7 @@ void ScFormulaCell::SetErrCode( USHORT n )
void ScFormulaCell::AddRecalcMode( ScRecalcMode nBits )
{
if ( (nBits & RECALCMODE_EMASK) != RECALCMODE_NORMAL )
- bDirty = TRUE;
+ bDirty = sal_True;
if ( nBits & RECALCMODE_ONLOAD_ONCE )
{ // OnLoadOnce nur zum Dirty setzen nach Filter-Import
nBits = (nBits & ~RECALCMODE_EMASK) | RECALCMODE_NORMAL;
@@ -1849,13 +1849,13 @@ void ScFormulaCell::GetURLResult( String& rURL, String& rCellText )
// Cell Text uses the Cell format while the URL uses
// the default format for the type.
- ULONG nCellFormat = pDocument->GetNumberFormat( aPos );
+ sal_uLong nCellFormat = pDocument->GetNumberFormat( aPos );
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
if ( (nCellFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
nCellFormat = GetStandardFormat( *pFormatter,nCellFormat );
- ULONG nURLFormat = ScGlobal::GetStandardFormat( *pFormatter,nCellFormat, NUMBERFORMAT_NUMBER);
+ sal_uLong nURLFormat = ScGlobal::GetStandardFormat( *pFormatter,nCellFormat, NUMBERFORMAT_NUMBER);
if ( IsValue() )
{
@@ -1926,32 +1926,32 @@ ScDetectiveRefIter::ScDetectiveRefIter( ScFormulaCell* pCell )
aPos = pCell->aPos;
}
-BOOL lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
+sal_Bool lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
{
ScSingleRefData& rRef1 = p->GetSingleRef();
if ( rRef1.IsColDeleted() || rRef1.IsRowDeleted() || rRef1.IsTabDeleted()
|| !rRef1.Valid() )
- return TRUE;
+ return true;
if ( p->GetType() == svDoubleRef || p->GetType() == svExternalDoubleRef )
{
ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
if ( rRef2.IsColDeleted() || rRef2.IsRowDeleted() || rRef2.IsTabDeleted()
|| !rRef2.Valid() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScDetectiveRefIter::GetNextRef( ScRange& rRange )
+sal_Bool ScDetectiveRefIter::GetNextRef( ScRange& rRange )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScToken* p = GetNextRefToken();
if( p )
{
SingleDoubleRefProvider aProv( *p );
rRange.aStart.Set( aProv.Ref1.nCol, aProv.Ref1.nRow, aProv.Ref1.nTab );
rRange.aEnd.Set( aProv.Ref2.nCol, aProv.Ref2.nRow, aProv.Ref2.nTab );
- bRet = TRUE;
+ bRet = true;
}
return bRet;
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 083044f5e076..8969bed4b68f 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -60,7 +60,7 @@ using namespace formula;
// STATIC DATA -----------------------------------------------------------
#ifdef USE_MEMPOOL
-const USHORT nMemPoolEditCell = (0x1000 - 64) / sizeof(ScNoteCell);
+const sal_uInt16 nMemPoolEditCell = (0x1000 - 64) / sizeof(ScNoteCell);
IMPL_FIXEDMEMPOOL_NEWDEL( ScEditCell, nMemPoolEditCell, nMemPoolEditCell )
#endif
@@ -145,19 +145,19 @@ void ScEditCell::GetString( String& rString ) const
void ScEditCell::RemoveCharAttribs( const ScPatternAttr& rAttr )
{
const struct {
- USHORT nAttrType;
- USHORT nCharType;
+ sal_uInt16 nAttrType;
+ sal_uInt16 nCharType;
} AttrTypeMap[] = {
{ ATTR_FONT, EE_CHAR_FONTINFO },
{ ATTR_FONT_HEIGHT, EE_CHAR_FONTHEIGHT },
{ ATTR_FONT_WEIGHT, EE_CHAR_WEIGHT },
{ ATTR_FONT_COLOR, EE_CHAR_COLOR }
};
- USHORT nMapCount = SAL_N_ELEMENTS(AttrTypeMap);
+ sal_uInt16 nMapCount = SAL_N_ELEMENTS(AttrTypeMap);
const SfxItemSet& rSet = rAttr.GetItemSet();
const SfxPoolItem* pItem;
- for (USHORT i = 0; i < nMapCount; ++i)
+ for (sal_uInt16 i = 0; i < nMapCount; ++i)
{
if ( rSet.GetItemState(AttrTypeMap[i].nAttrType, false, &pItem) == SFX_ITEM_SET )
pData->RemoveCharAttribs(AttrTypeMap[i].nCharType);
@@ -178,9 +178,9 @@ void ScEditCell::SetTextObject( const EditTextObject* pObject,
EditEngine& rEngine = pDoc->GetEditEngine();
if ( pObject->HasOnlineSpellErrors() )
{
- ULONG nControl = rEngine.GetControlWord();
- const ULONG nSpellControl = EE_CNTRL_ONLINESPELLING | EE_CNTRL_ALLOWBIGOBJS;
- BOOL bNewControl = ( (nControl & nSpellControl) != nSpellControl );
+ sal_uLong nControl = rEngine.GetControlWord();
+ const sal_uLong nSpellControl = EE_CNTRL_ONLINESPELLING | EE_CNTRL_ALLOWBIGOBJS;
+ sal_Bool bNewControl = ( (nControl & nSpellControl) != nSpellControl );
if ( bNewControl )
rEngine.SetControlWord( nControl | nSpellControl );
rEngine.SetText( *pObject );
@@ -485,19 +485,19 @@ bool lcl_isReference(const FormulaToken& rToken)
}
-BOOL ScFormulaCell::IsEmpty()
+sal_Bool ScFormulaCell::IsEmpty()
{
MaybeInterpret();
return aResult.GetCellResultType() == formula::svEmptyCell;
}
-BOOL ScFormulaCell::IsEmptyDisplayedAsString()
+sal_Bool ScFormulaCell::IsEmptyDisplayedAsString()
{
MaybeInterpret();
return aResult.IsEmptyDisplayedAsString();
}
-BOOL ScFormulaCell::IsValue()
+sal_Bool ScFormulaCell::IsValue()
{
MaybeInterpret();
return aResult.IsValue();
@@ -536,20 +536,20 @@ const ScMatrix* ScFormulaCell::GetMatrix()
// Was stored !bDirty but an accompanying matrix cell was bDirty?
// => we need to get the matrix.
if (!bDirty && cMatrixFlag == MM_FORMULA && !aResult.GetMatrix())
- bDirty = TRUE;
+ bDirty = true;
if ( IsDirtyOrInTableOpDirty() )
Interpret();
}
return aResult.GetMatrix().get();
}
-BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
+sal_Bool ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
{
switch ( cMatrixFlag )
{
case MM_FORMULA :
rPos = aPos;
- return TRUE;
+ return true;
case MM_REFERENCE :
{
pCode->Reset();
@@ -561,13 +561,13 @@ BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
if ( rRef.Valid() )
{
rPos.Set( rRef.nCol, rRef.nRow, rRef.nTab );
- return TRUE;
+ return sal_True;
}
}
}
break;
}
- return FALSE;
+ return false;
}
@@ -583,7 +583,7 @@ BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
(reserviert: offen: 32)
*/
-USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
+sal_uInt16 ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
{
switch ( cMatrixFlag )
{
@@ -616,7 +616,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
ScBaseCell* pCell;
ScAddress aAdr( aOrg );
aAdr.IncCol();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
do
{
pCell = pDocument->GetCell( aAdr );
@@ -628,11 +628,11 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
aAdr.IncCol();
}
else
- bCont = FALSE;
+ bCont = false;
} while ( bCont );
aAdr = aOrg;
aAdr.IncRow();
- bCont = TRUE;
+ bCont = sal_True;
do
{
pCell = pDocument->GetCell( aAdr );
@@ -644,7 +644,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
aAdr.IncRow();
}
else
- bCont = FALSE;
+ bCont = false;
} while ( bCont );
pFCell->SetMatColsRows( nC, nR );
}
@@ -667,7 +667,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
// here we are, healthy and clean, somewhere in between
SCsCOL dC = aPos.Col() - aOrg.Col();
SCsROW dR = aPos.Row() - aOrg.Row();
- USHORT nEdges = 0;
+ sal_uInt16 nEdges = 0;
if ( dC >= 0 && dR >= 0 && dC < nC && dR < nR )
{
if ( dC == 0 )
@@ -710,28 +710,28 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
}
}
-USHORT ScFormulaCell::GetErrCode()
+sal_uInt16 ScFormulaCell::GetErrCode()
{
MaybeInterpret();
/* FIXME: If ScTokenArray::SetCodeError() was really only for code errors
* and not also abused for signaling other error conditions we could bail
* out even before attempting to interpret broken code. */
- USHORT nErr = pCode->GetCodeError();
+ sal_uInt16 nErr = pCode->GetCodeError();
if (nErr)
return nErr;
return aResult.GetResultError();
}
-USHORT ScFormulaCell::GetRawError()
+sal_uInt16 ScFormulaCell::GetRawError()
{
- USHORT nErr = pCode->GetCodeError();
+ sal_uInt16 nErr = pCode->GetCodeError();
if (nErr)
return nErr;
return aResult.GetResultError();
}
-BOOL ScFormulaCell::HasOneReference( ScRange& r ) const
+sal_Bool ScFormulaCell::HasOneReference( ScRange& r ) const
{
pCode->Reset();
ScToken* p = static_cast<ScToken*>(pCode->GetNextReferenceRPN());
@@ -745,10 +745,10 @@ BOOL ScFormulaCell::HasOneReference( ScRange& r ) const
r.aEnd.Set( aProv.Ref2.nCol,
aProv.Ref2.nRow,
aProv.Ref2.nTab );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
bool
@@ -805,7 +805,7 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const
return false;
}
-BOOL ScFormulaCell::HasRelNameReference() const
+sal_Bool ScFormulaCell::HasRelNameReference() const
{
pCode->Reset();
ScToken* t;
@@ -814,12 +814,12 @@ BOOL ScFormulaCell::HasRelNameReference() const
if ( t->GetSingleRef().IsRelName() ||
(t->GetType() == formula::svDoubleRef &&
t->GetDoubleRef().Ref2.IsRelName()) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScFormulaCell::HasColRowName() const
+sal_Bool ScFormulaCell::HasColRowName() const
{
pCode->Reset();
return (pCode->GetNextColRowName() != NULL);
@@ -845,8 +845,8 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pUndoCellPos )
aUndoPos = *pUndoCellPos;
ScAddress aOldPos( aPos );
-// BOOL bPosChanged = FALSE; // ob diese Zelle bewegt wurde
- BOOL bIsInsert = FALSE;
+// sal_Bool bPosChanged = sal_False; // ob diese Zelle bewegt wurde
+ sal_Bool bIsInsert = false;
if (eUpdateRefMode == URM_INSDEL)
{
bIsInsert = (nDx >= 0 && nDy >= 0 && nDz >= 0);
@@ -899,9 +899,9 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
aOldPos.Set( nCol - nDx, nRow - nDy, nTab - nDz );
}
- BOOL bHasRefs = FALSE;
- BOOL bHasColRowNames = FALSE;
- BOOL bOnRefMove = FALSE;
+ sal_Bool bHasRefs = false;
+ sal_Bool bHasColRowNames = false;
+ sal_Bool bOnRefMove = false;
if ( !pDocument->IsClipOrUndo() )
{
pCode->Reset();
@@ -944,7 +944,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
bOnRefMove = (bValChanged || (aPos != aOldPos));
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
- BOOL bColRowNameCompile, bHasRelName, bNewListening, bInDeleteUndo;
+ sal_Bool bColRowNameCompile, bHasRelName, bNewListening, bInDeleteUndo;
if ( bHasRefs )
{
// Upon Insert ColRowNames have to be recompiled in case the
@@ -953,7 +953,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
(eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0));
if ( bColRowNameCompile )
{
- bColRowNameCompile = FALSE;
+ bColRowNameCompile = false;
ScToken* t;
ScRangePairList* pColList = pDocument->GetColNameRanges();
ScRangePairList* pRowList = pDocument->GetRowNameRanges();
@@ -969,12 +969,12 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pR )
{ // definiert
if ( pR->GetRange(1).aStart.Row() == nRow1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
else
{ // on the fly
if ( rRef.nRow + 1 == nRow1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
}
if ( nDx > 0 && rRef.IsRowRel() )
@@ -985,12 +985,12 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pR )
{ // definiert
if ( pR->GetRange(1).aStart.Col() == nCol1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
else
{ // on the fly
if ( rRef.nCol + 1 == nCol1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
}
}
@@ -1001,11 +1001,11 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
bColRowNameCompile = bCompile; // evtl. aus Copy-ctor
if ( !bColRowNameCompile )
{
- BOOL bMoved = (aPos != aOldPos);
+ sal_Bool bMoved = (aPos != aOldPos);
pCode->Reset();
ScToken* t = static_cast<ScToken*>(pCode->GetNextColRowName());
if ( t && bMoved )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
while ( t && !bColRowNameCompile )
{
ScSingleRefData& rRef = t->GetSingleRef();
@@ -1014,7 +1014,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
{
ScAddress aAdr( rRef.nCol, rRef.nRow, rRef.nTab );
if ( r.In( aAdr ) )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
t = static_cast<ScToken*>(pCode->GetNextColRowName());
}
@@ -1022,13 +1022,13 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
}
else if ( eUpdateRefMode == URM_COPY && bHasColRowNames && bValChanged )
{
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
ScChangeTrack* pChangeTrack = pDocument->GetChangeTrack();
if ( pChangeTrack && pChangeTrack->IsInDeleteUndo() )
- bInDeleteUndo = TRUE;
+ bInDeleteUndo = sal_True;
else
- bInDeleteUndo = FALSE;
+ bInDeleteUndo = false;
// RelNameRefs are always moved
bHasRelName = HasRelNameReference();
// Reference changed and new listening needed?
@@ -1048,7 +1048,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
else
{
bColRowNameCompile = bHasRelName = bNewListening = bInDeleteUndo =
- FALSE;
+ false;
}
bool bNeedDirty = false;
@@ -1109,7 +1109,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
// UpdateReference calls.
// All replaced shared formula listeners have to be
// established after an Insert or Delete. Do nothing here.
- SetNeedsListening( TRUE);
+ SetNeedsListening( sal_True);
}
else
StartListeningTo( pDocument );
@@ -1117,9 +1117,9 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
}
if ( bNeedDirty && (!(eUpdateRefMode == URM_INSDEL && bHasRelName) || pRangeData) )
{ // Referenzen abgeschnitten, ungueltig o.ae.?
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
// kein Interpret in SubMinimalRecalc wegen evtl. falscher Referenzen
- pDocument->SetAutoCalc( FALSE );
+ pDocument->SetAutoCalc( false );
SetDirty();
pDocument->SetAutoCalc( bOldAutoCalc );
}
@@ -1131,7 +1131,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
void ScFormulaCell::UpdateInsertTab(SCTAB nTable)
{
- BOOL bPosChanged = ( aPos.Tab() >= nTable ? TRUE : FALSE );
+ sal_Bool bPosChanged = ( aPos.Tab() >= nTable ? sal_True : false );
pCode->Reset();
if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
{
@@ -1142,21 +1142,21 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable)
ScRangeData* pRangeData;
ScCompiler aComp(pDocument, aPos, *pCode);
aComp.SetGrammar(pDocument->GetGrammar());
- pRangeData = aComp.UpdateInsertTab( nTable, FALSE );
+ pRangeData = aComp.UpdateInsertTab( nTable, false );
if (pRangeData) // Shared Formula gegen echte Formel
{ // austauschen
- BOOL bRefChanged;
+ sal_Bool bRefChanged;
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pRangeData->GetCode() );
ScCompiler aComp2(pDocument, aPos, *pCode);
aComp2.SetGrammar(pDocument->GetGrammar());
aComp2.MoveRelWrap(pRangeData->GetMaxCol(), pRangeData->GetMaxRow());
- aComp2.UpdateInsertTab( nTable, FALSE );
+ aComp2.UpdateInsertTab( nTable, false );
// If the shared formula contained a named range/formula containing
// an absolute reference to a sheet, those have to be readjusted.
- aComp2.UpdateDeleteTab( nTable, FALSE, TRUE, bRefChanged );
- bCompile = TRUE;
+ aComp2.UpdateDeleteTab( nTable, false, sal_True, bRefChanged );
+ bCompile = sal_True;
}
// kein StartListeningTo weil pTab[nTab] noch nicht existiert!
}
@@ -1164,10 +1164,10 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable)
aPos.IncTab();
}
-BOOL ScFormulaCell::UpdateDeleteTab(SCTAB nTable, BOOL bIsMove)
+sal_Bool ScFormulaCell::UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove)
{
- BOOL bRefChanged = FALSE;
- BOOL bPosChanged = ( aPos.Tab() > nTable ? TRUE : FALSE );
+ sal_Bool bRefChanged = false;
+ sal_Bool bPosChanged = ( aPos.Tab() > nTable ? sal_True : false );
pCode->Reset();
if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
{
@@ -1178,7 +1178,7 @@ BOOL ScFormulaCell::UpdateDeleteTab(SCTAB nTable, BOOL bIsMove)
ScRangeData* pRangeData;
ScCompiler aComp(pDocument, aPos, *pCode);
aComp.SetGrammar(pDocument->GetGrammar());
- pRangeData = aComp.UpdateDeleteTab(nTable, bIsMove, FALSE, bRefChanged);
+ pRangeData = aComp.UpdateDeleteTab(nTable, bIsMove, false, bRefChanged);
if (pRangeData) // Shared Formula gegen echte Formel
{ // austauschen
pDocument->RemoveFromFormulaTree( this ); // update formula count
@@ -1188,13 +1188,13 @@ BOOL ScFormulaCell::UpdateDeleteTab(SCTAB nTable, BOOL bIsMove)
aComp2.SetGrammar(pDocument->GetGrammar());
aComp2.CompileTokenArray();
aComp2.MoveRelWrap(pRangeData->GetMaxCol(), pRangeData->GetMaxRow());
- aComp2.UpdateDeleteTab( nTable, FALSE, FALSE, bRefChanged );
+ aComp2.UpdateDeleteTab( nTable, false, false, bRefChanged );
// If the shared formula contained a named range/formula containing
// an absolute reference to a sheet, those have to be readjusted.
- aComp2.UpdateInsertTab( nTable,TRUE );
+ aComp2.UpdateInsertTab( nTable,sal_True );
// bRefChanged kann beim letzten UpdateDeleteTab zurueckgesetzt worden sein
- bRefChanged = TRUE;
- bCompile = TRUE;
+ bRefChanged = sal_True;
+ bCompile = sal_True;
}
// kein StartListeningTo weil pTab[nTab] noch nicht korrekt!
}
@@ -1215,7 +1215,7 @@ void ScFormulaCell::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo )
ScRangeData* pRangeData;
ScCompiler aComp(pDocument, aPos, *pCode);
aComp.SetGrammar(pDocument->GetGrammar());
- pRangeData = aComp.UpdateMoveTab( nOldPos, nNewPos, FALSE );
+ pRangeData = aComp.UpdateMoveTab( nOldPos, nNewPos, false );
if (pRangeData) // Shared Formula gegen echte Formel
{ // austauschen
pDocument->RemoveFromFormulaTree( this ); // update formula count
@@ -1225,8 +1225,8 @@ void ScFormulaCell::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo )
aComp2.SetGrammar(pDocument->GetGrammar());
aComp2.CompileTokenArray();
aComp2.MoveRelWrap(pRangeData->GetMaxCol(), pRangeData->GetMaxRow());
- aComp2.UpdateMoveTab( nOldPos, nNewPos, TRUE );
- bCompile = TRUE;
+ aComp2.UpdateMoveTab( nOldPos, nNewPos, sal_True );
+ bCompile = sal_True;
}
// kein StartListeningTo weil pTab[nTab] noch nicht korrekt!
}
@@ -1256,9 +1256,9 @@ void ScFormulaCell::UpdateInsertTabAbs(SCTAB nTable)
}
}
-BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
+sal_Bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if( !pDocument->IsClipOrUndo() )
{
pCode->Reset();
@@ -1269,7 +1269,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
if( !rRef1.IsTabRel() )
{
if( (SCsTAB) nTable != rRef1.nTab )
- bRet = TRUE;
+ bRet = sal_True;
else if (nTable != aPos.Tab())
rRef1.nTab = aPos.Tab();
}
@@ -1279,7 +1279,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
if( !rRef2.IsTabRel() )
{
if( (SCsTAB) nTable != rRef2.nTab )
- bRet = TRUE;
+ bRet = sal_True;
else if (nTable != aPos.Tab())
rRef2.nTab = aPos.Tab();
}
@@ -1290,7 +1290,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
return bRet;
}
-void ScFormulaCell::UpdateCompile( BOOL bForceIfNameInUse )
+void ScFormulaCell::UpdateCompile( sal_Bool bForceIfNameInUse )
{
if ( bForceIfNameInUse && !bCompile )
bCompile = pCode->HasNameOrColRowName();
@@ -1303,7 +1303,7 @@ void ScFormulaCell::UpdateCompile( BOOL bForceIfNameInUse )
void ScFormulaCell::TransposeReference()
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
pCode->Reset();
ScToken* t;
while ( ( t = static_cast<ScToken*>(pCode->GetNextReference()) ) != NULL )
@@ -1311,11 +1311,11 @@ void ScFormulaCell::TransposeReference()
ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() && rRef1.IsRowRel() )
{
- BOOL bDouble = (t->GetType() == formula::svDoubleRef);
+ sal_Bool bDouble = (t->GetType() == formula::svDoubleRef);
ScSingleRefData& rRef2 = (bDouble ? t->GetDoubleRef().Ref2 : rRef1);
if ( !bDouble || (rRef2.IsColRel() && rRef2.IsRowRel()) )
{
- INT16 nTemp;
+ sal_Int16 nTemp;
nTemp = rRef1.nRelCol;
rRef1.nRelCol = static_cast<SCCOL>(rRef1.nRelRow);
@@ -1328,13 +1328,13 @@ void ScFormulaCell::TransposeReference()
rRef2.nRelRow = static_cast<SCROW>(nTemp);
}
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
if (bFound)
- bCompile = TRUE;
+ bCompile = sal_True;
}
void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
@@ -1343,7 +1343,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
EndListeningTo( pDocument );
ScAddress aOldPos = aPos;
- BOOL bPosChanged = FALSE; // ob diese Zelle bewegt wurde
+ sal_Bool bPosChanged = false; // ob diese Zelle bewegt wurde
ScRange aDestRange( rDest, ScAddress(
static_cast<SCCOL>(rDest.Col() + rSource.aEnd.Row() - rSource.aStart.Row()),
@@ -1357,11 +1357,11 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
SCsTAB nRelPosZ = aOldPos.Tab();
ScRefUpdate::DoTranspose( nRelPosX, nRelPosY, nRelPosZ, pDocument, aDestRange, rSource.aStart );
aOldPos.Set( nRelPosX, nRelPosY, nRelPosZ );
- bPosChanged = TRUE;
+ bPosChanged = sal_True;
}
ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL;
- BOOL bRefChanged = FALSE;
+ sal_Bool bRefChanged = false;
ScToken* t;
ScRangeData* pShared = NULL;
@@ -1374,7 +1374,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
if (pName)
{
if (pName->IsModified())
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
if (pName->HasType(RT_SHAREDMOD))
pShared = pName;
}
@@ -1382,7 +1382,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
else if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aOldPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1392,7 +1392,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
if ( bMod )
{
t->CalcRelFromAbs( aPos );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
}
}
}
@@ -1402,14 +1402,14 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
{
if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aOldPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1432,7 +1432,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
pUndoDoc->PutCell( aPos.Col(), aPos.Row(), aPos.Tab(), pFCell );
}
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray(); // ruft auch StartListeningTo
SetDirty();
}
@@ -1446,7 +1446,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
{
EndListeningTo( pDocument );
- BOOL bRefChanged = FALSE;
+ sal_Bool bRefChanged = false;
ScToken* t;
ScRangeData* pShared = NULL;
@@ -1459,7 +1459,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if (pName)
{
if (pName->IsModified())
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
if (pName->HasType(RT_SHAREDMOD))
pShared = pName;
}
@@ -1467,7 +1467,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
else if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1477,7 +1477,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if ( bMod )
{
t->CalcRelFromAbs( aPos );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
}
}
}
@@ -1487,14 +1487,14 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
{
if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1509,7 +1509,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if (bRefChanged)
{
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray(); // ruft auch StartListeningTo
SetDirty();
}
@@ -1517,39 +1517,39 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
StartListeningTo( pDocument ); // Listener wie vorher
}
-BOOL lcl_IsRangeNameInUse(size_t nIndex, ScTokenArray* pCode, ScRangeName* pNames)
+sal_Bool lcl_IsRangeNameInUse(size_t nIndex, ScTokenArray* pCode, ScRangeName* pNames)
{
for (FormulaToken* p = pCode->First(); p; p = pCode->Next())
{
if (p->GetOpCode() == ocName)
{
- if (p->GetIndex() == static_cast<USHORT>(nIndex))
- return TRUE;
+ if (p->GetIndex() == static_cast<sal_uInt16>(nIndex))
+ return true;
else
{
// RangeData kann Null sein in bestimmten Excel-Dateien
ScRangeData* pSubName = pNames->findByIndex(p->GetIndex());
if (pSubName && lcl_IsRangeNameInUse(nIndex,
pSubName->GetCode(), pNames))
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
-BOOL ScFormulaCell::IsRangeNameInUse(USHORT nIndex) const
+sal_Bool ScFormulaCell::IsRangeNameInUse(sal_uInt16 nIndex) const
{
return lcl_IsRangeNameInUse( nIndex, pCode, pDocument->GetRangeName() );
}
-void lcl_FindRangeNamesInUse(std::set<USHORT>& rIndexes, ScTokenArray* pCode, ScRangeName* pNames)
+void lcl_FindRangeNamesInUse(std::set<sal_uInt16>& rIndexes, ScTokenArray* pCode, ScRangeName* pNames)
{
for (FormulaToken* p = pCode->First(); p; p = pCode->Next())
{
if (p->GetOpCode() == ocName)
{
- USHORT nTokenIndex = p->GetIndex();
+ sal_uInt16 nTokenIndex = p->GetIndex();
rIndexes.insert( nTokenIndex );
ScRangeData* pSubName = pNames->findByIndex(p->GetIndex());
@@ -1559,7 +1559,7 @@ void lcl_FindRangeNamesInUse(std::set<USHORT>& rIndexes, ScTokenArray* pCode, Sc
}
}
-void ScFormulaCell::FindRangeNamesInUse(std::set<USHORT>& rIndexes) const
+void ScFormulaCell::FindRangeNamesInUse(std::set<sal_uInt16>& rIndexes) const
{
lcl_FindRangeNamesInUse( rIndexes, pCode, pDocument->GetRangeName() );
}
@@ -1576,7 +1576,7 @@ void ScFormulaCell::ReplaceRangeNamesInUse( const ScRangeData::IndexMap& rMap )
if ( nIndex != nNewIndex )
{
p->SetIndex( nNewIndex );
- bCompile = TRUE;
+ bCompile = sal_True;
}
}
}
@@ -1591,7 +1591,7 @@ void ScFormulaCell::CompileDBFormula()
if ( p->GetOpCode() == ocDBArea
|| (p->GetOpCode() == ocName && p->GetIndex() >= SC_START_INDEX_DB_COLL) )
{
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray();
SetDirty();
break;
@@ -1599,14 +1599,14 @@ void ScFormulaCell::CompileDBFormula()
}
}
-void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString )
+void ScFormulaCell::CompileDBFormula( sal_Bool bCreateFormulaString )
{
// zwei Phasen, muessen (!) nacheinander aufgerufen werden:
// 1. FormelString mit alten Namen erzeugen
// 2. FormelString mit neuen Namen kompilieren
if ( bCreateFormulaString )
{
- BOOL bRecompile = FALSE;
+ sal_Bool bRecompile = false;
pCode->Reset();
for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() )
{
@@ -1615,11 +1615,11 @@ void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString )
case ocBad: // DB-Bereich evtl. zugefuegt
case ocColRowName: // falls Namensgleichheit
case ocDBArea: // DB-Bereich
- bRecompile = TRUE;
+ bRecompile = sal_True;
break;
case ocName:
if ( p->GetIndex() >= SC_START_INDEX_DB_COLL )
- bRecompile = TRUE; // DB-Bereich
+ bRecompile = sal_True; // DB-Bereich
break;
default:
; // nothing
@@ -1644,20 +1644,20 @@ void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString )
}
else if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
{
- Compile( aResult.GetHybridFormula(), FALSE, eTempGrammar );
+ Compile( aResult.GetHybridFormula(), false, eTempGrammar );
aResult.SetToken( NULL);
SetDirty();
}
}
-void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString )
+void ScFormulaCell::CompileNameFormula( sal_Bool bCreateFormulaString )
{
// zwei Phasen, muessen (!) nacheinander aufgerufen werden:
// 1. FormelString mit alten RangeNames erzeugen
// 2. FormelString mit neuen RangeNames kompilieren
if ( bCreateFormulaString )
{
- BOOL bRecompile = FALSE;
+ sal_Bool bRecompile = false;
pCode->Reset();
for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() )
{
@@ -1665,11 +1665,11 @@ void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString )
{
case ocBad: // RangeName evtl. zugefuegt
case ocColRowName: // falls Namensgleichheit
- bRecompile = TRUE;
+ bRecompile = true;
break;
default:
if ( p->GetType() == svIndex )
- bRecompile = TRUE; // RangeName
+ bRecompile = sal_True; // RangeName
}
}
if ( bRecompile )
@@ -1691,7 +1691,7 @@ void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString )
}
else if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
{
- Compile( aResult.GetHybridFormula(), FALSE, eTempGrammar );
+ Compile( aResult.GetHybridFormula(), false, eTempGrammar );
aResult.SetToken( NULL);
SetDirty();
}
@@ -1704,7 +1704,7 @@ void ScFormulaCell::CompileColRowNameFormula()
{
if ( p->GetOpCode() == ocColRowName )
{
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray();
SetDirty();
break;
diff --git a/sc/source/core/data/clipparam.cxx b/sc/source/core/data/clipparam.cxx
index 17690a2f1f8f..c39b69c3385a 100644
--- a/sc/source/core/data/clipparam.cxx
+++ b/sc/source/core/data/clipparam.cxx
@@ -37,13 +37,15 @@ using ::std::vector;
ScClipParam::ScClipParam() :
meDirection(Unspecified),
- mbCutMode(false)
+ mbCutMode(false),
+ mnSourceDocID(0)
{
}
ScClipParam::ScClipParam(const ScRange& rRange, bool bCutMode) :
meDirection(Unspecified),
- mbCutMode(bCutMode)
+ mbCutMode(bCutMode),
+ mnSourceDocID(0)
{
maRanges.Append(rRange);
}
@@ -51,7 +53,9 @@ ScClipParam::ScClipParam(const ScRange& rRange, bool bCutMode) :
ScClipParam::ScClipParam(const ScClipParam& r) :
maRanges(r.maRanges),
meDirection(r.meDirection),
- mbCutMode(r.mbCutMode)
+ mbCutMode(r.mbCutMode),
+ mnSourceDocID(r.mnSourceDocID),
+ maProtectedChartRangesVector(r.maProtectedChartRangesVector)
{
}
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index c2dd57f921fc..b85caa2a06ef 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -66,18 +66,18 @@ extern const ScFormulaCell* pLastFormulaTreeTop; // in cellform.cxx
using namespace formula;
// STATIC DATA -----------------------------------------------------------
-bool ScColumn::bDoubleAlloc = FALSE; // fuer Import: Groesse beim Allozieren verdoppeln
+bool ScColumn::bDoubleAlloc = false; // fuer Import: Groesse beim Allozieren verdoppeln
void ScColumn::Insert( SCROW nRow, ScBaseCell* pNewCell )
{
- BOOL bIsAppended = FALSE;
+ sal_Bool bIsAppended = false;
if (pItems && nCount>0)
{
if (pItems[nCount-1].nRow < nRow)
{
Append(nRow, pNewCell );
- bIsAppended = TRUE;
+ bIsAppended = sal_True;
}
}
if ( !bIsAppended )
@@ -162,12 +162,12 @@ void ScColumn::Insert( SCROW nRow, sal_uInt32 nNumberFormat, ScBaseCell* pCell )
{
Insert(nRow, pCell);
short eOldType = pDocument->GetFormatTable()->
- GetType( (ULONG)
+ GetType( (sal_uLong)
((SfxUInt32Item*)GetAttr( nRow, ATTR_VALUE_FORMAT ))->
GetValue() );
short eNewType = pDocument->GetFormatTable()->GetType(nNumberFormat);
if (!pDocument->GetFormatTable()->IsCompatible(eOldType, eNewType))
- ApplyAttr( nRow, SfxUInt32Item( ATTR_VALUE_FORMAT, (UINT32) nNumberFormat) );
+ ApplyAttr( nRow, SfxUInt32Item( ATTR_VALUE_FORMAT, (sal_uInt32) nNumberFormat) );
}
@@ -276,10 +276,10 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
if ( nFirstIndex >= nCount )
return ;
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
- BOOL bFound=FALSE;
+ sal_Bool bFound=false;
SCROW nEndRow = nStartRow + nSize - 1;
SCSIZE nStartIndex = 0;
SCSIZE nEndIndex = 0;
@@ -290,7 +290,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
if (!bFound)
{
nStartIndex = i;
- bFound = TRUE;
+ bFound = sal_True;
}
nEndIndex = i;
@@ -321,7 +321,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
ScHint aHint( SC_HINT_DATACHANGED, aAdr, NULL ); // only areas (ScBaseCell* == NULL)
ScAddress& rAddress = aHint.GetAddress();
// for sparse occupation use single broadcasts, not ranges
- BOOL bSingleBroadcasts = (((pItems[nCount-1].nRow - pItems[i].nRow) /
+ sal_Bool bSingleBroadcasts = (((pItems[nCount-1].nRow - pItems[i].nRow) /
(nCount - i)) > 1);
if ( bSingleBroadcasts )
{
@@ -364,7 +364,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
}
-void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFlag )
+void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDelFlag )
{
/* If caller specifies to not remove the note caption objects, all cells
have to forget the pointers to them. This is used e.g. while undoing a
@@ -433,13 +433,13 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFla
{
case CELLTYPE_VALUE:
{
- USHORT nValFlags = nDelFlag & (IDF_DATETIME|IDF_VALUE);
+ sal_uInt16 nValFlags = nDelFlag & (IDF_DATETIME|IDF_VALUE);
// delete values and dates?
bDelete = nValFlags == (IDF_DATETIME|IDF_VALUE);
// if not, decide according to cell number format
if( !bDelete && (nValFlags != 0) )
{
- ULONG nIndex = (ULONG)((SfxUInt32Item*)GetAttr( pItems[j].nRow, ATTR_VALUE_FORMAT ))->GetValue();
+ sal_uLong nIndex = (sal_uLong)((SfxUInt32Item*)GetAttr( pItems[j].nRow, ATTR_VALUE_FORMAT ))->GetValue();
short nType = pDocument->GetFormatTable()->GetType(nIndex);
bool bIsDate = (nType == NUMBERFORMAT_DATE) || (nType == NUMBERFORMAT_TIME) || (nType == NUMBERFORMAT_DATETIME);
bDelete = nValFlags == (bIsDate ? IDF_DATETIME : IDF_VALUE);
@@ -549,18 +549,18 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFla
}
-void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
+void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nDelFlag)
{
// FreeAll darf hier nicht gerufen werden wegen Broadcastern
// Attribute erst am Ende, damit vorher noch zwischen Zahlen und Datum
// unterschieden werden kann (#47901#)
- USHORT nContMask = IDF_CONTENTS;
+ sal_uInt16 nContMask = IDF_CONTENTS;
// IDF_NOCAPTIONS needs to be passed too, if IDF_NOTE is set
if( nDelFlag & IDF_NOTE )
nContMask |= IDF_NOCAPTIONS;
- USHORT nContFlag = nDelFlag & nContMask;
+ sal_uInt16 nContFlag = nDelFlag & nContMask;
if (pItems && nCount>0 && nContFlag)
{
@@ -568,7 +568,7 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
DeleteRange( 0, nCount-1, nContFlag );
else
{
- BOOL bFound=FALSE;
+ sal_Bool bFound=false;
SCSIZE nStartIndex = 0;
SCSIZE nEndIndex = 0;
for (SCSIZE i = 0; i < nCount; i++)
@@ -577,7 +577,7 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
if (!bFound)
{
nStartIndex = i;
- bFound = TRUE;
+ bFound = sal_True;
}
nEndIndex = i;
}
@@ -599,29 +599,29 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
ScFormulaCell* ScColumn::CreateRefCell( ScDocument* pDestDoc, const ScAddress& rDestPos,
- SCSIZE nIndex, USHORT nFlags ) const
+ SCSIZE nIndex, sal_uInt16 nFlags ) const
{
- USHORT nContFlags = nFlags & IDF_CONTENTS;
+ sal_uInt16 nContFlags = nFlags & IDF_CONTENTS;
if (!nContFlags)
return NULL;
// Testen, ob Zelle kopiert werden soll
// auch bei IDF_CONTENTS komplett, wegen Notes / Broadcastern
- BOOL bMatch = FALSE;
+ sal_Bool bMatch = false;
ScBaseCell* pCell = pItems[nIndex].pCell;
CellType eCellType = pCell->GetCellType();
switch ( eCellType )
{
case CELLTYPE_VALUE:
{
- USHORT nValFlags = nFlags & (IDF_DATETIME|IDF_VALUE);
+ sal_uInt16 nValFlags = nFlags & (IDF_DATETIME|IDF_VALUE);
if ( nValFlags == (IDF_DATETIME|IDF_VALUE) )
- bMatch = TRUE;
+ bMatch = sal_True;
else if ( nValFlags )
{
- ULONG nNumIndex = (ULONG)((SfxUInt32Item*)GetAttr(
+ sal_uLong nNumIndex = (sal_uLong)((SfxUInt32Item*)GetAttr(
pItems[nIndex].nRow, ATTR_VALUE_FORMAT ))->GetValue();
short nTyp = pDocument->GetFormatTable()->GetType(nNumIndex);
if ((nTyp == NUMBERFORMAT_DATE) || (nTyp == NUMBERFORMAT_TIME) || (nTyp == NUMBERFORMAT_DATETIME))
@@ -649,7 +649,7 @@ ScFormulaCell* ScColumn::CreateRefCell( ScDocument* pDestDoc, const ScAddress& r
aRef.nRow = pItems[nIndex].nRow;
aRef.nTab = nTab;
aRef.InitFlags(); // -> alles absolut
- aRef.SetFlag3D(TRUE);
+ aRef.SetFlag3D(true);
//! 3D(FALSE) und TabRel(TRUE), wenn die endgueltige Position auf der selben Tabelle ist?
//! (bei TransposeClip ist die Zielposition noch nicht bekannt)
@@ -667,7 +667,7 @@ ScFormulaCell* ScColumn::CreateRefCell( ScDocument* pDestDoc, const ScAddress& r
// nRow1, nRow2 = Zielposition
void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
- USHORT nInsFlag, bool bAsLink, bool bSkipAttrForEmpty,
+ sal_uInt16 nInsFlag, bool bAsLink, bool bSkipAttrForEmpty,
ScColumn& rColumn)
{
if ((nInsFlag & IDF_ATTRIB) != 0)
@@ -725,7 +725,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
// nRow wird angepasst
aRef.nTab = rColumn.nTab;
aRef.InitFlags(); // -> alles absolut
- aRef.SetFlag3D(TRUE);
+ aRef.SetFlag3D(true);
for (SCROW nDestRow = nRow1; nDestRow <= nRow2; nDestRow++)
{
@@ -757,12 +757,12 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
// IDF_ADDNOTES must be passed without other content flags than IDF_NOTE
bool bAddNotes = (nInsFlag & (IDF_CONTENTS | IDF_ADDNOTES)) == (IDF_NOTE | IDF_ADDNOTES);
- BOOL bAtEnd = FALSE;
+ sal_Bool bAtEnd = false;
for (SCSIZE i = 0; i < nColCount && !bAtEnd; i++)
{
SCsROW nDestRow = rColumn.pItems[i].nRow + nDy;
if ( nDestRow > (SCsROW) nRow2 )
- bAtEnd = TRUE;
+ bAtEnd = sal_True;
else if ( nDestRow >= (SCsROW) nRow1 )
{
// rows at the beginning may be skipped if filtered rows are left out,
@@ -816,7 +816,7 @@ bool lclCanCloneValue( ScDocument& rDoc, const ScColumn& rCol, SCROW nRow, bool
return bCloneValue;
// check number format of value cell
- ULONG nNumIndex = (ULONG)((SfxUInt32Item*)rCol.GetAttr( nRow, ATTR_VALUE_FORMAT ))->GetValue();
+ sal_uLong nNumIndex = (sal_uLong)((SfxUInt32Item*)rCol.GetAttr( nRow, ATTR_VALUE_FORMAT ))->GetValue();
short nTyp = rDoc.GetFormatTable()->GetType( nNumIndex );
bool bIsDateTime = (nTyp == NUMBERFORMAT_DATE) || (nTyp == NUMBERFORMAT_TIME) || (nTyp == NUMBERFORMAT_DATETIME);
return bIsDateTime ? bCloneDateTime : bCloneValue;
@@ -825,7 +825,7 @@ bool lclCanCloneValue( ScDocument& rDoc, const ScColumn& rCol, SCROW nRow, bool
} // namespace
-ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestDoc, const ScAddress& rDestPos)
+ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, sal_uInt16 nFlags, ScDocument& rDestDoc, const ScAddress& rDestPos)
{
bool bCloneValue = (nFlags & IDF_VALUE) != 0;
bool bCloneDateTime = (nFlags & IDF_DATETIME) != 0;
@@ -878,7 +878,7 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD
// ins Undo-Dokument immer nur die Original-Zelle kopieren,
// aus Formeln keine Value/String-Zellen erzeugen
ScFormulaCell& rForm = (ScFormulaCell&)rSource;
- USHORT nErr = rForm.GetErrCode();
+ sal_uInt16 nErr = rForm.GetErrCode();
if ( nErr )
{
// error codes are cloned with values
@@ -940,7 +940,7 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD
}
-void ScColumn::MixMarked( const ScMarkData& rMark, USHORT nFunction,
+void ScColumn::MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction,
bool bSkipEmpty, ScColumn& rSrcCol )
{
SCROW nRow1, nRow2;
@@ -956,9 +956,9 @@ void ScColumn::MixMarked( const ScMarkData& rMark, USHORT nFunction,
// Ergebnis in rVal1
-BOOL lcl_DoFunction( double& rVal1, double nVal2, USHORT nFunction )
+sal_Bool lcl_DoFunction( double& rVal1, double nVal2, sal_uInt16 nFunction )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
switch (nFunction)
{
case PASTE_ADD:
@@ -999,7 +999,7 @@ void lcl_AddCode( ScTokenArray& rArr, ScFormulaCell* pCell )
void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
- USHORT nFunction, bool bSkipEmpty,
+ sal_uInt16 nFunction, bool bSkipEmpty,
ScColumn& rSrcCol )
{
SCSIZE nSrcCount = rSrcCol.nCount;
@@ -1025,7 +1025,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
ScBaseCell* pSrc = NULL;
ScBaseCell* pDest = NULL;
ScBaseCell* pNew = NULL;
- BOOL bDelete = FALSE;
+ sal_Bool bDelete = false;
if ( nSrcIndex < nSrcCount && nNextSrc == nRow )
pSrc = rSrcCol.pItems[nSrcIndex].pCell;
@@ -1038,8 +1038,8 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
CellType eSrcType = pSrc ? pSrc->GetCellType() : CELLTYPE_NONE;
CellType eDestType = pDest ? pDest->GetCellType() : CELLTYPE_NONE;
- BOOL bSrcEmpty = ( eSrcType == CELLTYPE_NONE || eSrcType == CELLTYPE_NOTE );
- BOOL bDestEmpty = ( eDestType == CELLTYPE_NONE || eDestType == CELLTYPE_NOTE );
+ sal_Bool bSrcEmpty = ( eSrcType == CELLTYPE_NONE || eSrcType == CELLTYPE_NOTE );
+ sal_Bool bDestEmpty = ( eDestType == CELLTYPE_NONE || eDestType == CELLTYPE_NOTE );
if ( bSkipEmpty && bDestEmpty ) // Originalzelle wiederherstellen
{
@@ -1063,12 +1063,12 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
// leere Zellen werden als Werte behandelt
- BOOL bSrcVal = ( bSrcEmpty || eSrcType == CELLTYPE_VALUE );
- BOOL bDestVal = ( bDestEmpty || eDestType == CELLTYPE_VALUE );
+ sal_Bool bSrcVal = ( bSrcEmpty || eSrcType == CELLTYPE_VALUE );
+ sal_Bool bDestVal = ( bDestEmpty || eDestType == CELLTYPE_VALUE );
- BOOL bSrcText = ( eSrcType == CELLTYPE_STRING ||
+ sal_Bool bSrcText = ( eSrcType == CELLTYPE_STRING ||
eSrcType == CELLTYPE_EDIT );
- BOOL bDestText = ( eDestType == CELLTYPE_STRING ||
+ sal_Bool bDestText = ( eDestType == CELLTYPE_STRING ||
eDestType == CELLTYPE_EDIT );
// sonst bleibt nur Formel...
@@ -1081,7 +1081,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
{
// neuen Wert eintragen, oder Fehler bei Ueberlauf
- BOOL bOk = lcl_DoFunction( nVal1, nVal2, nFunction );
+ sal_Bool bOk = lcl_DoFunction( nVal1, nVal2, nFunction );
if (bOk)
pNew = new ScValueCell( nVal1 );
@@ -1103,7 +1103,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
if (pSrc)
pNew = pSrc->CloneWithoutNote( *pDocument );
else if (pDest)
- bDelete = TRUE;
+ bDelete = sal_True;
}
else
{
@@ -1271,7 +1271,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
return false;
ScBaseCell* pNewCell = NULL;
- BOOL bIsLoading = FALSE;
+ sal_Bool bIsLoading = false;
if (rString.Len() > 0)
{
ScSetStringParam aParam;
@@ -1326,7 +1326,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
else
{
double nVal;
- BOOL bIsText = FALSE;
+ sal_Bool bIsText = false;
if ( bIsLoading )
{
if ( pItems && nCount )
@@ -1345,7 +1345,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
case CELLTYPE_STRING :
((ScStringCell*)pCell)->GetString( aStr );
if ( rString == aStr )
- bIsText = TRUE;
+ bIsText = true;
break;
case CELLTYPE_NOTE : // durch =Formel referenziert
break;
@@ -1386,7 +1386,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
// the old one was the default number, date, time or boolean format.
// Exception: If the new format is boolean, always apply it.
- BOOL bOverwrite = FALSE;
+ sal_Bool bOverwrite = false;
const SvNumberformat* pOldFormat = aParam.mpNumFormatter->GetEntry( nOldIndex );
if ( pOldFormat )
{
@@ -1397,19 +1397,19 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
if ( nOldIndex == aParam.mpNumFormatter->GetStandardFormat(
nOldType, pOldFormat->GetLanguage() ) )
{
- bOverwrite = TRUE; // default of these types can be overwritten
+ bOverwrite = true; // default of these types can be overwritten
}
}
}
if ( !bOverwrite && aParam.mpNumFormatter->GetType( nIndex ) == NUMBERFORMAT_LOGICAL )
{
- bOverwrite = TRUE; // overwrite anything if boolean was detected
+ bOverwrite = true; // overwrite anything if boolean was detected
}
if ( bOverwrite )
{
ApplyAttr( nRow, SfxUInt32Item( ATTR_VALUE_FORMAT,
- (UINT32) nIndex) );
+ (sal_uInt32) nIndex) );
bNumFmtSet = true;
}
}
@@ -1527,11 +1527,11 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
Search( nStartRow, nIndex );
- while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : FALSE )
+ while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : false )
{
ScBaseCell* pCell = pItems[nIndex].pCell;
TypedStrData* pData;
- ULONG nFormat = GetNumberFormat( nRow );
+ sal_uLong nFormat = GetNumberFormat( nRow );
ScCellFormat::GetInputString( pCell, nFormat, aString, *pFormatter );
@@ -1591,11 +1591,11 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
bool ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, bool bLimit)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCSIZE nThisIndex;
- BOOL bThisUsed = Search( nStartRow, nThisIndex );
+ sal_Bool bThisUsed = Search( nStartRow, nThisIndex );
String aString;
- USHORT nCells = 0;
+ sal_uInt16 nCells = 0;
// Die Beschraenkung auf angrenzende Zellen (ohne Luecken) ist nicht mehr gewollt
// (Featurekommission zur 5.1), stattdessen abwechselnd nach oben und unten suchen,
@@ -1625,7 +1625,7 @@ bool ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, b
delete pData; // doppelt
else if ( bLimit && rStrings.GetCount() >= DATENT_MAX )
break; // Maximum erreicht
- bFound = TRUE;
+ bFound = true;
if ( bLimit )
if (++nCells >= DATENT_SEARCH)
@@ -1650,7 +1650,7 @@ bool ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, b
delete pData; // doppelt
else if ( bLimit && rStrings.GetCount() >= DATENT_MAX )
break; // Maximum erreicht
- bFound = TRUE;
+ bFound = true;
if ( bLimit )
if (++nCells >= DATENT_SEARCH)
@@ -1709,7 +1709,7 @@ void ScColumn::RemoveProtected( SCROW nStartRow, SCROW nEndRow )
}
-void ScColumn::SetError( SCROW nRow, const USHORT nError)
+void ScColumn::SetError( SCROW nRow, const sal_uInt16 nError)
{
if (VALIDROW(nRow))
{
@@ -1740,7 +1740,7 @@ void ScColumn::GetString( SCROW nRow, String& rString ) const
ScBaseCell* pCell = pItems[nIndex].pCell;
if (pCell->GetCellType() != CELLTYPE_NOTE)
{
- ULONG nFormat = GetNumberFormat( nRow );
+ sal_uLong nFormat = GetNumberFormat( nRow );
ScCellFormat::GetString( pCell, nFormat, rString, &pColor, *(pDocument->GetFormatTable()) );
}
else
@@ -1759,7 +1759,7 @@ void ScColumn::GetInputString( SCROW nRow, String& rString ) const
ScBaseCell* pCell = pItems[nIndex].pCell;
if (pCell->GetCellType() != CELLTYPE_NOTE)
{
- ULONG nFormat = GetNumberFormat( nRow );
+ sal_uLong nFormat = GetNumberFormat( nRow );
ScCellFormat::GetInputString( pCell, nFormat, rString, *(pDocument->GetFormatTable()) );
}
else
@@ -1823,7 +1823,7 @@ CellType ScColumn::GetCellType( SCROW nRow ) const
}
-USHORT ScColumn::GetErrCode( SCROW nRow ) const
+sal_uInt16 ScColumn::GetErrCode( SCROW nRow ) const
{
SCSIZE nIndex;
if (Search(nRow, nIndex))
@@ -1841,7 +1841,7 @@ bool ScColumn::HasStringData( SCROW nRow ) const
SCSIZE nIndex;
if (Search(nRow, nIndex))
return (pItems[nIndex].pCell)->HasStringData();
- return FALSE;
+ return false;
}
@@ -1850,7 +1850,7 @@ bool ScColumn::HasValueData( SCROW nRow ) const
SCSIZE nIndex;
if (Search(nRow, nIndex))
return (pItems[nIndex].pCell)->HasValueData();
- return FALSE;
+ return false;
}
bool ScColumn::HasStringCells( SCROW nStartRow, SCROW nEndRow ) const
@@ -1865,11 +1865,11 @@ bool ScColumn::HasStringCells( SCROW nStartRow, SCROW nEndRow ) const
{
CellType eType = pItems[nIndex].pCell->GetCellType();
if ( eType == CELLTYPE_STRING || eType == CELLTYPE_EDIT )
- return TRUE;
+ return sal_True;
++nIndex;
}
}
- return FALSE;
+ return false;
}
@@ -1929,7 +1929,7 @@ sal_Int32 ScColumn::GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, CharSet eCh
if ( pCell->GetCellType() != CELLTYPE_NOTE )
{
Color* pColor;
- ULONG nFormat = (ULONG) ((SfxUInt32Item*) GetAttr(
+ sal_uLong nFormat = (sal_uLong) ((SfxUInt32Item*) GetAttr(
nRow, ATTR_VALUE_FORMAT ))->GetValue();
ScCellFormat::GetString( pCell, nFormat, aString, &pColor,
*pNumFmt );
@@ -1983,7 +1983,7 @@ xub_StrLen ScColumn::GetMaxNumberStringLen(
if ( eType == CELLTYPE_VALUE || (eType == CELLTYPE_FORMULA
&& ((ScFormulaCell*)pCell)->IsValue()) )
{
- ULONG nFormat = (ULONG) ((SfxUInt32Item*) GetAttr(
+ sal_uLong nFormat = (sal_uLong) ((SfxUInt32Item*) GetAttr(
nRow, ATTR_VALUE_FORMAT ))->GetValue();
ScCellFormat::GetInputString( pCell, nFormat, aString, *pNumFmt );
xub_StrLen nLen = aString.Len();
@@ -1995,8 +1995,8 @@ xub_StrLen ScColumn::GetMaxNumberStringLen(
sal_uInt16 nPrec;
if (pEntry)
{
- BOOL bThousand, bNegRed;
- USHORT nLeading;
+ sal_Bool bThousand, bNegRed;
+ sal_uInt16 nLeading;
pEntry->GetFormatSpecialInfo(bThousand, bNegRed, nPrec, nLeading);
}
else
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index f48d17c924ca..89abf3beabaa 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -486,11 +486,11 @@ void ScCompressedArrayIterator<A,D>::Follow(
// === Force instantiation of specializations ================================
-template class ScCompressedArray< SCROW, USHORT>; // heights, base class
-template class ScCompressedArray< SCROW, BYTE>; // flags, base class
-template class ScBitMaskCompressedArray< SCROW, BYTE>; // flags
-template void ScCompressedArrayIterator< SCROW, USHORT>::Follow(
- const ScCompressedArrayIterator< SCROW, BYTE>&);
+template class ScCompressedArray< SCROW, sal_uInt16>; // heights, base class
+template class ScCompressedArray< SCROW, sal_uInt8>; // flags, base class
+template class ScBitMaskCompressedArray< SCROW, sal_uInt8>; // flags
+template void ScCompressedArrayIterator< SCROW, sal_uInt16>::Follow(
+ const ScCompressedArrayIterator< SCROW, sal_uInt8>&);
// === EOF ===================================================================
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 1edef532025f..40390816128b 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -55,7 +55,7 @@ SV_IMPL_OP_PTRARR_SORT( ScConditionalFormats_Impl, ScConditionalFormatPtr );
//------------------------------------------------------------------------
-BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion = 0 )
+sal_Bool lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, sal_uInt16 nRecursion = 0 )
{
if (pFormula)
{
@@ -69,7 +69,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
{
ScSingleRefData& rRef2 = static_cast<ScToken*>(t)->GetDoubleRef().Ref2;
if ( rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel() )
- return TRUE;
+ return sal_True;
}
// fall through
@@ -77,7 +77,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
{
ScSingleRefData& rRef1 = static_cast<ScToken*>(t)->GetSingleRef();
if ( rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel() )
- return TRUE;
+ return sal_True;
}
break;
@@ -86,7 +86,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
if( t->GetOpCode() == ocName ) // DB areas always absolute
if( ScRangeData* pRangeData = pDoc->GetRangeName()->findByIndex( t->GetIndex() ) )
if( (nRecursion < 42) && lcl_HasRelRef( pDoc, pRangeData->GetCode(), nRecursion + 1 ) )
- return TRUE;
+ return sal_True;
}
break;
@@ -99,7 +99,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
case ocColumn: // COLUMN() returns own column index
case ocTable: // SHEET() returns own sheet index
case ocCell: // CELL() may return own cell address
- return TRUE;
+ return sal_True;
// break;
default:
{
@@ -116,7 +116,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
}
}
}
- return FALSE;
+ return false;
}
ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) :
@@ -141,7 +141,7 @@ ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) :
pDoc(r.pDoc),
bRelRef1(r.bRelRef1),
bRelRef2(r.bRelRef2),
- bFirstRun(TRUE),
+ bFirstRun(true),
pCondFormat(r.pCondFormat)
{
// ScTokenArray copy ctor erzeugt flache Kopie
@@ -176,7 +176,7 @@ ScConditionEntry::ScConditionEntry( ScDocument* pDocument, const ScConditionEntr
pDoc(pDocument),
bRelRef1(r.bRelRef1),
bRelRef2(r.bRelRef2),
- bFirstRun(TRUE),
+ bFirstRun(true),
pCondFormat(r.pCondFormat)
{
// echte Kopie der Formeln (fuer Ref-Undo)
@@ -202,20 +202,20 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
aStrNmsp2(rExprNmsp2),
eTempGrammar1(eGrammar1),
eTempGrammar2(eGrammar2),
- bIsStr1(FALSE),
- bIsStr2(FALSE),
+ bIsStr1(false),
+ bIsStr2(false),
pFormula1(NULL),
pFormula2(NULL),
aSrcPos(rPos),
pFCell1(NULL),
pFCell2(NULL),
pDoc(pDocument),
- bRelRef1(FALSE),
- bRelRef2(FALSE),
- bFirstRun(TRUE),
+ bRelRef1(false),
+ bRelRef2(false),
+ bFirstRun(true),
pCondFormat(NULL)
{
- Compile( rExpr1, rExpr2, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2, FALSE );
+ Compile( rExpr1, rExpr2, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2, false );
// Formelzellen werden erst bei IsValid angelegt
}
@@ -229,17 +229,17 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
nVal2(0.0),
eTempGrammar1(FormulaGrammar::GRAM_DEFAULT),
eTempGrammar2(FormulaGrammar::GRAM_DEFAULT),
- bIsStr1(FALSE),
- bIsStr2(FALSE),
+ bIsStr1(false),
+ bIsStr2(false),
pFormula1(NULL),
pFormula2(NULL),
aSrcPos(rPos),
pFCell1(NULL),
pFCell2(NULL),
pDoc(pDocument),
- bRelRef1(FALSE),
- bRelRef2(FALSE),
- bFirstRun(TRUE),
+ bRelRef1(false),
+ bRelRef2(false),
+ bFirstRun(true),
pCondFormat(NULL)
{
if ( pArr1 )
@@ -258,7 +258,7 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
}
else if ( pToken->GetType() == svString )
{
- bIsStr1 = TRUE;
+ bIsStr1 = sal_True;
aStrVal1 = pToken->GetString();
DELETEZ(pFormula1); // nicht als Formel merken
}
@@ -282,7 +282,7 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
}
else if ( pToken->GetType() == svString )
{
- bIsStr2 = TRUE;
+ bIsStr2 = sal_True;
aStrVal2 = pToken->GetString();
DELETEZ(pFormula2); // nicht als Formel merken
}
@@ -305,7 +305,7 @@ ScConditionEntry::~ScConditionEntry()
void ScConditionEntry::Compile( const String& rExpr1, const String& rExpr2,
const String& rExprNmsp1, const String& rExprNmsp2,
- FormulaGrammar::Grammar eGrammar1, FormulaGrammar::Grammar eGrammar2, BOOL bTextToReal )
+ FormulaGrammar::Grammar eGrammar1, FormulaGrammar::Grammar eGrammar2, sal_Bool bTextToReal )
{
if ( rExpr1.Len() || rExpr2.Len() )
{
@@ -338,7 +338,7 @@ void ScConditionEntry::Compile( const String& rExpr1, const String& rExpr2,
}
else if ( pToken->GetType() == svString )
{
- bIsStr1 = TRUE;
+ bIsStr1 = sal_True;
aStrVal1 = pToken->GetString();
DELETEZ(pFormula1); // nicht als Formel merken
}
@@ -375,7 +375,7 @@ void ScConditionEntry::Compile( const String& rExpr1, const String& rExpr2,
}
else if ( pToken->GetType() == svString )
{
- bIsStr2 = TRUE;
+ bIsStr2 = sal_True;
aStrVal2 = pToken->GetString();
DELETEZ(pFormula2); // nicht als Formel merken
}
@@ -405,7 +405,7 @@ void ScConditionEntry::MakeCells( const ScAddress& rPos ) // Formelzel
}
}
-void ScConditionEntry::SetIgnoreBlank(BOOL bSet)
+void ScConditionEntry::SetIgnoreBlank(sal_Bool bSet)
{
// Das Bit SC_COND_NOBLANKS wird gesetzt, wenn Blanks nicht ignoriert werden
// (nur bei Gueltigkeit)
@@ -443,7 +443,7 @@ void ScConditionEntry::CompileXML()
Compile( GetExpression(aSrcPos, 0, 0, eTempGrammar1),
GetExpression(aSrcPos, 1, 0, eTempGrammar2),
- aStrNmsp1, aStrNmsp2, eTempGrammar1, eTempGrammar2, TRUE );
+ aStrNmsp1, aStrNmsp2, eTempGrammar1, eTempGrammar2, sal_True );
}
void ScConditionEntry::SetSrcString( const String& rNew )
@@ -474,10 +474,10 @@ void ScConditionEntry::SetFormula2( const ScTokenArray& rArray )
}
}
-void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab, BOOL& rChanged )
+void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab, sal_Bool& rChanged )
{
// Insert table: only update absolute table references.
- // (Similar to ScCompiler::UpdateInsertTab with bIsName=TRUE, result is the same as for named ranges)
+ // (Similar to ScCompiler::UpdateInsertTab with bIsName=sal_True, result is the same as for named ranges)
// For deleting, ScCompiler::UpdateDeleteTab is used because of the handling of invalid references.
rCode.Reset();
@@ -489,7 +489,7 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
{
rRef1.nTab += 1;
rRef1.nRelTab = rRef1.nTab - nPosTab;
- rChanged = TRUE;
+ rChanged = sal_True;
}
if( p->GetType() == svDoubleRef )
{
@@ -498,7 +498,7 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
{
rRef2.nTab += 1;
rRef2.nRelTab = rRef2.nTab - nPosTab;
- rChanged = TRUE;
+ rChanged = sal_True;
}
}
p = static_cast<ScToken*>(rCode.GetNextReference());
@@ -508,11 +508,11 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- BOOL bInsertTab = ( eUpdateRefMode == URM_INSDEL && nDz == 1 );
- BOOL bDeleteTab = ( eUpdateRefMode == URM_INSDEL && nDz == -1 );
+ sal_Bool bInsertTab = ( eUpdateRefMode == URM_INSDEL && nDz == 1 );
+ sal_Bool bDeleteTab = ( eUpdateRefMode == URM_INSDEL && nDz == -1 );
- BOOL bChanged1 = FALSE;
- BOOL bChanged2 = FALSE;
+ sal_Bool bChanged1 = false;
+ sal_Bool bChanged2 = false;
if (pFormula1)
{
@@ -523,7 +523,7 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
ScCompiler aComp( pDoc, aSrcPos, *pFormula1 );
aComp.SetGrammar(pDoc->GetGrammar());
if ( bDeleteTab )
- aComp.UpdateDeleteTab( rRange.aStart.Tab(), FALSE, TRUE, bChanged1 );
+ aComp.UpdateDeleteTab( rRange.aStart.Tab(), false, sal_True, bChanged1 );
else
aComp.UpdateNameReference( eUpdateRefMode, rRange, nDx, nDy, nDz, bChanged1 );
}
@@ -540,7 +540,7 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
ScCompiler aComp( pDoc, aSrcPos, *pFormula2);
aComp.SetGrammar(pDoc->GetGrammar());
if ( bDeleteTab )
- aComp.UpdateDeleteTab( rRange.aStart.Tab(), FALSE, TRUE, bChanged2 );
+ aComp.UpdateDeleteTab( rRange.aStart.Tab(), false, sal_True, bChanged2 );
else
aComp.UpdateNameReference( eUpdateRefMode, rRange, nDx, nDy, nDz, bChanged2 );
}
@@ -556,39 +556,39 @@ void ScConditionEntry::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
ScCompiler aComp( pDoc, aSrcPos, *pFormula1);
aComp.SetGrammar(pDoc->GetGrammar());
- aComp.UpdateMoveTab(nOldPos, nNewPos, TRUE );
+ aComp.UpdateMoveTab(nOldPos, nNewPos, sal_True );
DELETEZ(pFCell1);
}
if (pFormula2)
{
ScCompiler aComp( pDoc, aSrcPos, *pFormula2);
aComp.SetGrammar(pDoc->GetGrammar());
- aComp.UpdateMoveTab(nOldPos, nNewPos, TRUE );
+ aComp.UpdateMoveTab(nOldPos, nNewPos, sal_True );
DELETEZ(pFCell2);
}
}
//! als Vergleichsoperator ans TokenArray ???
-BOOL lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
+sal_Bool lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
{
// verglichen wird nur das nicht-UPN Array
if ( pArr1 && pArr2 )
{
- USHORT nLen = pArr1->GetLen();
+ sal_uInt16 nLen = pArr1->GetLen();
if ( pArr2->GetLen() != nLen )
- return FALSE;
+ return false;
FormulaToken** ppToken1 = pArr1->GetArray();
FormulaToken** ppToken2 = pArr2->GetArray();
- for (USHORT i=0; i<nLen; i++)
+ for (sal_uInt16 i=0; i<nLen; i++)
{
if ( ppToken1[i] != ppToken2[i] &&
!(*ppToken1[i] == *ppToken2[i]) )
- return FALSE; // Unterschied
+ return false; // Unterschied
}
- return TRUE; // alle Eintraege gleich
+ return sal_True; // alle Eintraege gleich
}
else
return !pArr1 && !pArr2; // beide 0 -> gleich
@@ -596,7 +596,7 @@ BOOL lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
int ScConditionEntry::operator== ( const ScConditionEntry& r ) const
{
- BOOL bEq = (eOp == r.eOp && nOptions == r.nOptions &&
+ sal_Bool bEq = (eOp == r.eOp && nOptions == r.nOptions &&
lcl_IsEqual( pFormula1, r.pFormula1 ) &&
lcl_IsEqual( pFormula2, r.pFormula2 ));
if (bEq)
@@ -604,13 +604,13 @@ int ScConditionEntry::operator== ( const ScConditionEntry& r ) const
// for formulas, the reference positions must be compared, too
// (including aSrcString, for inserting the entries during XML import)
if ( ( pFormula1 || pFormula2 ) && ( aSrcPos != r.aSrcPos || aSrcString != r.aSrcString ) )
- bEq = FALSE;
+ bEq = false;
// wenn keine Formeln, Werte vergleichen
if ( !pFormula1 && ( nVal1 != r.nVal1 || aStrVal1 != r.aStrVal1 || bIsStr1 != r.bIsStr1 ) )
- bEq = FALSE;
+ bEq = false;
if ( !pFormula2 && ( nVal2 != r.nVal2 || aStrVal2 != r.aStrVal2 || bIsStr2 != r.bIsStr2 ) )
- bEq = FALSE;
+ bEq = false;
}
return bEq;
@@ -626,7 +626,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
// Formeln auswerten
- BOOL bDirty = FALSE; //! 1 und 2 getrennt ???
+ sal_Bool bDirty = false; //! 1 und 2 getrennt ???
ScFormulaCell* pTemp1 = NULL;
ScFormulaCell* pEff1 = pFCell1;
@@ -641,16 +641,16 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
{
//! Changed statt Dirty abfragen !!!
if (pEff1->GetDirty() && !bRelRef1)
- bDirty = TRUE;
+ bDirty = sal_True;
if (pEff1->IsValue())
{
- bIsStr1 = FALSE;
+ bIsStr1 = false;
nVal1 = pEff1->GetValue();
aStrVal1.Erase();
}
else
{
- bIsStr1 = TRUE;
+ bIsStr1 = sal_True;
pEff1->GetString( aStrVal1 );
nVal1 = 0.0;
}
@@ -670,16 +670,16 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
if (!pEff2->IsRunning()) // keine 522 erzeugen
{
if (pEff2->GetDirty() && !bRelRef2)
- bDirty = TRUE;
+ bDirty = sal_True;
if (pEff2->IsValue())
{
- bIsStr2 = FALSE;
+ bIsStr2 = false;
nVal2 = pEff2->GetValue();
aStrVal2.Erase();
}
else
{
- bIsStr2 = TRUE;
+ bIsStr2 = sal_True;
pEff2->GetString( aStrVal2 );
nVal2 = 0.0;
}
@@ -696,12 +696,12 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
DataChanged( NULL ); // alles
}
- bFirstRun = FALSE;
+ bFirstRun = false;
}
-static BOOL lcl_GetCellContent( ScBaseCell* pCell, BOOL bIsStr1, double& rArg, String& rArgStr )
+static sal_Bool lcl_GetCellContent( ScBaseCell* pCell, sal_Bool bIsStr1, double& rArg, String& rArgStr )
{
- BOOL bVal = TRUE;
+ sal_Bool bVal = true;
if ( pCell )
{
@@ -723,7 +723,7 @@ static BOOL lcl_GetCellContent( ScBaseCell* pCell, BOOL bIsStr1, double& rArg, S
break;
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
- bVal = FALSE;
+ bVal = false;
if ( eType == CELLTYPE_STRING )
((ScStringCell*)pCell)->GetString(rArgStr);
else
@@ -738,12 +738,12 @@ static BOOL lcl_GetCellContent( ScBaseCell* pCell, BOOL bIsStr1, double& rArg, S
if( !pCell )
if( bIsStr1 )
- bVal = FALSE; // leere Zellen je nach Bedingung
+ bVal = false; // leere Zellen je nach Bedingung
return bVal;
}
-static BOOL lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String& rStr, const ScAddress& rAddr, const ScRangeListRef& rRanges )
+static sal_Bool lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String& rStr, const ScAddress& rAddr, const ScRangeListRef& rRanges )
{
size_t nListCount = rRanges->size();
for( size_t i = 0; i < nListCount; i++ )
@@ -764,36 +764,36 @@ static BOOL lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String& rStr,
if( !pCell )
continue;
- if( !lcl_GetCellContent( pCell, FALSE, nVal, aStr ) )
+ if( !lcl_GetCellContent( pCell, false, nVal, aStr ) )
{
if( rStr.Len() &&
( ScGlobal::GetCollator()->compareString( rStr, aStr ) == COMPARE_EQUAL ) )
- return TRUE;
+ return true;
}
else
{
if( !rStr.Len() && ::rtl::math::approxEqual( nArg, nVal ) )
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
-BOOL ScConditionEntry::IsValid( double nArg, const ScAddress& rAddr ) const
+sal_Bool ScConditionEntry::IsValid( double nArg, const ScAddress& rAddr ) const
{
// Interpret muss schon gerufen sein
if ( bIsStr1 )
{
- // wenn auf String getestet wird, bei Zahlen immer FALSE, ausser bei "ungleich"
+ // wenn auf String getestet wird, bei Zahlen immer sal_False, ausser bei "ungleich"
return ( eOp == SC_COND_NOTEQUAL );
}
if ( eOp == SC_COND_BETWEEN || eOp == SC_COND_NOTBETWEEN )
if ( bIsStr2 )
- return FALSE;
+ return false;
double nComp1 = nVal1; // Kopie, damit vertauscht werden kann
double nComp2 = nVal2;
@@ -807,11 +807,11 @@ BOOL ScConditionEntry::IsValid( double nArg, const ScAddress& rAddr ) const
// Alle Grenzfaelle muessen per ::rtl::math::approxEqual getestet werden!
- BOOL bValid = FALSE;
+ sal_Bool bValid = false;
switch (eOp)
{
case SC_COND_NONE:
- break; // immer FALSE;
+ break; // immer sal_False;
case SC_COND_EQUAL:
bValid = ::rtl::math::approxEqual( nArg, nComp1 );
break;
@@ -858,9 +858,9 @@ BOOL ScConditionEntry::IsValid( double nArg, const ScAddress& rAddr ) const
return bValid;
}
-BOOL ScConditionEntry::IsValidStr( const String& rArg, const ScAddress& rAddr ) const
+sal_Bool ScConditionEntry::IsValidStr( const String& rArg, const ScAddress& rAddr ) const
{
- BOOL bValid = FALSE;
+ sal_Bool bValid = false;
// Interpret muss schon gerufen sein
if ( eOp == SC_COND_DIRECT ) // Formel ist unabhaengig vom Inhalt
@@ -884,7 +884,7 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg, const ScAddress& rAddr )
return ( eOp == SC_COND_NOTEQUAL );
if ( eOp == SC_COND_BETWEEN || eOp == SC_COND_NOTBETWEEN )
if ( !bIsStr2 )
- return FALSE;
+ return false;
String aUpVal1( aStrVal1 ); //! als Member? (dann auch in Interpret setzen)
String aUpVal2( aStrVal2 );
@@ -937,7 +937,7 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg, const ScAddress& rAddr )
// SC_COND_DIRECT schon oben abgefragt
default:
OSL_FAIL("unbekannte Operation bei ScConditionEntry");
- bValid = FALSE;
+ bValid = false;
break;
}
}
@@ -945,21 +945,21 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg, const ScAddress& rAddr )
return bValid;
}
-BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) const
+sal_Bool ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) const
{
((ScConditionEntry*)this)->Interpret(rPos); // Formeln auswerten
double nArg = 0.0;
String aArgStr;
- BOOL bVal = lcl_GetCellContent( pCell, bIsStr1, nArg, aArgStr );
+ sal_Bool bVal = lcl_GetCellContent( pCell, bIsStr1, nArg, aArgStr );
if (bVal)
return IsValid( nArg, rPos );
else
return IsValidStr( aArgStr, rPos );
}
-String ScConditionEntry::GetExpression( const ScAddress& rCursor, USHORT nIndex,
- ULONG nNumFmt,
+String ScConditionEntry::GetExpression( const ScAddress& rCursor, sal_uInt16 nIndex,
+ sal_uLong nNumFmt,
const FormulaGrammar::Grammar eGrammar ) const
{
String aRet;
@@ -1009,7 +1009,7 @@ String ScConditionEntry::GetExpression( const ScAddress& rCursor, USHORT nIndex,
return aRet;
}
-ScTokenArray* ScConditionEntry::CreateTokenArry( USHORT nIndex ) const
+ScTokenArray* ScConditionEntry::CreateTokenArry( sal_uInt16 nIndex ) const
{
ScTokenArray* pRet = NULL;
ScAddress aAddr;
@@ -1050,7 +1050,7 @@ ScTokenArray* ScConditionEntry::CreateTokenArry( USHORT nIndex ) const
void ScConditionEntry::SourceChanged( const ScAddress& rChanged )
{
- for (USHORT nPass = 0; nPass < 2; nPass++)
+ for (sal_uInt16 nPass = 0; nPass < 2; nPass++)
{
ScTokenArray* pFormula = nPass ? pFormula2 : pFormula1;
if (pFormula)
@@ -1065,7 +1065,7 @@ void ScConditionEntry::SourceChanged( const ScAddress& rChanged )
{
// absolut muss getroffen sein, relativ bestimmt Bereich
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
SCsCOL nCol1;
SCsROW nRow1;
SCsTAB nTab1;
@@ -1140,7 +1140,7 @@ ScAddress ScConditionEntry::GetValidSrcPos() const
SCTAB nMinTab = aSrcPos.Tab();
SCTAB nMaxTab = nMinTab;
- for (USHORT nPass = 0; nPass < 2; nPass++)
+ for (sal_uInt16 nPass = 0; nPass < 2; nPass++)
{
ScTokenArray* pFormula = nPass ? pFormula2 : pFormula1;
if (pFormula)
@@ -1191,7 +1191,7 @@ void ScConditionEntry::DataChanged( const ScRange* /* pModified */ ) const
bool ScConditionEntry::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
- for (USHORT nPass = 0; !bAllMarked && nPass < 2; nPass++)
+ for (sal_uInt16 nPass = 0; !bAllMarked && nPass < 2; nPass++)
{
ScTokenArray* pFormula = nPass ? pFormula2 : pFormula1;
if (pFormula)
@@ -1275,7 +1275,7 @@ ScConditionalFormat::ScConditionalFormat(const ScConditionalFormat& r) :
if (nEntryCount)
{
ppEntries = new ScCondFormatEntry*[nEntryCount];
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
{
ppEntries[i] = new ScCondFormatEntry(*r.ppEntries[i]);
ppEntries[i]->SetParent(this);
@@ -1297,7 +1297,7 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const
if (nEntryCount)
{
pNew->ppEntries = new ScCondFormatEntry*[nEntryCount];
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
{
pNew->ppEntries[i] = new ScCondFormatEntry( pNewDoc, *ppEntries[i] );
pNew->ppEntries[i]->SetParent(pNew);
@@ -1309,21 +1309,21 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const
return pNew;
}
-BOOL ScConditionalFormat::EqualEntries( const ScConditionalFormat& r ) const
+sal_Bool ScConditionalFormat::EqualEntries( const ScConditionalFormat& r ) const
{
if ( nEntryCount != r.nEntryCount )
- return FALSE;
+ return false;
//! auf gleiche Eintraege in anderer Reihenfolge testen ???
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
if ( ! (*ppEntries[i] == *r.ppEntries[i]) )
- return FALSE;
+ return false;
if( *pRanges != *r.pRanges )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
void ScConditionalFormat::AddRangeInfo( const ScRangeListRef& rRanges )
@@ -1336,7 +1336,7 @@ void ScConditionalFormat::AddRangeInfo( const ScRangeListRef& rRanges )
void ScConditionalFormat::AddEntry( const ScCondFormatEntry& rNew )
{
ScCondFormatEntry** ppNew = new ScCondFormatEntry*[nEntryCount+1];
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppNew[i] = ppEntries[i];
ppNew[nEntryCount] = new ScCondFormatEntry(rNew);
ppNew[nEntryCount]->SetParent(this);
@@ -1347,14 +1347,14 @@ void ScConditionalFormat::AddEntry( const ScCondFormatEntry& rNew )
ScConditionalFormat::~ScConditionalFormat()
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
delete ppEntries[i];
delete[] ppEntries;
delete pAreas;
}
-const ScCondFormatEntry* ScConditionalFormat::GetEntry( USHORT nPos ) const
+const ScCondFormatEntry* ScConditionalFormat::GetEntry( sal_uInt16 nPos ) const
{
if ( nPos < nEntryCount )
return ppEntries[nPos];
@@ -1364,14 +1364,14 @@ const ScCondFormatEntry* ScConditionalFormat::GetEntry( USHORT nPos ) const
const String& ScConditionalFormat::GetCellStyle( ScBaseCell* pCell, const ScAddress& rPos ) const
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
if ( ppEntries[i]->IsCellValid( pCell, rPos ) )
return ppEntries[i]->GetStyle();
return EMPTY_STRING;
}
-void lcl_Extend( ScRange& rRange, ScDocument* pDoc, BOOL bLines )
+void lcl_Extend( ScRange& rRange, ScDocument* pDoc, sal_Bool bLines )
{
SCTAB nTab = rRange.aStart.Tab();
DBG_ASSERT(rRange.aEnd.Tab() == nTab, "lcl_Extend - mehrere Tabellen?");
@@ -1381,7 +1381,7 @@ void lcl_Extend( ScRange& rRange, ScDocument* pDoc, BOOL bLines )
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bEx = pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
+ sal_Bool bEx = pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
if (bLines)
{
@@ -1398,7 +1398,7 @@ void lcl_Extend( ScRange& rRange, ScDocument* pDoc, BOOL bLines )
}
}
-BOOL lcl_CutRange( ScRange& rRange, const ScRange& rOther )
+sal_Bool lcl_CutRange( ScRange& rRange, const ScRange& rOther )
{
rRange.Justify();
ScRange aCmpRange = rOther;
@@ -1424,10 +1424,10 @@ BOOL lcl_CutRange( ScRange& rRange, const ScRange& rOther )
if ( rRange.aEnd.Tab() > aCmpRange.aEnd.Tab() )
rRange.aEnd.SetTab( aCmpRange.aEnd.Tab() );
- return TRUE;
+ return sal_True;
}
- return FALSE; // ausserhalb
+ return false; // ausserhalb
}
void ScConditionalFormat::DoRepaint( const ScRange* pModified )
@@ -1437,9 +1437,9 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
{
// Rahmen/Schatten enthalten?
// (alle Bedingungen testen)
- BOOL bExtend = FALSE;
- BOOL bRotate = FALSE;
- BOOL bAttrTested = FALSE;
+ sal_Bool bExtend = false;
+ sal_Bool bRotate = false;
+ sal_Bool bAttrTested = false;
if (!pAreas) // RangeList ggf. holen
{
@@ -1449,11 +1449,11 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
for (size_t i = 0, nCount = pAreas->size(); i < nCount; i++ )
{
ScRange aRange = *(*pAreas)[i];
- BOOL bDo = TRUE;
+ sal_Bool bDo = true;
if ( pModified )
{
if ( !lcl_CutRange( aRange, *pModified ) )
- bDo = FALSE;
+ bDo = false;
}
if (bDo)
{
@@ -1462,7 +1462,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
// Look at the style's content only if the repaint is necessary
// for any condition, to avoid the time-consuming Find() if there are many
// conditional formats and styles.
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aStyle = ppEntries[nEntry]->GetStyle();
if (aStyle.Len())
@@ -1472,20 +1472,20 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
if ( pStyleSheet )
{
const SfxItemSet& rSet = pStyleSheet->GetItemSet();
- if (rSet.GetItemState( ATTR_BORDER, TRUE ) == SFX_ITEM_SET ||
- rSet.GetItemState( ATTR_SHADOW, TRUE ) == SFX_ITEM_SET)
+ if (rSet.GetItemState( ATTR_BORDER, sal_True ) == SFX_ITEM_SET ||
+ rSet.GetItemState( ATTR_SHADOW, sal_True ) == SFX_ITEM_SET)
{
- bExtend = TRUE;
+ bExtend = sal_True;
}
- if (rSet.GetItemState( ATTR_ROTATE_VALUE, TRUE ) == SFX_ITEM_SET ||
- rSet.GetItemState( ATTR_ROTATE_MODE, TRUE ) == SFX_ITEM_SET)
+ if (rSet.GetItemState( ATTR_ROTATE_VALUE, sal_True ) == SFX_ITEM_SET ||
+ rSet.GetItemState( ATTR_ROTATE_MODE, sal_True ) == SFX_ITEM_SET)
{
- bRotate = TRUE;
+ bRotate = sal_True;
}
}
}
}
- bAttrTested = TRUE;
+ bAttrTested = sal_True;
}
lcl_Extend( aRange, pDoc, bExtend ); // zusammengefasste und bExtend
@@ -1507,7 +1507,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
}
}
- pSh->Broadcast( ScPaintHint( aRange, PAINT_GRID ) );
+ pDoc->RepaintRange( aRange );
}
}
}
@@ -1521,20 +1521,20 @@ void ScConditionalFormat::InvalidateArea()
void ScConditionalFormat::CompileAll()
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->CompileAll();
}
void ScConditionalFormat::CompileXML()
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->CompileXML();
}
void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->UpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz);
delete pAreas; // aus dem AttrArray kommt beim Einfuegen/Loeschen kein Aufruf
@@ -1543,14 +1543,14 @@ void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
void ScConditionalFormat::RenameCellStyle(const String& rOld, const String& rNew)
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
if ( ppEntries[i]->GetStyle() == rOld )
ppEntries[i]->UpdateStyleName( rNew );
}
void ScConditionalFormat::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->UpdateMoveTab( nOldPos, nNewPos );
delete pAreas; // aus dem AttrArray kommt beim Einfuegen/Loeschen kein Aufruf
@@ -1559,14 +1559,14 @@ void ScConditionalFormat::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
void ScConditionalFormat::SourceChanged( const ScAddress& rAddr )
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->SourceChanged( rAddr );
}
bool ScConditionalFormat::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
- for (USHORT i=0; !bAllMarked && i<nEntryCount; i++)
+ for (sal_uInt16 i=0; !bAllMarked && i<nEntryCount; i++)
bAllMarked = ppEntries[i]->MarkUsedExternalReferences();
return bAllMarked;
}
@@ -1578,9 +1578,9 @@ ScConditionalFormatList::ScConditionalFormatList(const ScConditionalFormatList&
{
// fuer Ref-Undo - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone() );
//! sortierte Eintraege aus rList schneller einfuegen ???
@@ -1591,23 +1591,23 @@ ScConditionalFormatList::ScConditionalFormatList(ScDocument* pNewDoc,
{
// fuer neues Dokument - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone(pNewDoc) );
//! sortierte Eintraege aus rList schneller einfuegen ???
}
-BOOL ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const
+sal_Bool ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const
{
// fuer Ref-Undo - interne Variablen werden nicht verglichen
- USHORT nCount = Count();
- BOOL bEqual = ( nCount == r.Count() );
- for (USHORT i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
+ sal_uInt16 nCount = Count();
+ sal_Bool bEqual = ( nCount == r.Count() );
+ for (sal_uInt16 i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
if ( !(*this)[i]->EqualEntries(*r[i]) ) // Eintraege unterschiedlich ?
- bEqual = FALSE;
+ bEqual = false;
return bEqual;
}
@@ -1616,8 +1616,8 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
{
//! binaer suchen
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*this)[i]->GetKey() == nKey)
return (*this)[i];
@@ -1627,52 +1627,52 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
void ScConditionalFormatList::CompileAll()
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->CompileAll();
}
void ScConditionalFormatList::CompileXML()
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->CompileXML();
}
void ScConditionalFormatList::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz );
}
void ScConditionalFormatList::RenameCellStyle( const String& rOld, const String& rNew )
{
- ULONG nCount=Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uLong nCount=Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->RenameCellStyle(rOld,rNew);
}
void ScConditionalFormatList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateMoveTab( nOldPos, nNewPos );
}
void ScConditionalFormatList::SourceChanged( const ScAddress& rAddr )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->SourceChanged( rAddr );
}
bool ScConditionalFormatList::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
- USHORT nCount = Count();
- for (USHORT i=0; !bAllMarked && i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; !bAllMarked && i<nCount; i++)
bAllMarked = (*this)[i]->MarkUsedExternalReferences();
return bAllMarked;
}
diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx
index 7e0f8b7ebb82..15f08ec01112 100644
--- a/sc/source/core/data/dbdocutl.cxx
+++ b/sc/source/core/data/dbdocutl.cxx
@@ -58,14 +58,14 @@ ScDatabaseDocUtil::StrData::StrData() :
void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
const uno::Reference<sdbc::XRow>& xRow, long nRowPos,
- long nType, BOOL bCurrency, StrData* pStrData )
+ long nType, sal_Bool bCurrency, StrData* pStrData )
{
String aString;
double nVal = 0.0;
- BOOL bValue = FALSE;
- BOOL bEmptyFlag = FALSE;
- BOOL bError = FALSE;
- ULONG nFormatIndex = 0;
+ sal_Bool bValue = false;
+ sal_Bool bEmptyFlag = false;
+ sal_Bool bError = false;
+ sal_uLong nFormatIndex = 0;
//! wasNull calls only if null value was found?
@@ -80,7 +80,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
NUMBERFORMAT_LOGICAL, ScGlobal::eLnge );
nVal = (xRow->getBoolean(nRowPos) ? 1 : 0);
bEmptyFlag = ( nVal == 0.0 ) && xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
break;
case sdbc::DataType::TINYINT:
@@ -95,7 +95,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
//! do the conversion here?
nVal = xRow->getDouble(nRowPos);
bEmptyFlag = ( nVal == 0.0 ) && xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
break;
case sdbc::DataType::CHAR:
@@ -115,7 +115,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
nVal = Date( aDate.Day, aDate.Month, aDate.Year ) -
*pFormTable->GetNullDate();
bEmptyFlag = xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
}
break;
@@ -129,7 +129,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
nVal = ( aTime.Hours * 3600 + aTime.Minutes * 60 +
aTime.Seconds + aTime.HundredthSeconds / 100.0 ) / D_TIMEFACTOR;
bEmptyFlag = xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
}
break;
@@ -145,24 +145,24 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
( aStamp.Hours * 3600 + aStamp.Minutes * 60 +
aStamp.Seconds + aStamp.HundredthSeconds / 100.0 ) / D_TIMEFACTOR;
bEmptyFlag = xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
}
break;
case sdbc::DataType::SQLNULL:
- bEmptyFlag = TRUE;
+ bEmptyFlag = sal_True;
break;
case sdbc::DataType::BINARY:
case sdbc::DataType::VARBINARY:
case sdbc::DataType::LONGVARBINARY:
default:
- bError = TRUE; // unknown type
+ bError = sal_True; // unknown type
}
}
catch ( uno::Exception& )
{
- bError = TRUE;
+ bError = sal_True;
}
if ( bValue && bCurrency )
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index fc9fd39f1d04..c8602214f506 100644..100755
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -62,7 +62,7 @@ namespace {
void lcl_toUpper(OUString& rStr)
{
- rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast<USHORT>(rStr.getLength()));
+ rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast<sal_uInt16>(rStr.getLength()));
}
}
@@ -91,7 +91,7 @@ ScDocumentIterator::~ScDocumentIterator()
{
}
-BOOL ScDocumentIterator::GetThisCol()
+sal_Bool ScDocumentIterator::GetThisCol()
{
ScTable* pTab;
while ( (pTab = pDoc->pTab[nTab]) == NULL )
@@ -100,14 +100,14 @@ BOOL ScDocumentIterator::GetThisCol()
{
nCol = MAXCOL;
nRow = MAXROW;
- return FALSE;
+ return false;
}
++nTab;
}
ScColumn* pCol = &pTab->aCol[nCol];
ScAttrArray* pAtt = pCol->pAttrArray;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
do
{
SCROW nColRow;
@@ -131,13 +131,13 @@ BOOL ScDocumentIterator::GetThisCol()
if (nColRow == nRow)
{
- bFound = TRUE;
+ bFound = sal_True;
pCell = pCol->pItems[nColPos].pCell;
pPattern = pAtt->pData[nAttrPos].pPattern;
}
else if ( pAtt->pData[nAttrPos].pPattern != pDefPattern )
{
- bFound = TRUE;
+ bFound = sal_True;
pCell = NULL;
pPattern = pAtt->pData[nAttrPos].pPattern;
}
@@ -151,15 +151,15 @@ BOOL ScDocumentIterator::GetThisCol()
return bFound;
}
-BOOL ScDocumentIterator::GetThis()
+sal_Bool ScDocumentIterator::GetThis()
{
- BOOL bEnd = FALSE;
- BOOL bSuccess = FALSE;
+ sal_Bool bEnd = false;
+ sal_Bool bSuccess = false;
while ( !bSuccess && !bEnd )
{
if ( nRow > MAXROW )
- bSuccess = FALSE;
+ bSuccess = false;
else
bSuccess = GetThisCol();
@@ -171,7 +171,7 @@ BOOL ScDocumentIterator::GetThis()
nCol = 0;
++nTab;
if (nTab > nEndTab)
- bEnd = TRUE;
+ bEnd = sal_True;
}
nRow = 0;
nColPos = 0;
@@ -182,7 +182,7 @@ BOOL ScDocumentIterator::GetThis()
return !bEnd;
}
-BOOL ScDocumentIterator::GetFirst()
+sal_Bool ScDocumentIterator::GetFirst()
{
nCol = 0;
nTab = nStartTab;
@@ -194,7 +194,7 @@ BOOL ScDocumentIterator::GetFirst()
return GetThis();
}
-BOOL ScDocumentIterator::GetNext()
+sal_Bool ScDocumentIterator::GetNext()
{
++nRow;
@@ -223,7 +223,7 @@ void ScDocumentIterator::GetPos( SCCOL& rCol, SCROW& rRow, SCTAB& rTab )
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr,
+void lcl_IterGetNumberFormat( sal_uLong& nFormat, const ScAttrArray*& rpArr,
SCROW& nAttrEndRow, const ScAttrArray* pNewArr, SCROW nRow,
ScDocument* pDoc )
{
@@ -239,7 +239,7 @@ void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr,
}
ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
- BOOL bSTotal, BOOL bTextZero ) :
+ sal_Bool bSTotal, sal_Bool bTextZero ) :
pDoc( pDocument ),
nNumFmtIndex(0),
nStartCol( rRange.aStart.Col() ),
@@ -249,9 +249,9 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
nEndRow( rRange.aEnd.Row() ),
nEndTab( rRange.aEnd.Tab() ),
nNumFmtType( NUMBERFORMAT_UNDEFINED ),
- bNumValid( FALSE ),
+ bNumValid( false ),
bSubTotal(bSTotal),
- bNextValid( FALSE ),
+ bNextValid( false ),
bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ),
bTextAsZero( bTextZero )
{
@@ -277,7 +277,7 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
nAttrEndRow = 0;
}
-BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
+sal_Bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
{
ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
for (;;)
@@ -296,7 +296,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
// rValue = 0.0; //! do not change caller's value!
rErr = 0;
- return FALSE; // Ende und Aus
+ return false; // Ende und Aus
}
}
pCol = &(pDoc->pTab[nTab])->aCol[nCol];
@@ -318,7 +318,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
case CELLTYPE_VALUE:
{
- bNumValid = FALSE;
+ bNumValid = false;
rValue = ((ScValueCell*)pCell)->GetValue();
rErr = 0;
--nRow;
@@ -339,7 +339,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
fNextValue = ((ScValueCell*)pCol->pItems[nColRow].pCell)->GetValue();
nNextRow = pCol->pItems[nColRow].nRow;
- bNextValid = TRUE;
+ bNextValid = sal_True;
if ( bCalcAsShown )
{
lcl_IterGetNumberFormat( nNumFormat, pAttrArray,
@@ -348,7 +348,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
}
}
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
// break;
case CELLTYPE_FORMULA:
@@ -360,15 +360,15 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
rValue = ((ScFormulaCell*)pCell)->GetValue();
nRow--;
- bNumValid = FALSE;
- return TRUE; // gefunden
+ bNumValid = false;
+ return sal_True; // gefunden
}
else if ( bTextAsZero )
{
rValue = 0.0;
nRow--;
- bNumValid = FALSE;
- return TRUE;
+ bNumValid = false;
+ return sal_True;
}
}
}
@@ -382,9 +382,9 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
rValue = 0.0;
nNumFmtType = NUMBERFORMAT_NUMBER;
nNumFmtIndex = 0;
- bNumValid = TRUE;
+ bNumValid = sal_True;
--nRow;
- return TRUE;
+ return sal_True;
}
}
break;
@@ -400,7 +400,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
}
}
-void ScValueIterator::GetCurNumFmtInfo( short& nType, ULONG& nIndex )
+void ScValueIterator::GetCurNumFmtInfo( short& nType, sal_uLong& nIndex )
{
if (!bNumValid)
{
@@ -427,13 +427,13 @@ void ScValueIterator::GetCurNumFmtInfo( short& nType, ULONG& nIndex )
}
else
nNumFmtType = pDoc->GetFormatTable()->GetType( nNumFmtIndex );
- bNumValid = TRUE;
+ bNumValid = sal_True;
}
nType = nNumFmtType;
nIndex = nNumFmtIndex;
}
-BOOL ScValueIterator::GetFirst(double& rValue, USHORT& rErr)
+sal_Bool ScValueIterator::GetFirst(double& rValue, sal_uInt16& rErr)
{
nCol = nStartCol;
nRow = nStartRow;
@@ -572,7 +572,7 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
nNumFmtType = NUMBERFORMAT_NUMBER;
nNumFmtIndex = 0;
rValue.mnError = 0;
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
// break;
case CELLTYPE_FORMULA:
@@ -585,7 +585,7 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
nNumFmtIndex, ScAddress( nCol, nRow, nTab ),
pCell );
rValue.mnError = ((ScFormulaCell*)pCell)->GetErrCode();
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
else
nRow++;
@@ -913,7 +913,7 @@ bool ScDBQueryDataIterator::GetNext(Value& rValue)
ScCellIterator::ScCellIterator( ScDocument* pDocument,
SCCOL nSCol, SCROW nSRow, SCTAB nSTab,
- SCCOL nECol, SCROW nERow, SCTAB nETab, BOOL bSTotal ) :
+ SCCOL nECol, SCROW nERow, SCTAB nETab, sal_Bool bSTotal ) :
pDoc( pDocument ),
nStartCol( nSCol),
nStartRow( nSRow),
@@ -955,7 +955,7 @@ ScCellIterator::ScCellIterator( ScDocument* pDocument,
}
ScCellIterator::ScCellIterator
- ( ScDocument* pDocument, const ScRange& rRange, BOOL bSTotal ) :
+ ( ScDocument* pDocument, const ScRange& rRange, sal_Bool bSTotal ) :
pDoc( pDocument ),
nStartCol( rRange.aStart.Col() ),
nStartRow( rRange.aStart.Row() ),
@@ -1064,14 +1064,14 @@ ScBaseCell* ScCellIterator::GetNext()
//-------------------------------------------------------------------------------
ScQueryCellIterator::ScQueryCellIterator(ScDocument* pDocument, SCTAB nTable,
- const ScQueryParam& rParam, BOOL bMod ) :
+ const ScQueryParam& rParam, sal_Bool bMod ) :
aParam (rParam),
pDoc( pDocument ),
nTab( nTable),
nStopOnMismatch( nStopOnMismatchDisabled ),
nTestEqualCondition( nTestEqualConditionDisabled ),
- bAdvanceQuery( FALSE ),
- bIgnoreMismatchOnLeadingStrings( FALSE )
+ bAdvanceQuery( false ),
+ bIgnoreMismatchOnLeadingStrings( false )
{
nCol = aParam.nCol1;
nRow = aParam.nRow1;
@@ -1141,7 +1141,7 @@ ScBaseCell* ScQueryCellIterator::GetThis()
++nRow;
else
{
- BOOL bTestEqualCondition;
+ sal_Bool bTestEqualCondition;
if ( (pDoc->pTab[nTab])->ValidQuery( nRow, aParam, NULL,
(nCol == static_cast<SCCOL>(nFirstQueryField) ? pCell : NULL),
(nTestEqualCondition ? &bTestEqualCondition : NULL) ) )
@@ -1232,14 +1232,14 @@ void ScQueryCellIterator::AdvanceQueryParamEntryField()
}
-BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
- SCROW& nFoundRow, BOOL bSearchForEqualAfterMismatch,
- BOOL bIgnoreMismatchOnLeadingStringsP )
+sal_Bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
+ SCROW& nFoundRow, sal_Bool bSearchForEqualAfterMismatch,
+ sal_Bool bIgnoreMismatchOnLeadingStringsP )
{
nFoundCol = MAXCOL+1;
nFoundRow = MAXROW+1;
- SetStopOnMismatch( TRUE ); // assume sorted keys
- SetTestEqualCondition( TRUE );
+ SetStopOnMismatch( sal_True ); // assume sorted keys
+ SetTestEqualCondition( sal_True );
bIgnoreMismatchOnLeadingStrings = bIgnoreMismatchOnLeadingStringsP;
bool bRegExp = aParam.bRegExp && aParam.GetEntry(0).bQueryByString;
bool bBinary = !bRegExp && aParam.bByRow && (aParam.GetEntry(0).eOp ==
@@ -1291,8 +1291,8 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
break; // for
}
SCSIZE nColRowSave;
- bIgnoreMismatchOnLeadingStrings = FALSE;
- SetTestEqualCondition( FALSE );
+ bIgnoreMismatchOnLeadingStrings = false;
+ SetTestEqualCondition( false );
do
{
nFoundCol = GetCol();
@@ -1303,7 +1303,7 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
nCol = nFoundCol;
nRow = nFoundRow;
nColRow = nColRowSave;
- return TRUE;
+ return sal_True;
}
if ( (bSearchForEqualAfterMismatch || aParam.bRegExp) &&
StoppedOnMismatch() )
@@ -1331,8 +1331,8 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
else
break; // for
}
- SetStopOnMismatch( FALSE );
- SetTestEqualCondition( FALSE );
+ SetStopOnMismatch( false );
+ SetTestEqualCondition( false );
if (GetNext())
{
// Last of a consecutive area, avoid searching the entire parameter
@@ -1344,7 +1344,7 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
nFoundCol = GetCol();
nFoundRow = GetRow();
nColRowSave = nColRow;
- SetStopOnMismatch( TRUE );
+ SetStopOnMismatch( sal_True );
} while (GetNext());
nCol = nFoundCol;
nRow = nFoundRow;
@@ -1382,7 +1382,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
pItems[nLo].pCell->HasStringData())
{
String aCellStr;
- ULONG nFormat = pCol->GetNumberFormat( pItems[nLo].nRow);
+ sal_uLong nFormat = pCol->GetNumberFormat( pItems[nLo].nRow);
ScCellFormat::GetInputString( pItems[nLo].pCell, nFormat, aCellStr,
rFormatter);
sal_Int32 nTmp = pCollator->compareString( aCellStr, *rEntry.pStr);
@@ -1412,7 +1412,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
pCell = pItems[nLastInRange].pCell;
if (pCell->HasStringData())
{
- ULONG nFormat = pCol->GetNumberFormat( pItems[nLastInRange].nRow);
+ sal_uLong nFormat = pCol->GetNumberFormat( pItems[nLastInRange].nRow);
ScCellFormat::GetInputString( pCell, nFormat, aLastInRangeString,
rFormatter);
}
@@ -1453,7 +1453,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
bDone = true;
continue; // while
}
- BOOL bStr = pItems[i].pCell->HasStringData();
+ sal_Bool bStr = pItems[i].pCell->HasStringData();
nRes = 0;
// compares are content<query:-1, content>query:1
// Cell value comparison similar to ScTable::ValidQuery()
@@ -1514,7 +1514,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
else if (bStr && bByString)
{
String aCellStr;
- ULONG nFormat = pCol->GetNumberFormat( pItems[i].nRow);
+ sal_uLong nFormat = pCol->GetNumberFormat( pItems[i].nRow);
ScCellFormat::GetInputString( pItems[i].pCell, nFormat, aCellStr,
rFormatter);
nRes = pCollator->compareString( aCellStr, *rEntry.pStr);
@@ -1632,7 +1632,7 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB
nEndRow( nRow2 ),
nCol( nCol1 ),
nRow( nRow1 ),
- bMore( TRUE )
+ bMore( sal_True )
{
SCCOL i;
SCSIZE nIndex;
@@ -1696,7 +1696,7 @@ ScBaseCell* ScHorizontalCellIterator::GetNext( SCCOL& rCol, SCROW& rRow )
return NULL;
}
-BOOL ScHorizontalCellIterator::ReturnNext( SCCOL& rCol, SCROW& rRow )
+sal_Bool ScHorizontalCellIterator::ReturnNext( SCCOL& rCol, SCROW& rRow )
{
rCol = nCol;
rRow = nRow;
@@ -1705,14 +1705,14 @@ BOOL ScHorizontalCellIterator::ReturnNext( SCCOL& rCol, SCROW& rRow )
void ScHorizontalCellIterator::Advance()
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL i;
for (i=nCol+1; i<=nEndCol && !bFound; i++)
if (pNextRows[i-nStartCol] == nRow)
{
nCol = i;
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
@@ -1728,12 +1728,12 @@ void ScHorizontalCellIterator::Advance()
if (nMinRow <= nEndRow)
{
nRow = nMinRow;
- bFound = TRUE;
+ bFound = sal_True;
}
}
if ( !bFound )
- bMore = FALSE;
+ bMore = false;
}
//-------------------------------------------------------------------------------
@@ -1753,14 +1753,14 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB
nRow = nStartRow;
nCol = nStartCol;
- bRowEmpty = FALSE;
+ bRowEmpty = false;
pIndices = new SCSIZE[nEndCol-nStartCol+1];
pNextEnd = new SCROW[nEndCol-nStartCol+1];
ppPatterns = new const ScPatternAttr*[nEndCol-nStartCol+1];
SCROW nSkipTo = MAXROW;
- BOOL bEmpty = TRUE;
+ sal_Bool bEmpty = sal_True;
for (i=nStartCol; i<=nEndCol; i++)
{
SCCOL nPos = i - nStartCol;
@@ -1779,7 +1779,7 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB
nSkipTo = nThisEnd; // nSkipTo kann gleich hier gesetzt werden
}
else
- bEmpty = FALSE; // Attribute gefunden
+ bEmpty = false; // Attribute gefunden
pIndices[nPos] = nIndex;
pNextEnd[nPos] = nThisEnd;
@@ -1828,7 +1828,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
if ( nRow > nEndRow ) // schon am Ende?
return NULL; // nichts gefunden
- BOOL bEmpty = TRUE;
+ sal_Bool bEmpty = sal_True;
SCCOL i;
for ( i = nStartCol; i <= nEndCol; i++)
@@ -1846,7 +1846,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
if ( IsDefaultItem( pPattern ) )
pPattern = NULL;
else
- bEmpty = FALSE; // Attribute gefunden
+ bEmpty = false; // Attribute gefunden
pNextEnd[nPos] = nThisEnd;
ppPatterns[nPos] = pPattern;
@@ -1861,7 +1861,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
}
}
else if ( ppPatterns[nPos] )
- bEmpty = FALSE; // Bereich noch nicht zuende
+ bEmpty = false; // Bereich noch nicht zuende
}
if (bEmpty)
@@ -1880,7 +1880,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
//-------------------------------------------------------------------------------
-inline BOOL IsGreater( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
+inline sal_Bool IsGreater( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
return ( nRow1 > nRow2 ) || ( nRow1 == nRow2 && nCol1 > nCol2 );
}
@@ -1900,7 +1900,7 @@ ScUsedAreaIterator::~ScUsedAreaIterator()
{
}
-BOOL ScUsedAreaIterator::GetNext()
+sal_Bool ScUsedAreaIterator::GetNext()
{
// Iteratoren weiterzaehlen
@@ -1918,8 +1918,8 @@ BOOL ScUsedAreaIterator::GetNext()
// naechsten Abschnitt heraussuchen
- BOOL bFound = TRUE;
- BOOL bUseCell = FALSE;
+ sal_Bool bFound = sal_True;
+ sal_Bool bUseCell = false;
if ( pCell && pPattern )
{
@@ -1936,7 +1936,7 @@ BOOL ScUsedAreaIterator::GetNext()
}
else
{
- bUseCell = TRUE;
+ bUseCell = sal_True;
if ( nAttrRow == nCellRow && nAttrCol1 == nCellCol ) // Attribute auf der Zelle ?
pFoundPattern = pPattern;
else
@@ -1946,7 +1946,7 @@ BOOL ScUsedAreaIterator::GetNext()
else if ( pCell ) // nur Zelle -> direkt uebernehmen
{
pFoundPattern = NULL;
- bUseCell = TRUE; // Position von Zelle
+ bUseCell = sal_True; // Position von Zelle
}
else if ( pPattern ) // nur Attribute -> direkt uebernehmen
{
@@ -1957,7 +1957,7 @@ BOOL ScUsedAreaIterator::GetNext()
nFoundEndCol = nAttrCol2;
}
else // gar nichts
- bFound = FALSE;
+ bFound = false;
if ( bUseCell ) // Position von Zelle
{
@@ -2100,7 +2100,7 @@ void ScDocRowHeightUpdater::updateAll()
ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount);
Fraction aZoom(1, 1);
- ULONG nProgressStart = 0;
+ sal_uLong nProgressStart = 0;
for (SCTAB nTab = 0; nTab <= MAXTAB; ++nTab)
{
if (!ValidTab(nTab) || !mrDoc.pTab[nTab])
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 86e98e238337..cb9b8044efc3 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -80,17 +80,17 @@
// STATIC DATA -----------------------------------------------------------
-USHORT* ScDocumentPool::pVersionMap1 = 0;
-USHORT* ScDocumentPool::pVersionMap2 = 0;
-USHORT* ScDocumentPool::pVersionMap3 = 0;
-USHORT* ScDocumentPool::pVersionMap4 = 0;
-USHORT* ScDocumentPool::pVersionMap5 = 0;
-USHORT* ScDocumentPool::pVersionMap6 = 0;
-USHORT* ScDocumentPool::pVersionMap7 = 0;
-USHORT* ScDocumentPool::pVersionMap8 = 0;
-USHORT* ScDocumentPool::pVersionMap9 = 0;
-USHORT* ScDocumentPool::pVersionMap10 = 0;
-USHORT* ScDocumentPool::pVersionMap11 = 0;
+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;
// ATTR_FONT_TWOLINES (not used) was changed to ATTR_USERDEF (not saved in binary format) in 641c
@@ -191,7 +191,7 @@ static SfxItemInfo const aItemInfos[] =
// -----------------------------------------------------------------------
-ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
+ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, sal_Bool bLoadRefCounts )
: SfxItemPool ( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScDocumentPool")),
ATTR_STARTINDEX, ATTR_ENDINDEX,
@@ -223,9 +223,9 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
pGlobalBorderInnerAttr->SetLine(NULL, BOXINFO_LINE_HORI);
pGlobalBorderInnerAttr->SetLine(NULL, BOXINFO_LINE_VERT);
- pGlobalBorderInnerAttr->SetTable(TRUE);
- pGlobalBorderInnerAttr->SetDist(TRUE);
- pGlobalBorderInnerAttr->SetMinDist(FALSE);
+ pGlobalBorderInnerAttr->SetTable(sal_True);
+ pGlobalBorderInnerAttr->SetDist(sal_True);
+ pGlobalBorderInnerAttr->SetMinDist(false);
ppPoolDefaults = new SfxPoolItem*[ATTR_ENDINDEX-ATTR_STARTINDEX+1];
@@ -236,8 +236,8 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
ppPoolDefaults[ ATTR_FONT_UNDERLINE - ATTR_STARTINDEX ] = new SvxUnderlineItem( UNDERLINE_NONE, ATTR_FONT_UNDERLINE );
ppPoolDefaults[ ATTR_FONT_OVERLINE - ATTR_STARTINDEX ] = new SvxOverlineItem( UNDERLINE_NONE, ATTR_FONT_OVERLINE );
ppPoolDefaults[ ATTR_FONT_CROSSEDOUT - ATTR_STARTINDEX ] = new SvxCrossedOutItem( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT );
- ppPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( sal_False, ATTR_FONT_CONTOUR );
- ppPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( sal_False, ATTR_FONT_SHADOWED );
+ ppPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR );
+ ppPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED );
ppPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( Color(COL_AUTO), ATTR_FONT_COLOR );
ppPoolDefaults[ ATTR_FONT_LANGUAGE - ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), ATTR_FONT_LANGUAGE );
ppPoolDefaults[ ATTR_CJK_FONT - ATTR_STARTINDEX ] = pCjkFont;
@@ -254,18 +254,18 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
ATTR_CTL_FONT_LANGUAGE );
ppPoolDefaults[ ATTR_FONT_EMPHASISMARK-ATTR_STARTINDEX ] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE, ATTR_FONT_EMPHASISMARK );
ppPoolDefaults[ ATTR_USERDEF - ATTR_STARTINDEX ] = new SvXMLAttrContainerItem( ATTR_USERDEF );
- ppPoolDefaults[ ATTR_FONT_WORDLINE - ATTR_STARTINDEX ] = new SvxWordLineModeItem(sal_False, ATTR_FONT_WORDLINE );
+ ppPoolDefaults[ ATTR_FONT_WORDLINE - ATTR_STARTINDEX ] = new SvxWordLineModeItem(false, ATTR_FONT_WORDLINE );
ppPoolDefaults[ ATTR_FONT_RELIEF - ATTR_STARTINDEX ] = new SvxCharReliefItem( RELIEF_NONE, ATTR_FONT_RELIEF );
ppPoolDefaults[ ATTR_HYPHENATE - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_HYPHENATE );
- ppPoolDefaults[ ATTR_SCRIPTSPACE - ATTR_STARTINDEX ] = new SvxScriptSpaceItem( sal_False, ATTR_SCRIPTSPACE);
- ppPoolDefaults[ ATTR_HANGPUNCTUATION - ATTR_STARTINDEX ] = new SvxHangingPunctuationItem( sal_False, ATTR_HANGPUNCTUATION);
- ppPoolDefaults[ ATTR_FORBIDDEN_RULES - ATTR_STARTINDEX ] = new SvxForbiddenRuleItem( sal_False, ATTR_FORBIDDEN_RULES);
+ ppPoolDefaults[ ATTR_SCRIPTSPACE - ATTR_STARTINDEX ] = new SvxScriptSpaceItem( false, ATTR_SCRIPTSPACE);
+ ppPoolDefaults[ ATTR_HANGPUNCTUATION - ATTR_STARTINDEX ] = new SvxHangingPunctuationItem( false, ATTR_HANGPUNCTUATION);
+ ppPoolDefaults[ ATTR_FORBIDDEN_RULES - ATTR_STARTINDEX ] = new SvxForbiddenRuleItem( false, ATTR_FORBIDDEN_RULES);
ppPoolDefaults[ ATTR_HOR_JUSTIFY - ATTR_STARTINDEX ] = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY);
ppPoolDefaults[ ATTR_HOR_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SVX_JUSTIFY_METHOD_AUTO, ATTR_HOR_JUSTIFY_METHOD);
ppPoolDefaults[ ATTR_INDENT - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_INDENT, 0 );
ppPoolDefaults[ ATTR_VER_JUSTIFY - ATTR_STARTINDEX ] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY);
ppPoolDefaults[ ATTR_VER_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SVX_JUSTIFY_METHOD_AUTO, ATTR_VER_JUSTIFY_METHOD);
- ppPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, FALSE );
+ ppPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, false );
ppPoolDefaults[ ATTR_ROTATE_VALUE - ATTR_STARTINDEX ] = new SfxInt32Item( ATTR_ROTATE_VALUE, 0 );
ppPoolDefaults[ ATTR_ROTATE_MODE - ATTR_STARTINDEX ] = new SvxRotateModeItem( SVX_ROTATE_MODE_BOTTOM, ATTR_ROTATE_MODE );
ppPoolDefaults[ ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_VERTICAL_ASIAN );
@@ -311,16 +311,16 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
ppPoolDefaults[ ATTR_PAGE_MAXSIZE - ATTR_STARTINDEX ] = new SvxSizeItem( ATTR_PAGE_MAXSIZE );
ppPoolDefaults[ ATTR_PAGE_HORCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HORCENTER );
ppPoolDefaults[ ATTR_PAGE_VERCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_VERCENTER );
- ppPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, TRUE );
- ppPoolDefaults[ ATTR_PAGE_DYNAMIC - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_DYNAMIC, TRUE );
- ppPoolDefaults[ ATTR_PAGE_SHARED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_SHARED, TRUE );
- ppPoolDefaults[ ATTR_PAGE_NOTES - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NOTES, FALSE );
- ppPoolDefaults[ ATTR_PAGE_GRID - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_GRID, FALSE );
- ppPoolDefaults[ ATTR_PAGE_HEADERS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HEADERS, FALSE );
+ ppPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, sal_True );
+ ppPoolDefaults[ ATTR_PAGE_DYNAMIC - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_DYNAMIC, sal_True );
+ ppPoolDefaults[ ATTR_PAGE_SHARED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_SHARED, sal_True );
+ ppPoolDefaults[ ATTR_PAGE_NOTES - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NOTES, false );
+ ppPoolDefaults[ ATTR_PAGE_GRID - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_GRID, false );
+ ppPoolDefaults[ ATTR_PAGE_HEADERS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HEADERS, false );
ppPoolDefaults[ ATTR_PAGE_CHARTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_CHARTS );
ppPoolDefaults[ ATTR_PAGE_OBJECTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_OBJECTS );
ppPoolDefaults[ ATTR_PAGE_DRAWINGS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_DRAWINGS );
- ppPoolDefaults[ ATTR_PAGE_TOPDOWN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_TOPDOWN, TRUE );
+ ppPoolDefaults[ ATTR_PAGE_TOPDOWN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_TOPDOWN, sal_True );
ppPoolDefaults[ ATTR_PAGE_SCALE - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALE, 100 );
ppPoolDefaults[ ATTR_PAGE_SCALETOPAGES-ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALETOPAGES, 1 );
ppPoolDefaults[ ATTR_PAGE_FIRSTPAGENO- ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 1 );
@@ -334,8 +334,8 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
ppPoolDefaults[ ATTR_PAGE_FOOTERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT );
ppPoolDefaults[ ATTR_PAGE_HEADERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_HEADERSET, aSetItemItemSet );
ppPoolDefaults[ ATTR_PAGE_FOOTERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_FOOTERSET, aSetItemItemSet );
- ppPoolDefaults[ ATTR_PAGE_FORMULAS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_FORMULAS, FALSE );
- ppPoolDefaults[ ATTR_PAGE_NULLVALS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NULLVALS, TRUE );
+ ppPoolDefaults[ ATTR_PAGE_FORMULAS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_FORMULAS, false );
+ ppPoolDefaults[ ATTR_PAGE_NULLVALS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NULLVALS, sal_True );
ppPoolDefaults[ ATTR_PAGE_SCALETO - ATTR_STARTINDEX ] = new ScPageScaleToItem( 1, 1 );
SetDefaults( ppPoolDefaults );
@@ -384,7 +384,7 @@ ScDocumentPool::~ScDocumentPool()
{
Delete();
- for ( USHORT i=0; i < ATTR_ENDINDEX-ATTR_STARTINDEX+1; i++ )
+ for ( sal_uInt16 i=0; i < ATTR_ENDINDEX-ATTR_STARTINDEX+1; i++ )
{
SetRefCount( *ppPoolDefaults[i], 0 );
delete ppPoolDefaults[i];
@@ -408,12 +408,12 @@ void ScDocumentPool::InitVersionMaps()
// erste Map: ATTR_LANGUAGE_FORMAT ab sv329 eingefuegt
- const USHORT nMap1Start = 100; // alter ATTR_STARTINDEX
- const USHORT nMap1End = 157; // alter ATTR_ENDINDEX
- const USHORT nMap1Count = nMap1End - nMap1Start + 1;
- const USHORT nMap1New = 18; // ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX
- pVersionMap1 = new USHORT [ nMap1Count ];
- USHORT i, j;
+ const sal_uInt16 nMap1Start = 100; // alter ATTR_STARTINDEX
+ const sal_uInt16 nMap1End = 157; // alter ATTR_ENDINDEX
+ const sal_uInt16 nMap1Count = nMap1End - nMap1Start + 1;
+ const sal_uInt16 nMap1New = 18; // ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX
+ pVersionMap1 = new sal_uInt16 [ nMap1Count ];
+ sal_uInt16 i, j;
for ( i=0, j=nMap1Start; i < nMap1New; i++, j++ )
pVersionMap1[i] = j;
// ein Eintrag eingefuegt...
@@ -422,11 +422,11 @@ void ScDocumentPool::InitVersionMaps()
// zweite Map: ATTR_VALIDDATA und ATTR_CONDITIONAL ab 341 eingefuegt
- const USHORT nMap2Start = 100; // ATTR_STARTINDEX
- const USHORT nMap2End = 158; // ATTR_ENDINDEX
- const USHORT nMap2Count = nMap2End - nMap2Start + 1;
- const USHORT nMap2New = 24; // ATTR_VALIDDATA - ATTR_STARTINDEX
- pVersionMap2 = new USHORT [ nMap2Count ];
+ const sal_uInt16 nMap2Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap2End = 158; // ATTR_ENDINDEX
+ const sal_uInt16 nMap2Count = nMap2End - nMap2Start + 1;
+ const sal_uInt16 nMap2New = 24; // ATTR_VALIDDATA - ATTR_STARTINDEX
+ pVersionMap2 = new sal_uInt16 [ nMap2Count ];
for ( i=0, j=nMap2Start; i < nMap2New; i++, j++ )
pVersionMap2[i] = j;
// zwei Eintraege eingefuegt...
@@ -435,11 +435,11 @@ void ScDocumentPool::InitVersionMaps()
// dritte Map: ATTR_INDENT ab 350 eingefuegt
- const USHORT nMap3Start = 100; // ATTR_STARTINDEX
- const USHORT nMap3End = 160; // ATTR_ENDINDEX
- const USHORT nMap3Count = nMap3End - nMap3Start + 1;
- const USHORT nMap3New = 11; // ATTR_INDENT - ATTR_STARTINDEX
- pVersionMap3 = new USHORT [ nMap3Count ];
+ const sal_uInt16 nMap3Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap3End = 160; // ATTR_ENDINDEX
+ const sal_uInt16 nMap3Count = nMap3End - nMap3Start + 1;
+ const sal_uInt16 nMap3New = 11; // ATTR_INDENT - ATTR_STARTINDEX
+ pVersionMap3 = new sal_uInt16 [ nMap3Count ];
for ( i=0, j=nMap3Start; i < nMap3New; i++, j++ )
pVersionMap3[i] = j;
// ein Eintrag eingefuegt...
@@ -448,11 +448,11 @@ void ScDocumentPool::InitVersionMaps()
// vierte Map: ATTR_ROTATE_VALUE und ATTR_ROTATE_MODE ab 367 eingefuegt
- const USHORT nMap4Start = 100; // ATTR_STARTINDEX
- const USHORT nMap4End = 161; // ATTR_ENDINDEX
- const USHORT nMap4Count = nMap4End - nMap4Start + 1;
- const USHORT nMap4New = 14; // ATTR_ROTATE_VALUE - ATTR_STARTINDEX
- pVersionMap4 = new USHORT [ nMap4Count ];
+ const sal_uInt16 nMap4Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap4End = 161; // ATTR_ENDINDEX
+ const sal_uInt16 nMap4Count = nMap4End - nMap4Start + 1;
+ const sal_uInt16 nMap4New = 14; // ATTR_ROTATE_VALUE - ATTR_STARTINDEX
+ pVersionMap4 = new sal_uInt16 [ nMap4Count ];
for ( i=0, j=nMap4Start; i < nMap4New; i++, j++ )
pVersionMap4[i] = j;
// zwei Eintraege eingefuegt...
@@ -461,11 +461,11 @@ void ScDocumentPool::InitVersionMaps()
// fifth map: CJK..., CTL..., EMPHASISMARK, TWOLINES (12 items) added in 614
- const USHORT nMap5Start = 100; // ATTR_STARTINDEX
- const USHORT nMap5End = 163; // ATTR_ENDINDEX
- const USHORT nMap5Count = nMap5End - nMap5Start + 1;
- const USHORT nMap5New = 10; // ATTR_CJK_FONT - ATTR_STARTINDEX
- pVersionMap5 = new USHORT [ nMap5Count ];
+ const sal_uInt16 nMap5Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap5End = 163; // ATTR_ENDINDEX
+ const sal_uInt16 nMap5Count = nMap5End - nMap5Start + 1;
+ const sal_uInt16 nMap5New = 10; // ATTR_CJK_FONT - ATTR_STARTINDEX
+ pVersionMap5 = new sal_uInt16 [ nMap5Count ];
for ( i=0, j=nMap5Start; i < nMap5New; i++, j++ )
pVersionMap5[i] = j;
// 12 entries inserted
@@ -474,11 +474,11 @@ void ScDocumentPool::InitVersionMaps()
// sixth map: ATTR_SCRIPTSPACE, ATTR_HANGPUNCTUATION, ATTR_FORBIDDEN_RULES added in 614d
- const USHORT nMap6Start = 100; // ATTR_STARTINDEX
- const USHORT nMap6End = 175; // ATTR_ENDINDEX
- const USHORT nMap6Count = nMap6End - nMap6Start + 1;
- const USHORT nMap6New = 22; // ATTR_SCRIPTSPACE - ATTR_STARTINDEX
- pVersionMap6 = new USHORT [ nMap6Count ];
+ const sal_uInt16 nMap6Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap6End = 175; // ATTR_ENDINDEX
+ const sal_uInt16 nMap6Count = nMap6End - nMap6Start + 1;
+ const sal_uInt16 nMap6New = 22; // ATTR_SCRIPTSPACE - ATTR_STARTINDEX
+ pVersionMap6 = new sal_uInt16 [ nMap6Count ];
for ( i=0, j=nMap6Start; i < nMap6New; i++, j++ )
pVersionMap6[i] = j;
// 3 entries inserted
@@ -487,11 +487,11 @@ void ScDocumentPool::InitVersionMaps()
// seventh map: ATTR_FONT_WORDLINE, ATTR_FONT_RELIEF, ATTR_HYPHENATE added in 632b
- const USHORT nMap7Start = 100; // ATTR_STARTINDEX
- const USHORT nMap7End = 178; // ATTR_ENDINDEX
- const USHORT nMap7Count = nMap7End - nMap7Start + 1;
- const USHORT nMap7New = 22; // ATTR_FONT_WORDLINE - ATTR_STARTINDEX
- pVersionMap7 = new USHORT [ nMap7Count ];
+ const sal_uInt16 nMap7Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap7End = 178; // ATTR_ENDINDEX
+ const sal_uInt16 nMap7Count = nMap7End - nMap7Start + 1;
+ const sal_uInt16 nMap7New = 22; // ATTR_FONT_WORDLINE - ATTR_STARTINDEX
+ pVersionMap7 = new sal_uInt16 [ nMap7Count ];
for ( i=0, j=nMap7Start; i < nMap7New; i++, j++ )
pVersionMap7[i] = j;
// 3 entries inserted
@@ -500,11 +500,11 @@ void ScDocumentPool::InitVersionMaps()
// eighth map: ATTR_VERTICAL_ASIAN added in 642q
- const USHORT nMap8Start = 100; // ATTR_STARTINDEX
- const USHORT nMap8End = 181; // ATTR_ENDINDEX
- const USHORT nMap8Count = nMap8End - nMap8Start + 1;
- const USHORT nMap8New = 34; // ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX
- pVersionMap8 = new USHORT [ nMap8Count ];
+ const sal_uInt16 nMap8Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap8End = 181; // ATTR_ENDINDEX
+ const sal_uInt16 nMap8Count = nMap8End - nMap8Start + 1;
+ const sal_uInt16 nMap8New = 34; // ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX
+ pVersionMap8 = new sal_uInt16 [ nMap8Count ];
for ( i=0, j=nMap8Start; i < nMap8New; i++, j++ )
pVersionMap8[i] = j;
// 1 entry inserted
@@ -513,11 +513,11 @@ void ScDocumentPool::InitVersionMaps()
// 9th map: ATTR_WRITINGDIR added in 643y
- const USHORT nMap9Start = 100; // ATTR_STARTINDEX
- const USHORT nMap9End = 182; // ATTR_ENDINDEX
- const USHORT nMap9Count = nMap9End - nMap9Start + 1;
- const USHORT nMap9New = 35; // ATTR_WRITINGDIR - ATTR_STARTINDEX
- pVersionMap9 = new USHORT [ nMap9Count ];
+ const sal_uInt16 nMap9Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap9End = 182; // ATTR_ENDINDEX
+ const sal_uInt16 nMap9Count = nMap9End - nMap9Start + 1;
+ const sal_uInt16 nMap9New = 35; // ATTR_WRITINGDIR - ATTR_STARTINDEX
+ pVersionMap9 = new sal_uInt16 [ nMap9Count ];
for ( i=0, j=nMap9Start; i < nMap9New; i++, j++ )
pVersionMap9[i] = j;
// 1 entry inserted
@@ -528,11 +528,11 @@ void ScDocumentPool::InitVersionMaps()
// 10th map: ATTR_SHRINKTOFIT, ATTR_BORDER_TL_BR, ATTR_BORDER_BL_TR added in 680/dr14
- const USHORT nMap10Start = 100; // ATTR_STARTINDEX
- const USHORT nMap10End = 184; // ATTR_ENDINDEX
- const USHORT nMap10Count = nMap10End - nMap10Start + 1;
- const USHORT nMap10New = 37; // ATTR_SHRINKTOFIT - ATTR_STARTINDEX
- pVersionMap10 = new USHORT [ nMap10Count ];
+ const sal_uInt16 nMap10Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap10End = 184; // ATTR_ENDINDEX
+ const sal_uInt16 nMap10Count = nMap10End - nMap10Start + 1;
+ const sal_uInt16 nMap10New = 37; // ATTR_SHRINKTOFIT - ATTR_STARTINDEX
+ pVersionMap10 = new sal_uInt16 [ nMap10Count ];
for ( i=0, j=nMap10Start; i < nMap10New; i++, j++ )
pVersionMap10[i] = j;
// 3 entries inserted
@@ -541,11 +541,11 @@ void ScDocumentPool::InitVersionMaps()
// 11th map: ATTR_FONT_OVERLINE added in DEV300/overline2
- const USHORT nMap11Start = 100; // ATTR_STARTINDEX
- const USHORT nMap11End = 187; // ATTR_ENDINDEX
- const USHORT nMap11Count = nMap11End - nMap11Start + 1;
- const USHORT nMap11New = 5; // ATTR_FONT_OVERLINE - ATTR_STARTINDEX
- pVersionMap11 = new USHORT [ nMap11Count ];
+ const sal_uInt16 nMap11Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap11End = 187; // ATTR_ENDINDEX
+ const sal_uInt16 nMap11Count = nMap11End - nMap11Start + 1;
+ const sal_uInt16 nMap11New = 5; // ATTR_FONT_OVERLINE - ATTR_STARTINDEX
+ pVersionMap11 = new sal_uInt16 [ nMap11Count ];
for ( i=0, j=nMap11Start; i < nMap11New; i++, j++ )
pVersionMap11[i] = j;
// 1 entry inserted
@@ -588,7 +588,7 @@ void ScDocumentPool::DeleteVersionMaps()
// ----------------------------------------------------------------------------------------
//
-// Fuer die Pattern-Attribute (SetItems) kann der USHORT RefCount leicht ueberlaufen
+// Fuer die Pattern-Attribute (SetItems) kann der sal_uInt16 RefCount leicht ueberlaufen
// (z.B. 600 ganze Zeilen abwechselnd formatieren).
// Darum wird der RefCount bei SC_MAX_POOLREF festgehalten und nicht mehr hoch- oder
// heruntergezaehlt. Dieser RefCount wird dann erst beim naechsten Laden neu gezaehlt.
@@ -597,7 +597,7 @@ void ScDocumentPool::DeleteVersionMaps()
// wird (Assertions).
//
-const SfxPoolItem& ScDocumentPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem& ScDocumentPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
if ( rItem.Which() != ATTR_PATTERN ) // nur Pattern ist special
return SfxItemPool::Put( rItem, nWhich );
@@ -616,13 +616,13 @@ void ScDocumentPool::Remove( const SfxPoolItem& rItem )
{
if ( rItem.Which() == ATTR_PATTERN ) // nur Pattern ist special
{
- ULONG nRef = rItem.GetRefCount();
- if ( nRef >= (ULONG) SC_MAX_POOLREF && nRef <= (ULONG) SFX_ITEMS_OLD_MAXREF )
+ sal_uLong nRef = rItem.GetRefCount();
+ if ( nRef >= (sal_uLong) SC_MAX_POOLREF && nRef <= (sal_uLong) SFX_ITEMS_OLD_MAXREF )
{
- if ( nRef != (ULONG) SC_SAFE_POOLREF )
+ if ( nRef != (sal_uLong) SC_SAFE_POOLREF )
{
OSL_FAIL("Wer fummelt da an meinen Ref-Counts herum");
- SetRefCount( (SfxPoolItem&)rItem, (ULONG) SC_SAFE_POOLREF );
+ SetRefCount( (SfxPoolItem&)rItem, (sal_uLong) SC_SAFE_POOLREF );
}
return; // nicht herunterzaehlen
}
@@ -632,14 +632,14 @@ void ScDocumentPool::Remove( const SfxPoolItem& rItem )
void ScDocumentPool::CheckRef( const SfxPoolItem& rItem )
{
- ULONG nRef = rItem.GetRefCount();
- if ( nRef >= (ULONG) SC_MAX_POOLREF && nRef <= (ULONG) SFX_ITEMS_OLD_MAXREF )
+ sal_uLong nRef = rItem.GetRefCount();
+ if ( nRef >= (sal_uLong) SC_MAX_POOLREF && nRef <= (sal_uLong) SFX_ITEMS_OLD_MAXREF )
{
// beim Apply vom Cache wird evtl. um 2 hochgezaehlt (auf MAX+1 oder SAFE+2),
// heruntergezaehlt wird nur einzeln (in LoadCompleted)
- DBG_ASSERT( nRef<=(ULONG)SC_MAX_POOLREF+1 || (nRef>=(ULONG)SC_SAFE_POOLREF-1 && nRef<=(ULONG)SC_SAFE_POOLREF+2),
+ DBG_ASSERT( nRef<=(sal_uLong)SC_MAX_POOLREF+1 || (nRef>=(sal_uLong)SC_SAFE_POOLREF-1 && nRef<=(sal_uLong)SC_SAFE_POOLREF+2),
"ScDocumentPool::CheckRef" );
- SetRefCount( (SfxPoolItem&)rItem, (ULONG) SC_SAFE_POOLREF );
+ SetRefCount( (SfxPoolItem&)rItem, (sal_uLong) SC_SAFE_POOLREF );
}
}
@@ -647,10 +647,10 @@ void ScDocumentPool::CheckRef( const SfxPoolItem& rItem )
void ScDocumentPool::StyleDeleted( ScStyleSheet* pStyle )
{
- USHORT nCount = GetItemCount(ATTR_PATTERN);
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt32 nCount = GetItemCount2(ATTR_PATTERN);
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- ScPatternAttr* pPattern = (ScPatternAttr*)GetItem(ATTR_PATTERN, i);
+ ScPatternAttr* pPattern = (ScPatternAttr*)GetItem2(ATTR_PATTERN, i);
if ( pPattern && pPattern->GetStyleSheet() == pStyle )
pPattern->StyleToName();
}
@@ -663,10 +663,12 @@ void ScDocumentPool::CellStyleCreated( const String& rName )
// Calling StyleSheetChanged isn't enough because the pool may still contain items
// for undo or clipboard content.
- sal_uInt16 nCount = GetItemCount(ATTR_PATTERN);
- for (sal_uInt16 i=0; i<nCount; i++)
+ sal_uInt32 nCount = GetItemCount2(ATTR_PATTERN);
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- ScPatternAttr* pPattern = (ScPatternAttr*)GetItem(ATTR_PATTERN, i);
+ ScPatternAttr *const pPattern =
+ const_cast<ScPatternAttr*>(
+ static_cast<ScPatternAttr const*>(GetItem2(ATTR_PATTERN, i)));
if ( pPattern && pPattern->GetStyleSheet() == NULL )
{
const String* pStyleName = pPattern->GetStyleName();
@@ -678,7 +680,7 @@ void ScDocumentPool::CellStyleCreated( const String& rName )
SfxItemPool* ScDocumentPool::Clone() const
{
- return new SfxItemPool (*this, TRUE);
+ return new SfxItemPool (*this, sal_True);
}
SfxItemPresentation lcl_HFPresentation
@@ -694,9 +696,9 @@ SfxItemPresentation lcl_HFPresentation
const SfxItemSet& rSet = ((const SfxSetItem&)rItem).GetItemSet();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rSet.GetItemState(ATTR_PAGE_ON,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(ATTR_PAGE_ON,false,&pItem) )
{
- if( FALSE == ((const SfxBoolItem*)pItem)->GetValue() )
+ if( false == ((const SfxBoolItem*)pItem)->GetValue() )
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -707,7 +709,7 @@ SfxItemPresentation lcl_HFPresentation
while( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
aText.Erase();
@@ -721,14 +723,14 @@ SfxItemPresentation lcl_HFPresentation
case ATTR_LRSPACE:
{
SvxLRSpaceItem& rLRItem = (SvxLRSpaceItem&)*pItem;
- USHORT nPropLeftMargin = rLRItem.GetPropLeft();
- USHORT nPropRightMargin = rLRItem.GetPropRight();
- USHORT nLeftMargin, nRightMargin;
+ sal_uInt16 nPropLeftMargin = rLRItem.GetPropLeft();
+ sal_uInt16 nPropRightMargin = rLRItem.GetPropRight();
+ sal_uInt16 nLeftMargin, nRightMargin;
long nTmp;
nTmp = rLRItem.GetLeft();
- nLeftMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nLeftMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
nTmp = rLRItem.GetRight();
- nRightMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nRightMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
aText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
if ( 100 != nPropLeftMargin )
@@ -791,7 +793,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
String& rText,
const IntlWrapper* pIntl ) const
{
- USHORT nW = rItem.Which();
+ sal_uInt16 nW = rItem.Which();
String aStrYes ( ScGlobal::GetRscString(STR_YES) );
String aStrNo ( ScGlobal::GetRscString(STR_NO) );
String aStrSep = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(": "));
@@ -904,7 +906,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
case ATTR_PAGE_SCALETOPAGES:
{
- USHORT nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
+ sal_uInt16 nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
if( nPagNo )
{
@@ -937,7 +939,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
case ATTR_PAGE_FIRSTPAGENO:
{
- USHORT nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
+ sal_uInt16 nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
if( nPagNo )
{
@@ -965,7 +967,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
case ATTR_PAGE_SCALE:
{
- USHORT nPercent = ((const SfxUInt16Item&)rItem).GetValue();
+ sal_uInt16 nPercent = ((const SfxUInt16Item&)rItem).GetValue();
if( nPercent )
{
@@ -1030,7 +1032,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
return ePresentation;
}
-SfxMapUnit ScDocumentPool::GetMetric( USHORT nWhich ) const
+SfxMapUnit ScDocumentPool::GetMetric( sal_uInt16 nWhich ) const
{
// eigene Attribute: Twips, alles andere 1/100 mm
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 62998357819f..f1faef8cb736 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -183,39 +183,39 @@ ScDocument::ScDocument( ScDocumentMode eMode,
nVisibleTab( 0 ),
eLinkMode(LM_UNKNOWN),
bAutoCalc( eMode == SCDOCMODE_DOCUMENT ),
- bAutoCalcShellDisabled( FALSE ),
- bForcedFormulaPending( FALSE ),
- bCalculatingFormulaTree( FALSE ),
+ bAutoCalcShellDisabled( false ),
+ bForcedFormulaPending( false ),
+ bCalculatingFormulaTree( false ),
bIsClip( eMode == SCDOCMODE_CLIP ),
bIsUndo( eMode == SCDOCMODE_UNDO ),
- bIsVisible( FALSE ),
- bIsEmbedded( FALSE ),
- bNoSetDirty( FALSE ),
- bInsertingFromOtherDoc( FALSE ),
+ bIsVisible( false ),
+ bIsEmbedded( false ),
+ bNoSetDirty( false ),
+ bInsertingFromOtherDoc( false ),
bLoadingMedium( false ),
bImportingXML( false ),
- bXMLFromWrapper( FALSE ),
- bCalcingAfterLoad( FALSE ),
- bNoListening( FALSE ),
- bIdleDisabled( FALSE ),
- bInLinkUpdate( FALSE ),
- bChartListenerCollectionNeedsUpdate( FALSE ),
- bHasForcedFormulas( FALSE ),
- bInDtorClear( FALSE ),
- bExpandRefs( FALSE ),
- bDetectiveDirty( FALSE ),
+ bXMLFromWrapper( false ),
+ bCalcingAfterLoad( false ),
+ bNoListening( false ),
+ bIdleDisabled( false ),
+ bInLinkUpdate( false ),
+ bChartListenerCollectionNeedsUpdate( false ),
+ bHasForcedFormulas( false ),
+ bInDtorClear( false ),
+ bExpandRefs( false ),
+ bDetectiveDirty( false ),
nMacroCallMode( SC_MACROCALL_ALLOWED ),
- bHasMacroFunc( FALSE ),
+ bHasMacroFunc( false ),
nVisSpellState( 0 ),
nAsianCompression(SC_ASIANCOMPRESSION_INVALID),
nAsianKerning(SC_ASIANKERNING_INVALID),
- bSetDrawDefaults( FALSE ),
- bPastingDrawFromOtherDoc( FALSE ),
+ bSetDrawDefaults( false ),
+ bPastingDrawFromOtherDoc( false ),
nInDdeLinkUpdate( 0 ),
- bInUnoBroadcast( FALSE ),
- bInUnoListenerCall( FALSE ),
+ bInUnoBroadcast( false ),
+ bInUnoListenerCall( false ),
eGrammar( formula::FormulaGrammar::GRAM_NATIVE ),
- bStyleSheetUsageInvalid( TRUE ),
+ bStyleSheetUsageInvalid( sal_True ),
mbUndoEnabled( true ),
mbAdjustHeightEnabled( true ),
mbExecuteLinkEnabled( true ),
@@ -251,7 +251,7 @@ ScDocument::ScDocument( ScDocumentMode eMode,
pTab[i] = NULL;
pRangeName = new ScRangeName(this);
- pDBCollection = new ScDBCollection( 4, 4, FALSE, this );
+ pDBCollection = new ScDBCollection( 4, 4, false, this );
pSelectionAttr = NULL;
pChartCollection = new ScChartCollection;
apTemporaryChartLock = std::auto_ptr< ScTemporaryChartLock >( new ScTemporaryChartLock(this) );
@@ -293,7 +293,7 @@ void ScDocument::SetStorageGrammar( formula::FormulaGrammar::Grammar eGram )
}
-void ScDocument::SetDocVisible( BOOL bSet )
+void ScDocument::SetDocVisible( sal_Bool bSet )
{
// called from view ctor - only for a visible document,
// each new sheet's RTL flag is initialized from the locale
@@ -349,7 +349,7 @@ IMPL_LINK( ScDocument, TrackTimeHdl, Timer*, EMPTYARG )
if (!pShell->IsModified())
{
- pShell->SetModified( TRUE );
+ pShell->SetModified( sal_True );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
{
@@ -372,7 +372,7 @@ ScDocument::~ScDocument()
{
DBG_ASSERT( !bInLinkUpdate, "bInLinkUpdate in dtor" );
- bInDtorClear = TRUE;
+ bInDtorClear = sal_True;
// first of all disable all refresh timers by deleting the control
if ( pRefreshTimerControl )
@@ -387,7 +387,7 @@ ScDocument::~ScDocument()
if ( GetLinkManager() )
{
// BaseLinks freigeben
- for ( USHORT n = pLinkManager->GetServers().Count(); n; )
+ for ( sal_uInt16 n = pLinkManager->GetServers().Count(); n; )
pLinkManager->GetServers()[ --n ]->Closed();
if ( pLinkManager->GetLinks().Count() )
@@ -417,7 +417,7 @@ ScDocument::~ScDocument()
delete pUnoRefUndoList;
delete pUnoListenerCalls;
- Clear( sal_True ); // TRUE = from destructor (needed for SdrModel::ClearModel)
+ Clear( sal_True ); // sal_True = from destructor (needed for SdrModel::ClearModel)
if (pCondFormList)
{
@@ -530,8 +530,8 @@ ScFieldEditEngine& ScDocument::GetEditEngine()
if ( !pEditEngine )
{
pEditEngine = new ScFieldEditEngine( GetEnginePool(), GetEditPool() );
- pEditEngine->SetUpdateMode( FALSE );
- pEditEngine->EnableUndo( FALSE );
+ pEditEngine->SetUpdateMode( false );
+ pEditEngine->EnableUndo( false );
pEditEngine->SetRefMapMode( MAP_100TH_MM );
pEditEngine->SetForbiddenCharsTable( xForbiddenCharacters );
}
@@ -543,8 +543,8 @@ ScNoteEditEngine& ScDocument::GetNoteEngine()
if ( !pNoteEngine )
{
pNoteEngine = new ScNoteEditEngine( GetEnginePool(), GetEditPool() );
- pNoteEngine->SetUpdateMode( FALSE );
- pNoteEngine->EnableUndo( FALSE );
+ pNoteEngine->SetUpdateMode( false );
+ pNoteEngine->EnableUndo( false );
pNoteEngine->SetRefMapMode( MAP_100TH_MM );
pNoteEngine->SetForbiddenCharsTable( xForbiddenCharacters );
const SfxItemSet& rItemSet = GetDefPattern()->GetItemSet();
@@ -600,19 +600,19 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
void ScDocument::DeleteNumberFormat( const sal_uInt32* /* pDelKeys */, sal_uInt32 /* nCount */ )
{
/*
- for (ULONG i = 0; i < nCount; i++)
+ for (sal_uLong i = 0; i < nCount; i++)
xPoolHelper->GetFormTable()->DeleteEntry(pDelKeys[i]);
*/
}
void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
- ScBaseCell* pCell, ULONG nFormatIndex, BOOL bForceTab )
+ ScBaseCell* pCell, sal_uLong nFormatIndex, sal_Bool bForceTab )
{
if (VALIDTAB(nTab))
{
if ( bForceTab && !pTab[nTab] )
{
- BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+ sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
pTab[nTab] = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
@@ -625,20 +625,20 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
-BOOL ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
- BOOL bNotes ) const
+sal_Bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
+ sal_Bool bNotes ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
+ sal_Bool bAny = pTab[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
- if (DrawGetPrintArea( aDrawRange, TRUE, TRUE ))
+ if (DrawGetPrintArea( aDrawRange, sal_True, sal_True ))
{
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
@@ -646,66 +646,66 @@ BOOL ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
rEndCol = 0;
rEndRow = 0;
- return FALSE;
+ return false;
}
-BOOL ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
- SCCOL& rEndCol, BOOL bNotes ) const
+sal_Bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
+ SCCOL& rEndCol, sal_Bool bNotes ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
+ sal_Bool bAny = pTab[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab);
- if (DrawGetPrintArea( aDrawRange, TRUE, FALSE ))
+ if (DrawGetPrintArea( aDrawRange, sal_True, false ))
{
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
}
rEndCol = 0;
- return FALSE;
+ return false;
}
-BOOL ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
- SCROW& rEndRow, BOOL bNotes ) const
+sal_Bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
+ SCROW& rEndRow, sal_Bool bNotes ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
+ sal_Bool bAny = pTab[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab);
- if (DrawGetPrintArea( aDrawRange, FALSE, TRUE ))
+ if (DrawGetPrintArea( aDrawRange, false, sal_True ))
{
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
}
rEndRow = 0;
- return FALSE;
+ return false;
}
-BOOL ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const
+sal_Bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetDataStart( rStartCol, rStartRow );
+ sal_Bool bAny = pTab[nTab]->GetDataStart( rStartCol, rStartRow );
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
- if (DrawGetPrintArea( aDrawRange, TRUE, TRUE ))
+ if (DrawGetPrintArea( aDrawRange, sal_True, sal_True ))
{
if (aDrawRange.aStart.Col()<rStartCol) rStartCol=aDrawRange.aStart.Col();
if (aDrawRange.aStart.Row()<rStartRow) rStartRow=aDrawRange.aStart.Row();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
@@ -713,13 +713,13 @@ BOOL ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow )
rStartCol = 0;
rStartRow = 0;
- return FALSE;
+ return false;
}
-BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
+sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- if (nOldPos == nNewPos) return FALSE;
- BOOL bValid = FALSE;
+ if (nOldPos == nNewPos) return false;
+ sal_Bool bValid = false;
if (VALIDTAB(nOldPos))
{
if (pTab[nOldPos])
@@ -727,9 +727,9 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
SCTAB nTabCount = GetTableCount();
if (nTabCount > 1)
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
- SetNoListening( TRUE );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
+ SetNoListening( sal_True );
ScProgress* pProgress = new ScProgress( GetDocumentShell(),
ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), GetCodeCount() );
if (nNewPos == SC_TAB_APPEND)
@@ -774,7 +774,7 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
for (i = 0; i <= MAXTAB; i++)
if (pTab[i])
pTab[i]->UpdateCompile();
- SetNoListening( FALSE );
+ SetNoListening( false );
for (i = 0; i <= MAXTAB; i++)
if (pTab[i])
pTab[i]->StartAllListeners();
@@ -786,14 +786,14 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
if (pDrawLayer)
DrawMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
- bValid = TRUE;
+ bValid = sal_True;
}
}
}
return bValid;
}
-BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked )
+sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked )
{
if (SC_TAB_APPEND == nNewPos ) nNewPos = nMaxTableNumber;
String aName;
@@ -801,20 +801,20 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
// vorneweg testen, ob der Prefix als gueltig erkannt wird
// wenn nicht, nur doppelte vermeiden
- BOOL bPrefix = ValidTabName( aName );
+ sal_Bool bPrefix = ValidTabName( aName );
DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
SCTAB nDummy;
CreateValidTabName(aName);
- BOOL bValid;
+ sal_Bool bValid;
if (bPrefix)
bValid = ( ValidNewTabName(aName) && (nMaxTableNumber <= MAXTAB) );
else
bValid = ( !GetTable( aName, nDummy ) && (nMaxTableNumber <= MAXTAB) );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
if (bValid)
{
if (nNewPos == nMaxTableNumber)
@@ -826,7 +826,7 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
{
if (VALIDTAB(nNewPos) && (nNewPos < nMaxTableNumber))
{
- SetNoListening( TRUE );
+ SetNoListening( sal_True );
ScRange aRange( 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB );
xColNameRanges->UpdateReference( URM_INSDEL, this, aRange, 0,0,1 );
@@ -853,11 +853,11 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
nOldPos++;
pTab[nNewPos] = new ScTable(this, nNewPos, aName);
++nMaxTableNumber;
- bValid = TRUE;
+ bValid = sal_True;
for (i = 0; i <= MAXTAB; i++)
if (pTab[i] && i != nOldPos && i != nNewPos)
pTab[i]->UpdateCompile();
- SetNoListening( FALSE );
+ SetNoListening( false );
for (i = 0; i <= MAXTAB; i++)
if (pTab[i] && i != nOldPos && i != nNewPos)
pTab[i]->StartAllListeners();
@@ -871,12 +871,12 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
pChartListenerCollection->UpdateScheduledSeriesRanges();
}
else
- bValid = FALSE;
+ bValid = false;
}
}
if (bValid)
{
- SetNoListening( TRUE ); // noch nicht bei CopyToTable/Insert
+ SetNoListening( sal_True ); // noch nicht bei CopyToTable/Insert
pTab[nOldPos]->CopyToTable(0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL),
pTab[nNewPos], pOnlyMarked );
pTab[nNewPos]->SetTabBgColor(pTab[nOldPos]->GetTabBgColor());
@@ -890,8 +890,8 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
pTab[nOldPos]->UpdateInsertTab(nNewPos);
pTab[nOldPos]->UpdateCompile();
- pTab[nNewPos]->UpdateCompile( TRUE ); // maybe already compiled in Clone, but used names need recompilation
- SetNoListening( FALSE );
+ pTab[nNewPos]->UpdateCompile( true ); // maybe already compiled in Clone, but used names need recompilation
+ SetNoListening( false );
pTab[nOldPos]->StartAllListeners();
pTab[nNewPos]->StartAllListeners();
SetDirty();
@@ -910,14 +910,14 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sModuleSource );
-ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
- SCTAB nDestPos, BOOL bInsertNew,
- BOOL bResultsOnly )
+sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
+ SCTAB nDestPos, sal_Bool bInsertNew,
+ sal_Bool bResultsOnly )
{
- ULONG nRetVal = 1; // 0 => Fehler 1 = ok
+ sal_uLong nRetVal = 1; // 0 => Fehler 1 = ok
// 2 => RefBox, 3 => NameBox
// 4 => beides
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
if (bInsertNew) // neu einfuegen
{
String aName;
@@ -932,19 +932,19 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
pTab[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL );
}
else
- bValid = FALSE;
+ bValid = false;
}
if (bValid)
{
- BOOL bOldAutoCalcSrc = FALSE;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
- SetNoListening( TRUE );
+ sal_Bool bOldAutoCalcSrc = false;
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
+ SetNoListening( sal_True );
if ( bResultsOnly )
{
bOldAutoCalcSrc = pSrcDoc->GetAutoCalc();
- pSrcDoc->SetAutoCalc( TRUE ); // falls was berechnet werden muss
+ pSrcDoc->SetAutoCalc( sal_True ); // falls was berechnet werden muss
}
{
@@ -955,14 +955,14 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
ScBulkBroadcast aBulkBroadcast( pBASM);
pSrcDoc->pTab[nSrcPos]->CopyToTable(0, 0, MAXCOL, MAXROW,
( bResultsOnly ? IDF_ALL & ~IDF_FORMULA : IDF_ALL),
- FALSE, pTab[nDestPos] );
+ false, pTab[nDestPos] );
}
}
pTab[nDestPos]->SetTabNo(nDestPos);
if ( !bResultsOnly )
{
- BOOL bNamesLost = FALSE;
+ BOOL bNamesLost = false;
// array containing range names which might need update of indices.
// The instances inserted into this vector are managed by the
// range name container of this document, so no need to delete
@@ -971,10 +971,10 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
// the index mapping thereof
ScRangeData::IndexMap aSrcRangeMap;
- BOOL bRangeNameReplace = FALSE;
+ sal_Bool bRangeNameReplace = false;
// find named ranges that are used in the source sheet
- std::set<USHORT> aUsedNames;
+ std::set<sal_uInt16> aUsedNames;
pSrcDoc->pTab[nSrcPos]->FindRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aUsedNames );
ScRangeName::const_iterator itr = pSrcDoc->pRangeName->begin(), itrEnd = pSrcDoc->pRangeName->end();
@@ -996,8 +996,8 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
// don't modify the named range
aSrcRangeMap.insert(
ScRangeData::IndexMap::value_type(nOldIndex, nExistingIndex));
- bRangeNameReplace = TRUE;
- bNamesLost = TRUE;
+ bRangeNameReplace = sal_True;
+ bNamesLost = sal_True;
}
else
{
@@ -1039,7 +1039,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
MAXCOL, MAXROW, nDestPos,
0, 0, nDz, NULL);
// Test for outside absolute references for info box
- BOOL bIsAbsRef = pSrcDoc->pTab[nSrcPos]->TestTabRefAbs(nSrcPos);
+ sal_Bool bIsAbsRef = pSrcDoc->pTab[nSrcPos]->TestTabRefAbs(nSrcPos);
// Readjust self-contained absolute references to this sheet
pTab[nDestPos]->TestTabRefAbs(nSrcPos);
if (bIsAbsRef)
@@ -1055,7 +1055,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
pTab[nDestPos]->CompileAll();
}
- SetNoListening( FALSE );
+ SetNoListening( false );
if ( !bResultsOnly )
pTab[nDestPos]->StartAllListeners();
SetDirty( ScRange( 0, 0, nDestPos, MAXCOL, MAXROW, nDestPos));
@@ -1073,7 +1073,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
}
if (!bValid)
nRetVal = 0;
- BOOL bVbaEnabled = IsInVBAMode();
+ sal_Bool bVbaEnabled = IsInVBAMode();
if ( bVbaEnabled )
{
@@ -1115,7 +1115,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
// ----------------------------------------------------------------------------
-void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nError)
+void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16 nError)
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -1194,16 +1194,16 @@ ScFieldEditEngine* ScDocument::CreateFieldEditEngine()
if (!pCacheFieldEditEngine)
{
pNewEditEngine = new ScFieldEditEngine( GetEnginePool(),
- GetEditPool(), FALSE );
+ GetEditPool(), false );
}
else
{
if ( !bImportingXML )
{
// #i66209# previous use might not have restored update mode,
- // ensure same state as for a new EditEngine (UpdateMode = TRUE)
+ // ensure same state as for a new EditEngine (UpdateMode = sal_True)
if ( !pCacheFieldEditEngine->GetUpdateMode() )
- pCacheFieldEditEngine->SetUpdateMode(TRUE);
+ pCacheFieldEditEngine->SetUpdateMode(sal_True);
}
pNewEditEngine = pCacheFieldEditEngine;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 5b82a1dcbc09..a2d828d41fd8 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -120,7 +120,7 @@ ScDBCollection* ScDocument::GetDBCollection() const
return pDBCollection;
}
-void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemoveAutoFilter )
+void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, sal_Bool bRemoveAutoFilter )
{
if ( bRemoveAutoFilter )
{
@@ -129,8 +129,8 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
if ( pDBCollection )
{
- USHORT nOldCount = pDBCollection->GetCount();
- for (USHORT nOld=0; nOld<nOldCount; nOld++)
+ sal_uInt16 nOldCount = pDBCollection->GetCount();
+ for (sal_uInt16 nOld=0; nOld<nOldCount; nOld++)
{
ScDBData* pOldData = (*pDBCollection)[nOld];
if ( pOldData->HasAutoFilter() )
@@ -138,8 +138,8 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
ScRange aOldRange;
pOldData->GetArea( aOldRange );
- BOOL bFound = FALSE;
- USHORT nNewIndex = 0;
+ sal_Bool bFound = false;
+ sal_uInt16 nNewIndex = 0;
if ( pNewDBCollection &&
pNewDBCollection->SearchName( pOldData->GetName(), nNewIndex ) )
{
@@ -149,7 +149,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
ScRange aNewRange;
pNewData->GetArea( aNewRange );
if ( aOldRange.aStart == aNewRange.aStart )
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -159,8 +159,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
RemoveFlagsTab( aOldRange.aStart.Col(), aOldRange.aStart.Row(),
aOldRange.aEnd.Col(), aOldRange.aEnd.Row(),
aOldRange.aStart.Tab(), SC_MF_AUTO );
- if (pShell)
- pShell->Broadcast( ScPaintHint( aOldRange, PAINT_GRID ) );
+ RepaintRange( aOldRange );
}
}
}
@@ -172,7 +171,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
pDBCollection = pNewDBCollection;
}
-ScDBData* ScDocument::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const
+ScDBData* ScDocument::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const
{
if (pDBCollection)
return pDBCollection->GetDBAtCursor(nCol, nRow, nTab, bStartOnly);
@@ -200,9 +199,9 @@ ScDPObject* ScDocument::GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
if (!pDPCollection)
return NULL;
- USHORT nCount = pDPCollection->GetCount();
+ sal_uInt16 nCount = pDPCollection->GetCount();
ScAddress aPos( nCol, nRow, nTab );
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( (*pDPCollection)[i]->GetOutRange().In( aPos ) )
return (*pDPCollection)[i];
@@ -216,7 +215,7 @@ ScDPObject* ScDocument::GetDPAtBlock( const ScRange & rBlock ) const
/* Walk the collection in reverse order to get something of an
* approximation of MS Excels 'most recent' effect. */
- USHORT i = pDPCollection->GetCount();
+ sal_uInt16 i = pDPCollection->GetCount();
while ( i-- > 0 )
if ( (*pDPCollection)[i]->GetOutRange().In( rBlock ) )
return (*pDPCollection)[i];
@@ -237,7 +236,7 @@ void ScDocument::StopTemporaryChartLock()
void ScDocument::SetChartListenerCollection(
ScChartListenerCollection* pNewChartListenerCollection,
- BOOL bSetChartRangeLists )
+ sal_Bool bSetChartRangeLists )
{
ScChartListenerCollection* pOld = pChartListenerCollection;
pChartListenerCollection = pNewChartListenerCollection;
@@ -250,19 +249,19 @@ void ScDocument::SetChartListenerCollection(
delete pOld;
}
-void ScDocument::SetScenario( SCTAB nTab, BOOL bFlag )
+void ScDocument::SetScenario( SCTAB nTab, sal_Bool bFlag )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->SetScenario(bFlag);
}
-BOOL ScDocument::IsScenario( SCTAB nTab ) const
+sal_Bool ScDocument::IsScenario( SCTAB nTab ) const
{
return ValidTab(nTab) && pTab[nTab] &&pTab[nTab]->IsScenario();
}
void ScDocument::SetScenarioData( SCTAB nTab, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
if (ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsScenario())
{
@@ -293,7 +292,7 @@ bool ScDocument::IsDefaultTabBgColor( SCTAB nTab ) const
}
void ScDocument::GetScenarioData( SCTAB nTab, String& rComment,
- Color& rColor, USHORT& rFlags ) const
+ Color& rColor, sal_uInt16& rFlags ) const
{
if (ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsScenario())
{
@@ -303,19 +302,19 @@ void ScDocument::GetScenarioData( SCTAB nTab, String& rComment,
}
}
-void ScDocument::GetScenarioFlags( SCTAB nTab, USHORT& rFlags ) const
+void ScDocument::GetScenarioFlags( SCTAB nTab, sal_uInt16& rFlags ) const
{
if (VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->IsScenario())
rFlags = pTab[nTab]->GetScenarioFlags();
}
-BOOL ScDocument::IsLinked( SCTAB nTab ) const
+sal_Bool ScDocument::IsLinked( SCTAB nTab ) const
{
return ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsLinked();
// euqivalent to
//if (ValidTab(nTab) && pTab[nTab])
// return pTab[nTab]->IsLinked();
- //return FALSE;
+ //return sal_False;
}
formula::FormulaGrammar::AddressConvention ScDocument::GetAddressConvention() const
@@ -333,7 +332,7 @@ void ScDocument::SetGrammar( formula::FormulaGrammar::Grammar eGram )
eGrammar = eGram;
}
-BOOL ScDocument::GetLinkMode( SCTAB nTab ) const
+sal_Bool ScDocument::GetLinkMode( SCTAB nTab ) const
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetLinkMode();
@@ -368,22 +367,22 @@ const String& ScDocument::GetLinkTab( SCTAB nTab ) const
return EMPTY_STRING;
}
-ULONG ScDocument::GetLinkRefreshDelay( SCTAB nTab ) const
+sal_uLong ScDocument::GetLinkRefreshDelay( SCTAB nTab ) const
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetLinkRefreshDelay();
return 0;
}
-void ScDocument::SetLink( SCTAB nTab, BYTE nMode, const String& rDoc,
+void ScDocument::SetLink( SCTAB nTab, sal_uInt8 nMode, const String& rDoc,
const String& rFilter, const String& rOptions,
- const String& rTabName, ULONG nRefreshDelay )
+ const String& rTabName, sal_uLong nRefreshDelay )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->SetLink( nMode, rDoc, rFilter, rOptions, rTabName, nRefreshDelay );
}
-BOOL ScDocument::HasLink( const String& rDoc,
+sal_Bool ScDocument::HasLink( const String& rDoc,
const String& rFilter, const String& rOptions ) const
{
SCTAB nCount = GetTableCount();
@@ -392,18 +391,18 @@ BOOL ScDocument::HasLink( const String& rDoc,
&& pTab[i]->GetLinkDoc() == rDoc
&& pTab[i]->GetLinkFlt() == rFilter
&& pTab[i]->GetLinkOpt() == rOptions)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab,
+sal_Bool ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab,
const String& aFileName, const String& aTabName )
{
if ( IsClipboard() )
{
DBG_ERRORFILE( "LinkExternalTab in Clipboard" );
- return FALSE;
+ return false;
}
rTab = 0;
String aFilterName; // wird vom Loader gefuellt
@@ -411,42 +410,42 @@ BOOL ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab,
sal_uInt32 nLinkCnt = pExtDocOptions ? pExtDocOptions->GetDocSettings().mnLinkCnt : 0;
ScDocumentLoader aLoader( aFileName, aFilterName, aOptions, nLinkCnt + 1 );
if ( aLoader.IsError() )
- return FALSE;
+ return false;
ScDocument* pSrcDoc = aLoader.GetDocument();
// Tabelle kopieren
SCTAB nSrcTab;
if ( pSrcDoc->GetTable( aTabName, nSrcTab ) )
{
- if ( !InsertTab( SC_TAB_APPEND, aDocTab, TRUE ) )
+ if ( !InsertTab( SC_TAB_APPEND, aDocTab, sal_True ) )
{
DBG_ERRORFILE("can't insert external document table");
- return FALSE;
+ return false;
}
rTab = GetTableCount() - 1;
// nicht neu einfuegen, nur Ergebnisse
- TransferTab( pSrcDoc, nSrcTab, rTab, FALSE, TRUE );
+ TransferTab( pSrcDoc, nSrcTab, rTab, false, sal_True );
}
else
- return FALSE;
+ return false;
- ULONG nRefreshDelay = 0;
+ sal_uLong nRefreshDelay = 0;
- BOOL bWasThere = HasLink( aFileName, aFilterName, aOptions );
+ sal_Bool bWasThere = HasLink( aFileName, aFilterName, aOptions );
SetLink( rTab, SC_LINK_VALUE, aFileName, aFilterName, aOptions, aTabName, nRefreshDelay );
if ( !bWasThere ) // Link pro Quelldokument nur einmal eintragen
{
ScTableLink* pLink = new ScTableLink( pShell, aFileName, aFilterName, aOptions, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
GetLinkManager()->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName,
&aFilterName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
pBindings->Invalidate( SID_LINKS );
}
- return TRUE;
+ return sal_True;
}
ScExternalRefManager* ScDocument::GetExternalRefManager() const
@@ -530,28 +529,36 @@ bool ScDocument::HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents )
return false;
}
-BOOL ScDocument::HasCalcNotification( SCTAB nTab ) const
+bool ScDocument::HasAnyCalcNotification() const
+{
+ for (SCTAB nTab = 0; nTab <= MAXTAB; nTab++)
+ if (pTab[nTab] && pTab[nTab]->GetCalcNotification())
+ return true;
+ return false;
+}
+
+sal_Bool ScDocument::HasCalcNotification( SCTAB nTab ) const
{
if (VALIDTAB(nTab) && pTab[nTab])
return pTab[nTab]->GetCalcNotification();
- return FALSE;
+ return false;
}
void ScDocument::SetCalcNotification( SCTAB nTab )
{
// set only if not set before
if (VALIDTAB(nTab) && pTab[nTab] && !pTab[nTab]->GetCalcNotification())
- pTab[nTab]->SetCalcNotification(TRUE);
+ pTab[nTab]->SetCalcNotification(sal_True);
}
void ScDocument::ResetCalcNotifications()
{
for (SCTAB nTab = 0; nTab <= MAXTAB; nTab++)
if (pTab[nTab] && pTab[nTab]->GetCalcNotification())
- pTab[nTab]->SetCalcNotification(FALSE);
+ pTab[nTab]->SetCalcNotification(false);
}
-ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, BOOL bCreate )
+ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, sal_Bool bCreate )
{
ScOutlineTable* pVal = NULL;
@@ -570,7 +577,7 @@ ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, BOOL bCreate )
return pVal;
}
-BOOL ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline )
+sal_Bool ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->SetOutlineTable(pNewOutline);
}
@@ -582,7 +589,7 @@ void ScDocument::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
pTab[nTab]->DoAutoOutline( nStartCol, nStartRow, nEndCol, nEndRow );
}
-BOOL ScDocument::TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam )
+sal_Bool ScDocument::TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->TestRemoveSubTotals( rParam );
}
@@ -593,23 +600,23 @@ void ScDocument::RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
pTab[nTab]->RemoveSubTotals( rParam );
}
-BOOL ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
+sal_Bool ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->DoSubTotals( rParam );
}
-BOOL ScDocument::HasSubTotalCells( const ScRange& rRange )
+sal_Bool ScDocument::HasSubTotalCells( const ScRange& rRange )
{
ScCellIterator aIter( this, rRange );
ScBaseCell* pCell = aIter.GetFirst();
while (pCell)
{
if ( pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->IsSubTotal() )
- return TRUE;
+ return sal_True;
pCell = aIter.GetNext();
}
- return FALSE; // none found
+ return false; // none found
}
// kopiert aus diesem Dokument die Zellen von Positionen, an denen in pPosDoc
@@ -623,7 +630,7 @@ void ScDocument::CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc )
pTab[nTab]->CopyUpdated( pPosDoc->pTab[nTab], pDestDoc->pTab[nTab] );
}
-void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario )
+void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScenario )
{
if (ValidTab(nSrcTab) && ValidTab(nDestTab) && pTab[nSrcTab] && pTab[nDestTab])
{
@@ -639,27 +646,27 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario
{
if ( pTab[nTab]->IsActiveScenario() ) // auch wenn's dasselbe Szenario ist
{
- BOOL bTouched = FALSE;
+ sal_Bool bTouched = false;
for ( size_t nR=0, nRangeCount = aRanges.size(); nR < nRangeCount && !bTouched; nR++ )
{
const ScRange* pRange = aRanges[ nR ];
if ( pTab[nTab]->HasScenarioRange( *pRange ) )
- bTouched = TRUE;
+ bTouched = sal_True;
}
if (bTouched)
{
- pTab[nTab]->SetActiveScenario(FALSE);
+ pTab[nTab]->SetActiveScenario(false);
if ( pTab[nTab]->GetScenarioFlags() & SC_SCENARIO_TWOWAY )
pTab[nTab]->CopyScenarioFrom( pTab[nDestTab] );
}
}
}
- pTab[nSrcTab]->SetActiveScenario(TRUE); // da kommt's her...
+ pTab[nSrcTab]->SetActiveScenario(sal_True); // da kommt's her...
if (!bNewScenario) // Daten aus dem ausgewaehlten Szenario kopieren
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
pTab[nSrcTab]->CopyScenarioTo( pTab[nDestTab] );
SetDirty();
SetAutoCalc( bOldAutoCalc );
@@ -668,7 +675,7 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario
}
void ScDocument::MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, ScMarkData& rDestMark,
- BOOL bResetMark, USHORT nNeededBits ) const
+ sal_Bool bResetMark, sal_uInt16 nNeededBits ) const
{
if (bResetMark)
rDestMark.ResetMark();
@@ -679,7 +686,7 @@ void ScDocument::MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, ScMarkData& rDestM
rDestMark.SetAreaTab( nDestTab );
}
-BOOL ScDocument::HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const
+sal_Bool ScDocument::HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const
{
return ValidTab(nTab) && pTab[nTab] && pTab[nTab]->HasScenarioRange( rRange );
}
@@ -692,24 +699,24 @@ const ScRangeList* ScDocument::GetScenarioRanges( SCTAB nTab ) const
return NULL;
}
-BOOL ScDocument::IsActiveScenario( SCTAB nTab ) const
+sal_Bool ScDocument::IsActiveScenario( SCTAB nTab ) const
{
return ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsActiveScenario( );
}
-void ScDocument::SetActiveScenario( SCTAB nTab, BOOL bActive )
+void ScDocument::SetActiveScenario( SCTAB nTab, sal_Bool bActive )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->SetActiveScenario( bActive );
}
-BOOL ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const
+sal_Bool ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const
{
if (ValidTab(nSrcTab) && ValidTab(nDestTab))
return pTab[nSrcTab]->TestCopyScenarioTo( pTab[nDestTab] );
OSL_FAIL("falsche Tabelle bei TestCopyScenario");
- return FALSE;
+ return false;
}
void ScDocument::AddUnoObject( SfxListener& rObject )
@@ -768,9 +775,9 @@ void ScDocument::BroadcastUno( const SfxHint &rHint )
{
if (pUnoBroadcaster)
{
- bInUnoBroadcast = TRUE;
+ bInUnoBroadcast = sal_True;
pUnoBroadcaster->Broadcast( rHint );
- bInUnoBroadcast = FALSE;
+ bInUnoBroadcast = false;
// During Broadcast notification, Uno objects can add to pUnoListenerCalls.
// The listener calls must be processed after completing the broadcast,
@@ -785,9 +792,9 @@ void ScDocument::BroadcastUno( const SfxHint &rHint )
// outermost call executes them all.
ScChartLockGuard aChartLockGuard(this);
- bInUnoListenerCall = TRUE;
+ bInUnoListenerCall = sal_True;
pUnoListenerCalls->ExecuteAndClear();
- bInUnoListenerCall = FALSE;
+ bInUnoListenerCall = false;
}
}
}
@@ -832,7 +839,7 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScDocument* pUndoDoc, BOOL bIncludeDraw,
+ ScDocument* pUndoDoc, sal_Bool bIncludeDraw,
bool bUpdateNoteCaptionPos )
{
PutInOrder( nCol1, nCol2 );
@@ -840,7 +847,7 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode,
PutInOrder( nTab1, nTab2 );
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
- BOOL bExpandRefsOld = IsExpandRefs();
+ sal_Bool bExpandRefsOld = IsExpandRefs();
if ( eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0 || nDz > 0) )
SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() );
SCTAB i;
@@ -955,7 +962,7 @@ void ScDocument::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
}
void ScDocument::Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
- ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
+ sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
double nStepValue, double nMaxValue)
{
PutInOrder( nCol1, nCol2 );
@@ -978,7 +985,7 @@ String ScDocument::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCRO
}
void ScDocument::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- USHORT nFormatNo, const ScMarkData& rMark )
+ sal_uInt16 nFormatNo, const ScMarkData& rMark )
{
PutInOrder( nStartCol, nEndCol );
PutInOrder( nStartRow, nEndRow );
@@ -1005,8 +1012,8 @@ void ScDocument::GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
void ScDocument::GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow )
{
- USHORT nCommand = rSearchItem.GetCommand();
- BOOL bReplace = ( nCommand == SVX_SEARCHCMD_REPLACE ||
+ sal_uInt16 nCommand = rSearchItem.GetCommand();
+ sal_Bool bReplace = ( nCommand == SVX_SEARCHCMD_REPLACE ||
nCommand == SVX_SEARCHCMD_REPLACE_ALL );
if ( rSearchItem.GetBackward() )
{
@@ -1088,7 +1095,7 @@ void ScDocument::GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
}
}
-BOOL ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
+sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
@@ -1097,13 +1104,13 @@ BOOL ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
rMark.MarkToMulti();
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if (VALIDTAB(rTab))
{
SCCOL nCol;
SCROW nRow;
SCTAB nTab;
- USHORT nCommand = rSearchItem.GetCommand();
+ sal_uInt16 nCommand = rSearchItem.GetCommand();
if ( nCommand == SVX_SEARCHCMD_FIND_ALL ||
nCommand == SVX_SEARCHCMD_REPLACE_ALL )
{
@@ -1174,36 +1181,36 @@ BOOL ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
// Outline anpassen
-BOOL ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, BOOL bShow )
+sal_Bool ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, sal_Bool bShow )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->UpdateOutlineCol( nStartCol, nEndCol, bShow );
OSL_FAIL("missing tab");
- return FALSE;
+ return false;
}
-BOOL ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bShow )
+sal_Bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bShow )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->UpdateOutlineRow( nStartRow, nEndRow, bShow );
OSL_FAIL("missing tab");
- return FALSE;
+ return false;
}
-void ScDocument::Sort(SCTAB nTab, const ScSortParam& rSortParam, BOOL bKeepQuery)
+void ScDocument::Sort(SCTAB nTab, const ScSortParam& rSortParam, sal_Bool bKeepQuery)
{
if ( ValidTab(nTab) && pTab[nTab] )
{
- BOOL bOldDisableIdle = IsIdleDisabled();
- DisableIdle( TRUE );
+ sal_Bool bOldDisableIdle = IsIdleDisabled();
+ DisableIdle( sal_True );
pTab[nTab]->Sort(rSortParam, bKeepQuery);
DisableIdle( bOldDisableIdle );
}
}
-SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeepSub)
+SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool bKeepSub)
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->Query((ScQueryParam&)rQueryParam, bKeepSub);
@@ -1221,19 +1228,19 @@ void ScDocument::GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String&
rStr.Erase();
}
-BOOL ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam)
+sal_Bool ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam)
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->CreateQueryParam(nCol1, nRow1, nCol2, nRow2, rQueryParam);
OSL_FAIL("missing tab");
- return FALSE;
+ return false;
}
-BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
+sal_Bool ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
{
ScDBData* pDBData = GetDBAtCursor( nCurCol, nCurRow, nCurTab );
- BOOL bHasAutoFilter = ( pDBData != NULL );
+ sal_Bool bHasAutoFilter = ( pDBData != NULL );
if ( pDBData )
{
@@ -1241,7 +1248,7 @@ BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
{
SCCOL nCol;
SCROW nRow;
- INT16 nFlag;
+ sal_Int16 nFlag;
ScQueryParam aParam;
pDBData->GetQueryParam( aParam );
@@ -1254,23 +1261,23 @@ BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
GetValue();
if ( (nFlag & SC_MF_AUTO) == 0 )
- bHasAutoFilter = FALSE;
+ bHasAutoFilter = false;
}
}
else
- bHasAutoFilter = FALSE;
+ bHasAutoFilter = false;
}
return bHasAutoFilter;
}
-BOOL ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+sal_Bool ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasColHeader( nStartCol, nStartRow, nEndCol, nEndRow );
}
-BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+sal_Bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasRowHeader( nStartCol, nStartRow, nEndCol, nEndRow );
@@ -1292,12 +1299,12 @@ void ScDocument::UpdateDynamicEndRow(ScDBData& rDBData) const
// GetFilterEntries - Eintraege fuer AutoFilter-Listbox
//
-BOOL ScDocument::GetFilterEntries(
+sal_Bool ScDocument::GetFilterEntries(
SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates)
{
if ( ValidTab(nTab) && pTab[nTab] && pDBCollection )
{
- ScDBData* pDBData = pDBCollection->GetDBAtCursor(nCol, nRow, nTab, FALSE); //!??
+ ScDBData* pDBData = pDBCollection->GetDBAtCursor(nCol, nRow, nTab, false); //!??
if (pDBData)
{
UpdateDynamicEndRow(*pDBData);
@@ -1339,47 +1346,47 @@ BOOL ScDocument::GetFilterEntries(
pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
//
// GetFilterEntriesArea - Eintraege fuer Filter-Dialog
//
-BOOL ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
+sal_Bool ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates )
{
if ( ValidTab(nTab) && pTab[nTab] )
{
pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//
// GetDataEntries - Eintraege fuer Auswahlliste-Listbox (keine Zahlen / Formeln)
//
-BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
- TypedScStrCollection& rStrings, BOOL bLimit )
+sal_Bool ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ TypedScStrCollection& rStrings, sal_Bool bLimit )
{
if( !bLimit )
{
/* Try to generate the list from list validation. This part is skipped,
- if bLimit==TRUE, because in that case this function is called to get
+ if bLimit==sal_True, because in that case this function is called to get
cell values for auto completion on input. */
sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA ) )->GetValue();
if( nValidation )
{
const ScValidationData* pData = GetValidationEntry( nValidation );
if( pData && pData->FillSelectionList( rStrings, ScAddress( nCol, nRow, nTab ) ) )
- return TRUE;
+ return sal_True;
}
}
@@ -1395,7 +1402,7 @@ BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
#define SC_STRTYPE_DBNAMES 3
#define SC_STRTYPE_HEADERS 4
-BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
+sal_Bool ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
{
//
// Bereichsnamen
@@ -1438,7 +1445,7 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
ScRangePairList* pLists[2];
pLists[0] = GetColNameRanges();
pLists[1] = GetRowNameRanges();
- for (USHORT nListNo=0; nListNo<2; nListNo++)
+ for (sal_uInt16 nListNo=0; nListNo<2; nListNo++)
{
ScRangePairList* pList = pLists[ nListNo ];
if (pList)
@@ -1458,11 +1465,11 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocument::IsEmbedded() const
+sal_Bool ScDocument::IsEmbedded() const
{
return bIsEmbedded;
}
@@ -1503,20 +1510,20 @@ Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm
void ScDocument::SetEmbedded( const ScRange& rRange )
{
- bIsEmbedded = TRUE;
+ bIsEmbedded = sal_True;
aEmbedRange = rRange;
}
void ScDocument::ResetEmbedded()
{
- bIsEmbedded = FALSE;
+ bIsEmbedded = false;
aEmbedRange = ScRange();
}
/** Similar to ScViewData::AddPixelsWhile(), but add height twips and only
while result is less than nStopTwips.
- @return TRUE if advanced at least one row.
+ @return sal_True if advanced at least one row.
*/
bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SCROW nEndRow, const ScTable * pTable )
{
@@ -1526,7 +1533,7 @@ bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SCROW nEn
while (rTwips < nStopTwips && nRow <= nEndRow && !bStop)
{
SCROW nHeightEndRow;
- USHORT nHeight = pTable->GetRowHeight( nRow, NULL, &nHeightEndRow);
+ sal_uInt16 nHeight = pTable->GetRowHeight( nRow, NULL, &nHeightEndRow);
if (nHeightEndRow > nEndRow)
nHeightEndRow = nEndRow;
if (!nHeight)
@@ -1577,13 +1584,13 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
long nSize;
long nTwips;
long nAdd;
- BOOL bEnd;
+ sal_Bool bEnd;
nSize = 0;
nTwips = (long) (aPosRect.Left() / HMM_PER_TWIPS);
SCCOL nX1 = 0;
- bEnd = FALSE;
+ bEnd = false;
while (!bEnd)
{
nAdd = (long) pTable->GetColWidth(nX1);
@@ -1593,13 +1600,13 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
++nX1;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
nTwips = (long) (aPosRect.Right() / HMM_PER_TWIPS);
SCCOL nX2 = nX1;
- bEnd = FALSE;
+ bEnd = false;
while (!bEnd)
{
nAdd = (long) pTable->GetColWidth(nX2);
@@ -1609,7 +1616,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
++nX2;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
@@ -1633,7 +1640,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
void ScDocument::SetEmbedded( const Rectangle& rRect ) // aus VisArea (1/100 mm)
{
- bIsEmbedded = TRUE;
+ bIsEmbedded = sal_True;
aEmbedRange = GetRange( nVisibleTab, rRect );
}
@@ -1704,7 +1711,7 @@ void ScDocument::SnapVisArea( Rectangle& rRect ) const
return;
}
- BOOL bNegativePage = IsNegativePage( nVisibleTab );
+ sal_Bool bNegativePage = IsNegativePage( nVisibleTab );
if ( bNegativePage )
ScDrawLayer::MirrorRectRTL( rRect ); // calculate with positive (LTR) values
@@ -1735,24 +1742,24 @@ void ScDocument::SetDocProtection(const ScDocProtection* pProtect)
pDocProtection.reset(NULL);
}
-BOOL ScDocument::IsDocProtected() const
+sal_Bool ScDocument::IsDocProtected() const
{
return pDocProtection.get() && pDocProtection->isProtected();
}
-BOOL ScDocument::IsDocEditable() const
+sal_Bool ScDocument::IsDocEditable() const
{
// import into read-only document is possible
return !IsDocProtected() && ( bImportingXML || mbChangeReadOnlyEnabled || !pShell || !pShell->IsReadOnly() );
}
-BOOL ScDocument::IsTabProtected( SCTAB nTab ) const
+sal_Bool ScDocument::IsTabProtected( SCTAB nTab ) const
{
if (VALIDTAB(nTab) && pTab[nTab])
return pTab[nTab]->IsProtected();
OSL_FAIL("Falsche Tabellennummer");
- return FALSE;
+ return false;
}
ScTableProtection* ScDocument::GetTabProtection( SCTAB nTab ) const
@@ -1857,7 +1864,7 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy
void ScDocument::SetDrawDefaults()
{
- bSetDrawDefaults = TRUE;
+ bSetDrawDefaults = sal_True;
UpdateDrawDefaults();
}
@@ -1939,7 +1946,7 @@ void ScDocument::DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
ApplyFlagsTab( nStartCol+1, nStartRow+1, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
// remove all covered notes (removed captions are collected by drawing undo if active)
- USHORT nDelFlag = IDF_NOTE | (bDeleteCaptions ? 0 : IDF_NOCAPTIONS);
+ sal_uInt16 nDelFlag = IDF_NOTE | (bDeleteCaptions ? 0 : IDF_NOCAPTIONS);
if( nStartCol < nEndCol )
DeleteAreaTab( nStartCol + 1, nStartRow, nEndCol, nStartRow, nTab, nDelFlag );
if( nStartRow < nEndRow )
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index d2968d0531bf..1958bf721a4c 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -62,11 +62,11 @@ using namespace formula;
// -----------------------------------------------------------------------
// Nach der Regula Falsi Methode
-BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
+sal_Bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
const String& sValStr, double& nX)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
nX = 0.0;
if (ValidColRow(nFCol, nFRow) && ValidColRow(nVCol, nVRow) &&
VALIDTAB(nFTab) && VALIDTAB(nVTab) && pTab[nFTab] && pTab[nVTab])
@@ -111,10 +111,10 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
// FIXME FIXME FIXME this might need to be reworked now that we have formula::FormulaErrorToken and ScFormulaResult, double check !!!
DBG_ERRORFILE("ScDocument::Solver: -> ScFormulaCell::GetValueAlways might need reimplementation");
pCell->Interpret();
- USHORT nErrCode = pCell->GetErrCode();
+ sal_uInt16 nErrCode = pCell->GetErrCode();
nX = pCell->GetValueAlways();
if (nErrCode == 0) // kein fehler beim Rechnen
- bRet = TRUE;
+ bRet = sal_True;
delete pCell;
}
}
@@ -135,11 +135,11 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
SCCOL j;
SCROW k;
i = 0;
- BOOL bStop = FALSE;
+ sal_Bool bStop = false;
while (i <= MAXTAB && !bStop) // erste markierte Tabelle finden
{
if (pTab[i] && rMark.GetTableSelect(i))
- bStop = TRUE;
+ bStop = sal_True;
else
i++;
}
@@ -174,9 +174,9 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
aRefData.nCol = nCol1;
aRefData.nRow = nRow1;
aRefData.nTab = nTab1;
- aRefData.SetColRel( TRUE );
- aRefData.SetRowRel( TRUE );
- aRefData.SetTabRel( TRUE );
+ aRefData.SetColRel( sal_True );
+ aRefData.SetRowRel( sal_True );
+ aRefData.SetTabRel( sal_True );
aRefData.CalcRelFromAbs( ScAddress( nCol1, nRow1, nTab1 ) );
ScTokenArray aArr;
@@ -222,11 +222,11 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
SCCOL j;
SCROW k;
i = 0;
- BOOL bStop = FALSE;
+ sal_Bool bStop = false;
while (i <= MAXTAB && !bStop) // erste markierte Tabelle finden
{
if (pTab[i] && rMark.GetTableSelect(i))
- bStop = TRUE;
+ bStop = sal_True;
else
i++;
}
@@ -246,12 +246,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
const String& sSep = ScCompiler::GetNativeSymbol( ocSep);
if (rParam.nMode == 0) // nur Spalte
{
- aRef.Set( rParam.aRefFormulaCell.GetAddress(), TRUE, FALSE, FALSE );
+ aRef.Set( rParam.aRefFormulaCell.GetAddress(), sal_True, false, false );
aForString += aRef.GetRefString(this, nTab1);
aForString += sSep;
aForString += rParam.aRefColCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1, nRow1, nTab1, FALSE, TRUE, TRUE );
+ aRef.Set( nCol1, nRow1, nTab1, false, sal_True, sal_True );
aForString += aRef.GetRefString(this, nTab1);
nCol1++;
nCol2 = Min( nCol2, (SCCOL)(rParam.aRefFormulaEnd.Col() -
@@ -259,12 +259,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
}
else if (rParam.nMode == 1) // nur zeilenweise
{
- aRef.Set( rParam.aRefFormulaCell.GetAddress(), FALSE, TRUE, FALSE );
+ aRef.Set( rParam.aRefFormulaCell.GetAddress(), false, sal_True, false );
aForString += aRef.GetRefString(this, nTab1);
aForString += sSep;
aForString += rParam.aRefRowCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1, nRow1, nTab1, TRUE, FALSE, TRUE );
+ aRef.Set( nCol1, nRow1, nTab1, sal_True, false, sal_True );
aForString += aRef.GetRefString(this, nTab1);
nRow1++;
nRow2 = Min( nRow2, (SCROW)(rParam.aRefFormulaEnd.Row() -
@@ -276,12 +276,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
aForString += sSep;
aForString += rParam.aRefColCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1, nRow1 + 1, nTab1, FALSE, TRUE, TRUE );
+ aRef.Set( nCol1, nRow1 + 1, nTab1, false, sal_True, sal_True );
aForString += aRef.GetRefString(this, nTab1);
aForString += sSep;
aForString += rParam.aRefRowCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1 + 1, nRow1, nTab1, TRUE, FALSE, TRUE );
+ aRef.Set( nCol1 + 1, nRow1, nTab1, sal_True, false, sal_True );
aForString += aRef.GetRefString(this, nTab1);
nCol1++; nRow1++;
}
@@ -338,33 +338,33 @@ bool ScDocument::MarkUsedExternalReferences( ScTokenArray & rArr )
return bAllMarked;
}
-BOOL ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
- BOOL bInSel, const ScMarkData& rMark) const
+sal_Bool ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
+ sal_Bool bInSel, const ScMarkData& rMark) const
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetNextSpellingCell( nCol, nRow, bInSel, rMark );
else
- return FALSE;
+ return false;
}
-BOOL ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
+sal_Bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
const ScMarkData& rMark )
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetNextMarkedCell( rCol, rRow, rMark );
else
- return FALSE;
+ return false;
}
-BOOL ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem,
+sal_Bool ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem,
SCCOL nCol, SCROW nRow, SCTAB nTab,
ScMarkData& rMark,
- BOOL bIsUndoP)
+ sal_Bool bIsUndoP)
{
if (pTab[nTab])
return pTab[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP);
else
- return FALSE;
+ return false;
}
void ScDocument::CompileDBFormula()
@@ -375,7 +375,7 @@ void ScDocument::CompileDBFormula()
}
}
-void ScDocument::CompileDBFormula( BOOL bCreateFormulaString )
+void ScDocument::CompileDBFormula( sal_Bool bCreateFormulaString )
{
for (SCTAB i=0; i<=MAXTAB; i++)
{
@@ -383,7 +383,7 @@ void ScDocument::CompileDBFormula( BOOL bCreateFormulaString )
}
}
-void ScDocument::CompileNameFormula( BOOL bCreateFormulaString )
+void ScDocument::CompileNameFormula( sal_Bool bCreateFormulaString )
{
if ( pCondFormList )
pCondFormList->CompileAll(); // nach ScNameDlg noetig
@@ -442,7 +442,7 @@ xub_StrLen ScDocument::GetMaxNumberStringLen( sal_uInt16& nPrecision, SCTAB nTab
return 0;
}
-BOOL ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
+sal_Bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
const ScAddress& rCursor, const ScMarkData& rMark,
double& rResult )
{
@@ -478,14 +478,14 @@ BOOL ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
if (aData.nCount)
rResult = aData.nVal / (double) aData.nCount;
else
- aData.bError = TRUE;
+ aData.bError = sal_True;
break;
case SUBTOTAL_FUNC_MAX:
case SUBTOTAL_FUNC_MIN:
if (aData.nCount)
rResult = aData.nVal;
else
- aData.bError = TRUE;
+ aData.bError = sal_True;
break;
default:
{
@@ -499,7 +499,7 @@ BOOL ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
return !aData.bError;
}
-double ScDocument::RoundValueAsShown( double fVal, ULONG nFormat )
+double ScDocument::RoundValueAsShown( double fVal, sal_uLong nFormat )
{
short nType;
if ( (nType = GetFormatTable()->GetType( nFormat )) != NUMBERFORMAT_DATE
@@ -545,7 +545,7 @@ double ScDocument::RoundValueAsShown( double fVal, ULONG nFormat )
// bedingte Formate und Gueltigkeitsbereiche
//
-ULONG ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
+sal_uLong ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
{
if (rNew.IsEmpty())
return 0; // leer ist immer 0
@@ -553,12 +553,12 @@ ULONG ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
if (!pCondFormList)
pCondFormList = new ScConditionalFormatList;
- ULONG nMax = 0;
- USHORT nCount = pCondFormList->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uLong nMax = 0;
+ sal_uInt16 nCount = pCondFormList->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const ScConditionalFormat* pForm = (*pCondFormList)[i];
- ULONG nKey = pForm->GetKey();
+ sal_uLong nKey = pForm->GetKey();
if ( pForm->EqualEntries( rNew ) )
return nKey;
if ( nKey > nMax )
@@ -567,14 +567,14 @@ ULONG ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
// Der Aufruf kann aus ScPatternAttr::PutInPool kommen, darum Clone (echte Kopie)
- ULONG nNewKey = nMax + 1;
+ sal_uLong nNewKey = nMax + 1;
ScConditionalFormat* pInsert = rNew.Clone(this);
pInsert->SetKey( nNewKey );
pCondFormList->InsertNew( pInsert );
return nNewKey;
}
-ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
+sal_uLong ScDocument::AddValidationEntry( const ScValidationData& rNew )
{
if (rNew.IsEmpty())
return 0; // leer ist immer 0
@@ -582,12 +582,12 @@ ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
if (!pValidationList)
pValidationList = new ScValidationDataList;
- ULONG nMax = 0;
- USHORT nCount = pValidationList->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uLong nMax = 0;
+ sal_uInt16 nCount = pValidationList->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const ScValidationData* pData = (*pValidationList)[i];
- ULONG nKey = pData->GetKey();
+ sal_uLong nKey = pData->GetKey();
if ( pData->EqualEntries( rNew ) )
return nKey;
if ( nKey > nMax )
@@ -596,7 +596,7 @@ ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
// Der Aufruf kann aus ScPatternAttr::PutInPool kommen, darum Clone (echte Kopie)
- ULONG nNewKey = nMax + 1;
+ sal_uLong nNewKey = nMax + 1;
ScValidationData* pInsert = rNew.Clone(this);
pInsert->SetKey( nNewKey );
pValidationList->InsertNew( pInsert );
@@ -604,16 +604,16 @@ ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
}
const SfxPoolItem* ScDocument::GetEffItem(
- SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const
+ SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const
{
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
if ( pPattern )
{
const SfxItemSet& rSet = pPattern->GetItemSet();
const SfxPoolItem* pItem;
- if ( rSet.GetItemState( ATTR_CONDITIONAL, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( ATTR_CONDITIONAL, sal_True, &pItem ) == SFX_ITEM_SET )
{
- ULONG nIndex = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item*)pItem)->GetValue();
if (nIndex && pCondFormList)
{
const ScConditionalFormat* pForm = pCondFormList->GetFormat( nIndex );
@@ -626,7 +626,7 @@ const SfxPoolItem* ScDocument::GetEffItem(
SfxStyleSheetBase* pStyleSheet = xPoolHelper->GetStylePool()->Find(
aStyle, SFX_STYLE_FAMILY_PARA );
if ( pStyleSheet && pStyleSheet->GetItemSet().GetItemState(
- nWhich, TRUE, &pItem ) == SFX_ITEM_SET )
+ nWhich, sal_True, &pItem ) == SFX_ITEM_SET )
return pItem;
}
}
@@ -659,7 +659,7 @@ const SfxItemSet* ScDocument::GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab
const ScConditionalFormat* ScDocument::GetCondFormat(
SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
- ULONG nIndex = ((const SfxUInt32Item*)GetAttr(nCol,nRow,nTab,ATTR_CONDITIONAL))->GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item*)GetAttr(nCol,nRow,nTab,ATTR_CONDITIONAL))->GetValue();
if (nIndex)
{
if (pCondFormList)
@@ -673,7 +673,7 @@ const ScConditionalFormat* ScDocument::GetCondFormat(
return NULL;
}
-const ScValidationData* ScDocument::GetValidationEntry( ULONG nIndex ) const
+const ScValidationData* ScDocument::GetValidationEntry( sal_uLong nIndex ) const
{
if ( pValidationList )
return pValidationList->GetData( nIndex );
@@ -681,19 +681,19 @@ const ScValidationData* ScDocument::GetValidationEntry( ULONG nIndex ) const
return NULL;
}
-void ScDocument::FindConditionalFormat( ULONG nKey, ScRangeList& rRanges )
+void ScDocument::FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges )
{
for (SCTAB i=0; i<=MAXTAB && pTab[i]; i++)
pTab[i]->FindConditionalFormat( nKey, rRanges );
}
-void ScDocument::FindConditionalFormat( ULONG nKey, ScRangeList& rRanges, SCTAB nTab )
+void ScDocument::FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges, SCTAB nTab )
{
if(VALIDTAB(nTab) && pTab[nTab])
pTab[nTab]->FindConditionalFormat( nKey, rRanges );
}
-void ScDocument::ConditionalChanged( ULONG nKey )
+void ScDocument::ConditionalChanged( sal_uLong nKey )
{
if ( nKey && pCondFormList && !bIsClip && !bIsUndo ) // nKey==0 -> noop
{
@@ -716,7 +716,7 @@ void ScDocument::SetCondFormList(ScConditionalFormatList* pNew)
//------------------------------------------------------------------------
-BOOL ScDocument::HasDetectiveOperations() const
+sal_Bool ScDocument::HasDetectiveOperations() const
{
return pDetOpList && pDetOpList->Count();
}
@@ -754,12 +754,12 @@ void ScDocument::SetDetOpList(ScDetOpList* pNew)
#define SC_DOCCOMP_ROWS 100
-USHORT ScDocument::RowDifferences( SCROW nThisRow, SCTAB nThisTab,
+sal_uInt16 ScDocument::RowDifferences( SCROW nThisRow, SCTAB nThisTab,
ScDocument& rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab,
SCCOL nMaxCol, SCCOLROW* pOtherCols )
{
- ULONG nDif = 0;
- ULONG nUsed = 0;
+ sal_uLong nDif = 0;
+ sal_uLong nUsed = 0;
for (SCCOL nThisCol=0; nThisCol<=nMaxCol; nThisCol++)
{
SCCOL nOtherCol;
@@ -787,20 +787,20 @@ USHORT ScDocument::RowDifferences( SCROW nThisRow, SCTAB nThisTab,
}
if (nUsed > 0)
- return static_cast<USHORT>((nDif*64)/nUsed); // max.256 (SC_DOCCOMP_MAXDIFF)
+ return static_cast<sal_uInt16>((nDif*64)/nUsed); // max.256 (SC_DOCCOMP_MAXDIFF)
DBG_ASSERT(!nDif,"Diff ohne Used");
return 0;
}
-USHORT ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
+sal_uInt16 ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
ScDocument& rOtherDoc, SCCOL nOtherCol, SCTAB nOtherTab,
SCROW nMaxRow, SCCOLROW* pOtherRows )
{
//! optimieren mit Iterator oder so
- ULONG nDif = 0;
- ULONG nUsed = 0;
+ sal_uLong nDif = 0;
+ sal_uLong nUsed = 0;
for (SCROW nThisRow=0; nThisRow<=nMaxRow; nThisRow++)
{
SCROW nOtherRow;
@@ -828,17 +828,17 @@ USHORT ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
}
if (nUsed > 0)
- return static_cast<USHORT>((nDif*64)/nUsed); // max.256
+ return static_cast<sal_uInt16>((nDif*64)/nUsed); // max.256
DBG_ASSERT(!nDif,"Diff ohne Used");
return 0;
}
void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
- BOOL bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
- SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, ULONG nProAdd )
+ sal_Bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
+ SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd )
{
- // bColumns=TRUE: Zeilen sind Spalten und umgekehrt
+ // bColumns=sal_True: Zeilen sind Spalten und umgekehrt
SCCOLROW nMaxCont; // wieviel weiter
SCCOLROW nMinGood; // was ist ein Treffer (incl.)
@@ -853,19 +853,19 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
nMaxCont = SC_DOCCOMP_ROWS; // 100 Zeilen
nMinGood = SC_DOCCOMP_MINGOOD;
}
- BOOL bUseTotal = bColumns && !pTranslate; // nur beim ersten Durchgang
+ sal_Bool bUseTotal = bColumns && !pTranslate; // nur beim ersten Durchgang
SCCOLROW nOtherRow = 0;
- USHORT nComp;
+ sal_uInt16 nComp;
SCCOLROW nThisRow;
- BOOL bTotal = FALSE; // ueber verschiedene nThisRow beibehalten
+ sal_Bool bTotal = false; // ueber verschiedene nThisRow beibehalten
SCCOLROW nUnknown = 0;
for (nThisRow = 0; nThisRow <= nThisEndRow; nThisRow++)
{
SCCOLROW nTempOther = nOtherRow;
- BOOL bFound = FALSE;
- USHORT nBest = SC_DOCCOMP_MAXDIFF;
+ sal_Bool bFound = false;
+ sal_uInt16 nBest = SC_DOCCOMP_MAXDIFF;
SCCOLROW nMax = Min( nOtherEndRow, static_cast<SCCOLROW>(( nTempOther + nMaxCont + nUnknown )) );
for (SCCOLROW i=nTempOther; i<=nMax && nBest>0; i++) // bei 0 abbrechen
{
@@ -877,12 +877,12 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
{
nTempOther = i;
nBest = nComp;
- bFound = TRUE;
+ bFound = sal_True;
}
if ( nComp < SC_DOCCOMP_MAXDIFF || bFound )
- bTotal = FALSE;
+ bTotal = false;
else if ( i == nTempOther && bUseTotal )
- bTotal = TRUE; // nur ganz oben
+ bTotal = sal_True; // nur ganz oben
}
if ( bFound )
{
@@ -897,14 +897,14 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
}
if (pProgress)
- pProgress->SetStateOnPercent(nProAdd+static_cast<ULONG>(nThisRow));
+ pProgress->SetStateOnPercent(nProAdd+static_cast<sal_uLong>(nThisRow));
}
// Bloecke ohne Uebereinstimmung ausfuellen
SCROW nFillStart = 0;
SCROW nFillPos = 0;
- BOOL bInFill = FALSE;
+ sal_Bool bInFill = false;
for (nThisRow = 0; nThisRow <= nThisEndRow+1; nThisRow++)
{
SCROW nThisOther = ( nThisRow <= nThisEndRow ) ? pOtherRows[nThisRow] : (nOtherEndRow+1);
@@ -921,13 +921,13 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
pOtherRows[nFillPos+i] = nFillStart+i;
}
- bInFill = FALSE;
+ bInFill = false;
}
nFillStart = nThisOther + 1;
nFillPos = nThisRow + 1;
}
else
- bInFill = TRUE;
+ bInFill = sal_True;
}
}
@@ -963,7 +963,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
// auffuellen, damit einzeln umbenannte Tabellen nicht wegfallen
SCTAB nFillStart = 0;
SCTAB nFillPos = 0;
- BOOL bInFill = FALSE;
+ sal_Bool bInFill = false;
for (nThisTab = 0; nThisTab <= nThisCount; nThisTab++)
{
SCTAB nThisOther = ( nThisTab < nThisCount ) ? pOtherTabs[nThisTab] : nOtherCount;
@@ -981,13 +981,13 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
pOtherTabs[nFillPos+i] = nFillStart+i;
}
- bInFill = FALSE;
+ bInFill = false;
}
nFillStart = nThisOther + 1;
nFillPos = nThisTab + 1;
}
else
- bInFill = TRUE;
+ bInFill = sal_True;
}
//
@@ -1009,7 +1009,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
SCROW nEndRow = Max(nThisEndRow, nOtherEndRow);
SCCOL nThisCol;
SCROW nThisRow;
- ULONG n1,n2; // fuer AppendDeleteRange
+ sal_uLong n1,n2; // fuer AppendDeleteRange
//! ein Progress ueber alle Tabellen ???
String aTabName;
@@ -1035,23 +1035,23 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
//! Spalten vergleichen zweimal mit unterschiedlichem nMinGood ???
// 1
- FindOrder( pTempRows, nThisEndRow, nOtherEndRow, FALSE,
+ FindOrder( pTempRows, nThisEndRow, nOtherEndRow, false,
rOtherDoc, nThisTab, nOtherTab, nEndCol, NULL, &aProgress, 0 );
// 2
- FindOrder( pOtherCols, nThisEndCol, nOtherEndCol, TRUE,
+ FindOrder( pOtherCols, nThisEndCol, nOtherEndCol, sal_True,
rOtherDoc, nThisTab, nOtherTab, nEndRow, NULL, NULL, 0 );
- FindOrder( pOtherRows, nThisEndRow, nOtherEndRow, FALSE,
+ FindOrder( pOtherRows, nThisEndRow, nOtherEndRow, false,
rOtherDoc, nThisTab, nOtherTab, nThisEndCol,
pOtherCols, &aProgress, nThisEndRow );
- ULONG nMatch1 = 0; // pTempRows, keine Spalten
+ sal_uLong nMatch1 = 0; // pTempRows, keine Spalten
for (nThisRow = 0; nThisRow<=nThisEndRow; nThisRow++)
if (ValidRow(pTempRows[nThisRow]))
nMatch1 += SC_DOCCOMP_MAXDIFF -
RowDifferences( nThisRow, nThisTab, rOtherDoc, pTempRows[nThisRow],
nOtherTab, nEndCol, NULL );
- ULONG nMatch2 = 0; // pOtherRows, pOtherCols
+ sal_uLong nMatch2 = 0; // pOtherRows, pOtherCols
for (nThisRow = 0; nThisRow<=nThisEndRow; nThisRow++)
if (ValidRow(pOtherRows[nThisRow]))
nMatch2 += SC_DOCCOMP_MAXDIFF -
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 4a6136fa2e3c..a737a5966764 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -130,11 +130,11 @@ void ScDocument::UpdateAllCharts()
if ( !pDrawLayer || !pShell )
return;
- USHORT nDataCount = pChartCollection->GetCount();
+ sal_uInt16 nDataCount = pChartCollection->GetCount();
if ( !nDataCount )
return ; // nothing to do
- USHORT nPos;
+ sal_uInt16 nPos;
for (SCTAB nTab=0; nTab<=MAXTAB; nTab++)
{
@@ -204,7 +204,7 @@ void ScDocument::UpdateAllCharts()
pChartCollection->FreeAll();
}
-BOOL ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
+sal_Bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
{
if (pDrawLayer && pTab[nTab])
{
@@ -224,7 +224,7 @@ BOOL ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
{
if (pName)
*pName = ((SdrOle2Obj*)pObject)->GetPersistName();
- return TRUE;
+ return sal_True;
}
}
pObject = aIter.Next();
@@ -233,12 +233,12 @@ BOOL ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
if (pName)
pName->Erase();
- return FALSE; // nothing found
+ return false; // nothing found
}
void ScDocument::UpdateChartArea( const String& rChartName,
- const ScRange& rNewArea, BOOL bColHeaders, BOOL bRowHeaders,
- BOOL bAdd )
+ const ScRange& rNewArea, sal_Bool bColHeaders, sal_Bool bRowHeaders,
+ sal_Bool bAdd )
{
ScRangeListRef aRLR( new ScRangeList );
aRLR->Append( rNewArea );
@@ -309,7 +309,7 @@ void ScDocument::SetChartRanges( const String& rChartName, const ::std::vector<
}
void ScDocument::GetOldChartParameters( const String& rName,
- ScRangeList& rRanges, BOOL& rColHeaders, BOOL& rRowHeaders )
+ ScRangeList& rRanges, sal_Bool& rColHeaders, sal_Bool& rRowHeaders )
{
// used for undo of changing chart source area
@@ -358,8 +358,8 @@ void ScDocument::GetOldChartParameters( const String& rName,
}
void ScDocument::UpdateChartArea( const String& rChartName,
- const ScRangeListRef& rNewList, BOOL bColHeaders, BOOL bRowHeaders,
- BOOL bAdd )
+ const ScRangeListRef& rNewList, sal_Bool bColHeaders, sal_Bool bRowHeaders,
+ sal_Bool bAdd )
{
if (!pDrawLayer)
return;
@@ -461,9 +461,12 @@ void ScDocument::UpdateChart( const String& rChartName )
}
// After the update, chart keeps track of its own data source ranges,
- // the listener doesn't need to listen anymore.
- if(pChartListenerCollection)
+ // the listener doesn't need to listen anymore, except the chart has
+ // an internal data provider.
+ if ( !( xChartDoc.is() && xChartDoc->hasInternalDataProvider() ) && pChartListenerCollection )
+ {
pChartListenerCollection->ChangeListening( rChartName, new ScRangeList );
+ }
}
void ScDocument::RestoreChartListener( const String& rName )
@@ -503,15 +506,15 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
if (!pDrawLayer)
return;
- USHORT nChartCount = pChartListenerCollection->GetCount();
- for ( USHORT nIndex = 0; nIndex < nChartCount; nIndex++ )
+ sal_uInt16 nChartCount = pChartListenerCollection->GetCount();
+ for ( sal_uInt16 nIndex = 0; nIndex < nChartCount; nIndex++ )
{
ScChartListener* pChartListener =
(ScChartListener*) (pChartListenerCollection->At(nIndex));
ScRangeListRef aRLR( pChartListener->GetRangeList() );
ScRangeListRef aNewRLR( new ScRangeList );
- BOOL bChanged = FALSE;
- BOOL bDataChanged = FALSE;
+ sal_Bool bChanged = false;
+ sal_Bool bDataChanged = false;
for ( size_t i = 0, nListSize = aRLR->size(); i < nListSize; ++i )
{
ScRange* pR = (*aRLR)[i];
@@ -529,7 +532,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
theCol2,theRow2,theTab2 );
if ( eRes != UR_NOTHING )
{
- bChanged = TRUE;
+ bChanged = sal_True;
aNewRLR->Append( ScRange(
theCol1, theRow1, theTab1,
theCol2, theRow2, theTab2 ));
@@ -543,7 +546,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
|| (pR->aEnd.Tab() - pR->aStart.Tab()
!= theTab2 - theTab1))) )
{
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else
@@ -560,9 +563,28 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
svt::EmbeddedObjectRef::TryRunningState( xIPObj );
// After the change, chart keeps track of its own data source ranges,
- // the listener doesn't need to listen anymore.
-
- pChartListener->ChangeListening( new ScRangeList, bDataChanged );
+ // the listener doesn't need to listen anymore, except the chart has
+ // an internal data provider.
+ bool bInternalDataProvider = false;
+ if ( xIPObj.is() )
+ {
+ try
+ {
+ uno::Reference< chart2::XChartDocument > xChartDoc( xIPObj->getComponent(), uno::UNO_QUERY_THROW );
+ bInternalDataProvider = xChartDoc->hasInternalDataProvider();
+ }
+ catch ( uno::Exception& )
+ {
+ }
+ }
+ if ( bInternalDataProvider )
+ {
+ pChartListener->ChangeListening( aNewRLR, bDataChanged );
+ }
+ else
+ {
+ pChartListener->ChangeListening( new ScRangeList, bDataChanged );
+ }
}
}
}
@@ -615,12 +637,12 @@ void ScDocument::SetChartRangeList( const String& rChartName,
}
-BOOL ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_Bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
if (pTab[nTab])
return pTab[nTab]->HasData( nCol, nRow );
else
- return FALSE;
+ return false;
}
uno::Reference< embed::XEmbeddedObject >
@@ -659,19 +681,19 @@ uno::Reference< embed::XEmbeddedObject >
return uno::Reference< embed::XEmbeddedObject >();
}
-BOOL lcl_StringInCollection( const ScStrCollection* pColl, const String& rStr )
+sal_Bool lcl_StringInCollection( const ScStrCollection* pColl, const String& rStr )
{
if ( !pColl )
- return FALSE;
+ return false;
StrData aData( rStr );
- USHORT nDummy;
+ sal_uInt16 nDummy;
return pColl->Search( &aData, nDummy );
}
void ScDocument::UpdateChartListenerCollection()
{
- bChartListenerCollectionNeedsUpdate = FALSE;
+ bChartListenerCollectionNeedsUpdate = false;
if (!pDrawLayer)
return;
else
@@ -697,11 +719,11 @@ void ScDocument::UpdateChartListenerCollection()
{
String aObjName = ((SdrOle2Obj*)pObject)->GetPersistName();
aCLSearcher.SetString( aObjName );
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( pChartListenerCollection->Search( &aCLSearcher, nIndex ) )
{
((ScChartListener*) (pChartListenerCollection->
- At( nIndex )))->SetUsed( TRUE );
+ At( nIndex )))->SetUsed( sal_True );
}
else if ( lcl_StringInCollection( pOtherObjects, aObjName ) )
{
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index 9c19661dad8f..f747788977cf 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -70,7 +70,7 @@ const uno::Reference< i18n::XBreakIterator >& ScDocument::GetBreakIterator()
return pScriptTypeData->xBreakIter;
}
-BOOL ScDocument::HasStringWeakCharacters( const String& rString )
+sal_Bool ScDocument::HasStringWeakCharacters( const String& rString )
{
if (rString.Len())
{
@@ -85,7 +85,7 @@ BOOL ScDocument::HasStringWeakCharacters( const String& rString )
{
sal_Int16 nType = xBreakIter->getScriptType( aText, nPos );
if ( nType == i18n::ScriptType::WEAK )
- return TRUE; // found
+ return sal_True; // found
nPos = xBreakIter->endOfScript( aText, nPos, nType );
}
@@ -93,13 +93,13 @@ BOOL ScDocument::HasStringWeakCharacters( const String& rString )
}
}
- return FALSE; // none found
+ return false; // none found
}
-BYTE ScDocument::GetStringScriptType( const String& rString )
+sal_uInt8 ScDocument::GetStringScriptType( const String& rString )
{
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
if (rString.Len())
{
uno::Reference<i18n::XBreakIterator> xBreakIter = GetBreakIterator();
@@ -133,12 +133,12 @@ BYTE ScDocument::GetStringScriptType( const String& rString )
return nRet;
}
-BYTE ScDocument::GetCellScriptType( ScBaseCell* pCell, ULONG nNumberFormat )
+sal_uInt8 ScDocument::GetCellScriptType( ScBaseCell* pCell, sal_uLong nNumberFormat )
{
if ( !pCell )
return 0; // empty
- BYTE nStored = pCell->GetScriptType();
+ sal_uInt8 nStored = pCell->GetScriptType();
if ( nStored != SC_SCRIPTTYPE_UNKNOWN ) // stored value valid?
return nStored; // use stored value
@@ -146,14 +146,14 @@ BYTE ScDocument::GetCellScriptType( ScBaseCell* pCell, ULONG nNumberFormat )
Color* pColor;
ScCellFormat::GetString( pCell, nNumberFormat, aStr, &pColor, *xPoolHelper->GetFormTable() );
- BYTE nRet = GetStringScriptType( aStr );
+ sal_uInt8 nRet = GetStringScriptType( aStr );
pCell->SetScriptType( nRet ); // store for later calls
return nRet;
}
-BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell )
+sal_uInt8 ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell )
{
// if cell is not passed, take from document
@@ -166,7 +166,7 @@ BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*
// if script type is set, don't have to get number formats
- BYTE nStored = pCell->GetScriptType();
+ sal_uInt8 nStored = pCell->GetScriptType();
if ( nStored != SC_SCRIPTTYPE_UNKNOWN ) // stored value valid?
return nStored; // use stored value
@@ -178,7 +178,7 @@ BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*
if ( ((const SfxUInt32Item&)pPattern->GetItem(ATTR_CONDITIONAL)).GetValue() )
pCondSet = GetCondResult( nCol, nRow, nTab );
- ULONG nFormat = pPattern->GetNumberFormat( xPoolHelper->GetFormTable(), pCondSet );
+ sal_uLong nFormat = pPattern->GetNumberFormat( xPoolHelper->GetFormTable(), pCondSet );
return GetCellScriptType( pCell, nFormat );
}
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 98bf119e94f3..3bbfde5b31a1 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -76,7 +76,7 @@ void ScDocument::EndListeningArea( const ScRange& rRange,
}
-void ScDocument::Broadcast( ULONG nHint, const ScAddress& rAddr,
+void ScDocument::Broadcast( sal_uLong nHint, const ScAddress& rAddr,
ScBaseCell* pCell
)
{
@@ -94,7 +94,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
if ( !nHardRecalcState )
{
ScBulkBroadcast aBulkBroadcast( pBASM); // scoped bulk broadcast
- BOOL bIsBroadcasted = FALSE;
+ sal_Bool bIsBroadcasted = false;
ScBaseCell* pCell = rHint.GetCell();
if ( pCell )
{
@@ -102,7 +102,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
if ( pBC )
{
pBC->Broadcast( rHint );
- bIsBroadcasted = TRUE;
+ bIsBroadcasted = sal_True;
}
}
if ( pBASM->AreaBroadcast( rHint ) || bIsBroadcasted )
@@ -117,7 +117,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
{
SCTAB nTab = rHint.GetAddress().Tab();
if (pTab[nTab] && pTab[nTab]->IsStreamValid())
- pTab[nTab]->SetStreamValid(FALSE);
+ pTab[nTab]->SetStreamValid(false);
}
}
@@ -241,7 +241,7 @@ void ScDocument::RemoveFromFormulaTree( ScFormulaCell* pCell )
pEOFormulaTree = pPrev; // ist letzte Zelle
pCell->SetPrevious( 0 );
pCell->SetNext( 0 );
- USHORT nRPN = pCell->GetCode()->GetCodeLen();
+ sal_uInt16 nRPN = pCell->GetCode()->GetCodeLen();
if ( nFormulaCodeInTree >= nRPN )
nFormulaCodeInTree -= nRPN;
else
@@ -258,27 +258,27 @@ void ScDocument::RemoveFromFormulaTree( ScFormulaCell* pCell )
}
-BOOL ScDocument::IsInFormulaTree( ScFormulaCell* pCell ) const
+sal_Bool ScDocument::IsInFormulaTree( ScFormulaCell* pCell ) const
{
return pCell->GetPrevious() || pFormulaTree == pCell;
}
-void ScDocument::CalcFormulaTree( BOOL bOnlyForced, BOOL bNoProgress )
+void ScDocument::CalcFormulaTree( sal_Bool bOnlyForced, sal_Bool bNoProgress )
{
DBG_ASSERT( !IsCalculatingFormulaTree(), "CalcFormulaTree recursion" );
// never ever recurse into this, might end up lost in infinity
if ( IsCalculatingFormulaTree() )
return ;
- bCalculatingFormulaTree = TRUE;
+ bCalculatingFormulaTree = sal_True;
- SetForcedFormulaPending( FALSE );
- BOOL bOldIdleDisabled = IsIdleDisabled();
- DisableIdle( TRUE );
- BOOL bOldAutoCalc = GetAutoCalc();
- //! _nicht_ SetAutoCalc( TRUE ) weil das evtl. CalcFormulaTree( TRUE )
+ SetForcedFormulaPending( false );
+ sal_Bool bOldIdleDisabled = IsIdleDisabled();
+ DisableIdle( sal_True );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ //! _nicht_ SetAutoCalc( sal_True ) weil das evtl. CalcFormulaTree( sal_True )
//! aufruft, wenn vorher disabled war und bHasForcedFormulas gesetzt ist
- bAutoCalc = TRUE;
+ bAutoCalc = sal_True;
if ( nHardRecalcState )
CalcAll();
else
@@ -306,9 +306,9 @@ void ScDocument::CalcFormulaTree( BOOL bOnlyForced, BOOL bNoProgress )
}
}
}
- BOOL bProgress = !bOnlyForced && nFormulaCodeInTree && !bNoProgress;
+ sal_Bool bProgress = !bOnlyForced && nFormulaCodeInTree && !bNoProgress;
if ( bProgress )
- ScProgress::CreateInterpretProgress( this, TRUE );
+ ScProgress::CreateInterpretProgress( this, sal_True );
pCell = pFormulaTree;
ScFormulaCell* pLastNoGood = 0;
@@ -366,7 +366,7 @@ void ScDocument::CalcFormulaTree( BOOL bOnlyForced, BOOL bNoProgress )
}
bAutoCalc = bOldAutoCalc;
DisableIdle( bOldIdleDisabled );
- bCalculatingFormulaTree = FALSE;
+ bCalculatingFormulaTree = false;
}
@@ -424,7 +424,7 @@ void ScDocument::RemoveFromFormulaTrack( ScFormulaCell* pCell )
}
-BOOL ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
+sal_Bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
{
return pCell->GetPreviousTrack() || pFormulaTrack == pCell;
}
@@ -436,7 +436,7 @@ BOOL ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
Der nachfolgende broadcastet wieder usw.
View stoesst Interpret an.
*/
-void ScDocument::TrackFormulas( ULONG nHintId )
+void ScDocument::TrackFormulas( sal_uLong nHintId )
{
if ( pFormulaTrack )
@@ -462,24 +462,24 @@ void ScDocument::TrackFormulas( ULONG nHintId )
pTrack = pTrack->GetNextTrack();
} while ( pTrack );
pTrack = pFormulaTrack;
- BOOL bHaveForced = FALSE;
+ sal_Bool bHaveForced = false;
do
{
pNext = pTrack->GetNextTrack();
RemoveFromFormulaTrack( pTrack );
PutInFormulaTree( pTrack );
if ( pTrack->GetCode()->IsRecalcModeForced() )
- bHaveForced = TRUE;
+ bHaveForced = sal_True;
pTrack = pNext;
} while ( pTrack );
if ( bHaveForced )
{
- SetForcedFormulas( TRUE );
+ SetForcedFormulas( sal_True );
if ( bAutoCalc && !IsAutoCalcShellDisabled() && !IsInInterpreter()
&& !IsCalculatingFormulaTree() )
- CalcFormulaTree( TRUE );
+ CalcFormulaTree( sal_True );
else
- SetForcedFormulaPending( TRUE );
+ SetForcedFormulaPending( sal_True );
}
}
DBG_ASSERT( nFormulaTrackCount==0, "TrackFormulas: nFormulaTrackCount!=0" );
@@ -497,7 +497,7 @@ void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz
)
{
- BOOL bExpandRefsOld = IsExpandRefs();
+ sal_Bool bExpandRefsOld = IsExpandRefs();
if ( eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0 || nDz > 0) )
SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() );
if ( pBASM )
@@ -505,16 +505,16 @@ void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
SetExpandRefs( bExpandRefsOld );
}
-void ScDocument::SetAutoCalc( BOOL bNewAutoCalc )
+void ScDocument::SetAutoCalc( sal_Bool bNewAutoCalc )
{
- BOOL bOld = bAutoCalc;
+ sal_Bool bOld = bAutoCalc;
bAutoCalc = bNewAutoCalc;
if ( !bOld && bNewAutoCalc && bHasForcedFormulas )
{
if ( IsAutoCalcShellDisabled() )
- SetForcedFormulaPending( TRUE );
+ SetForcedFormulaPending( sal_True );
else if ( !IsInInterpreter() )
- CalcFormulaTree( TRUE );
+ CalcFormulaTree( sal_True );
}
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 0b525317ea12..cec0c0c45ca0 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -96,6 +96,7 @@
#include "charthelper.hxx"
#include "macromgr.hxx"
#include "dpobject.hxx"
+#include "docuno.hxx"
#define GET_SCALEVALUE(set,id) ((const SfxUInt16Item&)(set.Get( id ))).GetValue()
@@ -125,7 +126,7 @@ void ScDocument::ImplDeleteOptions()
//------------------------------------------------------------------------
-SfxPrinter* ScDocument::GetPrinter(BOOL bCreateIfNotExist)
+SfxPrinter* ScDocument::GetPrinter(sal_Bool bCreateIfNotExist)
{
if ( !pPrinter && bCreateIfNotExist )
{
@@ -138,7 +139,7 @@ SfxPrinter* ScDocument::GetPrinter(BOOL bCreateIfNotExist)
NULL );
::utl::MiscCfg aMisc;
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( aMisc.IsPaperOrientationWarning() )
nFlags |= SFX_PRINTER_CHG_ORIENTATION;
if ( aMisc.IsPaperSizeWarning() )
@@ -174,7 +175,7 @@ void ScDocument::SetPrinter( SfxPrinter* pNewPrinter )
pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
delete pOld;
}
- InvalidateTextWidth(NULL, NULL, FALSE); // in both cases
+ InvalidateTextWidth(NULL, NULL, false); // in both cases
}
//------------------------------------------------------------------------
@@ -189,7 +190,7 @@ void ScDocument::SetPrintOptions()
::utl::MiscCfg aMisc;
SfxItemSet aOptSet( pPrinter->GetOptions() );
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( aMisc.IsPaperOrientationWarning() )
nFlags |= SFX_PRINTER_CHG_ORIENTATION;
if ( aMisc.IsPaperSizeWarning() )
@@ -238,11 +239,11 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
{
case SFX_STYLE_FAMILY_PAGE:
{
- const USHORT nOldScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
- const USHORT nOldScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nOldScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nOldScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
rSet.Put( rChanges );
- const USHORT nNewScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
- const USHORT nNewScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nNewScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nNewScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
if ( (nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages) )
InvalidateTextWidth( rStyleSheet.GetName() );
@@ -250,7 +251,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
if( SvtLanguageOptions().IsCTLFontEnabled() )
{
const SfxPoolItem *pItem = NULL;
- if( rChanges.GetItemState(ATTR_WRITINGDIR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if( rChanges.GetItemState(ATTR_WRITINGDIR, sal_True, &pItem ) == SFX_ITEM_SET )
ScChartHelper::DoUpdateAllCharts( this );
}
}
@@ -258,19 +259,19 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
case SFX_STYLE_FAMILY_PARA:
{
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rSet, rChanges ) )
InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
for (SCTAB nTab=0; nTab<=MAXTAB; ++nTab)
if (pTab[nTab] && pTab[nTab]->IsStreamValid())
- pTab[nTab]->SetStreamValid( FALSE );
+ pTab[nTab]->SetStreamValid( false );
- ULONG nOldFormat =
+ sal_uLong nOldFormat =
((const SfxUInt32Item*)&rSet.Get(
ATTR_VALUE_FORMAT ))->GetValue();
- ULONG nNewFormat =
+ sal_uLong nNewFormat =
((const SfxUInt32Item*)&rChanges.Get(
ATTR_VALUE_FORMAT ))->GetValue();
LanguageType eNewLang, eOldLang;
@@ -287,10 +288,10 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
// Dontcare - Default setzen
// Default - keine Aenderung
// ("keine Aenderung" geht nicht mit PutExtended, darum Schleife)
- for (USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
+ for (sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
{
const SfxPoolItem* pItem;
- SfxItemState eState = rChanges.GetItemState( nWhich, FALSE, &pItem );
+ SfxItemState eState = rChanges.GetItemState( nWhich, false, &pItem );
if ( eState == SFX_ITEM_SET )
rSet.Put( *pItem );
else if ( eState == SFX_ITEM_DONTCARE )
@@ -335,14 +336,14 @@ void ScDocument::InvalidateTextWidth( SCTAB nTab )
{
ScAddress aAdrFrom( 0, 0, nTab );
ScAddress aAdrTo ( MAXCOL, MAXROW, nTab );
- InvalidateTextWidth( &aAdrFrom, &aAdrTo, FALSE );
+ InvalidateTextWidth( &aAdrFrom, &aAdrTo, false );
}
//------------------------------------------------------------------------
-BOOL ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab )
+sal_Bool ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab )
{
- BOOL bInUse = FALSE;
+ sal_Bool bInUse = false;
const SCTAB nCount = GetTableCount();
SCTAB i;
@@ -357,30 +358,30 @@ BOOL ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab )
//------------------------------------------------------------------------
-BOOL ScDocument::RemovePageStyleInUse( const String& rStyle )
+sal_Bool ScDocument::RemovePageStyleInUse( const String& rStyle )
{
- BOOL bWasInUse = FALSE;
+ sal_Bool bWasInUse = false;
const SCTAB nCount = GetTableCount();
for ( SCTAB i=0; i<nCount && pTab[i]; i++ )
if ( pTab[i]->GetPageStyle() == rStyle )
{
- bWasInUse = TRUE;
+ bWasInUse = sal_True;
pTab[i]->SetPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
}
return bWasInUse;
}
-BOOL ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew )
+sal_Bool ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew )
{
- BOOL bWasInUse = FALSE;
+ sal_Bool bWasInUse = false;
const SCTAB nCount = GetTableCount();
for ( SCTAB i=0; i<nCount && pTab[i]; i++ )
if ( pTab[i]->GetPageStyle() == rOld )
{
- bWasInUse = TRUE;
+ bWasInUse = sal_True;
pTab[i]->SetPageStyle( rNew );
}
@@ -389,7 +390,7 @@ BOOL ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew )
//------------------------------------------------------------------------
-BYTE ScDocument::GetEditTextDirection(SCTAB nTab) const
+sal_uInt8 ScDocument::GetEditTextDirection(SCTAB nTab) const
{
EEHorizontalTextDirection eRet = EE_HTEXTDIR_DEFAULT;
@@ -408,7 +409,7 @@ BYTE ScDocument::GetEditTextDirection(SCTAB nTab) const
// else (invalid for EditEngine): keep "default"
}
- return sal::static_int_cast<BYTE>(eRet);
+ return sal::static_int_cast<sal_uInt8>(eRet);
}
ScMacroManager* ScDocument::GetMacroManager()
@@ -421,9 +422,9 @@ ScMacroManager* ScDocument::GetMacroManager()
//------------------------------------------------------------------------
void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
- BOOL bNumFormatChanged )
+ sal_Bool bNumFormatChanged )
{
- BOOL bBroadcast = (bNumFormatChanged && GetDocOptions().IsCalcAsShown() && !IsImportingXML() && !IsClipboard());
+ sal_Bool bBroadcast = (bNumFormatChanged && GetDocOptions().IsCalcAsShown() && !IsImportingXML() && !IsClipboard());
if ( pAdrFrom && !pAdrTo )
{
const SCTAB nTab = pAdrFrom->Tab();
@@ -447,14 +448,14 @@ void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress
#define CALCMAX 1000 // Berechnungen
#define ABORT_EVENTS (INPUT_ANY & ~INPUT_TIMER & ~INPUT_OTHER)
-BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder versuchen
+sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wieder versuchen
{
// #i75610# if a printer hasn't been set or created yet, don't create one for this
- if ( bIdleDisabled || IsInLinkUpdate() || GetPrinter(FALSE) == NULL )
- return FALSE;
- bIdleDisabled = TRUE;
+ if ( bIdleDisabled || IsInLinkUpdate() || GetPrinter(false) == NULL )
+ return false;
+ bIdleDisabled = sal_True;
- const ULONG nStart = Time::GetSystemTicks();
+ const sal_uLong nStart = Time::GetSystemTicks();
OutputDevice* pDev = NULL;
MapMode aOldMap;
ScStyleSheet* pStyle = NULL;
@@ -465,7 +466,7 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
SCTAB nTab = aCurTextWidthCalcPos.Tab();
SCROW nRow = aCurTextWidthCalcPos.Row();
SCsCOL nCol = aCurTextWidthCalcPos.Col();
- BOOL bNeedMore= FALSE;
+ sal_Bool bNeedMore= false;
if ( !ValidRow(nRow) )
nRow = 0, nCol--;
@@ -479,7 +480,7 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
// Query-Box aufgemacht wird !!!
ScStyleSheetPool* pStylePool = xPoolHelper->GetStylePool();
- USHORT nOldMask = pStylePool->GetSearchMask();
+ sal_uInt16 nOldMask = pStylePool->GetSearchMask();
SfxStyleFamily eOldFam = pStylePool->GetSearchFamily();
pTable = pTab[nTab];
@@ -489,12 +490,12 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
DBG_ASSERT( pStyle, "Missing StyleSheet :-/" );
- BOOL bProgress = FALSE;
+ sal_Bool bProgress = false;
if ( pStyle && 0 == GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALETOPAGES) )
{
- USHORT nRestart = 0;
- USHORT nZoom = 0;
- USHORT nCount = 0;
+ sal_uInt16 nRestart = 0;
+ sal_uInt16 nZoom = 0;
+ sal_uInt16 nCount = 0;
nZoom = GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALE);
Fraction aZoomFract( nZoom, 100 );
@@ -522,23 +523,23 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
if ( !bProgress && pCell->GetCellType() == CELLTYPE_FORMULA
&& ((ScFormulaCell*)pCell)->GetDirty() )
{
- ScProgress::CreateInterpretProgress( this, FALSE );
- bProgress = TRUE;
+ ScProgress::CreateInterpretProgress( this, false );
+ bProgress = sal_True;
}
- USHORT nNewWidth = (USHORT)GetNeededSize( nCol, nRow, nTab,
+ sal_uInt16 nNewWidth = (sal_uInt16)GetNeededSize( nCol, nRow, nTab,
pDev, nPPTX, nPPTY,
- aZoomFract,aZoomFract, TRUE,
- TRUE ); // bTotalSize
+ aZoomFract,aZoomFract, sal_True,
+ sal_True ); // bTotalSize
pCell->SetTextWidth( nNewWidth );
- bNeedMore = TRUE;
+ bNeedMore = sal_True;
}
}
else
{
- BOOL bNewTab = FALSE;
+ sal_Bool bNewTab = false;
nRow = 0;
nCol--;
@@ -547,14 +548,14 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
{
nCol = MAXCOL;
nTab++;
- bNewTab = TRUE;
+ bNewTab = sal_True;
}
if ( !ValidTab(nTab) || !pTab[nTab] )
{
nTab = 0;
nRestart++;
- bNewTab = TRUE;
+ bNewTab = sal_True;
}
if ( nRestart < 2 )
@@ -619,7 +620,7 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
aCurTextWidthCalcPos.SetCol( (SCCOL)nCol );
pStylePool->SetSearchMask( eOldFam, nOldMask );
- bIdleDisabled = FALSE;
+ bIdleDisabled = false;
return bNeedMore;
}
@@ -629,18 +630,18 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
class ScSpellStatus
{
public:
- BOOL bModified;
+ sal_Bool bModified;
- ScSpellStatus() : bModified(FALSE) {};
+ ScSpellStatus() : bModified(false) {};
DECL_LINK (EventHdl, EditStatus*);
};
IMPL_LINK( ScSpellStatus, EventHdl, EditStatus *, pStatus )
{
- ULONG nStatus = pStatus->GetStatusWord();
+ sal_uLong nStatus = pStatus->GetStatusWord();
if ( nStatus & EE_STAT_WRONGWORDCHANGED )
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -656,16 +657,16 @@ IMPL_LINK( ScSpellStatus, EventHdl, EditStatus *, pStatus )
#define SPELL_MAXTEST_ALL 3
#define SPELL_MAXCELLS 256
-BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos,
- USHORT nMaxTest )
+sal_Bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos,
+ sal_uInt16 nMaxTest )
{
ScEditEngineDefaulter* pEngine = NULL; //! am Dokument speichern
SfxItemSet* pDefaults = NULL;
ScSpellStatus aStatus;
- USHORT nCellCount = 0; // Zellen insgesamt
- USHORT nTestCount = 0; // Aufrufe Spelling
- BOOL bChanged = FALSE; // Aenderungen?
+ sal_uInt16 nCellCount = 0; // Zellen insgesamt
+ sal_uInt16 nTestCount = 0; // Aufrufe Spelling
+ sal_Bool bChanged = false; // Aenderungen?
SCCOL nCol = rSpellRange.aStart.Col(); // iterator always starts on the left edge
SCROW nRow = rSpellPos.Row();
@@ -677,7 +678,7 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
if ( !pTab[nTab] )
{
// may happen for visible range
- return FALSE;
+ return false;
}
}
ScHorizontalCellIterator aIter( this, nTab,
@@ -717,9 +718,9 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
pPattern->FillEditItemSet( pDefaults );
- pEngine->SetDefaults( pDefaults, FALSE ); //! noetig ?
+ pEngine->SetDefaults( pDefaults, false ); //! noetig ?
- USHORT nCellLang = ((const SvxLanguageItem&)
+ sal_uInt16 nCellLang = ((const SvxLanguageItem&)
pPattern->GetItem(ATTR_FONT_LANGUAGE)).GetValue();
if ( nCellLang == LANGUAGE_SYSTEM )
nCellLang = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling
@@ -734,11 +735,11 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
else
pEngine->SetText( *((ScEditCell*)pCell)->GetData() );
- aStatus.bModified = FALSE;
+ aStatus.bModified = false;
pEngine->CompleteOnlineSpelling();
if ( aStatus.bModified ) // Fehler dazu oder weggekommen?
{
- BOOL bNeedEdit = TRUE; // Test auf einfachen Text
+ sal_Bool bNeedEdit = sal_True; // Test auf einfachen Text
if ( !pEngine->HasOnlineSpellErrors() )
{
ScEditAttrTester aTester( pEngine );
@@ -765,11 +766,11 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
// Seitenvorschau ist davon nicht betroffen
// (sollte jedenfalls nicht)
ScPaintHint aHint( ScRange( nCol, nRow, nTab ), PAINT_GRID );
- aHint.SetPrintFlag( FALSE );
+ aHint.SetPrintFlag( false );
pShell->Broadcast( aHint );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( ++nTestCount >= nMaxTest ) // checked enough text?
@@ -811,24 +812,24 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
}
-BOOL ScDocument::ContinueOnlineSpelling()
+sal_Bool ScDocument::ContinueOnlineSpelling()
{
if ( bIdleDisabled || !pDocOptions->IsAutoSpell() || (pShell && pShell->IsReadOnly()) )
- return FALSE;
+ return false;
// #i48433# set bInsertingFromOtherDoc flag so there are no broadcasts when PutCell is called
// (same behavior as in RemoveAutoSpellObj: just transfer the broadcaster)
- BOOL bOldInserting = IsInsertingFromOtherDoc();
- SetInsertingFromOtherDoc( TRUE );
+ sal_Bool bOldInserting = IsInsertingFromOtherDoc();
+ SetInsertingFromOtherDoc( sal_True );
//! use one EditEngine for both calls
// first check visible range
- BOOL bResult = OnlineSpellInRange( aVisSpellRange, aVisSpellPos, SPELL_MAXTEST_VIS );
+ sal_Bool bResult = OnlineSpellInRange( aVisSpellRange, aVisSpellPos, SPELL_MAXTEST_VIS );
// during first pass through visible range, always continue
if ( nVisSpellState == VSPL_START )
- bResult = TRUE;
+ bResult = sal_True;
if (bResult)
{
@@ -857,13 +858,13 @@ void ScDocument::SetOnlineSpellPos( const ScAddress& rPos )
aOnlineSpellPos = aVisSpellRange.aEnd;
}
-BOOL ScDocument::SetVisibleSpellRange( const ScRange& rNewRange )
+sal_Bool ScDocument::SetVisibleSpellRange( const ScRange& rNewRange )
{
- BOOL bChange = ( aVisSpellRange != rNewRange );
+ sal_Bool bChange = ( aVisSpellRange != rNewRange );
if (bChange)
{
// continue spelling through visible range when scrolling down
- BOOL bContDown = ( nVisSpellState == VSPL_START && rNewRange.In( aVisSpellPos ) &&
+ sal_Bool bContDown = ( nVisSpellState == VSPL_START && rNewRange.In( aVisSpellPos ) &&
rNewRange.aStart.Row() > aVisSpellRange.aStart.Row() &&
rNewRange.aStart.Col() == aVisSpellRange.aStart.Col() &&
rNewRange.aEnd.Col() == aVisSpellRange.aEnd.Col() );
@@ -891,17 +892,27 @@ void ScDocument::RemoveAutoSpellObj()
pTab[nTab]->RemoveAutoSpellObj();
}
+void ScDocument::RepaintRange( const ScRange& rRange )
+{
+ if ( bIsVisible && pShell )
+ {
+ ScModelObj* pModel = ScModelObj::getImplementation( pShell->GetModel() );
+ if ( pModel )
+ pModel->RepaintRange( rRange ); // locked repaints are checked there
+ }
+}
+
//------------------------------------------------------------------------
-BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuchen
+sal_Bool ScDocument::IdleCheckLinks() // sal_True = demnaechst wieder versuchen
{
- BOOL bAnyLeft = FALSE;
+ sal_Bool bAnyLeft = false;
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -911,7 +922,7 @@ BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuche
{
pDdeLink->TryUpdate();
if (pDdeLink->NeedsUpdate()) // war nix?
- bAnyLeft = TRUE;
+ bAnyLeft = sal_True;
}
}
}
@@ -923,15 +934,15 @@ BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuche
void ScDocument::SaveDdeLinks(SvStream& rStream) const
{
// bei 4.0-Export alle mit Modus != DEFAULT weglassen
- BOOL bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 );
+ sal_Bool bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 );
const ::sfx2::SvBaseLinks& rLinks = GetLinkManager()->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
// erstmal zaehlen...
- USHORT nDdeCount = 0;
- USHORT i;
+ sal_uInt16 nDdeCount = 0;
+ sal_uInt16 i;
for (i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
@@ -964,9 +975,9 @@ void ScDocument::LoadDdeLinks(SvStream& rStream)
ScMultipleReadHeader aHdr( rStream );
GetLinkManager();
- USHORT nCount;
+ sal_uInt16 nCount;
rStream >> nCount;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScDdeLink* pLink = new ScDdeLink( this, rStream, aHdr );
pLinkManager->InsertDDELink( pLink,
@@ -974,21 +985,21 @@ void ScDocument::LoadDdeLinks(SvStream& rStream)
}
}
-BOOL ScDocument::HasDdeLinks() const
+sal_Bool ScDocument::HasDdeLinks() const
{
if (GetLinkManager()) // Clipboard z.B. hat keinen LinkManager
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*rLinks[i])->ISA(ScDdeLink))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-void ScDocument::SetInLinkUpdate(BOOL bSet)
+void ScDocument::SetInLinkUpdate(sal_Bool bSet)
{
// called from TableLink and AreaLink
@@ -996,7 +1007,7 @@ void ScDocument::SetInLinkUpdate(BOOL bSet)
bInLinkUpdate = bSet;
}
-BOOL ScDocument::IsInLinkUpdate() const
+sal_Bool ScDocument::IsInLinkUpdate() const
{
return bInLinkUpdate || IsInDdeLinkUpdate();
}
@@ -1007,10 +1018,10 @@ void ScDocument::UpdateExternalRefLinks()
return;
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
bool bAny = false;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
ScExternalRefLink* pRefLink = dynamic_cast<ScExternalRefLink*>(pBase);
@@ -1029,7 +1040,7 @@ void ScDocument::UpdateExternalRefLinks()
// #i101960# set document modified, as in TrackTimeHdl for DDE links
if (!pShell->IsModified())
{
- pShell->SetModified( TRUE );
+ pShell->SetModified( sal_True );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
{
@@ -1045,19 +1056,19 @@ void ScDocument::UpdateDdeLinks()
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- USHORT i;
+ sal_uInt16 nCount = rLinks.Count();
+ sal_uInt16 i;
// falls das Updaten laenger dauert, erstmal alle Werte
// zuruecksetzen, damit nichts altes (falsches) stehen bleibt
- BOOL bAny = FALSE;
+ sal_Bool bAny = false;
for (i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
{
((ScDdeLink*)pBase)->ResetValue();
- bAny = TRUE;
+ bAny = sal_True;
}
}
if (bAny)
@@ -1082,18 +1093,18 @@ void ScDocument::UpdateDdeLinks()
}
}
-BOOL ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem )
+sal_Bool ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem )
{
// fuer refresh() per StarOne Api
// ResetValue() fuer einzelnen Link nicht noetig
//! wenn's mal alles asynchron wird, aber auch hier
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -1104,7 +1115,7 @@ BOOL ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const
pDdeLink->GetItem() == rItem )
{
pDdeLink->TryUpdate();
- bFound = TRUE; // koennen theoretisch mehrere sein (Mode), darum weitersuchen
+ bFound = sal_True; // koennen theoretisch mehrere sein (Mode), darum weitersuchen
}
}
}
@@ -1118,8 +1129,8 @@ void ScDocument::DisconnectDdeLinks()
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -1141,8 +1152,8 @@ void ScDocument::CopyDdeLinks( ScDocument* pDestDoc ) const
else if (GetLinkManager()) // Links direkt kopieren
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -1156,14 +1167,14 @@ void ScDocument::CopyDdeLinks( ScDocument* pDestDoc ) const
}
}
-USHORT ScDocument::GetDdeLinkCount() const
+sal_uInt16 ScDocument::GetDdeLinkCount() const
{
- USHORT nDdeCount = 0;
+ sal_uInt16 nDdeCount = 0;
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*rLinks[i])->ISA(ScDdeLink))
++nDdeCount;
}
@@ -1180,15 +1191,15 @@ namespace {
@return The DDE link, if it exists, otherwise 0. */
ScDdeLink* lclGetDdeLink(
const sfx2::LinkManager* pLinkManager,
- const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode,
- USHORT* pnDdePos = NULL )
+ const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode,
+ sal_uInt16* pnDdePos = NULL )
{
if( pLinkManager )
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
if( pnDdePos ) *pnDdePos = 0;
- for( USHORT nIndex = 0; nIndex < nCount; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < nCount; ++nIndex )
{
::sfx2::SvBaseLink* pLink = *rLinks[ nIndex ];
if( ScDdeLink* pDdeLink = PTR_CAST( ScDdeLink, pLink ) )
@@ -1208,14 +1219,14 @@ ScDdeLink* lclGetDdeLink(
/** Returns a pointer to the specified DDE link.
@param nDdePos Index of the DDE link (does not include other links from link manager).
@return The DDE link, if it exists, otherwise 0. */
-ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, USHORT nDdePos )
+ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, sal_uInt16 nDdePos )
{
if( pLinkManager )
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- USHORT nDdeIndex = 0; // counts only the DDE links
- for( USHORT nIndex = 0; nIndex < nCount; ++nIndex )
+ sal_uInt16 nCount = rLinks.Count();
+ sal_uInt16 nDdeIndex = 0; // counts only the DDE links
+ for( sal_uInt16 nIndex = 0; nIndex < nCount; ++nIndex )
{
::sfx2::SvBaseLink* pLink = *rLinks[ nIndex ];
if( ScDdeLink* pDdeLink = PTR_CAST( ScDdeLink, pLink ) )
@@ -1233,12 +1244,12 @@ ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, USHORT nDdePos
// ----------------------------------------------------------------------------
-bool ScDocument::FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, USHORT& rnDdePos )
+bool ScDocument::FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode, sal_uInt16& rnDdePos )
{
return lclGetDdeLink( GetLinkManager(), rAppl, rTopic, rItem, nMode, &rnDdePos ) != NULL;
}
-bool ScDocument::GetDdeLinkData( USHORT nDdePos, String& rAppl, String& rTopic, String& rItem ) const
+bool ScDocument::GetDdeLinkData( sal_uInt16 nDdePos, String& rAppl, String& rTopic, String& rItem ) const
{
if( const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
{
@@ -1250,7 +1261,7 @@ bool ScDocument::GetDdeLinkData( USHORT nDdePos, String& rAppl, String& rTopic,
return false;
}
-bool ScDocument::GetDdeLinkMode( USHORT nDdePos, BYTE& rnMode ) const
+bool ScDocument::GetDdeLinkMode( sal_uInt16 nDdePos, sal_uInt8& rnMode ) const
{
if( const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
{
@@ -1260,13 +1271,13 @@ bool ScDocument::GetDdeLinkMode( USHORT nDdePos, BYTE& rnMode ) const
return false;
}
-const ScMatrix* ScDocument::GetDdeLinkResultMatrix( USHORT nDdePos ) const
+const ScMatrix* ScDocument::GetDdeLinkResultMatrix( sal_uInt16 nDdePos ) const
{
const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos );
return pDdeLink ? pDdeLink->GetResult() : NULL;
}
-bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, ScMatrixRef pResults )
+bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode, ScMatrixRef pResults )
{
/* Create a DDE link without updating it (i.e. for Excel import), to prevent
unwanted connections. First try to find existing link. Set result array
@@ -1292,7 +1303,7 @@ bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const
return false;
}
-bool ScDocument::SetDdeLinkResultMatrix( USHORT nDdePos, ScMatrixRef pResults )
+bool ScDocument::SetDdeLinkResultMatrix( sal_uInt16 nDdePos, ScMatrixRef pResults )
{
if( ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
{
@@ -1304,18 +1315,18 @@ bool ScDocument::SetDdeLinkResultMatrix( USHORT nDdePos, ScMatrixRef pResults )
//------------------------------------------------------------------------
-BOOL ScDocument::HasAreaLinks() const
+sal_Bool ScDocument::HasAreaLinks() const
{
if (GetLinkManager()) // Clipboard z.B. hat keinen LinkManager
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*rLinks[i])->ISA(ScAreaLink))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScDocument::UpdateAreaLinks()
@@ -1323,8 +1334,8 @@ void ScDocument::UpdateAreaLinks()
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -1338,7 +1349,7 @@ void ScDocument::DeleteAreaLinksOnTab( SCTAB nTab )
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < rLinks.Count() )
{
const ::sfx2::SvBaseLink* pBase = *rLinks[nPos];
@@ -1359,8 +1370,8 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
bool bAnyUpdate = false;
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -1394,7 +1405,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
// If several links start at the same cell, the one with the lower index is removed
// (file format specifies only one link definition for a cell).
- USHORT nFirstIndex = 0;
+ sal_uInt16 nFirstIndex = 0;
while ( nFirstIndex < nCount )
{
bool bFound = false;
@@ -1402,7 +1413,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
if ( pFirst->ISA(ScAreaLink) )
{
ScAddress aFirstPos = static_cast<ScAreaLink*>(pFirst)->GetDestArea().aStart;
- for ( USHORT nSecondIndex = nFirstIndex + 1; nSecondIndex < nCount && !bFound; ++nSecondIndex )
+ for ( sal_uInt16 nSecondIndex = nFirstIndex + 1; nSecondIndex < nCount && !bFound; ++nSecondIndex )
{
::sfx2::SvBaseLink* pSecond = *rLinks[nSecondIndex];
if ( pSecond->ISA(ScAreaLink) &&
@@ -1435,12 +1446,12 @@ void ScDocument::KeyInput( const KeyEvent& )
// ----------------------------------------------------------------------------
-BOOL ScDocument::CheckMacroWarn()
+sal_Bool ScDocument::CheckMacroWarn()
{
// The check for macro configuration, macro warning and disabling is now handled
// in SfxObjectShell::AdjustMacroMode, called by SfxObjectShell::CallBasic.
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -1471,23 +1482,23 @@ SfxBindings* ScDocument::GetViewBindings()
void lcl_TransliterateEditEngine( ScEditEngineDefaulter& rEngine,
utl::TransliterationWrapper& rTranslitarationWrapper,
- BOOL bConsiderLanguage, ScDocument* pDoc )
+ sal_Bool bConsiderLanguage, ScDocument* pDoc )
{
//! should use TransliterateText method of EditEngine instead, when available!
sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
- USHORT nParCount = rEngine.GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ sal_uInt16 nParCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
SvUShorts aPortions;
- rEngine.GetPortions( (USHORT)nPar, aPortions );
+ rEngine.GetPortions( (sal_uInt16)nPar, aPortions );
- for ( USHORT nPos = aPortions.Count(); nPos; )
+ for ( sal_uInt16 nPos = aPortions.Count(); nPos; )
{
--nPos;
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
ESelection aSel( nPar, nStart, nPar, nEnd );
String aOldStr = rEngine.GetText( aSel );
@@ -1497,8 +1508,8 @@ void lcl_TransliterateEditEngine( ScEditEngineDefaulter& rEngine,
{
if ( bConsiderLanguage )
{
- BYTE nScript = pDoc->GetStringScriptType( aOldStr );
- USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_LANGUAGE_CJK :
+ sal_uInt8 nScript = pDoc->GetStringScriptType( aOldStr );
+ sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_LANGUAGE_CJK :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? EE_CHAR_LANGUAGE_CTL :
EE_CHAR_LANGUAGE );
nLanguage = ((const SvxLanguageItem&)aAttr.Get(nWhich)).GetValue();
@@ -1525,7 +1536,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
DBG_ASSERT( rMultiMark.IsMultiMarked(), "TransliterateText: no selection" );
utl::TransliterationWrapper aTranslitarationWrapper( xServiceManager, nType );
- BOOL bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode();
+ sal_Bool bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode();
sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
ScEditEngineDefaulter* pEngine = NULL; // not using pEditEngine member because of defaults
@@ -1537,7 +1548,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
SCCOL nCol = 0;
SCROW nRow = 0;
- BOOL bFound = rMultiMark.IsCellMarked( nCol, nRow );
+ sal_Bool bFound = rMultiMark.IsCellMarked( nCol, nRow );
if (!bFound)
bFound = GetNextMarkedCell( nCol, nRow, nTab, rMultiMark );
@@ -1554,8 +1565,8 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
if ( bConsiderLanguage )
{
- BYTE nScript = GetStringScriptType( aOldStr ); //! cell script type?
- USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
+ sal_uInt8 nScript = GetStringScriptType( aOldStr ); //! cell script type?
+ sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? ATTR_CTL_FONT_LANGUAGE :
ATTR_FONT_LANGUAGE );
nLanguage = ((const SvxLanguageItem*)GetAttr( nCol, nRow, nTab, nWhich ))->GetValue();
@@ -1576,7 +1587,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
SfxItemSet* pDefaults = new SfxItemSet( pEngine->GetEmptyItemSet() );
pPattern->FillEditItemSet( pDefaults );
- pEngine->SetDefaults( pDefaults, TRUE );
+ pEngine->SetDefaults( pDefaults, sal_True );
const EditTextObject* pData = ((const ScEditCell*)pCell)->GetData();
pEngine->SetText( *pData );
@@ -1592,7 +1603,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
{
// remove defaults (paragraph attributes) before creating text object
SfxItemSet* pEmpty = new SfxItemSet( pEngine->GetEmptyItemSet() );
- pEngine->SetDefaults( pEmpty, TRUE );
+ pEngine->SetDefaults( pEmpty, sal_True );
EditTextObject* pNewData = pEngine->CreateTextObject();
PutCell( nCol, nRow, nTab,
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index aa8e3a3046fc..ece0deb81347 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -177,7 +177,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
UpdateDrawDefaults();
UpdateDrawLanguages();
if (bImportingXML)
- pDrawLayer->EnableAdjust(FALSE);
+ pDrawLayer->EnableAdjust(false);
pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters );
pDrawLayer->SetCharCompressType( GetAsianCompression() );
@@ -203,7 +203,7 @@ void ScDocument::UpdateDrawDefaults()
if ( pDrawLayer && bSetDrawDefaults )
{
SfxItemPool& rDrawPool = pDrawLayer->GetItemPool();
- rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
}
}
@@ -234,14 +234,14 @@ sal_Bool ScDocument::IsChart( const SdrObject* pObject )
return ((SdrOle2Obj*)pObject)->IsChart();
}
- return sal_False;
+ return false;
}
-IMPL_LINK_INLINE_START( ScDocument, GetUserDefinedColor, USHORT *, pColorIndex )
+IMPL_LINK_INLINE_START( ScDocument, GetUserDefinedColor, sal_uInt16 *, pColorIndex )
{
return (long) &((GetColorTable()->GetColor(*pColorIndex))->GetColor());
}
-IMPL_LINK_INLINE_END( ScDocument, GetUserDefinedColor, USHORT *, pColorIndex )
+IMPL_LINK_INLINE_END( ScDocument, GetUserDefinedColor, sal_uInt16 *, pColorIndex )
void ScDocument::DeleteDrawLayer()
{
@@ -253,20 +253,20 @@ void ScDocument::DeleteColorTable()
delete pColorTable;
}
-BOOL ScDocument::DrawGetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const
+sal_Bool ScDocument::DrawGetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const
{
return pDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer );
}
-void ScDocument::DrawMovePage( USHORT nOldPos, USHORT nNewPos )
+void ScDocument::DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
pDrawLayer->ScMovePage(nOldPos,nNewPos);
}
-void ScDocument::DrawCopyPage( USHORT nOldPos, USHORT nNewPos )
+void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
// angelegt wird die Page schon im ScTable ctor
- pDrawLayer->ScCopyPage( nOldPos, nNewPos, FALSE );
+ pDrawLayer->ScCopyPage( nOldPos, nNewPos, false );
}
void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
@@ -289,12 +289,12 @@ void ScDocument::DeleteObjectsInSelection( const ScMarkData& rMark )
pDrawLayer->DeleteObjectsInSelection( rMark );
}
-BOOL ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark )
+sal_Bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark )
{
// pTabMark is used only for selected tables. If pTabMark is 0, all tables of rRange are used.
if (!pDrawLayer)
- return FALSE;
+ return false;
SCTAB nStartTab = 0;
SCTAB nEndTab = MAXTAB;
@@ -321,7 +321,7 @@ BOOL ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p
{
if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
aMMRect.IsInside( pObject->GetCurrentBoundRect() ) )
- return TRUE;
+ return sal_True;
pObject = aIter.Next();
}
@@ -329,7 +329,7 @@ BOOL ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p
}
}
- return FALSE;
+ return false;
}
@@ -360,7 +360,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin )
}
-BOOL ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect )
+sal_Bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect )
{
// Gibt es Objekte auf dem Hintergrund-Layer, die (teilweise) von rMMRect
// betroffen sind?
@@ -368,47 +368,47 @@ BOOL ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect )
// zu werden)
if (!pDrawLayer)
- return FALSE;
+ return false;
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
if (!pPage)
- return FALSE;
+ return false;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if ( pObject->GetLayer() == SC_LAYER_BACK && pObject->GetCurrentBoundRect().IsOver( rMMRect ) )
- bFound = TRUE;
+ bFound = sal_True;
pObject = aIter.Next();
}
return bFound;
}
-BOOL ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect )
+sal_Bool ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect )
{
// Gibt es ueberhaupt Objekte, die (teilweise) von rMMRect
// betroffen sind?
// (um leere Seiten beim Drucken zu erkennen)
if (!pDrawLayer)
- return FALSE;
+ return false;
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
if (!pPage)
- return FALSE;
+ return false;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if ( pObject->GetCurrentBoundRect().IsOver( rMMRect ) )
- bFound = TRUE;
+ bFound = sal_True;
pObject = aIter.Next();
}
@@ -460,12 +460,12 @@ SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos )
return pFound;
}
-BOOL ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, BOOL bLeftIsEmpty,
+sal_Bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, sal_Bool bLeftIsEmpty,
ScRange* pLastRange, Rectangle* pLastMM ) const
{
if (!IsBlockEmpty( nTab, nStartCol, nStartRow, nEndCol, nEndRow ))
- return FALSE;
+ return false;
ScDocument* pThis = (ScDocument*)this; //! GetMMRect / HasAnyDraw etc. const !!!
@@ -497,7 +497,7 @@ BOOL ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
}
if ( pThis->HasAnyDraw( nTab, aMMRect ))
- return FALSE;
+ return false;
if ( nStartCol > 0 && !bLeftIsEmpty )
{
@@ -508,16 +508,16 @@ BOOL ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCROW nTmpRow = nEndRow;
pThis->ExtendMerge( 0,nStartRow, nExtendCol,nTmpRow, nTab,
- FALSE, TRUE ); // kein Refresh, incl. Attrs
+ false, sal_True ); // kein Refresh, incl. Attrs
OutputDevice* pDev = pThis->GetPrinter();
pDev->SetMapMode( MAP_PIXEL ); // wichtig fuer GetNeededSize
pThis->ExtendPrintArea( pDev, nTab, 0, nStartRow, nExtendCol, nEndRow );
if ( nExtendCol >= nStartCol )
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void ScDocument::Clear( sal_Bool bFromDestructor )
@@ -537,9 +537,9 @@ void ScDocument::Clear( sal_Bool bFromDestructor )
}
}
-BOOL ScDocument::HasControl( SCTAB nTab, const Rectangle& rMMRect )
+sal_Bool ScDocument::HasControl( SCTAB nTab, const Rectangle& rMMRect )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if (pDrawLayer)
{
@@ -555,7 +555,7 @@ BOOL ScDocument::HasControl( SCTAB nTab, const Rectangle& rMMRect )
{
Rectangle aObjRect = pObject->GetLogicRect();
if ( aObjRect.IsOver( rMMRect ) )
- bFound = TRUE;
+ bFound = sal_True;
}
pObject = aIter.Next();
@@ -597,12 +597,12 @@ void ScDocument::InvalidateControls( Window* pWin, SCTAB nTab, const Rectangle&
}
}
-BOOL ScDocument::HasDetectiveObjects(SCTAB nTab) const
+sal_Bool ScDocument::HasDetectiveObjects(SCTAB nTab) const
{
// looks for detective objects, annotations don't count
// (used to adjust scale so detective objects hit their cells better)
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if (pDrawLayer)
{
@@ -616,7 +616,7 @@ BOOL ScDocument::HasDetectiveObjects(SCTAB nTab) const
{
// anything on the internal layer except captions (annotations)
if ( (pObject->GetLayer() == SC_LAYER_INTERN) && !ScDrawLayer::IsNoteCaption( pObject ) )
- bFound = TRUE;
+ bFound = sal_True;
pObject = aIter.Next();
}
@@ -634,19 +634,19 @@ void ScDocument::UpdateFontCharSet()
// Alles, was nicht SYMBOL ist, wird auf den System-CharSet umgesetzt.
// Bei neuen Dokumenten (Version SC_FONTCHARSET) sollte der CharSet stimmen.
- BOOL bUpdateOld = ( nSrcVer < SC_FONTCHARSET );
+ sal_Bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET );
CharSet eSysSet = gsl_getSystemTextEncoding();
if ( eSrcSet != eSysSet || bUpdateOld )
{
- USHORT nCount,i;
+ sal_uInt32 nCount,i;
SvxFontItem* pItem;
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- nCount = pPool->GetItemCount(ATTR_FONT);
+ nCount = pPool->GetItemCount2(ATTR_FONT);
for (i=0; i<nCount; i++)
{
- pItem = (SvxFontItem*)pPool->GetItem(ATTR_FONT, i);
+ pItem = (SvxFontItem*)pPool->GetItem2(ATTR_FONT, i);
if ( pItem && ( pItem->GetCharSet() == eSrcSet ||
( bUpdateOld && pItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
pItem->GetCharSet() = eSysSet;
@@ -655,10 +655,10 @@ void ScDocument::UpdateFontCharSet()
if ( pDrawLayer )
{
SfxItemPool& rDrawPool = pDrawLayer->GetItemPool();
- nCount = rDrawPool.GetItemCount(EE_CHAR_FONTINFO);
+ nCount = rDrawPool.GetItemCount2(EE_CHAR_FONTINFO);
for (i=0; i<nCount; i++)
{
- pItem = (SvxFontItem*)rDrawPool.GetItem(EE_CHAR_FONTINFO, i);
+ pItem = (SvxFontItem*)rDrawPool.GetItem2(EE_CHAR_FONTINFO, i);
if ( pItem && ( pItem->GetCharSet() == eSrcSet ||
( bUpdateOld && pItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
pItem->GetCharSet() = eSysSet;
@@ -697,15 +697,15 @@ void ScDocument::SetImportingXML( bool bVal )
for ( SCTAB nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++ )
if ( pTab[nTab]->IsLoadingRTL() )
{
- pTab[nTab]->SetLoadingRTL( FALSE );
- SetLayoutRTL( nTab, TRUE ); // includes mirroring; bImportingXML must be cleared first
+ pTab[nTab]->SetLoadingRTL( false );
+ SetLayoutRTL( nTab, sal_True ); // includes mirroring; bImportingXML must be cleared first
}
}
SetLoadingMedium(bVal);
}
-void ScDocument::SetXMLFromWrapper( BOOL bVal )
+void ScDocument::SetXMLFromWrapper( sal_Bool bVal )
{
bXMLFromWrapper = bVal;
}
@@ -724,12 +724,12 @@ void ScDocument::SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharac
pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters );
}
-BOOL ScDocument::IsValidAsianCompression() const
+sal_Bool ScDocument::IsValidAsianCompression() const
{
return ( nAsianCompression != SC_ASIANCOMPRESSION_INVALID );
}
-BYTE ScDocument::GetAsianCompression() const
+sal_uInt8 ScDocument::GetAsianCompression() const
{
if ( nAsianCompression == SC_ASIANCOMPRESSION_INVALID )
return 0;
@@ -737,7 +737,7 @@ BYTE ScDocument::GetAsianCompression() const
return nAsianCompression;
}
-void ScDocument::SetAsianCompression(BYTE nNew)
+void ScDocument::SetAsianCompression(sal_uInt8 nNew)
{
nAsianCompression = nNew;
if ( pEditEngine )
@@ -746,26 +746,26 @@ void ScDocument::SetAsianCompression(BYTE nNew)
pDrawLayer->SetCharCompressType( nAsianCompression );
}
-BOOL ScDocument::IsValidAsianKerning() const
+sal_Bool ScDocument::IsValidAsianKerning() const
{
return ( nAsianKerning != SC_ASIANKERNING_INVALID );
}
-BOOL ScDocument::GetAsianKerning() const
+sal_Bool ScDocument::GetAsianKerning() const
{
if ( nAsianKerning == SC_ASIANKERNING_INVALID )
- return FALSE;
+ return false;
else
- return (BOOL)nAsianKerning;
+ return (sal_Bool)nAsianKerning;
}
-void ScDocument::SetAsianKerning(BOOL bNew)
+void ScDocument::SetAsianKerning(sal_Bool bNew)
{
- nAsianKerning = (BYTE)bNew;
+ nAsianKerning = (sal_uInt8)bNew;
if ( pEditEngine )
- pEditEngine->SetKernAsianPunctuation( (BOOL)nAsianKerning );
+ pEditEngine->SetKernAsianPunctuation( (sal_Bool)nAsianKerning );
if ( pDrawLayer )
- pDrawLayer->SetKernAsianPunctuation( (BOOL)nAsianKerning );
+ pDrawLayer->SetKernAsianPunctuation( (sal_Bool)nAsianKerning );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index b168749e2c4e..790a32699872 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -110,11 +110,11 @@ struct ScCopyBlockFromClipParams
{
ScDocument* pRefUndoDoc;
ScDocument* pClipDoc;
- USHORT nInsFlag;
+ sal_uInt16 nInsFlag;
SCTAB nTabStart;
SCTAB nTabEnd;
- BOOL bAsLink;
- BOOL bSkipAttrForEmpty;
+ sal_Bool bAsLink;
+ sal_Bool bSkipAttrForEmpty;
};
struct ScDefaultAttr
@@ -151,52 +151,52 @@ void ScDocument::MakeTable( SCTAB nTab,bool _bNeedsNameCheck )
}
-BOOL ScDocument::HasTable( SCTAB nTab ) const
+sal_Bool ScDocument::HasTable( SCTAB nTab ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScDocument::GetName( SCTAB nTab, String& rName ) const
+sal_Bool ScDocument::GetName( SCTAB nTab, String& rName ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
{
pTab[nTab]->GetName( rName );
- return TRUE;
+ return sal_True;
}
rName.Erase();
- return FALSE;
+ return false;
}
-BOOL ScDocument::SetCodeName( SCTAB nTab, const String& rName )
+sal_Bool ScDocument::SetCodeName( SCTAB nTab, const String& rName )
{
if (VALIDTAB(nTab))
{
if (pTab[nTab])
{
pTab[nTab]->SetCodeName( rName );
- return TRUE;
+ return sal_True;
}
}
OSL_TRACE( "**** can't set code name %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() );
- return FALSE;
+ return false;
}
-BOOL ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
+sal_Bool ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
{
pTab[nTab]->GetCodeName( rName );
- return TRUE;
+ return sal_True;
}
rName.Erase();
- return FALSE;
+ return false;
}
NameToNameMap*
@@ -207,7 +207,7 @@ ScDocument::GetLocalNameMap( SCTAB& rTab )
return &pTab[rTab]->localNameToGlobalName;
}
-BOOL ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
+sal_Bool ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
{
String aUpperName = rName;
ScGlobal::pCharClass->toUpper(aUpperName);
@@ -218,11 +218,11 @@ BOOL ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
if ( pTab[i]->GetUpperName() == aUpperName )
{
rTab = i;
- return TRUE;
+ return sal_True;
}
}
rTab = 0;
- return FALSE;
+ return false;
}
@@ -266,9 +266,9 @@ bool ScDocument::ValidTabName( const String& rName )
}
-BOOL ScDocument::ValidNewTabName( const String& rName ) const
+sal_Bool ScDocument::ValidNewTabName( const String& rName ) const
{
- BOOL bValid = ValidTabName(rName);
+ sal_Bool bValid = ValidTabName(rName);
for (SCTAB i=0; (i<=MAXTAB) && bValid; i++)
if (pTab[i])
{
@@ -287,10 +287,10 @@ void ScDocument::CreateValidTabName(String& rName) const
// Find new one
const String aStrTable( ScResId(SCSTR_TABLE) );
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
// First test if the prefix is valid, if so only avoid doubles
- BOOL bPrefix = ValidTabName( aStrTable );
+ sal_Bool bPrefix = ValidTabName( aStrTable );
OSL_ENSURE(bPrefix, "Invalid Table Name");
SCTAB nDummy;
@@ -332,11 +332,11 @@ void ScDocument::CreateValidTabName(String& rName) const
}
-BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
- BOOL bExternalDocument )
+sal_Bool ScDocument::InsertTab( SCTAB nPos, const String& rName,
+ sal_Bool bExternalDocument )
{
SCTAB nTabCount = GetTableCount();
- BOOL bValid = ValidTab(nTabCount);
+ sal_Bool bValid = ValidTab(nTabCount);
if ( !bExternalDocument ) // else test rName == "'Doc'!Tab" first
bValid = (bValid && ValidNewTabName(rName));
if (bValid)
@@ -347,7 +347,7 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
pTab[nTabCount]->SetCodeName( rName );
++nMaxTableNumber;
if ( bExternalDocument )
- pTab[nTabCount]->SetVisible( FALSE );
+ pTab[nTabCount]->SetVisible( false );
}
else
{
@@ -403,19 +403,19 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
pChartListenerCollection->UpdateScheduledSeriesRanges();
SetDirty();
- bValid = TRUE;
+ bValid = sal_True;
}
else
- bValid = FALSE;
+ bValid = false;
}
}
return bValid;
}
-BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
+sal_Bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
{
- BOOL bValid = FALSE;
+ sal_Bool bValid = false;
if (VALIDTAB(nTab))
{
if (pTab[nTab])
@@ -423,8 +423,8 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
SCTAB nTabCount = GetTableCount();
if (nTabCount > 1)
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
ScRange aRange( 0, 0, nTab, MAXCOL, MAXROW, nTab );
DelBroadcastAreasInRange( aRange );
@@ -464,7 +464,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
SCTAB i;
for (i=0; i<=MAXTAB; i++)
if (pTab[i])
- pTab[i]->UpdateDeleteTab(nTab,FALSE,
+ pTab[i]->UpdateDeleteTab(nTab,false,
pRefUndoDoc ? pRefUndoDoc->pTab[i] : 0);
delete pTab[nTab];
for (i=nTab + 1; i < nTabCount; i++)
@@ -492,7 +492,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
pChartListenerCollection->UpdateScheduledSeriesRanges();
SetAutoCalc( bOldAutoCalc );
- bValid = TRUE;
+ bValid = sal_True;
}
}
}
@@ -500,16 +500,16 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
}
-BOOL ScDocument::RenameTab( SCTAB nTab, const String& rName, BOOL /* bUpdateRef */,
- BOOL bExternalDocument )
+sal_Bool ScDocument::RenameTab( SCTAB nTab, const String& rName, sal_Bool /* bUpdateRef */,
+ sal_Bool bExternalDocument )
{
- BOOL bValid = FALSE;
+ sal_Bool bValid = false;
SCTAB i;
if VALIDTAB(nTab)
if (pTab[nTab])
{
if ( bExternalDocument )
- bValid = TRUE; // composed name
+ bValid = true; // composed name
else
bValid = ValidTabName(rName);
for (i=0; (i<=MAXTAB) && bValid; i++)
@@ -531,14 +531,14 @@ BOOL ScDocument::RenameTab( SCTAB nTab, const String& rName, BOOL /* bUpdateRef
// but the XML stream must be re-generated.
for (i=0; i<=MAXTAB; ++i)
if (pTab[i] && pTab[i]->IsStreamValid())
- pTab[i]->SetStreamValid( FALSE );
+ pTab[i]->SetStreamValid( false );
}
}
return bValid;
}
-void ScDocument::SetVisible( SCTAB nTab, BOOL bVisible )
+void ScDocument::SetVisible( SCTAB nTab, sal_Bool bVisible )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -546,26 +546,26 @@ void ScDocument::SetVisible( SCTAB nTab, BOOL bVisible )
}
-BOOL ScDocument::IsVisible( SCTAB nTab ) const
+sal_Bool ScDocument::IsVisible( SCTAB nTab ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
return pTab[nTab]->IsVisible();
- return FALSE;
+ return false;
}
-BOOL ScDocument::IsStreamValid( SCTAB nTab ) const
+sal_Bool ScDocument::IsStreamValid( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->IsStreamValid();
- return FALSE;
+ return false;
}
-void ScDocument::SetStreamValid( SCTAB nTab, BOOL bSet, BOOL bIgnoreLock )
+void ScDocument::SetStreamValid( SCTAB nTab, sal_Bool bSet, sal_Bool bIgnoreLock )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetStreamValid( bSet, bIgnoreLock );
@@ -578,30 +578,30 @@ void ScDocument::LockStreamValid( bool bLock )
}
-BOOL ScDocument::IsPendingRowHeights( SCTAB nTab ) const
+sal_Bool ScDocument::IsPendingRowHeights( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->IsPendingRowHeights();
- return FALSE;
+ return false;
}
-void ScDocument::SetPendingRowHeights( SCTAB nTab, BOOL bSet )
+void ScDocument::SetPendingRowHeights( SCTAB nTab, sal_Bool bSet )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetPendingRowHeights( bSet );
}
-void ScDocument::SetLayoutRTL( SCTAB nTab, BOOL bRTL )
+void ScDocument::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL )
{
if ( ValidTab(nTab) && pTab[nTab] )
{
if ( bImportingXML )
{
// #i57869# only set the LoadingRTL flag, the real setting (including mirroring)
- // is applied in SetImportingXML(FALSE). This is so the shapes can be loaded in
+ // is applied in SetImportingXML(sal_False). This is so the shapes can be loaded in
// normal LTR mode.
pTab[nTab]->SetLoadingRTL( bRTL );
@@ -639,16 +639,16 @@ void ScDocument::SetLayoutRTL( SCTAB nTab, BOOL bRTL )
}
-BOOL ScDocument::IsLayoutRTL( SCTAB nTab ) const
+sal_Bool ScDocument::IsLayoutRTL( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->IsLayoutRTL();
- return FALSE;
+ return false;
}
-BOOL ScDocument::IsNegativePage( SCTAB nTab ) const
+sal_Bool ScDocument::IsNegativePage( SCTAB nTab ) const
{
// Negative page area is always used for RTL layout.
// The separate method is used to find all RTL handling of drawing objects.
@@ -666,7 +666,7 @@ BOOL ScDocument::IsNegativePage( SCTAB nTab ) const
---------------------------------------------------------------------------- */
-BOOL ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -674,11 +674,11 @@ BOOL ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
rEndCol = 0;
rEndRow = 0;
- return FALSE;
+ return false;
}
-BOOL ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -686,7 +686,7 @@ BOOL ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) cons
rEndCol = 0;
rEndRow = 0;
- return FALSE;
+ return false;
}
bool ScDocument::ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow) const
@@ -734,7 +734,7 @@ bool ScDocument::ShrinkToUsedDataArea( bool& o_bShrunk, SCTAB nTab, SCCOL& rStar
// connected area
void ScDocument::GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
- SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld, bool bOnlyDown ) const
+ SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bIncludeOld, bool bOnlyDown ) const
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->GetDataArea( rStartCol, rStartRow, rEndCol, rEndRow, bIncludeOld, bOnlyDown );
@@ -821,7 +821,7 @@ bool lcl_GetNextTabRange( SCTAB& rTabRangeStart, SCTAB& rTabRangeEnd, const ScMa
}
-BOOL ScDocument::CanInsertRow( const ScRange& rRange ) const
+sal_Bool ScDocument::CanInsertRow( const ScRange& rRange ) const
{
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -834,7 +834,7 @@ BOOL ScDocument::CanInsertRow( const ScRange& rRange ) const
PutInOrder( nStartTab, nEndTab );
SCSIZE nSize = static_cast<SCSIZE>(nEndRow - nStartRow + 1);
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
for (SCTAB i=nStartTab; i<=nEndTab && bTest; i++)
if (pTab[i])
bTest &= pTab[i]->TestInsertRow( nStartCol, nEndCol, nSize );
@@ -843,7 +843,7 @@ BOOL ScDocument::CanInsertRow( const ScRange& rRange ) const
}
-BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
+sal_Bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc,
const ScMarkData* pTabMark )
@@ -858,10 +858,10 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
nEndTab = MAXTAB;
}
- BOOL bTest = TRUE;
- BOOL bRet = FALSE;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid mulitple calculations
+ sal_Bool bTest = true;
+ sal_Bool bRet = false;
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid mulitple calculations
for ( i = nStartTab; i <= nEndTab && bTest; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
bTest &= pTab[i]->TestInsertRow( nStartCol, nEndCol, nSize );
@@ -887,7 +887,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
{
UpdateReference( URM_INSDEL, nStartCol, nStartRow, nTabRangeStart,
nEndCol, MAXROW, nTabRangeEnd,
- 0, static_cast<SCsROW>(nSize), 0, pRefUndoDoc, FALSE ); // without drawing objects
+ 0, static_cast<SCsROW>(nSize), 0, pRefUndoDoc, false ); // without drawing objects
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
@@ -920,7 +920,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
if (pTab[i])
pTab[i]->SetRelNameDirty();
}
- bRet = TRUE;
+ bRet = sal_True;
}
SetAutoCalc( bOldAutoCalc );
if ( bRet )
@@ -929,7 +929,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
}
-BOOL ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
+sal_Bool ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
{
return InsertRow( rRange.aStart.Col(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Tab(),
@@ -941,7 +941,7 @@ BOOL ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize,
- ScDocument* pRefUndoDoc, BOOL* pUndoOutline,
+ ScDocument* pRefUndoDoc, sal_Bool* pUndoOutline,
const ScMarkData* pTabMark )
{
SCTAB i;
@@ -954,8 +954,8 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
nEndTab = MAXTAB;
}
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
// handle chunks of consecutive selected sheets together
SCTAB nTabRangeStart = nStartTab;
@@ -986,13 +986,13 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
{
UpdateReference( URM_INSDEL, nStartCol, nStartRow+nSize, nTabRangeStart,
nEndCol, MAXROW, nTabRangeEnd,
- 0, -(static_cast<SCsROW>(nSize)), 0, pRefUndoDoc, TRUE, false );
+ 0, -(static_cast<SCsROW>(nSize)), 0, pRefUndoDoc, sal_True, false );
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
}
if (pUndoOutline)
- *pUndoOutline = FALSE;
+ *pUndoOutline = false;
for ( i = nStartTab; i <= nEndTab; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
@@ -1015,7 +1015,7 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
}
-void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL* pUndoOutline )
+void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, sal_Bool* pUndoOutline )
{
DeleteRow( rRange.aStart.Col(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Tab(),
@@ -1024,7 +1024,7 @@ void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL
}
-BOOL ScDocument::CanInsertCol( const ScRange& rRange ) const
+sal_Bool ScDocument::CanInsertCol( const ScRange& rRange ) const
{
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -1037,7 +1037,7 @@ BOOL ScDocument::CanInsertCol( const ScRange& rRange ) const
PutInOrder( nStartTab, nEndTab );
SCSIZE nSize = static_cast<SCSIZE>(nEndCol - nStartCol + 1);
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
for (SCTAB i=nStartTab; i<=nEndTab && bTest; i++)
if (pTab[i])
bTest &= pTab[i]->TestInsertCol( nStartRow, nEndRow, nSize );
@@ -1046,7 +1046,7 @@ BOOL ScDocument::CanInsertCol( const ScRange& rRange ) const
}
-BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
+sal_Bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc,
const ScMarkData* pTabMark )
@@ -1061,10 +1061,10 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
nEndTab = MAXTAB;
}
- BOOL bTest = TRUE;
- BOOL bRet = FALSE;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bTest = true;
+ sal_Bool bRet = false;
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
for ( i = nStartTab; i <= nEndTab && bTest; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
bTest &= pTab[i]->TestInsertCol( nStartRow, nEndRow, nSize );
@@ -1087,7 +1087,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
{
UpdateReference( URM_INSDEL, nStartCol, nStartRow, nTabRangeStart,
MAXCOL, nEndRow, nTabRangeEnd,
- static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, TRUE, false );
+ static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, sal_True, false );
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
@@ -1112,7 +1112,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
if (pTab[i])
pTab[i]->SetRelNameDirty();
}
- bRet = TRUE;
+ bRet = sal_True;
}
SetAutoCalc( bOldAutoCalc );
if ( bRet )
@@ -1121,7 +1121,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
}
-BOOL ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
+sal_Bool ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
{
return InsertCol( rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -1132,7 +1132,7 @@ BOOL ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc,
- BOOL* pUndoOutline, const ScMarkData* pTabMark )
+ sal_Bool* pUndoOutline, const ScMarkData* pTabMark )
{
SCTAB i;
@@ -1144,8 +1144,8 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
nEndTab = MAXTAB;
}
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
// handle chunks of consecutive selected sheets together
SCTAB nTabRangeStart = nStartTab;
@@ -1176,13 +1176,13 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
{
UpdateReference( URM_INSDEL, sal::static_int_cast<SCCOL>(nStartCol+nSize), nStartRow, nTabRangeStart,
MAXCOL, nEndRow, nTabRangeEnd,
- -static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, TRUE, false );
+ -static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, sal_True, false );
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
}
if (pUndoOutline)
- *pUndoOutline = FALSE;
+ *pUndoOutline = false;
for ( i = nStartTab; i <= nEndTab; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
@@ -1205,7 +1205,7 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
}
-void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL* pUndoOutline )
+void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc, sal_Bool* pUndoOutline )
{
DeleteCol( rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -1219,12 +1219,12 @@ void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL
void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
- ScRange& rColRange, BOOL& rInsCol, BOOL& rDelCol,
- ScRange& rRowRange, BOOL& rInsRow, BOOL& rDelRow )
+ ScRange& rColRange, sal_Bool& rInsCol, sal_Bool& rDelCol,
+ ScRange& rRowRange, sal_Bool& rInsRow, sal_Bool& rDelRow )
{
OSL_ENSURE( rOld.aStart == rNew.aStart, "FitBlock: Beginning is different" );
- rInsCol = rDelCol = rInsRow = rDelRow = FALSE;
+ rInsCol = rDelCol = rInsRow = rDelRow = false;
SCCOL nStartX = rOld.aStart.Col();
SCROW nStartY = rOld.aStart.Row();
@@ -1235,7 +1235,7 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
SCTAB nTab = rOld.aStart.Tab();
// wenn es mehr Zeilen werden, werden Spalten auf der alten Hoehe eingefuegt/geloescht
- BOOL bGrowY = ( nNewEndY > nOldEndY );
+ sal_Bool bGrowY = ( nNewEndY > nOldEndY );
SCROW nColEndY = bGrowY ? nOldEndY : nNewEndY;
SCCOL nRowEndX = bGrowY ? nNewEndX : nOldEndX;
@@ -1244,12 +1244,12 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
if ( nNewEndX > nOldEndX ) // Spalten einfuegen
{
rColRange = ScRange( nOldEndX+1, nStartY, nTab, nNewEndX, nColEndY, nTab );
- rInsCol = TRUE;
+ rInsCol = sal_True;
}
else if ( nNewEndX < nOldEndX ) // Spalten loeschen
{
rColRange = ScRange( nNewEndX+1, nStartY, nTab, nOldEndX, nColEndY, nTab );
- rDelCol = TRUE;
+ rDelCol = sal_True;
}
// Zeilen
@@ -1257,19 +1257,19 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
if ( nNewEndY > nOldEndY ) // Zeilen einfuegen
{
rRowRange = ScRange( nStartX, nOldEndY+1, nTab, nRowEndX, nNewEndY, nTab );
- rInsRow = TRUE;
+ rInsRow = sal_True;
}
else if ( nNewEndY < nOldEndY ) // Zeilen loeschen
{
rRowRange = ScRange( nStartX, nNewEndY+1, nTab, nRowEndX, nOldEndY, nTab );
- rDelRow = TRUE;
+ rDelRow = sal_True;
}
}
-BOOL ScDocument::HasPartOfMerged( const ScRange& rRange )
+sal_Bool ScDocument::HasPartOfMerged( const ScRange& rRange )
{
- BOOL bPart = FALSE;
+ sal_Bool bPart = false;
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartX = rRange.aStart.Col();
@@ -1290,44 +1290,44 @@ BOOL ScDocument::HasPartOfMerged( const ScRange& rRange )
}
-BOOL ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew )
+sal_Bool ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew )
{
if ( rOld == rNew )
- return TRUE;
+ return sal_True;
- BOOL bOk = TRUE;
- BOOL bInsCol,bDelCol,bInsRow,bDelRow;
+ sal_Bool bOk = sal_True;
+ sal_Bool bInsCol,bDelCol,bInsRow,bDelRow;
ScRange aColRange,aRowRange;
lcl_GetInsDelRanges( rOld, rNew, aColRange,bInsCol,bDelCol, aRowRange,bInsRow,bDelRow );
if ( bInsCol && !CanInsertCol( aColRange ) ) // Zellen am Rand ?
- bOk = FALSE;
+ bOk = false;
if ( bInsRow && !CanInsertRow( aRowRange ) ) // Zellen am Rand ?
- bOk = FALSE;
+ bOk = false;
if ( bInsCol || bDelCol )
{
aColRange.aEnd.SetCol(MAXCOL);
if ( HasPartOfMerged(aColRange) )
- bOk = FALSE;
+ bOk = false;
}
if ( bInsRow || bDelRow )
{
aRowRange.aEnd.SetRow(MAXROW);
if ( HasPartOfMerged(aRowRange) )
- bOk = FALSE;
+ bOk = false;
}
return bOk;
}
-void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, BOOL bClear )
+void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, sal_Bool bClear )
{
if (bClear)
DeleteAreaTab( rOld, IDF_ALL );
- BOOL bInsCol,bDelCol,bInsRow,bDelRow;
+ sal_Bool bInsCol,bDelCol,bInsRow,bDelRow;
ScRange aColRange,aRowRange;
lcl_GetInsDelRanges( rOld, rNew, aColRange,bInsCol,bDelCol, aRowRange,bInsRow,bDelRow );
@@ -1357,12 +1357,12 @@ void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, BOOL bClear
void ScDocument::DeleteArea(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rMark, USHORT nDelFlag)
+ const ScMarkData& rMark, sal_uInt16 nDelFlag)
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
for (SCTAB i = 0; i <= MAXTAB; i++)
if (pTab[i])
if ( rMark.GetTableSelect(i) || bIsUndo )
@@ -1373,21 +1373,21 @@ void ScDocument::DeleteArea(SCCOL nCol1, SCROW nRow1,
void ScDocument::DeleteAreaTab(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- SCTAB nTab, USHORT nDelFlag)
+ SCTAB nTab, sal_uInt16 nDelFlag)
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
if ( VALIDTAB(nTab) && pTab[nTab] )
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
pTab[nTab]->DeleteArea(nCol1, nRow1, nCol2, nRow2, nDelFlag);
SetAutoCalc( bOldAutoCalc );
}
}
-void ScDocument::DeleteAreaTab( const ScRange& rRange, USHORT nDelFlag )
+void ScDocument::DeleteAreaTab( const ScRange& rRange, sal_uInt16 nDelFlag )
{
for ( SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); nTab++ )
DeleteAreaTab( rRange.aStart.Col(), rRange.aStart.Row(),
@@ -1397,7 +1397,7 @@ void ScDocument::DeleteAreaTab( const ScRange& rRange, USHORT nDelFlag )
void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection,
- BOOL bColInfo, BOOL bRowInfo )
+ sal_Bool bColInfo, sal_Bool bRowInfo )
{
if (bIsUndo)
{
@@ -1421,7 +1421,7 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe
void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
- BOOL bColInfo, BOOL bRowInfo )
+ sal_Bool bColInfo, sal_Bool bRowInfo )
{
if (bIsUndo)
{
@@ -1442,7 +1442,7 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
}
-void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, BOOL bColInfo, BOOL bRowInfo )
+void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, sal_Bool bColInfo, sal_Bool bRowInfo )
{
if (bIsUndo)
{
@@ -1461,7 +1461,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, BOOL bColInfo, BOOL bRowI
}
-void ScDocument::SetCutMode( BOOL bVal )
+void ScDocument::SetCutMode( sal_Bool bVal )
{
if (bIsClip)
GetClipParam().mbCutMode = bVal;
@@ -1472,22 +1472,22 @@ void ScDocument::SetCutMode( BOOL bVal )
}
-BOOL ScDocument::IsCutMode()
+sal_Bool ScDocument::IsCutMode()
{
if (bIsClip)
return GetClipParam().mbCutMode;
else
{
OSL_FAIL("IsCutMode ohne bIsClip");
- return FALSE;
+ return false;
}
}
void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks, BOOL bColRowFlags )
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
+ const ScMarkData* pMarks, sal_Bool bColRowFlags )
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
@@ -1496,14 +1496,14 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
pDestDoc->aDocName = aDocName;
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( false ); // avoid multiple calculations
for (SCTAB i = nTab1; i <= nTab2; i++)
{
if (pTab[i] && pDestDoc->pTab[i])
pTab[i]->CopyToTable( nCol1, nRow1, nCol2, nRow2, nFlags,
bOnlyMarked, pDestDoc->pTab[i], pMarks,
- FALSE, bColRowFlags );
+ false, bColRowFlags );
}
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
@@ -1512,7 +1512,7 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
const ScMarkData* pMarks)
{
PutInOrder( nCol1, nCol2 );
@@ -1520,10 +1520,10 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
PutInOrder( nTab1, nTab2 );
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( false ); // avoid multiple calculations
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, false, pDestDoc, pMarks );
for (SCTAB i = nTab1; i <= nTab2; i++)
{
@@ -1533,35 +1533,35 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
}
if (nTab2 < MAXTAB)
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, false, pDestDoc, pMarks );
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
}
void ScDocument::CopyToDocument(const ScRange& rRange,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks, BOOL bColRowFlags)
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
+ const ScMarkData* pMarks, sal_Bool bColRowFlags)
{
ScRange aNewRange = rRange;
aNewRange.Justify();
if( !pDestDoc->aDocName.Len() )
pDestDoc->aDocName = aDocName;
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( false ); // avoid multiple calculations
for (SCTAB i = aNewRange.aStart.Tab(); i <= aNewRange.aEnd.Tab(); i++)
if (pTab[i] && pDestDoc->pTab[i])
pTab[i]->CopyToTable(aNewRange.aStart.Col(), aNewRange.aStart.Row(),
aNewRange.aEnd.Col(), aNewRange.aEnd.Row(),
nFlags, bOnlyMarked, pDestDoc->pTab[i],
- pMarks, FALSE, bColRowFlags);
+ pMarks, false, bColRowFlags);
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
void ScDocument::UndoToDocument(const ScRange& rRange,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
const ScMarkData* pMarks)
{
ScRange aNewRange = rRange;
@@ -1569,10 +1569,10 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
SCTAB nTab1 = aNewRange.aStart.Tab();
SCTAB nTab2 = aNewRange.aEnd.Tab();
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( false ); // avoid multiple calculations
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, false, pDestDoc, pMarks );
for (SCTAB i = nTab1; i <= nTab2; i++)
{
@@ -1583,7 +1583,7 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
}
if (nTab2 < MAXTAB)
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, false, pDestDoc, pMarks );
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
@@ -1687,14 +1687,14 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
pClipDoc->ResetClip( this, nTab );
if (pTab[nTab] && pClipDoc->pTab[nTab])
- pTab[nTab]->CopyToClip(nCol1, nRow1, nCol2, nRow2, pClipDoc->pTab[nTab], FALSE, TRUE);
+ pTab[nTab]->CopyToClip(nCol1, nRow1, nCol2, nRow2, pClipDoc->pTab[nTab], false, sal_True);
pClipDoc->GetClipParam().mbCutMode = false;
}
}
-void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsLink )
+void ScDocument::TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink )
{
OSL_ENSURE( bIsClip && pTransClip && pTransClip->bIsClip,
"TransposeClip with wrong Document" );
@@ -1710,7 +1710,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
ScRangeName::const_iterator itr = pRangeName->begin(), itrEnd = pRangeName->end();
for (; itr != itrEnd; ++itr)
{
- USHORT nIndex = itr->GetIndex();
+ sal_uInt16 nIndex = itr->GetIndex();
ScRangeData* pData = new ScRangeData(*itr);
if (!pTransClip->pRangeName->insert(pData))
delete pData;
@@ -1764,13 +1764,13 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
namespace {
-void copyUsedNamesToClip(ScRangeName* pClipRangeName, ScRangeName* pRangeName, const std::set<USHORT>& rUsedNames)
+void copyUsedNamesToClip(ScRangeName* pClipRangeName, ScRangeName* pRangeName, const std::set<sal_uInt16>& rUsedNames)
{
pClipRangeName->clear();
ScRangeName::const_iterator itr = pRangeName->begin(), itrEnd = pRangeName->end();
for (; itr != itrEnd; ++itr) //! DB-Bereiche Pivot-Bereiche auch !!!
{
- USHORT nIndex = itr->GetIndex();
+ sal_uInt16 nIndex = itr->GetIndex();
bool bInUse = (rUsedNames.count(nIndex) > 0);
if (!bInUse)
continue;
@@ -1787,7 +1787,7 @@ void copyUsedNamesToClip(ScRangeName* pClipRangeName, ScRangeName* pRangeName, c
void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs)
{
- std::set<USHORT> aUsedNames; // indexes of named ranges that are used in the copied cells
+ std::set<sal_uInt16> aUsedNames; // indexes of named ranges that are used in the copied cells
for (SCTAB i = 0; i <= MAXTAB; ++i)
if (pTab[i] && pClipDoc->pTab[i])
if ( bAllTabs || !pMarks || pMarks->GetTableSelect(i) )
@@ -1801,7 +1801,7 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip
void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab)
{
// Indexes of named ranges that are used in the copied cells
- std::set<USHORT> aUsedNames;
+ std::set<sal_uInt16> aUsedNames;
if ( pTab[nTab] && pClipDoc->pTab[nTab] )
{
pTab[nTab]->FindRangeNamesInUse(
@@ -1854,8 +1854,8 @@ void ScDocument::CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameDat
const ScRangeData* pExistingData = pRangeName->findByName(itr->GetName());
if (pExistingData)
{
- USHORT nOldIndex = itr->GetIndex();
- USHORT nNewIndex = pExistingData->GetIndex();
+ sal_uInt16 nOldIndex = itr->GetIndex();
+ sal_uInt16 nNewIndex = pExistingData->GetIndex();
aClipRangeNames.insert(nOldIndex, nNewIndex);
if ( !aClipRangeNames.mbReplace )
aClipRangeNames.mbReplace = ( nOldIndex != nNewIndex );
@@ -1869,8 +1869,8 @@ void ScDocument::CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameDat
if ( pRangeName->insert(pData) )
{
aClipRangeNames.mpRangeNames.push_back(pData);
- USHORT nOldIndex = itr->GetIndex();
- USHORT nNewIndex = pData->GetIndex();
+ sal_uInt16 nOldIndex = itr->GetIndex();
+ sal_uInt16 nNewIndex = pData->GetIndex();
aClipRangeNames.insert(nOldIndex, nNewIndex);
if ( !aClipRangeNames.mbReplace )
aClipRangeNames.mbReplace = ( nOldIndex != nNewIndex );
@@ -1955,7 +1955,7 @@ void ScDocument::SetClipParam(const ScClipParam& rParam)
mpClipParam.reset(new ScClipParam(rParam));
}
-BOOL ScDocument::IsClipboardSource() const
+sal_Bool ScDocument::IsClipboardSource() const
{
ScDocument* pClipDoc = SC_MOD()->GetClipDoc();
return pClipDoc && pClipDoc->xPoolHelper.is() &&
@@ -1965,7 +1965,7 @@ BOOL ScDocument::IsClipboardSource() const
void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rMark, USHORT nInsFlag )
+ const ScMarkData& rMark, sal_uInt16 nInsFlag )
{
if (nInsFlag & IDF_CONTENTS)
{
@@ -1979,7 +1979,7 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
void ScDocument::BroadcastFromClip( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rMark, USHORT nInsFlag )
+ const ScMarkData& rMark, sal_uInt16 nInsFlag )
{
if (nInsFlag & IDF_CONTENTS)
{
@@ -2054,17 +2054,17 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1,
if ( pCBFCP->pClipDoc->GetClipParam().mbCutMode )
{
- BOOL bOldInserting = IsInsertingFromOtherDoc();
- SetInsertingFromOtherDoc( TRUE);
+ sal_Bool bOldInserting = IsInsertingFromOtherDoc();
+ SetInsertingFromOtherDoc( sal_True);
UpdateReference( URM_MOVE,
nCol1, nRow1, i, nCol2, nRow2, i+nFollow,
- nDx, nDy, nDz, pCBFCP->pRefUndoDoc );
+ nDx, nDy, nDz, pCBFCP->pRefUndoDoc, false );
SetInsertingFromOtherDoc( bOldInserting);
}
else
UpdateReference( URM_COPY,
nCol1, nRow1, i, nCol2, nRow2, i+nFollow,
- nDx, nDy, nDz, pCBFCP->pRefUndoDoc, FALSE );
+ nDx, nDy, nDz, pCBFCP->pRefUndoDoc, false );
nClipTab = (nClipTab+nFollow+1) % (MAXTAB+1);
i = sal::static_int_cast<SCTAB>( i + nFollow );
@@ -2125,9 +2125,9 @@ void ScDocument::CopyNonFilteredFromClip( SCCOL nCol1, SCROW nRow1,
void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
- USHORT nInsFlag,
- ScDocument* pRefUndoDoc, ScDocument* pClipDoc, BOOL bResetCut,
- BOOL bAsLink, BOOL bIncludeFiltered, BOOL bSkipAttrForEmpty,
+ sal_uInt16 nInsFlag,
+ ScDocument* pRefUndoDoc, ScDocument* pClipDoc, sal_Bool bResetCut,
+ sal_Bool bAsLink, sal_Bool bIncludeFiltered, sal_Bool bSkipAttrForEmpty,
const ScRangeList * pDestRanges )
{
if (!bIsClip)
@@ -2139,8 +2139,8 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
}
if (pClipDoc->bIsClip && pClipDoc->GetTableCount())
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple recalculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple recalculations
NumFmtMergeHandler aNumFmtMergeHdl(this, pClipDoc);
@@ -2185,7 +2185,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
overwrite/delete existing cells but to insert the notes into
these cells. In this case, just delete old notes from the
destination area. */
- USHORT nDelFlag = IDF_NONE;
+ sal_uInt16 nDelFlag = IDF_NONE;
if ( (nInsFlag & (IDF_CONTENTS | IDF_ADDNOTES)) == (IDF_NOTE | IDF_ADDNOTES) )
nDelFlag |= IDF_NOTE;
else if ( nInsFlag & IDF_CONTENTS )
@@ -2224,13 +2224,13 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
pDestRanges = &aLocalRangeList;
}
- bInsertingFromOtherDoc = TRUE; // kein Broadcast/Listener aufbauen bei Insert
+ bInsertingFromOtherDoc = sal_True; // kein Broadcast/Listener aufbauen bei Insert
// bei mindestens 64 Zeilen wird in ScColumn::CopyFromClip voralloziert
- BOOL bDoDouble = ( nYw < 64 && nAllRow2 - nAllRow1 > 64);
- BOOL bOldDouble = ScColumn::bDoubleAlloc;
+ sal_Bool bDoDouble = ( nYw < 64 && nAllRow2 - nAllRow1 > 64);
+ sal_Bool bOldDouble = ScColumn::bDoubleAlloc;
if (bDoDouble)
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = sal_True;
SCCOL nClipStartCol = aClipRange.aStart.Col();
SCROW nClipStartRow = aClipRange.aStart.Row();
@@ -2298,7 +2298,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
if (pTab[k] && rMark.GetTableSelect(k))
pTab[k]->DecRecalcLevel();
- bInsertingFromOtherDoc = FALSE;
+ bInsertingFromOtherDoc = false;
UpdateRangeNamesInFormulas(aClipRangeNames, *pDestRanges, rMark, nXw, nYw);
@@ -2314,7 +2314,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
}
static SCROW lcl_getLastNonFilteredRow(
- const ScBitMaskCompressedArray<SCROW, BYTE>& rFlags, SCROW nBegRow, SCROW nEndRow,
+ const ScBitMaskCompressedArray<SCROW, sal_uInt8>& rFlags, SCROW nBegRow, SCROW nEndRow,
SCROW nRowCount)
{
SCROW nFilteredRow = rFlags.GetFirstForCondition(
@@ -2339,8 +2339,8 @@ void ScDocument::CopyMultiRangeFromClip(
// There is nothing in the clip doc to copy.
return;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple recalculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple recalculations
NumFmtMergeHandler aNumFmtMergeHdl(this, pClipDoc);
@@ -2375,11 +2375,11 @@ void ScDocument::CopyMultiRangeFromClip(
rMark.GetMarkArea(aDestRange);
SCROW nLastMarkedRow = aDestRange.aEnd.Row();
- bInsertingFromOtherDoc = TRUE; // kein Broadcast/Listener aufbauen bei Insert
+ bInsertingFromOtherDoc = sal_True; // kein Broadcast/Listener aufbauen bei Insert
SCROW nBegRow = nRow1;
sal_uInt16 nDelFlag = IDF_CONTENTS;
- const ScBitMaskCompressedArray<SCROW, BYTE>& rFlags = GetRowFlagsArray(aCBFCP.nTabStart);
+ const ScBitMaskCompressedArray<SCROW, sal_uInt8>& rFlags = GetRowFlagsArray(aCBFCP.nTabStart);
for ( size_t i = 0, n = rClipParam.maRanges.size(); i < n; ++i )
{
@@ -2434,7 +2434,7 @@ void ScDocument::CopyMultiRangeFromClip(
if (pTab[i] && rMark.GetTableSelect(i))
pTab[i]->DecRecalcLevel();
- bInsertingFromOtherDoc = FALSE;
+ bInsertingFromOtherDoc = false;
ScRangeList aRanges;
aRanges.Append(aDestRange);
@@ -2454,7 +2454,7 @@ void ScDocument::CopyMultiRangeFromClip(
SetAutoCalc( bOldAutoCalc );
}
-void ScDocument::SetClipArea( const ScRange& rArea, BOOL bCut )
+void ScDocument::SetClipArea( const ScRange& rArea, sal_Bool bCut )
{
if (bIsClip)
{
@@ -2470,7 +2470,7 @@ void ScDocument::SetClipArea( const ScRange& rArea, BOOL bCut )
}
-void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, BOOL bIncludeFiltered)
+void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, sal_Bool bIncludeFiltered)
{
if (!bIsClip)
{
@@ -2541,7 +2541,7 @@ void ScDocument::GetClipStart(SCCOL& nClipX, SCROW& nClipY)
}
-BOOL ScDocument::HasClipFilteredRows()
+sal_Bool ScDocument::HasClipFilteredRows()
{
// count on first used table in clipboard
SCTAB nCountTab = 0;
@@ -2563,7 +2563,7 @@ BOOL ScDocument::HasClipFilteredRows()
}
-void ScDocument::MixDocument( const ScRange& rRange, USHORT nFunction, BOOL bSkipEmpty,
+void ScDocument::MixDocument( const ScRange& rRange, sal_uInt16 nFunction, sal_Bool bSkipEmpty,
ScDocument* pSrcDoc )
{
SCTAB nTab1 = rRange.aStart.Tab();
@@ -2577,10 +2577,10 @@ void ScDocument::MixDocument( const ScRange& rRange, USHORT nFunction, BOOL bSki
void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
- USHORT nFlags, USHORT nFunction,
- BOOL bSkipEmpty, BOOL bAsLink )
+ sal_uInt16 nFlags, sal_uInt16 nFunction,
+ sal_Bool bSkipEmpty, sal_Bool bAsLink )
{
- USHORT nDelFlags = nFlags;
+ sal_uInt16 nDelFlags = nFlags;
if (nDelFlags & IDF_CONTENTS)
nDelFlags |= IDF_CONTENTS; // immer alle Inhalte oder keine loeschen!
@@ -2593,10 +2593,10 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
SCCOL nEndCol = rSrcArea.aEnd.Col();
SCROW nEndRow = rSrcArea.aEnd.Row();
ScDocument* pMixDoc = NULL;
- BOOL bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
+ sal_Bool bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
SCTAB nCount = GetTableCount();
for (SCTAB i=0; i<nCount; i++)
@@ -2612,11 +2612,11 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
else
pMixDoc->AddUndoTab( i, i );
pTab[i]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- IDF_CONTENTS, FALSE, pMixDoc->pTab[i] );
+ IDF_CONTENTS, false, pMixDoc->pTab[i] );
}
pTab[i]->DeleteArea( nStartCol,nStartRow, nEndCol,nEndRow, nDelFlags);
pTab[nSrcTab]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- nFlags, FALSE, pTab[i], NULL, bAsLink );
+ nFlags, false, pTab[i], NULL, bAsLink );
if (bDoMix)
pTab[i]->MixData( nStartCol,nStartRow, nEndCol,nEndRow,
@@ -2635,20 +2635,20 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
- USHORT nFlags, USHORT nFunction,
- BOOL bSkipEmpty, BOOL bAsLink )
+ sal_uInt16 nFlags, sal_uInt16 nFunction,
+ sal_Bool bSkipEmpty, sal_Bool bAsLink )
{
- USHORT nDelFlags = nFlags;
+ sal_uInt16 nDelFlags = nFlags;
if (nDelFlags & IDF_CONTENTS)
nDelFlags |= IDF_CONTENTS; // immer alle Inhalte oder keine loeschen!
if (ValidTab(nSrcTab) && pTab[nSrcTab])
{
ScDocument* pMixDoc = NULL;
- BOOL bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
+ sal_Bool bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple calculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false ); // avoid multiple calculations
ScRange aArea;
rMark.GetMultiMarkArea( aArea );
@@ -2671,12 +2671,12 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
else
pMixDoc->AddUndoTab( i, i );
pTab[i]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- IDF_CONTENTS, TRUE, pMixDoc->pTab[i], &rMark );
+ IDF_CONTENTS, sal_True, pMixDoc->pTab[i], &rMark );
}
pTab[i]->DeleteSelection( nDelFlags, rMark );
pTab[nSrcTab]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- nFlags, TRUE, pTab[i], &rMark, bAsLink );
+ nFlags, sal_True, pTab[i], &rMark, bAsLink );
if (bDoMix)
pTab[i]->MixMarked( rMark, nFunction, bSkipEmpty, pMixDoc->pTab[i] );
@@ -2693,13 +2693,13 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
}
-void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, BOOL bForceTab )
+void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, sal_Bool bForceTab )
{
if (VALIDTAB(nTab))
{
if ( bForceTab && !pTab[nTab] )
{
- BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+ sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
pTab[nTab] = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
@@ -2713,12 +2713,12 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
}
-void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, BOOL bForceTab )
+void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, sal_Bool bForceTab )
{
SCTAB nTab = rPos.Tab();
if ( bForceTab && !pTab[nTab] )
{
- BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+ sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
pTab[nTab] = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
@@ -2731,13 +2731,13 @@ void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, BOOL bForceT
}
-BOOL ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
+sal_Bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
ScSetStringParam* pParam )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->SetString( nCol, nRow, nTab, rString, pParam );
else
- return FALSE;
+ return false;
}
@@ -2839,7 +2839,7 @@ sal_uInt32 ScDocument::GetNumberFormat( const ScAddress& rPos ) const
}
-void ScDocument::GetNumberFormatInfo( short& nType, ULONG& nIndex,
+void ScDocument::GetNumberFormatInfo( short& nType, sal_uLong& nIndex,
const ScAddress& rPos, const ScBaseCell* pCell ) const
{
SCTAB nTab = rPos.Tab();
@@ -2912,27 +2912,27 @@ ScBaseCell* ScDocument::GetCell( const ScAddress& rPos ) const
}
-BOOL ScDocument::HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
if ( VALIDTAB(nTab) && pTab[nTab] )
return pTab[nTab]->HasStringData( nCol, nRow );
else
- return FALSE;
+ return false;
}
-BOOL ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
if ( VALIDTAB(nTab) && pTab[nTab] )
return pTab[nTab]->HasValueData( nCol, nRow );
else
- return FALSE;
+ return false;
}
-BOOL ScDocument::HasStringCells( const ScRange& rRange ) const
+sal_Bool ScDocument::HasStringCells( const ScRange& rRange ) const
{
- // TRUE, wenn String- oder Editzellen im Bereich
+ // sal_True, wenn String- oder Editzellen im Bereich
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -2943,20 +2943,20 @@ BOOL ScDocument::HasStringCells( const ScRange& rRange ) const
for ( SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++ )
if ( pTab[nTab] && pTab[nTab]->HasStringCells( nStartCol, nStartRow, nEndCol, nEndRow ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScDocument::HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA ) )->GetValue();
if( nValidation )
{
const ScValidationData* pData = GetValidationEntry( nValidation );
if( pData && pData->HasSelectionList() )
- return TRUE;
+ return sal_True;
}
return HasStringCells( ScRange( nCol, 0, nTab, nCol, MAXROW, nTab ) );
}
@@ -3018,8 +3018,8 @@ void ScDocument::InitializeAllNoteCaptions( bool bForced )
void ScDocument::SetDirty()
{
- BOOL bOldAutoCalc = GetAutoCalc();
- bAutoCalc = FALSE; // keine Mehrfachberechnung
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ bAutoCalc = false; // keine Mehrfachberechnung
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM());
for (SCTAB i=0; i<=MAXTAB; i++)
@@ -3038,8 +3038,8 @@ void ScDocument::SetDirty()
void ScDocument::SetDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = GetAutoCalc();
- bAutoCalc = FALSE; // keine Mehrfachberechnung
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ bAutoCalc = false; // keine Mehrfachberechnung
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM());
SCTAB nTab2 = rRange.aEnd.Tab();
@@ -3052,8 +3052,8 @@ void ScDocument::SetDirty( const ScRange& rRange )
void ScDocument::SetTableOpDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = GetAutoCalc();
- bAutoCalc = FALSE; // no multiple recalculation
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ bAutoCalc = false; // no multiple recalculation
SCTAB nTab2 = rRange.aEnd.Tab();
for (SCTAB i=rRange.aStart.Tab(); i<=nTab2; i++)
if (pTab[i]) pTab[i]->SetTableOpDirty( rRange );
@@ -3104,8 +3104,8 @@ void ScDocument::AddTableOpFormulaCell( ScFormulaCell* pCell )
void ScDocument::CalcAll()
{
ClearLookupCaches(); // Ensure we don't deliver zombie data.
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( TRUE );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_True );
SCTAB i;
for (i=0; i<=MAXTAB; i++)
if (pTab[i]) pTab[i]->SetDirtyVar();
@@ -3129,8 +3129,8 @@ void ScDocument::CompileAll()
void ScDocument::CompileXML()
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( false );
ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(
STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount() );
@@ -3160,14 +3160,14 @@ void ScDocument::CalcAfterLoad()
if (bIsClip) // Excel-Dateien werden aus dem Clipboard in ein Clip-Doc geladen
return; // dann wird erst beim Einfuegen in das richtige Doc berechnet
- bCalcingAfterLoad = TRUE;
+ bCalcingAfterLoad = sal_True;
for ( i = 0; i <= MAXTAB; i++)
if (pTab[i]) pTab[i]->CalcAfterLoad();
for (i=0; i<=MAXTAB; i++)
if (pTab[i]) pTab[i]->SetDirtyAfterLoad();
- bCalcingAfterLoad = FALSE;
+ bCalcingAfterLoad = false;
- SetDetectiveDirty(FALSE); // noch keine wirklichen Aenderungen
+ SetDetectiveDirty(false); // noch keine wirklichen Aenderungen
// #i112436# If formula cells are already dirty, they don't broadcast further changes.
// So the source ranges of charts must be interpreted even if they are not visible,
@@ -3184,7 +3184,7 @@ void ScDocument::CalcAfterLoad()
}
-USHORT ScDocument::GetErrCode( const ScAddress& rPos ) const
+sal_uInt16 ScDocument::GetErrCode( const ScAddress& rPos ) const
{
SCTAB nTab = rPos.Tab();
if ( pTab[nTab] )
@@ -3207,46 +3207,46 @@ void ScDocument::ResetChanged( const ScRange& rRange )
//
-void ScDocument::SetColWidth( SCCOL nCol, SCTAB nTab, USHORT nNewWidth )
+void ScDocument::SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetColWidth( nCol, nNewWidth );
}
-void ScDocument::SetColWidthOnly( SCCOL nCol, SCTAB nTab, USHORT nNewWidth )
+void ScDocument::SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetColWidthOnly( nCol, nNewWidth );
}
-void ScDocument::SetRowHeight( SCROW nRow, SCTAB nTab, USHORT nNewHeight )
+void ScDocument::SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowHeight( nRow, nNewHeight );
}
-void ScDocument::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nNewHeight )
+void ScDocument::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowHeightRange
( nStartRow, nEndRow, nNewHeight, 1.0, 1.0 );
}
-void ScDocument::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nNewHeight )
+void ScDocument::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowHeightOnly( nStartRow, nEndRow, nNewHeight );
}
-void ScDocument::SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bManual )
+void ScDocument::SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bManual )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetManualHeight( nStartRow, nEndRow, bManual );
}
-USHORT ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetColWidth( nCol );
@@ -3255,7 +3255,7 @@ USHORT ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab ) const
}
-USHORT ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetOriginalWidth( nCol );
@@ -3264,7 +3264,7 @@ USHORT ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
}
-USHORT ScDocument::GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetCommonWidth( nEndCol );
@@ -3273,7 +3273,7 @@ USHORT ScDocument::GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const
}
-USHORT ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetOriginalHeight( nRow );
@@ -3282,7 +3282,7 @@ USHORT ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
}
-USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) const
+sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowHeight( nRow, NULL, NULL, bHiddenAsZero );
@@ -3291,7 +3291,7 @@ USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) co
}
-USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
+sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowHeight( nRow, pStartRow, pEndRow, bHiddenAsZero );
@@ -3300,7 +3300,7 @@ USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW
}
-ULONG ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const
+sal_uLong ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const
{
if (nStartRow == nEndRow)
return GetRowHeight( nStartRow, nTab); // faster for a single row
@@ -3316,17 +3316,17 @@ ULONG ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) con
return 0;
}
-SCROW ScDocument::GetRowForHeight( SCTAB nTab, ULONG nHeight ) const
+SCROW ScDocument::GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const
{
return pTab[nTab]->GetRowForHeight(nHeight);
}
-ULONG ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow,
+sal_uLong ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow,
SCTAB nTab, double fScale ) const
{
// faster for a single row
if (nStartRow == nEndRow)
- return (ULONG) (GetRowHeight( nStartRow, nTab) * fScale);
+ return (sal_uLong) (GetRowHeight( nStartRow, nTab) * fScale);
// check bounds because this method replaces former for(i=start;i<=end;++i) loops
if (nStartRow > nEndRow)
@@ -3348,7 +3348,7 @@ SCROW ScDocument::GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const
}
-ULONG ScDocument::GetColOffset( SCCOL nCol, SCTAB nTab ) const
+sal_uLong ScDocument::GetColOffset( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetColOffset( nCol );
@@ -3357,7 +3357,7 @@ ULONG ScDocument::GetColOffset( SCCOL nCol, SCTAB nTab ) const
}
-ULONG ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
+sal_uLong ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowOffset( nRow );
@@ -3366,10 +3366,10 @@ ULONG ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
}
-USHORT ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
+sal_uInt16 ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bFormula, const ScMarkData* pMarkData,
+ sal_Bool bFormula, const ScMarkData* pMarkData,
const ScColWidthParam* pParam )
{
if ( ValidTab(nTab) && pTab[nTab] )
@@ -3384,7 +3384,7 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bWidth, BOOL bTotalSize )
+ sal_Bool bWidth, sal_Bool bTotalSize )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetNeededSize
@@ -3394,18 +3394,18 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
-BOOL ScDocument::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nExtra,
+sal_Bool ScDocument::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nExtra,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bShrink )
+ sal_Bool bShrink )
{
//! MarkToMulti();
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->SetOptimalHeight( nStartRow, nEndRow, nExtra,
pDev, nPPTX, nPPTY, rZoomX, rZoomY, bShrink );
OSL_FAIL("Falsche Tabellennummer");
- return FALSE;
+ return false;
}
@@ -3414,19 +3414,19 @@ void ScDocument::UpdateAllRowHeights( OutputDevice* pDev, double nPPTX, double n
{
// one progress across all (selected) sheets
- ULONG nCellCount = 0;
+ sal_uLong nCellCount = 0;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) )
nCellCount += pTab[nTab]->GetWeightedCount();
ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount );
- ULONG nProgressStart = 0;
+ sal_uLong nProgressStart = 0;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) )
{
pTab[nTab]->SetOptimalHeightOnly( 0, MAXROW, 0,
- pDev, nPPTX, nPPTY, rZoomX, rZoomY, FALSE, &aProgress, nProgressStart );
+ pDev, nPPTX, nPPTY, rZoomX, rZoomY, false, &aProgress, nProgressStart );
pTab[nTab]->SetDrawPageSize(true, true);
nProgressStart += pTab[nTab]->GetWeightedCount();
}
@@ -3437,42 +3437,42 @@ void ScDocument::UpdateAllRowHeights( OutputDevice* pDev, double nPPTX, double n
// Spalten-/Zeilen-Flags ----------------------------------------------
//
-void ScDocument::ShowCol(SCCOL nCol, SCTAB nTab, BOOL bShow)
+void ScDocument::ShowCol(SCCOL nCol, SCTAB nTab, sal_Bool bShow)
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->ShowCol( nCol, bShow );
}
-void ScDocument::ShowRow(SCROW nRow, SCTAB nTab, BOOL bShow)
+void ScDocument::ShowRow(SCROW nRow, SCTAB nTab, sal_Bool bShow)
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->ShowRow( nRow, bShow );
}
-void ScDocument::ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, BOOL bShow)
+void ScDocument::ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, sal_Bool bShow)
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->ShowRows( nRow1, nRow2, bShow );
}
-void ScDocument::SetRowFlags( SCROW nRow, SCTAB nTab, BYTE nNewFlags )
+void ScDocument::SetRowFlags( SCROW nRow, SCTAB nTab, sal_uInt8 nNewFlags )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowFlags( nRow, nNewFlags );
}
-void ScDocument::SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BYTE nNewFlags )
+void ScDocument::SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt8 nNewFlags )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowFlags( nStartRow, nEndRow, nNewFlags );
}
-BYTE ScDocument::GetColFlags( SCCOL nCol, SCTAB nTab ) const
+sal_uInt8 ScDocument::GetColFlags( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetColFlags( nCol );
@@ -3480,7 +3480,7 @@ BYTE ScDocument::GetColFlags( SCCOL nCol, SCTAB nTab ) const
return 0;
}
-BYTE ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
+sal_uInt8 ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowFlags( nRow );
@@ -3488,17 +3488,17 @@ BYTE ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
return 0;
}
-ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArrayModifiable(
+ScBitMaskCompressedArray< SCROW, sal_uInt8> & ScDocument::GetRowFlagsArrayModifiable(
SCTAB nTab )
{
- return const_cast< ScBitMaskCompressedArray< SCROW, BYTE> & >(
+ return const_cast< ScBitMaskCompressedArray< SCROW, sal_uInt8> & >(
GetRowFlagsArray( nTab));
}
-const ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArray(
+const ScBitMaskCompressedArray< SCROW, sal_uInt8> & ScDocument::GetRowFlagsArray(
SCTAB nTab ) const
{
- const ScBitMaskCompressedArray< SCROW, BYTE> * pFlags;
+ const ScBitMaskCompressedArray< SCROW, sal_uInt8> * pFlags;
if ( ValidTab(nTab) && pTab[nTab] )
pFlags = pTab[nTab]->GetRowFlagsArray();
else
@@ -3509,7 +3509,7 @@ const ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArray(
if (!pFlags)
{
OSL_FAIL("no row flags at sheet");
- static ScBitMaskCompressedArray< SCROW, BYTE> aDummy( MAXROW, 0);
+ static ScBitMaskCompressedArray< SCROW, sal_uInt8> aDummy( MAXROW, 0);
pFlags = &aDummy;
}
return *pFlags;
@@ -3766,8 +3766,8 @@ SCCOL ScDocument::GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const
{
if ( ValidTab(nTab) && pTab[nTab] )
{
- BYTE nStartFlags = pTab[nTab]->GetColFlags(nStart);
- USHORT nStartWidth = pTab[nTab]->GetOriginalWidth(nStart);
+ sal_uInt8 nStartFlags = pTab[nTab]->GetColFlags(nStart);
+ sal_uInt16 nStartWidth = pTab[nTab]->GetOriginalWidth(nStart);
for (SCCOL nCol = nStart + 1; nCol <= MAXCOL; nCol++)
{
if (((nStartFlags & CR_MANUALBREAK) != (pTab[nTab]->GetColFlags(nCol) & CR_MANUALBREAK)) ||
@@ -3785,7 +3785,7 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa
if (!ValidTab(nTab) || !pTab[nTab])
return 0;
- const ScBitMaskCompressedArray<SCROW, BYTE>* pRowFlagsArray = pTab[nTab]->GetRowFlagsArray();
+ const ScBitMaskCompressedArray<SCROW, sal_uInt8>* pRowFlagsArray = pTab[nTab]->GetRowFlagsArray();
if (!pRowFlagsArray)
return 0;
@@ -3796,12 +3796,12 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa
SCROW nFlagsEndRow;
SCROW nHiddenEndRow;
SCROW nHeightEndRow;
- BYTE nFlags;
+ sal_uInt8 nFlags;
bool bHidden;
- USHORT nHeight;
- BYTE nStartFlags = nFlags = pRowFlagsArray->GetValue( nStart, nIndex, nFlagsEndRow);
+ sal_uInt16 nHeight;
+ sal_uInt8 nStartFlags = nFlags = pRowFlagsArray->GetValue( nStart, nIndex, nFlagsEndRow);
bool bStartHidden = bHidden = pTab[nTab]->RowHidden( nStart, NULL, &nHiddenEndRow);
- USHORT nStartHeight = nHeight = pTab[nTab]->GetRowHeight( nStart, NULL, &nHeightEndRow, false);
+ sal_uInt16 nStartHeight = nHeight = pTab[nTab]->GetRowHeight( nStart, NULL, &nHeightEndRow, false);
SCROW nRow;
while ((nRow = std::min( nHiddenEndRow, std::min( nFlagsEndRow, nHeightEndRow)) + 1) <= MAXROW)
{
@@ -3823,9 +3823,9 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa
return MAXROW+1;
}
-BOOL ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault)
+sal_Bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault)
{
- BOOL bRet(FALSE);
+ sal_Bool bRet(false);
nDefault = 0;
ScDocAttrIterator aDocAttrItr(this, nTab, nCol, 0, nCol, nLastRow);
SCCOL nColumn;
@@ -3868,16 +3868,16 @@ BOOL ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& n
++aItr;
}
nDefault = aDefaultItr->nFirst;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
-BOOL ScDocument::GetRowDefault( SCTAB /* nTab */, SCROW /* nRow */, SCCOL /* nLastCol */, SCCOL& /* nDefault */ )
+sal_Bool ScDocument::GetRowDefault( SCTAB /* nTab */, SCROW /* nRow */, SCCOL /* nLastCol */, SCCOL& /* nDefault */ )
{
- BOOL bRet(FALSE);
+ sal_Bool bRet(false);
return bRet;
}
@@ -3898,7 +3898,7 @@ void ScDocument::ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, S
// Attribute ----------------------------------------------------------
//
-const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const
+const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
{
@@ -4032,7 +4032,7 @@ void ScDocument::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkDat
void ScDocument::ApplySelectionLineStyle( const ScMarkData& rMark,
- const SvxBorderLine* pLine, BOOL bColorOnly )
+ const SvxBorderLine* pLine, sal_Bool bColorOnly )
{
if ( bColorOnly && !pLine )
return;
@@ -4055,8 +4055,8 @@ const ScStyleSheet* ScDocument::GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) c
const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) const
{
- BOOL bEqual = TRUE;
- BOOL bFound;
+ sal_Bool bEqual = sal_True;
+ sal_Bool bFound;
const ScStyleSheet* pStyle = NULL;
const ScStyleSheet* pNewStyle;
@@ -4069,7 +4069,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
if (bFound)
{
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = false; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -4086,7 +4086,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
if (bFound)
{
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = false; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -4096,7 +4096,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
}
-void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRemoved,
+void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY )
@@ -4114,7 +4114,7 @@ void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL b
}
-BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const
+sal_Bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const
{
if ( bStyleSheetUsageInvalid || rStyle.GetUsage() == ScStyleSheet::UNKNOWN )
{
@@ -4131,7 +4131,7 @@ BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllSt
}
}
- BOOL bIsUsed = FALSE;
+ sal_Bool bIsUsed = false;
for ( SCTAB i=0; i<=MAXTAB; i++ )
{
@@ -4140,14 +4140,14 @@ BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllSt
if ( pTab[i]->IsStyleSheetUsed( rStyle, bGatherAllStyles ) )
{
if ( !bGatherAllStyles )
- return TRUE;
- bIsUsed = TRUE;
+ return sal_True;
+ bIsUsed = sal_True;
}
}
}
if ( bGatherAllStyles )
- bStyleSheetUsageInvalid = FALSE;
+ bStyleSheetUsageInvalid = false;
return bIsUsed;
}
@@ -4156,32 +4156,32 @@ BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllSt
}
-BOOL ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, INT16 nFlags )
+sal_Bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
return pTab[nTab]->ApplyFlags( nStartCol, nStartRow, nEndCol, nEndRow, nFlags );
OSL_FAIL("ApplyFlags: falsche Tabelle");
- return FALSE;
+ return false;
}
-BOOL ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, INT16 nFlags )
+sal_Bool ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
return pTab[nTab]->RemoveFlags( nStartCol, nStartRow, nEndCol, nEndRow, nFlags );
OSL_FAIL("RemoveFlags: falsche Tabelle");
- return FALSE;
+ return false;
}
void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr,
- BOOL bPutToPool )
+ sal_Bool bPutToPool )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -4190,7 +4190,7 @@ void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPattern
void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr,
- BOOL bPutToPool )
+ sal_Bool bPutToPool )
{
SCTAB nTab = rPos.Tab();
if (pTab[nTab])
@@ -4198,7 +4198,7 @@ void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr,
}
-ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, BOOL bDeep )
+ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep )
{
ScMergePatternState aState;
@@ -4227,7 +4227,7 @@ ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, BOOL
}
-const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark, BOOL bDeep )
+const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep )
{
delete pSelectionAttr;
pSelectionAttr = CreateSelectionPattern( rMark, bDeep );
@@ -4247,9 +4247,9 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark,
rLineInner.SetLine(NULL, BOXINFO_LINE_HORI);
rLineInner.SetLine(NULL, BOXINFO_LINE_VERT);
- rLineInner.SetTable(TRUE);
- rLineInner.SetDist(TRUE);
- rLineInner.SetMinDist(FALSE);
+ rLineInner.SetTable(sal_True);
+ rLineInner.SetDist(sal_True);
+ rLineInner.SetMinDist(false);
ScLineFlags aFlags;
@@ -4278,7 +4278,7 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark,
bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, USHORT nMask )
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt16 nMask )
{
if ( nMask & HASATTR_ROTATE )
{
@@ -4287,19 +4287,19 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- BOOL bAnyItem = FALSE;
- USHORT nRotCount = pPool->GetItemCount( ATTR_ROTATE_VALUE );
- for (USHORT nItem=0; nItem<nRotCount; nItem++)
+ sal_Bool bAnyItem = false;
+ sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE );
+ for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++)
{
- const SfxPoolItem* pItem = pPool->GetItem( ATTR_ROTATE_VALUE, nItem );
+ const SfxPoolItem* pItem = pPool->GetItem2( ATTR_ROTATE_VALUE, nItem );
if ( pItem )
{
// 90 or 270 degrees is former SvxOrientationItem - only look for other values
// (see ScPatternAttr::GetCellOrientation)
- INT32 nAngle = static_cast<const SfxInt32Item*>(pItem)->GetValue();
+ sal_Int32 nAngle = static_cast<const SfxInt32Item*>(pItem)->GetValue();
if ( nAngle != 0 && nAngle != 9000 && nAngle != 27000 )
{
- bAnyItem = TRUE;
+ bAnyItem = sal_True;
break;
}
}
@@ -4315,14 +4315,14 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- BOOL bHasRtl = FALSE;
- USHORT nDirCount = pPool->GetItemCount( ATTR_WRITINGDIR );
- for (USHORT nItem=0; nItem<nDirCount; nItem++)
+ sal_Bool bHasRtl = false;
+ sal_uInt32 nDirCount = pPool->GetItemCount2( ATTR_WRITINGDIR );
+ for (sal_uInt32 nItem=0; nItem<nDirCount; nItem++)
{
- const SfxPoolItem* pItem = pPool->GetItem( ATTR_WRITINGDIR, nItem );
+ const SfxPoolItem* pItem = pPool->GetItem2( ATTR_WRITINGDIR, nItem );
if ( pItem && ((const SvxFrameDirectionItem*)pItem)->GetValue() == FRMDIR_HORI_RIGHT_TOP )
{
- bHasRtl = TRUE;
+ bHasRtl = sal_True;
break;
}
}
@@ -4345,7 +4345,7 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
if ( nMask & HASATTR_RIGHTORCENTER )
{
// On a RTL sheet, don't start to look for the default left value
- // (which is then logically right), instead always assume TRUE.
+ // (which is then logically right), instead always assume sal_True.
// That way, ScAttrArray::HasAttrib doesn't have to handle RTL sheets.
if ( IsLayoutRTL(i) )
@@ -4359,7 +4359,7 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
return bFound;
}
-bool ScDocument::HasAttrib( const ScRange& rRange, USHORT nMask )
+bool ScDocument::HasAttrib( const ScRange& rRange, sal_uInt16 nMask )
{
return HasAttrib( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -4430,7 +4430,7 @@ void ScDocument::GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
*ppBottom = pBottomLine;
}
-BOOL ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes ) const
{
if (VALIDTAB(nTab))
@@ -4438,7 +4438,7 @@ BOOL ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
return pTab[nTab]->IsBlockEmpty( nStartCol, nStartRow, nEndCol, nEndRow, bIgnoreNotes );
OSL_FAIL("Falsche Tabellennummer");
- return FALSE;
+ return false;
}
@@ -4464,16 +4464,16 @@ void ScDocument::UnlockTable(SCTAB nTab)
}
-BOOL ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
- BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+ sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
// import into read-only document is possible
if ( !bImportingXML && !mbChangeReadOnlyEnabled && pShell && pShell->IsReadOnly() )
{
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
+ return false;
}
if (VALIDTAB(nTab))
@@ -4483,27 +4483,27 @@ BOOL ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
OSL_FAIL("Falsche Tabellennummer");
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
+ return false;
}
-BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
- BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+sal_Bool ScDocument::IsSelectionEditable( const ScMarkData& rMark,
+ sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
// import into read-only document is possible
if ( !bImportingXML && !mbChangeReadOnlyEnabled && pShell && pShell->IsReadOnly() )
{
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
+ return false;
}
ScRange aRange;
rMark.GetMarkArea(aRange);
- BOOL bOk = TRUE;
- BOOL bMatrix = ( pOnlyNotBecauseOfMatrix != NULL );
+ sal_Bool bOk = sal_True;
+ sal_Bool bMatrix = ( pOnlyNotBecauseOfMatrix != NULL );
for ( SCTAB i=0; i<=MAXTAB && (bOk || bMatrix); i++ )
{
if ( pTab[i] && rMark.GetTableSelect(i) )
@@ -4514,7 +4514,7 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
aRange.aStart.Row(), aRange.aEnd.Col(),
aRange.aEnd.Row(), pOnlyNotBecauseOfMatrix ) )
{
- bOk = FALSE;
+ bOk = false;
if ( pOnlyNotBecauseOfMatrix )
bMatrix = *pOnlyNotBecauseOfMatrix;
}
@@ -4523,7 +4523,7 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
{
if ( !pTab[i]->IsSelectionEditable( rMark, pOnlyNotBecauseOfMatrix ) )
{
- bOk = FALSE;
+ bOk = false;
if ( pOnlyNotBecauseOfMatrix )
bMatrix = *pOnlyNotBecauseOfMatrix;
}
@@ -4538,35 +4538,35 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
}
-BOOL ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) const
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for (SCTAB i=0; i<=MAXTAB && bOk; i++)
if (pTab[i])
if (rMark.GetTableSelect(i))
if (pTab[i]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow ))
- bOk = FALSE;
+ bOk = false;
return !bOk;
}
-BOOL ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const
+sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = true;
if ( pTab[nTab] && pTab[nTab]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow ) )
{
- bOk = FALSE;
+ bOk = false;
}
return !bOk;
}
-BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix )
+sal_Bool ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix )
{
// if rCell is part of a matrix formula, return its complete range
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScBaseCell* pCell = GetCell( rCellPos );
if (pCell && pCell->GetCellType() == CELLTYPE_FORMULA)
{
@@ -4598,7 +4598,7 @@ BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMat
rMatrix.aStart = aOrigin;
rMatrix.aEnd = aEnd;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -4607,10 +4607,10 @@ BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMat
}
-BOOL ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
+sal_Bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( ValidColRow(rStartCol,rStartRow) && ValidColRow(nEndCol,nEndRow) && ValidTab(nTab) )
{
if (pTab[nTab])
@@ -4662,13 +4662,13 @@ BOOL ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
}
-BOOL ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- const ScMarkData& rMark, BOOL bRefresh, BOOL bAttrs )
+ const ScMarkData& rMark, sal_Bool bRefresh, sal_Bool bAttrs )
{
// use all selected sheets from rMark
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nOldEndCol = rEndCol;
SCROW nOldEndRow = rEndRow;
@@ -4678,7 +4678,7 @@ BOOL ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
SCCOL nThisEndCol = nOldEndCol;
SCROW nThisEndRow = nOldEndRow;
if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, nTab, bRefresh, bAttrs ) )
- bFound = TRUE;
+ bFound = sal_True;
if ( nThisEndCol > rEndCol )
rEndCol = nThisEndCol;
if ( nThisEndRow > rEndRow )
@@ -4689,11 +4689,11 @@ BOOL ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
}
-BOOL ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- SCTAB nTab, BOOL bRefresh, BOOL bAttrs )
+ SCTAB nTab, sal_Bool bRefresh, sal_Bool bAttrs )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( ValidColRow(nStartCol,nStartRow) && ValidColRow(rEndCol,rEndRow) && ValidTab(nTab) )
{
if (pTab[nTab])
@@ -4711,9 +4711,9 @@ BOOL ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
}
-BOOL ScDocument::ExtendMerge( ScRange& rRange, BOOL bRefresh, BOOL bAttrs )
+sal_Bool ScDocument::ExtendMerge( ScRange& rRange, sal_Bool bRefresh, sal_Bool bAttrs )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCTAB nStartTab = rRange.aStart.Tab();
SCTAB nEndTab = rRange.aEnd.Tab();
SCCOL nEndCol = rRange.aEnd.Col();
@@ -4728,7 +4728,7 @@ BOOL ScDocument::ExtendMerge( ScRange& rRange, BOOL bRefresh, BOOL bAttrs )
nExtendCol, nExtendRow,
nTab, bRefresh, bAttrs ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if (nExtendCol > nEndCol) nEndCol = nExtendCol;
if (nExtendRow > nEndRow) nEndRow = nExtendRow;
}
@@ -4740,12 +4740,12 @@ BOOL ScDocument::ExtendMerge( ScRange& rRange, BOOL bRefresh, BOOL bAttrs )
return bFound;
}
-BOOL ScDocument::ExtendTotalMerge( ScRange& rRange )
+sal_Bool ScDocument::ExtendTotalMerge( ScRange& rRange )
{
// Bereich genau dann auf zusammengefasste Zellen erweitern, wenn
// dadurch keine neuen nicht-ueberdeckten Zellen getroffen werden
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScRange aExt = rRange;
if (ExtendMerge(aExt))
{
@@ -4770,9 +4770,9 @@ BOOL ScDocument::ExtendTotalMerge( ScRange& rRange )
return bRet;
}
-BOOL ScDocument::ExtendOverlapped( ScRange& rRange )
+sal_Bool ScDocument::ExtendOverlapped( ScRange& rRange )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCTAB nStartTab = rRange.aStart.Tab();
SCTAB nEndTab = rRange.aEnd.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -4788,12 +4788,12 @@ BOOL ScDocument::ExtendOverlapped( ScRange& rRange )
if (nExtendCol < nStartCol)
{
nStartCol = nExtendCol;
- bFound = TRUE;
+ bFound = sal_True;
}
if (nExtendRow < nStartRow)
{
nStartRow = nExtendRow;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -4803,11 +4803,11 @@ BOOL ScDocument::ExtendOverlapped( ScRange& rRange )
return bFound;
}
-BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab )
{
- USHORT nCount = pDBCollection->GetCount();
- USHORT i;
+ sal_uInt16 nCount = pDBCollection->GetCount();
+ sal_uInt16 i;
ScDBData* pData;
SCTAB nDBTab;
SCCOL nDBStartCol;
@@ -4817,7 +4817,7 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
// Autofilter loeschen
- BOOL bChange = RemoveFlagsTab( nStartCol,nStartRow, nEndCol,nEndRow, nTab, SC_MF_AUTO );
+ sal_Bool bChange = RemoveFlagsTab( nStartCol,nStartRow, nEndCol,nEndRow, nTab, SC_MF_AUTO );
// Autofilter setzen
@@ -4832,7 +4832,7 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
{
if (ApplyFlagsTab( nDBStartCol,nDBStartRow, nDBEndCol,nDBStartRow,
nDBTab, SC_MF_AUTO ))
- bChange = TRUE;
+ bChange = sal_True;
}
}
}
@@ -4847,7 +4847,7 @@ void ScDocument::SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const
--rRow;
}
-BOOL ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
const ScMergeFlagAttr* pAttr = (const ScMergeFlagAttr*)
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG );
@@ -4856,12 +4856,12 @@ BOOL ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
else
{
OSL_FAIL("Overlapped: Attr==0");
- return FALSE;
+ return false;
}
}
-BOOL ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
const ScMergeFlagAttr* pAttr = (const ScMergeFlagAttr*)
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG );
@@ -4870,7 +4870,7 @@ BOOL ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
else
{
OSL_FAIL("Overlapped: Attr==0");
- return FALSE;
+ return false;
}
}
@@ -4880,7 +4880,7 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark,
const SvxBoxInfoItem* pLineInner )
{
ScRangeList aRangeList;
- rMark.FillRangeListWithMarks( &aRangeList, FALSE );
+ rMark.FillRangeListWithMarks( &aRangeList, false );
size_t nRangeCount = aRangeList.size();
for (SCTAB i=0; i<=MAXTAB; i++)
{
@@ -4915,11 +4915,11 @@ void ScDocument::ApplyFrameAreaTab( const ScRange& rRange,
void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark, ScEditDataArray* pDataArray )
{
const SfxItemSet* pSet = &rAttr.GetItemSet();
- BOOL bSet = FALSE;
- USHORT i;
+ sal_Bool bSet = false;
+ sal_uInt16 i;
for (i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END && !bSet; i++)
if (pSet->GetItemState(i) == SFX_ITEM_SET)
- bSet = TRUE;
+ bSet = sal_True;
if (bSet)
{
@@ -4943,7 +4943,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
}
-void ScDocument::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark )
+void ScDocument::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark )
{
for (SCTAB i=0; i<=MAXTAB; i++)
if (pTab[i] && rMark.GetTableSelect(i))
@@ -4951,7 +4951,7 @@ void ScDocument::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark
}
-void ScDocument::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark )
+void ScDocument::ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark )
{
for (SCTAB i=0; i<=MAXTAB; i++)
if (pTab[i] && rMark.GetTableSelect(i))
@@ -4959,7 +4959,7 @@ void ScDocument::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rM
}
-void ScDocument::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
+void ScDocument::DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark )
{
for (SCTAB i=0; i<=MAXTAB; i++)
if (pTab[i] && rMark.GetTableSelect(i))
@@ -4967,7 +4967,7 @@ void ScDocument::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
}
-void ScDocument::DeleteSelectionTab( SCTAB nTab, USHORT nDelFlag, const ScMarkData& rMark )
+void ScDocument::DeleteSelectionTab( SCTAB nTab, sal_uInt16 nDelFlag, const ScMarkData& rMark )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->DeleteSelection( nDelFlag, rMark );
@@ -5023,12 +5023,12 @@ void ScDocument::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX
void ScDocument::GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
- BOOL bMarked, BOOL bUnprotected, const ScMarkData& rMark )
+ sal_Bool bMarked, sal_Bool bUnprotected, const ScMarkData& rMark )
{
DBG_ASSERT( !nMovX || !nMovY, "GetNextPos: nur X oder Y" );
ScMarkData aCopyMark = rMark;
- aCopyMark.SetMarking(FALSE);
+ aCopyMark.SetMarking(false);
aCopyMark.MarkToMulti();
if (ValidTab(nTab) && pTab[nTab])
@@ -5046,11 +5046,11 @@ void ScDocument::UpdStlShtPtrsFrmNms()
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- USHORT nCount = pPool->GetItemCount(ATTR_PATTERN);
+ sal_uInt32 nCount = pPool->GetItemCount2(ATTR_PATTERN);
ScPatternAttr* pPattern;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- pPattern = (ScPatternAttr*)pPool->GetItem(ATTR_PATTERN, i);
+ pPattern = (ScPatternAttr*)pPool->GetItem2(ATTR_PATTERN, i);
if (pPattern)
pPattern->UpdateStyleSheet();
}
@@ -5064,11 +5064,11 @@ void ScDocument::StylesToNames()
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- USHORT nCount = pPool->GetItemCount(ATTR_PATTERN);
+ sal_uInt32 nCount = pPool->GetItemCount2(ATTR_PATTERN);
ScPatternAttr* pPattern;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- pPattern = (ScPatternAttr*)pPool->GetItem(ATTR_PATTERN, i);
+ pPattern = (ScPatternAttr*)pPool->GetItem2(ATTR_PATTERN, i);
if (pPattern)
pPattern->StyleToName();
}
@@ -5076,9 +5076,9 @@ void ScDocument::StylesToNames()
}
-ULONG ScDocument::GetCellCount() const
+sal_uLong ScDocument::GetCellCount() const
{
- ULONG nCellCount = 0L;
+ sal_uLong nCellCount = 0L;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] )
@@ -5095,9 +5095,9 @@ SCSIZE ScDocument::GetCellCount(SCTAB nTab, SCCOL nCol) const
return pTab[nTab]->GetCellCount(nCol);
}
-ULONG ScDocument::GetCodeCount() const
+sal_uLong ScDocument::GetCodeCount() const
{
- ULONG nCodeCount = 0;
+ sal_uLong nCodeCount = 0;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] )
@@ -5170,13 +5170,13 @@ void ScDocument::RemoveManualBreaks( SCTAB nTab )
pTab[nTab]->RemoveManualBreaks();
}
-BOOL ScDocument::HasManualBreaks( SCTAB nTab ) const
+sal_Bool ScDocument::HasManualBreaks( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->HasManualBreaks();
OSL_FAIL("falsche Tab");
- return FALSE;
+ return false;
}
@@ -5188,9 +5188,9 @@ void ScDocument::GetDocStat( ScDocStat& rDocStat )
}
-BOOL ScDocument::HasPrintRange()
+sal_Bool ScDocument::HasPrintRange()
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = false;
for ( SCTAB i=0; !bResult && i<nMaxTableNumber; i++ )
if ( pTab[i] )
@@ -5200,13 +5200,13 @@ BOOL ScDocument::HasPrintRange()
}
-BOOL ScDocument::IsPrintEntireSheet( SCTAB nTab ) const
+sal_Bool ScDocument::IsPrintEntireSheet( SCTAB nTab ) const
{
return (ValidTab(nTab) ) && pTab[nTab] && pTab[nTab]->IsPrintEntireSheet();
}
-USHORT ScDocument::GetPrintRangeCount( SCTAB nTab )
+sal_uInt16 ScDocument::GetPrintRangeCount( SCTAB nTab )
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetPrintRangeCount();
@@ -5215,7 +5215,7 @@ USHORT ScDocument::GetPrintRangeCount( SCTAB nTab )
}
-const ScRange* ScDocument::GetPrintRange( SCTAB nTab, USHORT nPos )
+const ScRange* ScDocument::GetPrintRange( SCTAB nTab, sal_uInt16 nPos )
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetPrintRange(nPos);
@@ -5297,7 +5297,7 @@ void ScDocument::RestorePrintRanges( const ScPrintRangeSaver& rSaver )
}
-BOOL ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
+sal_Bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
{
// Die Seitennummern-Zaehlung faengt bei einer Tabelle neu an, wenn eine
// andere Vorlage als bei der vorherigen gesetzt ist (nur Namen vergleichen)
@@ -5312,14 +5312,14 @@ BOOL ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
if ( pStyle )
{
const SfxItemSet& rSet = pStyle->GetItemSet();
- USHORT nFirst = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_FIRSTPAGENO)).GetValue();
+ sal_uInt16 nFirst = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_FIRSTPAGENO)).GetValue();
if ( nFirst != 0 )
- return TRUE; // Seitennummer in neuer Vorlage angegeben
+ return sal_True; // Seitennummer in neuer Vorlage angegeben
}
}
}
- return FALSE; // sonst nicht
+ return false; // sonst nicht
}
SfxUndoManager* ScDocument::GetUndoManager()
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index 0a238dbc64a6..67b55e7f0155 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -65,7 +65,7 @@ using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::sheet::DataPilotFieldFilter;
-static BOOL lcl_HasQueryEntry( const ScQueryParam& rParam )
+static sal_Bool lcl_HasQueryEntry( const ScQueryParam& rParam )
{
return rParam.GetEntryCount() > 0 &&
rParam.GetEntry(0).bDoQuery;
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index ab65870b506f..03a176c65f2f 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -117,7 +117,7 @@ void ScDPSaveGroupItem::AddToData( ScDPGroupDimension& rDataDim, SvNumberFormatt
sal_uInt32 nFormat = 0; //! ...
double fValue;
if ( pFormatter->IsNumberFormat( *aIter, nFormat, fValue ) )
- aData = ScDPItemData( *aIter, fValue, TRUE );
+ aData = ScDPItemData( *aIter, fValue, sal_True );
else
aData.SetString( *aIter );
@@ -258,7 +258,7 @@ bool ScDPSaveGroupDimension::HasOnlyHidden( const ScStrCollection& rVisible )
for ( ScDPSaveGroupItemVec::const_iterator aIter(aGroups.begin()); aIter != aGroups.end() && bAllHidden; aIter++ )
{
StrData aSearch( aIter->GetGroupName() );
- USHORT nCollIndex;
+ sal_uInt16 nCollIndex;
if ( rVisible.Search( &aSearch, nCollIndex ) )
bAllHidden = false; // found one that is visible
}
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index e7fc20fc9d60..ab2094707a86 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -71,7 +71,7 @@ using ::boost::shared_ptr;
#define D_TIMEFACTOR 86400.0
-const USHORT SC_DP_LEAPYEAR = 1648; // arbitrary leap year for date calculations
+const sal_uInt16 SC_DP_LEAPYEAR = 1648; // arbitrary leap year for date calculations
// part values for the extra "<" and ">" entries (same for all parts)
const sal_Int32 SC_DP_DATE_FIRST = -1;
@@ -80,10 +80,10 @@ const sal_Int32 SC_DP_DATE_LAST = 10000;
// ============================================================================
namespace
{
- BOOL lcl_Search( SCCOL nSourceDim, const ScDPCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex)
+ sal_Bool lcl_Search( SCCOL nSourceDim, const ScDPCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex)
{
rIndex = vIdx.size();
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCROW nLo = 0;
SCROW nHi = vIdx.size() - 1;
SCROW nIndex;
@@ -103,7 +103,7 @@ namespace
nHi = nIndex - 1;
if (nCompare == 0)
{
- bFound = TRUE;
+ bFound = sal_True;
nLo = nIndex;
}
}
@@ -144,7 +144,7 @@ namespace
template<bool bUpdateData>
void lcl_InsertValue ( SCCOL nSourceDim, const ScDPCache* pCache, std::vector< SCROW >& vIdx, const String& rString, const double& fValue )
{
- lcl_InsertValue<bUpdateData>( nSourceDim, pCache, vIdx, ScDPItemData( rString, fValue, TRUE ) );
+ lcl_InsertValue<bUpdateData>( nSourceDim, pCache, vIdx, ScDPItemData( rString, fValue, sal_True ) );
}
template<bool bUpdateData>
@@ -155,7 +155,7 @@ namespace
void lcl_AppendDateStr( rtl::OUStringBuffer& rBuffer, double fValue, SvNumberFormatter* pFormatter )
{
- ULONG nFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge );
+ sal_uLong nFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge );
String aString;
pFormatter->GetInputLineString( fValue, nFormat, aString );
rBuffer.append( aString );
@@ -442,7 +442,7 @@ String lcl_GetDateGroupName( sal_Int32 nDatePart, sal_Int32 nValue, SvNumberForm
Date aNullDate = *(pFormatter->GetNullDate());
long nDays = aDate - aNullDate;
- ULONG nFormat = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMM, ScGlobal::eLnge );
+ sal_uLong nFormat = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMM, ScGlobal::eLnge );
Color* pColor;
pFormatter->GetOutputString( nDays, nFormat, aRet, &pColor );
}
@@ -534,7 +534,7 @@ sal_Int32 lcl_GetDatePartValue( double fValue, sal_Int32 nDatePart, SvNumberForm
return nResult;
}
-BOOL lcl_DateContained( sal_Int32 nGroupPart, const ScDPItemData& rGroupData,
+sal_Bool lcl_DateContained( sal_Int32 nGroupPart, const ScDPItemData& rGroupData,
sal_Int32 nBasePart, const ScDPItemData& rBaseData )
{
if ( !rGroupData.IsValue() || !rBaseData.IsValue() )
@@ -561,7 +561,7 @@ BOOL lcl_DateContained( sal_Int32 nGroupPart, const ScDPItemData& rGroupData,
return ( nGroupValue == nBaseValue );
}
- BOOL bContained = TRUE;
+ sal_Bool bContained = sal_True;
switch ( nBasePart ) // inner part
{
case com::sun::star::sheet::DataPilotFieldGroupBy::MONTHS:
@@ -1130,13 +1130,13 @@ String ScDPGroupTableData::getDimensionName(long nColumn)
return pSourceData->getDimensionName( nColumn );
}
-BOOL ScDPGroupTableData::getIsDataLayoutDimension(long nColumn)
+sal_Bool ScDPGroupTableData::getIsDataLayoutDimension(long nColumn)
{
// position of data layout dimension is moved from source data
return ( nColumn == sal::static_int_cast<long>( nSourceCount + aGroups.size() ) ); // data layout dimension?
}
-BOOL ScDPGroupTableData::IsDateDimension(long nDim)
+sal_Bool ScDPGroupTableData::IsDateDimension(long nDim)
{
if ( nDim >= nSourceCount )
{
@@ -1149,7 +1149,7 @@ BOOL ScDPGroupTableData::IsDateDimension(long nDim)
return pSourceData->IsDateDimension( nDim );
}
-ULONG ScDPGroupTableData::GetNumberFormat(long nDim)
+sal_uLong ScDPGroupTableData::GetNumberFormat(long nDim)
{
if ( nDim >= nSourceCount )
{
@@ -1173,7 +1173,7 @@ void ScDPGroupTableData::DisposeData()
pSourceData->DisposeData();
}
-void ScDPGroupTableData::SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty )
+void ScDPGroupTableData::SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty )
{
pSourceData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
}
@@ -1372,7 +1372,7 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
double fGroupValue;
String aGroupName = lcl_GetNumGroupForValue( pData->GetValue(),
aNumInfo, bHasNonInteger, cDecSeparator, fGroupValue, pDoc );
- ScDPItemData aItemData ( aGroupName, fGroupValue, TRUE ) ;
+ ScDPItemData aItemData ( aGroupName, fGroupValue, sal_True ) ;
pItemDataIndex[nDim] = pCache->GetAdditionalItemID( aItemData );
}
// else (textual) keep original value
@@ -1394,16 +1394,16 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
}
}
-BOOL ScDPGroupTableData::IsBaseForGroup(long nDim) const
+sal_Bool ScDPGroupTableData::IsBaseForGroup(long nDim) const
{
for ( ScDPGroupDimensionVec::const_iterator aIter(aGroups.begin()); aIter != aGroups.end(); aIter++ )
{
const ScDPGroupDimension& rDim = *aIter;
if ( rDim.GetSourceDim() == nDim )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
long ScDPGroupTableData::GetGroupBase(long nGroupDim) const
@@ -1418,7 +1418,7 @@ long ScDPGroupTableData::GetGroupBase(long nGroupDim) const
return -1; // none
}
-BOOL ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const
+sal_Bool ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const
{
// Virtual method from ScDPTableData, used in result data to force text labels.
@@ -1435,10 +1435,10 @@ BOOL ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const
return ( rDim.GetDateHelper() != NULL );
}
- return FALSE;
+ return false;
}
-BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
+sal_Bool ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
const ScDPItemData& rBaseData, long nBaseIndex ) const
{
for ( ScDPGroupDimensionVec::const_iterator aIter(aGroups.begin()); aIter != aGroups.end(); aIter++ )
@@ -1462,7 +1462,7 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI
if ( !pBaseDateHelper )
{
OSL_FAIL( "mix of date and non-date groups" );
- return TRUE;
+ return true;
}
sal_Int32 nGroupPart = pGroupDateHelper->GetDatePart();
@@ -1482,10 +1482,10 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI
}
OSL_FAIL("IsInGroup: no group dimension found");
- return TRUE;
+ return true;
}
-BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex,
+sal_Bool ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex,
const ScDPItemData& rSecondData, long nSecondIndex ) const
{
const ScDPGroupDimension* pFirstDim = NULL;
@@ -1508,7 +1508,7 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
if ( !pFirstDateHelper || !pSecondDateHelper )
{
OSL_FAIL( "mix of date and non-date groups" );
- return TRUE;
+ return true;
}
sal_Int32 nFirstPart = pFirstDateHelper->GetDatePart();
@@ -1520,7 +1520,7 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
const ScDPGroupItem* pSecondItem = pSecondDim->GetGroupForName( rSecondData );
if ( pFirstItem && pSecondItem )
{
- // two existing groups -> TRUE if they have a common element
+ // two existing groups -> sal_True if they have a common element
return pFirstItem->HasCommonElement( *pSecondItem );
}
else if ( pFirstItem )
@@ -1535,13 +1535,13 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
}
else
{
- // no groups -> TRUE if equal
+ // no groups -> sal_True if equal
return rFirstData.IsCaseInsEqual( rSecondData );
}
}
OSL_FAIL("HasCommonElement: no group dimension found");
- return TRUE;
+ return true;
}
long ScDPGroupTableData::GetSourceDim( long nDim )
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 97cbcb439227..7de3d9884e4e 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -128,7 +128,7 @@ using ::rtl::OUString;
// -----------------------------------------------------------------------
-USHORT lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplier>& xSource )
+sal_uInt16 lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplier>& xSource )
{
long nRet = sheet::DataPilotFieldOrientation_HIDDEN;
if ( xSource.is() )
@@ -136,7 +136,7 @@ USHORT lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplie
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName );
long nIntCount = xIntDims->getCount();
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
for (long nIntDim=0; nIntDim<nIntCount && !bFound; nIntDim++)
{
uno::Reference<uno::XInterface> xIntDim =
@@ -154,7 +154,7 @@ USHORT lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplie
}
}
}
- return static_cast< USHORT >( nRet );
+ return static_cast< sal_uInt16 >( nRet );
}
// -----------------------------------------------------------------------
@@ -167,10 +167,10 @@ ScDPObject::ScDPObject( ScDocument* pD ) :
pServDesc( NULL ),
mpTableData(static_cast<ScDPTableData*>(NULL)),
pOutput( NULL ),
- bSettingsChanged( FALSE ),
- bAlive( FALSE ),
+ bSettingsChanged( false ),
+ bAlive( false ),
mnAutoFormatIndex( 65535 ),
- bAllowMove( FALSE ),
+ bAllowMove( false ),
nHeaderRows( 0 ),
mbHeaderLayout(false)
{
@@ -187,10 +187,10 @@ ScDPObject::ScDPObject(const ScDPObject& r) :
pServDesc( NULL ),
mpTableData(static_cast<ScDPTableData*>(NULL)),
pOutput( NULL ),
- bSettingsChanged( FALSE ),
- bAlive( FALSE ),
+ bSettingsChanged( false ),
+ bAlive( false ),
mnAutoFormatIndex( r.mnAutoFormatIndex ),
- bAllowMove( FALSE ),
+ bAllowMove( false ),
nHeaderRows( r.nHeaderRows ),
mbHeaderLayout( r.mbHeaderLayout )
{
@@ -215,12 +215,12 @@ ScDPObject::~ScDPObject()
ClearSource();
}
-void ScDPObject::SetAlive(BOOL bSet)
+void ScDPObject::SetAlive(sal_Bool bSet)
{
bAlive = bSet;
}
-void ScDPObject::SetAllowMove(BOOL bSet)
+void ScDPObject::SetAllowMove(sal_Bool bSet)
{
bAllowMove = bSet;
}
@@ -327,7 +327,7 @@ void ScDPObject::WriteTempDataTo( ScDPObject& rDest ) const
rDest.nHeaderRows = nHeaderRows;
}
-BOOL ScDPObject::IsSheetData() const
+sal_Bool ScDPObject::IsSheetData() const
{
return ( pSheetDesc != NULL );
}
@@ -369,7 +369,7 @@ void ScDPObject::CreateOutput()
CreateObjects();
if (!pOutput)
{
- BOOL bFilterButton = IsSheetData() && pSaveData && pSaveData->GetFilterButton();
+ sal_Bool bFilterButton = IsSheetData() && pSaveData && pSaveData->GetFilterButton();
pOutput = new ScDPOutput( pDoc, xSource, aOutRange.aStart, bFilterButton );
pOutput->SetHeaderLayout ( mbHeaderLayout );
@@ -394,7 +394,7 @@ void ScDPObject::CreateOutput()
//! modify aOutRange?
- bAllowMove = FALSE; // use only once
+ bAllowMove = false; // use only once
}
}
}
@@ -484,12 +484,12 @@ void ScDPObject::CreateObjects()
if (pSaveData)
pSaveData->WriteToSource( xSource );
}
- bSettingsChanged = FALSE;
+ bSettingsChanged = false;
}
void ScDPObject::InvalidateData()
{
- bSettingsChanged = TRUE;
+ bSettingsChanged = sal_True;
}
void ScDPObject::ClearSource()
@@ -557,7 +557,7 @@ const ScRange ScDPObject::GetOutputRangeByType( sal_Int32 nType )
return pOutput->GetOutputRange(nType);
}
-BOOL lcl_HasButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_Bool lcl_HasButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
return ((const ScMergeFlagAttr*)pDoc->GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->HasButton();
}
@@ -582,7 +582,7 @@ void ScDPObject::RefreshAfterLoad()
pDoc->IsBlockEmpty( nTab, nFirstCol, nFirstRow + nInitial, nFirstCol, nFirstRow + nInitial ) &&
aOutRange.aEnd.Col() > nFirstCol )
{
- BOOL bFilterButton = IsSheetData(); // when available, filter button setting must be checked here
+ sal_Bool bFilterButton = IsSheetData(); // when available, filter button setting must be checked here
SCROW nSkip = bFilterButton ? 1 : 0;
for (SCROW nPos=nSkip; nPos<nInitial; nPos++)
@@ -716,23 +716,23 @@ void ScDPObject::UpdateReference( UpdateRefMode eUpdateRefMode,
}
}
-BOOL ScDPObject::RefsEqual( const ScDPObject& r ) const
+sal_Bool ScDPObject::RefsEqual( const ScDPObject& r ) const
{
if ( aOutRange != r.aOutRange )
- return FALSE;
+ return false;
if ( pSheetDesc && r.pSheetDesc )
{
if ( pSheetDesc->GetSourceRange() != r.pSheetDesc->GetSourceRange() )
- return FALSE;
+ return false;
}
else if ( pSheetDesc || r.pSheetDesc )
{
OSL_FAIL("RefsEqual: SheetDesc set at only one object");
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void ScDPObject::WriteRefsTo( ScDPObject& r ) const
@@ -806,9 +806,9 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const
return false;
}
-String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags )
+String ScDPObject::GetDimName( long nDim, sal_Bool& rIsDataLayout, sal_Int32* pFlags )
{
- rIsDataLayout = FALSE;
+ rIsDataLayout = false;
String aRet;
if ( xSource.is() )
@@ -824,7 +824,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
uno::Reference<beans::XPropertySet> xDimProp( xIntDim, uno::UNO_QUERY );
if ( xDimName.is() && xDimProp.is() )
{
- BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
@@ -837,7 +837,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
{
}
if ( bData )
- rIsDataLayout = TRUE;
+ rIsDataLayout = sal_True;
else
aRet = String( aName );
@@ -851,9 +851,9 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
return aRet;
}
-BOOL ScDPObject::IsDuplicated( long nDim )
+sal_Bool ScDPObject::IsDuplicated( long nDim )
{
- BOOL bDuplicated = FALSE;
+ sal_Bool bDuplicated = false;
if ( xSource.is() )
{
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
@@ -872,7 +872,7 @@ BOOL ScDPObject::IsDuplicated( long nDim )
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
- bDuplicated = TRUE;
+ bDuplicated = sal_True;
}
catch(uno::Exception&)
{
@@ -1011,8 +1011,8 @@ void ScDPObject::GetHeaderPositionData(const ScAddress& rPos, DataPilotTableHead
aPosData.PositionData >>= rData;
}
-// Returns TRUE on success and stores the result in rTarget
-BOOL ScDPObject::GetPivotData( ScDPGetPivotDataField& rTarget,
+// Returns sal_True on success and stores the result in rTarget
+sal_Bool ScDPObject::GetPivotData( ScDPGetPivotDataField& rTarget,
const std::vector< ScDPGetPivotDataField >& rFilters )
{
CreateOutput(); // create xSource and pOutput if not already done
@@ -1020,22 +1020,22 @@ BOOL ScDPObject::GetPivotData( ScDPGetPivotDataField& rTarget,
return pOutput->GetPivotData( rTarget, rFilters );
}
-BOOL ScDPObject::IsFilterButton( const ScAddress& rPos )
+sal_Bool ScDPObject::IsFilterButton( const ScAddress& rPos )
{
CreateOutput(); // create xSource and pOutput if not already done
return pOutput->IsFilterButton( rPos );
}
-long ScDPObject::GetHeaderDim( const ScAddress& rPos, USHORT& rOrient )
+long ScDPObject::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient )
{
CreateOutput(); // create xSource and pOutput if not already done
return pOutput->GetHeaderDim( rPos, rOrient );
}
-BOOL ScDPObject::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMouseTop, long nDragDim,
- Rectangle& rPosRect, USHORT& rOrient, long& rDimPos )
+sal_Bool ScDPObject::GetHeaderDrag( const ScAddress& rPos, sal_Bool bMouseLeft, sal_Bool bMouseTop, long nDragDim,
+ Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos )
{
CreateOutput(); // create xSource and pOutput if not already done
@@ -1271,7 +1271,7 @@ bool lcl_IsAtStart( const String& rList, const String& rSearch, sal_Int32& rMatc
return false;
}
-BOOL ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
+sal_Bool ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
std::vector< ScDPGetPivotDataField >& rFilters,
const String& rFilterList )
{
@@ -1297,7 +1297,7 @@ BOOL ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
uno::Reference<container::XNamed> xDim( xIntDim, uno::UNO_QUERY );
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDim, uno::UNO_QUERY );
- BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty(
xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
@@ -1507,7 +1507,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
String aDimName = xDim->getName();
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
- BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
if (bDataLayout)
{
@@ -1553,8 +1553,8 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
if ( xMbrSupp.is() )
xMembers = xMbrSupp->getMembers();
- BOOL bFound = FALSE;
- BOOL bShowDetails = TRUE;
+ sal_Bool bFound = false;
+ sal_Bool bShowDetails = sal_True;
if ( xMembers.is() )
{
@@ -1568,7 +1568,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
bShowDetails = ScUnoHelpFunctions::GetBoolProperty( xMbrProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWDETAILS)) );
//! don't set bFound if property is unknown?
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1608,7 +1608,7 @@ long lcl_FindName( const rtl::OUString& rString, const uno::Reference<container:
return -1; // not found
}
-USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp ) // PIVOT_FUNC mask
+sal_uInt16 lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp ) // PIVOT_FUNC mask
{
uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDimProp, uno::UNO_QUERY );
if ( xDimProp.is() && xDimSupp.is() )
@@ -1642,7 +1642,7 @@ USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp )
uno::Sequence<sheet::GeneralFunction> aSeq;
if ( aSubAny >>= aSeq )
{
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
const sheet::GeneralFunction* pArray = aSeq.getConstArray();
long nCount = aSeq.getLength();
for (long i=0; i<nCount; i++)
@@ -1657,13 +1657,13 @@ USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp )
return 0;
}
-USHORT lcl_CountBits( USHORT nBits )
+sal_uInt16 lcl_CountBits( sal_uInt16 nBits )
{
if (!nBits) return 0;
- USHORT nCount = 0;
- USHORT nMask = 1;
- for (USHORT i=0; i<16; i++)
+ sal_uInt16 nCount = 0;
+ sal_uInt16 nMask = 1;
+ for (sal_uInt16 i=0; i<16; i++)
{
if ( nBits & nMask )
++nCount;
@@ -1675,7 +1675,7 @@ USHORT lcl_CountBits( USHORT nBits )
void lcl_FillOldFields(
vector<PivotField>& rFields,
const uno::Reference<sheet::XDimensionsSupplier>& xSource,
- USHORT nOrient, SCCOL nColAdd, bool bAddData )
+ sal_uInt16 nOrient, SCCOL nColAdd, bool bAddData )
{
vector<PivotField> aFields;
@@ -1708,7 +1708,7 @@ void lcl_FillOldFields(
// Let's take this dimension.
// function mask.
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if ( nOrient == sheet::DataPilotFieldOrientation_DATA )
{
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty(
@@ -1832,7 +1832,7 @@ void lcl_FillOldFields(
rFields.swap(aFields);
}
-BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
+sal_Bool ScDPObject::FillOldParam(ScPivotParam& rParam) const
{
((ScDPObject*)this)->CreateObjects(); // xSource is needed for field numbers
@@ -1866,9 +1866,9 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
try
{
rParam.bMakeTotalCol = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)), TRUE );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)), true );
rParam.bMakeTotalRow = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)), TRUE );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)), true );
// following properties may be missing for external sources
rParam.bIgnoreEmptyRows = ScUnoHelpFunctions::GetBoolProperty( xProp,
@@ -1881,7 +1881,7 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
// no error
}
}
- return TRUE;
+ return sal_True;
}
void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XPropertySet >& xDimProp )
@@ -1928,7 +1928,7 @@ void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XProp
}
}
-BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
+sal_Bool ScDPObject::FillLabelData(ScPivotParam& rParam)
{
rParam.maLabelArray.clear();
@@ -1940,7 +1940,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
if ( nDimCount > MAX_LABELS )
nDimCount = MAX_LABELS;
if (!nDimCount)
- return FALSE;
+ return false;
for (long nDim=0; nDim < nDimCount; nDim++)
{
@@ -1952,8 +1952,8 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
if ( xDimName.is() && xDimProp.is() )
{
- BOOL bDuplicated = FALSE;
- BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bDuplicated = false;
+ sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
@@ -1965,7 +1965,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
- bDuplicated = TRUE;
+ bDuplicated = sal_True;
}
catch(uno::Exception&)
{
@@ -1991,12 +1991,12 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
}
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xHiers )
+sal_Bool ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xHiers )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
uno::Reference<container::XNameAccess> xDimsName( GetSource()->getDimensions() );
uno::Reference<container::XIndexAccess> xIntDims(new ScNameToIndexAccess( xDimsName ));
if( xIntDims.is() )
@@ -2011,14 +2011,14 @@ BOOL ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XN
return bRet;
}
-BOOL ScDPObject::GetHierarchies( sal_Int32 nDim, uno::Sequence< rtl::OUString >& rHiers )
+sal_Bool ScDPObject::GetHierarchies( sal_Int32 nDim, uno::Sequence< rtl::OUString >& rHiers )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
uno::Reference< container::XNameAccess > xHiersNA;
if( GetHierarchiesNA( nDim, xHiersNA ) )
{
rHiers = xHiersNA->getElementNames();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -2034,14 +2034,14 @@ sal_Int32 ScDPObject::GetUsedHierarchy( sal_Int32 nDim )
return nHier;
}
-BOOL ScDPObject::GetMembersNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xMembers )
+sal_Bool ScDPObject::GetMembersNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xMembers )
{
return GetMembersNA( nDim, GetUsedHierarchy( nDim ), xMembers );
}
-BOOL ScDPObject::GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, uno::Reference< container::XNameAccess >& xMembers )
+sal_Bool ScDPObject::GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, uno::Reference< container::XNameAccess >& xMembers )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
uno::Reference<container::XNameAccess> xDimsName( GetSource()->getDimensions() );
uno::Reference<container::XIndexAccess> xIntDims(new ScNameToIndexAccess( xDimsName ));
uno::Reference<beans::XPropertySet> xDim(xIntDims->getByIndex( nDim ), uno::UNO_QUERY);
@@ -2064,7 +2064,7 @@ BOOL ScDPObject::GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, uno::Reference<
if ( xMembSupp.is() )
{
xMembers.set(xMembSupp->getMembers());
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -2125,7 +2125,7 @@ bool hasFieldColumn(const vector<PivotField>* pRefFields, SCCOL nCol)
}
void ScDPObject::ConvertOrientation(
- ScDPSaveData& rSaveData, const vector<PivotField>& rFields, USHORT nOrient,
+ ScDPSaveData& rSaveData, const vector<PivotField>& rFields, sal_uInt16 nOrient,
const Reference<XDimensionsSupplier>& xSource,
vector<PivotField>* pRefColFields, vector<PivotField>* pRefRowFields, vector<PivotField>* pRefPageFields )
{
@@ -2138,7 +2138,7 @@ void ScDPObject::ConvertOrientation(
const PivotField& rField = *itr;
SCCOL nCol = rField.nCol;
- USHORT nFuncs = rField.nFuncMask;
+ sal_uInt16 nFuncs = rField.nFuncMask;
const sheet::DataPilotFieldReference& rFieldRef = rField.maFieldRef;
ScDPSaveDimension* pDim = NULL;
@@ -2186,15 +2186,15 @@ void ScDPObject::ConvertOrientation(
}
}
- USHORT nMask = 1;
- for (USHORT nBit=0; nBit<16; nBit++)
+ sal_uInt16 nMask = 1;
+ for (sal_uInt16 nBit=0; nBit<16; nBit++)
{
if ( nFuncs & nMask )
{
sheet::GeneralFunction eFunc = ScDataPilotConversion::FirstFunc( nMask );
ScDPSaveDimension* pCurrDim = bFirst ? pDim : rSaveData.DuplicateDimension(pDim->GetName());
pCurrDim->SetOrientation( nOrient );
- pCurrDim->SetFunction( sal::static_int_cast<USHORT>(eFunc) );
+ pCurrDim->SetFunction( sal::static_int_cast<sal_uInt16>(eFunc) );
if( rFieldRef.ReferenceType == sheet::DataPilotFieldReferenceType::NONE )
pCurrDim->SetReferenceValue( 0 );
@@ -2210,13 +2210,13 @@ void ScDPObject::ConvertOrientation(
{
pDim->SetOrientation( nOrient );
- USHORT nFuncArray[16];
- USHORT nFuncCount = 0;
- USHORT nMask = 1;
- for (USHORT nBit=0; nBit<16; nBit++)
+ sal_uInt16 nFuncArray[16];
+ sal_uInt16 nFuncCount = 0;
+ sal_uInt16 nMask = 1;
+ for (sal_uInt16 nBit=0; nBit<16; nBit++)
{
if ( nFuncs & nMask )
- nFuncArray[nFuncCount++] = sal::static_int_cast<USHORT>(ScDataPilotConversion::FirstFunc( nMask ));
+ nFuncArray[nFuncCount++] = sal::static_int_cast<sal_uInt16>(ScDataPilotConversion::FirstFunc( nMask ));
nMask *= 2;
}
pDim->SetSubTotals( nFuncCount, nFuncArray );
@@ -2224,12 +2224,12 @@ void ScDPObject::ConvertOrientation(
// ShowEmpty was implicit in old tables,
// must be set for data layout dimension (not accessible in dialog)
if ( nCol == PIVOT_DATA_FIELD )
- pDim->SetShowEmpty( TRUE );
+ pDim->SetShowEmpty( true );
}
}
}
-bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags )
+bool ScDPObject::IsOrientationAllowed( sal_uInt16 nOrient, sal_Int32 nDimFlags )
{
bool bAllowed = true;
switch (nOrient)
@@ -2256,9 +2256,9 @@ bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags )
// -----------------------------------------------------------------------
-BOOL ScDPObject::HasRegisteredSources()
+sal_Bool ScDPObject::HasRegisteredSources()
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
uno::Reference<lang::XMultiServiceFactory> xManager = comphelper::getProcessServiceFactory();
uno::Reference<container::XContentEnumerationAccess> xEnAc( xManager, uno::UNO_QUERY );
@@ -2267,7 +2267,7 @@ BOOL ScDPObject::HasRegisteredSources()
uno::Reference<container::XEnumeration> xEnum = xEnAc->createContentEnumeration(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCDPSOURCE_SERVICE )) );
if ( xEnum.is() && xEnum->hasMoreElements() )
- bFound = TRUE;
+ bFound = sal_True;
}
return bFound;
@@ -2523,7 +2523,7 @@ const ScDPObject* ScDPCollection::GetByName(const String& rName) const
return NULL;
}
-String ScDPCollection::CreateNewName( USHORT nMin ) const
+String ScDPCollection::CreateNewName( sal_uInt16 nMin ) const
{
String aBase = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("DataPilot"));
//! from Resource?
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 069c1a86edb8..f91b403f8986 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -111,7 +111,7 @@ struct ScDPOutLevelData
mbHasHiddenMember = false;
}
- BOOL operator<(const ScDPOutLevelData& r) const
+ sal_Bool operator<(const ScDPOutLevelData& r) const
{ return nDimPos<r.nDimPos || ( nDimPos==r.nDimPos && nHier<r.nHier ) ||
( nDimPos==r.nDimPos && nHier==r.nHier && nLevel<r.nLevel ); }
@@ -125,7 +125,7 @@ struct ScDPOutLevelData
void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nStrId )
+ sal_uInt16 nStrId )
{
if ( nCol1 > nCol2 || nRow1 > nRow2 )
{
@@ -155,7 +155,7 @@ void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nWidth )
+ sal_uInt16 nWidth )
{
SvxBorderLine aLine;
aLine.SetOutWidth(nWidth);
@@ -165,16 +165,16 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
aBox.SetLine(&aLine, BOX_LINE_RIGHT);
aBox.SetLine(&aLine, BOX_LINE_BOTTOM);
SvxBoxInfoItem aBoxInfo( ATTR_BORDER_INNER );
- aBoxInfo.SetValid(VALID_HORI,FALSE);
- aBoxInfo.SetValid(VALID_VERT,FALSE);
- aBoxInfo.SetValid(VALID_DISTANCE,FALSE);
+ aBoxInfo.SetValid(VALID_HORI,false);
+ aBoxInfo.SetValid(VALID_VERT,false);
+ aBoxInfo.SetValid(VALID_DISTANCE,false);
pDoc->ApplyFrameAreaTab( ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab ), &aBox, &aBoxInfo );
}
// -----------------------------------------------------------------------
-void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
+void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount,
const uno::Reference<sheet::XDataPilotMemberResults>& xLevRes,
const uno::Reference<container::XIndexAccess>& xDims )
{
@@ -193,9 +193,9 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
//! merge this with the loop to collect ScDPOutLevelData?
String aDataNames[SC_DPOUT_MAXLEVELS];
- UINT32 nDataFormats[SC_DPOUT_MAXLEVELS];
+ sal_uInt32 nDataFormats[SC_DPOUT_MAXLEVELS];
long nDataCount = 0;
- BOOL bAnySet = FALSE;
+ sal_Bool bAnySet = false;
long nDimCount = xDims->getCount();
for (long nDim=0; nDim<nDimCount; nDim++)
@@ -218,7 +218,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_NUMBERFORMAT)) );
nDataFormats[nDataCount] = nFormat;
if ( nFormat != 0 )
- bAnySet = TRUE;
+ bAnySet = sal_True;
++nDataCount;
}
}
@@ -229,7 +229,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
const sheet::MemberResult* pArray = aResult.getConstArray();
String aName;
- UINT32* pNumFmt = new UINT32[nSize];
+ sal_uInt32* pNumFmt = new sal_uInt32[nSize];
if (nDataCount == 1)
{
// only one data dimension -> use its numberformat everywhere
@@ -246,7 +246,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
if ( !(pArray[nPos].Flags & sheet::MemberResultFlags::CONTINUE) )
aName = String( pArray[nPos].Name );
- UINT32 nFormat = 0;
+ sal_uInt32 nFormat = 0;
for (long i=0; i<nDataCount; i++)
if (aName == aDataNames[i]) //! search more efficiently?
{
@@ -263,7 +263,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
}
}
-UINT32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAccess>& xDims )
+sal_uInt32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAccess>& xDims )
{
long nDimCount = xDims->getCount();
for (long nDim=0; nDim<nDimCount; nDim++)
@@ -301,7 +301,7 @@ void lcl_SortFields( ScDPOutLevelData* pFields, long nFieldCount )
}
}
-BOOL lcl_MemberEmpty( const uno::Sequence<sheet::MemberResult>& rSeq )
+sal_Bool lcl_MemberEmpty( const uno::Sequence<sheet::MemberResult>& rSeq )
{
// used to skip levels that have no members
@@ -309,9 +309,9 @@ BOOL lcl_MemberEmpty( const uno::Sequence<sheet::MemberResult>& rSeq )
const sheet::MemberResult* pArray = rSeq.getConstArray();
for (long i=0; i<nLen; i++)
if (pArray[i].Flags & sheet::MemberResultFlags::HASMEMBER)
- return FALSE;
+ return false;
- return TRUE; // no member data -> empty
+ return sal_True; // no member data -> empty
}
uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Reference<beans::XPropertySet>& xDimProp )
@@ -351,20 +351,20 @@ uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Refer
}
ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsSupplier>& xSrc,
- const ScAddress& rPos, BOOL bFilter ) :
+ const ScAddress& rPos, sal_Bool bFilter ) :
pDoc( pD ),
xSource( xSrc ),
aStartPos( rPos ),
bDoFilter( bFilter ),
- bResultsError( FALSE ),
+ bResultsError( false ),
mbHasDataLayout(false),
pColNumFmt( NULL ),
pRowNumFmt( NULL ),
nColFmtCount( 0 ),
nRowFmtCount( 0 ),
nSingleNumFmt( 0 ),
- bSizesValid( FALSE ),
- bSizeOverflow( FALSE ),
+ bSizesValid( false ),
+ bSizeOverflow( false ),
mbHeaderLayout( false )
{
nTabStartCol = nMemberStartCol = nDataStartCol = nTabEndCol = 0;
@@ -399,7 +399,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
sheet::DataPilotFieldOrientation_HIDDEN );
long nDimPos = ScUnoHelpFunctions::GetLongProperty( xDimProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_POSITION)) );
- BOOL bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty(
+ sal_Bool bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty(
xDimProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
bool bHasHiddenMember = ScUnoHelpFunctions::GetBoolProperty(
@@ -527,7 +527,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
}
catch (uno::RuntimeException&)
{
- bResultsError = TRUE;
+ bResultsError = sal_True;
}
}
@@ -563,7 +563,7 @@ ScDPOutput::~ScDPOutput()
void ScDPOutput::SetPosition( const ScAddress& rPos )
{
aStartPos = rPos;
- bSizesValid = bSizeOverflow = FALSE;
+ bSizesValid = bSizeOverflow = false;
}
void ScDPOutput::DataCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const sheet::DataResult& rData )
@@ -580,7 +580,7 @@ void ScDPOutput::DataCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const sheet::Data
// use number formats from source
DBG_ASSERT( bSizesValid, "DataCell: !bSizesValid" );
- UINT32 nFormat = 0;
+ sal_uInt32 nFormat = 0;
if ( pColNumFmt )
{
if ( nCol >= nDataStartCol )
@@ -608,7 +608,7 @@ void ScDPOutput::DataCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const sheet::Data
}
void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
- const sheet::MemberResult& rData, BOOL bColHeader, long nLevel )
+ const sheet::MemberResult& rData, sal_Bool bColHeader, long nLevel )
{
long nFlags = rData.Flags;
@@ -696,7 +696,7 @@ void ScDPOutput::CalcSizes()
if ( aStartPos.Col() + nRowFieldCount + nColCount - 1 > MAXCOL ||
aStartPos.Row() + nPageSize + nHeaderSize + nColFieldCount + nRowCount > MAXROW )
{
- bSizeOverflow = TRUE;
+ bSizeOverflow = sal_True;
}
nTabStartCol = aStartPos.Col();
@@ -716,7 +716,7 @@ void ScDPOutput::CalcSizes()
nTabEndRow = nDataStartRow + (SCROW)nRowCount - 1;
else
nTabEndRow = nDataStartRow; // single row will remain empty
- bSizesValid = TRUE;
+ bSizesValid = sal_True;
}
}
@@ -855,7 +855,7 @@ void ScDPOutput::Output()
for (long nCol=0; nCol<nThisColCount; nCol++)
{
SCCOL nColPos = nDataStartCol + (SCCOL)nCol; //! check for overflow
- HeaderCell( nColPos, nRowPos, nTab, pArray[nCol], TRUE, nField );
+ HeaderCell( nColPos, nRowPos, nTab, pArray[nCol], true, nField );
if ( ( pArray[nCol].Flags & sheet::MemberResultFlags::HASMEMBER ) &&
!( pArray[nCol].Flags & sheet::MemberResultFlags::SUBTOTAL ) )
{
@@ -869,7 +869,7 @@ void ScDPOutput::Output()
{
outputimp.AddCol( nColPos );
if ( nColPos + 1 == nEndColPos )
- outputimp.OutputBlockFrame( nColPos,nRowPos, nEndColPos,nRowPos+1, TRUE );
+ outputimp.OutputBlockFrame( nColPos,nRowPos, nEndColPos,nRowPos+1, sal_True );
}
else
outputimp.OutputBlockFrame( nColPos,nRowPos, nEndColPos,nRowPos );
@@ -887,8 +887,8 @@ void ScDPOutput::Output()
}
// output row headers:
- std::vector<BOOL> vbSetBorder;
- vbSetBorder.resize( nTabEndRow - nDataStartRow + 1, FALSE );
+ std::vector<sal_Bool> vbSetBorder;
+ vbSetBorder.resize( nTabEndRow - nDataStartRow + 1, false );
for (nField=0; nField<nRowFieldCount; nField++)
{
bool bDataLayout = mbHasDataLayout && (nField == nRowFieldCount-1);
@@ -906,7 +906,7 @@ void ScDPOutput::Output()
for (long nRow=0; nRow<nThisRowCount; nRow++)
{
SCROW nRowPos = nDataStartRow + (SCROW)nRow; //! check for overflow
- HeaderCell( nColPos, nRowPos, nTab, pArray[nRow], FALSE, nField );
+ HeaderCell( nColPos, nRowPos, nTab, pArray[nRow], false, nField );
if ( ( pArray[nRow].Flags & sheet::MemberResultFlags::HASMEMBER ) &&
!( pArray[nRow].Flags & sheet::MemberResultFlags::SUBTOTAL ) )
{
@@ -917,10 +917,10 @@ void ScDPOutput::Output()
++nEnd;
SCROW nEndRowPos = nDataStartRow + (SCROW)nEnd; //! check for overflow
outputimp.AddRow( nRowPos );
- if ( vbSetBorder[ nRow ] == FALSE )
+ if ( vbSetBorder[ nRow ] == false )
{
outputimp.OutputBlockFrame( nColPos, nRowPos, nTabEndCol, nEndRowPos );
- vbSetBorder[ nRow ] = TRUE;
+ vbSetBorder[ nRow ] = sal_True;
}
outputimp.OutputBlockFrame( nColPos, nRowPos, nColPos, nEndRowPos );
@@ -1041,12 +1041,12 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
rDataOrient = sheet::DataPilotFieldOrientation_HIDDEN;
uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY );
- BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
+ sal_Bool bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)) );
if ( bColGrand )
rGrandTotalCols = 1; // default if data layout not in columns
- BOOL bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
+ sal_Bool bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)) );
if ( bRowGrand )
rGrandTotalRows = 1; // default if data layout not in rows
@@ -1318,13 +1318,13 @@ bool lcl_IsCondition( const sheet::MemberResult& rResultEntry, const ScDPGetPivo
bool lcl_CheckPageField( const ScDPOutLevelData& rField,
const std::vector< ScDPGetPivotDataField >& rFilters,
- std::vector< BOOL >& rFilterUsed )
+ std::vector< sal_Bool >& rFilterUsed )
{
for (SCSIZE nFilterPos = 0; nFilterPos < rFilters.size(); ++nFilterPos)
{
if ( lcl_IsNamedCategoryField( rFilters[nFilterPos], rField ) )
{
- rFilterUsed[nFilterPos] = TRUE;
+ rFilterUsed[nFilterPos] = sal_True;
// page field result is empty or the selection as single entry (see lcl_GetSelectedPageAsResult)
if ( rField.aResult.getLength() == 1 &&
@@ -1402,10 +1402,10 @@ uno::Sequence<sheet::GeneralFunction> lcl_GetSubTotals(
return aSubTotals;
}
-void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >& rSubtotal,
+void lcl_FilterInclude( std::vector< sal_Bool >& rResult, std::vector< sal_Int32 >& rSubtotal,
const ScDPOutLevelData& rField,
const std::vector< ScDPGetPivotDataField >& rFilters,
- std::vector< BOOL >& rFilterUsed,
+ std::vector< sal_Bool >& rFilterUsed,
bool& rBeforeDataLayout,
sal_Int32 nGrandTotals, sal_Int32 nDataLayoutIndex,
const std::vector<String>& rDataNames, const std::vector<String>& rGivenNames,
@@ -1428,7 +1428,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
if ( lcl_IsNamedCategoryField( rFilters[nFilterPos], rField ) )
{
aFilter = rFilters[nFilterPos];
- rFilterUsed[nFilterPos] = TRUE;
+ rFilterUsed[nFilterPos] = sal_True;
bHasFilter = true;
}
}
@@ -1540,7 +1540,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
// if a function was specified, automatic subtotals never match
if ( bHasFunc )
- rResult[j] = FALSE;
+ rResult[j] = false;
}
}
@@ -1574,7 +1574,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
// if a function was specified, simple (non-subtotal) values never match
if ( bHasFunc && nSubTotalCount == 0 )
- rResult[j] = FALSE;
+ rResult[j] = false;
}
// if no condition is given, keep the columns/rows included
}
@@ -1582,7 +1582,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
}
}
-void lcl_StripSubTotals( std::vector< BOOL >& rResult, const std::vector< sal_Int32 >& rSubtotal )
+void lcl_StripSubTotals( std::vector< sal_Bool >& rResult, const std::vector< sal_Int32 >& rSubtotal )
{
sal_Int32 nSize = rResult.size();
DBG_ASSERT( (sal_Int32)rSubtotal.size() == nSize, "sizes don't match" );
@@ -1595,13 +1595,13 @@ void lcl_StripSubTotals( std::vector< BOOL >& rResult, const std::vector< sal_In
DBG_ASSERT( nStart >= 0, "invalid subtotal count" );
for (sal_Int32 nPrev = nStart; nPrev < nPos; nPrev++)
- rResult[nPrev] = FALSE;
+ rResult[nPrev] = false;
}
}
String lcl_GetDataFieldName( const String& rSourceName, sheet::GeneralFunction eFunc )
{
- USHORT nStrId = 0;
+ sal_uInt16 nStrId = 0;
switch ( eFunc )
{
case sheet::GeneralFunction_SUM: nStrId = STR_FUN_TEXT_SUM; break;
@@ -1653,9 +1653,9 @@ void ScDPOutput::GetDataDimensionNames( String& rSourceName, String& rGivenName,
}
}
-// Returns TRUE on success and stores the result in rTarget
-// Returns FALSE if rFilters or rTarget describes something that is not visible
-BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
+// Returns sal_True on success and stores the result in rTarget
+// Returns sal_False if rFilters or rTarget describes something that is not visible
+sal_Bool ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
const std::vector< ScDPGetPivotDataField >& rFilters )
{
CalcSizes();
@@ -1670,7 +1670,7 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
lcl_GetTableVars( nGrandTotalCols, nGrandTotalRows, nDataLayoutIndex, aDataNames, aGivenNames, eDataOrient, xSource );
if ( aDataNames.empty() )
- return FALSE; // incomplete table without data fields -> no result
+ return false; // incomplete table without data fields -> no result
if ( eDataOrient == sheet::DataPilotFieldOrientation_HIDDEN )
{
@@ -1678,15 +1678,15 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
DBG_ASSERT( aDataNames.size() == 1, "several data fields but no data layout field" );
if ( !lcl_IsNamedDataField( rTarget, aDataNames[0], aGivenNames[0] ) )
- return FALSE;
+ return false;
}
- std::vector< BOOL > aIncludeCol( nColCount, TRUE );
+ std::vector< sal_Bool > aIncludeCol( nColCount, sal_True );
std::vector< sal_Int32 > aSubtotalCol( nColCount, 0 );
- std::vector< BOOL > aIncludeRow( nRowCount, TRUE );
+ std::vector< sal_Bool > aIncludeRow( nRowCount, sal_True );
std::vector< sal_Int32 > aSubtotalRow( nRowCount, 0 );
- std::vector< BOOL > aFilterUsed( rFilters.size(), FALSE );
+ std::vector< sal_Bool > aFilterUsed( rFilters.size(), false );
long nField;
long nCol;
@@ -1711,12 +1711,12 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
for (nField=0; nField<nPageFieldCount; nField++)
if ( !lcl_CheckPageField( pPageFields[nField], rFilters, aFilterUsed ) )
- return FALSE;
+ return false;
// all filter fields must be used
for (SCSIZE nFilter=0; nFilter<aFilterUsed.size(); nFilter++)
if (!aFilterUsed[nFilter])
- return FALSE;
+ return false;
lcl_StripSubTotals( aIncludeCol, aSubtotalCol );
lcl_StripSubTotals( aIncludeRow, aSubtotalRow );
@@ -1740,35 +1740,35 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
}
if ( nColIncluded != 1 || nRowIncluded != 1 )
- return FALSE;
+ return false;
const uno::Sequence<sheet::DataResult>& rDataRow = aData[nRowPos];
if ( nColPos >= rDataRow.getLength() )
- return FALSE;
+ return false;
const sheet::DataResult& rResult = rDataRow[nColPos];
if ( rResult.Flags & sheet::DataResultFlags::ERROR )
- return FALSE; //! different error?
+ return false; //! different error?
- rTarget.mbValIsStr = FALSE;
+ rTarget.mbValIsStr = false;
rTarget.mnValNum = rResult.Value;
- return TRUE;
+ return sal_True;
}
-BOOL ScDPOutput::IsFilterButton( const ScAddress& rPos )
+sal_Bool ScDPOutput::IsFilterButton( const ScAddress& rPos )
{
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
SCTAB nTab = rPos.Tab();
if ( nTab != aStartPos.Tab() || !bDoFilter )
- return FALSE; // wrong sheet or no button at all
+ return false; // wrong sheet or no button at all
// filter button is at top left
return ( nCol == aStartPos.Col() && nRow == aStartPos.Row() );
}
-long ScDPOutput::GetHeaderDim( const ScAddress& rPos, USHORT& rOrient )
+long ScDPOutput::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient )
{
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -1814,9 +1814,9 @@ long ScDPOutput::GetHeaderDim( const ScAddress& rPos, USHORT& rOrient )
return -1; // invalid
}
-BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMouseTop,
+sal_Bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, sal_Bool bMouseLeft, sal_Bool bMouseTop,
long nDragDim,
- Rectangle& rPosRect, USHORT& rOrient, long& rDimPos )
+ Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos )
{
// Rectangle instead of ScRange for rPosRect to allow for negative values
@@ -1824,7 +1824,7 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
SCROW nRow = rPos.Row();
SCTAB nTab = rPos.Tab();
if ( nTab != aStartPos.Tab() )
- return FALSE; // wrong sheet
+ return false; // wrong sheet
// calculate output positions and sizes
@@ -1839,25 +1839,25 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
if (nField < 0)
{
nField = 0;
- bMouseTop = TRUE;
+ bMouseTop = sal_True;
}
//! find start of dimension
rPosRect = Rectangle( nDataStartCol, nMemberStartRow + nField,
nTabEndCol, nMemberStartRow + nField -1 );
- BOOL bFound = FALSE; // is this within the same orientation?
- BOOL bBeforeDrag = FALSE;
- BOOL bAfterDrag = FALSE;
+ sal_Bool bFound = false; // is this within the same orientation?
+ sal_Bool bBeforeDrag = false;
+ sal_Bool bAfterDrag = false;
for (long nPos=0; nPos<nColFieldCount && !bFound; nPos++)
{
if (pColFields[nPos].nDim == nDragDim)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nField < nPos )
- bBeforeDrag = TRUE;
+ bBeforeDrag = sal_True;
else if ( nField > nPos )
- bAfterDrag = TRUE;
+ bAfterDrag = sal_True;
}
}
@@ -1882,13 +1882,13 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rOrient = sheet::DataPilotFieldOrientation_COLUMN;
rDimPos = nField; //!...
- return TRUE;
+ return sal_True;
}
// test for row header
// special case if no row fields
- BOOL bSpecial = ( nRow+1 >= nDataStartRow && nRow <= nTabEndRow &&
+ sal_Bool bSpecial = ( nRow+1 >= nDataStartRow && nRow <= nTabEndRow &&
nRowFieldCount == 0 && nCol == nTabStartCol && bMouseLeft );
if ( bSpecial || ( nRow+1 >= nDataStartRow && nRow <= nTabEndRow &&
@@ -1900,18 +1900,18 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rPosRect = Rectangle( nTabStartCol + nField, nDataStartRow - 1,
nTabStartCol + nField - 1, nTabEndRow );
- BOOL bFound = FALSE; // is this within the same orientation?
- BOOL bBeforeDrag = FALSE;
- BOOL bAfterDrag = FALSE;
+ sal_Bool bFound = false; // is this within the same orientation?
+ sal_Bool bBeforeDrag = false;
+ sal_Bool bAfterDrag = false;
for (long nPos=0; nPos<nRowFieldCount && !bFound; nPos++)
{
if (pRowFields[nPos].nDim == nDragDim)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nField < nPos )
- bBeforeDrag = TRUE;
+ bBeforeDrag = sal_True;
else if ( nField > nPos )
- bAfterDrag = TRUE;
+ bAfterDrag = sal_True;
}
}
@@ -1936,7 +1936,7 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rOrient = sheet::DataPilotFieldOrientation_ROW;
rDimPos = nField; //!...
- return TRUE;
+ return sal_True;
}
// test for page fields
@@ -1949,25 +1949,25 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
if (nField < 0)
{
nField = 0;
- bMouseTop = TRUE;
+ bMouseTop = sal_True;
}
//! find start of dimension
rPosRect = Rectangle( aStartPos.Col(), nPageStartRow + nField,
nTabEndCol, nPageStartRow + nField - 1 );
- BOOL bFound = FALSE; // is this within the same orientation?
- BOOL bBeforeDrag = FALSE;
- BOOL bAfterDrag = FALSE;
+ sal_Bool bFound = false; // is this within the same orientation?
+ sal_Bool bBeforeDrag = false;
+ sal_Bool bAfterDrag = false;
for (long nPos=0; nPos<nPageFieldCount && !bFound; nPos++)
{
if (pPageFields[nPos].nDim == nDragDim)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nField < nPos )
- bBeforeDrag = TRUE;
+ bBeforeDrag = sal_True;
else if ( nField > nPos )
- bAfterDrag = TRUE;
+ bAfterDrag = sal_True;
}
}
@@ -1992,10 +1992,10 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rOrient = sheet::DataPilotFieldOrientation_PAGE;
rDimPos = nField; //!...
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 3b63a29167f6..e14c99b77966 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -582,7 +582,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
{
// single filter field: first field equal to selected string
sheet::TableFilterField aField( sheet::FilterConnection_AND, 0,
- sheet::FilterOperator_EQUAL, sal_False, 0.0, *pSelectedPage );
+ sheet::FilterOperator_EQUAL, false, 0.0, *pSelectedPage );
aFilter = uno::Sequence<sheet::TableFilterField>( &aField, 1 );
}
// else keep empty sequence
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index 01c66c4c61b6..7eeb4b93e284 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -192,18 +192,18 @@ String ScDatabaseDPData::getDimensionName(long nColumn)
return aCacheTable.getFieldName((SCCOL)nColumn);
}
-BOOL ScDatabaseDPData::getIsDataLayoutDimension(long nColumn)
+sal_Bool ScDatabaseDPData::getIsDataLayoutDimension(long nColumn)
{
return ( nColumn == GetCacheTable().getColSize());
}
-BOOL ScDatabaseDPData::IsDateDimension(long /* nDim */)
+sal_Bool ScDatabaseDPData::IsDateDimension(long /* nDim */)
{
//! later...
- return FALSE;
+ return false;
}
-void ScDatabaseDPData::SetEmptyFlags( BOOL /* bIgnoreEmptyRows */, BOOL /* bRepeatIfEmpty */ )
+void ScDatabaseDPData::SetEmptyFlags( sal_Bool /* bIgnoreEmptyRows */, sal_Bool /* bRepeatIfEmpty */ )
{
// not used for database data
//! disable flags
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index ec2270029a3d..c209fecf03bc 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -64,8 +64,8 @@ ScSheetDPData::ScSheetDPData(ScDocument* pD, const ScSheetSourceDesc& rDesc) :
ScDPTableData(pD),
aQuery ( rDesc.GetQueryParam() ),
pSpecial(NULL),
- bIgnoreEmptyRows( FALSE ),
- bRepeatIfEmpty(FALSE),
+ bIgnoreEmptyRows( false ),
+ bRepeatIfEmpty(false),
mrDesc(rDesc),
aCacheTable(rDesc.CreateCache())
{
@@ -130,18 +130,18 @@ String ScSheetDPData::getDimensionName(long nColumn)
}
}
-BOOL ScSheetDPData::IsDateDimension(long nDim)
+sal_Bool ScSheetDPData::IsDateDimension(long nDim)
{
CreateCacheTable();
long nColCount = aCacheTable.getColSize();
if (getIsDataLayoutDimension(nDim))
{
- return FALSE;
+ return false;
}
else if (nDim >= nColCount)
{
OSL_FAIL("IsDateDimension: invalid dimension");
- return FALSE;
+ return false;
}
else
{
@@ -149,7 +149,7 @@ BOOL ScSheetDPData::IsDateDimension(long nDim)
}
}
-ULONG ScSheetDPData::GetNumberFormat(long nDim)
+sal_uLong ScSheetDPData::GetNumberFormat(long nDim)
{
CreateCacheTable();
if (getIsDataLayoutDimension(nDim))
@@ -166,7 +166,7 @@ ULONG ScSheetDPData::GetNumberFormat(long nDim)
return GetCacheTable().getCache()->GetNumberFormat( nDim );
}
}
-UINT32 ScDPTableData::GetNumberFormatByIdx( NfIndexTableOffset eIdx )
+sal_uInt32 ScDPTableData::GetNumberFormatByIdx( NfIndexTableOffset eIdx )
{
if( !mpDoc )
return 0;
@@ -177,13 +177,13 @@ UINT32 ScDPTableData::GetNumberFormatByIdx( NfIndexTableOffset eIdx )
return 0;
}
-BOOL ScSheetDPData::getIsDataLayoutDimension(long nColumn)
+sal_Bool ScSheetDPData::getIsDataLayoutDimension(long nColumn)
{
CreateCacheTable();
return (nColumn ==(long)( aCacheTable.getColSize()));
}
-void ScSheetDPData::SetEmptyFlags( BOOL bIgnoreEmptyRowsP, BOOL bRepeatIfEmptyP )
+void ScSheetDPData::SetEmptyFlags( sal_Bool bIgnoreEmptyRowsP, sal_Bool bRepeatIfEmptyP )
{
bIgnoreEmptyRows = bIgnoreEmptyRowsP;
bRepeatIfEmpty = bRepeatIfEmptyP;
@@ -312,7 +312,7 @@ ScDPCache* ScSheetSourceDesc::CreateCache() const
if (!mpDoc)
return NULL;
- ULONG nErrId = CheckSourceRange();
+ sal_uLong nErrId = CheckSourceRange();
if (nErrId)
{
OSL_FAIL( "Error Create Cache\n" );
@@ -329,7 +329,7 @@ long ScSheetSourceDesc::GetCacheId() const
return -1;
}
-ULONG ScSheetSourceDesc::CheckSourceRange() const
+sal_uLong ScSheetSourceDesc::CheckSourceRange() const
{
if (!mpDoc)
return STR_ERR_DATAPILOTSOURCE;
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index 88c28afd3970..cca9ead058fb 100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -124,14 +124,14 @@ bool ScDPTableData::IsRepeatIfEmpty()
return false;
}
-ULONG ScDPTableData::GetNumberFormat(long)
+sal_uLong ScDPTableData::GetNumberFormat(long)
{
return 0; // default format
}
-BOOL ScDPTableData::IsBaseForGroup(long) const
+sal_Bool ScDPTableData::IsBaseForGroup(long) const
{
- return FALSE; // always false
+ return false; // always false
}
long ScDPTableData::GetGroupBase(long) const
@@ -139,23 +139,23 @@ long ScDPTableData::GetGroupBase(long) const
return -1; // always none
}
-BOOL ScDPTableData::IsNumOrDateGroup(long) const
+sal_Bool ScDPTableData::IsNumOrDateGroup(long) const
{
- return FALSE; // always false
+ return false; // always false
}
-BOOL ScDPTableData::IsInGroup( const ScDPItemData&, long,
+sal_Bool ScDPTableData::IsInGroup( const ScDPItemData&, long,
const ScDPItemData&, long ) const
{
OSL_FAIL("IsInGroup shouldn't be called for non-group data");
- return FALSE;
+ return false;
}
-BOOL ScDPTableData::HasCommonElement( const ScDPItemData&, long,
+sal_Bool ScDPTableData::HasCommonElement( const ScDPItemData&, long,
const ScDPItemData&, long ) const
{
OSL_FAIL("HasCommonElement shouldn't be called for non-group data");
- return FALSE;
+ return false;
}
void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTable& rCacheTable,
const CalcInfo& rInfo, CalcRowData& rData)
@@ -189,13 +189,13 @@ void ScDPTableData::ProcessRowData(CalcInfo& rInfo, CalcRowData& rData, bool bAu
{
if (!bAutoShow)
{
- LateInitParams aColParams( rInfo.aColDims, rInfo.aColLevels, FALSE );
- LateInitParams aRowParams ( rInfo.aRowDims, rInfo.aRowLevels, TRUE );
+ LateInitParams aColParams( rInfo.aColDims, rInfo.aColLevels, false );
+ LateInitParams aRowParams ( rInfo.aRowDims, rInfo.aRowLevels, sal_True );
// root always init child
- aColParams.SetInitChild( TRUE );
- aColParams.SetInitAllChildren( FALSE);
- aRowParams.SetInitChild( TRUE );
- aRowParams.SetInitAllChildren( FALSE);
+ aColParams.SetInitChild( sal_True );
+ aColParams.SetInitAllChildren( false);
+ aRowParams.SetInitChild( sal_True );
+ aRowParams.SetInitAllChildren( false);
rInfo.pColRoot->LateInitFrom( aColParams, rData.aColData,0, *rInfo.pInitState);
rInfo.pRowRoot->LateInitFrom( aRowParams, rData.aRowData, 0, *rInfo.pInitState);
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index c05f3b3db8c6..e3ddbcbe0f59 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -60,7 +60,7 @@ using ::std::vector;
namespace {
-bool lcl_isDate( ULONG nNumType )
+bool lcl_isDate( sal_uLong nNumType )
{
return ((nNumType & NUMBERFORMAT_DATE) != 0) ? 1 : 0;
}
@@ -171,13 +171,13 @@ ScDPItemData* lcl_GetItemValue(
}
-ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const ULONG nNumFormatP, bool bData) :
+ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
nNumFormat( nNumFormatP ), aString(rS), fValue(fV),
mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!lcl_isDate( nNumFormat ) ) )
{
}
-ScDPItemData::ScDPItemData(ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nDocTab) :
+ScDPItemData::ScDPItemData(ScDocument* pDoc, SCROW nRow, sal_uInt16 nCol, sal_uInt16 nDocTab) :
nNumFormat( 0 ), fValue(0.0), mbFlag( 0 )
{
String aDocStr;
@@ -196,7 +196,7 @@ ScDPItemData::ScDPItemData(ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nDo
else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
{
double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nDocTab));
- ULONG nFormat = NUMBERFORMAT_NUMBER;
+ sal_uLong nFormat = NUMBERFORMAT_NUMBER;
if ( pFormatter )
nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) );
aString = aDocStr;
@@ -331,7 +331,7 @@ double ScDPItemData::GetValue() const
{
return fValue;
}
-ULONG ScDPItemData::GetNumFormat() const
+sal_uLong ScDPItemData::GetNumFormat() const
{
return nNumFormat;
}
@@ -447,9 +447,9 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange)
SCROW nStartRow = rRange.aStart.Row(); // start of data
SCROW nEndRow = rRange.aEnd.Row();
- USHORT nStartCol = rRange.aStart.Col();
- USHORT nEndCol = rRange.aEnd.Col();
- USHORT nDocTab = rRange.aStart.Tab();
+ sal_uInt16 nStartCol = rRange.aStart.Col();
+ sal_uInt16 nEndCol = rRange.aEnd.Col();
+ sal_uInt16 nDocTab = rRange.aStart.Tab();
mnColumnCount = nEndCol - nStartCol + 1;
if ( IsValid() )
@@ -475,7 +475,7 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange)
//check valid
for ( SCROW nRow = nStartRow; nRow <= nEndRow; nRow ++ )
{
- for ( USHORT nCol = nStartCol; nCol <= nEndCol; nCol++ )
+ for ( sal_uInt16 nCol = nStartCol; nCol <= nEndCol; nCol++ )
{
if ( nRow == nStartRow )
AddLabel( new ScDPItemData( pDoc, nRow, nCol, nDocTab ) );
@@ -555,7 +555,7 @@ bool ScDPCache::InitFromDataBase (const Reference<sdbc::XRowSet>& xRowSet, const
}
}
-ULONG ScDPCache::GetDimNumType( SCCOL nDim) const
+sal_uLong ScDPCache::GetDimNumType( SCCOL nDim) const
{
DBG_ASSERT( IsValid(), " IsValid() == false " );
DBG_ASSERT( nDim < mnColumnCount && nDim >=0, " dimention out of bound " );
@@ -598,7 +598,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, bool *pSpeci
if ( nQueryCol > rParam.nCol2 )
nQueryCol = rParam.nCol2;
SCCOL nSourceField = nQueryCol - rParam.nCol1;
- SCROW nId = GetItemDataId( nSourceField, nRow, FALSE );
+ SCROW nId = GetItemDataId( nSourceField, nRow, false );
const ScDPItemData* pCellData = GetItemDataById( nSourceField, nId );
bool bOk = false;
@@ -673,7 +673,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, bool *pSpeci
{
bOk = pTransliteration->isEqual( aCellStr, *rEntry.pStr );
String aStr = *rEntry.pStr;
- sal_Bool bHasStar = sal_False;
+ sal_Bool bHasStar = false;
xub_StrLen nIndex;
if (( nIndex = aStr.Search('*') ) != STRING_NOTFOUND)
bHasStar = sal_True;
@@ -681,7 +681,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, bool *pSpeci
{
for (i=0;(i<nIndex) && (i< aCellStr.Len()) ; i++)
{
- if (aCellStr.GetChar( (USHORT)i ) == aStr.GetChar((USHORT) i ))
+ if (aCellStr.GetChar( (sal_uInt16)i ) == aStr.GetChar((sal_uInt16) i ))
{
bOk=1;
}
@@ -782,7 +782,7 @@ bool ScDPCache::IsRowEmpty( SCROW nRow ) const
return mbEmptyRow[ nRow ];
}
-bool ScDPCache::IsEmptyMember( SCROW nRow, USHORT nColumn ) const
+bool ScDPCache::IsEmptyMember( SCROW nRow, sal_uInt16 nColumn ) const
{
return !GetItemDataById( nColumn, GetItemDataId( nColumn, nRow, false ) )->IsHasData();
}
@@ -823,10 +823,10 @@ bool ScDPCache::AddData(long nDim, ScDPItemData* pitemData)
}
-String ScDPCache::GetDimensionName( USHORT nColumn ) const
+String ScDPCache::GetDimensionName( sal_uInt16 nColumn ) const
{
DBG_ASSERT(nColumn < maLabelNames.size()-1 , "ScDPTableDataCache::GetDimensionName");
- DBG_ASSERT(maLabelNames.size() == static_cast <USHORT> (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName");
+ DBG_ASSERT(maLabelNames.size() == static_cast <sal_uInt16> (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName");
if ( static_cast<size_t>(nColumn+1) < maLabelNames.size() )
{
@@ -867,7 +867,7 @@ void ScDPCache::AddLabel(ScDPItemData *pData)
maLabelNames.push_back( pData );
}
-SCROW ScDPCache::GetItemDataId(USHORT nDim, SCROW nRow, bool bRepeatIfEmpty) const
+SCROW ScDPCache::GetItemDataId(sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty) const
{
DBG_ASSERT( IsValid(), " IsValid() == false " );
DBG_ASSERT( /* nDim >= 0 && */ nDim < mnColumnCount, "ScDPTableDataCache::GetItemDataId " );
@@ -915,16 +915,16 @@ SCROW ScDPCache::GetSortedItemDataId(SCCOL nDim, SCROW nOrder) const
return maGlobalOrder[nDim][nOrder];
}
-ULONG ScDPCache::GetNumType(ULONG nFormat) const
+sal_uLong ScDPCache::GetNumType(sal_uLong nFormat) const
{
SvNumberFormatter* pFormatter = mpDoc->GetFormatTable();
- ULONG nType = NUMBERFORMAT_NUMBER;
+ sal_uLong nType = NUMBERFORMAT_NUMBER;
if ( pFormatter )
nType = pFormatter->GetType( nFormat );
return nType;
}
-ULONG ScDPCache::GetNumberFormat( long nDim ) const
+sal_uLong ScDPCache::GetNumberFormat( long nDim ) const
{
if ( nDim >= mnColumnCount )
return 0;
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index ff3835a86af6..cae8fad17d2c 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -72,7 +72,7 @@ SV_IMPL_PTRARR( ScDPDataMembers, ScDPDataMemberPtr );
// -----------------------------------------------------------------------
-static USHORT nFuncStrIds[12] = // passend zum enum ScSubTotalFunc
+static sal_uInt16 nFuncStrIds[12] = // passend zum enum ScSubTotalFunc
{
0, // SUBTOTAL_FUNC_NONE
STR_FUN_TEXT_AVG, // SUBTOTAL_FUNC_AVE
@@ -99,10 +99,10 @@ namespace {
}
vec.resize( nSize, NULL );
}
- BOOL lcl_SearchMember( const std::vector <ScDPResultMember *>& list, SCROW nOrder, SCROW& rIndex)
+ sal_Bool lcl_SearchMember( const std::vector <ScDPResultMember *>& list, SCROW nOrder, SCROW& rIndex)
{
rIndex = list.size();
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCROW nLo = 0;
SCROW nHi = list.size() - 1;
SCROW nIndex;
@@ -116,7 +116,7 @@ namespace {
nHi = nIndex - 1;
if ( list[nIndex]->GetOrder() == nOrder )
{
- bFound = TRUE;
+ bFound = sal_True;
nLo = nIndex;
}
}
@@ -135,37 +135,37 @@ class ScDPRowMembersOrder
{
ScDPResultDimension& rDimension;
long nMeasure;
- BOOL bAscending;
+ sal_Bool bAscending;
public:
- ScDPRowMembersOrder( ScDPResultDimension& rDim, long nM, BOOL bAsc ) :
+ ScDPRowMembersOrder( ScDPResultDimension& rDim, long nM, sal_Bool bAsc ) :
rDimension(rDim),
nMeasure(nM),
bAscending(bAsc)
{}
~ScDPRowMembersOrder() {}
- BOOL operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
+ sal_Bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
};
class ScDPColMembersOrder
{
ScDPDataDimension& rDimension;
long nMeasure;
- BOOL bAscending;
+ sal_Bool bAscending;
public:
- ScDPColMembersOrder( ScDPDataDimension& rDim, long nM, BOOL bAsc ) :
+ ScDPColMembersOrder( ScDPDataDimension& rDim, long nM, sal_Bool bAsc ) :
rDimension(rDim),
nMeasure(nM),
bAscending(bAsc)
{}
~ScDPColMembersOrder() {}
- BOOL operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
+ sal_Bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
};
-static BOOL lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure, BOOL bAscending )
+static sal_Bool lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure, sal_Bool bAscending )
{
// members can be NULL if used for rows
@@ -173,17 +173,17 @@ static BOOL lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember
const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : NULL;
const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : NULL;
- BOOL bError1 = pAgg1 && pAgg1->HasError();
- BOOL bError2 = pAgg2 && pAgg2->HasError();
+ sal_Bool bError1 = pAgg1 && pAgg1->HasError();
+ sal_Bool bError2 = pAgg2 && pAgg2->HasError();
if ( bError1 )
{
if ( bError2 )
- return FALSE; // equal
+ return false; // equal
else
- return FALSE; // errors are always sorted at the end
+ return false; // errors are always sorted at the end
}
else if ( bError2 )
- return TRUE; // errors are always sorted at the end
+ return sal_True; // errors are always sorted at the end
else
{
double fVal1 = ( pAgg1 && pAgg1->HasData() ) ? pAgg1->GetResult() : 0.0; // no data is sorted as 0
@@ -196,7 +196,7 @@ static BOOL lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember
}
}
-static BOOL lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure )
+static sal_Bool lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure )
{
// members can be NULL if used for rows
@@ -204,17 +204,17 @@ static BOOL lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMembe
const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : NULL;
const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : NULL;
- BOOL bError1 = pAgg1 && pAgg1->HasError();
- BOOL bError2 = pAgg2 && pAgg2->HasError();
+ sal_Bool bError1 = pAgg1 && pAgg1->HasError();
+ sal_Bool bError2 = pAgg2 && pAgg2->HasError();
if ( bError1 )
{
if ( bError2 )
- return TRUE; // equal
+ return sal_True; // equal
else
- return FALSE;
+ return false;
}
else if ( bError2 )
- return FALSE;
+ return false;
else
{
double fVal1 = ( pAgg1 && pAgg1->HasData() ) ? pAgg1->GetResult() : 0.0; // no data is sorted as 0
@@ -227,7 +227,7 @@ static BOOL lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMembe
}
}
-BOOL ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
+sal_Bool ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
{
const ScDPResultMember* pMember1 = rDimension.GetMember(nIndex1);
const ScDPResultMember* pMember2 = rDimension.GetMember(nIndex2);
@@ -238,16 +238,16 @@ BOOL ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) con
const ScDPDataMember* pDataMember1 = pMember1->GetDataRoot() ;
const ScDPDataMember* pDataMember2 = pMember2->GetDataRoot();
// GetDataRoot can be NULL if there was no data.
- // IsVisible == FALSE can happen after AutoShow.
+ // IsVisible == sal_False can happen after AutoShow.
return lcl_IsLess( pDataMember1, pDataMember2, nMeasure, bAscending );
}
-BOOL ScDPColMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
+sal_Bool ScDPColMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
{
ScDPDataMember* pDataMember1 = rDimension.GetMember(nIndex1);
ScDPDataMember* pDataMember2 = rDimension.GetMember(nIndex2);
- BOOL bHide1 = pDataMember1 && !pDataMember1->IsVisible();
- BOOL bHide2 = pDataMember2 && !pDataMember2->IsVisible();
+ sal_Bool bHide1 = pDataMember1 && !pDataMember1->IsVisible();
+ sal_Bool bHide2 = pDataMember2 && !pDataMember2->IsVisible();
if ( bHide1 || bHide2 )
return !bHide1;
return lcl_IsLess( pDataMember1, pDataMember2, nMeasure, bAscending );
@@ -506,7 +506,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
// check the error conditions for the selected function
- BOOL bError = FALSE;
+ sal_Bool bError = false;
switch (eFunc)
{
case SUBTOTAL_FUNC_SUM:
@@ -581,7 +581,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
}
}
- BOOL bEmpty = ( nCount == 0 ); // no data
+ sal_Bool bEmpty = ( nCount == 0 ); // no data
// store the result
// Empty is checked first, so empty results are shown empty even for "average" etc.
@@ -603,7 +603,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
fAux = 0.0; // used for running total or original result of reference value
}
-BOOL ScDPAggData::IsCalculated() const
+sal_Bool ScDPAggData::IsCalculated() const
{
return ( nCount <= SC_DPAGG_RESULT_EMPTY );
}
@@ -615,14 +615,14 @@ double ScDPAggData::GetResult() const
return fVal; // use calculated value
}
-BOOL ScDPAggData::HasError() const
+sal_Bool ScDPAggData::HasError() const
{
DBG_ASSERT( IsCalculated(), "ScDPAggData not calculated" );
return ( nCount == SC_DPAGG_RESULT_ERROR );
}
-BOOL ScDPAggData::HasData() const
+sal_Bool ScDPAggData::HasData() const
{
DBG_ASSERT( IsCalculated(), "ScDPAggData not calculated" );
@@ -643,7 +643,7 @@ void ScDPAggData::SetError()
nCount = SC_DPAGG_RESULT_ERROR;
}
-void ScDPAggData::SetEmpty( BOOL bSet )
+void ScDPAggData::SetEmpty( sal_Bool bSet )
{
DBG_ASSERT( IsCalculated(), "ScDPAggData not calculated" );
@@ -688,7 +688,7 @@ void ScDPAggData::Reset()
// -----------------------------------------------------------------------
ScDPRowTotals::ScDPRowTotals() :
- bIsInColRoot( FALSE )
+ bIsInColRoot( false )
{
}
@@ -767,9 +767,9 @@ ScDPResultData::ScDPResultData( ScDPSource* pSrc ) : //! Ref
pMeasRefs( NULL ),
pMeasRefOrient( NULL ),
pMeasNames( NULL ),
- bLateInit( FALSE ),
- bDataAtCol( FALSE ),
- bDataAtRow( FALSE )
+ bLateInit( false ),
+ bDataAtCol( false ),
+ bDataAtRow( false )
{
lcl_ResizePointVector( mpDimMembers , SC_DAPI_MAXFIELDS );
@@ -786,7 +786,7 @@ ScDPResultData::~ScDPResultData()
}
void ScDPResultData::SetMeasureData( long nCount, const ScSubTotalFunc* pFunctions,
- const sheet::DataPilotFieldReference* pRefs, const USHORT* pRefOrient,
+ const sheet::DataPilotFieldReference* pRefs, const sal_uInt16* pRefOrient,
const String* pNames )
{
delete[] pMeasFuncs;
@@ -798,7 +798,7 @@ void ScDPResultData::SetMeasureData( long nCount, const ScSubTotalFunc* pFunctio
nMeasCount = nCount;
pMeasFuncs = new ScSubTotalFunc[nCount];
pMeasRefs = new sheet::DataPilotFieldReference[nCount];
- pMeasRefOrient = new USHORT[nCount];
+ pMeasRefOrient = new sal_uInt16[nCount];
pMeasNames = new String[nCount];
for (long i=0; i<nCount; i++)
{
@@ -815,20 +815,20 @@ void ScDPResultData::SetMeasureData( long nCount, const ScSubTotalFunc* pFunctio
pMeasFuncs = new ScSubTotalFunc[1];
pMeasFuncs[0] = SUBTOTAL_FUNC_NONE;
pMeasRefs = new sheet::DataPilotFieldReference[1]; // default ctor is ok
- pMeasRefOrient = new USHORT[1];
+ pMeasRefOrient = new sal_uInt16[1];
pMeasRefOrient[0] = sheet::DataPilotFieldOrientation_HIDDEN;
pMeasNames = new String[1];
pMeasNames[0] = ScGlobal::GetRscString( STR_EMPTYDATA );
}
}
-void ScDPResultData::SetDataLayoutOrientation( USHORT nOrient )
+void ScDPResultData::SetDataLayoutOrientation( sal_uInt16 nOrient )
{
bDataAtCol = ( nOrient == sheet::DataPilotFieldOrientation_COLUMN );
bDataAtRow = ( nOrient == sheet::DataPilotFieldOrientation_ROW );
}
-void ScDPResultData::SetLateInit( BOOL bSet )
+void ScDPResultData::SetLateInit( sal_Bool bSet )
{
bLateInit = bSet;
}
@@ -857,15 +857,15 @@ const sheet::DataPilotFieldReference& ScDPResultData::GetMeasureRefVal(long nMea
return pMeasRefs[nMeasure];
}
-USHORT ScDPResultData::GetMeasureRefOrient(long nMeasure) const
+sal_uInt16 ScDPResultData::GetMeasureRefOrient(long nMeasure) const
{
DBG_ASSERT( pMeasRefOrient && nMeasure < nMeasCount, "bumm" );
return pMeasRefOrient[nMeasure];
}
-String ScDPResultData::GetMeasureString(long nMeasure, BOOL bForce, ScSubTotalFunc eForceFunc, bool& rbTotalResult) const
+String ScDPResultData::GetMeasureString(long nMeasure, sal_Bool bForce, ScSubTotalFunc eForceFunc, bool& rbTotalResult) const
{
- // with bForce==TRUE, return function instead of "result" for single measure
+ // with bForce==sal_True, return function instead of "result" for single measure
// with eForceFunc != SUBTOTAL_FUNC_NONE, always use eForceFunc
rbTotalResult = false;
if ( nMeasure < 0 || ( nMeasCount == 1 && !bForce && eForceFunc == SUBTOTAL_FUNC_NONE ) )
@@ -891,7 +891,7 @@ String ScDPResultData::GetMeasureString(long nMeasure, BOOL bForce, ScSubTotalFu
String aRet;
ScSubTotalFunc eFunc = ( eForceFunc == SUBTOTAL_FUNC_NONE ) ?
GetMeasureFunction(nMeasure) : eForceFunc;
- USHORT nId = nFuncStrIds[eFunc];
+ sal_uInt16 nId = nFuncStrIds[eFunc];
if (nId)
{
aRet += ScGlobal::GetRscString(nId); // function name
@@ -914,7 +914,7 @@ String ScDPResultData::GetMeasureDimensionName(long nMeasure) const
return pSource->GetDataDimName( nMeasure );
}
-BOOL ScDPResultData::IsBaseForGroup( long nDim ) const
+sal_Bool ScDPResultData::IsBaseForGroup( long nDim ) const
{
return pSource->GetData()->IsBaseForGroup( nDim );
}
@@ -924,38 +924,38 @@ long ScDPResultData::GetGroupBase( long nGroupDim ) const
return pSource->GetData()->GetGroupBase( nGroupDim );
}
-BOOL ScDPResultData::IsNumOrDateGroup( long nDim ) const
+sal_Bool ScDPResultData::IsNumOrDateGroup( long nDim ) const
{
return pSource->GetData()->IsNumOrDateGroup( nDim );
}
-BOOL ScDPResultData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
+sal_Bool ScDPResultData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
long nBaseDataId, long nBaseIndex ) const
{
const ScDPItemData* pData = pSource->GetItemDataById( nGroupIndex , nBaseDataId);
if ( pData )
return pSource->GetData()->IsInGroup( rGroupData, nGroupIndex, *pData , nBaseIndex );
else
- return FALSE;
+ return false;
}
-BOOL ScDPResultData::IsInGroup( SCROW nGroupDataId, long nGroupIndex,
+sal_Bool ScDPResultData::IsInGroup( SCROW nGroupDataId, long nGroupIndex,
const ScDPItemData& rBaseData, long nBaseIndex ) const
{
const ScDPItemData* pGroupData = pSource->GetItemDataById( nGroupIndex , nGroupDataId);
if ( pGroupData )
return pSource->GetData()->IsInGroup( *pGroupData, nGroupIndex, rBaseData , nBaseIndex );
else
- return FALSE;
+ return false;
}
-BOOL ScDPResultData::HasCommonElement(/* const ScDPItemData& rFirstData*/SCROW nFirstDataId, long nFirstIndex,
+sal_Bool ScDPResultData::HasCommonElement(/* const ScDPItemData& rFirstData*/SCROW nFirstDataId, long nFirstIndex,
const ScDPItemData& rSecondData, long nSecondIndex ) const
{
const ScDPItemData* pFirstData = pSource->GetItemDataById( nFirstIndex , nFirstDataId);
if ( pFirstData )
return pSource->GetData()->HasCommonElement( *pFirstData, nFirstIndex, rSecondData, nSecondIndex );
else
- return FALSE;
+ return false;
}
const ScDPSource* ScDPResultData::GetSource() const
@@ -997,31 +997,31 @@ ResultMembers* ScDPResultData::GetDimResultMembers( long nDim , ScDPDimension*
ScDPResultMember::ScDPResultMember( const ScDPResultData* pData, const ScDPParentDimData& rParentDimData ,
- BOOL bForceSub ) :
+ sal_Bool bForceSub ) :
pResultData( pData ),
aParentDimData( rParentDimData ),
pChildDimension( NULL ),
pDataRoot( NULL ),
- bHasElements( FALSE ),
+ bHasElements( false ),
bForceSubTotal( bForceSub ),
- bHasHiddenDetails( FALSE ),
- bInitialized( FALSE ),
- bAutoHidden( FALSE ),
+ bHasHiddenDetails( false ),
+ bInitialized( false ),
+ bAutoHidden( false ),
nMemberStep( 1 )
{
// pParentLevel/pMemberDesc is 0 for root members
}
ScDPResultMember::ScDPResultMember( const ScDPResultData* pData,
- BOOL bForceSub ) :
+ sal_Bool bForceSub ) :
pResultData( pData ),
pChildDimension( NULL ),
pDataRoot( NULL ),
- bHasElements( FALSE ),
+ bHasElements( false ),
bForceSubTotal( bForceSub ),
- bHasHiddenDetails( FALSE ),
- bInitialized( FALSE ),
- bAutoHidden( FALSE ),
+ bHasHiddenDetails( false ),
+ bInitialized( false ),
+ bAutoHidden( false ),
nMemberStep( 1 )
{
}
@@ -1049,13 +1049,13 @@ void ScDPResultMember::FillItemData( ScDPItemData& rData ) const
rData.SetString( ScGlobal::GetRscString(STR_PIVOT_TOTAL) ); // root member
}
-BOOL ScDPResultMember::IsNamedItem( SCROW nIndex ) const
+sal_Bool ScDPResultMember::IsNamedItem( SCROW nIndex ) const
{
//! store ScDPMember pointer instead of ScDPMember ???
const ScDPMember* pMemberDesc = GetDPMember();
if (pMemberDesc)
return ((ScDPMember*)pMemberDesc)->IsNamedItem( nIndex );
- return FALSE;
+ return false;
}
bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const
@@ -1079,13 +1079,13 @@ bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const
void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev,
size_t nPos, ScDPInitState& rInitState ,
- BOOL bInitChild /*= TRUE */)
+ sal_Bool bInitChild /*= sal_True */)
{
// with LateInit, initialize only those members that have data
if ( pResultData->IsLateInit() )
return;
- bInitialized = TRUE;
+ bInitialized = sal_True;
if (nPos >= ppDim.size())
return;
@@ -1101,7 +1101,7 @@ void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vect
{
if ( !pChildDimension )
pChildDimension = new ScDPResultDimension( pResultData );
- pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState , FALSE );
+ pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState , false );
return;
}
else
@@ -1110,14 +1110,14 @@ void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vect
nMemberStep ++;
}
}
- bHasHiddenDetails = TRUE; // only if there is a next dimension
+ bHasHiddenDetails = true; // only if there is a next dimension
return;
}
if ( bInitChild )
{
pChildDimension = new ScDPResultDimension( pResultData );
- pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState, TRUE );
+ pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState, sal_True );
}
}
@@ -1129,7 +1129,7 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
if ( !pResultData->IsLateInit() )
return;
- bInitialized = TRUE;
+ bInitialized = sal_True;
if ( rParams.IsEnd( nPos ) /*nPos >= ppDim.size()*/)
// No next dimension. Bail out.
@@ -1149,8 +1149,8 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
// #i111462# reset InitChild flag only for this child dimension's LateInitFrom call,
// not for following members of parent dimensions
- BOOL bWasInitChild = rParams.GetInitChild();
- rParams.SetInitChild( FALSE );
+ sal_Bool bWasInitChild = rParams.GetInitChild();
+ rParams.SetInitChild( false );
pChildDimension->LateInitFrom( rParams, pItemData, nPos, rInitState );
rParams.SetInitChild( bWasInitChild );
return;
@@ -1161,7 +1161,7 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
nMemberStep ++;
}
}
- bHasHiddenDetails = TRUE; // only if there is a next dimension
+ bHasHiddenDetails = true; // only if there is a next dimension
return;
}
@@ -1174,9 +1174,9 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
}
}
-BOOL ScDPResultMember::IsSubTotalInTitle(long nMeasure) const
+sal_Bool ScDPResultMember::IsSubTotalInTitle(long nMeasure) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if ( pChildDimension && /*pParentLevel*/GetParentLevel() &&
/*pParentLevel*/GetParentLevel()->IsOutlineLayout() && /*pParentLevel*/GetParentLevel()->IsSubtotalsAtTop() )
{
@@ -1190,7 +1190,7 @@ BOOL ScDPResultMember::IsSubTotalInTitle(long nMeasure) const
// only a single subtotal row will be shown in the outline title row
if ( nSubTotals == 1 )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -1233,7 +1233,7 @@ long ScDPResultMember::GetSize(long nMeasure) const
}
}
-BOOL ScDPResultMember::IsVisible() const
+sal_Bool ScDPResultMember::IsVisible() const
{
// not initialized -> shouldn't be there at all
// (allocated only to preserve ordering)
@@ -1241,22 +1241,22 @@ BOOL ScDPResultMember::IsVisible() const
return ( bHasElements || ( pParentLevel && pParentLevel->getShowEmpty() ) ) && IsValid() && bInitialized;
}
-BOOL ScDPResultMember::IsValid() const
+sal_Bool ScDPResultMember::IsValid() const
{
// non-Valid members are left out of calculation
// was member set no invisible at the DataPilotSource?
const ScDPMember* pMemberDesc =GetDPMember();
if ( pMemberDesc && !pMemberDesc->getIsVisible() )
- return FALSE;
+ return false;
if ( bAutoHidden )
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
-BOOL ScDPResultMember::HasHiddenDetails() const
+sal_Bool ScDPResultMember::HasHiddenDetails() const
{
// bHasHiddenDetails is set only if the "show details" flag is off,
// and there was a child dimension to skip
@@ -1361,7 +1361,7 @@ static String lcl_parseSubtotalName(const String& rSubStr, const String& rCaptio
}
void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pSequences,
- long& rPos, long nMeasure, BOOL bRoot,
+ long& rPos, long nMeasure, sal_Bool bRoot,
const String* pMemberName,
const String* pMemberCaption )
{
@@ -1372,7 +1372,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
sheet::MemberResult* pArray = pSequences->getArray();
DBG_ASSERT( rPos+nSize <= pSequences->getLength(), "bumm" );
- BOOL bIsNumeric = FALSE;
+ sal_Bool bIsNumeric = false;
String aName;
if ( pMemberName ) // if pMemberName != NULL, use instead of real member name
aName = *pMemberName;
@@ -1388,7 +1388,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
{
// Numeric group dimensions use numeric entries for proper sorting,
// but the group titles must be output as text.
- bIsNumeric = FALSE;
+ bIsNumeric = false;
}
String aCaption = aName;
@@ -1429,15 +1429,15 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
if ( pParentLevel && pParentLevel->IsAddEmpty() )
++nExtraSpace;
- BOOL bTitleLine = FALSE;
+ sal_Bool bTitleLine = false;
if ( pParentLevel && pParentLevel->IsOutlineLayout() )
- bTitleLine = TRUE;
+ bTitleLine = sal_True;
// if the subtotals are shown at the top (title row) in outline layout,
// no extra row for the subtotals is needed
- BOOL bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
+ sal_Bool bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
{
if ( bTitleLine ) // in tabular layout the title is on a separate row
@@ -1478,7 +1478,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
bool bTotalResult = false;
String aSubStr = aCaption;
aSubStr += ' ';
- aSubStr += pResultData->GetMeasureString(nMemberMeasure, FALSE, eForce, bTotalResult);
+ aSubStr += pResultData->GetMeasureString(nMemberMeasure, false, eForce, bTotalResult);
if (bTotalResult)
{
@@ -1549,13 +1549,13 @@ void ScDPResultMember::FillDataResults( const ScDPResultMember* pRefMember,
if ( pParentLevel && pParentLevel->IsAddEmpty() )
++nExtraSpace;
- BOOL bTitleLine = FALSE;
+ sal_Bool bTitleLine = false;
if ( pParentLevel && pParentLevel->IsOutlineLayout() )
- bTitleLine = TRUE;
+ bTitleLine = sal_True;
- BOOL bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
+ sal_Bool bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
{
if ( bTitleLine ) // in tabular layout the title is on a separate row
@@ -1639,7 +1639,7 @@ void ScDPResultMember::UpdateDataResults( const ScDPResultMember* pRefMember, lo
// IsVisible() test is in ScDPResultDimension::FillDataResults
// (not on data layout dimension)
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
long nUserSubCount = GetSubTotalCount();
// process subtotals even if not shown
@@ -1686,7 +1686,7 @@ void ScDPResultMember::UpdateDataResults( const ScDPResultMember* pRefMember, lo
void ScDPResultMember::SortMembers( ScDPResultMember* pRefMember )
{
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
pChildDimension->SortMembers( pRefMember ); // sorting is done at the dimension
@@ -1701,7 +1701,7 @@ void ScDPResultMember::SortMembers( ScDPResultMember* pRefMember )
void ScDPResultMember::DoAutoShow( ScDPResultMember* pRefMember )
{
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
pChildDimension->DoAutoShow( pRefMember ); // sorting is done at the dimension
@@ -1714,7 +1714,7 @@ void ScDPResultMember::DoAutoShow( ScDPResultMember* pRefMember )
}
}
-void ScDPResultMember::ResetResults( BOOL /*bRoot*/ )
+void ScDPResultMember::ResetResults( sal_Bool /*bRoot*/ )
{
if (pDataRoot)
pDataRoot->ResetResults();
@@ -1723,7 +1723,7 @@ void ScDPResultMember::ResetResults( BOOL /*bRoot*/ )
pChildDimension->ResetResults();
// if (!bRoot)
- // bHasElements = FALSE;
+ // bHasElements = sal_False;
}
void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, long nMeasure,
@@ -1734,7 +1734,7 @@ void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
rTotals.SetInColRoot( IsRoot() );
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
long nUserSubCount = GetSubTotalCount();
//if ( nUserSubCount || !bHasChild )
@@ -1827,28 +1827,28 @@ String ScDPDataMember::GetName() const
return EMPTY_STRING;
}
-BOOL ScDPDataMember::IsVisible() const
+sal_Bool ScDPDataMember::IsVisible() const
{
if (pResultMember)
return pResultMember->IsVisible();
else
- return FALSE;
+ return false;
}
-BOOL ScDPDataMember::IsNamedItem( /*const ScDPItemData& r*/SCROW r ) const
+sal_Bool ScDPDataMember::IsNamedItem( /*const ScDPItemData& r*/SCROW r ) const
{
if (pResultMember)
return pResultMember->IsNamedItem(r);
else
- return FALSE;
+ return false;
}
-BOOL ScDPDataMember::HasHiddenDetails() const
+sal_Bool ScDPDataMember::HasHiddenDetails() const
{
if (pResultMember)
return pResultMember->HasHiddenDetails();
else
- return FALSE;
+ return false;
}
void ScDPDataMember::InitFrom( const ScDPResultDimension* pDim )
@@ -1938,26 +1938,26 @@ void ScDPDataMember::ProcessData( const vector< SCROW >& aChildMembers, const ve
pChildDimension->ProcessData( aChildMembers, aValues, rSubState ); // with unmodified subtotal state
}
-BOOL ScDPDataMember::HasData( long nMeasure, const ScDPSubTotalState& rSubState ) const
+sal_Bool ScDPDataMember::HasData( long nMeasure, const ScDPSubTotalState& rSubState ) const
{
if ( rSubState.eColForce != SUBTOTAL_FUNC_NONE && rSubState.eRowForce != SUBTOTAL_FUNC_NONE &&
rSubState.eColForce != rSubState.eRowForce )
- return FALSE;
+ return false;
// HasData can be different between measures!
const ScDPAggData* pAgg = GetConstAggData( nMeasure, rSubState );
if (!pAgg)
- return FALSE; //! error?
+ return false; //! error?
return pAgg->HasData();
}
-BOOL ScDPDataMember::HasError( long nMeasure, const ScDPSubTotalState& rSubState ) const
+sal_Bool ScDPDataMember::HasError( long nMeasure, const ScDPSubTotalState& rSubState ) const
{
const ScDPAggData* pAgg = GetConstAggData( nMeasure, rSubState );
if (!pAgg)
- return TRUE;
+ return sal_True;
return pAgg->HasError();
}
@@ -2013,7 +2013,7 @@ const ScDPAggData* ScDPDataMember::GetConstAggData( long nMeasure, const ScDPSub
void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
uno::Sequence<sheet::DataResult>& rSequence,
- long& rCol, long nMeasure, BOOL bIsSubTotalRow,
+ long& rCol, long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState ) const
{
DBG_ASSERT( pRefMember == pResultMember || !pResultMember, "bla" );
@@ -2031,15 +2031,15 @@ void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
if ( pRefParentLevel && pRefParentLevel->IsAddEmpty() )
++nExtraSpace;
- BOOL bTitleLine = FALSE;
+ sal_Bool bTitleLine = false;
if ( pRefParentLevel && pRefParentLevel->IsOutlineLayout() )
- bTitleLine = TRUE;
+ bTitleLine = sal_True;
- BOOL bSubTotalInTitle = pRefMember->IsSubTotalInTitle( nMeasure );
+ sal_Bool bSubTotalInTitle = pRefMember->IsSubTotalInTitle( nMeasure );
// 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 );
+ sal_Bool bHasChild = ( pRefChild != NULL );
if ( bHasChild )
{
@@ -2048,7 +2048,7 @@ void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
if ( pDataChild )
pDataChild->FillDataRow( pRefChild, rSequence, rCol, nMeasure, bIsSubTotalRow, rSubState );
- rCol += (USHORT)pRefMember->GetSize( nMeasure );
+ rCol += (sal_uInt16)pRefMember->GetSize( nMeasure );
if ( bTitleLine ) // title column is included in GetSize, so the following
--rCol; // positions are calculated with the normal values
@@ -2131,7 +2131,7 @@ void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
}
void ScDPDataMember::UpdateDataRow( const ScDPResultMember* pRefMember,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState )
{
DBG_ASSERT( pRefMember == pResultMember || !pResultMember, "bla" );
@@ -2142,7 +2142,7 @@ void ScDPDataMember::UpdateDataRow( const ScDPResultMember* pRefMember,
// 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 );
+ sal_Bool bHasChild = ( pRefChild != NULL );
// process subtotals even if not shown
long nUserSubCount = pRefMember->GetSubTotalCount();
@@ -2239,7 +2239,7 @@ void ScDPDataMember::ResetResults()
}
void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState, ScDPRunningTotalState& rRunning,
ScDPRowTotals& rTotals, const ScDPResultMember& rRowParent )
{
@@ -2250,11 +2250,11 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
const ScDPDataDimension* pDataChild = GetChildDimension();
const ScDPResultDimension* pRefChild = pRefMember->GetChildDimension();
- BOOL bIsRoot = ( pResultMember == NULL || pResultMember->GetParentLevel() == NULL );
+ sal_Bool bIsRoot = ( pResultMember == NULL || pResultMember->GetParentLevel() == NULL );
// 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 );
+ sal_Bool bHasChild = ( pRefChild != NULL );
long nUserSubCount = pRefMember->GetSubTotalCount();
{
@@ -2295,8 +2295,8 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
eRefType == sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE ||
eRefType == sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE )
{
- BOOL bRunningTotal = ( eRefType == sheet::DataPilotFieldReferenceType::RUNNING_TOTAL );
- BOOL bRelative =
+ sal_Bool bRunningTotal = ( eRefType == sheet::DataPilotFieldReferenceType::RUNNING_TOTAL );
+ sal_Bool bRelative =
( aReferenceValue.ReferenceItemType != sheet::DataPilotFieldReferenceItemType::NAMED && !bRunningTotal );
long nRelativeDir = bRelative ?
( ( aReferenceValue.ReferenceItemType == sheet::DataPilotFieldReferenceItemType::PREVIOUS ) ? -1 : 1 ) : 0;
@@ -2309,9 +2309,9 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
String aRefFieldName = aReferenceValue.ReferenceField;
//! aLocalSubState?
- USHORT nRefOrient = pResultData->GetMeasureRefOrient( nMemberMeasure );
- BOOL bRefDimInCol = ( nRefOrient == sheet::DataPilotFieldOrientation_COLUMN );
- BOOL bRefDimInRow = ( nRefOrient == sheet::DataPilotFieldOrientation_ROW );
+ sal_uInt16 nRefOrient = pResultData->GetMeasureRefOrient( nMemberMeasure );
+ sal_Bool bRefDimInCol = ( nRefOrient == sheet::DataPilotFieldOrientation_COLUMN );
+ sal_Bool bRefDimInRow = ( nRefOrient == sheet::DataPilotFieldOrientation_ROW );
const ScDPResultDimension* pSelectDim = NULL;
long nRowPos = 0;
@@ -2355,7 +2355,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
pSelectDim = NULL;
}
- BOOL bNoDetailsInRef = FALSE;
+ sal_Bool bNoDetailsInRef = false;
if ( pSelectDim && bRunningTotal )
{
// Running totals:
@@ -2370,7 +2370,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
if ( pMyRefMember && pMyRefMember->HasHiddenDetails() )
{
pSelectDim = NULL; // don't calculate
- bNoDetailsInRef = TRUE; // show error, not empty
+ bNoDetailsInRef = sal_True; // show error, not empty
}
}
}
@@ -2389,17 +2389,17 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
// - Otherwise, the error isn't strictly necessary, but shown for
// consistency.
- BOOL bInnerNoDetails = bRefDimInCol ? HasHiddenDetails() :
- ( bRefDimInRow ? rRowParent.HasHiddenDetails() : TRUE );
+ sal_Bool bInnerNoDetails = bRefDimInCol ? HasHiddenDetails() :
+ ( bRefDimInRow ? rRowParent.HasHiddenDetails() : sal_True );
if ( bInnerNoDetails )
{
pSelectDim = NULL;
- bNoDetailsInRef = TRUE; // show error, not empty
+ bNoDetailsInRef = sal_True; // show error, not empty
}
}
if ( !bRefDimInCol && !bRefDimInRow ) // invalid dimension specified
- bNoDetailsInRef = TRUE; // pSelectDim is then already NULL
+ bNoDetailsInRef = sal_True; // pSelectDim is then already NULL
//
// get the member for the reference item and do the calculation
@@ -2437,7 +2437,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
fTotal += pAggData->GetResult();
pSelectData->SetAuxiliary( fTotal );
pAggData->SetResult( fTotal );
- pAggData->SetEmpty(FALSE); // always display
+ pAggData->SetEmpty(false); // always display
}
}
else
@@ -2446,7 +2446,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
else if (bNoDetailsInRef)
pAggData->SetError();
else
- pAggData->SetEmpty(TRUE); // empty (dim set to 0 above)
+ pAggData->SetEmpty(sal_True); // empty (dim set to 0 above)
}
else
{
@@ -2483,7 +2483,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
if ( pSelectMember == this &&
eRefType != sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE )
{
- pAggData->SetEmpty(TRUE);
+ pAggData->SetEmpty(sal_True);
}
else if ( pSelectMember )
{
@@ -2497,7 +2497,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
double fOtherResult = pOtherAggData->GetAuxiliary();
double fThisResult = pAggData->GetResult();
- BOOL bError = FALSE;
+ sal_Bool bError = false;
switch ( eRefType )
{
case sheet::DataPilotFieldReferenceType::ITEM_DIFFERENCE:
@@ -2505,13 +2505,13 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
break;
case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE:
if ( fOtherResult == 0.0 )
- bError = TRUE;
+ bError = sal_True;
else
fThisResult = fThisResult / fOtherResult;
break;
case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE:
if ( fOtherResult == 0.0 )
- bError = TRUE;
+ bError = sal_True;
else
fThisResult = ( fThisResult - fOtherResult ) / fOtherResult;
break;
@@ -2525,20 +2525,20 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
else
{
pAggData->SetResult(fThisResult);
- pAggData->SetEmpty(FALSE); // always display
+ pAggData->SetEmpty(false); // always display
}
//! errors in data?
}
}
else if (bRelative && !bNoDetailsInRef)
- pAggData->SetEmpty(TRUE); // empty
+ pAggData->SetEmpty(sal_True); // empty
else
pAggData->SetError(); // error
}
else if (bNoDetailsInRef)
pAggData->SetError(); // error
else
- pAggData->SetEmpty(TRUE); // empty
+ pAggData->SetEmpty(sal_True); // empty
}
}
else if ( eRefType == sheet::DataPilotFieldReferenceType::ROW_PERCENTAGE ||
@@ -2642,16 +2642,16 @@ private:
const ScDPResultData* pResultData;
const ScDPInitState& rInitState;
long nDimSource;
- BOOL bIncludeAll;
- BOOL bIsBase;
+ sal_Bool bIncludeAll;
+ sal_Bool bIsBase;
long nGroupBase;
SCROW nBaseDataId;
public:
ScDPGroupCompare( const ScDPResultData* pData, const ScDPInitState& rState, long nDimension );
~ScDPGroupCompare() {}
- BOOL IsIncluded( const ScDPMember& rMember ) { return bIncludeAll || TestIncluded( rMember ); }
- BOOL TestIncluded( const ScDPMember& rMember );
+ sal_Bool IsIncluded( const ScDPMember& rMember ) { return bIncludeAll || TestIncluded( rMember ); }
+ sal_Bool TestIncluded( const ScDPMember& rMember );
};
ScDPGroupCompare::ScDPGroupCompare( const ScDPResultData* pData, const ScDPInitState& rState, long nDimension ) :
@@ -2669,9 +2669,9 @@ ScDPGroupCompare::ScDPGroupCompare( const ScDPResultData* pData, const ScDPInitS
bIncludeAll = !( bIsBase || nGroupBase >= 0 );
}
-BOOL ScDPGroupCompare::TestIncluded( const ScDPMember& rMember )
+sal_Bool ScDPGroupCompare::TestIncluded( const ScDPMember& rMember )
{
- BOOL bInclude = TRUE;
+ sal_Bool bInclude = sal_True;
if ( nBaseDataId >=0 )
{
ScDPItemData aMemberData;
@@ -2723,13 +2723,13 @@ BOOL ScDPGroupCompare::TestIncluded( const ScDPMember& rMember )
ScDPResultDimension::ScDPResultDimension( const ScDPResultData* pData ) :
pResultData( pData ),
- bInitialized( FALSE ),
- bIsDataLayout( FALSE ),
- bSortByData( FALSE ),
- bSortAscending( FALSE ),
+ bInitialized( false ),
+ bIsDataLayout( false ),
+ bSortByData( false ),
+ bSortAscending( false ),
nSortMeasure( 0 ),
- bAutoShow( FALSE ),
- bAutoTopItems( FALSE ),
+ bAutoShow( false ),
+ bAutoTopItems( false ),
nAutoMeasure( 0 ),
nAutoCount( 0 )
{
@@ -2766,7 +2766,7 @@ ScDPResultMember *ScDPResultDimension::FindMember( SCROW iData ) const
}
void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev,
- size_t nPos, ScDPInitState& rInitState, BOOL bInitChild /*= TRUE */ )
+ size_t nPos, ScDPInitState& rInitState, sal_Bool bInitChild /*= sal_True */ )
{
if (nPos >= ppDim.size() || nPos >= ppLev.size())
{
@@ -2790,7 +2790,7 @@ void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const v
const sheet::DataPilotFieldAutoShowInfo& rAutoInfo = pThisLevel->GetAutoShow();
if ( rAutoInfo.IsEnabled )
{
- bAutoShow = TRUE;
+ bAutoShow = sal_True;
bAutoTopItems = ( rAutoInfo.ShowItemsMode == sheet::DataPilotFieldShowItemsMode::FROM_TOP );
nAutoMeasure = pThisLevel->GetAutoMeasure();
nAutoCount = rAutoInfo.ItemCount;
@@ -2800,7 +2800,7 @@ void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const v
const sheet::DataPilotFieldSortInfo& rSortInfo = pThisLevel->GetSortInfo();
if ( rSortInfo.Mode == sheet::DataPilotFieldSortMode::DATA )
{
- bSortByData = TRUE;
+ bSortByData = sal_True;
bSortAscending = rSortInfo.IsAscending;
nSortMeasure = pThisLevel->GetSortMeasure();
}
@@ -2829,7 +2829,7 @@ void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const v
rInitState.RemoveMember();
}
}
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev*/,
@@ -2850,7 +2850,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
long nDimSource = pThisDim->GetDimension(); //! check GetSourceDim?
- BOOL bShowEmpty = pThisLevel->getShowEmpty();
+ sal_Bool bShowEmpty = pThisLevel->getShowEmpty();
if ( !bInitialized )
{ // init some values
@@ -2861,7 +2861,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
const sheet::DataPilotFieldAutoShowInfo& rAutoInfo = pThisLevel->GetAutoShow();
if ( rAutoInfo.IsEnabled )
{
- bAutoShow = TRUE;
+ bAutoShow = sal_True;
bAutoTopItems = ( rAutoInfo.ShowItemsMode == sheet::DataPilotFieldShowItemsMode::FROM_TOP );
nAutoMeasure = pThisLevel->GetAutoMeasure();
nAutoCount = rAutoInfo.ItemCount;
@@ -2870,7 +2870,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
const sheet::DataPilotFieldSortInfo& rSortInfo = pThisLevel->GetSortInfo();
if ( rSortInfo.Mode == sheet::DataPilotFieldSortMode::DATA )
{
- bSortByData = TRUE;
+ bSortByData = sal_True;
bSortAscending = rSortInfo.IsAscending;
nSortMeasure = pThisLevel->GetSortMeasure();
}
@@ -2887,7 +2887,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
if ( pMembers->IsHasHideDetailsMembers() )
DBG_TRACE ( "HasHideDetailsMembers" );
#endif
- pMembers->SetHasHideDetailsMembers( FALSE );
+ pMembers->SetHasHideDetailsMembers( false );
}
bool bNewAllMembers =(!rParams.IsRow()) || nPos == 0 || bLateInitAllMembers ;
@@ -2913,7 +2913,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
AddMember( aData );
}
}
- bInitialized = TRUE; // don't call again, even if no members were included
+ bInitialized = sal_True; // don't call again, even if no members were included
}
// initialize only specific member (or all if "show empty" flag is set)
if ( bLateInitAllMembers )
@@ -2924,13 +2924,13 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
ScDPResultMember* pResultMember = maMemberArray[i];
// check show empty
- BOOL bAllChildren = FALSE;
+ sal_Bool bAllChildren = false;
if( bShowEmpty )
{
if ( pResultMember->IsNamedItem( rThisData ) )
- bAllChildren = FALSE;
+ bAllChildren = false;
else
- bAllChildren = TRUE;
+ bAllChildren = sal_True;
}
rParams.SetInitAllChildren( bAllChildren );
rInitState.AddMember( nDimSource, pResultMember->GetDataId() );
@@ -3029,11 +3029,11 @@ void ScDPResultDimension::FillMemberResults( uno::Sequence<sheet::MemberResult>*
{
bool bTotalResult = false;
String aMbrName = pResultData->GetMeasureDimensionName( nSorted );
- String aMbrCapt = pResultData->GetMeasureString( nSorted, FALSE, SUBTOTAL_FUNC_NONE, bTotalResult );
- maMemberArray[0]->FillMemberResults( pSequences, nPos, nSorted, FALSE, &aMbrName, &aMbrCapt );
+ String aMbrCapt = pResultData->GetMeasureString( nSorted, false, SUBTOTAL_FUNC_NONE, bTotalResult );
+ maMemberArray[0]->FillMemberResults( pSequences, nPos, nSorted, false, &aMbrName, &aMbrCapt );
}
else if ( pMember->IsVisible() )
- pMember->FillMemberResults( pSequences, nPos, nMeasure, FALSE, NULL, NULL );
+ pMember->FillMemberResults( pSequences, nPos, nMeasure, false, NULL, NULL );
// nPos is modified
}
}
@@ -3150,10 +3150,10 @@ void ScDPResultDimension::DoAutoShow( ScDPResultMember* pRefMember )
long nIncluded = nAutoCount;
const ScDPResultMember* pMember1 = maMemberArray[aAutoOrder[nIncluded - 1]];
const ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : NULL;
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue )
{
- bContinue = FALSE;
+ bContinue = false;
if ( nIncluded < nCount )
{
const ScDPResultMember* pMember2 = maMemberArray[aAutoOrder[nIncluded]];
@@ -3162,7 +3162,7 @@ void ScDPResultDimension::DoAutoShow( ScDPResultMember* pRefMember )
if ( lcl_IsEqual( pDataMember1, pDataMember2, nAutoMeasure ) )
{
++nIncluded; // include more members if values are equal
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
}
@@ -3184,7 +3184,7 @@ void ScDPResultDimension::ResetResults()
{
// sort order doesn't matter
ScDPResultMember* pMember = maMemberArray[bIsDataLayout ? 0 : i];
- pMember->ResetResults( FALSE );
+ pMember->ResetResults( false );
}
}
@@ -3234,7 +3234,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember( const ScDPRelativePo
ScDPDataMember* pColMember = NULL;
- BOOL bFirstExisting = ( pRelativePos == NULL && pName == NULL );
+ sal_Bool bFirstExisting = ( pRelativePos == NULL && pName == NULL );
long nMemberCount = maMemberArray.size();
long nMemberIndex = 0; // unsorted
long nDirection = 1; // forward if no relative position is used
@@ -3262,7 +3262,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember( const ScDPRelativePo
}
}
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue && nMemberIndex >= 0 && nMemberIndex < nMemberCount )
{
const ScDPResultMember* pRowMember = maMemberArray[GetSortedIndex(nMemberIndex)];
@@ -3368,7 +3368,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember( const ScDPRelativePo
{
long nReferenceCount = pReferenceDim->GetMemberCount();
- BOOL bFirstExisting = ( pRelativePos == NULL && pName == NULL );
+ sal_Bool bFirstExisting = ( pRelativePos == NULL && pName == NULL );
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
@@ -3394,7 +3394,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember( const ScDPRelativePo
}
}
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue && nMemberIndex >= 0 && nMemberIndex < nReferenceCount )
{
pColMember = pReferenceDim->GetMember( pReferenceDim->GetSortedIndex( nMemberIndex ) );
@@ -3498,7 +3498,7 @@ void ScDPResultDimension::FillVisibilityData(ScDPResultVisibilityData& rData) co
ScDPDataDimension::ScDPDataDimension( const ScDPResultData* pData ) :
pResultData( pData ),
pResultDimension( NULL ),
- bIsDataLayout( FALSE )
+ bIsDataLayout( false )
{
}
@@ -3544,7 +3544,7 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const
long nCount = aMembers.Count();
for (long i=0; i<nCount; i++)
{
- ScDPDataMember* pMember = aMembers[(USHORT)i];
+ ScDPDataMember* pMember = aMembers[(sal_uInt16)i];
// always first member for data layout dim
if ( bIsDataLayout || ( !aDataMembers.empty() && pMember->IsNamedItem(aDataMembers[0]) ) )
@@ -3565,7 +3565,7 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const
void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim,
uno::Sequence<sheet::DataResult>& rSequence,
- long nCol, long nMeasure, BOOL bIsSubTotalRow,
+ long nCol, long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState ) const
{
DBG_ASSERT( pRefDim && pRefDim->GetMemberCount() == aMembers.Count(), "dimensions don't match" );
@@ -3592,7 +3592,7 @@ void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim,
const ScDPResultMember* pRefMember = pRefDim->GetMember(nMemberPos);
if ( pRefMember->IsVisible() ) //! here or in ScDPDataMember::FillDataRow ???
{
- const ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ const ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->FillDataRow( pRefMember, rSequence, nMemberCol, nMemberMeasure, bIsSubTotalRow, rSubState );
// nMemberCol is modified
}
@@ -3600,7 +3600,7 @@ void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim,
}
void ScDPDataDimension::UpdateDataRow( const ScDPResultDimension* pRefDim,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState ) const
{
DBG_ASSERT( pRefDim && pRefDim->GetMemberCount() == aMembers.Count(), "dimensions don't match" );
@@ -3621,7 +3621,7 @@ void ScDPDataDimension::UpdateDataRow( const ScDPResultDimension* pRefDim,
// Calculate must be called even if the member is not visible (for use as reference value)
const ScDPResultMember* pRefMember = pRefDim->GetMember(nMemberPos);
- ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->UpdateDataRow( pRefMember, nMemberMeasure, bIsSubTotalRow, rSubState );
}
}
@@ -3656,7 +3656,7 @@ void ScDPDataDimension::SortMembers( ScDPResultDimension* pRefDim )
ScDPResultMember* pRefMember = pRefDim->GetMember(i);
if ( pRefMember->IsVisible() ) //! here or in ScDPDataMember ???
{
- ScDPDataMember* pDataMember = aMembers[(USHORT)i];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)i];
pDataMember->SortMembers( pRefMember );
}
}
@@ -3678,7 +3678,7 @@ void ScDPDataDimension::DoAutoShow( ScDPResultDimension* pRefDim )
ScDPResultMember* pRefMember = pRefDim->GetMember(i);
if ( pRefMember->IsVisible() ) //! here or in ScDPDataMember ???
{
- ScDPDataMember* pDataMember = aMembers[(USHORT)i];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)i];
pDataMember->DoAutoShow( pRefMember );
}
}
@@ -3699,23 +3699,23 @@ void ScDPDataDimension::DoAutoShow( ScDPResultDimension* pRefDim )
// look for equal values to the last included one
long nIncluded = pRefDim->GetAutoCount();
- ScDPDataMember* pDataMember1 = aMembers[(USHORT)aAutoOrder[nIncluded - 1]];
+ ScDPDataMember* pDataMember1 = aMembers[(sal_uInt16)aAutoOrder[nIncluded - 1]];
if ( !pDataMember1->IsVisible() )
pDataMember1 = NULL;
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue )
{
- bContinue = FALSE;
+ bContinue = false;
if ( nIncluded < nCount )
{
- ScDPDataMember* pDataMember2 = aMembers[(USHORT)aAutoOrder[nIncluded]];
+ ScDPDataMember* pDataMember2 = aMembers[(sal_uInt16)aAutoOrder[nIncluded]];
if ( !pDataMember2->IsVisible() )
pDataMember2 = NULL;
if ( lcl_IsEqual( pDataMember1, pDataMember2, pRefDim->GetAutoMeasure() ) )
{
++nIncluded; // include more members if values are equal
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
}
@@ -3738,7 +3738,7 @@ void ScDPDataDimension::ResetResults()
// sort order doesn't matter
long nMemberPos = bIsDataLayout ? 0 : i;
- ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->ResetResults();
}
}
@@ -3753,7 +3753,7 @@ long ScDPDataDimension::GetSortedIndex( long nUnsorted ) const
}
void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState, ScDPRunningTotalState& rRunning,
ScDPRowTotals& rTotals, const ScDPResultMember& rRowParent ) const
{
@@ -3784,7 +3784,7 @@ void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim,
else
rRunning.AddColIndex( i, nSorted );
- ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->UpdateRunningTotals( pRefMember, nMemberMeasure,
bIsSubTotalRow, rSubState, rRunning, rTotals, rRowParent );
@@ -3804,7 +3804,7 @@ void ScDPDataDimension::DumpState( const ScDPResultDimension* pRefDim, ScDocumen
for (long i=0; i<nCount; i++)
{
const ScDPResultMember* pRefMember = pRefDim->GetMember(i);
- const ScDPDataMember* pDataMember = aMembers[(USHORT)i];
+ const ScDPDataMember* pDataMember = aMembers[(sal_uInt16)i];
pDataMember->DumpState( pRefMember, pDoc, rPos );
}
@@ -3818,7 +3818,7 @@ long ScDPDataDimension::GetMemberCount() const
ScDPDataMember* ScDPDataDimension::GetMember(long n) const
{
- return aMembers[(USHORT)n];
+ return aMembers[(sal_uInt16)n];
}
// ----------------------------------------------------------------------------
@@ -3916,7 +3916,7 @@ SCROW ScDPResultMember::GetDataId( ) const
ScDPResultMember* ScDPResultDimension::AddMember(const ScDPParentDimData &aData )
{
- ScDPResultMember* pMember = new ScDPResultMember( pResultData, aData, FALSE );
+ ScDPResultMember* pMember = new ScDPResultMember( pResultData, aData, false );
SCROW nDataIndex = pMember->GetDataId();
maMemberArray.push_back( pMember );
@@ -3930,7 +3930,7 @@ ScDPResultMember* ScDPResultDimension::InsertMember(ScDPParentDimData *pMemberDa
SCROW nInsert = 0;
if ( !lcl_SearchMember( maMemberArray, pMemberData->mnOrder , nInsert ) )
{ //Member not exist
- ScDPResultMember* pNew = new ScDPResultMember( pResultData, *pMemberData, FALSE );
+ ScDPResultMember* pNew = new ScDPResultMember( pResultData, *pMemberData, false );
maMemberArray.insert( maMemberArray.begin()+nInsert, pNew );
SCROW nDataIndex = pMemberData->mpMemberDesc->GetItemDataId();
@@ -3964,7 +3964,7 @@ void ScDPResultDimension:: InitWithMembers( LateInitParams& rParams,
if ( bInitialized )
pResultMember = FindMember( nDataID );
else
- bInitialized = TRUE;
+ bInitialized = sal_True;
if ( pResultMember == NULL )
{ //only insert found item
@@ -3993,12 +3993,12 @@ ScDPParentDimData* ResultMembers::FindMember( const SCROW& nIndex ) const
void ResultMembers::InsertMember( ScDPParentDimData* pNew )
{
if ( !pNew->mpMemberDesc->getShowDetails() )
- mbHasHideDetailsMember = TRUE;
+ mbHasHideDetailsMember = sal_True;
maMemberHash.insert( std::pair< const SCROW, ScDPParentDimData *>( pNew->mpMemberDesc->GetItemDataId(), pNew ) );
}
ResultMembers::ResultMembers():
- mbHasHideDetailsMember( FALSE )
+ mbHasHideDetailsMember( false )
{
}
ResultMembers::~ResultMembers()
@@ -4007,7 +4007,7 @@ ResultMembers::~ResultMembers()
delete iter->second;
}
// -----------------------------------------------------------------------
-LateInitParams::LateInitParams( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev, BOOL bRow, BOOL bInitChild, BOOL bAllChildren ):
+LateInitParams::LateInitParams( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev, sal_Bool bRow, sal_Bool bInitChild, sal_Bool bAllChildren ):
mppDim( ppDim ),
mppLev( ppLev ),
mbRow( bRow ),
@@ -4020,12 +4020,12 @@ LateInitParams::~LateInitParams()
{
}
-BOOL LateInitParams::IsEnd( size_t nPos ) const
+sal_Bool LateInitParams::IsEnd( size_t nPos ) const
{
return nPos >= mppDim.size();
}
-void ScDPResultDimension::CheckShowEmpty( BOOL bShow )
+void ScDPResultDimension::CheckShowEmpty( sal_Bool bShow )
{
long nCount = maMemberArray.size();
@@ -4038,7 +4038,7 @@ void ScDPResultDimension::CheckShowEmpty( BOOL bShow )
}
-void ScDPResultMember::CheckShowEmpty( BOOL bShow )
+void ScDPResultMember::CheckShowEmpty( sal_Bool bShow )
{
if ( bHasElements )
{
@@ -4054,7 +4054,7 @@ void ScDPResultMember::CheckShowEmpty( BOOL bShow )
SetHasElements();
ScDPResultDimension* pChildDim = GetChildDimension();
if (pChildDim )
- pChildDim->CheckShowEmpty( TRUE );
+ pChildDim->CheckShowEmpty( sal_True );
}
}
}
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 5adc233ece0f..366ca1495dd6 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -107,14 +107,14 @@ SC_SIMPLE_SERVICE_INFO( ScDPMember, "ScDPMember", "com.sun.star.sheet.
// -----------------------------------------------------------------------
//! move to a header?
-BOOL lcl_GetBoolFromAny( const uno::Any& aAny )
+sal_Bool lcl_GetBoolFromAny( const uno::Any& aAny )
{
if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN )
return *(sal_Bool*)aAny.getValue();
- return FALSE;
+ return false;
}
-void lcl_SetBoolInAny( uno::Any& rAny, BOOL bValue )
+void lcl_SetBoolInAny( uno::Any& rAny, sal_Bool bValue )
{
rAny.setValue( &bValue, getBooleanCppuType() );
}
@@ -128,17 +128,17 @@ ScDPSource::ScDPSource( ScDPTableData* pD ) :
nRowDimCount( 0 ),
nDataDimCount( 0 ),
nPageDimCount( 0 ),
- bColumnGrand( TRUE ), // default is true
- bRowGrand( TRUE ),
- bIgnoreEmptyRows( FALSE ),
- bRepeatIfEmpty( FALSE ),
+ bColumnGrand( sal_True ), // default is true
+ bRowGrand( sal_True ),
+ bIgnoreEmptyRows( false ),
+ bRepeatIfEmpty( false ),
nDupCount( 0 ),
pResData( NULL ),
pColResRoot( NULL ),
pRowResRoot( NULL ),
pColResults( NULL ),
pRowResults( NULL ),
- bResultOverflow( FALSE ),
+ bResultOverflow( false ),
mpGrandTotalName(NULL)
{
pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
@@ -164,7 +164,7 @@ const ::rtl::OUString* ScDPSource::GetGrandTotalName() const
return mpGrandTotalName.get();
}
-USHORT ScDPSource::GetOrientation(long nColumn)
+sal_uInt16 ScDPSource::GetOrientation(long nColumn)
{
long i;
for (i=0; i<nColDimCount; i++)
@@ -223,14 +223,14 @@ long ScDPSource::GetPosition(long nColumn)
return 0;
}
-BOOL lcl_TestSubTotal( BOOL& rAllowed, long nColumn, long* pArray, long nCount, ScDPSource* pSource )
+sal_Bool lcl_TestSubTotal( sal_Bool& rAllowed, long nColumn, long* pArray, long nCount, ScDPSource* pSource )
{
for (long i=0; i<nCount; i++)
if (pArray[i] == nColumn)
{
// no subtotals for data layout dim, no matter where
if ( pSource->IsDataLayoutDimension(nColumn) )
- rAllowed = FALSE;
+ rAllowed = false;
else
{
// no subtotals if no other dim but data layout follows
@@ -238,18 +238,18 @@ BOOL lcl_TestSubTotal( BOOL& rAllowed, long nColumn, long* pArray, long nCount,
if ( nNextIndex < nCount && pSource->IsDataLayoutDimension(pArray[nNextIndex]) )
++nNextIndex;
if ( nNextIndex >= nCount )
- rAllowed = FALSE;
+ rAllowed = false;
}
- return TRUE; // found
+ return sal_True; // found
}
- return FALSE;
+ return false;
}
-BOOL ScDPSource::SubTotalAllowed(long nColumn)
+sal_Bool ScDPSource::SubTotalAllowed(long nColumn)
{
//! cache this at ScDPResultData
- BOOL bAllowed = TRUE;
+ sal_Bool bAllowed = sal_True;
if ( lcl_TestSubTotal( bAllowed, nColumn, nColDims, nColDimCount, this ) )
return bAllowed;
if ( lcl_TestSubTotal( bAllowed, nColumn, nRowDims, nRowDimCount, this ) )
@@ -269,7 +269,7 @@ void lcl_RemoveDim( long nRemove, long* pDims, long& rCount )
}
}
-void ScDPSource::SetOrientation(long nColumn, USHORT nNew)
+void ScDPSource::SetOrientation(long nColumn, sal_uInt16 nNew)
{
//! change to no-op if new orientation is equal to old?
@@ -303,17 +303,17 @@ void ScDPSource::SetOrientation(long nColumn, USHORT nNew)
}
}
-BOOL ScDPSource::IsDataLayoutDimension(long nDim)
+sal_Bool ScDPSource::IsDataLayoutDimension(long nDim)
{
return nDim == pData->GetColumnCount();
}
-USHORT ScDPSource::GetDataLayoutOrientation()
+sal_uInt16 ScDPSource::GetDataLayoutOrientation()
{
return GetOrientation(pData->GetColumnCount());
}
-BOOL ScDPSource::IsDateDimension(long nDim)
+sal_Bool ScDPSource::IsDateDimension(long nDim)
{
return pData->IsDateDimension(nDim);
}
@@ -493,7 +493,7 @@ String ScDPSource::getDataDescription()
if ( pResData->GetMeasureCount() == 1 )
{
bool bTotalResult = false;
- aRet = pResData->GetMeasureString( 0, TRUE, SUBTOTAL_FUNC_NONE, bTotalResult );
+ aRet = pResData->GetMeasureString( 0, sal_True, SUBTOTAL_FUNC_NONE, bTotalResult );
}
// empty for more than one measure
@@ -501,43 +501,43 @@ String ScDPSource::getDataDescription()
return aRet;
}
-BOOL ScDPSource::getColumnGrand() const
+sal_Bool ScDPSource::getColumnGrand() const
{
return bColumnGrand;
}
-void ScDPSource::setColumnGrand(BOOL bSet)
+void ScDPSource::setColumnGrand(sal_Bool bSet)
{
bColumnGrand = bSet;
}
-BOOL ScDPSource::getRowGrand() const
+sal_Bool ScDPSource::getRowGrand() const
{
return bRowGrand;
}
-void ScDPSource::setRowGrand(BOOL bSet)
+void ScDPSource::setRowGrand(sal_Bool bSet)
{
bRowGrand = bSet;
}
-BOOL ScDPSource::getIgnoreEmptyRows() const
+sal_Bool ScDPSource::getIgnoreEmptyRows() const
{
return bIgnoreEmptyRows;
}
-void ScDPSource::setIgnoreEmptyRows(BOOL bSet)
+void ScDPSource::setIgnoreEmptyRows(sal_Bool bSet)
{
bIgnoreEmptyRows = bSet;
pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
}
-BOOL ScDPSource::getRepeatIfEmpty() const
+sal_Bool ScDPSource::getRepeatIfEmpty() const
{
return bRepeatIfEmpty;
}
-void ScDPSource::setRepeatIfEmpty(BOOL bSet)
+void ScDPSource::setRepeatIfEmpty(sal_Bool bSet)
{
bRepeatIfEmpty = bSet;
pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
@@ -576,7 +576,7 @@ void ScDPSource::disposeData()
nColDimCount = nRowDimCount = nDataDimCount = nPageDimCount = 0;
pData->DisposeData(); // cached entries etc.
- bResultOverflow = FALSE;
+ bResultOverflow = false;
}
long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLevel, long nLevels )
@@ -586,7 +586,7 @@ long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPL
long nTotal = 1;
long nDataCount = 1;
- BOOL bWasShowAll = TRUE;
+ sal_Bool bWasShowAll = sal_True;
long nPos = nLevels;
while ( nPos > 0 )
{
@@ -598,7 +598,7 @@ long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPL
return 0;
}
- BOOL bDo = FALSE;
+ sal_Bool bDo = false;
if ( ppDim[nPos]->getIsDataLayoutDimension() )
{
// data layout dim doesn't interfere with "show all" flags
@@ -608,11 +608,11 @@ long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPL
}
else if ( bWasShowAll ) // "show all" set for all following levels?
{
- bDo = TRUE;
+ bDo = sal_True;
if ( !ppLevel[nPos]->getShowEmpty() )
{
// this level is counted, following ones are not
- bWasShowAll = FALSE;
+ bWasShowAll = false;
}
}
if ( bDo )
@@ -679,7 +679,7 @@ void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool
pLevel->SetEnableLayout( bIsRow );
if ( pLevel->GetAutoShow().IsEnabled )
- rHasAutoShow = TRUE;
+ rHasAutoShow = sal_True;
if (bIsRow)
{
@@ -781,7 +781,7 @@ void ScDPSource::CreateRes_Impl()
{
if ( !pResData )
{
- USHORT nDataOrient = GetDataLayoutOrientation();
+ sal_uInt16 nDataOrient = GetDataLayoutOrientation();
if ( nDataDimCount > 1 && ( nDataOrient != sheet::DataPilotFieldOrientation_COLUMN &&
nDataOrient != sheet::DataPilotFieldOrientation_ROW ) )
{
@@ -796,7 +796,7 @@ void ScDPSource::CreateRes_Impl()
String* pDataNames = NULL;
sheet::DataPilotFieldReference* pDataRefValues = NULL;
ScSubTotalFunc eDataFunctions[SC_DAPI_MAXFIELDS];
- USHORT nDataRefOrient[SC_DAPI_MAXFIELDS];
+ sal_uInt16 nDataRefOrient[SC_DAPI_MAXFIELDS];
if (nDataDimCount)
{
pDataNames = new String[nDataDimCount];
@@ -808,7 +808,7 @@ void ScDPSource::CreateRes_Impl()
// LateInit (initialize only those rows/children that are used) can be used unless
// any data dimension needs reference values from column/row dimensions
- BOOL bLateInit = TRUE;
+ sal_Bool bLateInit = sal_True;
// Go through all data dimensions (i.e. fields) and build their meta data
// so that they can be passed on to ScDPResultData instance later.
@@ -846,7 +846,7 @@ void ScDPSource::CreateRes_Impl()
// need fully initialized results to find reference values
// (both in column or row dimensions), so updated values or
// differences to 0 can be displayed even for empty results.
- bLateInit = FALSE;
+ bLateInit = false;
}
}
@@ -907,7 +907,7 @@ void ScDPSource::CreateRes_Impl()
if ( nRowLevelCount > 0 )
{
// disable layout flags for the innermost row field (level)
- aInfo.aRowLevels[nRowLevelCount-1]->SetEnableLayout( FALSE );
+ aInfo.aRowLevels[nRowLevelCount-1]->SetEnableLayout( false );
}
pRowResRoot->InitFrom( aInfo.aRowDims, aInfo.aRowLevels, 0, aInitState );
@@ -938,7 +938,7 @@ void ScDPSource::CreateRes_Impl()
// resulting table is too big -> abort before calculating
// (this relies on late init, so no members are allocated in InitFrom above)
- bResultOverflow = TRUE;
+ bResultOverflow = sal_True;
}
else
{
@@ -969,8 +969,8 @@ void ScDPSource::CreateRes_Impl()
// Reset all results to empty, so they can be built again with data for the
// desired members only.
- pColResRoot->ResetResults( TRUE );
- pRowResRoot->ResetResults( TRUE );
+ pColResRoot->ResetResults( sal_True );
+ pRowResRoot->ResetResults( sal_True );
pData->CalcResults(aInfo, true);
// Call UpdateDataResults again, with the new (limited) values.
@@ -998,7 +998,7 @@ void ScDPSource::CreateRes_Impl()
}
-void ScDPSource::FillLevelList( USHORT nOrientation, std::vector<ScDPLevel*> &rList )
+void ScDPSource::FillLevelList( sal_uInt16 nOrientation, std::vector<ScDPLevel*> &rList )
{
rList.clear();
@@ -1077,7 +1077,7 @@ void ScDPSource::FillMemberResults()
long nPos = 0;
pColResRoot->FillMemberResults( pColResults, nPos, pResData->GetColStartMeasure(),
- TRUE, NULL, NULL );
+ sal_True, NULL, NULL );
}
FillLevelList( sheet::DataPilotFieldOrientation_ROW, aRowLevelList );
@@ -1091,7 +1091,7 @@ void ScDPSource::FillMemberResults()
long nPos = 0;
pRowResRoot->FillMemberResults( pRowResults, nPos, pResData->GetRowStartMeasure(),
- TRUE, NULL, NULL );
+ sal_True, NULL, NULL );
}
}
}
@@ -1292,8 +1292,8 @@ sal_Bool SAL_CALL ScDPDimensions::hasByName( const rtl::OUString& aName ) throw(
long nCount = getCount();
for (long i=0; i<nCount; i++)
if ( getByIndex(i)->getName() == aName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return false;
}
uno::Type SAL_CALL ScDPDimensions::getElementType() throw(uno::RuntimeException)
@@ -1348,7 +1348,7 @@ ScDPDimension::ScDPDimension( ScDPSource* pSrc, long nD ) :
mpLayoutName(NULL),
mpSubtotalName(NULL),
nSourceDim( -1 ),
- bHasSelectedPage( FALSE ),
+ bHasSelectedPage( false ),
pSelectedData( NULL ),
mbHasHiddenMember(false)
{
@@ -1405,12 +1405,12 @@ void SAL_CALL ScDPDimension::setName( const ::rtl::OUString& rNewName ) throw(un
aName = String( rNewName );
}
-USHORT ScDPDimension::getOrientation() const
+sal_uInt16 ScDPDimension::getOrientation() const
{
return pSource->GetOrientation( nDim );
}
-void ScDPDimension::setOrientation(USHORT nNew)
+void ScDPDimension::setOrientation(sal_uInt16 nNew)
{
pSource->SetOrientation( nDim, nNew );
}
@@ -1425,17 +1425,17 @@ void ScDPDimension::setPosition(long /* nNew */)
//! ...
}
-BOOL ScDPDimension::getIsDataLayoutDimension() const
+sal_Bool ScDPDimension::getIsDataLayoutDimension() const
{
return pSource->GetData()->getIsDataLayoutDimension( nDim );
}
-USHORT ScDPDimension::getFunction() const
+sal_uInt16 ScDPDimension::getFunction() const
{
return nFunction;
}
-void ScDPDimension::setFunction(USHORT nNew)
+void ScDPDimension::setFunction(sal_uInt16 nNew)
{
nFunction = nNew;
}
@@ -1470,7 +1470,7 @@ uno::Reference<util::XCloneable> SAL_CALL ScDPDimension::createClone() throw(uno
return CreateCloneObject();
}
-BOOL ScDPDimension::isDuplicated() const
+sal_Bool ScDPDimension::isDuplicated() const
{
return (nSourceDim >= 0);
}
@@ -1511,7 +1511,7 @@ const ScDPItemData& ScDPDimension::GetSelectedData()
}
if ( !pSelectedData )
- pSelectedData = new ScDPItemData( aSelectedPage, 0.0, FALSE ); // default - name only
+ pSelectedData = new ScDPItemData( aSelectedPage, 0.0, false ); // default - name only
}
return *pSelectedData;
@@ -1554,13 +1554,13 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
String aNameStr = aPropertyName;
if ( aNameStr.EqualsAscii( SC_UNO_POSITION ) )
{
- INT32 nInt = 0;
+ sal_Int32 nInt = 0;
if (aValue >>= nInt)
setPosition( nInt );
}
else if ( aNameStr.EqualsAscii( SC_UNO_USEDHIER ) )
{
- INT32 nInt = 0;
+ sal_Int32 nInt = 0;
if (aValue >>= nInt)
setUsedHierarchy( nInt );
}
@@ -1568,19 +1568,19 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
{
sheet::DataPilotFieldOrientation eEnum;
if (aValue >>= eEnum)
- setOrientation( sal::static_int_cast<USHORT>(eEnum) );
+ setOrientation( sal::static_int_cast<sal_uInt16>(eEnum) );
}
else if ( aNameStr.EqualsAscii( SC_UNO_FUNCTION ) )
{
sheet::GeneralFunction eEnum;
if (aValue >>= eEnum)
- setFunction( sal::static_int_cast<USHORT>(eEnum) );
+ setFunction( sal::static_int_cast<sal_uInt16>(eEnum) );
}
else if ( aNameStr.EqualsAscii( SC_UNO_REFVALUE ) )
aValue >>= aReferenceValue;
else if ( aNameStr.EqualsAscii( SC_UNO_FILTER ) )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
uno::Sequence<sheet::TableFilterField> aSeq;
if (aValue >>= aSeq)
{
@@ -1588,8 +1588,8 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
if ( nLength == 0 )
{
aSelectedPage.Erase();
- bHasSelectedPage = FALSE;
- bDone = TRUE;
+ bHasSelectedPage = false;
+ bDone = sal_True;
}
else if ( nLength == 1 )
{
@@ -1597,8 +1597,8 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
if ( rField.Field == 0 && rField.Operator == sheet::FilterOperator_EQUAL && !rField.IsNumeric )
{
aSelectedPage = rField.StringValue;
- bHasSelectedPage = TRUE;
- bDone = TRUE;
+ bHasSelectedPage = sal_True;
+ bDone = sal_True;
}
}
}
@@ -1693,7 +1693,7 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
{
// single filter field: first field equal to selected string
sheet::TableFilterField aField( sheet::FilterConnection_AND, 0,
- sheet::FilterOperator_EQUAL, sal_False, 0.0, aSelectedPage );
+ sheet::FilterOperator_EQUAL, false, 0.0, aSelectedPage );
aRet <<= uno::Sequence<sheet::TableFilterField>( &aField, 1 );
}
else
@@ -1782,8 +1782,8 @@ sal_Bool SAL_CALL ScDPHierarchies::hasByName( const rtl::OUString& aName ) throw
long nCount = getCount();
for (long i=0; i<nCount; i++)
if ( getByIndex(i)->getName() == aName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return false;
}
uno::Type SAL_CALL ScDPHierarchies::getElementType() throw(uno::RuntimeException)
@@ -1965,8 +1965,8 @@ sal_Bool SAL_CALL ScDPLevels::hasByName( const rtl::OUString& aName ) throw(uno:
long nCount = getCount();
for (long i=0; i<nCount; i++)
if ( getByIndex(i)->getName() == aName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return false;
}
uno::Type SAL_CALL ScDPLevels::getElementType() throw(uno::RuntimeException)
@@ -2013,19 +2013,19 @@ ScDPLevel* ScDPLevels::getByIndex(long nIndex) const
class ScDPGlobalMembersOrder
{
ScDPLevel& rLevel;
- BOOL bAscending;
+ sal_Bool bAscending;
public:
- ScDPGlobalMembersOrder( ScDPLevel& rLev, BOOL bAsc ) :
+ ScDPGlobalMembersOrder( ScDPLevel& rLev, sal_Bool bAsc ) :
rLevel(rLev),
bAscending(bAsc)
{}
~ScDPGlobalMembersOrder() {}
- BOOL operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
+ sal_Bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
};
-BOOL ScDPGlobalMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
+sal_Bool ScDPGlobalMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
{
sal_Int32 nCompare = 0;
// seems that some ::std::sort() implementations pass the same index twice
@@ -2047,11 +2047,11 @@ ScDPLevel::ScDPLevel( ScDPSource* pSrc, long nD, long nH, long nL ) :
nHier( nH ),
nLev( nL ),
pMembers( NULL ),
- bShowEmpty( FALSE ),
+ bShowEmpty( false ),
aSortInfo( EMPTY_STRING, sal_True, sheet::DataPilotFieldSortMode::NAME ), // default: sort by name
nSortMeasure( 0 ),
nAutoMeasure( 0 ),
- bEnableLayout( FALSE )
+ bEnableLayout( false )
{
//! hold pSource
// aSubTotals is empty
@@ -2098,7 +2098,7 @@ void ScDPLevel::EvaluateSortOrder()
aGlobalOrder[nPos] = nPos;
// allow manual or name (manual is always ascending)
- BOOL bAscending = ( aSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL || aSortInfo.IsAscending );
+ sal_Bool bAscending = ( aSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL || aSortInfo.IsAscending );
ScDPGlobalMembersOrder aComp( *this, bAscending );
::std::sort( aGlobalOrder.begin(), aGlobalOrder.end(), aComp );
}
@@ -2124,7 +2124,7 @@ void ScDPLevel::EvaluateSortOrder()
}
}
-void ScDPLevel::SetEnableLayout( BOOL bSet )
+void ScDPLevel::SetEnableLayout( sal_Bool bSet )
{
bEnableLayout = bSet;
}
@@ -2232,12 +2232,12 @@ void ScDPLevel::setSubTotals(const uno::Sequence<sheet::GeneralFunction>& rNew)
//! set "manual change" flag?
}
-BOOL ScDPLevel::getShowEmpty() const
+sal_Bool ScDPLevel::getShowEmpty() const
{
return bShowEmpty;
}
-void ScDPLevel::setShowEmpty(BOOL bSet)
+void ScDPLevel::setShowEmpty(sal_Bool bSet)
{
bShowEmpty = bSet;
}
@@ -2579,7 +2579,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
if ( !aName.Len() )
aName = String::CreateFromInt32(nVal);
- ScDPItemData rData( aName, nVal, TRUE, 0 ) ;
+ ScDPItemData rData( aName, nVal, sal_True, 0 ) ;
pNew = new ScDPMember( pSource, nDim, nHier, nLev, pSource->GetCache()->GetAdditionalItemID(rData));
}
else
@@ -2602,7 +2602,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
// -----------------------------------------------------------------------
ScDPMember::ScDPMember( ScDPSource* pSrc, long nD, long nH, long nL,
- SCROW nIndex /*const String& rN, double fV, BOOL bHV*/ ) :
+ SCROW nIndex /*const String& rN, double fV, sal_Bool bHV*/ ) :
pSource( pSrc ),
nDim( nD ),
nHier( nH ),
@@ -2610,8 +2610,8 @@ ScDPMember::ScDPMember( ScDPSource* pSrc, long nD, long nH, long nL,
mnDataId( nIndex ),
mpLayoutName(NULL),
nPosition( -1 ),
- bVisible( TRUE ),
- bShowDet( TRUE )
+ bVisible( sal_True ),
+ bShowDet( sal_True )
{
//! hold pSource
}
@@ -2621,7 +2621,7 @@ ScDPMember::~ScDPMember()
//! release pSource
}
-BOOL ScDPMember::IsNamedItem( SCROW nIndex ) const
+sal_Bool ScDPMember::IsNamedItem( SCROW nIndex ) const
{
long nSrcDim = pSource->GetSourceDim( nDim );
if ( nHier != SC_DAPI_HIERARCHY_FLAT && pSource->IsDateDimension( nSrcDim ) )
@@ -2692,23 +2692,23 @@ void SAL_CALL ScDPMember::setName( const ::rtl::OUString& /* rNewName */ ) throw
OSL_FAIL("not implemented"); //! exception?
}
-BOOL ScDPMember::getIsVisible() const
+sal_Bool ScDPMember::getIsVisible() const
{
return bVisible;
}
-void ScDPMember::setIsVisible(BOOL bSet)
+void ScDPMember::setIsVisible(sal_Bool bSet)
{
bVisible = bSet;
//! set "manual change" flag
}
-BOOL ScDPMember::getShowDetails() const
+sal_Bool ScDPMember::getShowDetails() const
{
return bShowDet;
}
-void ScDPMember::setShowDetails(BOOL bSet)
+void ScDPMember::setShowDetails(sal_Bool bSet)
{
bShowDet = bSet;
//! set "manual change" flag
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 397efa4dfd9a..fbc2ea0814c9 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -106,11 +106,11 @@ TYPEINIT1(ScTabSizeChangedHint, SfxHint);
static ScDrawObjFactory* pFac = NULL;
static E3dObjFactory* pF3d = NULL;
-static USHORT nInst = 0;
+static sal_uInt16 nInst = 0;
SfxObjectShell* ScDrawLayer::pGlobalDrawPersist = NULL;
-BOOL bDrawIsInUndo = FALSE; //! Member
+sal_Bool bDrawIsInUndo = false; //! Member
// -----------------------------------------------------------------------
@@ -225,13 +225,13 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
pGlobalDrawPersist ?
pGlobalDrawPersist :
( pDocument ? pDocument->GetDocumentShell() : NULL ),
- TRUE ), // bUseExtColorTable (is set below)
+ sal_True ), // bUseExtColorTable (is set below)
aName( rName ),
pDoc( pDocument ),
pUndoGroup( NULL ),
- bRecording( FALSE ),
- bAdjustEnabled( TRUE ),
- bHyphenatorSet( FALSE )
+ bRecording( false ),
+ bAdjustEnabled( sal_True ),
+ bHyphenatorSet( false )
{
pGlobalDrawPersist = NULL; // nur einmal benutzen
@@ -248,8 +248,8 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
else
SetColorTable( XColorTable::GetStdColorTable() );
- SetSwapGraphics(TRUE);
-// SetSwapAsynchron(TRUE); // an der View
+ SetSwapGraphics(sal_True);
+// SetSwapAsynchron(sal_True); // an der View
SetScaleUnit(MAP_100TH_MM);
SfxItemPool& rPool = GetItemPool();
@@ -268,7 +268,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
eOfficeLanguage == LANGUAGE_JAPANESE )
{
// secondary is edit engine pool
- rPool.GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) );
+ rPool.GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
}
rPool.FreezeIdRanges(); // the pool is also used directly
@@ -330,7 +330,7 @@ void ScDrawLayer::UseHyphenator()
GetDrawOutliner().SetHyphenator( xHyphenator );
GetHitTestOutliner().SetHyphenator( xHyphenator );
- bHyphenatorSet = TRUE;
+ bHyphenatorSet = sal_True;
}
}
@@ -342,14 +342,14 @@ SdrPage* ScDrawLayer::AllocPage(bool bMasterPage)
return pPage;
}
-BOOL ScDrawLayer::HasObjects() const
+sal_Bool ScDrawLayer::HasObjects() const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
- USHORT nCount = GetPageCount();
- for (USHORT i=0; i<nCount && !bFound; i++)
+ sal_uInt16 nCount = GetPageCount();
+ for (sal_uInt16 i=0; i<nCount && !bFound; i++)
if (GetPage(i)->GetObjCount())
- bFound = TRUE;
+ bFound = sal_True;
return bFound;
}
@@ -383,17 +383,17 @@ Window* ScDrawLayer::GetCurDocViewWin()
return NULL;
}
-BOOL ScDrawLayer::ScAddPage( SCTAB nTab )
+sal_Bool ScDrawLayer::ScAddPage( SCTAB nTab )
{
if (bDrawIsInUndo)
- return FALSE; // not inserted
+ return false; // not inserted
- ScDrawPage* pPage = (ScDrawPage*)AllocPage( FALSE );
+ ScDrawPage* pPage = (ScDrawPage*)AllocPage( false );
InsertPage(pPage, static_cast<sal_uInt16>(nTab));
if (bRecording)
AddCalcUndo(new SdrUndoNewPage(*pPage));
- return TRUE; // inserted
+ return sal_True; // inserted
}
void ScDrawLayer::ScRemovePage( SCTAB nTab )
@@ -419,20 +419,20 @@ void ScDrawLayer::ScRenamePage( SCTAB nTab, const String& rNewName )
pPage->SetName(rNewName);
}
-void ScDrawLayer::ScMovePage( USHORT nOldPos, USHORT nNewPos )
+void ScDrawLayer::ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
MovePage( nOldPos, nNewPos );
}
-void ScDrawLayer::ScCopyPage( USHORT nOldPos, USHORT nNewPos, BOOL bAlloc )
+void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool bAlloc )
{
- //! remove argument bAlloc (always FALSE)
+ //! remove argument bAlloc (always sal_False)
if (bDrawIsInUndo)
return;
SdrPage* pOldPage = GetPage(nOldPos);
- SdrPage* pNewPage = bAlloc ? AllocPage(FALSE) : GetPage(nNewPos);
+ SdrPage* pNewPage = bAlloc ? AllocPage(false) : GetPage(nNewPos);
// kopieren
@@ -459,7 +459,7 @@ void ScDrawLayer::ScCopyPage( USHORT nOldPos, USHORT nNewPos, BOOL bAlloc )
InsertPage(pNewPage, nNewPos);
}
-inline BOOL IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 )
+inline sal_Bool IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 )
{
return rPos.Col() >= nCol1 && rPos.Col() <= nCol2 &&
rPos.Row() >= nRow1 && rPos.Row() <= nRow2;
@@ -473,10 +473,10 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC
if (!pPage)
return;
- BOOL bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
- ULONG nCount = pPage->GetObjCount();
- for ( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = pPage->GetObjCount();
+ for ( sal_uLong i = 0; i < nCount; i++ )
{
SdrObject* pObj = pPage->GetObj( i );
ScDrawObjData* pData = GetObjDataTab( pObj, nTab );
@@ -484,18 +484,18 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC
{
const ScAddress aOldStt = pData->maStart;
const ScAddress aOldEnd = pData->maEnd;
- BOOL bChange = FALSE;
+ sal_Bool bChange = false;
if ( aOldStt.IsValid() && IsInBlock( aOldStt, nCol1,nRow1, nCol2,nRow2 ) )
{
pData->maStart.IncCol( nDx );
pData->maStart.IncRow( nDy );
- bChange = TRUE;
+ bChange = sal_True;
}
if ( aOldEnd.IsValid() && IsInBlock( aOldEnd, nCol1,nRow1, nCol2,nRow2 ) )
{
pData->maEnd.IncCol( nDx );
pData->maEnd.IncRow( nDy );
- bChange = TRUE;
+ bChange = sal_True;
}
if (bChange)
{
@@ -508,7 +508,7 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC
}
}
-void ScDrawLayer::SetPageSize( USHORT nPageNo, const Size& rSize, bool bUpdateNoteCaptionPos )
+void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpdateNoteCaptionPos )
{
SdrPage* pPage = GetPage(nPageNo);
if (pPage)
@@ -523,10 +523,10 @@ void ScDrawLayer::SetPageSize( USHORT nPageNo, const Size& rSize, bool bUpdateNo
// auch wenn Groesse gleich geblieben ist
// (einzelne Zeilen/Spalten koennen geaendert sein)
- BOOL bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) );
+ sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) );
- ULONG nCount = pPage->GetObjCount();
- for ( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = pPage->GetObjCount();
+ for ( sal_uLong i = 0; i < nCount; i++ )
{
SdrObject* pObj = pPage->GetObj( i );
ScDrawObjData* pData = GetObjDataTab( pObj, static_cast<SCTAB>(nPageNo) );
@@ -784,18 +784,18 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
}
}
-BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const
+sal_Bool ScDrawLayer::GetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const
{
DBG_ASSERT( pDoc, "ScDrawLayer::GetPrintArea without document" );
if ( !pDoc )
- return FALSE;
+ return false;
SCTAB nTab = rRange.aStart.Tab();
DBG_ASSERT( rRange.aEnd.Tab() == nTab, "GetPrintArea: Tab unterschiedlich" );
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
- BOOL bAny = FALSE;
+ sal_Bool bAny = false;
long nEndX = 0;
long nEndY = 0;
long nStartX = LONG_MAX;
@@ -844,11 +844,11 @@ BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) co
//! Flags (ausgeblendet?) testen
Rectangle aObjRect = pObject->GetCurrentBoundRect();
- BOOL bFit = TRUE;
+ sal_Bool bFit = sal_True;
if ( !bSetHor && ( aObjRect.Right() < nStartX || aObjRect.Left() > nEndX ) )
- bFit = FALSE;
+ bFit = false;
if ( !bSetVer && ( aObjRect.Bottom() < nStartY || aObjRect.Top() > nEndY ) )
- bFit = FALSE;
+ bFit = false;
if ( bFit )
{
if (bSetHor)
@@ -861,7 +861,7 @@ BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) co
if (aObjRect.Top() < nStartY) nStartY = aObjRect.Top();
if (aObjRect.Bottom() > nEndY) nEndY = aObjRect.Bottom();
}
- bAny = TRUE;
+ bAny = sal_True;
}
pObject = aIter.Next();
@@ -940,19 +940,19 @@ void ScDrawLayer::AddCalcUndo( SdrUndoAction* pUndo )
void ScDrawLayer::BeginCalcUndo()
{
DELETEZ(pUndoGroup);
- bRecording = TRUE;
+ bRecording = sal_True;
}
SdrUndoGroup* ScDrawLayer::GetCalcUndo()
{
SdrUndoGroup* pRet = pUndoGroup;
pUndoGroup = NULL;
- bRecording = FALSE;
+ bRecording = false;
return pRet;
}
void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2,
- SCsCOL nDx,SCsROW nDy, BOOL bInsDel, bool bUpdateNoteCaptionPos )
+ SCsCOL nDx,SCsROW nDy, sal_Bool bInsDel, bool bUpdateNoteCaptionPos )
{
DBG_ASSERT( pDoc, "ScDrawLayer::MoveArea without document" );
if ( !pDoc )
@@ -961,7 +961,7 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR
if (!bAdjustEnabled)
return;
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
Rectangle aRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab );
lcl_ReverseTwipsToMM( aRect );
@@ -999,11 +999,11 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR
MoveCells( nTab, nCol1,nRow1, nCol2,nRow2, nDx,nDy, bUpdateNoteCaptionPos );
}
-BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
+sal_Bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
{
DBG_ASSERT( pDoc, "ScDrawLayer::HasObjectsInRows without document" );
if ( !pDoc )
- return FALSE;
+ return false;
Rectangle aTestRect;
@@ -1023,16 +1023,16 @@ BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
aTestRect.Left() = 0;
aTestRect.Right() = MAXMM;
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
if ( bNegativePage )
MirrorRectRTL( aTestRect );
SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page nicht gefunden");
if (!pPage)
- return FALSE;
+ return false;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
Rectangle aObjRect;
SdrObjListIter aIter( *pPage );
@@ -1041,7 +1041,7 @@ BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
{
aObjRect = pObject->GetSnapRect(); //! GetLogicRect ?
if (aTestRect.IsInside(aObjRect.TopLeft()) || aTestRect.IsInside(aObjRect.BottomLeft()))
- bFound = TRUE;
+ bFound = true;
pObject = aIter.Next();
}
@@ -1063,7 +1063,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
pPage->RecalcObjOrdNums();
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
long nDelCount = 0;
@@ -1119,7 +1119,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark )
if (pPage)
{
pPage->RecalcObjOrdNums();
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
long nDelCount = 0;
@@ -1224,7 +1224,7 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle&
}
}
-BOOL lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const ScRange& rClipRange )
+sal_Bool lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const ScRange& rClipRange )
{
// check if every range of rRangesVector is completely in rClipRange
@@ -1237,17 +1237,17 @@ BOOL lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const
ScRange aRange = *rRanges[ i ];
if ( !rClipRange.In( aRange ) )
{
- return FALSE; // at least one range is not valid
+ return false; // at least one range is not valid
}
}
}
- return TRUE; // everything is fine
+ return sal_True; // everything is fine
}
-BOOL lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange& rSourceRange, const ScAddress& rDestPos )
+sal_Bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange& rSourceRange, const ScAddress& rDestPos )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
::std::vector< ScRangeList >::iterator aIt = rRangesVector.begin();
for( ;aIt!=rRangesVector.end(); ++aIt )
@@ -1262,7 +1262,7 @@ BOOL lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange&
SCsROW nDiffY = rDestPos.Row() - (SCsROW)rSourceRange.aStart.Row();
SCsTAB nDiffZ = rDestPos.Tab() - (SCsTAB)rSourceRange.aStart.Tab();
pRange->Move( nDiffX, nDiffY, nDiffZ );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -1286,7 +1286,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
return;
}
- BOOL bMirrorObj = ( rSourceRange.Left() < 0 && rSourceRange.Right() < 0 &&
+ sal_Bool bMirrorObj = ( rSourceRange.Left() < 0 && rSourceRange.Right() < 0 &&
rDestRange.Left() > 0 && rDestRange.Right() > 0 ) ||
( rSourceRange.Left() > 0 && rSourceRange.Right() > 0 &&
rDestRange.Left() < 0 && rDestRange.Right() < 0 );
@@ -1309,13 +1309,13 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
// a clipboard document and its source share the same document item pool,
// so the pointers can be compared to see if this is copy&paste within
// the same document
- BOOL bSameDoc = pDoc && pClipDoc && pDoc->GetPool() == pClipDoc->GetPool();
- BOOL bDestClip = pDoc && pDoc->IsClipboard();
+ sal_Bool bSameDoc = pDoc && pClipDoc && pDoc->GetPool() == pClipDoc->GetPool();
+ sal_Bool bDestClip = pDoc && pDoc->IsClipboard();
//#i110034# charts need correct sheet names for xml range conversion during load
//so the target sheet name is temporarily renamed (if we have any SdrObjects)
String aDestTabName;
- BOOL bRestoreDestTabName = FALSE;
+ sal_Bool bRestoreDestTabName = false;
if( pOldObject && !bSameDoc && !bDestClip )
{
if( pDoc && pClipDoc )
@@ -1327,7 +1327,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
if( !(aSourceTabName==aDestTabName) &&
pDoc->ValidNewTabName(aSourceTabName) )
{
- bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); //BOOL bUpdateRef = TRUE, BOOL bExternalDocument = FALSE
+ bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); //sal_Bool bUpdateRef = sal_True, sal_Bool bExternalDocument = sal_False
}
}
}
@@ -1346,18 +1346,18 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
Fraction aHorFract(1,1);
Fraction aVerFract(1,1);
- BOOL bResize = FALSE;
+ sal_Bool bResize = false;
// sizes can differ by 1 from twips->1/100mm conversion for equal cell sizes,
// don't resize to empty size when pasting into hidden columns or rows
if ( Abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 )
{
aHorFract = Fraction( nDestWidth, nSourceWidth );
- bResize = TRUE;
+ bResize = sal_True;
}
if ( Abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 )
{
aVerFract = Fraction( nDestHeight, nSourceHeight );
- bResize = TRUE;
+ bResize = sal_True;
}
Point aRefPos = rDestRange.TopLeft(); // for resizing (after moving)
@@ -1409,7 +1409,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
pDoc->GetChartRanges( aChartName, aRangesVector, pDoc );
if( !aRangesVector.empty() )
{
- BOOL bInSourceRange = FALSE;
+ sal_Bool bInSourceRange = false;
ScRange aClipRange;
if ( pClipDoc )
{
@@ -1418,7 +1418,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
SCCOL nClipEndX;
SCROW nClipEndY;
pClipDoc->GetClipStart( nClipStartX, nClipStartY );
- pClipDoc->GetClipArea( nClipEndX, nClipEndY, TRUE );
+ pClipDoc->GetClipArea( nClipEndX, nClipEndY, sal_True );
nClipEndX = nClipEndX + nClipStartX;
nClipEndY += nClipStartY; // GetClipArea returns the difference
@@ -1473,11 +1473,11 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
void ScDrawLayer::MirrorRTL( SdrObject* pObj )
{
- UINT16 nIdent = pObj->GetObjIdentifier();
+ sal_uInt16 nIdent = pObj->GetObjIdentifier();
// don't mirror OLE or graphics, otherwise ask the object
// if it can be mirrored
- BOOL bCanMirror = ( nIdent != OBJ_GRAF && nIdent != OBJ_OLE2 );
+ sal_Bool bCanMirror = ( nIdent != OBJ_GRAF && nIdent != OBJ_OLE2 );
if (bCanMirror)
{
SdrObjTransformInfoRec aInfo;
@@ -1573,7 +1573,7 @@ String ScDrawLayer::GetVisibleName( SdrObject* pObj )
inline sal_Bool IsNamedObject( SdrObject* pObj, const String& rName )
{
- // TRUE if rName is the object's Name or PersistName
+ // sal_True if rName is the object's Name or PersistName
// (used to find a named object)
return ( pObj->GetName() == rName ||
@@ -1581,7 +1581,7 @@ inline sal_Bool IsNamedObject( SdrObject* pObj, const String& rName )
static_cast<SdrOle2Obj*>(pObj)->GetPersistName() == rName ) );
}
-SdrObject* ScDrawLayer::GetNamedObject( const String& rName, USHORT nId, SCTAB& rFoundTab ) const
+SdrObject* ScDrawLayer::GetNamedObject( const String& rName, sal_uInt16 nId, SCTAB& rFoundTab ) const
{
sal_uInt16 nTabCount = GetPageCount();
for (sal_uInt16 nTab=0; nTab<nTabCount; nTab++)
@@ -1614,7 +1614,7 @@ String ScDrawLayer::GetNewGraphicName( long* pnCounter ) const
String aBase = ScGlobal::GetRscString(STR_GRAPHICNAME);
aBase += ' ';
- BOOL bThere = TRUE;
+ sal_Bool bThere = sal_True;
String aGraphicName;
SCTAB nDummy;
long nId = pnCounter ? *pnCounter : 0;
@@ -1666,8 +1666,8 @@ namespace
{
SdrObjUserData* GetFirstUserDataOfType(const SdrObject *pObj, UINT16 nId)
{
- USHORT nCount = pObj ? pObj->GetUserDataCount() : 0;
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = pObj ? pObj->GetUserDataCount() : 0;
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
SdrObjUserData* pData = pObj->GetUserData( i );
if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == nId )
@@ -1678,8 +1678,8 @@ namespace
void DeleteFirstUserDataOfType(SdrObject *pObj, UINT16 nId)
{
- USHORT nCount = pObj ? pObj->GetUserDataCount() : 0;
- for( USHORT i = nCount; i > 0; i-- )
+ sal_uInt16 nCount = pObj ? pObj->GetUserDataCount() : 0;
+ for( sal_uInt16 i = nCount; i > 0; i-- )
{
SdrObjUserData* pData = pObj->GetUserData( i-1 );
if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == nId )
@@ -1756,7 +1756,7 @@ ScAnchorType ScDrawLayer::GetAnchorType( const SdrObject &rObj )
return ScDrawLayer::GetObjData(const_cast<SdrObject*>(&rObj)) ? SCA_CELL : SCA_PAGE;
}
-ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, BOOL bCreate )
+ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, sal_Bool bCreate )
{
if (SdrObjUserData *pData = GetFirstUserDataOfType(pObj, SC_UD_OBJDATA))
return (ScDrawObjData*) pData;
@@ -1815,7 +1815,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
Size aGraphSize;
ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap();
Graphic aGraphic;
- BOOL bObjSupported = FALSE;
+ sal_Bool bObjSupported = false;
if ( pObj->ISA( SdrGrafObj ) ) // einfaches Grafik-Objekt
{
@@ -1844,13 +1844,13 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
rGraphic.GetPrefMapMode(),
aMap100 );
- bObjSupported = TRUE;
+ bObjSupported = sal_True;
}
else if ( pObj->ISA( SdrOle2Obj ) ) // OLE-Objekt
{
// TODO/LEAN: working with visual area needs running state
aGraphSize = ((const SdrOle2Obj*)pObj)->GetOrigObjSize();
- bObjSupported = TRUE;
+ bObjSupported = true;
}
// hat alles geklappt, dann HitTest ausfuehren
@@ -1865,7 +1865,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
return pIMapObj;
}
-ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, BOOL bCreate )
+ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, sal_Bool bCreate )
{
if (SdrObjUserData *pData = GetFirstUserDataOfType(pObj, SC_UD_MACRODATA))
return (ScMacroInfo*) pData;
@@ -1888,7 +1888,7 @@ void ScDrawLayer::SetGlobalDrawPersist(SfxObjectShell* pPersist)
void ScDrawLayer::SetChanged( sal_Bool bFlg /* = sal_True */ )
{
if ( bFlg && pDoc )
- pDoc->SetChartListenerCollectionNeedsUpdate( TRUE );
+ pDoc->SetChartListenerCollectionNeedsUpdate( sal_True );
FmFormModel::SetChanged( bFlg );
}
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 28f687be8312..8839eaf19bc1 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -55,7 +55,7 @@
// -----------------------------------------------------------------------
-const USHORT ROWINFO_MAX = 1024;
+const sal_uInt16 ROWINFO_MAX = 1024;
enum FillInfoLinePos
@@ -95,8 +95,8 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
rStartX = nX;
rStartY = nY;
- BOOL bHOver = pInfo->bHOverlapped;
- BOOL bVOver = pInfo->bVOverlapped;
+ sal_Bool bHOver = pInfo->bHOverlapped;
+ sal_Bool bVOver = pInfo->bVOverlapped;
SCCOL nLastCol;
SCROW nLastRow;
@@ -110,7 +110,7 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rStartX, rStartY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
@@ -134,7 +134,7 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rStartX, rStartY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
@@ -161,11 +161,11 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
SCTAB nTab, double nScaleX, double nScaleY,
- BOOL bPageMode, BOOL bFormulaMode, const ScMarkData* pMarkData )
+ sal_Bool bPageMode, sal_Bool bFormulaMode, const ScMarkData* pMarkData )
{
DBG_ASSERT( pTab[nTab], "Tabelle existiert nicht" );
- BOOL bLayoutRTL = IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = IsLayoutRTL( nTab );
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
ScStyleSheetPool* pStlPool = xPoolHelper->GetStylePool();
@@ -186,16 +186,16 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
SCCOL nArrX;
SCSIZE nArrY;
SCSIZE nArrCount;
- BOOL bAnyMerged = FALSE;
- BOOL bAnyShadow = FALSE;
- BOOL bAnyCondition = FALSE;
+ sal_Bool bAnyMerged = false;
+ sal_Bool bAnyShadow = false;
+ sal_Bool bAnyCondition = false;
- BOOL bTabProtect = IsTabProtected(nTab);
+ sal_Bool bTabProtect = IsTabProtected(nTab);
// fuer Blockmarken von zusammengefassten Zellen mit
// versteckter erster Zeile / Spalte
- BOOL bPaintMarks = FALSE;
- BOOL bSkipMarks = FALSE;
+ sal_Bool bPaintMarks = false;
+ sal_Bool bSkipMarks = false;
SCCOL nBlockStartX = 0, nBlockEndX = 0;
SCROW nBlockEndY = 0, nBlockStartY = 0;
if (pMarkData && pMarkData->IsMarked())
@@ -210,9 +210,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nBlockEndY = aTmpRange.aEnd.Row();
ExtendHidden( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY, nTab ); //? noetig ?
if (pMarkData->IsMarkNegative())
- bSkipMarks = TRUE;
+ bSkipMarks = sal_True;
else
- bPaintMarks = TRUE;
+ bPaintMarks = sal_True;
}
}
@@ -220,7 +220,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nArrY=0;
SCROW nYExtra = nY2+1;
- USHORT nDocHeight = ScGlobal::nStdRowHeight;
+ sal_uInt16 nDocHeight = ScGlobal::nStdRowHeight;
SCROW nDocHeightEndRow = -1;
for (nSignedY=((SCsROW)nY1)-1; nSignedY<=(SCsROW)nYExtra; nSignedY++)
{
@@ -242,17 +242,17 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
pThisRowInfo->pCellInfo = NULL; // wird unten belegt
- USHORT nHeight = (USHORT) ( nDocHeight * nScaleY );
+ sal_uInt16 nHeight = (sal_uInt16) ( nDocHeight * nScaleY );
if (!nHeight)
nHeight = 1;
pThisRowInfo->nRowNo = nY; //! Fall < 0 ?
pThisRowInfo->nHeight = nHeight;
- pThisRowInfo->bEmptyBack = TRUE;
- pThisRowInfo->bEmptyText = TRUE;
- pThisRowInfo->bChanged = TRUE;
- pThisRowInfo->bAutoFilter = FALSE;
- pThisRowInfo->bPushButton = FALSE;
+ pThisRowInfo->bEmptyBack = sal_True;
+ pThisRowInfo->bEmptyText = sal_True;
+ pThisRowInfo->bChanged = sal_True;
+ pThisRowInfo->bAutoFilter = false;
+ pThisRowInfo->bPushButton = false;
pThisRowInfo->nRotMaxCol = SC_ROTMAX_NONE;
++nArrY;
@@ -272,12 +272,12 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// rotierter Text...
// Attribut im Dokument ueberhaupt verwendet?
- BOOL bAnyItem = FALSE;
- USHORT nRotCount = pPool->GetItemCount( ATTR_ROTATE_VALUE );
- for (USHORT nItem=0; nItem<nRotCount; nItem++)
- if (pPool->GetItem( ATTR_ROTATE_VALUE, nItem ))
+ sal_Bool bAnyItem = false;
+ sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE );
+ for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++)
+ if (pPool->GetItem2( ATTR_ROTATE_VALUE, nItem ))
{
- bAnyItem = TRUE;
+ bAnyItem = sal_True;
break;
}
@@ -314,28 +314,28 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nX = MAXCOL+1; // ungueltig
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX];
- pInfo->bEmptyCellText = TRUE;
+ pInfo->bEmptyCellText = sal_True;
pInfo->pCell = NULL;
if (bPaintMarks)
pInfo->bMarked = ( nX >= nBlockStartX && nX <= nBlockEndX
&& nY >= nBlockStartY && nY <= nBlockEndY );
else
- pInfo->bMarked = FALSE;
+ pInfo->bMarked = false;
pInfo->nWidth = 0;
pInfo->nClipMark = SC_CLIPMARK_NONE;
- pInfo->bMerged = FALSE;
- pInfo->bHOverlapped = FALSE;
- pInfo->bVOverlapped = FALSE;
- pInfo->bAutoFilter = FALSE;
- pInfo->bPushButton = FALSE;
+ pInfo->bMerged = false;
+ pInfo->bHOverlapped = false;
+ pInfo->bVOverlapped = false;
+ pInfo->bAutoFilter = false;
+ pInfo->bPushButton = false;
pInfo->bPopupButton = false;
pInfo->bFilterActive = false;
pInfo->nRotateDir = SC_ROTDIR_NONE;
- pInfo->bPrinted = FALSE; // view-intern
- pInfo->bHideGrid = FALSE; // view-intern
- pInfo->bEditEngine = FALSE; // view-intern
+ pInfo->bPrinted = false; // view-intern
+ pInfo->bHideGrid = false; // view-intern
+ pInfo->bEditEngine = false; // view-intern
pInfo->pBackground = NULL; //! weglassen?
pInfo->pPatternAttr = NULL;
@@ -358,7 +358,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
if (!ColHidden(nX, nTab))
{
- USHORT nThisWidth = (USHORT) (GetColWidth( nX, nTab ) * nScaleX);
+ sal_uInt16 nThisWidth = (sal_uInt16) (GetColWidth( nX, nTab ) * nScaleX);
if (!nThisWidth)
nThisWidth = 1;
@@ -379,7 +379,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// TODO: Optimize this loop.
if (!ColHidden(nX, nTab))
{
- USHORT nThisWidth = (USHORT) (GetColWidth( nX, nTab ) * nScaleX);
+ sal_uInt16 nThisWidth = (sal_uInt16) (GetColWidth( nX, nTab ) * nScaleX);
if (!nThisWidth)
nThisWidth = 1;
@@ -408,8 +408,8 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
pInfo->pCell = pThisCol->pItems[nUIndex].pCell;
if (pInfo->pCell->GetCellType() != CELLTYPE_NOTE)
{
- pThisRowInfo->bEmptyText = FALSE; // Zeile nicht leer
- pInfo->bEmptyCellText = FALSE; // Zelle nicht leer
+ pThisRowInfo->bEmptyText = false; // Zeile nicht leer
+ pInfo->bEmptyCellText = false; // Zelle nicht leer
}
++nArrY;
}
@@ -450,24 +450,24 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
const SvxShadowItem* pShadowAttr = (const SvxShadowItem*)
&pPattern->GetItem(ATTR_SHADOW);
if (pShadowAttr != pDefShadow)
- bAnyShadow = TRUE;
+ bAnyShadow = sal_True;
const ScMergeAttr* pMergeAttr = (const ScMergeAttr*)
&pPattern->GetItem(ATTR_MERGE);
- BOOL bMerged = ( pMergeAttr != pDefMerge && *pMergeAttr != *pDefMerge );
- USHORT nOverlap = ((const ScMergeFlagAttr*) &pPattern->GetItemSet().
+ sal_Bool bMerged = ( pMergeAttr != pDefMerge && *pMergeAttr != *pDefMerge );
+ sal_uInt16 nOverlap = ((const ScMergeFlagAttr*) &pPattern->GetItemSet().
Get(ATTR_MERGE_FLAG))->GetValue();
- BOOL bHOverlapped = ((nOverlap & SC_MF_HOR) != 0);
- BOOL bVOverlapped = ((nOverlap & SC_MF_VER) != 0);
- BOOL bAutoFilter = ((nOverlap & SC_MF_AUTO) != 0);
- BOOL bPushButton = ((nOverlap & SC_MF_BUTTON) != 0);
- BOOL bScenario = ((nOverlap & SC_MF_SCENARIO) != 0);
+ sal_Bool bHOverlapped = ((nOverlap & SC_MF_HOR) != 0);
+ sal_Bool bVOverlapped = ((nOverlap & SC_MF_VER) != 0);
+ sal_Bool bAutoFilter = ((nOverlap & SC_MF_AUTO) != 0);
+ sal_Bool bPushButton = ((nOverlap & SC_MF_BUTTON) != 0);
+ sal_Bool bScenario = ((nOverlap & SC_MF_SCENARIO) != 0);
bool bPopupButton = ((nOverlap & SC_MF_BUTTON_POPUP) != 0);
bool bFilterActive = ((nOverlap & SC_MF_HIDDEN_MEMBER) != 0);
if (bMerged||bHOverlapped||bVOverlapped)
- bAnyMerged = TRUE; // intern
+ bAnyMerged = sal_True; // intern
- BOOL bHidden, bHideFormula;
+ sal_Bool bHidden, bHideFormula;
if (bTabProtect)
{
const ScProtectionAttr& rProtAttr = (const ScProtectionAttr&)
@@ -476,9 +476,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
bHideFormula = rProtAttr.GetHideFormula();
}
else
- bHidden = bHideFormula = FALSE;
+ bHidden = bHideFormula = false;
- ULONG nConditional = ((const SfxUInt32Item&)pPattern->
+ sal_uLong nConditional = ((const SfxUInt32Item&)pPattern->
GetItem(ATTR_CONDITIONAL)).GetValue();
const ScConditionalFormat* pCondForm = NULL;
if ( nConditional && pCondFormList )
@@ -492,11 +492,11 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
if (pBackground != pDefBackground) // Spalten-HG == Standard ?
- pThisRowInfo->bEmptyBack = FALSE;
+ pThisRowInfo->bEmptyBack = false;
if (bAutoFilter)
- pThisRowInfo->bAutoFilter = TRUE;
+ pThisRowInfo->bAutoFilter = sal_True;
if (bPushButton)
- pThisRowInfo->bPushButton = TRUE;
+ pThisRowInfo->bPushButton = sal_True;
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX];
pInfo->pBackground = pBackground;
@@ -514,7 +514,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
pInfo->pShadowAttr = pShadowAttr;
// nWidth wird nicht mehr einzeln gesetzt
- BOOL bEmbed = FALSE; //bIsEmbedded &&
+ sal_Bool bEmbed = false; //bIsEmbedded &&
nTab >= aEmbedRange.aStart.Tab() &&
nTab <= aEmbedRange.aEnd.Tab() &&
nX >= aEmbedRange.aStart.Col() &&
@@ -525,18 +525,18 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
if (bScenario)
{
pInfo->pBackground = ScGlobal::GetButtonBrushItem();
- pThisRowInfo->bEmptyBack = FALSE;
+ pThisRowInfo->bEmptyBack = false;
}
else if (bEmbed)
{
pInfo->pBackground = ScGlobal::GetEmbeddedBrushItem();
- pThisRowInfo->bEmptyBack = FALSE;
+ pThisRowInfo->bEmptyBack = false;
}
if (bHidden || ( bFormulaMode && bHideFormula && pInfo->pCell
&& pInfo->pCell->GetCellType()
== CELLTYPE_FORMULA ))
- pInfo->bEmptyCellText = TRUE;
+ pInfo->bEmptyCellText = sal_True;
if ( pCondForm )
{
@@ -550,7 +550,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
//! Style-Sets cachen !!!
pInfo->pConditionSet = &pStyleSheet->GetItemSet();
- bAnyCondition = TRUE;
+ bAnyCondition = sal_True;
}
// if style is not there, treat like no condition
}
@@ -576,7 +576,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
// Blockmarken
const ScMarkArray* pThisMarkArr = pMarkData->GetArray()+nX;
- BOOL bThisMarked;
+ sal_Bool bThisMarked;
nArrY = 1;
nCurRow = nY1; // einzelne Zeile
nThisRow = nY1; // Ende des Bereichs
@@ -594,7 +594,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
if ( bThisMarked )
{
- BOOL bSkip = bSkipMarks &&
+ sal_Bool bSkip = bSkipMarks &&
nX >= nBlockStartX &&
nX <= nBlockEndX &&
nCurRow >= nBlockStartY &&
@@ -603,7 +603,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX];
- pInfo->bMarked = TRUE;
+ pInfo->bMarked = sal_True;
}
}
++nArrY;
@@ -650,26 +650,26 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
const SfxPoolItem* pItem;
// Hintergrund
- if ( pCondSet->GetItemState( ATTR_BACKGROUND, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BACKGROUND, sal_True, &pItem ) == SFX_ITEM_SET )
{
pInfo->pBackground = (const SvxBrushItem*) pItem;
- pRowInfo[nArrY].bEmptyBack = FALSE;
+ pRowInfo[nArrY].bEmptyBack = false;
}
// Umrandung
- if ( pCondSet->GetItemState( ATTR_BORDER, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BORDER, sal_True, &pItem ) == SFX_ITEM_SET )
pInfo->pLinesAttr = (const SvxBoxItem*) pItem;
- if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, sal_True, &pItem ) == SFX_ITEM_SET )
pInfo->mpTLBRLine = static_cast< const SvxLineItem* >( pItem );
- if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, sal_True, &pItem ) == SFX_ITEM_SET )
pInfo->mpBLTRLine = static_cast< const SvxLineItem* >( pItem );
// Schatten
- if ( pCondSet->GetItemState( ATTR_SHADOW, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_SHADOW, sal_True, &pItem ) == SFX_ITEM_SET )
{
pInfo->pShadowAttr = (const SvxShadowItem*) pItem;
- bAnyShadow = TRUE;
+ bAnyShadow = sal_True;
}
}
}
@@ -710,23 +710,23 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// Hintergrund kopieren (oder in output.cxx)
if ( !pStartCond || pStartCond->
- GetItemState(ATTR_BACKGROUND,TRUE,&pItem) != SFX_ITEM_SET )
+ GetItemState(ATTR_BACKGROUND,sal_True,&pItem) != SFX_ITEM_SET )
pItem = &pStartPattern->GetItem(ATTR_BACKGROUND);
pInfo->pBackground = (const SvxBrushItem*) pItem;
- pRowInfo[nArrY].bEmptyBack = FALSE;
+ pRowInfo[nArrY].bEmptyBack = false;
// Schatten
if ( !pStartCond || pStartCond->
- GetItemState(ATTR_SHADOW,TRUE,&pItem) != SFX_ITEM_SET )
+ GetItemState(ATTR_SHADOW,sal_True,&pItem) != SFX_ITEM_SET )
pItem = &pStartPattern->GetItem(ATTR_SHADOW);
pInfo->pShadowAttr = (const SvxShadowItem*) pItem;
if (pInfo->pShadowAttr != pDefShadow)
- bAnyShadow = TRUE;
+ bAnyShadow = sal_True;
// Blockmarken - wieder mit Original-Merge-Werten
- BOOL bCellMarked = FALSE;
+ sal_Bool bCellMarked = false;
if (bPaintMarks)
bCellMarked = ( nStartX >= (SCsCOL) nBlockStartX
&& nStartX <= (SCsCOL) nBlockEndX
@@ -750,13 +750,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
for (nArrY=0; nArrY<nArrCount; nArrY++)
{
- BOOL bTop = ( nArrY == 0 );
- BOOL bBottom = ( nArrY+1 == nArrCount );
+ sal_Bool bTop = ( nArrY == 0 );
+ sal_Bool bBottom = ( nArrY+1 == nArrCount );
for (nArrX=nX1; nArrX<=nX2+2; nArrX++) // links und rechts einer mehr
{
- BOOL bLeft = ( nArrX == nX1 );
- BOOL bRight = ( nArrX == nX2+2 );
+ sal_Bool bLeft = ( nArrX == nX1 );
+ sal_Bool bRight = ( nArrX == nX2+2 );
CellInfo* pInfo = &pRowInfo[nArrY].pCellInfo[nArrX];
const SvxShadowItem* pThisAttr = pInfo->pShadowAttr;
@@ -773,13 +773,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
while ( nArrX+nDxNeg > nX1 && pRowInfo[0].pCellInfo[nArrX+nDxNeg].nWidth == 0 )
--nDxNeg;
- BOOL bLeftDiff = !bLeft &&
+ sal_Bool bLeftDiff = !bLeft &&
CELLINFO(nDxNeg,0).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
- BOOL bRightDiff = !bRight &&
+ sal_Bool bRightDiff = !bRight &&
CELLINFO(nDxPos,0).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
- BOOL bTopDiff = !bTop &&
+ sal_Bool bTopDiff = !bTop &&
CELLINFO(0,-1).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
- BOOL bBottomDiff = !bBottom &&
+ sal_Bool bBottomDiff = !bBottom &&
CELLINFO(0,1).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
if ( bLayoutRTL )
@@ -887,7 +887,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
}
}
- rTabInfo.mnArrCount = sal::static_int_cast<USHORT>(nArrCount);
+ rTabInfo.mnArrCount = sal::static_int_cast<sal_uInt16>(nArrCount);
rTabInfo.mbPageMode = bPageMode;
// ========================================================================
@@ -905,12 +905,12 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
for( size_t nRow = 0; nRow < nRowCount; ++nRow )
{
- USHORT nCellInfoY = static_cast< USHORT >( nRow );
+ sal_uInt16 nCellInfoY = static_cast< sal_uInt16 >( nRow );
RowInfo& rThisRowInfo = pRowInfo[ nCellInfoY ];
for( size_t nCol = 0; nCol < nColCount; ++nCol )
{
- USHORT nCellInfoX = static_cast< USHORT >( nCol + nX1 );
+ sal_uInt16 nCellInfoX = static_cast< sal_uInt16 >( nCol + nX1 );
const CellInfo& rInfo = rThisRowInfo.pCellInfo[ nCellInfoX ];
const SvxBoxItem* pBox = rInfo.pLinesAttr;
@@ -953,16 +953,16 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// first visible column (nX1-1 is first processed document column)
SCCOL nFirstDocCol = (nX1 > 0) ? ::std::max< SCCOL >( nFirstRealDocCol, nX1 - 1 ) : nFirstRealDocCol;
- USHORT nFirstCellInfoX = static_cast< USHORT >( nFirstDocCol + 1 );
+ sal_uInt16 nFirstCellInfoX = static_cast< sal_uInt16 >( nFirstDocCol + 1 );
nFirstCol = static_cast< size_t >( nFirstCellInfoX - nX1 );
// last visible column (nX2+1 is last processed document column)
SCCOL nLastDocCol = (nX2 < MAXCOL) ? ::std::min< SCCOL >( nLastRealDocCol, nX2 + 1 ) : nLastRealDocCol;
- USHORT nLastCellInfoX = static_cast< USHORT >( nLastDocCol + 1 );
+ sal_uInt16 nLastCellInfoX = static_cast< sal_uInt16 >( nLastDocCol + 1 );
size_t nLastCol = static_cast< size_t >( nLastCellInfoX - nX1 );
// first visible row
- USHORT nFirstCellInfoY = nCellInfoY;
+ sal_uInt16 nFirstCellInfoY = nCellInfoY;
while( ((nFirstCellInfoY > 1) && (pRowInfo[ nFirstCellInfoY - 1 ].nRowNo >= nFirstRealDocRow)) ||
((nFirstCellInfoY == 1) && (static_cast< SCROW >( nY1 - 1 ) >= nFirstRealDocRow)) )
--nFirstCellInfoY;
@@ -970,7 +970,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nFirstRow = static_cast< size_t >( nFirstCellInfoY );
// last visible row
- USHORT nLastCellInfoY = nCellInfoY;
+ sal_uInt16 nLastCellInfoY = nCellInfoY;
while( (sal::static_int_cast<SCSIZE>(nLastCellInfoY + 1) < nArrCount) &&
(pRowInfo[ nLastCellInfoY + 1 ].nRowNo <= nLastRealDocRow) )
++nLastCellInfoY;
@@ -1065,13 +1065,13 @@ ScTableInfo::ScTableInfo() :
mpRowInfo( new RowInfo[ ROWINFO_MAX ] ),
mbPageMode( false )
{
- for( USHORT nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
+ for( sal_uInt16 nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
mpRowInfo[ nIdx ].pCellInfo = 0;
}
ScTableInfo::~ScTableInfo()
{
- for( USHORT nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
+ for( sal_uInt16 nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
delete [] mpRowInfo[ nIdx ].pCellInfo;
delete [] mpRowInfo;
}
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 7522e64b256f..57c517c9b977 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -139,19 +139,19 @@ SvNumberFormatter* ScGlobal::pEnglishFormatter = NULL;
double ScGlobal::nScreenPPTX = 96.0;
double ScGlobal::nScreenPPTY = 96.0;
-USHORT ScGlobal::nDefFontHeight = 240;
-USHORT ScGlobal::nStdRowHeight = 257;
+sal_uInt16 ScGlobal::nDefFontHeight = 240;
+sal_uInt16 ScGlobal::nStdRowHeight = 257;
long ScGlobal::nLastRowHeightExtra = 0;
long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH;
-static USHORT nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
+static sal_uInt16 nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
class SfxViewShell;
SfxViewShell* pScActiveViewShell = NULL; //! als Member !!!!!
-USHORT nScClickMouseModifier = 0; //! dito
-USHORT nScFillModeMouseModifier = 0; //! dito
+sal_uInt16 nScClickMouseModifier = 0; //! dito
+sal_uInt16 nScFillModeMouseModifier = 0; //! dito
// Hack: ScGlobal::GetUserList() muss InitAppOptions in der UI aufrufen,
// damit UserList aus Cfg geladen wird
@@ -164,11 +164,11 @@ void global_InitAppOptions();
//
//========================================================================
-BOOL ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
+sal_Bool ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
const SfxItemSet& rOldAttrs,
- const USHORT nWhich )
+ const sal_uInt16 nWhich )
{
- BOOL bInvalidate = FALSE;
+ sal_Bool bInvalidate = false;
const SfxItemState eNewState = rNewAttrs.GetItemState( nWhich );
const SfxItemState eOldState = rOldAttrs.GetItemState( nWhich );
@@ -194,14 +194,14 @@ BOOL ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
? rNewAttrs.Get( nWhich )
: rNewAttrs.GetPool()->GetDefaultItem( nWhich );
- bInvalidate = sal::static_int_cast<BOOL>(rNewItem != rOldItem);
+ bInvalidate = sal::static_int_cast<sal_Bool>(rNewItem != rOldItem);
}
return bInvalidate;
}
-ULONG ScGlobal::GetStandardFormat( SvNumberFormatter& rFormatter,
- ULONG nFormat, short nType )
+sal_uLong ScGlobal::GetStandardFormat( SvNumberFormatter& rFormatter,
+ sal_uLong nFormat, short nType )
{
const SvNumberformat* pFormat = rFormatter.GetEntry( nFormat );
if ( pFormat )
@@ -209,8 +209,8 @@ ULONG ScGlobal::GetStandardFormat( SvNumberFormatter& rFormatter,
return rFormatter.GetStandardFormat( nType, eLnge );
}
-ULONG ScGlobal::GetStandardFormat( double fNumber, SvNumberFormatter& rFormatter,
- ULONG nFormat, short nType )
+sal_uLong ScGlobal::GetStandardFormat( double fNumber, SvNumberFormatter& rFormatter,
+ sal_uLong nFormat, short nType )
{
const SvNumberformat* pFormat = rFormatter.GetEntry( nFormat );
if ( pFormat )
@@ -234,7 +234,7 @@ SvNumberFormatter* ScGlobal::GetEnglishFormatter()
//------------------------------------------------------------------------
-BOOL ScGlobal::CheckWidthInvalidate( BOOL& bNumFormatChanged,
+sal_Bool ScGlobal::CheckWidthInvalidate( sal_Bool& bNumFormatChanged,
const SfxItemSet& rNewAttrs,
const SfxItemSet& rOldAttrs )
{
@@ -350,7 +350,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
}
}
-const String& ScGlobal::GetRscString( USHORT nIndex )
+const String& ScGlobal::GetRscString( sal_uInt16 nIndex )
{
DBG_ASSERT( nIndex < STR_COUNT, "ScGlobal::GetRscString - invalid string index");
if( !ppRscString[ nIndex ] )
@@ -393,7 +393,7 @@ const String& ScGlobal::GetRscString( USHORT nIndex )
return *ppRscString[ nIndex ];
}
-String ScGlobal::GetErrorString(USHORT nErrNumber)
+String ScGlobal::GetErrorString(sal_uInt16 nErrNumber)
{
String sResStr;
switch (nErrNumber)
@@ -419,7 +419,7 @@ String ScGlobal::GetErrorString(USHORT nErrNumber)
return sResStr;
}
-String ScGlobal::GetLongErrorString(USHORT nErrNumber)
+String ScGlobal::GetLongErrorString(sal_uInt16 nErrNumber)
{
switch (nErrNumber)
{
@@ -549,7 +549,7 @@ void ScGlobal::Init()
pLocaleData = pSysLocale->GetLocaleDataPtr();
ppRscString = new String *[ STR_COUNT ];
- for( USHORT nC = 0 ; nC < STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
+ for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
pButtonBrushItem = new SvxBrushItem( Color(), ATTR_BACKGROUND );
@@ -574,7 +574,7 @@ void ScGlobal::Init()
void ScGlobal::UpdatePPT( OutputDevice* pDev )
{
- USHORT nCurrentZoom = Application::GetSettings().GetStyleSettings().GetScreenZoom();
+ sal_uInt16 nCurrentZoom = Application::GetSettings().GetStyleSettings().GetScreenZoom();
if ( nCurrentZoom != nPPTZoom )
{
// Screen PPT values must be updated when ScreenZoom has changed.
@@ -623,12 +623,12 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
Font aDefFont;
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // font color doesn't matter here
aVirtWindow.SetFont(aDefFont);
- nDefFontHeight = (USHORT) aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()),
+ nDefFontHeight = (sal_uInt16) aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()),
MAP_TWIP).Height();
const SvxMarginItem* pMargin = (const SvxMarginItem*)&pPattern->GetItem(ATTR_MARGIN);
- nStdRowHeight = (USHORT) ( nDefFontHeight +
+ nStdRowHeight = (sal_uInt16) ( nDefFontHeight +
pMargin->GetTopMargin() + pMargin->GetBottomMargin()
- STD_ROWHEIGHT_DIFF );
}
@@ -644,7 +644,7 @@ void ScGlobal::Clear()
DELETEZ(pAddInCollection);
DELETEZ(pUserList);
- for( USHORT nC = 0 ; nC < STR_COUNT ; nC++ )
+ for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ )
if( ppRscString ) delete ppRscString[ nC ];
delete[] ppRscString;
ppRscString = NULL;
@@ -883,33 +883,33 @@ const sal_Unicode* ScGlobal::FindUnquoted( const sal_Unicode* pString, sal_Unico
//------------------------------------------------------------------------
-BOOL ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
+sal_Bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
const EditTextObject* pObj2 )
{
if ( pObj1 == pObj2 ) // both empty or the same object
- return TRUE;
+ return sal_True;
if ( pObj1 && pObj2 )
{
// first test for equal text content
- USHORT nParCount = pObj1->GetParagraphCount();
+ sal_uInt16 nParCount = pObj1->GetParagraphCount();
if ( nParCount != pObj2->GetParagraphCount() )
- return FALSE;
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ return false;
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
if ( pObj1->GetText(nPar) != pObj2->GetText(nPar) )
- return FALSE;
+ return false;
SvMemoryStream aStream1;
SvMemoryStream aStream2;
pObj1->Store( aStream1 );
pObj2->Store( aStream2 );
- ULONG nSize = aStream1.Tell();
+ sal_uLong nSize = aStream1.Tell();
if ( aStream2.Tell() == nSize )
- if ( !memcmp( aStream1.GetData(), aStream2.GetData(), (USHORT) nSize ) )
- return TRUE;
+ if ( !memcmp( aStream1.GetData(), aStream2.GetData(), (sal_uInt16) nSize ) )
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
@@ -937,8 +937,8 @@ void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
SfxFrameItem aFrm( SID_DOCFRAME, pFrame );
SfxStringItem aReferer( SID_REFERER, aReferName );
- SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE );
- SfxBoolItem aBrowsing( SID_BROWSE, TRUE );
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, false );
+ SfxBoolItem aBrowsing( SID_BROWSE, sal_True );
// kein SID_SILENT mehr
@@ -954,19 +954,19 @@ void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
//------------------------------------------------------------------------
-BOOL ScGlobal::IsSystemRTL()
+sal_Bool ScGlobal::IsSystemRTL()
{
return MsLangId::isRightToLeft( Application::GetSettings().GetLanguage() );
}
-BYTE ScGlobal::GetDefaultScriptType()
+sal_uInt8 ScGlobal::GetDefaultScriptType()
{
// Used when text contains only WEAK characters.
// Script type of office language is used then (same as GetEditDefaultLanguage,
// to get consistent behavior of text in simple cells and EditEngine,
// also same as GetAppLanguage() in Writer)
- return (BYTE) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() );
+ return (sal_uInt8) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() );
}
LanguageType ScGlobal::GetEditDefaultLanguage()
@@ -976,7 +976,7 @@ LanguageType ScGlobal::GetEditDefaultLanguage()
return Application::GetSettings().GetLanguage();
}
-USHORT ScGlobal::GetScriptedWhichID( BYTE nScriptType, USHORT nWhich )
+sal_uInt16 ScGlobal::GetScriptedWhichID( sal_uInt8 nScriptType, sal_uInt16 nWhich )
{
switch ( nScriptType )
{
@@ -1068,16 +1068,16 @@ USHORT ScGlobal::GetScriptedWhichID( BYTE nScriptType, USHORT nWhich )
void ScGlobal::AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter )
{
- DBG_ASSERT( rSet.GetItemState( ATTR_LANGUAGE_FORMAT, FALSE ) == SFX_ITEM_DEFAULT,
+ DBG_ASSERT( rSet.GetItemState( ATTR_LANGUAGE_FORMAT, false ) == SFX_ITEM_DEFAULT,
"ScGlobal::AddLanguage - language already added");
const SfxPoolItem* pHardItem;
- if ( rSet.GetItemState( ATTR_VALUE_FORMAT, FALSE, &pHardItem ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( ATTR_VALUE_FORMAT, false, &pHardItem ) == SFX_ITEM_SET )
{
const SvNumberformat* pHardFormat = rFormatter.GetEntry(
((const SfxUInt32Item*)pHardItem)->GetValue() );
- ULONG nParentFmt = 0; // pool default
+ sal_uLong nParentFmt = 0; // pool default
const SfxItemSet* pParent = rSet.GetParent();
if ( pParent )
nParentFmt = ((const SfxUInt32Item&)pParent->Get( ATTR_VALUE_FORMAT )).GetValue();
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index bc805db5a650..fb03c65ce2bf 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -44,7 +44,6 @@
#include "global.hxx"
#include "rangeutl.hxx"
-#include "pivot.hxx"
#include "rechead.hxx"
#include "compiler.hxx"
#include "paramisc.hxx"
@@ -65,9 +64,9 @@ ScImportParam::ScImportParam() :
nRow1(0),
nCol2(0),
nRow2(0),
- bImport(FALSE),
- bNative(FALSE),
- bSql(TRUE),
+ bImport(false),
+ bNative(false),
+ bSql(sal_True),
nType(ScDbTable)
{
}
@@ -106,7 +105,7 @@ ScImportParam& ScImportParam::operator=( const ScImportParam& r )
return *this;
}
-BOOL ScImportParam::operator==( const ScImportParam& rOther ) const
+sal_Bool ScImportParam::operator==( const ScImportParam& rOther ) const
{
return( nCol1 == rOther.nCol1 &&
nRow1 == rOther.nRow1 &&
@@ -126,8 +125,8 @@ BOOL ScImportParam::operator==( const ScImportParam& rOther ) const
// struct ScQueryParam:
ScQueryEntry::ScQueryEntry() :
- bDoQuery(FALSE),
- bQueryByString(FALSE),
+ bDoQuery(false),
+ bQueryByString(false),
bQueryByDate(false),
nField(0),
eOp(SC_EQUAL),
@@ -186,8 +185,8 @@ ScQueryEntry& ScQueryEntry::operator=( const ScQueryEntry& r )
void ScQueryEntry::Clear()
{
- bDoQuery = FALSE;
- bQueryByString = FALSE;
+ bDoQuery = false;
+ bQueryByString = false;
bQueryByDate = false;
eOp = SC_EQUAL;
eConnect = SC_AND;
@@ -203,7 +202,7 @@ void ScQueryEntry::Clear()
pSearchText = NULL;
}
-BOOL ScQueryEntry::operator==( const ScQueryEntry& r ) const
+sal_Bool ScQueryEntry::operator==( const ScQueryEntry& r ) const
{
return bDoQuery == r.bDoQuery
&& bQueryByString == r.bQueryByString
@@ -216,12 +215,12 @@ BOOL ScQueryEntry::operator==( const ScQueryEntry& r ) const
//! pSearchParam und pSearchText nicht vergleichen
}
-utl::TextSearch* ScQueryEntry::GetSearchTextPtr( BOOL bCaseSens )
+utl::TextSearch* ScQueryEntry::GetSearchTextPtr( sal_Bool bCaseSens )
{
if ( !pSearchParam )
{
pSearchParam = new utl::SearchParam( *pStr, utl::SearchParam::SRCH_REGEXP,
- bCaseSens, FALSE, FALSE );
+ bCaseSens, false, false );
pSearchText = new utl::TextSearch( *pSearchParam, *ScGlobal::pCharClass );
}
return pSearchText;
@@ -232,7 +231,7 @@ utl::TextSearch* ScQueryEntry::GetSearchTextPtr( BOOL bCaseSens )
ScSubTotalParam::ScSubTotalParam()
{
- for ( USHORT i=0; i<MAXSUBTOTAL; i++ )
+ for ( sal_uInt16 i=0; i<MAXSUBTOTAL; i++ )
{
nSubTotals[i] = 0;
pSubTotals[i] = NULL;
@@ -250,7 +249,7 @@ ScSubTotalParam::ScSubTotalParam( const ScSubTotalParam& r ) :
bDoSort(r.bDoSort),bAscending(r.bAscending),bUserDef(r.bUserDef),nUserIndex(r.nUserIndex),
bIncludePattern(r.bIncludePattern)
{
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
bGroupActive[i] = r.bGroupActive[i];
nField[i] = r.nField[i];
@@ -283,12 +282,12 @@ void ScSubTotalParam::Clear()
nCol1=nCol2= 0;
nRow1=nRow2 = 0;
nUserIndex = 0;
- bPagebreak=bCaseSens=bUserDef=bIncludePattern=bRemoveOnly = FALSE;
- bAscending=bReplace=bDoSort = TRUE;
+ bPagebreak=bCaseSens=bUserDef=bIncludePattern=bRemoveOnly = false;
+ bAscending=bReplace=bDoSort = sal_True;
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
- bGroupActive[i] = FALSE;
+ bGroupActive[i] = false;
nField[i] = 0;
if ( (nSubTotals[i] > 0) && pSubTotals[i] && pFunctions[i] )
@@ -319,7 +318,7 @@ ScSubTotalParam& ScSubTotalParam::operator=( const ScSubTotalParam& r )
nUserIndex = r.nUserIndex;
bIncludePattern = r.bIncludePattern;
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
bGroupActive[i] = r.bGroupActive[i];
nField[i] = r.nField[i];
@@ -352,9 +351,9 @@ ScSubTotalParam& ScSubTotalParam::operator=( const ScSubTotalParam& r )
//------------------------------------------------------------------------
-BOOL ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
+sal_Bool ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
{
- BOOL bEqual = (nCol1 == rOther.nCol1)
+ sal_Bool bEqual = (nCol1 == rOther.nCol1)
&& (nRow1 == rOther.nRow1)
&& (nCol2 == rOther.nCol2)
&& (nRow2 == rOther.nRow2)
@@ -370,8 +369,8 @@ BOOL ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
if ( bEqual )
{
- bEqual = TRUE;
- for ( USHORT i=0; i<MAXSUBTOTAL && bEqual; i++ )
+ bEqual = sal_True;
+ for ( sal_uInt16 i=0; i<MAXSUBTOTAL && bEqual; i++ )
{
bEqual = (bGroupActive[i] == rOther.bGroupActive[i])
&& (nField[i] == rOther.nField[i])
@@ -396,10 +395,10 @@ BOOL ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
//------------------------------------------------------------------------
-void ScSubTotalParam::SetSubTotals( USHORT nGroup,
+void ScSubTotalParam::SetSubTotals( sal_uInt16 nGroup,
const SCCOL* ptrSubTotals,
const ScSubTotalFunc* ptrFunctions,
- USHORT nCount )
+ sal_uInt16 nCount )
{
DBG_ASSERT( (nGroup <= MAXSUBTOTAL),
"ScSubTotalParam::SetSubTotals(): nGroup > MAXSUBTOTAL!" );
@@ -423,7 +422,7 @@ void ScSubTotalParam::SetSubTotals( USHORT nGroup,
pFunctions[nGroup] = new ScSubTotalFunc [nCount];
nSubTotals[nGroup] = static_cast<SCCOL>(nCount);
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
pSubTotals[nGroup][i] = ptrSubTotals[i];
pFunctions[nGroup][i] = ptrFunctions[i];
@@ -452,7 +451,7 @@ ScConsolidateParam::ScConsolidateParam( const ScConsolidateParam& r ) :
{
nDataAreaCount = r.nDataAreaCount;
ppDataAreas = new ScArea*[nDataAreaCount];
- for ( USHORT i=0; i<nDataAreaCount; i++ )
+ for ( sal_uInt16 i=0; i<nDataAreaCount; i++ )
ppDataAreas[i] = new ScArea( *(r.ppDataAreas[i]) );
}
}
@@ -470,7 +469,7 @@ void ScConsolidateParam::ClearDataAreas()
{
if ( ppDataAreas )
{
- for ( USHORT i=0; i<nDataAreaCount; i++ )
+ for ( sal_uInt16 i=0; i<nDataAreaCount; i++ )
delete ppDataAreas[i];
delete [] ppDataAreas;
ppDataAreas = NULL;
@@ -487,7 +486,7 @@ void ScConsolidateParam::Clear()
nCol = 0;
nRow = 0;
nTab = 0;
- bByCol = bByRow = bReferenceData = FALSE;
+ bByCol = bByRow = bReferenceData = false;
eFunction = SUBTOTAL_FUNC_SUM;
}
@@ -509,9 +508,9 @@ ScConsolidateParam& ScConsolidateParam::operator=( const ScConsolidateParam& r )
//------------------------------------------------------------------------
-BOOL ScConsolidateParam::operator==( const ScConsolidateParam& r ) const
+sal_Bool ScConsolidateParam::operator==( const ScConsolidateParam& r ) const
{
- BOOL bEqual = (nCol == r.nCol)
+ sal_Bool bEqual = (nCol == r.nCol)
&& (nRow == r.nRow)
&& (nTab == r.nTab)
&& (bByCol == r.bByCol)
@@ -526,7 +525,7 @@ BOOL ScConsolidateParam::operator==( const ScConsolidateParam& r ) const
bEqual = bEqual && (ppDataAreas != NULL) && (r.ppDataAreas != NULL);
if ( bEqual && (nDataAreaCount > 0) )
- for ( USHORT i=0; i<nDataAreaCount && bEqual; i++ )
+ for ( sal_uInt16 i=0; i<nDataAreaCount && bEqual; i++ )
bEqual = *(ppDataAreas[i]) == *(r.ppDataAreas[i]);
return bEqual;
@@ -534,13 +533,13 @@ BOOL ScConsolidateParam::operator==( const ScConsolidateParam& r ) const
//------------------------------------------------------------------------
-void ScConsolidateParam::SetAreas( ScArea* const* ppAreas, USHORT nCount )
+void ScConsolidateParam::SetAreas( ScArea* const* ppAreas, sal_uInt16 nCount )
{
ClearDataAreas();
if ( ppAreas && nCount > 0 )
{
ppDataAreas = new ScArea*[nCount];
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
ppDataAreas[i] = new ScArea( *(ppAreas[i]) );
nDataAreaCount = nCount;
}
@@ -548,7 +547,7 @@ void ScConsolidateParam::SetAreas( ScArea* const* ppAreas, USHORT nCount )
// -----------------------------------------------------------------------
-PivotField::PivotField( SCsCOL nNewCol, USHORT nNewFuncMask ) :
+PivotField::PivotField( SCsCOL nNewCol, sal_uInt16 nNewFuncMask ) :
nCol( nNewCol ),
nFuncMask( nNewFuncMask ),
nFuncCount( 0 )
@@ -576,8 +575,8 @@ bool PivotField::operator==( const PivotField& r ) const
ScPivotParam::ScPivotParam()
: nCol(0), nRow(0), nTab(0),
- bIgnoreEmptyRows(FALSE), bDetectCategories(FALSE),
- bMakeTotalCol(TRUE), bMakeTotalRow(TRUE)
+ bIgnoreEmptyRows(false), bDetectCategories(false),
+ bMakeTotalCol(true), bMakeTotalRow(true)
{
}
@@ -648,9 +647,9 @@ ScPivotParam& ScPivotParam::operator=( const ScPivotParam& r )
//------------------------------------------------------------------------
-BOOL ScPivotParam::operator==( const ScPivotParam& r ) const
+sal_Bool ScPivotParam::operator==( const ScPivotParam& r ) const
{
- BOOL bEqual = (nCol == r.nCol)
+ sal_Bool bEqual = (nCol == r.nCol)
&& (nRow == r.nRow)
&& (nTab == r.nTab)
&& (bIgnoreEmptyRows == r.bIgnoreEmptyRows)
@@ -719,17 +718,17 @@ ScSolveParam& ScSolveParam::operator=( const ScSolveParam& r )
//------------------------------------------------------------------------
-BOOL ScSolveParam::operator==( const ScSolveParam& r ) const
+sal_Bool ScSolveParam::operator==( const ScSolveParam& r ) const
{
- BOOL bEqual = (aRefFormulaCell == r.aRefFormulaCell)
+ sal_Bool bEqual = (aRefFormulaCell == r.aRefFormulaCell)
&& (aRefVariableCell == r.aRefVariableCell);
if ( bEqual )
{
if ( !pStrTargetVal && !r.pStrTargetVal )
- bEqual = TRUE;
+ bEqual = sal_True;
else if ( !pStrTargetVal || !r.pStrTargetVal )
- bEqual = FALSE;
+ bEqual = false;
else if ( pStrTargetVal && r.pStrTargetVal )
bEqual = ( *pStrTargetVal == *(r.pStrTargetVal) );
}
@@ -755,7 +754,7 @@ ScTabOpParam::ScTabOpParam( const ScRefAddress& rFormulaCell,
const ScRefAddress& rFormulaEnd,
const ScRefAddress& rRowCell,
const ScRefAddress& rColCell,
- BYTE nMd)
+ sal_uInt8 nMd)
: aRefFormulaCell ( rFormulaCell ),
aRefFormulaEnd ( rFormulaEnd ),
aRefRowCell ( rRowCell ),
@@ -778,7 +777,7 @@ ScTabOpParam& ScTabOpParam::operator=( const ScTabOpParam& r )
//------------------------------------------------------------------------
-BOOL ScTabOpParam::operator==( const ScTabOpParam& r ) const
+sal_Bool ScTabOpParam::operator==( const ScTabOpParam& r ) const
{
return ( (aRefFormulaCell == r.aRefFormulaCell)
&& (aRefFormulaEnd == r.aRefFormulaEnd)
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index c9a7182d8fd6..940ef895ea1c 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -60,7 +60,7 @@ ScMarkArray::~ScMarkArray()
//------------------------------------------------------------------------
-void ScMarkArray::Reset( BOOL bMarked )
+void ScMarkArray::Reset( sal_Bool bMarked )
{
// always create pData here
// (or have separate method to ensure pData)
@@ -75,11 +75,11 @@ void ScMarkArray::Reset( BOOL bMarked )
//------------------------------------------------------------------------
-BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
+sal_Bool ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
{
long nHi = static_cast<long>(nCount) - 1;
long i = 0;
- BOOL bFound = (nCount == 1);
+ sal_Bool bFound = (nCount == 1);
if (pData)
{
long nLo = 0;
@@ -98,11 +98,11 @@ BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
if (nStartRow >= (long) nRow)
nHi = --i;
else
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
- bFound = FALSE;
+ bFound = false;
if (bFound)
nIndex=(SCSIZE)i;
@@ -111,19 +111,19 @@ BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
return bFound;
}
-BOOL ScMarkArray::GetMark( SCROW nRow ) const
+sal_Bool ScMarkArray::GetMark( SCROW nRow ) const
{
SCSIZE i;
if (Search( nRow, i ))
return pData[i].bMarked;
else
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
-void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
+void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, sal_Bool bMarked )
{
if (ValidRow(nStartRow) && ValidRow(nEndRow))
{
@@ -134,7 +134,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
else
{
if (!pData)
- Reset(FALSE); // create pData for further processing - could use special case handling!
+ Reset(false); // create pData for further processing - could use special case handling!
SCSIZE nNeeded = nCount + 2;
if ( nLimit < nNeeded )
@@ -150,8 +150,8 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
SCSIZE ni; // number of entries in beginning
SCSIZE nInsert; // insert position (MAXROW+1 := no insert)
- BOOL bCombined = FALSE;
- BOOL bSplit = FALSE;
+ sal_Bool bCombined = false;
+ sal_Bool bSplit = false;
if ( nStartRow > 0 )
{
// skip beginning
@@ -166,7 +166,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
{ // may be a split or a simple insert or just a shrink,
// row adjustment is done further down
if ( pData[ni].nRow > nEndRow )
- bSplit = TRUE;
+ bSplit = sal_True;
ni++;
nInsert = ni;
}
@@ -177,7 +177,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
{ // combine
pData[ni-1].nRow = nEndRow;
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
}
else
@@ -204,7 +204,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
pData[ni-1].nRow = nStartRow - 1; // shrink
}
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
else if ( ni > 0 && ni == nInsert )
pData[ni-1].nRow = nStartRow - 1; // shrink
@@ -250,7 +250,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
}
}
-BOOL ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
{
SCSIZE nStartIndex;
SCSIZE nEndIndex;
@@ -259,21 +259,21 @@ BOOL ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
if (pData[nStartIndex].bMarked)
if (Search( nEndRow, nEndIndex ))
if (nEndIndex==nStartIndex)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
+sal_Bool ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if ( nCount == 1 )
{
if ( pData[0].bMarked )
{
rStartRow = 0;
rEndRow = MAXROW;
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( nCount == 2 )
@@ -288,7 +288,7 @@ BOOL ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
rStartRow = pData[0].nRow + 1;
rEndRow = MAXROW;
}
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( nCount == 3 )
{
@@ -296,7 +296,7 @@ BOOL ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
{
rStartRow = pData[0].nRow + 1;
rEndRow = pData[1].nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -317,10 +317,10 @@ void ScMarkArray::CopyMarksTo( ScMarkArray& rDestMarkArray ) const
rDestMarkArray.nCount = rDestMarkArray.nLimit = nCount;
}
-SCsROW ScMarkArray::GetNextMarked( SCsROW nRow, BOOL bUp ) const
+SCsROW ScMarkArray::GetNextMarked( SCsROW nRow, sal_Bool bUp ) const
{
if (!pData)
- const_cast<ScMarkArray*>(this)->Reset(FALSE); // create pData for further processing
+ const_cast<ScMarkArray*>(this)->Reset(false); // create pData for further processing
SCsROW nRet = nRow;
if (VALIDROW(nRow))
@@ -343,10 +343,10 @@ SCsROW ScMarkArray::GetNextMarked( SCsROW nRow, BOOL bUp ) const
return nRet;
}
-SCROW ScMarkArray::GetMarkEnd( SCROW nRow, BOOL bUp ) const
+SCROW ScMarkArray::GetMarkEnd( SCROW nRow, sal_Bool bUp ) const
{
if (!pData)
- const_cast<ScMarkArray*>(this)->Reset(FALSE); // create pData for further processing
+ const_cast<ScMarkArray*>(this)->Reset(false); // create pData for further processing
SCROW nRet;
SCSIZE nIndex;
@@ -379,15 +379,15 @@ ScMarkArrayIter::~ScMarkArrayIter()
{
}
-BOOL ScMarkArrayIter::Next( SCROW& rTop, SCROW& rBottom )
+sal_Bool ScMarkArrayIter::Next( SCROW& rTop, SCROW& rBottom )
{
if ( nPos >= pArray->nCount )
- return FALSE;
+ return false;
while (!pArray->pData[nPos].bMarked)
{
++nPos;
if ( nPos >= pArray->nCount )
- return FALSE;
+ return false;
}
rBottom = pArray->pData[nPos].nRow;
if (nPos==0)
@@ -395,7 +395,7 @@ BOOL ScMarkArrayIter::Next( SCROW& rTop, SCROW& rBottom )
else
rTop = pArray->pData[nPos-1].nRow + 1;
++nPos;
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index a85c13b6e27f..b5627a8d162a 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -47,7 +47,7 @@ ScMarkData::ScMarkData() :
pMultiSel( NULL )
{
for (SCTAB i=0; i<=MAXTAB; i++)
- bTabMarked[i] = FALSE;
+ bTabMarked[i] = false;
ResetMark();
}
@@ -111,8 +111,8 @@ void ScMarkData::ResetMark()
delete[] pMultiSel;
pMultiSel = NULL;
- bMarked = bMultiMarked = FALSE;
- bMarking = bMarkIsNeg = FALSE;
+ bMarked = bMultiMarked = false;
+ bMarking = bMarkIsNeg = false;
}
void ScMarkData::SetMarkArea( const ScRange& rRange )
@@ -125,8 +125,8 @@ void ScMarkData::SetMarkArea( const ScRange& rRange )
// may query (default) attributes although no sheet is marked yet.
// => mark that one.
if ( !GetSelectCount() )
- bTabMarked[ aMarkRange.aStart.Tab() ] = TRUE;
- bMarked = TRUE;
+ bTabMarked[ aMarkRange.aStart.Tab() ] = sal_True;
+ bMarked = sal_True;
}
}
@@ -140,7 +140,7 @@ void ScMarkData::GetMultiMarkArea( ScRange& rRange ) const
rRange = aMultiRange;
}
-void ScMarkData::SetMultiMarkArea( const ScRange& rRange, BOOL bMark )
+void ScMarkData::SetMultiMarkArea( const ScRange& rRange, sal_Bool bMark )
{
if (!pMultiSel)
{
@@ -149,8 +149,8 @@ void ScMarkData::SetMultiMarkArea( const ScRange& rRange, BOOL bMark )
// if simple mark range is set, copy to multi marks
if ( bMarked && !bMarkIsNeg )
{
- bMarked = FALSE;
- SetMultiMarkArea( aMarkRange, TRUE );
+ bMarked = false;
+ SetMultiMarkArea( aMarkRange, sal_True );
}
}
@@ -179,7 +179,7 @@ void ScMarkData::SetMultiMarkArea( const ScRange& rRange, BOOL bMark )
else
{
aMultiRange = rRange; // neu
- bMultiMarked = TRUE;
+ bMultiMarked = sal_True;
}
}
@@ -222,7 +222,7 @@ void ScMarkData::MarkToMulti()
if ( bMarked && !bMarking )
{
SetMultiMarkArea( aMarkRange, !bMarkIsNeg );
- bMarked = FALSE;
+ bMarked = false;
// check if all multi mark ranges have been removed
if ( bMarkIsNeg && !HasAnyMultiMarks() )
@@ -244,7 +244,7 @@ void ScMarkData::MarkToSimple()
ScRange aNew = aMultiRange;
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
SCCOL nStartCol = aNew.aStart.Col();
SCCOL nEndCol = aNew.aEnd.Col();
@@ -257,12 +257,12 @@ void ScMarkData::MarkToSimple()
SCROW nStartRow, nEndRow;
if ( pMultiSel[nStartCol].HasOneMark( nStartRow, nEndRow ) )
{
- bOk = TRUE;
+ bOk = sal_True;
SCROW nCmpStart, nCmpEnd;
for (SCCOL nCol=nStartCol+1; nCol<=nEndCol && bOk; nCol++)
if ( !pMultiSel[nCol].HasOneMark( nCmpStart, nCmpEnd )
|| nCmpStart != nStartRow || nCmpEnd != nEndRow )
- bOk = FALSE;
+ bOk = false;
}
if (bOk)
@@ -274,18 +274,18 @@ void ScMarkData::MarkToSimple()
ResetMark();
aMarkRange = aNew;
- bMarked = TRUE;
- bMarkIsNeg = FALSE;
+ bMarked = sal_True;
+ bMarkIsNeg = false;
}
}
}
-BOOL ScMarkData::IsCellMarked( SCCOL nCol, SCROW nRow, BOOL bNoSimple ) const
+sal_Bool ScMarkData::IsCellMarked( SCCOL nCol, SCROW nRow, sal_Bool bNoSimple ) const
{
if ( bMarked && !bNoSimple && !bMarkIsNeg )
if ( aMarkRange.aStart.Col() <= nCol && aMarkRange.aEnd.Col() >= nCol &&
aMarkRange.aStart.Row() <= nRow && aMarkRange.aEnd.Row() >= nRow )
- return TRUE;
+ return sal_True;
if (bMultiMarked)
{
@@ -295,10 +295,10 @@ BOOL ScMarkData::IsCellMarked( SCCOL nCol, SCROW nRow, BOOL bNoSimple ) const
return pMultiSel[nCol].GetMark( nRow );
}
- return FALSE;
+ return false;
}
-BOOL ScMarkData::IsColumnMarked( SCCOL nCol ) const
+sal_Bool ScMarkData::IsColumnMarked( SCCOL nCol ) const
{
// bMarkIsNeg inzwischen auch fuer Spaltenkoepfe
//! GetMarkColumnRanges fuer komplett markierte Spalten
@@ -306,15 +306,15 @@ BOOL ScMarkData::IsColumnMarked( SCCOL nCol ) const
if ( bMarked && !bMarkIsNeg &&
aMarkRange.aStart.Col() <= nCol && aMarkRange.aEnd.Col() >= nCol &&
aMarkRange.aStart.Row() == 0 && aMarkRange.aEnd.Row() == MAXROW )
- return TRUE;
+ return sal_True;
if ( bMultiMarked && pMultiSel[nCol].IsAllMarked(0,MAXROW) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScMarkData::IsRowMarked( SCROW nRow ) const
+sal_Bool ScMarkData::IsRowMarked( SCROW nRow ) const
{
// bMarkIsNeg inzwischen auch fuer Zeilenkoepfe
//! GetMarkRowRanges fuer komplett markierte Zeilen
@@ -322,26 +322,26 @@ BOOL ScMarkData::IsRowMarked( SCROW nRow ) const
if ( bMarked && !bMarkIsNeg &&
aMarkRange.aStart.Col() == 0 && aMarkRange.aEnd.Col() == MAXCOL &&
aMarkRange.aStart.Row() <= nRow && aMarkRange.aEnd.Row() >= nRow )
- return TRUE;
+ return sal_True;
if ( bMultiMarked )
{
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
for (SCCOL nCol=0; nCol<=MAXCOL; nCol++)
if (!pMultiSel[nCol].GetMark(nRow))
- return FALSE;
- return TRUE;
+ return false;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-void ScMarkData::MarkFromRangeList( const ScRangeList& rList, BOOL bReset )
+void ScMarkData::MarkFromRangeList( const ScRangeList& rList, sal_Bool bReset )
{
if (bReset)
{
for (SCTAB i=0; i<=MAXTAB; i++)
- bTabMarked[i] = FALSE; // Tabellen sind nicht in ResetMark
+ bTabMarked[i] = false; // Tabellen sind nicht in ResetMark
ResetMark();
}
@@ -350,20 +350,20 @@ void ScMarkData::MarkFromRangeList( const ScRangeList& rList, BOOL bReset )
{
ScRange aRange = *rList[ 0 ];
SetMarkArea( aRange );
- SelectTable( aRange.aStart.Tab(), TRUE );
+ SelectTable( aRange.aStart.Tab(), sal_True );
}
else
{
for (size_t i=0; i < nCount; i++)
{
ScRange aRange = *rList[ i ];
- SetMultiMarkArea( aRange, TRUE );
- SelectTable( aRange.aStart.Tab(), TRUE );
+ SetMultiMarkArea( aRange, true );
+ SelectTable( aRange.aStart.Tab(), true );
}
}
}
-void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, BOOL bClear ) const
+void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, sal_Bool bClear ) const
{
if (!pList)
return;
@@ -483,8 +483,8 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
const SCCOLROW nMultiStart = aMultiRange.aStart.Row();
const SCCOLROW nMultiEnd = aMultiRange.aEnd.Row();
- BOOL* bRowMarked = new BOOL[MAXROWCOUNT];
- memset( bRowMarked, 0, sizeof(BOOL) * MAXROWCOUNT);
+ sal_Bool* bRowMarked = new sal_Bool[MAXROWCOUNT];
+ memset( bRowMarked, 0, sizeof(sal_Bool) * MAXROWCOUNT);
SCROW nRow;
SCCOL nCol;
@@ -494,7 +494,7 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
ScMarkArrayIter aMarkIter( &pMultiSel[nCol] );
while (aMarkIter.Next( nTop, nBottom ))
for (nRow=nTop; nRow<=nBottom; nRow++)
- bRowMarked[nRow] = TRUE;
+ bRowMarked[nRow] = sal_True;
if (nTop == nMultiStart && nBottom == nMultiEnd)
break; // for, all relevant rows marked
}
@@ -535,10 +535,10 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
return nRangeCnt;
}
-BOOL ScMarkData::IsAllMarked( const ScRange& rRange ) const
+sal_Bool ScMarkData::IsAllMarked( const ScRange& rRange ) const
{
if ( !bMultiMarked )
- return FALSE;
+ return false;
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
@@ -546,15 +546,15 @@ BOOL ScMarkData::IsAllMarked( const ScRange& rRange ) const
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for (SCCOL nCol=nStartCol; nCol<=nEndCol && bOk; nCol++)
if ( !pMultiSel[nCol].IsAllMarked( nStartRow, nEndRow ) )
- bOk = FALSE;
+ bOk = false;
return bOk;
}
-SCsROW ScMarkData::GetNextMarked( SCCOL nCol, SCsROW nRow, BOOL bUp ) const
+SCsROW ScMarkData::GetNextMarked( SCCOL nCol, SCsROW nRow, sal_Bool bUp ) const
{
if ( !bMultiMarked )
return nRow;
@@ -564,42 +564,42 @@ SCsROW ScMarkData::GetNextMarked( SCCOL nCol, SCsROW nRow, BOOL bUp ) const
return pMultiSel[nCol].GetNextMarked( nRow, bUp );
}
-BOOL ScMarkData::HasMultiMarks( SCCOL nCol ) const
+sal_Bool ScMarkData::HasMultiMarks( SCCOL nCol ) const
{
if ( !bMultiMarked )
- return FALSE;
+ return false;
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
return pMultiSel[nCol].HasMarks();
}
-BOOL ScMarkData::HasAnyMultiMarks() const
+sal_Bool ScMarkData::HasAnyMultiMarks() const
{
if ( !bMultiMarked )
- return FALSE;
+ return false;
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
for (SCCOL nCol=0; nCol<=MAXCOL; nCol++)
if ( pMultiSel[nCol].HasMarks() )
- return TRUE;
+ return sal_True;
- return FALSE; // nix
+ return false; // nix
}
void ScMarkData::InsertTab( SCTAB nTab )
{
for (SCTAB i=MAXTAB; i>nTab; i--)
bTabMarked[i] = bTabMarked[i-1];
- bTabMarked[nTab] = FALSE;
+ bTabMarked[nTab] = false;
}
void ScMarkData::DeleteTab( SCTAB nTab )
{
for (SCTAB i=nTab; i<MAXTAB; i++)
bTabMarked[i] = bTabMarked[i+1];
- bTabMarked[MAXTAB] = FALSE;
+ bTabMarked[MAXTAB] = false;
}
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index 13cd05ce8d50..f4dc662f40b7 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -50,7 +50,7 @@ ScOutlineEntry::ScOutlineEntry( SCCOLROW nNewStart, SCCOLROW nNewSize, bool bNew
nStart ( nNewStart ),
nSize ( nNewSize ),
bHidden ( bNewHidden ),
- bVisible( TRUE )
+ bVisible( sal_True )
{
}
@@ -108,7 +108,7 @@ void ScOutlineEntry::SetVisible( bool bNewVisible )
//------------------------------------------------------------------------
ScOutlineCollection::ScOutlineCollection() :
- ScSortedCollection( 4,4,FALSE )
+ ScSortedCollection( 4,4,false )
{
}
@@ -125,13 +125,13 @@ short ScOutlineCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) con
((ScOutlineEntry*)pKey2)->GetStart() );
}
-USHORT ScOutlineCollection::FindStart( SCCOLROW nMinStart )
+sal_uInt16 ScOutlineCollection::FindStart( SCCOLROW nMinStart )
{
//! binaer suchen ?
- USHORT nPos = 0;
- USHORT nLocalCount = GetCount();
- while ( (nPos<nLocalCount) ? (((ScOutlineEntry*)At(nPos))->GetStart() < nMinStart) : FALSE )
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nLocalCount = GetCount();
+ while ( (nPos<nLocalCount) ? (((ScOutlineEntry*)At(nPos))->GetStart() < nMinStart) : false )
++nPos;
return nPos;
@@ -147,10 +147,10 @@ ScOutlineArray::ScOutlineArray() :
ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
nDepth( rArray.nDepth )
{
- for (USHORT nLevel=0; nLevel<nDepth; nLevel++)
+ for (sal_uInt16 nLevel=0; nLevel<nDepth; nLevel++)
{
- USHORT nCount = rArray.aCollections[nLevel].GetCount();
- for (USHORT nEntry=0; nEntry<nCount; nEntry++)
+ sal_uInt16 nCount = rArray.aCollections[nLevel].GetCount();
+ for (sal_uInt16 nEntry=0; nEntry<nCount; nEntry++)
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) rArray.aCollections[nLevel].At(nEntry);
aCollections[nLevel].Insert( new ScOutlineEntry( *pEntry ) );
@@ -158,19 +158,19 @@ ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
}
}
-void ScOutlineArray::FindEntry( SCCOLROW nSearchPos, USHORT& rFindLevel, USHORT& rFindIndex,
- USHORT nMaxLevel )
+void ScOutlineArray::FindEntry( SCCOLROW nSearchPos, sal_uInt16& rFindLevel, sal_uInt16& rFindIndex,
+ sal_uInt16 nMaxLevel )
{
rFindLevel = rFindIndex = 0;
if (nMaxLevel > nDepth)
nMaxLevel = nDepth;
- for (USHORT nLevel=0; nLevel<nMaxLevel; nLevel++) //! rueckwaerts suchen ?
+ for (sal_uInt16 nLevel=0; nLevel<nMaxLevel; nLevel++) //! rueckwaerts suchen ?
{
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pCollect->GetCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
if ( pEntry->GetStart() <= nSearchPos && pEntry->GetEnd() >= nSearchPos )
@@ -182,28 +182,28 @@ void ScOutlineArray::FindEntry( SCCOLROW nSearchPos, USHORT& rFindLevel, USHORT&
}
}
-BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeChanged,
- BOOL bHidden, BOOL bVisible )
+sal_Bool ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, sal_Bool& rSizeChanged,
+ sal_Bool bHidden, sal_Bool bVisible )
{
- rSizeChanged = FALSE;
+ rSizeChanged = false;
- USHORT nStartLevel;
- USHORT nStartIndex;
- USHORT nEndLevel;
- USHORT nEndIndex;
- BOOL bFound = FALSE;
+ sal_uInt16 nStartLevel;
+ sal_uInt16 nStartIndex;
+ sal_uInt16 nEndLevel;
+ sal_uInt16 nEndIndex;
+ sal_Bool bFound = false;
- BOOL bCont;
- USHORT nFindMax;
+ sal_Bool bCont;
+ sal_uInt16 nFindMax;
FindEntry( nStartCol, nStartLevel, nStartIndex ); // nLevel = neuer Level (alter+1) !!!
FindEntry( nEndCol, nEndLevel, nEndIndex );
nFindMax = Max(nStartLevel,nEndLevel);
do
{
- bCont = FALSE;
+ bCont = false;
if ( nStartLevel == nEndLevel && nStartIndex == nEndIndex && nStartLevel < SC_OL_MAXDEPTH )
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
{
@@ -218,25 +218,25 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh
if ( ((ScOutlineEntry*)aCollections[nEndLevel-1].At(nEndIndex))->
GetEnd() == nEndCol )
FindEntry( nEndCol, nEndLevel, nEndIndex, nFindMax );
- bCont = TRUE;
+ bCont = sal_True;
}
}
}
while ( !bFound && bCont );
if (!bFound)
- return FALSE;
+ return false;
- USHORT nLevel = nStartLevel;
+ sal_uInt16 nLevel = nStartLevel;
// untere verschieben
- BOOL bNeedSize = FALSE;
+ sal_Bool bNeedSize = false;
for ( short nMoveLevel = nDepth-1; nMoveLevel >= (short) nLevel; nMoveLevel-- )
{
- USHORT nCount = aCollections[nMoveLevel].GetCount();
- BOOL bMoved = FALSE;
- for ( USHORT i=0; i<nCount; i += bMoved ? 0 : 1 )
+ sal_uInt16 nCount = aCollections[nMoveLevel].GetCount();
+ sal_Bool bMoved = false;
+ for ( sal_uInt16 i=0; i<nCount; i += bMoved ? 0 : 1 )
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) aCollections[nMoveLevel].At(i);
SCCOLROW nEntryStart = pEntry->GetStart();
@@ -244,50 +244,50 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh
{
if (nMoveLevel >= SC_OL_MAXDEPTH - 1)
{
- rSizeChanged = FALSE; // kein Platz
- return FALSE;
+ rSizeChanged = false; // kein Platz
+ return false;
}
aCollections[nMoveLevel+1].Insert( new ScOutlineEntry( *pEntry ) );
aCollections[nMoveLevel].AtFree( i );
nCount = aCollections[nMoveLevel].GetCount();
- bMoved = TRUE;
+ bMoved = sal_True;
if (nMoveLevel == (short) nDepth - 1)
- bNeedSize = TRUE;
+ bNeedSize = sal_True;
}
else
- bMoved = FALSE;
+ bMoved = false;
}
}
if (bNeedSize)
{
++nDepth;
- rSizeChanged = TRUE;
+ rSizeChanged = sal_True;
}
if (nDepth <= nLevel)
{
nDepth = nLevel+1;
- rSizeChanged = TRUE;
+ rSizeChanged = sal_True;
}
ScOutlineEntry* pNewEntry = new ScOutlineEntry( nStartCol, nEndCol+1-nStartCol, bHidden );
pNewEntry->SetVisible( bVisible );
aCollections[nLevel].Insert( pNewEntry );
- return TRUE;
+ return sal_True;
}
-BOOL ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, USHORT& rFindLevel ) const
+sal_Bool ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, sal_uInt16& rFindLevel ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
rFindLevel = 0;
- for (USHORT nLevel=0; nLevel<nDepth; nLevel++)
+ for (sal_uInt16 nLevel=0; nLevel<nDepth; nLevel++)
{
const ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pCollect->GetCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
@@ -297,7 +297,7 @@ BOOL ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd,
( nBlockEnd >=nStart && nBlockEnd <=nEnd ) )
{
rFindLevel = nLevel; // wirklicher Level
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -305,16 +305,16 @@ BOOL ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd,
return bFound;
}
-void ScOutlineArray::RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nLevel )
+void ScOutlineArray::RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, sal_uInt16 nLevel )
{
if ( nLevel >= nDepth )
return;
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- BOOL bFound = FALSE;
- for ( USHORT i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
+ sal_uInt16 nCount = pCollect->GetCount();
+ sal_Bool bFound = false;
+ for ( sal_uInt16 i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
{
- bFound = FALSE;
+ bFound = false;
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -324,12 +324,12 @@ void ScOutlineArray::RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nLe
RemoveSub( nStart, nEnd, nLevel+1 );
pCollect->AtFree(i);
nCount = pCollect->GetCount();
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
-void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nStartLevel )
+void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, sal_uInt16 nStartLevel )
{
if (nStartLevel==0)
{
@@ -337,14 +337,14 @@ void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nS
return;
}
- for (USHORT nLevel = nStartLevel; nLevel < nDepth; nLevel++)
+ for (sal_uInt16 nLevel = nStartLevel; nLevel < nDepth; nLevel++)
{
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- BOOL bFound = FALSE;
- for ( USHORT i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
+ sal_uInt16 nCount = pCollect->GetCount();
+ sal_Bool bFound = false;
+ for ( sal_uInt16 i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
{
- bFound = FALSE;
+ bFound = false;
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -354,43 +354,43 @@ void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nS
aCollections[nLevel-1].Insert( new ScOutlineEntry( *pEntry ) );
pCollect->AtFree(i);
nCount = pCollect->GetCount();
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
}
-BOOL ScOutlineArray::DecDepth() // nDepth auf leere Levels anpassen
+sal_Bool ScOutlineArray::DecDepth() // nDepth auf leere Levels anpassen
{
- BOOL bChanged = FALSE;
- BOOL bCont;
+ sal_Bool bChanged = false;
+ sal_Bool bCont;
do
{
- bCont = FALSE;
+ bCont = false;
if (nDepth)
if (aCollections[nDepth-1].GetCount() == 0)
{
--nDepth;
- bChanged = TRUE;
- bCont = TRUE;
+ bChanged = sal_True;
+ bCont = sal_True;
}
}
while (bCont);
return bChanged;
}
-BOOL ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, BOOL& rSizeChanged )
+sal_Bool ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, sal_Bool& rSizeChanged )
{
- USHORT nLevel;
+ sal_uInt16 nLevel;
FindTouchedLevel( nBlockStart, nBlockEnd, nLevel );
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- BOOL bFound = FALSE;
- BOOL bAny = FALSE;
- for ( USHORT i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
+ sal_uInt16 nCount = pCollect->GetCount();
+ sal_Bool bFound = false;
+ sal_Bool bAny = false;
+ for ( sal_uInt16 i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
{
- bFound = FALSE;
+ bFound = false;
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -401,34 +401,34 @@ BOOL ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, BOOL& rSi
PromoteSub( nStart, nEnd, nLevel+1 );
nCount = pCollect->GetCount();
i = pCollect->FindStart( nEnd+1 );
- bFound = TRUE;
- bAny = TRUE;
+ bFound = sal_True;
+ bAny = sal_True;
}
}
if (bAny) // Depth anpassen
if (DecDepth())
- rSizeChanged = TRUE;
+ rSizeChanged = sal_True;
return bAny;
}
-ScOutlineEntry* ScOutlineArray::GetEntry( USHORT nLevel, USHORT nIndex ) const
+ScOutlineEntry* ScOutlineArray::GetEntry( sal_uInt16 nLevel, sal_uInt16 nIndex ) const
{
return (ScOutlineEntry*)((nLevel < nDepth) ? aCollections[nLevel].At(nIndex) : NULL);
}
-USHORT ScOutlineArray::GetCount( USHORT nLevel ) const
+sal_uInt16 ScOutlineArray::GetCount( sal_uInt16 nLevel ) const
{
return (nLevel < nDepth) ? aCollections[nLevel].GetCount() : 0;
}
-ScOutlineEntry* ScOutlineArray::GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) const
+ScOutlineEntry* ScOutlineArray::GetEntryByPos( sal_uInt16 nLevel, SCCOLROW nPos ) const
{
- USHORT nCount = GetCount( nLevel );
+ sal_uInt16 nCount = GetCount( nLevel );
ScOutlineEntry* pEntry;
- for (USHORT nIndex = 0; nIndex < nCount; nIndex++)
+ for (sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++)
{
pEntry = GetEntry( nLevel, nIndex );
if ((pEntry->GetStart() <= nPos) && (nPos <= pEntry->GetEnd()))
@@ -437,34 +437,34 @@ ScOutlineEntry* ScOutlineArray::GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) co
return NULL;
}
-BOOL ScOutlineArray::GetEntryIndex( USHORT nLevel, SCCOLROW nPos, USHORT& rnIndex ) const
+sal_Bool ScOutlineArray::GetEntryIndex( sal_uInt16 nLevel, SCCOLROW nPos, sal_uInt16& rnIndex ) const
{
// found entry contains passed position
- USHORT nCount = GetCount( nLevel );
+ sal_uInt16 nCount = GetCount( nLevel );
for ( rnIndex = 0; rnIndex < nCount; ++rnIndex )
{
const ScOutlineEntry* pEntry = GetEntry( nLevel, rnIndex );
if ( (pEntry->GetStart() <= nPos) && (nPos <= pEntry->GetEnd()) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScOutlineArray::GetEntryIndexInRange(
- USHORT nLevel, SCCOLROW nBlockStart, SCCOLROW nBlockEnd, USHORT& rnIndex ) const
+sal_Bool ScOutlineArray::GetEntryIndexInRange(
+ sal_uInt16 nLevel, SCCOLROW nBlockStart, SCCOLROW nBlockEnd, sal_uInt16& rnIndex ) const
{
// found entry will be completely inside of passed range
- USHORT nCount = GetCount( nLevel );
+ sal_uInt16 nCount = GetCount( nLevel );
for ( rnIndex = 0; rnIndex < nCount; ++rnIndex )
{
const ScOutlineEntry* pEntry = GetEntry( nLevel, rnIndex );
if ( (nBlockStart <= pEntry->GetStart()) && (pEntry->GetEnd() <= nBlockEnd) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue, BOOL bSkipHidden )
+void ScOutlineArray::SetVisibleBelow( sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bValue, sal_Bool bSkipHidden )
{
ScOutlineEntry* pEntry = GetEntry( nLevel, nEntry );
if( pEntry )
@@ -472,9 +472,9 @@ void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue,
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
- for (USHORT nSubLevel=nLevel+1; nSubLevel<nDepth; nSubLevel++)
+ for (sal_uInt16 nSubLevel=nLevel+1; nSubLevel<nDepth; nSubLevel++)
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
pEntry = (ScOutlineEntry*) aCollections[nSubLevel].At(i);
while (pEntry)
{
@@ -484,7 +484,7 @@ void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue,
if (bSkipHidden)
if (!pEntry->IsHidden())
- SetVisibleBelow( nSubLevel, i, bValue, TRUE );
+ SetVisibleBelow( nSubLevel, i, bValue, sal_True );
}
++i;
@@ -499,7 +499,7 @@ void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue,
void ScOutlineArray::GetRange( SCCOLROW& rStart, SCCOLROW& rEnd ) const
{
- USHORT nCount = aCollections[0].GetCount();
+ sal_uInt16 nCount = aCollections[0].GetCount();
if (nCount)
{
rStart = ((ScOutlineEntry*) aCollections[0].At(0))->GetStart();
@@ -509,12 +509,12 @@ void ScOutlineArray::GetRange( SCCOLROW& rStart, SCCOLROW& rEnd ) const
rStart = rEnd = 0;
}
-void ScOutlineArray::ExtendBlock( USHORT nLevel, SCCOLROW& rBlkStart, SCCOLROW& rBlkEnd )
+void ScOutlineArray::ExtendBlock( sal_uInt16 nLevel, SCCOLROW& rBlkStart, SCCOLROW& rBlkEnd )
{
- USHORT nCount;
+ sal_uInt16 nCount;
SCCOLROW nStart;
SCCOLROW nEnd;
- USHORT i;
+ sal_uInt16 i;
ScOutlineEntry* pEntry;
nCount = GetCount(nLevel);
@@ -532,16 +532,16 @@ void ScOutlineArray::ExtendBlock( USHORT nLevel, SCCOLROW& rBlkStart, SCCOLROW&
}
}
-BOOL ScOutlineArray::TestInsertSpace( SCSIZE nSize, SCCOLROW nMaxVal ) const
+sal_Bool ScOutlineArray::TestInsertSpace( SCSIZE nSize, SCCOLROW nMaxVal ) const
{
- USHORT nCount = aCollections[0].GetCount();
+ sal_uInt16 nCount = aCollections[0].GetCount();
if (nCount)
{
SCCOLROW nEnd = ((ScOutlineEntry*) aCollections[0].At(nCount-1))->GetEnd();
return ( sal::static_int_cast<SCCOLROW>(nEnd+nSize) <= nMaxVal );
}
- return TRUE;
+ return sal_True;
}
void ScOutlineArray::InsertSpace( SCCOLROW nStartPos, SCSIZE nSize )
@@ -567,11 +567,11 @@ void ScOutlineArray::InsertSpace( SCCOLROW nStartPos, SCSIZE nSize )
}
}
-BOOL ScOutlineArray::DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize )
+sal_Bool ScOutlineArray::DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize )
{
SCCOLROW nEndPos = nStartPos + nSize - 1;
- BOOL bNeedSave = FALSE; // Original fuer Undo benoetigt?
- BOOL bChanged = FALSE; // fuer Test auf Level
+ sal_Bool bNeedSave = false; // Original fuer Undo benoetigt?
+ sal_Bool bChanged = false; // fuer Test auf Level
ScSubOutlineIterator aIter( this );
ScOutlineEntry* pEntry;
@@ -589,11 +589,11 @@ BOOL ScOutlineArray::DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize )
pEntry->SetSize( nEntrySize-nSize );
else
{
- bNeedSave = TRUE;
+ bNeedSave = sal_True;
if ( nEntryStart >= nStartPos && nEntryEnd <= nEndPos ) // innen
{
aIter.DeleteLast();
- bChanged = TRUE;
+ bChanged = sal_True;
}
else if ( nEntryStart >= nStartPos ) // rechts ueber
pEntry->SetPosSize( nStartPos, static_cast<SCSIZE>(nEntryEnd-nEndPos) );
@@ -644,7 +644,7 @@ bool ScOutlineArray::ManualAction( SCCOLROW nStartPos, SCCOLROW nEndPos, bool bS
void ScOutlineArray::RemoveAll()
{
- for (USHORT nLevel=0; nLevel<nDepth; nLevel++)
+ for (sal_uInt16 nLevel=0; nLevel<nDepth; nLevel++)
aCollections[nLevel].FreeAll();
nDepth = 0;
@@ -662,7 +662,7 @@ ScOutlineTable::ScOutlineTable( const ScOutlineTable& rOutline ) :
{
}
-BOOL ScOutlineTable::TestInsertCol( SCSIZE nSize )
+sal_Bool ScOutlineTable::TestInsertCol( SCSIZE nSize )
{
return aColOutline.TestInsertSpace( nSize, MAXCOL );
}
@@ -672,12 +672,12 @@ void ScOutlineTable::InsertCol( SCCOL nStartCol, SCSIZE nSize )
aColOutline.InsertSpace( nStartCol, nSize );
}
-BOOL ScOutlineTable::DeleteCol( SCCOL nStartCol, SCSIZE nSize )
+sal_Bool ScOutlineTable::DeleteCol( SCCOL nStartCol, SCSIZE nSize )
{
return aColOutline.DeleteSpace( nStartCol, nSize );
}
-BOOL ScOutlineTable::TestInsertRow( SCSIZE nSize )
+sal_Bool ScOutlineTable::TestInsertRow( SCSIZE nSize )
{
return aRowOutline.TestInsertSpace( nSize, MAXROW );
}
@@ -687,7 +687,7 @@ void ScOutlineTable::InsertRow( SCROW nStartRow, SCSIZE nSize )
aRowOutline.InsertSpace( nStartRow, nSize );
}
-BOOL ScOutlineTable::DeleteRow( SCROW nStartRow, SCSIZE nSize )
+sal_Bool ScOutlineTable::DeleteRow( SCROW nStartRow, SCSIZE nSize )
{
return aRowOutline.DeleteSpace( nStartRow, nSize );
}
@@ -705,7 +705,7 @@ ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray ) :
}
ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray,
- USHORT nLevel, USHORT nEntry ) :
+ sal_uInt16 nLevel, sal_uInt16 nEntry ) :
pArray( pOutlineArray )
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) pArray->aCollections[nLevel].At(nEntry);
@@ -719,7 +719,7 @@ ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray,
ScOutlineEntry* ScSubOutlineIterator::GetNext()
{
ScOutlineEntry* pEntry;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
do
{
if (nSubLevel >= nDepth)
@@ -734,7 +734,7 @@ ScOutlineEntry* ScSubOutlineIterator::GetNext()
else
{
if ( pEntry->GetStart() >= nStart && pEntry->GetEnd() <= nEnd )
- bFound = TRUE;
+ bFound = sal_True;
++nSubEntry;
}
}
@@ -742,12 +742,12 @@ ScOutlineEntry* ScSubOutlineIterator::GetNext()
return pEntry; // nSubLevel gueltig, wenn pEntry != 0
}
-USHORT ScSubOutlineIterator::LastLevel() const
+sal_uInt16 ScSubOutlineIterator::LastLevel() const
{
return nSubLevel;
}
-USHORT ScSubOutlineIterator::LastEntry() const
+sal_uInt16 ScSubOutlineIterator::LastEntry() const
{
if (nSubEntry == 0)
{
diff --git a/sc/source/core/data/pagepar.cxx b/sc/source/core/data/pagepar.cxx
index 03ca4060d49b..bbaac42b6292 100644
--- a/sc/source/core/data/pagepar.cxx
+++ b/sc/source/core/data/pagepar.cxx
@@ -58,11 +58,11 @@ ScPageTableParam::~ScPageTableParam()
void ScPageTableParam::Reset()
{
- bCellContent = TRUE;
+ bCellContent = sal_True;
bNotes=bGrid=bHeaders=bDrawings=
bLeftRight=bScaleAll=bScaleTo=bScalePageNum=
- bFormulas=bNullVals=bSkipEmpty = FALSE;
- bTopDown=bScaleNone=bCharts=bObjects = TRUE;
+ bFormulas=bNullVals=bSkipEmpty = false;
+ bTopDown=bScaleNone=bCharts=bObjects = sal_True;
nScaleAll = 100;
nScalePageNum = nScaleWidth = nScaleHeight = 0;
nFirstPageNo = 1;
@@ -70,7 +70,7 @@ void ScPageTableParam::Reset()
//------------------------------------------------------------------------
-BOOL ScPageTableParam::operator==( const ScPageTableParam& r ) const
+sal_Bool ScPageTableParam::operator==( const ScPageTableParam& r ) const
{
return ( memcmp( this, &r, sizeof(ScPageTableParam) ) == 0 );
}
@@ -93,7 +93,7 @@ ScPageAreaParam::~ScPageAreaParam()
void ScPageAreaParam::Reset()
{
- bPrintArea = bRepeatRow = bRepeatCol = FALSE;
+ bPrintArea = bRepeatRow = bRepeatCol = false;
memset( &aPrintArea, 0, sizeof(ScRange) );
memset( &aRepeatRow, 0, sizeof(ScRange) );
@@ -102,9 +102,9 @@ void ScPageAreaParam::Reset()
//------------------------------------------------------------------------
-BOOL ScPageAreaParam::operator==( const ScPageAreaParam& r ) const
+sal_Bool ScPageAreaParam::operator==( const ScPageAreaParam& r ) const
{
- BOOL bEqual =
+ sal_Bool bEqual =
bPrintArea == r.bPrintArea
&& bRepeatRow == r.bRepeatRow
&& bRepeatCol == r.bRepeatCol;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index adfedf20fb66..1c58a1644af7 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -128,7 +128,7 @@ ScPatternAttr::~ScPatternAttr()
SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const
{
- ScPatternAttr* pPattern = new ScPatternAttr( GetItemSet().Clone(TRUE, pPool) );
+ ScPatternAttr* pPattern = new ScPatternAttr( GetItemSet().Clone(sal_True, pPool) );
pPattern->pStyle = pStyle;
pPattern->pName = pName ? new String(*pName) : NULL;
@@ -138,7 +138,7 @@ SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const
inline int StrCmp( const String* pStr1, const String* pStr2 )
{
- return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : FALSE ) : ( pStr2 ? FALSE : TRUE ) );
+ return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : false ) : ( pStr2 ? false : sal_True ) );
}
inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 )
@@ -164,10 +164,10 @@ int ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const
StrCmp( GetStyleName(), static_cast<const ScPatternAttr&>(rCmp).GetStyleName() ) );
}
-SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, USHORT /* nVersion */ ) const
+SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */ ) const
{
String* pStr;
- BOOL bHasStyle;
+ sal_Bool bHasStyle;
rStream >> bHasStyle;
@@ -192,9 +192,9 @@ SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, USHORT /* nVersion */ ) c
return pPattern;
}
-SvStream& ScPatternAttr::Store(SvStream& rStream, USHORT /* nItemVersion */) const
+SvStream& ScPatternAttr::Store(SvStream& rStream, sal_uInt16 /* nItemVersion */) const
{
- rStream << (BOOL)TRUE;
+ rStream << (sal_Bool)sal_True;
if ( pStyle )
rStream.WriteByteString( pStyle->GetName(), rStream.GetStreamCharSet() );
@@ -221,7 +221,7 @@ SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet& rItemSet
}
else
{
- INT32 nAngle = ((const SfxInt32Item&)GetItem( ATTR_ROTATE_VALUE, rItemSet, pCondSet )).GetValue();
+ sal_Int32 nAngle = ((const SfxInt32Item&)GetItem( ATTR_ROTATE_VALUE, rItemSet, pCondSet )).GetValue();
if( nAngle == 9000 )
eOrient = SVX_ORIENTATION_BOTTOMTOP;
else if( nAngle == 27000 )
@@ -239,27 +239,27 @@ SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet* pCondSet
void ScPatternAttr::GetFont(
Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode,
OutputDevice* pOutDev, const Fraction* pScale,
- const SfxItemSet* pCondSet, BYTE nScript,
+ const SfxItemSet* pCondSet, sal_uInt8 nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor )
{
// Items auslesen
const SvxFontItem* pFontAttr;
- UINT32 nFontHeight;
+ sal_uInt32 nFontHeight;
FontWeight eWeight;
FontItalic eItalic;
FontUnderline eUnder;
FontUnderline eOver;
- BOOL bWordLine;
+ sal_Bool bWordLine;
FontStrikeout eStrike;
- BOOL bOutline;
- BOOL bShadow;
+ sal_Bool bOutline;
+ sal_Bool bShadow;
FontEmphasisMark eEmphasis;
FontRelief eRelief;
Color aColor;
LanguageType eLang;
- USHORT nFontId, nHeightId, nWeightId, nPostureId, nLangId;
+ sal_uInt16 nFontId, nHeightId, nWeightId, nPostureId, nLangId;
if ( nScript == SCRIPTTYPE_ASIAN )
{
nFontId = ATTR_CJK_FONT;
@@ -289,59 +289,59 @@ void ScPatternAttr::GetFont(
{
const SfxPoolItem* pItem;
- if ( pCondSet->GetItemState( nFontId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nFontId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nFontId );
pFontAttr = (const SvxFontItem*) pItem;
- if ( pCondSet->GetItemState( nHeightId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nHeightId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nHeightId );
nFontHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( nWeightId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nWeightId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nWeightId );
eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( nPostureId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nPostureId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nPostureId );
eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE );
eUnder = (FontUnderline)((const SvxUnderlineItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_OVERLINE );
eOver = (FontUnderline)((const SvxOverlineItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_WORDLINE );
bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_CROSSEDOUT );
eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_CONTOUR );
bOutline = ((const SvxContourItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_SHADOWED );
bShadow = ((const SvxShadowedItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_EMPHASISMARK );
eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark();
- if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_RELIEF );
eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_COLOR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_COLOR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_COLOR );
aColor = ((const SvxColorItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( nLangId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nLangId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nLangId );
eLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
}
@@ -434,7 +434,7 @@ void ScPatternAttr::GetFont(
if ( pCondSet )
{
const SfxPoolItem* pItem;
- if ( pCondSet->GetItemState( ATTR_BACKGROUND, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BACKGROUND, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_BACKGROUND );
aBackColor = ((const SvxBrushItem*)pItem)->GetColor();
}
@@ -499,13 +499,13 @@ void ScPatternAttr::GetFont(
rFont.SetEmphasisMark( eEmphasis );
rFont.SetRelief( eRelief );
rFont.SetColor( aColor );
- rFont.SetTransparent( TRUE );
+ rFont.SetTransparent( sal_True );
}
void ScPatternAttr::GetFont(
Font& rFont, ScAutoFontColorMode eAutoMode,
OutputDevice* pOutDev, const Fraction* pScale,
- const SfxItemSet* pCondSet, BYTE nScript,
+ const SfxItemSet* pCondSet, sal_uInt8 nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor ) const
{
GetFont( rFont, GetItemSet(), eAutoMode, pOutDev, pScale, pCondSet, nScript, pBackConfigColor, pTextConfigColor );
@@ -524,16 +524,16 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
FontWeight eWeight, eCjkWeight, eCtlWeight;
SvxUnderlineItem aUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE);
SvxOverlineItem aOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE);
- BOOL bWordLine;
+ sal_Bool bWordLine;
FontStrikeout eStrike;
FontItalic eItalic, eCjkItalic, eCtlItalic;
- BOOL bOutline;
- BOOL bShadow;
- BOOL bForbidden;
+ sal_Bool bOutline;
+ sal_Bool bShadow;
+ sal_Bool bForbidden;
FontEmphasisMark eEmphasis;
FontRelief eRelief;
LanguageType eLang, eCjkLang, eCtlLang;
- BOOL bHyphenate;
+ sal_Bool bHyphenate;
SvxFrameDirection eDirection;
//! additional parameter to control if language is needed?
@@ -542,100 +542,100 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
{
const SfxPoolItem* pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_COLOR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_COLOR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_COLOR );
aColorItem = *(const SvxColorItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT );
aFontItem = *(const SvxFontItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_CJK_FONT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT );
aCjkFontItem = *(const SvxFontItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_CTL_FONT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT );
aCtlFontItem = *(const SvxFontItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_HEIGHT );
nTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_HEIGHT );
nCjkTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_HEIGHT );
nCtlTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_WEIGHT );
eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_WEIGHT );
eCjkWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_WEIGHT );
eCtlWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_POSTURE );
eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_POSTURE );
eCjkItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_POSTURE );
eCtlItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_UNDERLINE );
aUnderlineItem = *(const SvxUnderlineItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_OVERLINE );
aOverlineItem = *(const SvxOverlineItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_WORDLINE );
bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_CROSSEDOUT );
eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_CONTOUR );
bOutline = ((const SvxContourItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_SHADOWED );
bShadow = ((const SvxShadowedItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FORBIDDEN_RULES );
bForbidden = ((const SvxForbiddenRuleItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_EMPHASISMARK );
eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark();
- if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_RELIEF );
eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_LANGUAGE );
eLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_LANGUAGE );
eCjkLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_LANGUAGE );
eCtlLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
- if ( pCondSet->GetItemState( ATTR_HYPHENATE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_HYPHENATE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_HYPHENATE );
bHyphenate = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_WRITINGDIR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_WRITINGDIR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_WRITINGDIR );
eDirection = (SvxFrameDirection)((const SvxFrameDirectionItem*)pItem)->GetValue();
}
@@ -742,7 +742,7 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
// (don't evaluate attributes that can't be changed).
// If a locale-dependent default is needed, it has to go into the cell
// style, like the fonts.
- rEditSet.Put( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) );
+ rEditSet.Put( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
}
void ScPatternAttr::FillEditItemSet( SfxItemSet* pEditSet, const SfxItemSet* pCondSet ) const
@@ -756,80 +756,80 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet&
{
const SfxPoolItem* pItem;
- if (rEditSet.GetItemState(EE_CHAR_COLOR,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_COLOR,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxColorItem(ATTR_FONT_COLOR) = *(const SvxColorItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTINFO,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTINFO,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontItem(ATTR_FONT) = *(const SvxFontItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontItem(ATTR_CJK_FONT) = *(const SvxFontItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontItem(ATTR_CTL_FONT) = *(const SvxFontItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
100, ATTR_FONT_HEIGHT ) );
- if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
100, ATTR_CJK_FONT_HEIGHT ) );
- if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
100, ATTR_CTL_FONT_HEIGHT ) );
- if (rEditSet.GetItemState(EE_CHAR_WEIGHT,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WEIGHT,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
ATTR_FONT_WEIGHT) );
- if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
ATTR_CJK_FONT_WEIGHT) );
- if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
ATTR_CTL_FONT_WEIGHT) );
// SvxTextLineItem contains enum and color
- if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxUnderlineItem(UNDERLINE_NONE,ATTR_FONT_UNDERLINE) = *(const SvxUnderlineItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_OVERLINE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_OVERLINE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxOverlineItem(UNDERLINE_NONE,ATTR_FONT_OVERLINE) = *(const SvxOverlineItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_WLM,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WLM,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWordLineModeItem( ((const SvxWordLineModeItem*)pItem)->GetValue(),
ATTR_FONT_WORDLINE) );
- if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxCrossedOutItem( (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue(),
ATTR_FONT_CROSSEDOUT) );
- if (rEditSet.GetItemState(EE_CHAR_ITALIC,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_ITALIC,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
ATTR_FONT_POSTURE) );
- if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
ATTR_CJK_FONT_POSTURE) );
- if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
ATTR_CTL_FONT_POSTURE) );
- if (rEditSet.GetItemState(EE_CHAR_OUTLINE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_OUTLINE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxContourItem( ((const SvxContourItem*)pItem)->GetValue(),
ATTR_FONT_CONTOUR) );
- if (rEditSet.GetItemState(EE_CHAR_SHADOW,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_SHADOW,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxShadowedItem( ((const SvxShadowedItem*)pItem)->GetValue(),
ATTR_FONT_SHADOWED) );
- if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxEmphasisMarkItem( ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark(),
ATTR_FONT_EMPHASISMARK) );
- if (rEditSet.GetItemState(EE_CHAR_RELIEF,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_RELIEF,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxCharReliefItem( (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue(),
ATTR_FONT_RELIEF) );
- if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_FONT_LANGUAGE) );
- if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CJK_FONT_LANGUAGE) );
- if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CTL_FONT_LANGUAGE) );
- if (rEditSet.GetItemState(EE_PARA_JUST,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_PARA_JUST,sal_True,&pItem) == SFX_ITEM_SET)
{
SvxCellHorJustify eVal;
switch ( ((const SvxAdjustItem*)pItem)->GetAdjust() )
@@ -898,12 +898,12 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
const SfxPoolItem* pThisItem;
const SfxPoolItem* pOldItem;
- for ( USHORT nSubWhich=ATTR_PATTERN_START; nSubWhich<=ATTR_PATTERN_END; nSubWhich++ )
+ for ( sal_uInt16 nSubWhich=ATTR_PATTERN_START; nSubWhich<=ATTR_PATTERN_END; nSubWhich++ )
{
// only items that are set are interesting
- if ( rThisSet.GetItemState( nSubWhich, FALSE, &pThisItem ) == SFX_ITEM_SET )
+ if ( rThisSet.GetItemState( nSubWhich, false, &pThisItem ) == SFX_ITEM_SET )
{
- SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, TRUE, &pOldItem );
+ SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, sal_True, &pOldItem );
if ( eOldState == SFX_ITEM_SET )
{
// item is set in OldAttrs (or its parent) -> compare pointers
@@ -920,19 +920,19 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
}
}
-BOOL ScPatternAttr::HasItemsSet( const USHORT* pWhich ) const
+sal_Bool ScPatternAttr::HasItemsSet( const sal_uInt16* pWhich ) const
{
const SfxItemSet& rSet = GetItemSet();
- for (USHORT i=0; pWhich[i]; i++)
- if ( rSet.GetItemState( pWhich[i], FALSE ) == SFX_ITEM_SET )
- return TRUE;
- return FALSE;
+ for (sal_uInt16 i=0; pWhich[i]; i++)
+ if ( rSet.GetItemState( pWhich[i], false ) == SFX_ITEM_SET )
+ return sal_True;
+ return false;
}
-void ScPatternAttr::ClearItems( const USHORT* pWhich )
+void ScPatternAttr::ClearItems( const sal_uInt16* pWhich )
{
SfxItemSet& rSet = GetItemSet();
- for (USHORT i=0; pWhich[i]; i++)
+ for (sal_uInt16 i=0; pWhich[i]; i++)
rSet.ClearItem(pWhich[i]);
}
@@ -970,9 +970,9 @@ SfxStyleSheetBase* lcl_CopyStyleToPool
const SfxPoolItem* pSrcItem;
if ( pFormatExchangeList &&
- rSrcSet.GetItemState( ATTR_VALUE_FORMAT, FALSE, &pSrcItem ) == SFX_ITEM_SET )
+ rSrcSet.GetItemState( ATTR_VALUE_FORMAT, false, &pSrcItem ) == SFX_ITEM_SET )
{
- ULONG nOldFormat = static_cast<const SfxUInt32Item*>(pSrcItem)->GetValue();
+ sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pSrcItem)->GetValue();
sal_uInt32* pNewFormat = static_cast<sal_uInt32*>(pFormatExchangeList->Get( nOldFormat ));
if (pNewFormat)
rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, *pNewFormat ) );
@@ -1018,10 +1018,10 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
pDestPattern->SetStyleSheet( (ScStyleSheet*)pStyleCpy );
}
- for ( USHORT nAttrId = ATTR_PATTERN_START; nAttrId <= ATTR_PATTERN_END; nAttrId++ )
+ for ( sal_uInt16 nAttrId = ATTR_PATTERN_START; nAttrId <= ATTR_PATTERN_END; nAttrId++ )
{
const SfxPoolItem* pSrcItem;
- SfxItemState eItemState = pSrcSet->GetItemState( nAttrId, FALSE, &pSrcItem );
+ SfxItemState eItemState = pSrcSet->GetItemState( nAttrId, false, &pSrcItem );
if (eItemState==SFX_ITEM_ON)
{
SfxPoolItem* pNewItem = NULL;
@@ -1030,11 +1030,11 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
{
// Bedingte Formate ins neue Dokument kopieren
- ULONG nNewIndex = 0;
+ sal_uLong nNewIndex = 0;
ScConditionalFormatList* pSrcList = pSrcDoc->GetCondFormList();
if ( pSrcList )
{
- ULONG nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
+ sal_uLong nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
const ScConditionalFormat* pOldData = pSrcList->GetFormat( nOldIndex );
if ( pOldData )
{
@@ -1046,8 +1046,8 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
ScStyleSheetPool* pSrcSPool = pSrcDoc->GetStyleSheetPool();
ScStyleSheetPool* pDestSPool = pDestDoc->GetStyleSheetPool();
const SvNumberFormatterIndexTable* pFormatExchangeList = pDestDoc->GetFormatExchangeList();
- USHORT nStlCnt = pOldData->Count();
- for (USHORT i=0; i<nStlCnt; i++)
+ sal_uInt16 nStlCnt = pOldData->Count();
+ for (sal_uInt16 i=0; i<nStlCnt; i++)
{
String aName = pOldData->GetEntry(i)->GetStyle();
SfxStyleSheetBase* pSrcStl =
@@ -1062,11 +1062,11 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
{
// Gueltigkeit ins neue Dokument kopieren
- ULONG nNewIndex = 0;
+ sal_uLong nNewIndex = 0;
ScValidationDataList* pSrcList = pSrcDoc->GetValidationList();
if ( pSrcList )
{
- ULONG nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
+ sal_uLong nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
const ScValidationData* pOldData = pSrcList->GetData( nOldIndex );
if ( pOldData )
nNewIndex = pDestDoc->AddValidationEntry( *pOldData );
@@ -1077,10 +1077,10 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
{
// Zahlformate nach Exchange-Liste
- ULONG nOldFormat = ((const SfxUInt32Item*)pSrcItem)->GetValue();
+ sal_uLong nOldFormat = ((const SfxUInt32Item*)pSrcItem)->GetValue();
sal_uInt32* pNewFormat = static_cast<sal_uInt32*>(pDestDoc->GetFormatExchangeList()->Get(nOldFormat));
if (pNewFormat)
- pNewItem = new SfxUInt32Item( ATTR_VALUE_FORMAT, (UINT32) (*pNewFormat) );
+ pNewItem = new SfxUInt32Item( ATTR_VALUE_FORMAT, (sal_uInt32) (*pNewFormat) );
}
if ( pNewItem )
@@ -1099,53 +1099,53 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
return pPatternAttr;
}
-BOOL ScPatternAttr::IsVisible() const
+sal_Bool ScPatternAttr::IsVisible() const
{
const SfxItemSet& rSet = GetItemSet();
const SfxPoolItem* pItem;
SfxItemState eState;
- eState = rSet.GetItemState( ATTR_BACKGROUND, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BACKGROUND, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if ( ((const SvxBrushItem*)pItem)->GetColor().GetColor() != COL_TRANSPARENT )
- return TRUE;
+ return sal_True;
- eState = rSet.GetItemState( ATTR_BORDER, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BORDER, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
{
const SvxBoxItem* pBoxItem = (SvxBoxItem*) pItem;
if ( pBoxItem->GetTop() || pBoxItem->GetBottom() ||
pBoxItem->GetLeft() || pBoxItem->GetRight() )
- return TRUE;
+ return sal_True;
}
- eState = rSet.GetItemState( ATTR_BORDER_TLBR, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if( static_cast< const SvxLineItem* >( pItem )->GetLine() )
- return TRUE;
+ return sal_True;
- eState = rSet.GetItemState( ATTR_BORDER_BLTR, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if( static_cast< const SvxLineItem* >( pItem )->GetLine() )
- return TRUE;
+ return sal_True;
- eState = rSet.GetItemState( ATTR_SHADOW, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_SHADOW, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if ( ((const SvxShadowItem*)pItem)->GetLocation() != SVX_SHADOW_NONE )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-inline BOOL OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, USHORT nId )
+inline sal_Bool OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, sal_uInt16 nId )
{
const SfxPoolItem* pItem1 = &rSet1.Get(nId);
const SfxPoolItem* pItem2 = &rSet2.Get(nId);
return ( pItem1 == pItem2 || *pItem1 == *pItem2 );
}
-BOOL ScPatternAttr::IsVisibleEqual( const ScPatternAttr& rOther ) const
+sal_Bool ScPatternAttr::IsVisibleEqual( const ScPatternAttr& rOther ) const
{
const SfxItemSet& rThisSet = GetItemSet();
const SfxItemSet& rOtherSet = rOther.GetItemSet();
@@ -1172,9 +1172,9 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle )
SfxItemSet& rPatternSet = GetItemSet();
const SfxItemSet& rStyleSet = pNewStyle->GetItemSet();
- for (USHORT i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END; i++)
+ for (sal_uInt16 i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END; i++)
{
- if (rStyleSet.GetItemState(i, TRUE) == SFX_ITEM_SET)
+ if (rStyleSet.GetItemState(i, sal_True) == SFX_ITEM_SET)
rPatternSet.ClearItem(i);
}
rPatternSet.SetParent(&pNewStyle->GetItemSet());
@@ -1231,20 +1231,20 @@ void ScPatternAttr::StyleToName()
}
}
-BOOL ScPatternAttr::IsSymbolFont() const
+sal_Bool ScPatternAttr::IsSymbolFont() const
{
const SfxPoolItem* pItem;
- if( GetItemSet().GetItemState( ATTR_FONT, TRUE, &pItem ) == SFX_ITEM_SET )
- return BOOL( ((const SvxFontItem*) pItem)->GetCharSet()
+ if( GetItemSet().GetItemState( ATTR_FONT, sal_True, &pItem ) == SFX_ITEM_SET )
+ return sal_Bool( ((const SvxFontItem*) pItem)->GetCharSet()
== RTL_TEXTENCODING_SYMBOL );
else
- return FALSE;
+ return false;
}
-ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
+sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
{
- ULONG nFormat =
+ sal_uLong nFormat =
((SfxUInt32Item*)&GetItemSet().Get( ATTR_VALUE_FORMAT ))->GetValue();
LanguageType eLang =
((SvxLanguageItem*)&GetItemSet().Get( ATTR_LANGUAGE_FORMAT ))->GetLanguage();
@@ -1257,17 +1257,17 @@ ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
// dasselbe, wenn bedingte Formatierung im Spiel ist:
-ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
+sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
const SfxItemSet* pCondSet ) const
{
DBG_ASSERT(pFormatter,"GetNumberFormat ohne Formatter");
const SfxPoolItem* pFormItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,TRUE,&pFormItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,sal_True,&pFormItem) != SFX_ITEM_SET )
pFormItem = &GetItemSet().Get(ATTR_VALUE_FORMAT);
const SfxPoolItem* pLangItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,TRUE,&pLangItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,sal_True,&pLangItem) != SFX_ITEM_SET )
pLangItem = &GetItemSet().Get(ATTR_LANGUAGE_FORMAT);
return pFormatter->GetFormatForLanguageIfBuiltIn(
@@ -1275,15 +1275,15 @@ ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
((SvxLanguageItem*)pLangItem)->GetLanguage() );
}
-const SfxPoolItem& ScPatternAttr::GetItem( USHORT nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
+const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
{
const SfxPoolItem* pCondItem;
- if ( pCondSet && pCondSet->GetItemState( nWhich, TRUE, &pCondItem ) == SFX_ITEM_SET )
+ if ( pCondSet && pCondSet->GetItemState( nWhich, sal_True, &pCondItem ) == SFX_ITEM_SET )
return *pCondItem;
return rItemSet.Get(nWhich);
}
-const SfxPoolItem& ScPatternAttr::GetItem( USHORT nSubWhich, const SfxItemSet* pCondSet ) const
+const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nSubWhich, const SfxItemSet* pCondSet ) const
{
return GetItem( nSubWhich, GetItemSet(), pCondSet );
}
@@ -1295,7 +1295,7 @@ long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const
long nAttrRotate = 0;
if ( GetCellOrientation() == SVX_ORIENTATION_STANDARD )
{
- BOOL bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
+ sal_Bool bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
GetValue() == SVX_HOR_JUSTIFY_REPEAT );
// ignore orientation/rotation if "repeat" is active
if ( !bRepeat )
@@ -1304,9 +1304,9 @@ long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const
return nAttrRotate;
}
-BYTE ScPatternAttr::GetRotateDir( const SfxItemSet* pCondSet ) const
+sal_uInt8 ScPatternAttr::GetRotateDir( const SfxItemSet* pCondSet ) const
{
- BYTE nRet = SC_ROTDIR_NONE;
+ sal_uInt8 nRet = SC_ROTDIR_NONE;
long nAttrRotate = GetRotateVal( pCondSet );
if ( nAttrRotate )
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index dd9980340cda..a76d4dac6cd3 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
#ifdef _MSC_VER
#pragma optimize("",off)
#endif
@@ -61,7 +59,6 @@
using ::com::sun::star::sheet::DataPilotFieldReference;
using ::rtl::OUString;
-// STATIC DATA -----------------------------------------------------------
// ============================================================================
ScDPName::ScDPName(const OUString& rName, const OUString& rLayoutName) :
@@ -83,7 +80,7 @@ OUString ScDPLabelData::Member::getDisplayName() const
return maName;
}
-ScDPLabelData::ScDPLabelData( const String& rName, short nCol, bool bIsValue ) :
+ScDPLabelData::ScDPLabelData( const String& rName, SCCOL nCol, bool bIsValue ) :
maName( rName ),
mnCol( nCol ),
mnFuncMask( PIVOT_FUNC_NONE ),
@@ -104,13 +101,59 @@ OUString ScDPLabelData::getDisplayName() const
// ============================================================================
-ScDPFuncData::ScDPFuncData( short nCol, USHORT nFuncMask ) :
+ScPivotField::ScPivotField( SCCOL nNewCol, sal_uInt16 nNewFuncMask ) :
+ nCol( nNewCol ),
+ nFuncMask( nNewFuncMask ),
+ nFuncCount( 0 )
+{
+}
+
+bool ScPivotField::operator==( const ScPivotField& r ) const
+{
+ return (nCol == r.nCol)
+ && (nFuncMask == r.nFuncMask)
+ && (nFuncCount == r.nFuncCount)
+ && (maFieldRef.ReferenceType == r.maFieldRef.ReferenceType)
+ && (maFieldRef.ReferenceField == r.maFieldRef.ReferenceField)
+ && (maFieldRef.ReferenceItemType == r.maFieldRef.ReferenceItemType)
+ && (maFieldRef.ReferenceItemName == r.maFieldRef.ReferenceItemName);
+}
+
+// ============================================================================
+
+ScPivotParam::ScPivotParam()
+ : nCol( 0 ), nRow( 0 ), nTab( 0 ),
+ bIgnoreEmptyRows( false ), bDetectCategories( false ),
+ bMakeTotalCol( true ), bMakeTotalRow( true )
+{
+}
+
+bool ScPivotParam::operator==( const ScPivotParam& r ) const
+{
+ return
+ (nCol == r.nCol)
+ && (nRow == r.nRow)
+ && (nTab == r.nTab)
+ && (bIgnoreEmptyRows == r.bIgnoreEmptyRows)
+ && (bDetectCategories == r.bDetectCategories)
+ && (bMakeTotalCol == r.bMakeTotalCol)
+ && (bMakeTotalRow == r.bMakeTotalRow)
+ && (maLabelArray.size() == r.maLabelArray.size()) // ! only size??
+ && (maPageArr == r.maPageArr)
+ && (maColArr == r.maColArr)
+ && (maRowArr == r.maRowArr)
+ && (maDataArr == r.maDataArr);
+}
+
+// ============================================================================
+
+ScPivotFuncData::ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask ) :
mnCol( nCol ),
mnFuncMask( nFuncMask )
{
}
-ScDPFuncData::ScDPFuncData( short nCol, USHORT nFuncMask, const DataPilotFieldReference& rFieldRef ) :
+ScPivotFuncData::ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask, const DataPilotFieldReference& rFieldRef ) :
mnCol( nCol ),
mnFuncMask( nFuncMask ),
maFieldRef( rFieldRef )
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index 99e22727bd89..0596070e459a 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -102,10 +102,10 @@ void ScPoolHelper::UseDocOptions() const
{
if (pFormTable)
{
- USHORT d,m,y;
+ sal_uInt16 d,m,y;
aOpt.GetDate( d,m,y );
pFormTable->ChangeNullDate( d,m,y );
- pFormTable->ChangeStandardPrec( (USHORT)aOpt.GetStdPrecision() );
+ pFormTable->ChangeStandardPrec( (sal_uInt16)aOpt.GetStdPrecision() );
pFormTable->SetYear2000( aOpt.GetYear2000() );
}
}
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 60081966d443..ddf0941d1b44 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -129,16 +129,16 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc )
value. */
aItemSet.Put( XLineStartItem( String::EmptyString(), ::basegfx::B2DPolyPolygon( aTriangle ) ) );
aItemSet.Put( XLineStartWidthItem( 200 ) );
- aItemSet.Put( XLineStartCenterItem( FALSE ) );
+ aItemSet.Put( XLineStartCenterItem( false ) );
aItemSet.Put( XFillStyleItem( XFILL_SOLID ) );
aItemSet.Put( XFillColorItem( String::EmptyString(), ScDetectiveFunc::GetCommentColor() ) );
aItemSet.Put( SdrCaptionEscDirItem( SDRCAPT_ESCBESTFIT ) );
// shadow
- /* SdrShadowItem has FALSE, instead the shadow is set for the
+ /* SdrShadowItem has sal_False, instead the shadow is set for the
rectangle only with SetSpecialTextBoxShadow() when the object is
created (item must be set to adjust objects from older files). */
- aItemSet.Put( SdrShadowItem( FALSE ) );
+ aItemSet.Put( SdrShadowItem( false ) );
aItemSet.Put( SdrShadowXDistItem( 100 ) );
aItemSet.Put( SdrShadowYDistItem( 100 ) );
@@ -147,8 +147,8 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc )
aItemSet.Put( SdrTextRightDistItem( 100 ) );
aItemSet.Put( SdrTextUpperDistItem( 100 ) );
aItemSet.Put( SdrTextLowerDistItem( 100 ) );
- aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aItemSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aItemSet.Put( SdrTextAutoGrowWidthItem( false ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( true ) );
// use the default cell style to be able to modify the caption font
const ScPatternAttr& rDefPattern = static_cast< const ScPatternAttr& >( rDoc.GetPool()->GetDefaultItem( ATTR_PATTERN ) );
rDefPattern.FillEditItemSet( &aItemSet );
@@ -161,7 +161,7 @@ void ScCaptionUtil::SetCaptionItems( SdrCaptionObj& rCaption, const SfxItemSet&
// copy all items
rCaption.SetMergedItemSet( rItemSet );
// reset shadow items
- rCaption.SetMergedItem( SdrShadowItem( FALSE ) );
+ rCaption.SetMergedItem( SdrShadowItem( false ) );
rCaption.SetMergedItem( SdrShadowXDistItem( 100 ) );
rCaption.SetMergedItem( SdrShadowYDistItem( 100 ) );
rCaption.SetSpecialTextBoxShadow();
@@ -566,7 +566,7 @@ OUString ScPostIt::GetText() const
if( const EditTextObject* pEditObj = GetEditTextObject() )
{
OUStringBuffer aBuffer;
- for( USHORT nPara = 0, nParaCount = pEditObj->GetParagraphCount(); nPara < nParaCount; ++nPara )
+ for( sal_uInt16 nPara = 0, nParaCount = pEditObj->GetParagraphCount(); nPara < nParaCount; ++nPara )
{
if( nPara > 0 )
aBuffer.append( sal_Unicode( '\n' ) );
@@ -762,10 +762,13 @@ void ScPostIt::RemoveCaption()
{
pDrawPage->RecalcObjOrdNums();
// create drawing undo action (before removing the object to have valid draw page in undo action)
- if( pDrawLayer && pDrawLayer->IsRecording() )
+ bool bRecording = ( pDrawLayer && pDrawLayer->IsRecording() );
+ if( bRecording )
pDrawLayer->AddCalcUndo( pDrawLayer->GetSdrUndoFactory().CreateUndoDeleteObject( *maNoteData.mpCaption ) );
// remove the object from the drawing page, delete if undo is disabled
- pDrawPage->RemoveObject( maNoteData.mpCaption->GetOrdNum() );
+ SdrObject* pObj = pDrawPage->RemoveObject( maNoteData.mpCaption->GetOrdNum() );
+ if( !bRecording )
+ SdrObject::Free( pObj );
}
}
maNoteData.mpCaption = 0;
@@ -833,10 +836,10 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
ScCaptionUtil::SetDefaultItems( *pCaption, rDoc );
// adjust caption size to text size
long nMaxWidth = ::std::min< long >( aVisRect.GetWidth() * 2 / 3, SC_NOTECAPTION_MAXWIDTH_TEMP );
- pCaption->SetMergedItem( SdrTextAutoGrowWidthItem( TRUE ) );
+ pCaption->SetMergedItem( SdrTextAutoGrowWidthItem( sal_True ) );
pCaption->SetMergedItem( SdrTextMinFrameWidthItem( SC_NOTECAPTION_WIDTH ) );
pCaption->SetMergedItem( SdrTextMaxFrameWidthItem( nMaxWidth ) );
- pCaption->SetMergedItem( SdrTextAutoGrowHeightItem( TRUE ) );
+ pCaption->SetMergedItem( SdrTextAutoGrowHeightItem( sal_True ) );
pCaption->AdjustTextFrameWidthAndHeight();
}
diff --git a/sc/source/core/data/scdpoutputimpl.cxx b/sc/source/core/data/scdpoutputimpl.cxx
index df96c218ee89..1f533e034d32 100644
--- a/sc/source/core/data/scdpoutputimpl.cxx
+++ b/sc/source/core/data/scdpoutputimpl.cxx
@@ -50,7 +50,7 @@ void OutputImpl::OutputDataArea()
mnCols.push_back( mnTabEndCol+1); //set last row bottom
mnRows.push_back( mnTabEndRow+1); //set last col bottom
- BOOL bAllRows = ( ( mnTabEndRow - mnDataStartRow + 2 ) == (SCROW) mnRows.size() );
+ sal_Bool bAllRows = ( ( mnTabEndRow - mnDataStartRow + 2 ) == (SCROW) mnRows.size() );
std::sort( mnCols.begin(), mnCols.end(), lcl_compareColfuc );
std::sort( mnRows.begin(), mnRows.end(), lcl_compareRowfuc );
@@ -86,7 +86,7 @@ void OutputImpl::OutputDataArea()
OutputBlockFrame( mnDataStartCol, mnTabStartRow, mnTabEndCol, mnDataStartRow-1 );
}
-OutputImpl::OutputImpl( ScDocument* pDoc, USHORT nTab,
+OutputImpl::OutputImpl( ScDocument* pDoc, sal_uInt16 nTab,
SCCOL nTabStartCol,
SCROW nTabStartRow,
SCCOL nMemberStartCol,
@@ -111,32 +111,32 @@ OutputImpl::OutputImpl( ScDocument* pDoc, USHORT nTab,
}
-BOOL OutputImpl::AddRow( SCROW nRow )
+sal_Bool OutputImpl::AddRow( SCROW nRow )
{
if ( !mbNeedLineRows[ nRow - mnDataStartRow ] )
{
mbNeedLineRows[ nRow - mnDataStartRow ] = true;
mnRows.push_back( nRow );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-BOOL OutputImpl::AddCol( SCCOL nCol )
+sal_Bool OutputImpl::AddCol( SCCOL nCol )
{
if ( !mbNeedLineCols[ nCol - mnDataStartCol ] )
{
mbNeedLineCols[ nCol - mnDataStartCol ] = true;
mnCols.push_back( nCol );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, BOOL bHori )
+void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Bool bHori )
{
SvxBorderLine aLine, aOutLine;
@@ -169,16 +169,16 @@ void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEnd
SvxBoxInfoItem aBoxInfo( ATTR_BORDER_INNER );
- aBoxInfo.SetValid(VALID_VERT,FALSE );
+ aBoxInfo.SetValid(VALID_VERT,false );
if ( bHori )
{
- aBoxInfo.SetValid(VALID_HORI,TRUE);
+ aBoxInfo.SetValid(VALID_HORI,sal_True);
aBoxInfo.SetLine( &aLine, BOXINFO_LINE_HORI );
}
else
- aBoxInfo.SetValid(VALID_HORI,FALSE );
+ aBoxInfo.SetValid(VALID_HORI,false );
- aBoxInfo.SetValid(VALID_DISTANCE,FALSE);
+ aBoxInfo.SetValid(VALID_DISTANCE,false);
mpDoc->ApplyFrameAreaTab( ScRange( nStartCol, nStartRow, mnTab, nEndCol, nEndRow , mnTab ), &aBox, &aBoxInfo );
diff --git a/sc/source/core/data/scdpoutputimpl.hxx b/sc/source/core/data/scdpoutputimpl.hxx
index 2b8d66b4c75a..35a0a65a06fc 100644
--- a/sc/source/core/data/scdpoutputimpl.hxx
+++ b/sc/source/core/data/scdpoutputimpl.hxx
@@ -39,7 +39,7 @@
class OutputImpl
{
ScDocument* mpDoc;
- USHORT mnTab;
+ sal_uInt16 mnTab;
::std::vector< bool > mbNeedLineCols;
::std::vector< SCCOL > mnCols;
@@ -57,7 +57,7 @@ class OutputImpl
SCROW mnTabEndRow;
public:
- OutputImpl( ScDocument* pDoc, USHORT nTab,
+ OutputImpl( ScDocument* pDoc, sal_uInt16 nTab,
SCCOL nTabStartCol,
SCROW nTabStartRow,
SCCOL nMemberStartCol,
@@ -66,11 +66,11 @@ public:
SCROW nDataStartRow,
SCCOL nTabEndCol,
SCROW nTabEndRow );
- BOOL AddRow( SCROW nRow );
- BOOL AddCol( SCCOL nCol );
+ sal_Bool AddRow( SCROW nRow );
+ sal_Bool AddCol( SCCOL nCol );
void OutputDataArea();
- void OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, BOOL bHori = FALSE );
+ void OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Bool bHori = false );
};
diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx
index aca3dc3fb2b8..fc3b4957c9ca 100644
--- a/sc/source/core/data/sortparam.cxx
+++ b/sc/source/core/data/sortparam.cxx
@@ -56,7 +56,7 @@ ScSortParam::ScSortParam( const ScSortParam& r ) :
aCollatorLocale( r.aCollatorLocale ), aCollatorAlgorithm( r.aCollatorAlgorithm ),
nCompatHeader( r.nCompatHeader )
{
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
bDoSort[i] = r.bDoSort[i];
nField[i] = r.nField[i];
@@ -73,16 +73,16 @@ void ScSortParam::Clear()
nCompatHeader = 2;
nDestTab = 0;
nUserIndex = 0;
- bHasHeader=bCaseSens=bUserDef=bNaturalSort = FALSE;
- bByRow=bIncludePattern=bInplace = TRUE;
+ bHasHeader=bCaseSens=bUserDef=bNaturalSort = false;
+ bByRow=bIncludePattern=bInplace = true;
aCollatorLocale = ::com::sun::star::lang::Locale();
aCollatorAlgorithm.Erase();
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
- bDoSort[i] = FALSE;
+ bDoSort[i] = false;
nField[i] = 0;
- bAscending[i] = TRUE;
+ bAscending[i] = sal_True;
}
}
@@ -109,7 +109,7 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
aCollatorAlgorithm = r.aCollatorAlgorithm;
nCompatHeader = r.nCompatHeader;
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
bDoSort[i] = r.bDoSort[i];
nField[i] = r.nField[i];
@@ -121,12 +121,12 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
//------------------------------------------------------------------------
-BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
+sal_Bool ScSortParam::operator==( const ScSortParam& rOther ) const
{
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = false;
// Anzahl der Sorts gleich?
- USHORT nLast = 0;
- USHORT nOtherLast = 0;
+ sal_uInt16 nLast = 0;
+ sal_uInt16 nOtherLast = 0;
while ( bDoSort[nLast++] && nLast < MAXSORT ) ;
while ( rOther.bDoSort[nOtherLast++] && nOtherLast < MAXSORT ) ;
nLast--;
@@ -153,8 +153,8 @@ BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
&& (aCollatorAlgorithm == rOther.aCollatorAlgorithm)
)
{
- bEqual = TRUE;
- for ( USHORT i=0; i<=nLast && bEqual; i++ )
+ bEqual = sal_True;
+ for ( sal_uInt16 i=0; i<=nLast && bEqual; i++ )
{
bEqual = (nField[i] == rOther.nField[i]) && (bAscending[i] == rOther.bAscending[i]);
}
@@ -166,15 +166,15 @@ BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld ) :
nCol1(rSub.nCol1),nRow1(rSub.nRow1),nCol2(rSub.nCol2),nRow2(rSub.nRow2),
- bHasHeader(TRUE),bByRow(TRUE),bCaseSens(rSub.bCaseSens),bNaturalSort(rOld.bNaturalSort),
+ bHasHeader(true),bByRow(true),bCaseSens(rSub.bCaseSens),bNaturalSort(rOld.bNaturalSort),
bUserDef(rSub.bUserDef),nUserIndex(rSub.nUserIndex),bIncludePattern(rSub.bIncludePattern),
- bInplace(TRUE),
+ bInplace(sal_True),
nDestTab(0),nDestCol(0),nDestRow(0),
aCollatorLocale( rOld.aCollatorLocale ), aCollatorAlgorithm( rOld.aCollatorAlgorithm ),
nCompatHeader( rOld.nCompatHeader )
{
- USHORT nNewCount = 0;
- USHORT i;
+ sal_uInt16 nNewCount = 0;
+ sal_uInt16 i;
// zuerst die Gruppen aus den Teilergebnissen
if (rSub.bDoSort)
@@ -183,7 +183,7 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
{
if (nNewCount < MAXSORT)
{
- bDoSort[nNewCount] = TRUE;
+ bDoSort[nNewCount] = sal_True;
nField[nNewCount] = rSub.nField[i];
bAscending[nNewCount] = rSub.bAscending;
++nNewCount;
@@ -195,15 +195,15 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
if (rOld.bDoSort[i])
{
SCCOLROW nThisField = rOld.nField[i];
- BOOL bDouble = FALSE;
- for (USHORT j=0; j<nNewCount; j++)
+ sal_Bool bDouble = false;
+ for (sal_uInt16 j=0; j<nNewCount; j++)
if ( nField[j] == nThisField )
- bDouble = TRUE;
+ bDouble = sal_True;
if (!bDouble) // ein Feld nicht zweimal eintragen
{
if (nNewCount < MAXSORT)
{
- bDoSort[nNewCount] = TRUE;
+ bDoSort[nNewCount] = sal_True;
nField[nNewCount] = nThisField;
bAscending[nNewCount] = rOld.bAscending[i];
++nNewCount;
@@ -213,9 +213,9 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
for (i=nNewCount; i<MAXSORT; i++) // Rest loeschen
{
- bDoSort[i] = FALSE;
+ bDoSort[i] = false;
nField[i] = 0;
- bAscending[i] = TRUE;
+ bAscending[i] = sal_True;
}
}
@@ -223,21 +223,21 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
ScSortParam::ScSortParam( const ScQueryParam& rParam, SCCOL nCol ) :
nCol1(nCol),nRow1(rParam.nRow1),nCol2(nCol),nRow2(rParam.nRow2),
- bHasHeader(rParam.bHasHeader),bByRow(TRUE),bCaseSens(rParam.bCaseSens),
- bNaturalSort(FALSE),
+ bHasHeader(rParam.bHasHeader),bByRow(true),bCaseSens(rParam.bCaseSens),
+ bNaturalSort(false),
//! TODO: what about Locale and Algorithm?
- bUserDef(FALSE),nUserIndex(0),bIncludePattern(FALSE),
- bInplace(TRUE),
+ bUserDef(false),nUserIndex(0),bIncludePattern(false),
+ bInplace(true),
nDestTab(0),nDestCol(0),nDestRow(0), nCompatHeader(2)
{
- bDoSort[0] = TRUE;
+ bDoSort[0] = sal_True;
nField[0] = nCol;
- bAscending[0] = TRUE;
- for (USHORT i=1; i<MAXSORT; i++)
+ bAscending[0] = sal_True;
+ for (sal_uInt16 i=1; i<MAXSORT; i++)
{
- bDoSort[i] = FALSE;
+ bDoSort[i] = false;
nField[i] = 0;
- bAscending[i] = TRUE;
+ bAscending[i] = sal_True;
}
}
@@ -254,13 +254,13 @@ void ScSortParam::MoveToDest()
nRow1 = sal::static_int_cast<SCROW>( nRow1 + nDifY );
nCol2 = sal::static_int_cast<SCCOL>( nCol2 + nDifX );
nRow2 = sal::static_int_cast<SCROW>( nRow2 + nDifY );
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
if (bByRow)
nField[i] += nDifX;
else
nField[i] += nDifY;
- bInplace = TRUE;
+ bInplace = sal_True;
}
else
{
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 8d1d3a41dba1..a72a0c9953d9 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -95,7 +95,7 @@ void ScStyleSheetPool::SetDocument( ScDocument* pDocument )
//------------------------------------------------------------------------
SfxStyleSheetBase& ScStyleSheetPool::Make( const String& rName,
- SfxStyleFamily eFam, USHORT mask, USHORT nPos )
+ SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos )
{
// When updating styles from a template, Office 5.1 sometimes created
// files with multiple default styles.
@@ -124,7 +124,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const String& rName,
SfxStyleSheetBase* ScStyleSheetPool::Create(
const String& rName,
SfxStyleFamily eFamily,
- USHORT nMaskP )
+ sal_uInt16 nMaskP )
{
ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
if ( eFamily == SFX_STYLE_FAMILY_PARA && ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != rName )
@@ -177,14 +177,14 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
{
// Set-Items
- if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SFX_ITEM_SET )
{
const SfxItemSet& rSrcSub = ((const SvxSetItem*) pItem)->GetItemSet();
SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
aDestSub.PutExtended( rSrcSub, SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT );
rDestSet.Put( SvxSetItem( ATTR_PAGE_HEADERSET, aDestSub ) );
}
- if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SFX_ITEM_SET )
{
const SfxItemSet& rSrcSub = ((const SvxSetItem*) pItem)->GetItemSet();
SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
@@ -197,9 +197,9 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
// number format exchange list has to be handled here, too
if ( pDoc && pDoc->GetFormatExchangeList() &&
- rSourceSet.GetItemState( ATTR_VALUE_FORMAT, FALSE, &pItem ) == SFX_ITEM_SET )
+ rSourceSet.GetItemState( ATTR_VALUE_FORMAT, false, &pItem ) == SFX_ITEM_SET )
{
- ULONG nOldFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
+ sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
sal_uInt32* pNewFormat = static_cast<sal_uInt32*>(pDoc->GetFormatExchangeList()->Get( nOldFormat ));
if (pNewFormat)
rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, *pNewFormat ) );
@@ -231,7 +231,7 @@ void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool )
//------------------------------------------------------------------------
-void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, USHORT nFontType, USHORT nItemId )
+void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, sal_uInt16 nFontType, sal_uInt16 nItemId )
{
if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
{
@@ -258,8 +258,8 @@ void ScStyleSheetPool::CreateStandardStyles()
SfxItemSet* pSet = NULL;
SfxItemSet* pHFSet = NULL;
SvxSetItem* pHFSetItem = NULL;
- ScEditEngineDefaulter* pEdEngine = new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE );
- pEdEngine->SetUpdateMode( FALSE );
+ ScEditEngineDefaulter* pEdEngine = new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True );
+ pEdEngine->SetUpdateMode( false );
EditTextObject* pEmptyTxtObj = pEdEngine->CreateTextObject();
EditTextObject* pTxtObj = NULL;
ScPageHFItem* pHeaderItem = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT );
@@ -431,13 +431,13 @@ void ScStyleSheetPool::CreateStandardStyles()
aBoxItem.SetLine( &aBorderLine, BOX_LINE_LEFT );
aBoxItem.SetLine( &aBorderLine, BOX_LINE_RIGHT );
aBoxItem.SetDistance( 10 ); // 0.2mm
- aBoxInfoItem.SetValid( VALID_TOP, TRUE );
- aBoxInfoItem.SetValid( VALID_BOTTOM, TRUE );
- aBoxInfoItem.SetValid( VALID_LEFT, TRUE );
- aBoxInfoItem.SetValid( VALID_RIGHT, TRUE );
- aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );
- aBoxInfoItem.SetTable( FALSE );
- aBoxInfoItem.SetDist ( TRUE );
+ aBoxInfoItem.SetValid( VALID_TOP, sal_True );
+ aBoxInfoItem.SetValid( VALID_BOTTOM, sal_True );
+ aBoxInfoItem.SetValid( VALID_LEFT, sal_True );
+ aBoxInfoItem.SetValid( VALID_RIGHT, sal_True );
+ aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True );
+ aBoxInfoItem.SetTable( false );
+ aBoxInfoItem.SetDist ( sal_True );
pHFSetItem = new SvxSetItem( ((SvxSetItem&)pSet->Get( ATTR_PAGE_HEADERSET ) ) );
pHFSet = &(pHFSetItem->GetItemSet());
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index e84bd904320f..d51582370045 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -68,7 +68,7 @@ TYPEINIT1(ScStyleSheet, SfxStyleSheet);
ScStyleSheet::ScStyleSheet( const String& rName,
ScStyleSheetPool& rPoolP,
SfxStyleFamily eFamily,
- USHORT nMaskP )
+ sal_uInt16 nMaskP )
: SfxStyleSheet ( rName, rPoolP, eFamily, nMaskP )
, eUsage( UNKNOWN )
@@ -91,21 +91,21 @@ ScStyleSheet::~ScStyleSheet()
//------------------------------------------------------------------------
-BOOL ScStyleSheet::HasFollowSupport() const
+sal_Bool ScStyleSheet::HasFollowSupport() const
{
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
-BOOL ScStyleSheet::HasParentSupport () const
+sal_Bool ScStyleSheet::HasParentSupport () const
{
- BOOL bHasParentSupport = FALSE;
+ sal_Bool bHasParentSupport = false;
switch ( GetFamily() )
{
- case SFX_STYLE_FAMILY_PARA: bHasParentSupport = TRUE; break;
- case SFX_STYLE_FAMILY_PAGE: bHasParentSupport = FALSE; break;
+ case SFX_STYLE_FAMILY_PARA: bHasParentSupport = sal_True; break;
+ case SFX_STYLE_FAMILY_PAGE: bHasParentSupport = false; break;
default:
{
// added to avoid warnings
@@ -117,9 +117,9 @@ BOOL ScStyleSheet::HasParentSupport () const
//------------------------------------------------------------------------
-BOOL ScStyleSheet::SetParent( const String& rParentName )
+sal_Bool ScStyleSheet::SetParent( const String& rParentName )
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = false;
String aEffName = rParentName;
SfxStyleSheetBase* pStyle = rPool.Find( aEffName, nFamily );
if (!pStyle)
@@ -137,6 +137,13 @@ BOOL ScStyleSheet::SetParent( const String& rParentName )
{
SfxItemSet& rParentSet = pStyle->GetItemSet();
GetItemSet().SetParent( &rParentSet );
+
+ // #i113491# Drag&Drop in the stylist's hierarchical view doesn't execute a slot,
+ // so the repaint has to come from here (after modifying the ItemSet).
+ // RepaintRange checks the document's IsVisible flag and locked repaints.
+ ScDocument* pDoc = static_cast<ScStyleSheetPool&>(GetPool()).GetDocument();
+ if (pDoc)
+ pDoc->RepaintRange( ScRange( 0,0,0, MAXCOL,MAXROW,MAXTAB ) );
}
}
@@ -201,11 +208,11 @@ SfxItemSet& ScStyleSheet::GetItemSet()
ATTR_ULSPACE );
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetTable( FALSE );
- aBoxInfoItem.SetDist( TRUE );
- aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );
+ aBoxInfoItem.SetTable( false );
+ aBoxInfoItem.SetDist( sal_True );
+ aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True );
- aPageItem.SetLandscape( FALSE );
+ aPageItem.SetLandscape( false );
rHFSet.Put( aBoxInfoItem );
rHFSet.Put( aHFSizeItem );
@@ -244,7 +251,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
0 );
break;
}
- bMySet = TRUE;
+ bMySet = true;
}
if ( nHelpId == HID_SC_SHEET_CELL_ERG1 )
{
@@ -253,7 +260,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
ScDocument* pDoc = ((ScStyleSheetPool&)GetPool()).GetDocument();
if ( pDoc )
{
- ULONG nNumFmt = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_CURRENCY,ScGlobal::eLnge );
+ sal_uLong nNumFmt = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_CURRENCY,ScGlobal::eLnge );
pSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumFmt ) );
}
}
@@ -264,21 +271,21 @@ SfxItemSet& ScStyleSheet::GetItemSet()
//------------------------------------------------------------------------
-BOOL ScStyleSheet::IsUsed() const
+sal_Bool ScStyleSheet::IsUsed() const
{
if ( GetFamily() == SFX_STYLE_FAMILY_PARA )
{
// Always query the document to let it decide if a rescan is necessary,
// and store the state.
ScDocument* pDoc = ((ScStyleSheetPool&)rPool).GetDocument();
- if ( pDoc && pDoc->IsStyleSheetUsed( *this, TRUE ) )
+ if ( pDoc && pDoc->IsStyleSheetUsed( *this, sal_True ) )
eUsage = USED;
else
eUsage = NOTUSED;
return eUsage == USED;
}
else
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -333,11 +340,11 @@ const String& ScStyleSheet::GetFollow() const
//! Flag gesetzt und abgefragt werden.
//! Die ganze Abfrage muss raus, wenn fuer eine neue Datei-Version die Namens-Umsetzung wegfaellt.
-BOOL ScStyleSheet::SetName( const String& rNew )
+sal_Bool ScStyleSheet::SetName( const String& rNew )
{
String aFileStdName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(STRING_STANDARD));
if ( rNew == aFileStdName && aFileStdName != ScGlobal::GetRscString(STR_STYLENAME_STANDARD) )
- return FALSE;
+ return false;
else
return SfxStyleSheet::SetName( rNew );
}
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index dd1eca50e907..cc82529f149b 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -29,6 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
+// INCLUDE ---------------------------------------------------------------
+
#include "scitems.hxx"
#include <svx/algitem.hxx>
#include <editeng/justifyitem.hxx>
@@ -82,7 +84,7 @@ ScProgress* GetProgressBar(
}
void GetOptimalHeightsInColumn(
- ScColumn* pCol, SCROW nStartRow, SCROW nEndRow, vector<USHORT>& aHeights,
+ ScColumn* pCol, SCROW nStartRow, SCROW nEndRow, vector<sal_uInt16>& aHeights,
OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, bool bForce,
ScProgress* pProgress, sal_uInt32 nProgressStart)
{
@@ -97,13 +99,13 @@ void GetOptimalHeightsInColumn(
// daraus Standardhoehe suchen, die im unteren Bereich gilt
- USHORT nMinHeight = aHeights[nCount-1];
+ sal_uInt16 nMinHeight = aHeights[nCount-1];
SCSIZE nPos = nCount-1;
while ( nPos && aHeights[nPos-1] >= nMinHeight )
--nPos;
SCROW nMinStart = nStartRow + nPos;
- ULONG nWeightedCount = 0;
+ sal_uLong nWeightedCount = 0;
for (SCCOL nCol=0; nCol<MAXCOL; nCol++) // MAXCOL schon oben
{
pCol[nCol].GetOptimalHeight(
@@ -112,7 +114,7 @@ void GetOptimalHeightsInColumn(
if (pProgress)
{
- ULONG nWeight = pCol[nCol].GetWeightedCount();
+ sal_uLong nWeight = pCol[nCol].GetWeightedCount();
if (nWeight) // nochmal denselben Status muss auch nicht sein
{
nWeightedCount += nWeight;
@@ -125,7 +127,7 @@ void GetOptimalHeightsInColumn(
struct OptimalHeightsFuncObjBase
{
virtual ~OptimalHeightsFuncObjBase() {}
- virtual bool operator() (SCROW nStartRow, SCROW nEndRow, USHORT nHeight) = 0;
+ virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight) = 0;
};
struct SetRowHeightOnlyFunc : public OptimalHeightsFuncObjBase
@@ -135,7 +137,7 @@ struct SetRowHeightOnlyFunc : public OptimalHeightsFuncObjBase
mpTab(pTab)
{}
- virtual bool operator() (SCROW nStartRow, SCROW nEndRow, USHORT nHeight)
+ virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight)
{
mpTab->SetRowHeightOnly(nStartRow, nEndRow, nHeight);
return false;
@@ -154,26 +156,26 @@ struct SetRowHeightRangeFunc : public OptimalHeightsFuncObjBase
mnPPTY(nPPTY)
{}
- virtual bool operator() (SCROW nStartRow, SCROW nEndRow, USHORT nHeight)
+ virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight)
{
return mpTab->SetRowHeightRange(nStartRow, nEndRow, nHeight, mnPPTX, mnPPTY);
}
};
bool SetOptimalHeightsToRows(OptimalHeightsFuncObjBase& rFuncObj,
- ScBitMaskCompressedArray<SCROW, BYTE>* pRowFlags, SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
- const vector<USHORT>& aHeights, bool bForce)
+ ScBitMaskCompressedArray<SCROW, sal_uInt8>* pRowFlags, SCROW nStartRow, SCROW nEndRow, sal_uInt16 nExtra,
+ const vector<sal_uInt16>& aHeights, bool bForce)
{
SCSIZE nCount = static_cast<SCSIZE>(nEndRow-nStartRow+1);
bool bChanged = false;
SCROW nRngStart = 0;
SCROW nRngEnd = 0;
- USHORT nLast = 0;
+ sal_uInt16 nLast = 0;
for (SCSIZE i=0; i<nCount; i++)
{
size_t nIndex;
SCROW nRegionEndRow;
- BYTE nRowFlag = pRowFlags->GetValue( nStartRow+i, nIndex, nRegionEndRow );
+ sal_uInt8 nRowFlag = pRowFlags->GetValue( nStartRow+i, nIndex, nRegionEndRow );
if ( nRegionEndRow > nEndRow )
nRegionEndRow = nEndRow;
SCSIZE nMoreRows = nRegionEndRow - ( nStartRow+i ); // additional equal rows after first
@@ -228,15 +230,15 @@ bool SetOptimalHeightsToRows(OptimalHeightsFuncObjBase& rFuncObj,
// -----------------------------------------------------------------------
ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
- BOOL bColInfo, BOOL bRowInfo ) :
+ sal_Bool bColInfo, sal_Bool bRowInfo ) :
aName( rNewName ),
aCodeName( rNewName ),
- bScenario( FALSE ),
- bLayoutRTL( FALSE ),
- bLoadingRTL( FALSE ),
+ bScenario( false ),
+ bLayoutRTL( false ),
+ bLoadingRTL( false ),
nLinkMode( 0 ),
aPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ),
- bPageSizeValid( FALSE ),
+ bPageSizeValid( false ),
nRepeatStartX( SCCOL_REPEAT_NONE ),
nRepeatStartY( SCROW_REPEAT_NONE ),
pTabProtection( NULL ),
@@ -250,11 +252,11 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
mpFilteredRows(new ScFlatBoolRowSegments),
pOutlineTable( NULL ),
pSheetEvents( NULL ),
- bTableAreaValid( FALSE ),
- bVisible( TRUE ),
- bStreamValid( FALSE ),
- bPendingRowHeights( FALSE ),
- bCalcNotification( FALSE ),
+ bTableAreaValid( false ),
+ bVisible( sal_True ),
+ bStreamValid( false ),
+ bPendingRowHeights( false ),
+ bCalcNotification( false ),
nTab( nNewTab ),
nRecalcLvl( 0 ),
pDocument( pDoc ),
@@ -269,14 +271,14 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
aScenarioColor( COL_LIGHTGRAY ),
aTabBgColor( COL_AUTO ),
nScenarioFlags( 0 ),
- bActiveScenario( FALSE ),
+ bActiveScenario( false ),
mbPageBreaksValid(false)
{
if (bColInfo)
{
- pColWidth = new USHORT[ MAXCOL+1 ];
- pColFlags = new BYTE[ MAXCOL+1 ];
+ pColWidth = new sal_uInt16[ MAXCOL+1 ];
+ pColFlags = new sal_uInt8[ MAXCOL+1 ];
for (SCCOL i=0; i<=MAXCOL; i++)
{
@@ -288,7 +290,7 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
if (bRowInfo)
{
mpRowHeights.reset(new ScFlatUInt16RowSegments(ScGlobal::nStdRowHeight));
- pRowFlags = new ScBitMaskCompressedArray< SCROW, BYTE>( MAXROW, 0);
+ pRowFlags = new ScBitMaskCompressedArray< SCROW, sal_uInt8>( MAXROW, 0);
}
if ( pDocument->IsDocVisible() )
@@ -301,11 +303,11 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer)
{
- if ( pDrawLayer->ScAddPage( nTab ) ) // FALSE (not inserted) during Undo
+ if ( pDrawLayer->ScAddPage( nTab ) ) // sal_False (not inserted) during Undo
{
pDrawLayer->ScRenamePage( nTab, aName );
- ULONG nx = (ULONG) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
- ULONG ny = (ULONG) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
+ sal_uLong nx = (sal_uLong) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
+ sal_uLong ny = (sal_uLong) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
pDrawLayer->SetPageSize( static_cast<sal_uInt16>(nTab), Size( nx, ny ), false );
}
}
@@ -360,31 +362,31 @@ const String& ScTable::GetUpperName() const
return aUpperName;
}
-void ScTable::SetVisible( BOOL bVis )
+void ScTable::SetVisible( sal_Bool bVis )
{
if (bVisible != bVis && IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
bVisible = bVis;
}
-void ScTable::SetStreamValid( BOOL bSet, BOOL bIgnoreLock )
+void ScTable::SetStreamValid( sal_Bool bSet, sal_Bool bIgnoreLock )
{
if ( bIgnoreLock || !pDocument->IsStreamValidLocked() )
bStreamValid = bSet;
}
-void ScTable::SetPendingRowHeights( BOOL bSet )
+void ScTable::SetPendingRowHeights( sal_Bool bSet )
{
bPendingRowHeights = bSet;
}
-void ScTable::SetLayoutRTL( BOOL bSet )
+void ScTable::SetLayoutRTL( sal_Bool bSet )
{
bLayoutRTL = bSet;
}
-void ScTable::SetLoadingRTL( BOOL bSet )
+void ScTable::SetLoadingRTL( sal_Bool bSet )
{
bLoadingRTL = bSet;
}
@@ -405,14 +407,14 @@ void ScTable::SetTabBgColor(const Color& rColor)
}
}
-void ScTable::SetScenario( BOOL bFlag )
+void ScTable::SetScenario( sal_Bool bFlag )
{
bScenario = bFlag;
}
-void ScTable::SetLink( BYTE nMode,
+void ScTable::SetLink( sal_uInt8 nMode,
const String& rDoc, const String& rFlt, const String& rOpt,
- const String& rTab, ULONG nRefreshDelay )
+ const String& rTab, sal_uLong nRefreshDelay )
{
nLinkMode = nMode;
aLinkDoc = rDoc; // Datei
@@ -422,13 +424,13 @@ void ScTable::SetLink( BYTE nMode,
nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
-USHORT ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
+sal_uInt16 ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bFormula, const ScMarkData* pMarkData,
+ sal_Bool bFormula, const ScMarkData* pMarkData,
const ScColWidthParam* pParam )
{
return aCol[nCol].GetOptimalColWidth( pDev, nPPTX, nPPTY, rZoomX, rZoomY,
@@ -439,34 +441,34 @@ long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bWidth, BOOL bTotalSize )
+ sal_Bool bWidth, sal_Bool bTotalSize )
{
ScNeededSizeOptions aOptions;
- aOptions.bSkipMerged = FALSE; // zusammengefasste mitzaehlen
+ aOptions.bSkipMerged = false; // zusammengefasste mitzaehlen
aOptions.bTotalSize = bTotalSize;
return aCol[nCol].GetNeededSize
( nRow, pDev, nPPTX, nPPTY, rZoomX, rZoomY, bWidth, aOptions );
}
-BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
+sal_Bool ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nExtra,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bForce, ScProgress* pOuterProgress, ULONG nProgressStart )
+ sal_Bool bForce, ScProgress* pOuterProgress, sal_uLong nProgressStart )
{
DBG_ASSERT( nExtra==0 || bForce, "autom. OptimalHeight mit Extra" );
if ( !pDocument->IsAdjustHeightEnabled() )
{
- return FALSE;
+ return false;
}
SCSIZE nCount = static_cast<SCSIZE>(nEndRow-nStartRow+1);
ScProgress* pProgress = GetProgressBar(nCount, GetWeightedCount(), pOuterProgress, pDocument);
- vector<USHORT> aHeights(nCount, 0);
+ vector<sal_uInt16> aHeights(nCount, 0);
GetOptimalHeightsInColumn(
aCol, nStartRow, nEndRow, aHeights, pDev, nPPTX, nPPTY, rZoomX, rZoomY, bForce,
@@ -482,11 +484,11 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
return bChanged;
}
-void ScTable::SetOptimalHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
+void ScTable::SetOptimalHeightOnly( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nExtra,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bForce, ScProgress* pOuterProgress, ULONG nProgressStart )
+ sal_Bool bForce, ScProgress* pOuterProgress, sal_uLong nProgressStart )
{
DBG_ASSERT( nExtra==0 || bForce, "autom. OptimalHeight mit Extra" );
@@ -497,7 +499,7 @@ void ScTable::SetOptimalHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nExtr
ScProgress* pProgress = GetProgressBar(nCount, GetWeightedCount(), pOuterProgress, pDocument);
- vector<USHORT> aHeights(nCount, 0);
+ vector<sal_uInt16> aHeights(nCount, 0);
GetOptimalHeightsInColumn(
aCol, nStartRow, nEndRow, aHeights, pDev, nPPTX, nPPTY, rZoomX, rZoomY, bForce,
@@ -511,17 +513,17 @@ void ScTable::SetOptimalHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nExtr
delete pProgress;
}
-BOOL ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nMaxX = 0;
SCROW nMaxY = 0;
for (SCCOL i=0; i<=MAXCOL; i++)
- if (!aCol[i].IsEmptyVisData(TRUE)) // TRUE = Notizen zaehlen auch
+ if (!aCol[i].IsEmptyVisData(sal_True)) // sal_True = Notizen zaehlen auch
{
- bFound = TRUE;
+ bFound = sal_True;
nMaxX = i;
- SCROW nColY = aCol[i].GetLastVisDataPos(TRUE);
+ SCROW nColY = aCol[i].GetLastVisDataPos(sal_True);
if (nColY > nMaxY)
nMaxY = nColY;
}
@@ -531,14 +533,14 @@ BOOL ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
return bFound;
}
-BOOL ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
{
- BOOL bRet = TRUE; //! merken?
+ sal_Bool bRet = sal_True; //! merken?
if (!bTableAreaValid)
{
bRet = GetPrintArea( ((ScTable*)this)->nTableAreaX,
- ((ScTable*)this)->nTableAreaY, TRUE );
- ((ScTable*)this)->bTableAreaValid = TRUE;
+ ((ScTable*)this)->nTableAreaY, sal_True );
+ ((ScTable*)this)->bTableAreaValid = sal_True;
}
rEndCol = nTableAreaX;
rEndRow = nTableAreaY;
@@ -547,9 +549,9 @@ BOOL ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
const SCCOL SC_COLUMNS_STOP = 30;
-BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
+sal_Bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bNotes ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nMaxX = 0;
SCROW nMaxY = 0;
SCCOL i;
@@ -557,7 +559,7 @@ BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
for (i=0; i<=MAXCOL; i++) // Daten testen
if (!aCol[i].IsEmptyVisData(bNotes))
{
- bFound = TRUE;
+ bFound = sal_True;
if (i>nMaxX)
nMaxX = i;
SCROW nColY = aCol[i].GetLastVisDataPos(bNotes);
@@ -572,7 +574,7 @@ BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
SCROW nLastRow;
if (aCol[i].GetLastVisibleAttr( nLastRow ))
{
- bFound = TRUE;
+ bFound = sal_True;
nMaxX = i;
if (nLastRow > nMaxY)
nMaxY = nLastRow;
@@ -618,10 +620,10 @@ BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
return bFound;
}
-BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
- SCCOL& rEndCol, BOOL /* bNotes */ ) const
+sal_Bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
+ SCCOL& rEndCol, sal_Bool /* bNotes */ ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nMaxX = 0;
SCCOL i;
@@ -629,7 +631,7 @@ BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
{
if (aCol[i].HasVisibleAttrIn( nStartRow, nEndRow ))
{
- bFound = TRUE;
+ bFound = sal_True;
nMaxX = i;
}
}
@@ -645,7 +647,7 @@ BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
{
if (!aCol[i].IsEmptyBlock( nStartRow, nEndRow )) //! bNotes ??????
{
- bFound = TRUE;
+ bFound = sal_True;
if (i>nMaxX)
nMaxX = i;
}
@@ -655,10 +657,10 @@ BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
return bFound;
}
-BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
- SCROW& rEndRow, BOOL bNotes ) const
+sal_Bool ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
+ SCROW& rEndRow, sal_Bool bNotes ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCROW nMaxY = 0;
SCCOL i;
@@ -667,7 +669,7 @@ BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
SCROW nLastRow;
if (aCol[i].GetLastVisibleAttr( nLastRow ))
{
- bFound = TRUE;
+ bFound = sal_True;
if (nLastRow > nMaxY)
nMaxY = nLastRow;
}
@@ -676,7 +678,7 @@ BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
for (i=nStartCol; i<=nEndCol; i++) // Daten testen
if (!aCol[i].IsEmptyVisData(bNotes))
{
- bFound = TRUE;
+ bFound = sal_True;
SCROW nColY = aCol[i].GetLastVisDataPos(bNotes);
if (nColY > nMaxY)
nMaxY = nColY;
@@ -686,9 +688,9 @@ BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
return bFound;
}
-BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
+sal_Bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nMinX = MAXCOL;
SCROW nMinY = MAXROW;
SCCOL i;
@@ -700,7 +702,7 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
{
if (!bFound)
nMinX = i;
- bFound = TRUE;
+ bFound = sal_True;
if (nFirstRow < nMinY)
nMinY = nFirstRow;
}
@@ -716,14 +718,14 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
}
}
- BOOL bDatFound = FALSE;
+ sal_Bool bDatFound = false;
for (i=0; i<=MAXCOL; i++) // Daten testen
- if (!aCol[i].IsEmptyVisData(TRUE))
+ if (!aCol[i].IsEmptyVisData(sal_True))
{
if (!bDatFound && i<nMinX)
nMinX = i;
- bFound = bDatFound = TRUE;
- SCROW nColY = aCol[i].GetFirstVisDataPos(TRUE);
+ bFound = bDatFound = sal_True;
+ SCROW nColY = aCol[i].GetFirstVisDataPos(sal_True);
if (nColY < nMinY)
nMinY = nColY;
}
@@ -734,20 +736,20 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
}
void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow,
- BOOL bIncludeOld, bool bOnlyDown ) const
-{
- BOOL bLeft = FALSE;
- BOOL bRight = FALSE;
- BOOL bTop = FALSE;
- BOOL bBottom = FALSE;
- BOOL bChanged;
- BOOL bFound;
+ sal_Bool bIncludeOld, bool bOnlyDown ) const
+{
+ sal_Bool bLeft = false;
+ sal_Bool bRight = false;
+ sal_Bool bTop = false;
+ sal_Bool bBottom = false;
+ sal_Bool bChanged;
+ sal_Bool bFound;
SCCOL i;
SCROW nTest;
do
{
- bChanged = FALSE;
+ bChanged = false;
if (!bOnlyDown)
{
@@ -760,30 +762,30 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
if (!aCol[rEndCol+1].IsEmptyBlock(nStart,nEnd))
{
++rEndCol;
- bChanged = TRUE;
- bRight = TRUE;
+ bChanged = sal_True;
+ bRight = sal_True;
}
if (rStartCol > 0)
if (!aCol[rStartCol-1].IsEmptyBlock(nStart,nEnd))
{
--rStartCol;
- bChanged = TRUE;
- bLeft = TRUE;
+ bChanged = sal_True;
+ bLeft = sal_True;
}
if (rStartRow > 0)
{
nTest = rStartRow-1;
- bFound = FALSE;
+ bFound = false;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(nTest))
- bFound = TRUE;
+ bFound = sal_True;
if (bFound)
{
--rStartRow;
- bChanged = TRUE;
- bTop = TRUE;
+ bChanged = sal_True;
+ bTop = sal_True;
}
}
}
@@ -791,15 +793,15 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
if (rEndRow < MAXROW)
{
nTest = rEndRow+1;
- bFound = FALSE;
+ bFound = false;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(nTest))
- bFound = TRUE;
+ bFound = sal_True;
if (bFound)
{
++rEndRow;
- bChanged = TRUE;
- bBottom = TRUE;
+ bChanged = sal_True;
+ bBottom = sal_True;
}
}
}
@@ -815,19 +817,19 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
--rEndCol;
if ( !bTop && rStartRow < MAXROW && rStartRow < rEndRow )
{
- bFound = FALSE;
+ bFound = false;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(rStartRow))
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
++rStartRow;
}
if ( !bBottom && rEndRow > 0 && rStartRow < rEndRow )
{
- bFound = FALSE;
+ bFound = false;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(rEndRow))
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
--rEndRow;
}
@@ -950,12 +952,12 @@ SCSIZE ScTable::GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow,
return nCount;
}
-BOOL ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol )
+sal_Bool ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
for (SCCOL i=nStartCol; i<=nEndCol && !bFound; i++)
if (aCol[i].HasDataAt(nRow))
- bFound = TRUE;
+ bFound = sal_True;
return !bFound;
}
@@ -979,20 +981,20 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY
if (nMovX)
{
SCsCOL nNewCol = (SCsCOL) rCol;
- BOOL bThere = aCol[nNewCol].HasVisibleDataAt(rRow);
- BOOL bFnd;
+ sal_Bool bThere = aCol[nNewCol].HasVisibleDataAt(rRow);
+ sal_Bool bFnd;
if (bThere)
{
do
{
nNewCol = sal::static_int_cast<SCsCOL>( nNewCol + nMovX );
- bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : FALSE;
+ bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : false;
}
while (bFnd);
nNewCol = sal::static_int_cast<SCsCOL>( nNewCol - nMovX );
if (nNewCol == (SCsCOL)rCol)
- bThere = FALSE;
+ bThere = false;
}
if (!bThere)
@@ -1000,7 +1002,7 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY
do
{
nNewCol = sal::static_int_cast<SCsCOL>( nNewCol + nMovX );
- bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : TRUE;
+ bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : sal_True;
}
while (!bFnd);
}
@@ -1014,22 +1016,22 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY
aCol[rCol].FindDataAreaPos(rRow,nMovY);
}
-BOOL ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
- BOOL bMarked, BOOL bUnprotected )
+sal_Bool ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
+ sal_Bool bMarked, sal_Bool bUnprotected )
{
if (!ValidCol(nCol) || !ValidRow(nRow))
- return FALSE;
+ return false;
if (pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED))
// Skip an overlapped cell.
return false;
if (bMarked && !rMark.IsCellMarked(nCol,nRow))
- return FALSE;
+ return false;
if (bUnprotected && ((const ScProtectionAttr*)
GetAttr(nCol,nRow,ATTR_PROTECTION))->GetProtection())
- return FALSE;
+ return false;
if (bMarked || bUnprotected) //! auch sonst ???
{
@@ -1038,22 +1040,22 @@ BOOL ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
//! per Extra-Parameter steuern, nur fuer Cursor-Bewegung ???
if (RowHidden(nRow))
- return FALSE;
+ return false;
if (ColHidden(nCol))
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
- BOOL bMarked, BOOL bUnprotected, const ScMarkData& rMark )
+ sal_Bool bMarked, sal_Bool bUnprotected, const ScMarkData& rMark )
{
if (bUnprotected && !IsProtected()) // Tabelle ueberhaupt geschuetzt?
- bUnprotected = FALSE;
+ bUnprotected = false;
- USHORT nWrap = 0;
+ sal_uInt16 nWrap = 0;
SCsCOL nCol = rCol;
SCsROW nRow = rRow;
@@ -1065,7 +1067,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
if ( nMovY && bMarked )
{
- BOOL bUp = ( nMovY < 0 );
+ sal_Bool bUp = ( nMovY < 0 );
nRow = rMark.GetNextMarked( nCol, nRow, bUp );
while ( VALIDROW(nRow) &&
(RowHidden(nRow) || pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED)) )
@@ -1138,9 +1140,9 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
{
SCsROW nNextRow = pNextRows[nCol] + 1;
if ( bMarked )
- nNextRow = rMark.GetNextMarked( nCol, nNextRow, FALSE );
+ nNextRow = rMark.GetNextMarked( nCol, nNextRow, false );
if ( bUnprotected )
- nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, FALSE );
+ nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, false );
pNextRows[nCol] = nNextRow;
SCsROW nMinRow = MAXROW+1;
@@ -1171,9 +1173,9 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
{
SCsROW nNextRow = pNextRows[nCol] - 1;
if ( bMarked )
- nNextRow = rMark.GetNextMarked( nCol, nNextRow, TRUE );
+ nNextRow = rMark.GetNextMarked( nCol, nNextRow, sal_True );
if ( bUnprotected )
- nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, TRUE );
+ nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, sal_True );
pNextRows[nCol] = nNextRow;
SCsROW nMaxRow = -1;
@@ -1212,12 +1214,12 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
}
}
-BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark )
+sal_Bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark )
{
const ScMarkArray* pMarkArray = rMark.GetArray();
DBG_ASSERT(pMarkArray,"GetNextMarkedCell ohne MarkArray");
if ( !pMarkArray )
- return FALSE;
+ return false;
++rRow; // naechste Zelle ist gesucht
@@ -1226,10 +1228,10 @@ BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
const ScMarkArray& rArray = pMarkArray[rCol];
while ( rRow <= MAXROW )
{
- SCROW nStart = (SCROW) rArray.GetNextMarked( (SCsROW) rRow, FALSE );
+ SCROW nStart = (SCROW) rArray.GetNextMarked( (SCsROW) rRow, false );
if ( nStart <= MAXROW )
{
- SCROW nEnd = rArray.GetMarkEnd( nStart, FALSE );
+ SCROW nEnd = rArray.GetMarkEnd( nStart, false );
ScColumnIterator aColIter( &aCol[rCol], nStart, nEnd );
SCROW nCellRow;
ScBaseCell* pCell = NULL;
@@ -1238,7 +1240,7 @@ BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE )
{
rRow = nCellRow;
- return TRUE; // Zelle gefunden
+ return sal_True; // Zelle gefunden
}
}
rRow = nEnd + 1; // naechsten markierten Bereich suchen
@@ -1250,7 +1252,7 @@ BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
++rCol; // naechste Spalte testen
}
- return FALSE; // alle Spalten durch
+ return false; // alle Spalten durch
}
void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
@@ -1278,7 +1280,7 @@ void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nR
void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScDocument* pUndoDoc, BOOL bIncludeDraw, bool bUpdateNoteCaptionPos )
+ ScDocument* pUndoDoc, sal_Bool bIncludeDraw, bool bUpdateNoteCaptionPos )
{
bool bUpdated = false;
SCCOL i;
@@ -1308,7 +1310,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
SCROW nSRow = 0;
SCCOL nECol = 0;
SCROW nERow = 0;
- BOOL bRecalcPages = FALSE;
+ sal_Bool bRecalcPages = false;
for ( ScRangeVec::iterator aIt = aPrintRanges.begin(), aEnd = aPrintRanges.end(); aIt != aEnd; ++aIt )
{
@@ -1324,7 +1326,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
nSCol,nSRow,nSTab, nECol,nERow,nETab ) )
{
*aIt = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
- bRecalcPages = TRUE;
+ bRecalcPages = sal_True;
}
}
@@ -1342,7 +1344,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
nSCol,nSRow,nSTab, nECol,nERow,nETab ) )
{
*pRepeatColRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
- bRecalcPages = TRUE;
+ bRecalcPages = sal_True;
nRepeatStartX = nSCol; // fuer UpdatePageBreaks
nRepeatEndX = nECol;
}
@@ -1362,7 +1364,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
nSCol,nSRow,nSTab, nECol,nERow,nETab ) )
{
*pRepeatRowRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
- bRecalcPages = TRUE;
+ bRecalcPages = sal_True;
nRepeatStartY = nSRow; // fuer UpdatePageBreaks
nRepeatEndY = nERow;
}
@@ -1373,11 +1375,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
{
UpdatePageBreaks(NULL);
- SfxObjectShell* pDocSh = pDocument->GetDocumentShell();
- if (pDocSh)
- pDocSh->Broadcast( ScPaintHint(
- ScRange(0,0,nTab,MAXCOL,MAXROW,nTab),
- PAINT_GRID ) );
+ pDocument->RepaintRange( ScRange(0,0,nTab,MAXCOL,MAXROW,nTab) );
}
}
@@ -1404,10 +1402,10 @@ void ScTable::UpdateInsertTab(SCTAB nTable)
for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable);
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
-void ScTable::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScTable* pRefUndo )
+void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo )
{
if (nTab > nTable) nTab--;
@@ -1418,7 +1416,7 @@ void ScTable::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScTable* pRefUndo )
for (i=0; i <= MAXCOL; i++) aCol[i].UpdateDeleteTab(nTable, bIsMove, NULL);
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo,
@@ -1432,10 +1430,10 @@ void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo,
}
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
-void ScTable::UpdateCompile( BOOL bForceIfNameInUse )
+void ScTable::UpdateCompile( sal_Bool bForceIfNameInUse )
{
for (SCCOL i=0; i <= MAXCOL; i++)
{
@@ -1449,17 +1447,17 @@ void ScTable::SetTabNo(SCTAB nNewTab)
for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].SetTabNo(nNewTab);
}
-BOOL ScTable::IsRangeNameInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nIndex) const
+sal_Bool ScTable::IsRangeNameInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ sal_uInt16 nIndex) const
{
- BOOL bInUse = FALSE;
+ sal_Bool bInUse = false;
for (SCCOL i = nCol1; !bInUse && (i <= nCol2) && (ValidCol(i)); i++)
bInUse = aCol[i].IsRangeNameInUse(nRow1, nRow2, nIndex);
return bInUse;
}
void ScTable::FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- std::set<USHORT>& rIndexes) const
+ std::set<sal_uInt16>& rIndexes) const
{
for (SCCOL i = nCol1; i <= nCol2 && ValidCol(i); i++)
aCol[i].FindRangeNamesInUse(nRow1, nRow2, rIndexes);
@@ -1572,14 +1570,14 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d
if ( TEXTWIDTH_DIRTY == nPixel )
{
ScNeededSizeOptions aOptions;
- aOptions.bTotalSize = TRUE;
+ aOptions.bTotalSize = sal_True;
aOptions.bFormula = bFormula;
- aOptions.bSkipMerged = FALSE;
+ aOptions.bSkipMerged = false;
Fraction aZoom(1,1);
nPixel = aCol[rCol].GetNeededSize(
nRow, pDev, nPPTX, nPPTY, aZoom, aZoom, true, aOptions );
- pCell->SetTextWidth( (USHORT)nPixel );
+ pCell->SetTextWidth( (sal_uInt16)nPixel );
}
long nTwips = (long) (nPixel / nPPTX);
@@ -1645,7 +1643,7 @@ void ScTable::SetRepeatColRange( const ScRange* pNew )
SET_PRINTRANGE( pRepeatColRange, pNew );
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
void ScTable::SetRepeatRowRange( const ScRange* pNew )
@@ -1653,7 +1651,7 @@ void ScTable::SetRepeatRowRange( const ScRange* pNew )
SET_PRINTRANGE( pRepeatRowRange, pNew );
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
void ScTable::ClearPrintRanges()
@@ -1662,7 +1660,7 @@ void ScTable::ClearPrintRanges()
bPrintEntireSheet = false;
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
void ScTable::AddPrintRange( const ScRange& rNew )
@@ -1672,7 +1670,7 @@ void ScTable::AddPrintRange( const ScRange& rNew )
aPrintRanges.push_back( rNew );
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
@@ -1681,11 +1679,11 @@ void ScTable::SetPrintEntireSheet()
if( !IsPrintEntireSheet() )
{
ClearPrintRanges();
- bPrintEntireSheet = TRUE;
+ bPrintEntireSheet = sal_True;
}
}
-const ScRange* ScTable::GetPrintRange(USHORT nPos) const
+const ScRange* ScTable::GetPrintRange(sal_uInt16 nPos) const
{
return (nPos < GetPrintRangeCount()) ? &aPrintRanges[ nPos ] : NULL;
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 6ef093f5db40..31a5bca64866 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -64,12 +64,12 @@
// STATIC DATA -----------------------------------------------------------
-BOOL ScTable::SetOutlineTable( const ScOutlineTable* pNewOutline )
+sal_Bool ScTable::SetOutlineTable( const ScOutlineTable* pNewOutline )
{
- USHORT nOldSizeX = 0;
- USHORT nOldSizeY = 0;
- USHORT nNewSizeX = 0;
- USHORT nNewSizeY = 0;
+ sal_uInt16 nOldSizeX = 0;
+ sal_uInt16 nOldSizeY = 0;
+ sal_uInt16 nNewSizeX = 0;
+ sal_uInt16 nNewSizeY = 0;
if (pOutlineTable)
{
@@ -106,22 +106,22 @@ void ScTable::SetSheetEvents( const ScSheetEvents* pNew )
else
pSheetEvents = NULL;
- SetCalcNotification( FALSE ); // discard notifications before the events were set
+ SetCalcNotification( false ); // discard notifications before the events were set
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
-void ScTable::SetCalcNotification( BOOL bSet )
+void ScTable::SetCalcNotification( sal_Bool bSet )
{
bCalcNotification = bSet;
}
-BOOL ScTable::TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize )
+sal_Bool ScTable::TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize )
{
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
if ( nStartCol==0 && nEndCol==MAXCOL && pOutlineTable )
bTest = pOutlineTable->TestInsertRow(nSize);
@@ -142,7 +142,7 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
if (mpRowHeights && pRowFlags)
{
mpRowHeights->insertSegment(nStartRow, nSize, false);
- BYTE nNewFlags = pRowFlags->Insert( nStartRow, nSize);
+ sal_uInt8 nNewFlags = pRowFlags->Insert( nStartRow, nSize);
// only copy manual size flag, clear all others
if (nNewFlags && (nNewFlags != CR_MANUALSIZE))
pRowFlags->SetValue( nStartRow, nStartRow + nSize - 1,
@@ -186,7 +186,7 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize,
- BOOL* pUndoOutline )
+ sal_Bool* pUndoOutline )
{
IncRecalcLevel();
InitializeNoteCaptions();
@@ -201,7 +201,7 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
if (pOutlineTable)
if (pOutlineTable->DeleteRow( nStartRow, nSize ))
if (pUndoOutline)
- *pUndoOutline = TRUE;
+ *pUndoOutline = sal_True;
mpFilteredRows->removeSegment(nStartRow, nStartRow+nSize);
mpHiddenRows->removeSegment(nStartRow, nStartRow+nSize);
@@ -235,15 +235,15 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
}
-BOOL ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize )
+sal_Bool ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize )
{
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
if ( nStartRow==0 && nEndRow==MAXROW && pOutlineTable )
bTest = pOutlineTable->TestInsertCol(nSize);
if ( nSize > static_cast<SCSIZE>(MAXCOL) )
- bTest = FALSE;
+ bTest = false;
for (SCCOL i=MAXCOL; (i+static_cast<SCCOL>(nSize)>MAXCOL) && bTest; i--)
bTest = aCol[i].TestInsertCol(nStartRow, nEndRow);
@@ -303,14 +303,14 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
if (nStartCol>0) // copy old attributes
{
- USHORT nWhichArray[2];
+ sal_uInt16 nWhichArray[2];
nWhichArray[0] = ATTR_MERGE;
nWhichArray[1] = 0;
for (SCSIZE i=0; i<nSize; i++)
{
aCol[nStartCol-1].CopyToColumn( nStartRow, nEndRow, IDF_ATTRIB,
- FALSE, aCol[nStartCol+i] );
+ false, aCol[nStartCol+i] );
aCol[nStartCol+i].RemoveFlags( nStartRow, nEndRow,
SC_MF_HOR | SC_MF_VER | SC_MF_AUTO );
aCol[nStartCol+i].ClearItems( nStartRow, nEndRow, nWhichArray );
@@ -328,7 +328,7 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize,
- BOOL* pUndoOutline )
+ sal_Bool* pUndoOutline )
{
IncRecalcLevel();
InitializeNoteCaptions();
@@ -344,7 +344,7 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
if (pOutlineTable)
if (pOutlineTable->DeleteCol( nStartCol, nSize ))
if (pUndoOutline)
- *pUndoOutline = TRUE;
+ *pUndoOutline = sal_True;
SCCOL nRmSize = nStartCol + static_cast<SCCOL>(nSize);
mpHiddenCols->removeSegment(nStartCol, nRmSize);
@@ -392,7 +392,7 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
}
-void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nDelFlag)
+void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nDelFlag)
{
if (nCol2 > MAXCOL) nCol2 = MAXCOL;
if (nRow2 > MAXROW) nRow2 = MAXROW;
@@ -411,7 +411,7 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
if ( IsProtected() && (nDelFlag & IDF_ATTRIB) )
{
ScPatternAttr aPattern(pDocument->GetPool());
- aPattern.GetItemSet().Put( ScProtectionAttr( FALSE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( false ) );
ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern );
}
}
@@ -423,7 +423,7 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
}
-void ScTable::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
+void ScTable::DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark )
{
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM());
@@ -439,7 +439,7 @@ void ScTable::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
{
ScDocumentPool* pPool = pDocument->GetPool();
SfxItemSet aSet( *pPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
- aSet.Put( ScProtectionAttr( FALSE ) );
+ aSet.Put( ScProtectionAttr( false ) );
SfxItemPoolCache aCache( pPool, &aSet );
ApplySelectionCache( &aCache, rMark );
}
@@ -453,7 +453,7 @@ void ScTable::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
// pTable = Clipboard
void ScTable::CopyToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ScTable* pTable, BOOL bKeepScenarioFlags, BOOL bCloneNoteCaptions)
+ ScTable* pTable, sal_Bool bKeepScenarioFlags, sal_Bool bCloneNoteCaptions)
{
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{
@@ -503,8 +503,8 @@ void ScTable::CopyToClip(const ScRangeList& rRanges, ScTable* pTable,
}
void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- SCsCOL nDx, SCsROW nDy, USHORT nInsFlag,
- BOOL bAsLink, BOOL bSkipAttrForEmpty, ScTable* pTable)
+ SCsCOL nDx, SCsROW nDy, sal_uInt16 nInsFlag,
+ sal_Bool bAsLink, sal_Bool bSkipAttrForEmpty, ScTable* pTable)
{
SCCOL i;
@@ -532,7 +532,7 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( pTable->pRowFlags->GetValue(j-nDy) & CR_MANUALSIZE )
pRowFlags->OrValue( j, CR_MANUALSIZE);
else
- pRowFlags->AndValue( j, sal::static_int_cast<BYTE>(~CR_MANUALSIZE));
+ pRowFlags->AndValue( j, sal::static_int_cast<sal_uInt8>(~CR_MANUALSIZE));
}
}
@@ -543,7 +543,7 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( IsProtected() && (nInsFlag & IDF_ATTRIB) )
{
ScPatternAttr aPattern(pDocument->GetPool());
- aPattern.GetItemSet().Put( ScProtectionAttr( FALSE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( false ) );
ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern );
}
}
@@ -553,7 +553,7 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
void ScTable::MixData( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nFunction, BOOL bSkipEmpty, ScTable* pSrcTab )
+ sal_uInt16 nFunction, sal_Bool bSkipEmpty, ScTable* pSrcTab )
{
for (SCCOL i=nCol1; i<=nCol2; i++)
aCol[i].MixData( nRow1, nRow2, nFunction, bSkipEmpty, pSrcTab->aCol[i] );
@@ -561,8 +561,8 @@ void ScTable::MixData( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// Markierung von diesem Dokument
-void ScTable::MixMarked( const ScMarkData& rMark, USHORT nFunction,
- BOOL bSkipEmpty, ScTable* pSrcTab )
+void ScTable::MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction,
+ sal_Bool bSkipEmpty, ScTable* pSrcTab )
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].MixMarked( rMark, nFunction, bSkipEmpty, pSrcTab->aCol[i] );
@@ -570,9 +570,9 @@ void ScTable::MixMarked( const ScMarkData& rMark, USHORT nFunction,
void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ScTable* pTransClip, USHORT nFlags, BOOL bAsLink )
+ ScTable* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink )
{
- BOOL bWasCut = pDocument->IsCutMode();
+ sal_Bool bWasCut = pDocument->IsCutMode();
ScDocument* pDestDoc = pTransClip->pDocument;
@@ -595,7 +595,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
aRef.nRow = nRow;
aRef.nTab = nTab;
aRef.InitFlags(); // -> all absolute
- aRef.SetFlag3D(TRUE);
+ aRef.SetFlag3D(sal_True);
aRef.CalcRelFromAbs( aDestPos );
ScTokenArray aArr;
aArr.AddSingleReference( aRef );
@@ -648,13 +648,13 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( !IsDefaultItem( pPattern ) )
{
const SfxItemSet& rSet = pPattern->GetItemSet();
- if ( rSet.GetItemState( ATTR_MERGE, FALSE ) == SFX_ITEM_DEFAULT &&
- rSet.GetItemState( ATTR_MERGE_FLAG, FALSE ) == SFX_ITEM_DEFAULT &&
- rSet.GetItemState( ATTR_BORDER, FALSE ) == SFX_ITEM_DEFAULT )
+ if ( rSet.GetItemState( ATTR_MERGE, false ) == SFX_ITEM_DEFAULT &&
+ rSet.GetItemState( ATTR_MERGE_FLAG, false ) == SFX_ITEM_DEFAULT &&
+ rSet.GetItemState( ATTR_BORDER, false ) == SFX_ITEM_DEFAULT )
{
// no borders or merge items involved - use pattern as-is
for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++)
- pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), *pPattern, TRUE );
+ pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), *pPattern, sal_True );
}
else
{
@@ -688,7 +688,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScMergeFlagAttr& rOldFlag = (const ScMergeFlagAttr&)rSet.Get(ATTR_MERGE_FLAG);
if (rOldFlag.IsOverlapped())
{
- INT16 nNewFlags = rOldFlag.GetValue() & ~( SC_MF_HOR | SC_MF_VER );
+ sal_Int16 nNewFlags = rOldFlag.GetValue() & ~( SC_MF_HOR | SC_MF_VER );
if ( nNewFlags )
rNewSet.Put( ScMergeFlagAttr( nNewFlags ) );
else
@@ -697,7 +697,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++)
pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1),
- static_cast<SCROW>(nCol-nCol1), aNewPattern, TRUE);
+ static_cast<SCROW>(nCol-nCol1), aNewPattern, sal_True);
}
}
}
@@ -744,9 +744,9 @@ void ScTable::StartListeningInArea( SCCOL nCol1, SCROW nRow1,
void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nFlags, BOOL bMarked, ScTable* pDestTab,
+ sal_uInt16 nFlags, sal_Bool bMarked, ScTable* pDestTab,
const ScMarkData* pMarkData,
- BOOL bAsLink, BOOL bColRowFlags)
+ sal_Bool bAsLink, sal_Bool bColRowFlags)
{
if (!ValidColRow(nCol1, nRow1) || !ValidColRow(nCol2, nRow2))
return;
@@ -764,8 +764,8 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
bool bFlagChange = false;
- BOOL bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
- BOOL bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
+ sal_Bool bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
+ sal_Bool bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
if (bWidth || bHeight)
{
@@ -846,13 +846,13 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nFlags, BOOL bMarked, ScTable* pDestTab,
+ sal_uInt16 nFlags, sal_Bool bMarked, ScTable* pDestTab,
const ScMarkData* pMarkData)
{
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{
- BOOL bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
- BOOL bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
+ sal_Bool bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
+ sal_Bool bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
if (bWidth||bHeight)
IncRecalcLevel();
@@ -863,7 +863,7 @@ void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
aCol[i].UndoToColumn(nRow1, nRow2, nFlags, bMarked, pDestTab->aCol[i],
pMarkData);
else
- aCol[i].CopyToColumn(0, MAXROW, IDF_FORMULA, FALSE, pDestTab->aCol[i]);
+ aCol[i].CopyToColumn(0, MAXROW, IDF_FORMULA, false, pDestTab->aCol[i]);
}
if (bWidth||bHeight)
@@ -893,7 +893,7 @@ void ScTable::CopyUpdated( const ScTable* pPosTab, ScTable* pDestTab ) const
void ScTable::InvalidateTableArea()
{
- bTableAreaValid = FALSE;
+ bTableAreaValid = false;
}
void ScTable::InvalidatePageBreaks()
@@ -917,7 +917,7 @@ void ScTable::CopyScenarioFrom( const ScTable* pSrcTab )
aCol[i].CopyScenarioFrom( pSrcTab->aCol[i] );
}
-void ScTable::MarkScenarioIn( ScMarkData& rDestMark, USHORT nNeededBits ) const
+void ScTable::MarkScenarioIn( ScMarkData& rDestMark, sal_uInt16 nNeededBits ) const
{
DBG_ASSERT( bScenario, "bScenario == FALSE" );
@@ -928,7 +928,7 @@ void ScTable::MarkScenarioIn( ScMarkData& rDestMark, USHORT nNeededBits ) const
aCol[i].MarkScenarioIn( rDestMark );
}
-BOOL ScTable::HasScenarioRange( const ScRange& rRange ) const
+sal_Bool ScTable::HasScenarioRange( const ScRange& rRange ) const
{
DBG_ASSERT( bScenario, "bScenario == FALSE" );
@@ -944,11 +944,11 @@ BOOL ScTable::HasScenarioRange( const ScRange& rRange ) const
{
const ScRange* pR = (*pList)[j];
if ( pR->Intersects( aTabRange ) )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
void ScTable::InvalidateScenarioRanges()
@@ -966,19 +966,19 @@ const ScRangeList* ScTable::GetScenarioRanges() const
((ScTable*)this)->pScenarioRanges = new ScRangeList;
ScMarkData aMark;
MarkScenarioIn( aMark, 0 ); // immer
- aMark.FillRangeListWithMarks( pScenarioRanges, FALSE );
+ aMark.FillRangeListWithMarks( pScenarioRanges, false );
}
return pScenarioRanges;
}
-BOOL ScTable::TestCopyScenarioTo( const ScTable* pDestTab ) const
+sal_Bool ScTable::TestCopyScenarioTo( const ScTable* pDestTab ) const
{
DBG_ASSERT( bScenario, "bScenario == FALSE" );
if (!pDestTab->IsProtected())
- return TRUE;
+ return sal_True;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for (SCCOL i=0; i<=MAXCOL && bOk; i++)
bOk = aCol[i].TestCopyScenarioTo( pDestTab->aCol[i] );
return bOk;
@@ -996,7 +996,7 @@ void ScTable::PutCell( SCCOL nCol, SCROW nRow, ScBaseCell* pCell )
}
-void ScTable::PutCell( SCCOL nCol, SCROW nRow, ULONG nFormatIndex, ScBaseCell* pCell )
+void ScTable::PutCell( SCCOL nCol, SCROW nRow, sal_uLong nFormatIndex, ScBaseCell* pCell )
{
if (ValidColRow(nCol,nRow))
{
@@ -1017,14 +1017,14 @@ void ScTable::PutCell( const ScAddress& rPos, ScBaseCell* pCell )
}
-BOOL ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const String& rString,
+sal_Bool ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const String& rString,
ScSetStringParam* pParam )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].SetString(
nRow, nTabP, rString, pDocument->GetAddressConvention(), pParam );
else
- return FALSE;
+ return false;
}
@@ -1161,42 +1161,42 @@ void ScTable::GetLastDataPos(SCCOL& rCol, SCROW& rRow) const
}
-BOOL ScTable::HasData( SCCOL nCol, SCROW nRow )
+sal_Bool ScTable::HasData( SCCOL nCol, SCROW nRow )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].HasDataAt( nRow );
else
- return FALSE;
+ return false;
}
-BOOL ScTable::HasStringData( SCCOL nCol, SCROW nRow )
+sal_Bool ScTable::HasStringData( SCCOL nCol, SCROW nRow )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].HasStringData( nRow );
else
- return FALSE;
+ return false;
}
-BOOL ScTable::HasValueData( SCCOL nCol, SCROW nRow )
+sal_Bool ScTable::HasValueData( SCCOL nCol, SCROW nRow )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].HasValueData( nRow );
else
- return FALSE;
+ return false;
}
-BOOL ScTable::HasStringCells( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScTable::HasStringCells( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow ) const
{
if ( ValidCol(nEndCol) )
for ( SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++ )
if (aCol[nCol].HasStringCells(nStartRow, nEndRow))
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
@@ -1209,8 +1209,8 @@ void ScTable::SetDirtyVar()
void ScTable::SetDirty()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetDirty();
pDocument->SetAutoCalc( bOldAutoCalc );
@@ -1219,8 +1219,8 @@ void ScTable::SetDirty()
void ScTable::SetDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
SCCOL nCol2 = rRange.aEnd.Col();
for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++)
aCol[i].SetDirty( rRange );
@@ -1230,8 +1230,8 @@ void ScTable::SetDirty( const ScRange& rRange )
void ScTable::SetTableOpDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // no multiple recalculation
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( false ); // no multiple recalculation
SCCOL nCol2 = rRange.aEnd.Col();
for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++)
aCol[i].SetTableOpDirty( rRange );
@@ -1241,8 +1241,8 @@ void ScTable::SetTableOpDirty( const ScRange& rRange )
void ScTable::SetDirtyAfterLoad()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetDirtyAfterLoad();
pDocument->SetAutoCalc( bOldAutoCalc );
@@ -1251,8 +1251,8 @@ void ScTable::SetDirtyAfterLoad()
void ScTable::SetRelNameDirty()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetRelNameDirty();
pDocument->SetAutoCalc( bOldAutoCalc );
@@ -1304,7 +1304,7 @@ void ScTable::ResetChanged( const ScRange& rRange )
// Attribute
-const SfxPoolItem* ScTable::GetAttr( SCCOL nCol, SCROW nRow, USHORT nWhich ) const
+const SfxPoolItem* ScTable::GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].GetAttr( nRow, nWhich );
@@ -1313,7 +1313,7 @@ const SfxPoolItem* ScTable::GetAttr( SCCOL nCol, SCROW nRow, USHORT nWhich ) con
}
-ULONG ScTable::GetNumberFormat( SCCOL nCol, SCROW nRow ) const
+sal_uLong ScTable::GetNumberFormat( SCCOL nCol, SCROW nRow ) const
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].GetNumberFormat( nRow );
@@ -1351,7 +1351,7 @@ const ScPatternAttr* ScTable::GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, S
}
-bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nMask ) const
+bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nMask ) const
{
bool bFound = false;
for (SCCOL i=nCol1; i<=nCol2 && !bFound; i++)
@@ -1360,7 +1360,7 @@ bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
}
-bool ScTable::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
+bool ScTable::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const
{
bool bFound = false;
for (SCCOL i=0; i<=MAXCOL && !bFound; i++)
@@ -1371,7 +1371,7 @@ bool ScTable::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- BOOL bRefresh, BOOL bAttrs )
+ sal_Bool bRefresh, sal_Bool bAttrs )
{
if (!(ValidCol(nStartCol) && ValidCol(rEndCol)))
{
@@ -1387,14 +1387,14 @@ bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
}
-BOOL ScTable::IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes ) const
+sal_Bool ScTable::IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes ) const
{
if (!(ValidCol(nCol1) && ValidCol(nCol2)))
{
DBG_ERRORFILE("ScTable::IsBlockEmpty: invalid column number");
- return FALSE;
+ return false;
}
- BOOL bEmpty = TRUE;
+ sal_Bool bEmpty = sal_True;
for (SCCOL i=nCol1; i<=nCol2 && bEmpty; i++)
bEmpty = aCol[i].IsEmptyBlock( nRow1, nRow2, bIgnoreNotes );
return bEmpty;
@@ -1406,10 +1406,10 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
{
// Rueckgabe = neues nArrY
- BYTE nRotDir = pPattern->GetRotateDir( pCondSet );
+ sal_uInt8 nRotDir = pPattern->GetRotateDir( pCondSet );
if ( nRotDir != SC_ROTDIR_NONE )
{
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
if ( nCol+1 < nX1 ) // column to the left
bHit = ( nRotDir != SC_ROTDIR_LEFT );
else if ( nCol > nX2+1 ) // column to the right
@@ -1437,7 +1437,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
{
if (!RowHidden(nRow))
{
- BOOL bHitOne = TRUE;
+ sal_Bool bHitOne = sal_True;
if ( nCol > nX2+1 )
{
// reicht die gedrehte Zelle bis in den sichtbaren Bereich?
@@ -1451,7 +1451,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
nWidth += GetColWidth( nTouchedCol );
}
if ( nTouchedCol > nX2 )
- bHitOne = FALSE;
+ bHitOne = false;
}
if (bHitOne)
@@ -1494,13 +1494,13 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
while ( pPattern )
{
const SfxPoolItem* pCondItem;
- if ( pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, TRUE, &pCondItem )
+ if ( pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, sal_True, &pCondItem )
== SFX_ITEM_SET )
{
// alle Formate durchgehen, damit die Zellen nicht einzeln
// angeschaut werden muessen
- ULONG nIndex = ((const SfxUInt32Item*)pCondItem)->GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item*)pCondItem)->GetValue();
ScConditionalFormatList* pList = pDocument->GetCondFormList();
ScStyleSheetPool* pStylePool = pDocument->GetStyleSheetPool();
if (pList && pStylePool && nIndex)
@@ -1508,8 +1508,8 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
const ScConditionalFormat* pFormat = pList->GetFormat(nIndex);
if ( pFormat )
{
- USHORT nEntryCount = pFormat->Count();
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ sal_uInt16 nEntryCount = pFormat->Count();
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aStyleName = pFormat->GetEntry(nEntry)->GetStyle();
if (aStyleName.Len())
@@ -1539,62 +1539,62 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
}
}
-BOOL ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const
+sal_Bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const
{
// nix:0, mitte:1, unten:2, links:4, oben:8, rechts:16, offen:32
- USHORT nEdges;
+ sal_uInt16 nEdges;
if ( nCol1 == nCol2 )
{ // linke und rechte Spalte
- const USHORT n = 4 | 16;
+ const sal_uInt16 n = 4 | 16;
nEdges = aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2, n );
// nicht (4 und 16) oder 1 oder 32
if ( nEdges && (((nEdges & n) != n) || (nEdges & 33)) )
- return TRUE; // linke oder rechte Kante fehlt oder offen
+ return sal_True; // linke oder rechte Kante fehlt oder offen
}
else
{ // linke Spalte
nEdges = aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2, 4 );
// nicht 4 oder 1 oder 32
if ( nEdges && (((nEdges & 4) != 4) || (nEdges & 33)) )
- return TRUE; // linke Kante fehlt oder offen
+ return sal_True; // linke Kante fehlt oder offen
// rechte Spalte
nEdges = aCol[nCol2].GetBlockMatrixEdges( nRow1, nRow2, 16 );
// nicht 16 oder 1 oder 32
if ( nEdges && (((nEdges & 16) != 16) || (nEdges & 33)) )
- return TRUE; // rechte Kante fehlt oder offen
+ return sal_True; // rechte Kante fehlt oder offen
}
if ( nRow1 == nRow2 )
{ // obere und untere Zeile
- BOOL bOpen = FALSE;
- const USHORT n = 2 | 8;
+ sal_Bool bOpen = false;
+ const sal_uInt16 n = 2 | 8;
for ( SCCOL i=nCol1; i<=nCol2; i++)
{
nEdges = aCol[i].GetBlockMatrixEdges( nRow1, nRow1, n );
if ( nEdges )
{
if ( (nEdges & n) != n )
- return TRUE; // obere oder untere Kante fehlt
+ return sal_True; // obere oder untere Kante fehlt
if ( nEdges & 4 )
- bOpen = TRUE; // linke Kante oeffnet, weitersehen
+ bOpen = sal_True; // linke Kante oeffnet, weitersehen
else if ( !bOpen )
- return TRUE; // es gibt was, was nicht geoeffnet wurde
+ return sal_True; // es gibt was, was nicht geoeffnet wurde
if ( nEdges & 16 )
- bOpen = FALSE; // rechte Kante schliesst
+ bOpen = false; // rechte Kante schliesst
}
}
if ( bOpen )
- return TRUE; // es geht noch weiter
+ return sal_True; // es geht noch weiter
}
else
{
- USHORT j, n;
+ sal_uInt16 j, n;
SCROW nR;
// erst obere Zeile, dann untere Zeile
for ( j=0, nR=nRow1, n=8; j<2; j++, nR=nRow2, n=2 )
{
- BOOL bOpen = FALSE;
+ sal_Bool bOpen = false;
for ( SCCOL i=nCol1; i<=nCol2; i++)
{
nEdges = aCol[i].GetBlockMatrixEdges( nR, nR, n );
@@ -1603,20 +1603,20 @@ BOOL ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
// in oberere Zeile keine obere Kante bzw.
// in unterer Zeile keine untere Kante
if ( (nEdges & n) != n )
- return TRUE;
+ return sal_True;
if ( nEdges & 4 )
- bOpen = TRUE; // linke Kante oeffnet, weitersehen
+ bOpen = sal_True; // linke Kante oeffnet, weitersehen
else if ( !bOpen )
- return TRUE; // es gibt was, was nicht geoeffnet wurde
+ return sal_True; // es gibt was, was nicht geoeffnet wurde
if ( nEdges & 16 )
- bOpen = FALSE; // rechte Kante schliesst
+ bOpen = false; // rechte Kante schliesst
}
}
if ( bOpen )
- return TRUE; // es geht noch weiter
+ return sal_True; // es geht noch weiter
}
}
- return FALSE;
+ return false;
}
@@ -1629,35 +1629,35 @@ bool ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const
}
-BOOL ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
- SCROW nRow2, BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+sal_Bool ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
+ SCROW nRow2, sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
if ( !ValidColRow( nCol2, nRow2 ) )
{
DBG_ERRORFILE("IsBlockEditable: invalid column or row");
if (pOnlyNotBecauseOfMatrix)
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
+ return false;
}
- BOOL bIsEditable = TRUE;
+ sal_Bool bIsEditable = sal_True;
if ( nLockCount )
- bIsEditable = FALSE;
+ bIsEditable = false;
else if ( IsProtected() && !pDocument->IsScenario(nTab) )
{
- if((bIsEditable = !HasAttrib( nCol1, nRow1, nCol2, nRow2, HASATTR_PROTECTED )) != FALSE)
+ if((bIsEditable = !HasAttrib( nCol1, nRow1, nCol2, nRow2, HASATTR_PROTECTED )) != false)
{
// If Sheet is protected and cells are not protected then
// check the active scenario protect flag if this range is
// on the active scenario range. Note the 'copy back' must also
// be set to apply protection.
- USHORT nScenTab = nTab+1;
+ sal_uInt16 nScenTab = nTab+1;
while(pDocument->IsScenario(nScenTab))
{
ScRange aEditRange(nCol1, nRow1, nScenTab, nCol2, nRow2, nScenTab);
if(pDocument->IsActiveScenario(nScenTab) && pDocument->HasScenarioRange(nScenTab, aEditRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nScenTab,nFlags);
bIsEditable = !((nFlags & SC_SCENARIO_PROTECT) && (nFlags & SC_SCENARIO_TWOWAY));
break;
@@ -1681,7 +1681,7 @@ BOOL ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
ScRange aEditRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab);
if(pDocument->HasScenarioRange(nTab, aEditRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nTab,nFlags);
bIsEditable = !(nFlags & SC_SCENARIO_PROTECT);
}
@@ -1691,34 +1691,34 @@ BOOL ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
{
if ( HasBlockMatrixFragment( nCol1, nRow1, nCol2, nRow2 ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = TRUE;
+ *pOnlyNotBecauseOfMatrix = sal_True;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
return bIsEditable;
}
-BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark,
- BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+sal_Bool ScTable::IsSelectionEditable( const ScMarkData& rMark,
+ sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
- BOOL bIsEditable = TRUE;
+ sal_Bool bIsEditable = sal_True;
if ( nLockCount )
- bIsEditable = FALSE;
+ bIsEditable = false;
else if ( IsProtected() && !pDocument->IsScenario(nTab) )
{
- if((bIsEditable = !HasAttribSelection( rMark, HASATTR_PROTECTED )) != FALSE)
+ if((bIsEditable = !HasAttribSelection( rMark, HASATTR_PROTECTED )) != false)
{
// If Sheet is protected and cells are not protected then
// check the active scenario protect flag if this area is
// in the active scenario range.
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
SCTAB nScenTab = nTab+1;
while(pDocument->IsScenario(nScenTab) && bIsEditable)
{
@@ -1729,7 +1729,7 @@ BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark,
ScRange aRange = *aRanges[ i ];
if(pDocument->HasScenarioRange(nScenTab, aRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nScenTab,nFlags);
bIsEditable = !((nFlags & SC_SCENARIO_PROTECT) && (nFlags & SC_SCENARIO_TWOWAY));
}
@@ -1752,13 +1752,13 @@ BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark,
if(pDocument->IsTabProtected(nActualTab))
{
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
for (size_t i = 0, nRange = aRanges.size(); (i < nRange) && bIsEditable; i++)
{
ScRange aRange = *aRanges[ i ];
if(pDocument->HasScenarioRange(nTab, aRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nTab,nFlags);
bIsEditable = !(nFlags & SC_SCENARIO_PROTECT);
}
@@ -1769,15 +1769,15 @@ BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark,
{
if ( HasSelectionMatrixFragment( rMark ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = TRUE;
+ *pOnlyNotBecauseOfMatrix = sal_True;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = false;
return bIsEditable;
}
@@ -1800,7 +1800,7 @@ void ScTable::UnlockTable()
}
-void ScTable::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, BOOL bDeep ) const
+void ScTable::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, sal_Bool bDeep ) const
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].MergeSelectionPattern( rState, rMark, bDeep );
@@ -1808,7 +1808,7 @@ void ScTable::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkDa
void ScTable::MergePatternArea( ScMergePatternState& rState, SCCOL nCol1, SCROW nRow1,
- SCCOL nCol2, SCROW nRow2, BOOL bDeep ) const
+ SCCOL nCol2, SCROW nRow2, sal_Bool bDeep ) const
{
for (SCCOL i=nCol1; i<=nCol2; i++)
aCol[i].MergePatternArea( rState, nRow1, nRow2, bDeep );
@@ -1909,7 +1909,7 @@ void ScTable::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData&
void ScTable::ApplySelectionLineStyle( const ScMarkData& rMark,
- const SvxBorderLine* pLine, BOOL bColorOnly )
+ const SvxBorderLine* pLine, sal_Bool bColorOnly )
{
if ( bColorOnly && !pLine )
return;
@@ -1928,11 +1928,11 @@ const ScStyleSheet* ScTable::GetStyle( SCCOL nCol, SCROW nRow ) const
}
-const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, BOOL& rFound ) const
+const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, sal_Bool& rFound ) const
{
- rFound = FALSE;
+ rFound = false;
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = true;
bool bColFound;
const ScStyleSheet* pStyle = NULL;
@@ -1944,9 +1944,9 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, BOOL& r
pNewStyle = aCol[i].GetSelectionStyle( rMark, bColFound );
if (bColFound)
{
- rFound = TRUE;
+ rFound = sal_True;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = false; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -1955,12 +1955,12 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, BOOL& r
}
-const ScStyleSheet* ScTable::GetAreaStyle( BOOL& rFound, SCCOL nCol1, SCROW nRow1,
+const ScStyleSheet* ScTable::GetAreaStyle( sal_Bool& rFound, SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2 ) const
{
- rFound = FALSE;
+ rFound = false;
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = true;
bool bColFound;
const ScStyleSheet* pStyle = NULL;
@@ -1971,9 +1971,9 @@ const ScStyleSheet* ScTable::GetAreaStyle( BOOL& rFound, SCCOL nCol1, SCROW nRow
pNewStyle = aCol[i].GetAreaStyle(bColFound, nRow1, nRow2);
if (bColFound)
{
- rFound = TRUE;
+ rFound = sal_True;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = false; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -1982,17 +1982,17 @@ const ScStyleSheet* ScTable::GetAreaStyle( BOOL& rFound, SCCOL nCol1, SCROW nRow
}
-BOOL ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const
+sal_Bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const
{
- BOOL bIsUsed = FALSE;
+ sal_Bool bIsUsed = false;
for ( SCCOL i=0; i<=MAXCOL; i++ )
{
if ( aCol[i].IsStyleSheetUsed( rStyle, bGatherAllStyles ) )
{
if ( !bGatherAllStyles )
- return TRUE;
- bIsUsed = TRUE;
+ return sal_True;
+ bIsUsed = sal_True;
}
}
@@ -2000,7 +2000,7 @@ BOOL ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyle
}
-void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRemoved,
+void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY )
@@ -2019,7 +2019,7 @@ void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRem
SCROW nEndRow = aData.mnRow2;
if (aData.mbValue)
- SetOptimalHeight(nRow, nEndRow, 0, pDev, nPPTX, nPPTY, rZoomX, rZoomY, FALSE);
+ SetOptimalHeight(nRow, nEndRow, 0, pDev, nPPTX, nPPTY, rZoomX, rZoomY, false);
nRow = nEndRow + 1;
}
@@ -2048,7 +2048,7 @@ bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
}
-void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, BOOL bPutToPool )
+void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, sal_Bool bPutToPool )
{
if (ValidColRow(nCol,nRow))
aCol[nCol].SetPattern( nRow, rAttr, bPutToPool );
@@ -2070,14 +2070,14 @@ void ScTable::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& r
}
-void ScTable::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark )
+void ScTable::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark )
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].ChangeSelectionIndent( bIncrement, rMark );
}
-void ScTable::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark )
+void ScTable::ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark )
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].ClearSelectionItems( pWhich, rMark );
@@ -2086,7 +2086,7 @@ void ScTable::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark
// Spaltenbreiten / Zeilenhoehen
-void ScTable::SetColWidth( SCCOL nCol, USHORT nNewWidth )
+void ScTable::SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth )
{
if (VALIDCOL(nCol) && pColWidth)
{
@@ -2111,7 +2111,7 @@ void ScTable::SetColWidth( SCCOL nCol, USHORT nNewWidth )
}
}
-void ScTable::SetColWidthOnly( SCCOL nCol, USHORT nNewWidth )
+void ScTable::SetColWidthOnly( SCCOL nCol, sal_uInt16 nNewWidth )
{
if (!VALIDCOL(nCol) || !pColWidth)
return;
@@ -2123,7 +2123,7 @@ void ScTable::SetColWidthOnly( SCCOL nCol, USHORT nNewWidth )
pColWidth[nCol] = nNewWidth;
}
-void ScTable::SetRowHeight( SCROW nRow, USHORT nNewHeight )
+void ScTable::SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight )
{
if (VALIDROW(nRow) && mpRowHeights)
{
@@ -2180,10 +2180,10 @@ bool lcl_pixelSizeChanged(
}
-BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeight,
+sal_Bool ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight,
double /* nPPTX */, double nPPTY )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && mpRowHeights)
{
if (!nNewHeight)
@@ -2192,18 +2192,18 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
nNewHeight = ScGlobal::nStdRowHeight;
}
- BOOL bSingle = FALSE; // TRUE = process every row for its own
+ sal_Bool bSingle = false; // sal_True = process every row for its own
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer)
if (pDrawLayer->HasObjectsInRows( nTab, nStartRow, nEndRow ))
- bSingle = TRUE;
+ bSingle = sal_True;
if (bSingle)
{
ScFlatUInt16RowSegments::RangeData aData;
mpRowHeights->getRangeData(nStartRow, aData);
if (nNewHeight == aData.mnValue && nEndRow <= aData.mnRow2)
- bSingle = FALSE; // no difference in this range
+ bSingle = false; // no difference in this range
}
if (bSingle)
{
@@ -2218,9 +2218,9 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
{
SCROW nMid = (nStartRow+nEndRow) / 2;
if (SetRowHeightRange( nStartRow, nMid, nNewHeight, 1.0, 1.0 ))
- bChanged = TRUE;
+ bChanged = sal_True;
if (SetRowHeightRange( nMid+1, nEndRow, nNewHeight, 1.0, 1.0 ))
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -2243,7 +2243,7 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
return bChanged;
}
-void ScTable::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeight )
+void ScTable::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight )
{
if (!ValidRow(nStartRow) || !ValidRow(nEndRow) || !mpRowHeights)
return;
@@ -2254,14 +2254,14 @@ void ScTable::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeigh
mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
}
-void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual )
+void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bManual )
{
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && pRowFlags)
{
if (bManual)
pRowFlags->OrValue( nStartRow, nEndRow, CR_MANUALSIZE);
else
- pRowFlags->AndValue( nStartRow, nEndRow, sal::static_int_cast<BYTE>(~CR_MANUALSIZE));
+ pRowFlags->AndValue( nStartRow, nEndRow, sal::static_int_cast<sal_uInt8>(~CR_MANUALSIZE));
}
else
{
@@ -2270,7 +2270,7 @@ void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual )
}
-USHORT ScTable::GetColWidth( SCCOL nCol ) const
+sal_uInt16 ScTable::GetColWidth( SCCOL nCol ) const
{
DBG_ASSERT(VALIDCOL(nCol),"Falsche Spaltennummer");
@@ -2282,22 +2282,22 @@ USHORT ScTable::GetColWidth( SCCOL nCol ) const
return pColWidth[nCol];
}
else
- return (USHORT) STD_COL_WIDTH;
+ return (sal_uInt16) STD_COL_WIDTH;
}
-USHORT ScTable::GetOriginalWidth( SCCOL nCol ) const // immer die eingestellte
+sal_uInt16 ScTable::GetOriginalWidth( SCCOL nCol ) const // immer die eingestellte
{
DBG_ASSERT(VALIDCOL(nCol),"Falsche Spaltennummer");
if (VALIDCOL(nCol) && pColWidth)
return pColWidth[nCol];
else
- return (USHORT) STD_COL_WIDTH;
+ return (sal_uInt16) STD_COL_WIDTH;
}
-USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
+sal_uInt16 ScTable::GetCommonWidth( SCCOL nEndCol )
{
// get the width that is used in the largest continuous column range (up to nEndCol)
@@ -2307,8 +2307,8 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
nEndCol = MAXCOL;
}
- USHORT nMaxWidth = 0;
- USHORT nMaxCount = 0;
+ sal_uInt16 nMaxWidth = 0;
+ sal_uInt16 nMaxCount = 0;
SCCOL nRangeStart = 0;
while ( nRangeStart <= nEndCol )
{
@@ -2317,8 +2317,8 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
++nRangeStart;
if ( nRangeStart <= nEndCol )
{
- USHORT nThisCount = 0;
- USHORT nThisWidth = pColWidth[nRangeStart];
+ sal_uInt16 nThisCount = 0;
+ sal_uInt16 nThisWidth = pColWidth[nRangeStart];
SCCOL nRangeEnd = nRangeStart;
while ( nRangeEnd <= nEndCol && pColWidth[nRangeEnd] == nThisWidth )
{
@@ -2344,7 +2344,7 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
}
-USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
+sal_uInt16 ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
{
DBG_ASSERT(VALIDROW(nRow),"Invalid row number");
@@ -2382,18 +2382,18 @@ USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool
*pStartRow = nRow;
if (pEndRow)
*pEndRow = nRow;
- return (USHORT) ScGlobal::nStdRowHeight;
+ return (sal_uInt16) ScGlobal::nStdRowHeight;
}
}
-ULONG ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const
+sal_uLong ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const
{
DBG_ASSERT(VALIDROW(nStartRow) && VALIDROW(nEndRow),"Falsche Zeilennummer");
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && mpRowHeights)
{
- ULONG nHeight = 0;
+ sal_uLong nHeight = 0;
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
{
@@ -2409,17 +2409,17 @@ ULONG ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const
return nHeight;
}
else
- return (ULONG) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight);
+ return (sal_uLong) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight);
}
-ULONG ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const
+sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const
{
DBG_ASSERT(VALIDROW(nStartRow) && VALIDROW(nEndRow),"Falsche Zeilennummer");
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && mpRowHeights)
{
- ULONG nHeight = 0;
+ sal_uLong nHeight = 0;
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
{
@@ -2429,25 +2429,25 @@ ULONG ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale
if (nLastRow > nEndRow)
nLastRow = nEndRow;
sal_uInt32 nThisHeight = mpRowHeights->getSumValue(nRow, nLastRow);
- nHeight += static_cast<ULONG>(nThisHeight * fScale);
+ nHeight += static_cast<sal_uLong>(nThisHeight * fScale);
}
nRow = nLastRow + 1;
}
return nHeight;
}
else
- return (ULONG) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight * fScale);
+ return (sal_uLong) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight * fScale);
}
-USHORT ScTable::GetOriginalHeight( SCROW nRow ) const // non-0 even if hidden
+sal_uInt16 ScTable::GetOriginalHeight( SCROW nRow ) const // non-0 even if hidden
{
DBG_ASSERT(VALIDROW(nRow),"wrong row number");
if (VALIDROW(nRow) && mpRowHeights)
return mpRowHeights->getValue(nRow);
else
- return (USHORT) ScGlobal::nStdRowHeight;
+ return (sal_uInt16) ScGlobal::nStdRowHeight;
}
@@ -2555,7 +2555,7 @@ void ScTable::DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
if (nEndRow > nRow2)
nEndRow = nRow2;
- BOOL bChanged = ( bWasVis != bShow );
+ sal_Bool bChanged = ( bWasVis != bShow );
SetRowHidden(nStartRow, nEndRow, !bShow);
SetRowFiltered(nStartRow, nEndRow, !bShow);
@@ -2595,7 +2595,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
if (nEndRow > nRow2)
nEndRow = nRow2;
- BOOL bChanged = ( bWasVis != bShow );
+ sal_Bool bChanged = ( bWasVis != bShow );
SetRowHidden(nStartRow, nEndRow, !bShow);
if (bShow)
@@ -2625,7 +2625,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
}
-void ScTable::SetColFlags( SCCOL nCol, BYTE nNewFlags )
+void ScTable::SetColFlags( SCCOL nCol, sal_uInt8 nNewFlags )
{
if (VALIDCOL(nCol) && pColFlags)
pColFlags[nCol] = nNewFlags;
@@ -2636,7 +2636,7 @@ void ScTable::SetColFlags( SCCOL nCol, BYTE nNewFlags )
}
-void ScTable::SetRowFlags( SCROW nRow, BYTE nNewFlags )
+void ScTable::SetRowFlags( SCROW nRow, sal_uInt8 nNewFlags )
{
if (VALIDROW(nRow) && pRowFlags)
pRowFlags->SetValue( nRow, nNewFlags);
@@ -2647,7 +2647,7 @@ void ScTable::SetRowFlags( SCROW nRow, BYTE nNewFlags )
}
-void ScTable::SetRowFlags( SCROW nStartRow, SCROW nEndRow, BYTE nNewFlags )
+void ScTable::SetRowFlags( SCROW nStartRow, SCROW nEndRow, sal_uInt8 nNewFlags )
{
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && pRowFlags)
pRowFlags->SetValue( nStartRow, nEndRow, nNewFlags);
@@ -2658,7 +2658,7 @@ void ScTable::SetRowFlags( SCROW nStartRow, SCROW nEndRow, BYTE nNewFlags )
}
-BYTE ScTable::GetColFlags( SCCOL nCol ) const
+sal_uInt8 ScTable::GetColFlags( SCCOL nCol ) const
{
if (VALIDCOL(nCol) && pColFlags)
return pColFlags[nCol];
@@ -2667,7 +2667,7 @@ BYTE ScTable::GetColFlags( SCCOL nCol ) const
}
-BYTE ScTable::GetRowFlags( SCROW nRow ) const
+sal_uInt8 ScTable::GetRowFlags( SCROW nRow ) const
{
if (VALIDROW(nRow) && pRowFlags)
return pRowFlags->GetValue(nRow);
@@ -2681,7 +2681,7 @@ SCROW ScTable::GetLastFlaggedRow() const
SCROW nLastFound = 0;
if (pRowFlags)
{
- SCROW nRow = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast<BYTE>(CR_ALL) );
+ SCROW nRow = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast<sal_uInt8>(CR_ALL) );
if (ValidRow(nRow))
nLastFound = nRow;
}
@@ -2739,24 +2739,24 @@ SCROW ScTable::GetLastChangedRow() const
}
-BOOL ScTable::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, BOOL bShow )
+sal_Bool ScTable::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, sal_Bool bShow )
{
if (pOutlineTable && pColFlags)
{
- ScBitMaskCompressedArray< SCCOLROW, BYTE> aArray( MAXCOL, pColFlags, MAXCOLCOUNT);
+ ScBitMaskCompressedArray< SCCOLROW, sal_uInt8> aArray( MAXCOL, pColFlags, MAXCOLCOUNT);
return pOutlineTable->GetColArray()->ManualAction( nStartCol, nEndCol, bShow, *this, true );
}
else
- return FALSE;
+ return false;
}
-BOOL ScTable::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, BOOL bShow )
+sal_Bool ScTable::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, sal_Bool bShow )
{
if (pOutlineTable && pRowFlags)
return pOutlineTable->GetRowArray()->ManualAction( nStartRow, nEndRow, bShow, *this, false );
else
- return FALSE;
+ return false;
}
@@ -2830,12 +2830,12 @@ short DiffSign( T a, T b )
void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
{
- BOOL bSizeChanged = FALSE;
+ sal_Bool bSizeChanged = false;
SCCOL nCol;
SCROW nRow;
SCROW i;
- BOOL bFound;
+ sal_Bool bFound;
ScOutlineArray* pArray;
ScBaseCell* pCell;
ScRange aRef;
@@ -2847,7 +2847,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
SCROW nCount = nEndRow-nStartRow+1;
bool* pUsed = new bool[nCount];
for (i=0; i<nCount; i++)
- pUsed[i] = FALSE;
+ pUsed[i] = false;
for (nCol=nStartCol; nCol<=nEndCol; nCol++)
if (!aCol[nCol].IsEmptyData())
aCol[nCol].FindUsed( nStartRow, nEndRow, pUsed );
@@ -2856,7 +2856,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
for (nRow=nStartRow; nRow<=nEndRow; nRow++)
if (pUsed[nRow-nStartRow])
{
- bFound = FALSE;
+ bFound = false;
for (nCol=nStartCol; nCol<=nEndCol && !bFound; nCol++)
if (!aCol[nCol].IsEmptyData())
{
@@ -2871,7 +2871,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
if (pArray->Insert( aRef.aStart.Row(), aRef.aEnd.Row(), bSizeChanged ))
{
- bFound = TRUE;
+ bFound = true;
}
}
}
@@ -2886,7 +2886,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
if (!aCol[nCol].IsEmptyData())
{
- bFound = FALSE;
+ bFound = false;
ScColumnIterator aIter( &aCol[nCol], nStartRow, nEndRow );
while ( aIter.Next( nRow, pCell ) && !bFound )
{
@@ -2899,7 +2899,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
if (pArray->Insert( aRef.aStart.Col(), aRef.aEnd.Col(), bSizeChanged ))
{
- bFound = TRUE;
+ bFound = true;
}
}
}
@@ -2917,7 +2917,7 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
ScAddress aSrc( nStartCol, nStartRow, nTab );
ScAddress aDest( nDestCol, nDestRow, nDestTab );
ScRange aRange( aSrc, aDest );
- BOOL bThisTab = ( nDestTab == nTab );
+ sal_Bool bThisTab = ( nDestTab == nTab );
SCROW nDestY = nDestRow;
for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
{
@@ -2944,12 +2944,12 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
if (bThisTab)
{
PutCell( nDestX, nDestY, pCell );
- SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ), TRUE );
+ SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ), sal_True );
}
else
{
pDocument->PutCell( aDest, pCell );
- pDocument->SetPattern( aDest, *GetPattern( nCol, nRow ), TRUE );
+ pDocument->SetPattern( aDest, *GetPattern( nCol, nRow ), sal_True );
}
++nDestX;
@@ -2959,7 +2959,7 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
}
-BOOL ScTable::RefVisible(ScFormulaCell* pCell)
+sal_Bool ScTable::RefVisible(ScFormulaCell* pCell)
{
ScRange aRef;
@@ -2973,12 +2973,12 @@ BOOL ScTable::RefVisible(ScFormulaCell* pCell)
nEndRow = ::std::numeric_limits<SCROW>::max();
if (!ValidRow(nEndRow) || nEndRow < aRef.aEnd.Row())
- return TRUE; // at least partly visible
- return FALSE; // completely invisible
+ return sal_True; // at least partly visible
+ return false; // completely invisible
}
}
- return TRUE; // irgendwie anders
+ return sal_True; // irgendwie anders
}
@@ -3015,13 +3015,13 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos
// #i102616# actions that modify the draw page size count as sheet modification
// (exception: InitDrawLayer)
if (bResetStreamValid && IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
-ULONG ScTable::GetRowOffset( SCROW nRow ) const
+sal_uLong ScTable::GetRowOffset( SCROW nRow ) const
{
- ULONG n = 0;
+ sal_uLong n = 0;
if ( mpHiddenRows && mpRowHeights )
{
if (nRow == 0)
@@ -3042,7 +3042,7 @@ ULONG ScTable::GetRowOffset( SCROW nRow ) const
return n;
}
-SCROW ScTable::GetRowForHeight(ULONG nHeight) const
+SCROW ScTable::GetRowForHeight(sal_uLong nHeight) const
{
sal_uInt32 nSum = 0;
@@ -3069,9 +3069,9 @@ SCROW ScTable::GetRowForHeight(ULONG nHeight) const
}
-ULONG ScTable::GetColOffset( SCCOL nCol ) const
+sal_uLong ScTable::GetColOffset( SCCOL nCol ) const
{
- ULONG n = 0;
+ sal_uLong n = 0;
if ( pColWidth )
{
SCCOL i;
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index c7f067e39038..a2b4556e2738 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -143,15 +143,15 @@ bool SplitString( const rtl::OUString &sWhole,
sInput2 is greater.
*/
short Compare( const String &sInput1, const String &sInput2,
- const BOOL bCaseSens, const ScUserListData* pData, const CollatorWrapper *pCW )
+ const sal_Bool bCaseSens, const ScUserListData* pData, const CollatorWrapper *pCW )
{
rtl::OUString sStr1( sInput1 ), sStr2( sInput2 ), sPre1, sSuf1, sPre2, sSuf2;
do
{
double nNum1, nNum2;
- BOOL bNumFound1 = SplitString( sStr1, sPre1, sSuf1, nNum1 );
- BOOL bNumFound2 = SplitString( sStr2, sPre2, sSuf2, nNum2 );
+ sal_Bool bNumFound1 = SplitString( sStr1, sPre1, sSuf1, nNum1 );
+ sal_Bool bNumFound2 = SplitString( sStr2, sPre2, sSuf2, nNum2 );
short nPreRes; // Prefix comparison result
if ( pData )
@@ -203,7 +203,7 @@ short Compare( const String &sInput1, const String &sInput2,
// STATIC DATA -----------------------------------------------------------
-const USHORT nMaxSorts = 3; // maximale Anzahl Sortierkriterien in aSortParam
+const sal_uInt16 nMaxSorts = 3; // maximale Anzahl Sortierkriterien in aSortParam
struct ScSortInfo
{
@@ -211,7 +211,7 @@ struct ScSortInfo
SCCOLROW nOrg;
DECL_FIXEDMEMPOOL_NEWDEL( ScSortInfo );
};
-const USHORT nMemPoolSortInfo = (0x8000 - 64) / sizeof(ScSortInfo);
+const sal_uInt16 nMemPoolSortInfo = (0x8000 - 64) / sizeof(ScSortInfo);
IMPL_FIXEDMEMPOOL_NEWDEL( ScSortInfo, nMemPoolSortInfo, nMemPoolSortInfo )
// END OF STATIC DATA -----------------------------------------------------
@@ -223,14 +223,14 @@ private:
ScSortInfo** pppInfo[nMaxSorts];
SCSIZE nCount;
SCCOLROW nStart;
- USHORT nUsedSorts;
+ sal_uInt16 nUsedSorts;
public:
- ScSortInfoArray( USHORT nSorts, SCCOLROW nInd1, SCCOLROW nInd2 ) :
+ ScSortInfoArray( sal_uInt16 nSorts, SCCOLROW nInd1, SCCOLROW nInd2 ) :
nCount( nInd2 - nInd1 + 1 ), nStart( nInd1 ),
nUsedSorts( Min( nSorts, nMaxSorts ) )
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
ScSortInfo** ppInfo = new ScSortInfo* [nCount];
for ( SCSIZE j = 0; j < nCount; j++ )
@@ -240,7 +240,7 @@ public:
}
~ScSortInfoArray()
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
ScSortInfo** ppInfo = pppInfo[nSort];
for ( SCSIZE j = 0; j < nCount; j++ )
@@ -248,13 +248,13 @@ public:
delete [] ppInfo;
}
}
- ScSortInfo* Get( USHORT nSort, SCCOLROW nInd )
+ ScSortInfo* Get( sal_uInt16 nSort, SCCOLROW nInd )
{ return (pppInfo[nSort])[ nInd - nStart ]; }
void Swap( SCCOLROW nInd1, SCCOLROW nInd2 )
{
SCSIZE n1 = static_cast<SCSIZE>(nInd1 - nStart);
SCSIZE n2 = static_cast<SCSIZE>(nInd2 - nStart);
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
ScSortInfo** ppInfo = pppInfo[nSort];
ScSortInfo* pTmp = ppInfo[n1];
@@ -262,7 +262,7 @@ public:
ppInfo[n2] = pTmp;
}
}
- USHORT GetUsedSorts() { return nUsedSorts; }
+ sal_uInt16 GetUsedSorts() { return nUsedSorts; }
ScSortInfo** GetFirstArray() { return pppInfo[0]; }
SCCOLROW GetStart() { return nStart; }
SCSIZE GetCount() { return nCount; }
@@ -270,13 +270,13 @@ public:
ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 )
{
- USHORT nUsedSorts = 1;
+ sal_uInt16 nUsedSorts = 1;
while ( nUsedSorts < nMaxSorts && aSortParam.bDoSort[nUsedSorts] )
nUsedSorts++;
ScSortInfoArray* pArray = new ScSortInfoArray( nUsedSorts, nInd1, nInd2 );
if ( aSortParam.bByRow )
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
SCCOL nCol = static_cast<SCCOL>(aSortParam.nField[nSort]);
ScColumn* pCol = &aCol[nCol];
@@ -291,7 +291,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 )
}
else
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
SCROW nRow = aSortParam.nField[nSort];
for ( SCCOL nCol = static_cast<SCCOL>(nInd1);
@@ -307,7 +307,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 )
}
-BOOL ScTable::IsSortCollatorGlobal() const
+sal_Bool ScTable::IsSortCollatorGlobal() const
{
return pSortCollator == ScGlobal::GetCollator() ||
pSortCollator == ScGlobal::GetCaseCollator();
@@ -345,7 +345,7 @@ void ScTable::DestroySortCollator()
void ScTable::SortReorder( ScSortInfoArray* pArray, ScProgress& rProgress )
{
- BOOL bByRow = aSortParam.bByRow;
+ sal_Bool bByRow = aSortParam.bByRow;
SCSIZE nCount = pArray->GetCount();
SCCOLROW nStart = pArray->GetStart();
ScSortInfo** ppInfo = pArray->GetFirstArray();
@@ -376,7 +376,7 @@ void ScTable::SortReorder( ScSortInfoArray* pArray, ScProgress& rProgress )
}
}
-short ScTable::CompareCell( USHORT nSort,
+short ScTable::CompareCell( sal_uInt16 nSort,
ScBaseCell* pCell1, SCCOL nCell1Col, SCROW nCell1Row,
ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row )
{
@@ -400,12 +400,12 @@ short ScTable::CompareCell( USHORT nSort,
{
if (pCell2)
{
- BOOL bStr1 = ( eType1 != CELLTYPE_VALUE );
+ sal_Bool bStr1 = ( eType1 != CELLTYPE_VALUE );
if ( eType1 == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell1)->IsValue() )
- bStr1 = FALSE;
- BOOL bStr2 = ( eType2 != CELLTYPE_VALUE );
+ bStr1 = false;
+ sal_Bool bStr2 = ( eType2 != CELLTYPE_VALUE );
if ( eType2 == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell2)->IsValue() )
- bStr2 = FALSE;
+ bStr2 = false;
if ( bStr1 && bStr2 ) // nur Strings untereinander als String vergleichen!
{
@@ -420,9 +420,9 @@ short ScTable::CompareCell( USHORT nSort,
else
GetString(nCell2Col, nCell2Row, aStr2);
- BOOL bUserDef = aSortParam.bUserDef; // custom sort order
- BOOL bNaturalSort = aSortParam.bNaturalSort; // natural sort
- BOOL bCaseSens = aSortParam.bCaseSens; // case sensitivity
+ sal_Bool bUserDef = aSortParam.bUserDef; // custom sort order
+ sal_Bool bNaturalSort = aSortParam.bNaturalSort; // natural sort
+ sal_Bool bCaseSens = aSortParam.bCaseSens; // case sensitivity
if (bUserDef)
{
@@ -443,7 +443,7 @@ short ScTable::CompareCell( USHORT nSort,
}
}
else
- bUserDef = FALSE;
+ bUserDef = false;
}
if (!bUserDef)
@@ -498,7 +498,7 @@ short ScTable::CompareCell( USHORT nSort,
short ScTable::Compare( ScSortInfoArray* pArray, SCCOLROW nIndex1, SCCOLROW nIndex2 )
{
short nRes;
- USHORT nSort = 0;
+ sal_uInt16 nSort = 0;
do
{
ScSortInfo* pInfo1 = pArray->Get( nSort, nIndex1 );
@@ -577,8 +577,8 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2)
const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
if (pPat1 != pPat2)
{
- SetPattern(nCol1, nRow, *pPat2, TRUE);
- SetPattern(nCol2, nRow, *pPat1, TRUE);
+ SetPattern(nCol1, nRow, *pPat2, sal_True);
+ SetPattern(nCol2, nRow, *pPat1, sal_True);
}
}
}
@@ -595,8 +595,8 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
if (pPat1 != pPat2)
{
- SetPattern(nCol, nRow1, *pPat2, TRUE);
- SetPattern(nCol, nRow2, *pPat1, TRUE);
+ SetPattern(nCol, nRow1, *pPat2, sal_True);
+ SetPattern(nCol, nRow2, *pPat1, sal_True);
}
}
}
@@ -617,7 +617,7 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2)
{
short nRes;
- USHORT nSort = 0;
+ sal_uInt16 nSort = 0;
if (aSortParam.bByRow)
{
do
@@ -642,14 +642,14 @@ short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2)
return nRes;
}
-BOOL ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) // ueber aSortParam
+sal_Bool ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) // ueber aSortParam
{
for (SCCOLROW i=nStart; i<nEnd; i++)
{
if (Compare( i, i+1 ) > 0)
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void ScTable::DecoladeRow( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2 )
@@ -663,7 +663,7 @@ void ScTable::DecoladeRow( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2 )
}
}
-void ScTable::Sort(const ScSortParam& rSortParam, BOOL bKeepQuery)
+void ScTable::Sort(const ScSortParam& rSortParam, sal_Bool bKeepQuery)
{
aSortParam = rSortParam;
InitSortCollator( rSortParam );
@@ -718,7 +718,7 @@ void ScTable::Sort(const ScSortParam& rSortParam, BOOL bKeepQuery)
// Testen, ob beim Loeschen von Zwischenergebnissen andere Daten mit geloescht werden
// (fuer Hinweis-Box)
-BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
+sal_Bool ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
{
SCCOL nStartCol = rParam.nCol1;
SCROW nStartRow = rParam.nRow1 + 1; // Header
@@ -729,7 +729,7 @@ BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
SCROW nRow;
ScBaseCell* pCell;
- BOOL bWillDelete = FALSE;
+ sal_Bool bWillDelete = false;
for ( nCol=nStartCol; nCol<=nEndCol && !bWillDelete; nCol++ )
{
ScColumnIterator aIter( &aCol[nCol],nStartRow,nEndRow );
@@ -741,7 +741,7 @@ BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
for (SCCOL nTestCol=0; nTestCol<=MAXCOL; nTestCol++)
if (nTestCol<nStartCol || nTestCol>nEndCol)
if (aCol[nTestCol].HasDataAt(nRow))
- bWillDelete = TRUE;
+ bWillDelete = sal_True;
}
}
}
@@ -786,14 +786,14 @@ void ScTable::RemoveSubTotals( ScSubTotalParam& rParam )
void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
{
const ScPatternAttr* pPattern = pTab->GetPattern( nCol, nRow );
- if ( pPattern->GetItemSet().GetItemState( ATTR_VALUE_FORMAT, FALSE )
+ if ( pPattern->GetItemSet().GetItemState( ATTR_VALUE_FORMAT, false )
== SFX_ITEM_SET )
{
ScPatternAttr aNewPattern( *pPattern );
SfxItemSet& rSet = aNewPattern.GetItemSet();
rSet.ClearItem( ATTR_VALUE_FORMAT );
rSet.ClearItem( ATTR_LANGUAGE_FORMAT );
- pTab->SetPattern( nCol, nRow, aNewPattern, TRUE );
+ pTab->SetPattern( nCol, nRow, aNewPattern, sal_True );
}
}
@@ -801,7 +801,7 @@ void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
// at least MSC needs this at linkage level to be able to use it in a template
typedef struct lcl_ScTable_DoSubTotals_RowEntry
{
- USHORT nGroupNo;
+ sal_uInt16 nGroupNo;
SCROW nSubStartRow;
SCROW nDestRow;
SCROW nFuncStart;
@@ -811,13 +811,13 @@ typedef struct lcl_ScTable_DoSubTotals_RowEntry
// neue Zwischenergebnisse
// rParam.nRow2 wird veraendert !
-BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
+sal_Bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
SCCOL nStartCol = rParam.nCol1;
SCROW nStartRow = rParam.nRow1 + 1; // Header
SCCOL nEndCol = rParam.nCol2;
SCROW nEndRow = rParam.nRow2; // wird veraendert
- USHORT i;
+ sal_uInt16 i;
// Leerzeilen am Ende weglassen,
// damit alle Ueberlaeufe (MAXROW) bei InsertRow gefunden werden (#35180#)
@@ -825,16 +825,16 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
SCSIZE nEmpty = GetEmptyLinesInBlock( nStartCol, nStartRow, nEndCol, nEndRow, DIR_BOTTOM );
nEndRow -= nEmpty;
- USHORT nLevelCount = 0; // Anzahl Gruppierungen
- BOOL bDoThis = TRUE;
+ sal_uInt16 nLevelCount = 0; // Anzahl Gruppierungen
+ sal_Bool bDoThis = sal_True;
for (i=0; i<MAXSUBTOTAL && bDoThis; i++)
if (rParam.bGroupActive[i])
nLevelCount = i+1;
else
- bDoThis = FALSE;
+ bDoThis = false;
if (nLevelCount==0) // nichts tun
- return TRUE;
+ return sal_True;
SCCOL* nGroupCol = rParam.nField; // Spalten nach denen
// gruppiert wird
@@ -842,12 +842,12 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
// Durch (leer) als eigene Kategorie muss immer auf
// Teilergebniszeilen aus den anderen Spalten getestet werden
// (frueher nur, wenn eine Spalte mehrfach vorkam)
- BOOL bTestPrevSub = ( nLevelCount > 1 );
+ sal_Bool bTestPrevSub = ( nLevelCount > 1 );
String aSubString;
String aOutString;
- BOOL bIgnoreCase = !rParam.bCaseSens;
+ sal_Bool bIgnoreCase = !rParam.bCaseSens;
String *pCompString[MAXSUBTOTAL]; // Pointer wegen Compiler-Problemen
for (i=0; i<MAXSUBTOTAL; i++)
@@ -858,7 +858,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
ScStyleSheet* pStyle = (ScStyleSheet*) pDocument->GetStyleSheetPool()->Find(
ScGlobal::GetRscString(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA );
- BOOL bSpaceLeft = TRUE; // Erfolg beim Einfuegen?
+ sal_Bool bSpaceLeft = sal_True; // Erfolg beim Einfuegen?
// For performance reasons collect formula entries so their
// references don't have to be tested for updates each time a new row is
@@ -866,9 +866,9 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
RowEntry aRowEntry;
::std::vector< RowEntry > aRowVector;
- for (USHORT nLevel=0; nLevel<=nLevelCount && bSpaceLeft; nLevel++) // incl. Gesamtergebnis
+ for (sal_uInt16 nLevel=0; nLevel<=nLevelCount && bSpaceLeft; nLevel++) // incl. Gesamtergebnis
{
- BOOL bTotal = ( nLevel == nLevelCount );
+ sal_Bool bTotal = ( nLevel == nLevelCount );
aRowEntry.nGroupNo = bTotal ? 0 : (nLevelCount-nLevel-1);
// how many results per level
@@ -887,16 +887,16 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
*pCompString[i] = aSubString;
} // aSubString bleibt auf dem letzten stehen
- BOOL bBlockVis = FALSE; // Gruppe eingeblendet?
+ sal_Bool bBlockVis = false; // Gruppe eingeblendet?
aRowEntry.nSubStartRow = nStartRow;
for (SCROW nRow=nStartRow; nRow<=nEndRow+1 && bSpaceLeft; nRow++)
{
- BOOL bChanged;
+ sal_Bool bChanged;
if (nRow>nEndRow)
- bChanged = TRUE;
+ bChanged = sal_True;
else
{
- bChanged = FALSE;
+ bChanged = false;
if (!bTotal)
{
String aString;
@@ -919,7 +919,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
if ( iEntry->nDestRow == nRow )
{
- bChanged = FALSE;
+ bChanged = false;
break;
}
}
@@ -935,7 +935,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
bSpaceLeft = pDocument->InsertRow( 0, nTab, MAXCOL, nTab,
aRowEntry.nDestRow, 1 );
DBShowRow( aRowEntry.nDestRow, bBlockVis );
- bBlockVis = FALSE;
+ bBlockVis = false;
if ( rParam.bPagebreak && nRow < MAXROW &&
aRowEntry.nSubStartRow != nStartRow && nLevel == 0)
SetRowBreak(aRowEntry.nSubStartRow, false, true);
@@ -966,7 +966,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
if (!aOutString.Len())
aOutString = ScGlobal::GetRscString( STR_EMPTYDATA );
aOutString += ' ';
- USHORT nStrId = STR_TABLE_ERGEBNIS;
+ sal_uInt16 nStrId = STR_TABLE_ERGEBNIS;
if ( nResCount == 1 )
switch ( eResFunc[0] )
{
@@ -1065,25 +1065,25 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
}
-BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- BOOL* pSpecial /* =NULL */ , ScBaseCell* pCell /* =NULL */ ,
- BOOL* pbTestEqualCondition /* = NULL */ )
+sal_Bool ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
+ sal_Bool* pSpecial /* =NULL */ , ScBaseCell* pCell /* =NULL */ ,
+ sal_Bool* pbTestEqualCondition /* = NULL */ )
{
if (!rParam.GetEntry(0).bDoQuery)
- return TRUE;
+ return sal_True;
//---------------------------------------------------------------
const SCSIZE nFixedBools = 32;
- BOOL aBool[nFixedBools];
- BOOL aTest[nFixedBools];
+ sal_Bool aBool[nFixedBools];
+ sal_Bool aTest[nFixedBools];
SCSIZE nEntryCount = rParam.GetEntryCount();
- BOOL* pPasst = ( nEntryCount <= nFixedBools ? &aBool[0] : new BOOL[nEntryCount] );
- BOOL* pTest = ( nEntryCount <= nFixedBools ? &aTest[0] : new BOOL[nEntryCount] );
+ sal_Bool* pPasst = ( nEntryCount <= nFixedBools ? &aBool[0] : new sal_Bool[nEntryCount] );
+ sal_Bool* pTest = ( nEntryCount <= nFixedBools ? &aTest[0] : new sal_Bool[nEntryCount] );
long nPos = -1;
SCSIZE i = 0;
- BOOL bMatchWholeCell = pDocument->GetDocOptions().IsMatchWholeCell();
+ sal_Bool bMatchWholeCell = pDocument->GetDocOptions().IsMatchWholeCell();
CollatorWrapper* pCollator = (rParam.bCaseSens ? ScGlobal::GetCaseCollator() :
ScGlobal::GetCollator());
::utl::TransliterationWrapper* pTransliteration = (rParam.bCaseSens ?
@@ -1096,8 +1096,8 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
if ( !pCell || i > 0 )
pCell = GetCell( static_cast<SCCOL>(rEntry.nField), nRow );
- BOOL bOk = FALSE;
- BOOL bTestEqual = FALSE;
+ sal_Bool bOk = false;
+ sal_Bool bTestEqual = false;
if ( pSpecial && pSpecial[i] )
{
@@ -1199,24 +1199,24 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
if( rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN
|| rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_ENDS_WITH
|| rEntry.eOp == SC_DOES_NOT_BEGIN_WITH || rEntry.eOp == SC_DOES_NOT_END_WITH )
- bMatchWholeCell = FALSE;
+ bMatchWholeCell = false;
if ( pCell )
{
if (pCell->GetCellType() != CELLTYPE_NOTE)
{
- ULONG nFormat = GetNumberFormat( static_cast<SCCOL>(rEntry.nField), nRow );
+ sal_uLong nFormat = GetNumberFormat( static_cast<SCCOL>(rEntry.nField), nRow );
ScCellFormat::GetInputString( pCell, nFormat, aCellStr, *(pDocument->GetFormatTable()) );
}
}
else
GetInputString( static_cast<SCCOL>(rEntry.nField), nRow, aCellStr );
- BOOL bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
+ sal_Bool bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
|| (rEntry.eOp == SC_NOT_EQUAL) || (rEntry.eOp == SC_CONTAINS)
|| (rEntry.eOp == SC_DOES_NOT_CONTAIN) || (rEntry.eOp == SC_BEGINS_WITH)
|| (rEntry.eOp == SC_ENDS_WITH) || (rEntry.eOp == SC_DOES_NOT_BEGIN_WITH)
|| (rEntry.eOp == SC_DOES_NOT_END_WITH)));
- BOOL bTestRegExp = (pbTestEqualCondition && rParam.bRegExp
+ sal_Bool bTestRegExp = (pbTestEqualCondition && rParam.bRegExp
&& ((rEntry.eOp == SC_LESS_EQUAL)
|| (rEntry.eOp == SC_GREATER_EQUAL)));
if ( bRealRegExp || bTestRegExp )
@@ -1225,22 +1225,22 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
xub_StrLen nEnd = aCellStr.Len();
// from 614 on, nEnd is behind the found text
- BOOL bMatch = FALSE;
+ sal_Bool bMatch = false;
if ( rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == SC_DOES_NOT_END_WITH )
{
nEnd = 0;
nStart = aCellStr.Len();
- bMatch = (BOOL) rEntry.GetSearchTextPtr( rParam.bCaseSens )
+ bMatch = (sal_Bool) rEntry.GetSearchTextPtr( rParam.bCaseSens )
->SearchBkwrd( aCellStr, &nStart, &nEnd );
}
else
{
- bMatch = (BOOL) rEntry.GetSearchTextPtr( rParam.bCaseSens )
+ bMatch = (sal_Bool) rEntry.GetSearchTextPtr( rParam.bCaseSens )
->SearchFrwrd( aCellStr, &nStart, &nEnd );
}
if ( bMatch && bMatchWholeCell
&& (nStart != 0 || nEnd != aCellStr.Len()) )
- bMatch = FALSE; // RegExp must match entire cell string
+ bMatch = false; // RegExp must match entire cell string
if ( bRealRegExp )
switch (rEntry.eOp)
{
@@ -1284,7 +1284,7 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
// #i18374# When used from functions (match, countif, sumif, vlookup, hlookup, lookup),
// the query value is assigned directly, and the string is empty. In that case,
// don't find any string (isEqual would find empty string results in formula cells).
- bOk = FALSE;
+ bOk = false;
if ( rEntry.eOp == SC_NOT_EQUAL )
bOk = !bOk;
}
@@ -1371,14 +1371,14 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
(pCell ? pCell->HasValueData() :
HasValueData( static_cast<SCCOL>(rEntry.nField), nRow)))
{
- bOk = TRUE;
+ bOk = sal_True;
}
else if (!rEntry.bQueryByString &&
(rEntry.eOp == SC_GREATER || rEntry.eOp == SC_GREATER_EQUAL) &&
(pCell ? pCell->HasStringData() :
HasStringData( static_cast<SCCOL>(rEntry.nField), nRow)))
{
- bOk = TRUE;
+ bOk = sal_True;
}
}
@@ -1411,7 +1411,7 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
pTest[0] = pTest[0] || pTest[j];
}
- BOOL bRet = pPasst[0];
+ sal_Bool bRet = pPasst[0];
if ( pPasst != &aBool[0] )
delete [] pPasst;
if ( pbTestEqualCondition )
@@ -1424,7 +1424,7 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
void ScTable::TopTenQuery( ScQueryParam& rParam )
{
- BOOL bSortCollatorInitialized = FALSE;
+ sal_Bool bSortCollatorInitialized = false;
SCSIZE nEntryCount = rParam.GetEntryCount();
SCROW nRow1 = (rParam.bHasHeader ? rParam.nRow1 + 1 : rParam.nRow1);
SCSIZE nCount = static_cast<SCSIZE>(rParam.nRow2 - nRow1 + 1);
@@ -1442,7 +1442,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
aSortParam = aLocalSortParam; // used in CreateSortInfoArray, Compare
if ( !bSortCollatorInitialized )
{
- bSortCollatorInitialized = TRUE;
+ bSortCollatorInitialized = sal_True;
InitSortCollator( aLocalSortParam );
}
ScSortInfoArray* pArray = CreateSortInfoArray( nRow1, rParam.nRow2 );
@@ -1462,7 +1462,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
{
if ( rEntry.bQueryByString )
{ // dat wird nix
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = 10; // 10 bzw. 10%
}
SCSIZE nVal = (rEntry.nVal >= 1 ? static_cast<SCSIZE>(rEntry.nVal) : 1);
@@ -1528,7 +1528,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
else
{
rEntry.eOp = SC_GREATER_EQUAL;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = 0;
}
delete pArray;
@@ -1544,14 +1544,14 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
DestroySortCollator();
}
-static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rParam, BOOL* pSpecial )
+static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rParam, sal_Bool* pSpecial )
{
bool bTopTen = false;
SCSIZE nEntryCount = rParam.GetEntryCount();
for ( SCSIZE i = 0; i < nEntryCount; ++i )
{
- pSpecial[i] = FALSE;
+ pSpecial[i] = false;
ScQueryEntry& rEntry = rParam.GetEntry(i);
if ( rEntry.bDoQuery )
{
@@ -1583,7 +1583,7 @@ static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPa
// call from UNO or second call from autofilter
if ( rEntry.nVal == SC_EMPTYFIELDS || rEntry.nVal == SC_NONEMPTYFIELDS )
{
- pSpecial[i] = TRUE;
+ pSpecial[i] = sal_True;
}
}
if ( !bTopTen )
@@ -1612,14 +1612,14 @@ static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPa
}
}
-SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
+SCSIZE ScTable::Query(ScQueryParam& rParamOrg, sal_Bool bKeepSub)
{
ScQueryParam aParam( rParamOrg );
ScStrCollection aScStrCollection;
StrData* pStrData = NULL;
- BOOL bStarted = FALSE;
- BOOL bOldResult = TRUE;
+ sal_Bool bStarted = false;
+ sal_Bool bOldResult = sal_True;
SCROW nOldStart = 0;
SCROW nOldEnd = 0;
@@ -1628,7 +1628,7 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
SCROW nHeader = aParam.bHasHeader ? 1 : 0;
SCSIZE nEntryCount = aParam.GetEntryCount();
- BOOL* pSpecial = new BOOL[nEntryCount];
+ sal_Bool* pSpecial = new sal_Bool[nEntryCount];
lcl_PrepareQuery( pDocument, this, aParam, pSpecial );
if (!aParam.bInplace)
@@ -1646,8 +1646,8 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
SCROW nRealRow2 = aParam.bUseDynamicRange ? aParam.nDynamicEndRow : aParam.nRow2;
for (SCROW j = aParam.nRow1 + nHeader; j <= nRealRow2; ++j)
{
- BOOL bResult; // Filterergebnis
- BOOL bValid = ValidQuery(j, aParam, pSpecial);
+ sal_Bool bResult; // Filterergebnis
+ sal_Bool bValid = ValidQuery(j, aParam, pSpecial);
if (!bValid && bKeepSub) // Subtotals stehenlassen
{
for (SCCOL nCol=aParam.nCol1; nCol<=aParam.nCol2 && !bValid; nCol++)
@@ -1658,13 +1658,13 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
if ( pCell->GetCellType() == CELLTYPE_FORMULA )
if (((ScFormulaCell*)pCell)->IsSubTotal())
if (RefVisible((ScFormulaCell*)pCell))
- bValid = TRUE;
+ bValid = sal_True;
}
}
if (bValid)
{
if (aParam.bDuplicate)
- bResult = TRUE;
+ bResult = sal_True;
else
{
String aStr;
@@ -1677,20 +1677,20 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
}
pStrData = new StrData(aStr);
- BOOL bIsUnique = TRUE;
+ sal_Bool bIsUnique = sal_True;
if (pStrData)
bIsUnique = aScStrCollection.Insert(pStrData);
if (bIsUnique)
- bResult = TRUE;
+ bResult = sal_True;
else
{
delete pStrData;
- bResult = FALSE;
+ bResult = false;
}
}
}
else
- bResult = FALSE;
+ bResult = false;
if (aParam.bInplace)
{
@@ -1703,7 +1703,7 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
nOldStart = nOldEnd = j;
bOldResult = bResult;
}
- bStarted = TRUE;
+ bStarted = sal_True;
}
else
{
@@ -1727,9 +1727,9 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
return nCount;
}
-BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
+sal_Bool ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
{
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
SCCOL* pFields = new SCCOL[nCol2-nCol1+1];
String aCellStr;
SCCOL nCol = nCol1;
@@ -1742,7 +1742,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
{
String aQueryStr;
GetUpperCellString(nCol, nRow1, aQueryStr);
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL i = rQueryParam.nCol1;
while (!bFound && (i <= nDBCol2))
{
@@ -1756,12 +1756,12 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
if (bFound)
pFields[nCol - nCol1] = i;
else
- bValid = FALSE;
+ bValid = false;
nCol++;
}
if (bValid)
{
- ULONG nVisible = 0;
+ sal_uLong nVisible = 0;
for ( nCol=nCol1; nCol<=nCol2; nCol++ )
nVisible += aCol[nCol].VisibleCount( nRow1+1, nRow2 );
@@ -1794,7 +1794,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
rQueryParam.GetEntry(nIndex).eConnect = SC_AND;
}
else
- bValid = FALSE;
+ bValid = false;
}
nCol++;
}
@@ -1807,7 +1807,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
return bValid;
}
-BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
+sal_Bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
{
// A valid StarQuery must be at least 4 columns wide. To be precise it
// should be exactly 4 columns ...
@@ -1818,10 +1818,10 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
// range wasn't sufficiently specified data changes wouldn't flag formula
// cells for recalculation.
if (nCol2 - nCol1 < 3)
- return FALSE;
+ return false;
- BOOL bValid;
- BOOL bFound;
+ sal_Bool bValid;
+ sal_Bool bFound;
String aCellStr;
SCSIZE nIndex = 0;
SCROW nRow = nRow1;
@@ -1837,7 +1837,7 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
{
ScQueryEntry& rEntry = rQueryParam.GetEntry(nIndex);
- bValid = FALSE;
+ bValid = false;
// Erste Spalte UND/ODER
if (nIndex > 0)
{
@@ -1845,18 +1845,18 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_UND) )
{
rEntry.eConnect = SC_AND;
- bValid = TRUE;
+ bValid = sal_True;
}
else if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_ODER) )
{
rEntry.eConnect = SC_OR;
- bValid = TRUE;
+ bValid = sal_True;
}
}
// Zweite Spalte FeldName
if ((nIndex < 1) || bValid)
{
- bFound = FALSE;
+ bFound = false;
GetUpperCellString(nCol1 + 1, nRow, aCellStr);
for (SCCOL i=rQueryParam.nCol1; (i <= nDBCol2) && (!bFound); i++)
{
@@ -1869,16 +1869,16 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
if (bFound)
{
rEntry.nField = i;
- bValid = TRUE;
+ bValid = sal_True;
}
else
- bValid = FALSE;
+ bValid = false;
}
}
// Dritte Spalte Operator =<>...
if (bValid)
{
- bFound = FALSE;
+ bFound = false;
GetUpperCellString(nCol1 + 2, nRow, aCellStr);
if (aCellStr.GetChar(0) == '<')
{
@@ -1904,7 +1904,7 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
if (bValid)
{
GetString(nCol1 + 3, nRow, *rEntry.pStr);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
}
nIndex++;
nRow++;
@@ -1913,7 +1913,7 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
return bValid;
}
-BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
+sal_Bool ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
{
SCSIZE i, nCount;
PutInOrder(nCol1, nCol2);
@@ -1924,7 +1924,7 @@ BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
rQueryParam.GetEntry(i).Clear();
// Standard QueryTabelle
- BOOL bValid = CreateStarQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
+ sal_Bool bValid = CreateStarQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
// Excel QueryTabelle
if (!bValid)
bValid = CreateExcelQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
@@ -1934,7 +1934,7 @@ BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
{
// bQueryByString muss gesetzt sein
for (i=0; i < nCount; i++)
- rQueryParam.GetEntry(i).bQueryByString = TRUE;
+ rQueryParam.GetEntry(i).bQueryByString = sal_True;
}
else
{
@@ -1945,26 +1945,26 @@ BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
return bValid;
}
-BOOL ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW /* nEndRow */ )
+sal_Bool ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW /* nEndRow */ )
{
for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
{
CellType eType = GetCellType( nCol, nStartRow );
if (eType != CELLTYPE_STRING && eType != CELLTYPE_EDIT)
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
-BOOL ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol */, SCROW nEndRow )
+sal_Bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol */, SCROW nEndRow )
{
for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
{
CellType eType = GetCellType( nStartCol, nRow );
if (eType != CELLTYPE_STRING && eType != CELLTYPE_EDIT)
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings, bool& rHasDates)
@@ -1989,7 +1989,7 @@ void ScTable::GetFilteredFilterEntries(
}
nEntryCount = aParam.GetEntryCount();
- BOOL* pSpecial = new BOOL[nEntryCount];
+ sal_Bool* pSpecial = new sal_Bool[nEntryCount];
lcl_PrepareQuery( pDocument, this, aParam, pSpecial );
bool bHasDates = false;
for ( SCROW j = nRow1; j <= nRow2; ++j )
@@ -2006,7 +2006,7 @@ void ScTable::GetFilteredFilterEntries(
delete[] pSpecial;
}
-BOOL ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit)
+sal_Bool ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, sal_Bool bLimit)
{
return aCol[nCol].GetDataEntries( nRow, rStrings, bLimit );
}
@@ -2016,9 +2016,9 @@ SCSIZE ScTable::GetCellCount(SCCOL nCol) const
return aCol[nCol].GetCellCount();
}
-ULONG ScTable::GetCellCount() const
+sal_uLong ScTable::GetCellCount() const
{
- ULONG nCellCount = 0;
+ sal_uLong nCellCount = 0;
for ( SCCOL nCol=0; nCol<=MAXCOL; nCol++ )
nCellCount += aCol[nCol].GetCellCount();
@@ -2026,9 +2026,9 @@ ULONG ScTable::GetCellCount() const
return nCellCount;
}
-ULONG ScTable::GetWeightedCount() const
+sal_uLong ScTable::GetWeightedCount() const
{
- ULONG nCellCount = 0;
+ sal_uLong nCellCount = 0;
for ( SCCOL nCol=0; nCol<=MAXCOL; nCol++ )
if ( aCol[nCol].GetCellCount() ) // GetCellCount ist inline
@@ -2037,9 +2037,9 @@ ULONG ScTable::GetWeightedCount() const
return nCellCount;
}
-ULONG ScTable::GetCodeCount() const
+sal_uLong ScTable::GetCodeCount() const
{
- ULONG nCodeCount = 0;
+ sal_uLong nCodeCount = 0;
for ( SCCOL nCol=0; nCol<=MAXCOL; nCol++ )
if ( aCol[nCol].GetCellCount() ) // GetCellCount ist inline
@@ -2072,7 +2072,7 @@ void ScTable::UpdateSelectionFunction( ScFunctionData& rData,
{
// Cursor neben einer Markierung nicht beruecksichtigen:
//! nur noch MarkData uebergeben, Cursorposition ggf. hineinselektieren!!!
- BOOL bSingle = ( rMark.IsMarked() || !rMark.IsMultiMarked() );
+ sal_Bool bSingle = ( rMark.IsMarked() || !rMark.IsMultiMarked() );
// Mehrfachselektion:
@@ -2092,7 +2092,7 @@ void ScTable::UpdateSelectionFunction( ScFunctionData& rData,
aCol[nCol].UpdateAreaFunction( rData, *mpHiddenRows, nStartRow, nEndRow );
}
-void ScTable::FindConditionalFormat( ULONG nKey, ScRangeList& rList )
+void ScTable::FindConditionalFormat( sal_uLong nKey, ScRangeList& rList )
{
SCROW nStartRow = 0, nEndRow = 0;
for (SCCOL nCol=0; nCol<=MAXCOL; nCol++)
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index bd46fb105da0..e7ba2153a3f1 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -86,11 +86,11 @@
#define _D_MAX_LONG_ (double) 0x7fffffff
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
// -----------------------------------------------------------------------
-short lcl_DecompValueString( String& aValue, sal_Int32& nVal, USHORT* pMinDigits = NULL )
+short lcl_DecompValueString( String& aValue, sal_Int32& nVal, sal_uInt16* pMinDigits = NULL )
{
if ( !aValue.Len() )
{
@@ -145,7 +145,7 @@ short lcl_DecompValueString( String& aValue, sal_Int32& nVal, USHORT* pMinDigits
return 0;
}
-String lcl_ValueString( sal_Int32 nValue, USHORT nMinDigits )
+String lcl_ValueString( sal_Int32 nValue, sal_uInt16 nMinDigits )
{
if ( nMinDigits <= 1 )
return String::CreateFromInt32( nValue ); // simple case...
@@ -166,8 +166,8 @@ String lcl_ValueString( sal_Int32 nValue, USHORT nMinDigits )
}
static ScBaseCell * lcl_getSuffixCell( ScDocument* pDocument, sal_Int32 nValue,
- USHORT nDigits, const String& rSuffix, CellType eCellType,
- BOOL bIsOrdinalSuffix )
+ sal_uInt16 nDigits, const String& rSuffix, CellType eCellType,
+ sal_Bool bIsOrdinalSuffix )
{
String aValue( lcl_ValueString( nValue, nDigits ));
if (!bIsOrdinalSuffix)
@@ -190,8 +190,8 @@ static ScBaseCell * lcl_getSuffixCell( ScDocument* pDocument, sal_Int32 nValue,
void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
FillCmd& rCmd, FillDateCmd& rDateCmd,
- double& rInc, USHORT& rMinDigits,
- ScUserListData*& rListData, USHORT& rListIndex)
+ double& rInc, sal_uInt16& rMinDigits,
+ ScUserListData*& rListData, sal_uInt16& rListIndex)
{
DBG_ASSERT( nCol1==nCol2 || nRow1==nRow2, "FillAnalyse: falscher Bereich" );
@@ -226,8 +226,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (eCellType == CELLTYPE_VALUE)
{
- UINT32 nFormat = ((const SfxUInt32Item*)GetAttr(nCol,nRow,ATTR_VALUE_FORMAT))->GetValue();
- BOOL bDate = ( pDocument->GetFormatTable()->GetType(nFormat) == NUMBERFORMAT_DATE );
+ sal_uInt32 nFormat = ((const SfxUInt32Item*)GetAttr(nCol,nRow,ATTR_VALUE_FORMAT))->GetValue();
+ sal_Bool bDate = ( pDocument->GetFormatTable()->GetType(nFormat) == NUMBERFORMAT_DATE );
if (bDate)
{
if (nCount > 1)
@@ -260,8 +260,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- BOOL bVal = TRUE;
- for (USHORT i=1; i<nCount && bVal; i++)
+ sal_Bool bVal = sal_True;
+ for (sal_uInt16 i=1; i<nCount && bVal; i++)
{
ScBaseCell* pCell = GetCell(nCol,nRow);
if (pCell && pCell->GetCellType() == CELLTYPE_VALUE)
@@ -271,7 +271,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( eType == FILL_DAY )
{
if ( aDate2-aDate1 != nCmpInc )
- bVal = FALSE;
+ bVal = false;
}
else
{
@@ -279,14 +279,14 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nMDiff = aDate2.GetMonth() - (long) aDate1.GetMonth();
nYDiff = aDate2.GetYear() - (long) aDate1.GetYear();
if (nDDiff || ( nMDiff + 12 * nYDiff != nCmpInc ))
- bVal = FALSE;
+ bVal = false;
}
aDate1 = aDate2;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
}
else
- bVal = FALSE; // kein Datum passt auch nicht
+ bVal = false; // kein Datum passt auch nicht
}
if (bVal)
{
@@ -317,8 +317,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rInc = nVal2 - nVal1;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- BOOL bVal = TRUE;
- for (USHORT i=1; i<nCount && bVal; i++)
+ sal_Bool bVal = sal_True;
+ for (sal_uInt16 i=1; i<nCount && bVal; i++)
{
ScBaseCell* pCell = GetCell(nCol,nRow);
if (pCell && pCell->GetCellType() == CELLTYPE_VALUE)
@@ -326,11 +326,11 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nVal2 = ((ScValueCell*)pCell)->GetValue();
double nDiff = nVal2 - nVal1;
if ( !::rtl::math::approxEqual( nDiff, rInc ) )
- bVal = FALSE;
+ bVal = false;
nVal1 = nVal2;
}
else
- bVal = FALSE;
+ bVal = false;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
}
@@ -349,7 +349,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rListData->GetSubIndex(aStr, rListIndex);
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- for (USHORT i=1; i<nCount && rListData; i++)
+ for (sal_uInt16 i=1; i<nCount && rListData; i++)
{
GetString(nCol, nRow, aStr);
if (!rListData->GetSubIndex(aStr, rListIndex))
@@ -375,8 +375,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rInc = (double)nVal2 - (double)nVal1;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- BOOL bVal = TRUE;
- for (USHORT i=1; i<nCount && bVal; i++)
+ sal_Bool bVal = sal_True;
+ for (sal_uInt16 i=1; i<nCount && bVal; i++)
{
ScBaseCell* pCell = GetCell(nCol,nRow);
CellType eType = pCell ? pCell->GetCellType() : CELLTYPE_NONE;
@@ -391,14 +391,14 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
double nDiff = (double)nVal2 - (double)nVal1;
if ( !::rtl::math::approxEqual( nDiff, rInc ) )
- bVal = FALSE;
+ bVal = false;
nVal1 = nVal2;
}
else
- bVal = FALSE;
+ bVal = false;
}
else
- bVal = FALSE;
+ bVal = false;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
}
@@ -416,11 +416,11 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
}
-void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFormulaCell* pSrcCell,
- SCCOL nDestCol, SCROW nDestRow, BOOL bLast )
+void ScTable::FillFormula(sal_uLong& /* nFormulaCounter */, sal_Bool /* bFirst */, ScFormulaCell* pSrcCell,
+ SCCOL nDestCol, SCROW nDestRow, sal_Bool bLast )
{
- pDocument->SetNoListening( TRUE ); // noch falsche Referenzen
+ pDocument->SetNoListening( true ); // noch falsche Referenzen
ScAddress aAddr( nDestCol, nDestRow, nTab );
ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell, *pDocument, aAddr );
aCol[nDestCol].Insert(nDestRow, pDestCell);
@@ -455,13 +455,13 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor
DBG_ERRORFILE( "FillFormula: kein MatrixOrigin" );
}
}
- pDocument->SetNoListening( FALSE );
+ pDocument->SetNoListening( false );
pDestCell->StartListeningTo( pDocument );
}
void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ULONG nFillCount, FillDir eFillDir, ScProgress& rProgress )
+ sal_uLong nFillCount, FillDir eFillDir, ScProgress& rProgress )
{
if ( (nFillCount == 0) || !ValidColRow(nCol1, nRow1) || !ValidColRow(nCol2, nRow2) )
return;
@@ -470,19 +470,19 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// Richtung auswerten
//
- BOOL bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
- BOOL bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
+ sal_Bool bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
+ sal_Bool bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
- ULONG nCol = 0;
- ULONG nRow = 0;
- ULONG& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
- ULONG& rOuter = bVertical ? nCol : nRow;
- ULONG nOStart;
- ULONG nOEnd;
- ULONG nIStart;
- ULONG nIEnd;
- ULONG nISrcStart;
- ULONG nISrcEnd;
+ sal_uLong nCol = 0;
+ sal_uLong nRow = 0;
+ sal_uLong& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
+ sal_uLong& rOuter = bVertical ? nCol : nRow;
+ sal_uLong nOStart;
+ sal_uLong nOEnd;
+ sal_uLong nIStart;
+ sal_uLong nIEnd;
+ sal_uLong nISrcStart;
+ sal_uLong nISrcEnd;
if (bVertical)
{
@@ -522,32 +522,32 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nIEnd = nCol1 - nFillCount;
}
}
- ULONG nIMin = nIStart;
- ULONG nIMax = nIEnd;
+ sal_uLong nIMin = nIStart;
+ sal_uLong nIMax = nIEnd;
PutInOrder(nIMin,nIMax);
if (bVertical)
DeleteArea(nCol1, static_cast<SCROW>(nIMin), nCol2, static_cast<SCROW>(nIMax), IDF_AUTOFILL);
else
DeleteArea(static_cast<SCCOL>(nIMin), nRow1, static_cast<SCCOL>(nIMax), nRow2, IDF_AUTOFILL);
- ULONG nProgress = rProgress.GetState();
+ sal_uLong nProgress = rProgress.GetState();
//
// ausfuehren
//
- ULONG nActFormCnt = 0;
+ sal_uLong nActFormCnt = 0;
for (rOuter = nOStart; rOuter <= nOEnd; rOuter++)
{
- ULONG nMaxFormCnt = 0; // fuer Formeln
+ sal_uLong nMaxFormCnt = 0; // fuer Formeln
// Attributierung uebertragen
const ScPatternAttr* pSrcPattern = NULL;
const ScStyleSheet* pStyleSheet = NULL;
- ULONG nAtSrc = nISrcStart;
+ sal_uLong nAtSrc = nISrcStart;
ScPatternAttr* pNewPattern = NULL;
- BOOL bGetPattern = TRUE;
+ sal_Bool bGetPattern = sal_True;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
@@ -559,12 +559,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
pSrcPattern = aCol[nCol].GetPattern(static_cast<SCROW>(nAtSrc));
else // rInner&:=nCol, rOuter&:=nRow
pSrcPattern = aCol[nAtSrc].GetPattern(static_cast<SCROW>(nRow));
- bGetPattern = FALSE;
+ bGetPattern = false;
pStyleSheet = pSrcPattern->GetStyleSheet();
// Merge/Mergeflag nicht uebernehmen,
const SfxItemSet& rSet = pSrcPattern->GetItemSet();
- if ( rSet.GetItemState(ATTR_MERGE, FALSE) == SFX_ITEM_SET
- || rSet.GetItemState(ATTR_MERGE_FLAG, FALSE) == SFX_ITEM_SET )
+ if ( rSet.GetItemState(ATTR_MERGE, false) == SFX_ITEM_SET
+ || rSet.GetItemState(ATTR_MERGE_FLAG, false) == SFX_ITEM_SET )
{
pNewPattern = new ScPatternAttr( *pSrcPattern );
SfxItemSet& rNewSet = pNewPattern->GetItemSet();
@@ -612,18 +612,18 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( nAtSrc != nISrcStart )
{ // mehr als eine Source-Zelle
nAtSrc = nISrcStart;
- bGetPattern = TRUE;
+ bGetPattern = sal_True;
}
}
else if (bPositive)
{
++nAtSrc;
- bGetPattern = TRUE;
+ bGetPattern = sal_True;
}
else
{
--nAtSrc;
- bGetPattern = TRUE;
+ bGetPattern = sal_True;
}
if (rInner == nIEnd) break;
@@ -637,9 +637,9 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
FillCmd eFillCmd;
FillDateCmd eDateCmd;
double nInc;
- USHORT nMinDigits;
+ sal_uInt16 nMinDigits;
ScUserListData* pListData = NULL;
- USHORT nListIndex;
+ sal_uInt16 nListIndex;
if (bVertical)
FillAnalyse(static_cast<SCCOL>(nCol),nRow1,
static_cast<SCCOL>(nCol),nRow2, eFillCmd,eDateCmd,
@@ -654,12 +654,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (pListData)
{
- USHORT nListCount = pListData->GetSubCount();
+ sal_uInt16 nListCount = pListData->GetSubCount();
if ( !bPositive )
{
// nListIndex auf FillAnalyse zeigt auf den letzten Eintrag -> anpassen
- ULONG nSub = nISrcStart - nISrcEnd;
- for (ULONG i=0; i<nSub; i++)
+ sal_uLong nSub = nISrcStart - nISrcEnd;
+ for (sal_uLong i=0; i<nSub; i++)
{
if (nListIndex == 0) nListIndex = nListCount;
--nListIndex;
@@ -689,7 +689,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
else if (eFillCmd == FILL_SIMPLE) // Auffuellen mit Muster
{
- ULONG nSource = nISrcStart;
+ sal_uLong nSource = nISrcStart;
double nDelta;
if ( nScFillModeMouseModifier & KEY_MOD1 )
nDelta = 0.0;
@@ -698,16 +698,16 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
else
nDelta = -1.0;
double nVal = 0.0;
- ULONG nFormulaCounter = nActFormCnt;
- BOOL bFirst = TRUE;
- BOOL bGetCell = TRUE;
- USHORT nCellDigits = 0;
+ sal_uLong nFormulaCounter = nActFormCnt;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bGetCell = sal_True;
+ sal_uInt16 nCellDigits = 0;
short nHeadNoneTail = 0;
sal_Int32 nStringValue = 0;
String aValue;
ScBaseCell* pSrcCell = NULL;
CellType eCellType = CELLTYPE_NONE;
- BOOL bIsOrdinalSuffix = FALSE;
+ sal_Bool bIsOrdinalSuffix = false;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
@@ -718,7 +718,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
pSrcCell = aCol[nCol].GetCell( static_cast<SCROW>(nSource) );
else // rInner&:=nCol, rOuter&:=nRow
pSrcCell = aCol[nSource].GetCell( static_cast<SCROW>(nRow) );
- bGetCell = FALSE;
+ bGetCell = false;
if ( pSrcCell )
{
eCellType = pSrcCell->GetCellType();
@@ -817,7 +817,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( nSource != nISrcStart )
{ // mehr als eine Source-Zelle
nSource = nISrcStart;
- bGetCell = TRUE;
+ bGetCell = sal_True;
}
if ( !(nScFillModeMouseModifier & KEY_MOD1) )
{
@@ -827,17 +827,17 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nDelta -= 1.0;
}
nFormulaCounter = nActFormCnt;
- bFirst = FALSE;
+ bFirst = false;
}
else if (bPositive)
{
++nSource;
- bGetCell = TRUE;
+ bGetCell = sal_True;
}
else
{
--nSource;
- bGetCell = TRUE;
+ bGetCell = sal_True;
}
// Progress in der inneren Schleife nur bei teuren Zellen,
@@ -860,12 +860,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (bVertical)
FillSeries( static_cast<SCCOL>(nCol), nRow1,
static_cast<SCCOL>(nCol), nRow2, nFillCount, eFillDir,
- eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, FALSE,
+ eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, false,
rProgress );
else
FillSeries( nCol1, static_cast<SCROW>(nRow), nCol2,
static_cast<SCROW>(nRow), nFillCount, eFillDir,
- eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, FALSE,
+ eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, false,
rProgress );
nProgress = rProgress.GetState();
}
@@ -882,12 +882,12 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
SCROW nRow1 = rSource.aStart.Row();
SCCOL nCol2 = rSource.aEnd.Col();
SCROW nRow2 = rSource.aEnd.Row();
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
long nIndex = 0;
- ULONG nSrcCount = 0;
+ sal_uLong nSrcCount = 0;
FillDir eFillDir = FILL_TO_BOTTOM;
if ( nEndX == nCol2 && nEndY == nRow2 ) // leer
- bOk = FALSE;
+ bOk = false;
else if ( nEndX == nCol2 ) // nach oben/unten
{
nEndX = nCol2 = nCol1; // nur erste Spalte ansehen
@@ -909,29 +909,29 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
eFillDir = FILL_TO_LEFT;
}
else // Richtung nicht eindeutig
- bOk = FALSE;
+ bOk = false;
if ( bOk )
{
FillCmd eFillCmd;
FillDateCmd eDateCmd;
double nInc;
- USHORT nMinDigits;
+ sal_uInt16 nMinDigits;
ScUserListData* pListData = NULL;
- USHORT nListIndex;
+ sal_uInt16 nListIndex;
FillAnalyse(nCol1,nRow1, nCol2,nRow2, eFillCmd,eDateCmd, nInc,nMinDigits, pListData,nListIndex);
if ( pListData ) // benutzerdefinierte Liste
{
- USHORT nListCount = pListData->GetSubCount();
+ sal_uInt16 nListCount = pListData->GetSubCount();
if ( nListCount )
{
- ULONG nSub = nSrcCount - 1; // nListIndex ist vom letzten Source-Eintrag
+ sal_uLong nSub = nSrcCount - 1; // nListIndex ist vom letzten Source-Eintrag
while ( nIndex < sal::static_int_cast<long>(nSub) )
nIndex += nListCount;
- ULONG nPos = ( nListIndex + nIndex - nSub ) % nListCount;
- aValue = pListData->GetSubStr(sal::static_int_cast<USHORT>(nPos));
+ sal_uLong nPos = ( nListIndex + nIndex - nSub ) % nListCount;
+ aValue = pListData->GetSubStr(sal::static_int_cast<sal_uInt16>(nPos));
}
}
else if ( eFillCmd == FILL_SIMPLE ) // Auffuellen mit Muster
@@ -939,7 +939,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
long nPosIndex = nIndex;
while ( nPosIndex < 0 )
nPosIndex += nSrcCount;
- ULONG nPos = nPosIndex % nSrcCount;
+ sal_uLong nPos = nPosIndex % nSrcCount;
SCCOL nSrcX = nCol1;
SCROW nSrcY = nRow1;
if ( eFillDir == FILL_TO_TOP || eFillDir == FILL_TO_BOTTOM )
@@ -969,7 +969,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
if ( !(nScFillModeMouseModifier & KEY_MOD1) )
{
sal_Int32 nVal;
- USHORT nCellDigits = 0; // look at each source cell individually
+ sal_uInt16 nCellDigits = 0; // look at each source cell individually
short nFlag = lcl_DecompValueString( aValue, nVal, &nCellDigits );
if ( nFlag < 0 )
{
@@ -991,7 +991,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
nVal += (double) nDelta;
Color* pColor;
- ULONG nNumFmt = GetNumberFormat( nSrcX, nSrcY );
+ sal_uLong nNumFmt = GetNumberFormat( nSrcX, nSrcY );
pDocument->GetFormatTable()->
GetOutputString( nVal, nNumFmt, aValue, &pColor );
}
@@ -1006,7 +1006,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
}
else if ( eFillCmd == FILL_LINEAR || eFillCmd == FILL_DATE ) // Werte
{
- BOOL bValueOk;
+ sal_Bool bValueOk;
double nStart;
sal_Int32 nVal = 0;
short nHeadNoneTail = 0;
@@ -1050,8 +1050,8 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
}
else // Datum
{
- bValueOk = TRUE;
- USHORT nDayOfMonth = 0;
+ bValueOk = sal_True;
+ sal_uInt16 nDayOfMonth = 0;
if ( nIndex < 0 )
{
nIndex = -nIndex;
@@ -1079,7 +1079,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
{
//! Zahlformat je nach Index holen?
Color* pColor;
- ULONG nNumFmt = GetNumberFormat( nCol1, nRow1 );
+ sal_uLong nNumFmt = GetNumberFormat( nCol1, nRow1 );
pDocument->GetFormatTable()->
GetOutputString( nStart, nNumFmt, aValue, &pColor );
}
@@ -1094,7 +1094,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
return aValue;
}
-void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateCmd eCmd)
+void ScTable::IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd)
{
if (eCmd == FILL_DAY)
{
@@ -1103,8 +1103,8 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
}
// class Date Grenzen
- const USHORT nMinYear = 1583;
- const USHORT nMaxYear = 9956;
+ const sal_uInt16 nMinYear = 1583;
+ const sal_uInt16 nMaxYear = 9956;
long nInc = (long) nStep; // nach oben/unten begrenzen ?
Date aNullDate = *pDocument->GetFormatTable()->GetNullDate();
@@ -1166,8 +1166,8 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
aDate = Date( 31,12, nMaxYear );
else
{
- aDate.SetMonth((USHORT) nMonth);
- aDate.SetYear((USHORT) nYear);
+ aDate.SetMonth((sal_uInt16) nMonth);
+ aDate.SetYear((sal_uInt16) nYear);
if ( nDayOfMonth > 28 )
aDate.SetDay( Min( aDate.GetDaysInMonth(), nDayOfMonth ) );
}
@@ -1182,7 +1182,7 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
else if ( nYear > nMaxYear )
aDate = Date( 31,12, nMaxYear );
else
- aDate.SetYear((USHORT) nYear);
+ aDate.SetYear((sal_uInt16) nYear);
}
break;
default:
@@ -1195,26 +1195,26 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
}
void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
- double nStepValue, double nMaxValue, USHORT nArgMinDigits,
- BOOL bAttribs, ScProgress& rProgress )
+ sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
+ double nStepValue, double nMaxValue, sal_uInt16 nArgMinDigits,
+ sal_Bool bAttribs, ScProgress& rProgress )
{
//
// Richtung auswerten
//
- BOOL bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
- BOOL bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
+ sal_Bool bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
+ sal_Bool bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
- ULONG nCol = 0;
- ULONG nRow = 0;
- ULONG& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
- ULONG& rOuter = bVertical ? nCol : nRow;
- ULONG nOStart;
- ULONG nOEnd;
- ULONG nIStart;
- ULONG nIEnd;
- ULONG nISource;
+ sal_uLong nCol = 0;
+ sal_uLong nRow = 0;
+ sal_uLong& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
+ sal_uLong& rOuter = bVertical ? nCol : nRow;
+ sal_uLong nOStart;
+ sal_uLong nOEnd;
+ sal_uLong nIStart;
+ sal_uLong nIEnd;
+ sal_uLong nISource;
if (bVertical)
{
@@ -1257,25 +1257,25 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
}
- ULONG nIMin = nIStart;
- ULONG nIMax = nIEnd;
+ sal_uLong nIMin = nIStart;
+ sal_uLong nIMax = nIEnd;
PutInOrder(nIMin,nIMax);
- USHORT nDel = bAttribs ? IDF_AUTOFILL : (IDF_AUTOFILL & IDF_CONTENTS);
+ sal_uInt16 nDel = bAttribs ? IDF_AUTOFILL : (IDF_AUTOFILL & IDF_CONTENTS);
if (bVertical)
DeleteArea(nCol1, static_cast<SCROW>(nIMin), nCol2, static_cast<SCROW>(nIMax), nDel);
else
DeleteArea(static_cast<SCCOL>(nIMin), nRow1, static_cast<SCCOL>(nIMax), nRow2, nDel);
- ULONG nProgress = rProgress.GetState();
+ sal_uLong nProgress = rProgress.GetState();
//
// ausfuehren
//
- ULONG nActFormCnt = 0;
+ sal_uLong nActFormCnt = 0;
for (rOuter = nOStart; rOuter <= nOEnd; rOuter++)
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
rInner = nISource;
ScBaseCell* pSrcCell = aCol[nCol].GetCell(static_cast<SCROW>(nRow));
@@ -1287,10 +1287,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScPatternAttr* pSrcPattern = aCol[nCol].GetPattern(static_cast<SCROW>(nRow));
if (bVertical)
aCol[nCol].SetPatternArea( static_cast<SCROW>(nIMin),
- static_cast<SCROW>(nIMax), *pSrcPattern, TRUE );
+ static_cast<SCROW>(nIMax), *pSrcPattern, sal_True );
else
for (SCCOL nAtCol = static_cast<SCCOL>(nIMin); nAtCol <= sal::static_int_cast<SCCOL>(nIMax); nAtCol++)
- aCol[nAtCol].SetPattern(static_cast<SCROW>(nRow), *pSrcPattern, TRUE);
+ aCol[nAtCol].SetPattern(static_cast<SCROW>(nRow), *pSrcPattern, sal_True);
}
if (pSrcCell)
@@ -1305,10 +1305,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
if (pDocument->RowFiltered( rInner, nTab))
continue;
- ULONG nInd = nActFormCnt;
+ sal_uLong nInd = nActFormCnt;
FillFormula(nInd, bFirst, (ScFormulaCell*)pSrcCell,
static_cast<SCCOL>(nCol), nRow, (rInner == nIEnd) );
- bFirst = FALSE;
+ bFirst = false;
rProgress.SetStateOnPercent( ++nProgress );
}
}
@@ -1335,10 +1335,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
double nVal = nStartVal;
long nIndex = 0;
- BOOL bError = FALSE;
- BOOL bOverflow = FALSE;
+ sal_Bool bError = false;
+ sal_Bool bOverflow = false;
- USHORT nDayOfMonth = 0;
+ sal_uInt16 nDayOfMonth = 0;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
@@ -1354,16 +1354,16 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
double nAdd = nStepValue;
if ( !SubTotal::SafeMult( nAdd, (double) ++nIndex ) ||
!SubTotal::SafePlus( nVal, nAdd ) )
- bError = TRUE;
+ bError = sal_True;
}
break;
case FILL_GROWTH:
if (!SubTotal::SafeMult(nVal, nStepValue))
- bError = TRUE;
+ bError = sal_True;
break;
case FILL_DATE:
if (fabs(nVal) > _D_MAX_LONG_)
- bError = TRUE;
+ bError = sal_True;
else
IncDate(nVal, nDayOfMonth, nStepValue, eFillDateCmd);
break;
@@ -1378,7 +1378,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal > nMaxValue) // Zielwert erreicht?
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
else
@@ -1386,7 +1386,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal < nMaxValue)
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
}
@@ -1420,17 +1420,17 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
else
((ScEditCell*)pSrcCell)->GetString( aValue );
sal_Int32 nStringValue;
- USHORT nMinDigits = nArgMinDigits;
+ sal_uInt16 nMinDigits = nArgMinDigits;
short nHeadNoneTail = lcl_DecompValueString( aValue, nStringValue, &nMinDigits );
if ( nHeadNoneTail )
{
double nStartVal = (double)nStringValue;
double nVal = nStartVal;
long nIndex = 0;
- BOOL bError = FALSE;
- BOOL bOverflow = FALSE;
+ sal_Bool bError = false;
+ sal_Bool bOverflow = false;
- BOOL bIsOrdinalSuffix = aValue.Equals( ScGlobal::GetOrdinalSuffix(
+ sal_Bool bIsOrdinalSuffix = aValue.Equals( ScGlobal::GetOrdinalSuffix(
(sal_Int32)nStartVal));
rInner = nIStart;
@@ -1448,12 +1448,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
double nAdd = nStepValue;
if ( !SubTotal::SafeMult( nAdd, (double) ++nIndex ) ||
!SubTotal::SafePlus( nVal, nAdd ) )
- bError = TRUE;
+ bError = sal_True;
}
break;
case FILL_GROWTH:
if (!SubTotal::SafeMult(nVal, nStepValue))
- bError = TRUE;
+ bError = sal_True;
break;
default:
{
@@ -1466,7 +1466,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal > nMaxValue) // Zielwert erreicht?
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
else
@@ -1474,7 +1474,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal < nMaxValue)
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
}
@@ -1519,10 +1519,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
void ScTable::Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
+ sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
double nStepValue, double nMaxValue)
{
- ULONG nProgCount;
+ sal_uLong nProgCount;
if (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP)
nProgCount = nCol2 - nCol1 + 1;
else
@@ -1531,13 +1531,13 @@ void ScTable::Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
ScProgress aProgress( pDocument->GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount );
- bSharedNameInserted = FALSE;
+ bSharedNameInserted = false;
if (eFillCmd == FILL_AUTO)
FillAuto(nCol1, nRow1, nCol2, nRow2, nFillCount, eFillDir, aProgress);
else
FillSeries(nCol1, nRow1, nCol2, nRow2, nFillCount, eFillDir,
- eFillCmd, eFillDateCmd, nStepValue, nMaxValue, 0, TRUE, aProgress);
+ eFillCmd, eFillDateCmd, nStepValue, nMaxValue, 0, sal_True, aProgress);
if (bSharedNameInserted) // Wurde Shared-Name eingefuegt?
pDocument->GetRangeName()->SetSharedMaxIndex(
@@ -1546,7 +1546,7 @@ void ScTable::Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
void ScTable::AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- const ScPatternAttr& rAttr, USHORT nFormatNo)
+ const ScPatternAttr& rAttr, sal_uInt16 nFormatNo)
{
ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat();
if (pAutoFormat)
@@ -1560,7 +1560,7 @@ void ScTable::AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
}
void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- USHORT nFormatNo )
+ sal_uInt16 nFormatNo )
{
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
{
@@ -1579,7 +1579,7 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
SCCOL nCol = nStartCol;
SCROW nRow = nStartRow;
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
// Linke obere Ecke
AutoFormatArea(nCol, nRow, nCol, nRow, *pPatternAttrs[nIndex], nFormatNo);
// Linke Spalte
@@ -1701,9 +1701,9 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
} // if ValidColRow
}
-void ScTable::GetAutoFormatAttr(SCCOL nCol, SCROW nRow, USHORT nIndex, ScAutoFormatData& rData)
+void ScTable::GetAutoFormatAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nIndex, ScAutoFormatData& rData)
{
- UINT32 nFormatIndex = GetNumberFormat( nCol, nRow );
+ sal_uInt32 nFormatIndex = GetNumberFormat( nCol, nRow );
ScNumFormatAbbrev aNumFormat( nFormatIndex, *pDocument->GetFormatTable() );
rData.GetFromItemSet( nIndex, GetPattern( nCol, nRow )->GetItemSet(), aNumFormat );
}
@@ -1714,7 +1714,7 @@ void ScTable::GetAutoFormatAttr(SCCOL nCol, SCROW nRow, USHORT nIndex, ScAutoFor
#define LF_BOTTOM 8
#define LF_ALL (LF_LEFT | LF_TOP | LF_RIGHT | LF_BOTTOM)
-void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, USHORT nFlags, USHORT nIndex, ScAutoFormatData& rData)
+void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, sal_uInt16 nFlags, sal_uInt16 nIndex, ScAutoFormatData& rData)
{
const SvxBoxItem* pTheBox = (SvxBoxItem*)GetAttr(nCol, nRow, ATTR_BORDER);
const SvxBoxItem* pLeftBox = (SvxBoxItem*)GetAttr(nCol - 1, nRow, ATTR_BORDER);
@@ -1846,7 +1846,7 @@ void ScTable::GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol,
}
}
-void ScTable::SetError( SCCOL nCol, SCROW nRow, USHORT nError)
+void ScTable::SetError( SCCOL nCol, SCROW nRow, sal_uInt16 nError)
{
if (ValidColRow(nCol, nRow))
aCol[nCol].SetError( nRow, nError );
@@ -1858,7 +1858,7 @@ void ScTable::UpdateInsertTabAbs(SCTAB nTable)
aCol[i].UpdateInsertTabAbs(nTable);
}
-BOOL ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel,
+sal_Bool ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, sal_Bool bInSel,
const ScMarkData& rMark) const
{
if (rRow == MAXROW+2) // Tabellenende
@@ -1876,17 +1876,17 @@ BOOL ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel,
}
}
if (rCol == MAXCOL+1)
- return TRUE;
+ return sal_True;
else
{
- BOOL bStop = FALSE;
+ sal_Bool bStop = false;
while (!bStop)
{
if (ValidCol(rCol))
{
bStop = aCol[rCol].GetNextSpellingCell(rRow, bInSel, rMark);
if (bStop)
- return TRUE;
+ return sal_True;
else /*if (rRow == MAXROW+1) */
{
rCol++;
@@ -1894,10 +1894,10 @@ BOOL ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel,
}
}
else
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
void ScTable::RemoveAutoSpellObj()
@@ -1906,12 +1906,12 @@ void ScTable::RemoveAutoSpellObj()
aCol[i].RemoveAutoSpellObj();
}
-BOOL ScTable::TestTabRefAbs(SCTAB nTable)
+sal_Bool ScTable::TestTabRefAbs(SCTAB nTable)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
for (SCCOL i=0; i <= MAXCOL; i++)
if (aCol[i].TestTabRefAbs(nTable))
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -1920,12 +1920,12 @@ void ScTable::CompileDBFormula()
for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].CompileDBFormula();
}
-void ScTable::CompileDBFormula( BOOL bCreateFormulaString )
+void ScTable::CompileDBFormula( sal_Bool bCreateFormulaString )
{
for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].CompileDBFormula( bCreateFormulaString );
}
-void ScTable::CompileNameFormula( BOOL bCreateFormulaString )
+void ScTable::CompileNameFormula( sal_Bool bCreateFormulaString )
{
for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].CompileNameFormula( bCreateFormulaString );
}
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 24165dbe39b7..d11e38cd2472 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -107,7 +107,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
}
else
{
- USHORT nAreaCount = GetPrintRangeCount();
+ sal_uInt16 nAreaCount = GetPrintRangeCount();
if ( nAreaCount > 1 )
{
// bei mehreren Bereichen nichts anzeigen:
@@ -138,13 +138,13 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
bool bSkipRowBreaks = false;
bool bSkipBreaks = false;
- if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false, &pItem ) == SFX_ITEM_SET )
{
DBG_ASSERT( pItem->ISA(SfxUInt16Item), "falsches Item" );
bSkipColBreaks = bSkipRowBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 );
}
- if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SFX_ITEM_SET )
{
// #i54993# when fitting to width or height, ignore only manual breaks in that direction
const ScPageScaleToItem* pScaleToItem = static_cast<const ScPageScaleToItem*>(pItem);
@@ -181,24 +181,24 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
// Mittelteil: Breaks verteilen
- BOOL bRepeatCol = ( nRepeatStartX != SCCOL_REPEAT_NONE );
- BOOL bColFound = FALSE;
+ sal_Bool bRepeatCol = ( nRepeatStartX != SCCOL_REPEAT_NONE );
+ sal_Bool bColFound = false;
long nSizeX = 0;
for (nX=nStartCol; nX<=nEndCol; nX++)
{
- BOOL bStartOfPage = FALSE;
+ sal_Bool bStartOfPage = false;
long nThisX = ColHidden(nX) ? 0 : pColWidth[nX];
bool bManualBreak = HasColManualBreak(nX);
if ( (nSizeX+nThisX > nPageSizeX) || (bManualBreak && !bSkipColBreaks) )
{
SetColBreak(nX, true, false);
nSizeX = 0;
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
}
else if (nX != nStartCol)
RemoveColBreak(nX, true, false);
else
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
if ( bStartOfPage && bRepeatCol && nX>nRepeatStartX && !bColFound )
{
@@ -207,7 +207,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
nPageSizeX -= ColHidden(i) ? 0 : pColWidth[i];
while (nX<=nRepeatEndX)
RemoveColBreak(++nX, true, false);
- bColFound = TRUE;
+ bColFound = sal_True;
}
nSizeX += nThisX;
@@ -217,15 +217,15 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
RemoveRowPageBreaks(nStartRow+1, nEndRow);
// And set new page breaks.
- BOOL bRepeatRow = ( nRepeatStartY != SCROW_REPEAT_NONE );
- BOOL bRowFound = FALSE;
+ sal_Bool bRepeatRow = ( nRepeatStartY != SCROW_REPEAT_NONE );
+ sal_Bool bRowFound = false;
long nSizeY = 0;
ScFlatBoolRowSegments::ForwardIterator aIterHidden(*mpHiddenRows);
ScFlatUInt16RowSegments::ForwardIterator aIterHeights(*mpRowHeights);
SCROW nNextManualBreak = GetNextManualBreak(nStartRow); // -1 => no more manual breaks
for (SCROW nY = nStartRow; nY <= nEndRow; ++nY)
{
- BOOL bStartOfPage = FALSE;
+ sal_Bool bStartOfPage = false;
bool bThisRowHidden = false;
aIterHidden.getValue(nY, bThisRowHidden);
long nThisY = 0;
@@ -249,12 +249,12 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
{
SetRowBreak(nY, true, false);
nSizeY = 0;
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
}
else if (nY != nStartRow)
; // page break already removed
else
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
if ( bStartOfPage && bRepeatRow && nY>nRepeatStartY && !bRowFound )
{
@@ -267,7 +267,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
nPageSizeY -= nHeights;
if (nY <= nRepeatEndY)
RemoveRowPageBreaks(nY, nRepeatEndY);
- bRowFound = TRUE;
+ bRowFound = sal_True;
}
if (bThisRowHidden)
@@ -329,10 +329,10 @@ void ScTable::RemoveManualBreaks()
InvalidatePageBreaks();
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
-BOOL ScTable::HasManualBreaks() const
+sal_Bool ScTable::HasManualBreaks() const
{
return !maRowManualBreaks.empty() || !maColManualBreaks.empty();
}
@@ -342,7 +342,7 @@ void ScTable::SetRowManualBreaks( const ::std::set<SCROW>& rBreaks )
maRowManualBreaks = rBreaks;
InvalidatePageBreaks();
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
void ScTable::SetColManualBreaks( const ::std::set<SCCOL>& rBreaks )
@@ -350,7 +350,7 @@ void ScTable::SetColManualBreaks( const ::std::set<SCCOL>& rBreaks )
maColManualBreaks = rBreaks;
InvalidatePageBreaks();
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) const
@@ -964,13 +964,13 @@ SCROW ScTable::CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const
namespace {
void lcl_syncFlags(ScFlatBoolColSegments& rColSegments, ScFlatBoolRowSegments& rRowSegments,
- BYTE* pColFlags, ScBitMaskCompressedArray< SCROW, BYTE>* pRowFlags, const BYTE nFlagMask)
+ sal_uInt8* pColFlags, ScBitMaskCompressedArray< SCROW, sal_uInt8>* pRowFlags, const sal_uInt8 nFlagMask)
{
using ::sal::static_int_cast;
- pRowFlags->AndValue(0, MAXROW, static_int_cast<BYTE>(~nFlagMask));
+ pRowFlags->AndValue(0, MAXROW, static_int_cast<sal_uInt8>(~nFlagMask));
for (SCCOL i = 0; i <= MAXCOL; ++i)
- pColFlags[i] &= static_int_cast<BYTE>(~nFlagMask);
+ pColFlags[i] &= static_int_cast<sal_uInt8>(~nFlagMask);
{
// row hidden flags.
@@ -983,7 +983,7 @@ void lcl_syncFlags(ScFlatBoolColSegments& rColSegments, ScFlatBoolRowSegments& r
break;
if (aData.mbValue)
- pRowFlags->OrValue(nRow, aData.mnRow2, static_int_cast<BYTE>(nFlagMask));
+ pRowFlags->OrValue(nRow, aData.mnRow2, static_int_cast<sal_uInt8>(nFlagMask));
nRow = aData.mnRow2 + 1;
}
@@ -1017,15 +1017,15 @@ void ScTable::SyncColRowFlags()
using ::sal::static_int_cast;
// Manual breaks.
- pRowFlags->AndValue(0, MAXROW, static_int_cast<BYTE>(~CR_MANUALBREAK));
+ pRowFlags->AndValue(0, MAXROW, static_int_cast<sal_uInt8>(~CR_MANUALBREAK));
for (SCCOL i = 0; i <= MAXCOL; ++i)
- pColFlags[i] &= static_int_cast<BYTE>(~CR_MANUALBREAK);
+ pColFlags[i] &= static_int_cast<sal_uInt8>(~CR_MANUALBREAK);
if (!maRowManualBreaks.empty())
{
for (set<SCROW>::const_iterator itr = maRowManualBreaks.begin(), itrEnd = maRowManualBreaks.end();
itr != itrEnd; ++itr)
- pRowFlags->OrValue(*itr, static_int_cast<BYTE>(CR_MANUALBREAK));
+ pRowFlags->OrValue(*itr, static_int_cast<sal_uInt8>(CR_MANUALBREAK));
}
if (!maColManualBreaks.empty())
@@ -1047,14 +1047,14 @@ void ScTable::SetPageSize( const Size& rSize )
if (aPageSizeTwips != rSize)
InvalidatePageBreaks();
- bPageSizeValid = TRUE;
+ bPageSizeValid = sal_True;
aPageSizeTwips = rSize;
}
else
- bPageSizeValid = FALSE;
+ bPageSizeValid = false;
}
-BOOL ScTable::IsProtected() const
+sal_Bool ScTable::IsProtected() const
{
return pTabProtection.get() && pTabProtection->isProtected();
}
@@ -1067,7 +1067,7 @@ void ScTable::SetProtection(const ScTableProtection* pProtect)
pTabProtection.reset(NULL);
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
ScTableProtection* ScTable::GetProtection()
@@ -1123,20 +1123,20 @@ void ScTable::SetPageStyle( const String& rName )
{
SfxItemSet& rOldSet = pOldStyle->GetItemSet();
SfxItemSet& rNewSet = pNewStyle->GetItemSet();
- const USHORT nOldScale = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALE);
- const USHORT nOldScaleToPages = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALETOPAGES);
- const USHORT nNewScale = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALE);
- const USHORT nNewScaleToPages = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nOldScale = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nOldScaleToPages = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nNewScale = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nNewScaleToPages = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALETOPAGES);
if ( (nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages) )
- InvalidateTextWidth(NULL, NULL, FALSE, FALSE);
+ InvalidateTextWidth(NULL, NULL, false, false);
}
if ( pNewStyle ) // auch ohne den alten (fuer UpdateStdNames)
aPageStyle = aStrNew;
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(false);
}
}
}
@@ -1144,11 +1144,11 @@ void ScTable::SetPageStyle( const String& rName )
void ScTable::PageStyleModified( const String& rNewName )
{
aPageStyle = rNewName;
- InvalidateTextWidth(NULL, NULL, FALSE, FALSE); // don't know what was in the style before
+ InvalidateTextWidth(NULL, NULL, false, false); // don't know what was in the style before
}
void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
- BOOL bNumFormatChanged, BOOL bBroadcast )
+ sal_Bool bNumFormatChanged, sal_Bool bBroadcast )
{
if ( pAdrFrom && !pAdrTo )
{
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 853bae233afc..20ad1ca1b007 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -52,9 +52,9 @@
using ::com::sun::star::util::SearchOptions;
-BOOL lcl_GetTextWithBreaks( const ScEditCell& rCell, ScDocument* pDoc, String& rVal )
+sal_Bool lcl_GetTextWithBreaks( const ScEditCell& rCell, ScDocument* pDoc, String& rVal )
{
- // TRUE = more than 1 paragraph
+ // sal_True = more than 1 paragraph
const EditTextObject* pData = NULL;
rCell.GetData( pData );
@@ -64,12 +64,12 @@ BOOL lcl_GetTextWithBreaks( const ScEditCell& rCell, ScDocument* pDoc, String& r
return ( rEngine.GetParagraphCount() > 1 );
}
-BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow,
+sal_Bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow,
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = FALSE;
- BOOL bDoSearch = TRUE;
- BOOL bDoBack = rSearchItem.GetBackward();
+ sal_Bool bFound = false;
+ sal_Bool bDoSearch = sal_True;
+ sal_Bool bDoBack = rSearchItem.GetBackward();
String aString;
ScBaseCell* pCell;
@@ -77,7 +77,7 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
bDoSearch = rMark.IsCellMarked(nCol, nRow);
if ( bDoSearch && ((pCell = aCol[nCol].GetCell( nRow )) != NULL) )
{
- BOOL bMultiLine = FALSE;
+ sal_Bool bMultiLine = false;
CellType eCellType = pCell->GetCellType();
switch (rSearchItem.GetCellType())
{
@@ -120,13 +120,13 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
if ( bDoBack )
{
xub_StrLen nTemp=nStart; nStart=nEnd; nEnd=nTemp;
- bFound = (BOOL)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd, &aSearchResult));
+ bFound = (sal_Bool)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd, &aSearchResult));
// change results to definition before 614:
--nEnd;
}
else
{
- bFound = (BOOL)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd, &aSearchResult));
+ bFound = (sal_Bool)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd, &aSearchResult));
// change results to definition before 614:
--nEnd;
}
@@ -140,7 +140,7 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
return bFound;
}
- BYTE cMatrixFlag = MM_NONE;
+ sal_uInt8 cMatrixFlag = MM_NONE;
if ( bFound &&
( (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE)
||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL) ) &&
@@ -159,13 +159,13 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
ScBaseCell* pUndoCell = pCell->CloneWithoutNote( *pUndoDoc );
pUndoDoc->PutCell( aAdr, pUndoCell);
}
- BOOL bRepeat = !rSearchItem.GetWordOnly();
+ sal_Bool bRepeat = !rSearchItem.GetWordOnly();
do
{
// wenn der gefundene Text leer ist, nicht weitersuchen,
// sonst wuerde man nie mehr aufhoeren (#35410#)
if ( nEnd < nStart || nEnd == STRING_MAXLEN )
- bRepeat = FALSE;
+ bRepeat = false;
String sReplStr = rSearchItem.GetReplaceString();
if (rSearchItem.GetRegExp())
@@ -197,17 +197,17 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
if (bRepeat)
{
if ( rSearchItem.GetCommand() != SVX_SEARCHCMD_REPLACE_ALL || nStart >= nEnd )
- bRepeat = FALSE;
+ bRepeat = false;
else if (bDoBack)
{
xub_StrLen nTemp=nStart; nStart=nEnd; nEnd=nTemp;
- bRepeat = ((BOOL)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd)));
+ bRepeat = ((sal_Bool)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd)));
// change results to definition before 614:
--nEnd;
}
else
{
- bRepeat = ((BOOL)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd)));
+ bRepeat = ((sal_Bool)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd)));
// change results to definition before 614:
--nEnd;
}
@@ -285,11 +285,11 @@ void ScTable::SkipFilteredRows(SCROW& rRow, SCROW& rLastNonFilteredRow, bool bFo
}
}
-BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+sal_Bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = FALSE;
- BOOL bAll = (rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL)
+ sal_Bool bFound = false;
+ sal_Bool bAll = (rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL)
||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL);
SCCOL nCol = rCol;
SCROW nRow = rRow;
@@ -315,14 +315,14 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
bFound = SearchCell(rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc);
if (!bFound)
{
- BOOL bIsEmpty;
+ sal_Bool bIsEmpty;
do
{
nCol--;
if ((SCsCOL)nCol >= 0)
bIsEmpty = aCol[nCol].IsEmptyData();
else
- bIsEmpty = TRUE;
+ bIsEmpty = sal_True;
}
while (((SCsCOL)nCol >= 0) && bIsEmpty);
}
@@ -354,7 +354,7 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
if (!bFound)
{
// Not found in this column. Move to the next column.
- BOOL bIsEmpty;
+ sal_Bool bIsEmpty;
nRow = nLastRow;
nLastNonFilteredRow = MAXROW + 1;
do
@@ -363,7 +363,7 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
if ((SCsCOL)nCol >= 0)
bIsEmpty = aCol[nCol].IsEmptyData();
else
- bIsEmpty = TRUE;
+ bIsEmpty = sal_True;
}
while (((SCsCOL)nCol >= 0) && bIsEmpty);
}
@@ -433,10 +433,10 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
return bFound;
}
-BOOL ScTable::SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
+sal_Bool ScTable::SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
SCCOL nCol = 0;
SCROW nRow = -1;
@@ -456,10 +456,10 @@ BOOL ScTable::SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
return (aNewMark.IsMultiMarked());
}
-BOOL ScTable::Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+sal_Bool ScTable::Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nCol = rCol;
SCROW nRow = rRow;
if (rSearchItem.GetBackward())
@@ -485,14 +485,14 @@ BOOL ScTable::Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow
return bFound;
}
-BOOL ScTable::ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
+sal_Bool ScTable::ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bOldDouble = ScColumn::bDoubleAlloc; // sollte immer FALSE sein?
+ sal_Bool bOldDouble = ScColumn::bDoubleAlloc; // sollte immer sal_False sein?
DBG_ASSERT(!bOldDouble,"bDoubleAlloc ???");
- ScColumn::bDoubleAlloc = TRUE; // fuer Undo-Doc
+ ScColumn::bDoubleAlloc = sal_True; // fuer Undo-Doc
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
SCCOL nCol = 0;
SCROW nRow = -1;
@@ -514,7 +514,7 @@ BOOL ScTable::ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
return (aNewMark.IsMultiMarked());
}
-BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+sal_Bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
ScMarkData& rMark)
{
const ScStyleSheet* pSearchStyle = (const ScStyleSheet*)
@@ -523,11 +523,11 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
SCsCOL nCol = rCol;
SCsROW nRow = rRow;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
- BOOL bSelect = rSearchItem.GetSelection();
- BOOL bRows = rSearchItem.GetRowDirection();
- BOOL bBack = rSearchItem.GetBackward();
+ sal_Bool bSelect = rSearchItem.GetSelection();
+ sal_Bool bRows = rSearchItem.GetRowDirection();
+ sal_Bool bBack = rSearchItem.GetBackward();
short nAdd = bBack ? -1 : 1;
if (bRows) // zeilenweise
@@ -544,7 +544,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
else
{
nRow = nNextRow;
- bFound = TRUE;
+ bFound = sal_True;
}
}
while (!bFound && ValidCol(nCol));
@@ -568,7 +568,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
{
nCol = i;
nRow = nNextRows[i];
- bFound = TRUE;
+ bFound = sal_True;
}
}
else // vorwaerts
@@ -579,7 +579,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
{
nCol = i;
nRow = nNextRows[i];
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -594,12 +594,12 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
//! einzelnes Pattern fuer Undo zurueckgeben
-BOOL ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
- ScMarkData& rMark, BOOL bIsUndo)
+sal_Bool ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+ ScMarkData& rMark, sal_Bool bIsUndo)
{
- BOOL bRet;
+ sal_Bool bRet;
if (bIsUndo)
- bRet = TRUE;
+ bRet = sal_True;
else
bRet = SearchStyle(rSearchItem, rCol, rRow, rMark);
if (bRet)
@@ -619,19 +619,19 @@ BOOL ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
return bRet;
}
-BOOL ScTable::SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark)
+sal_Bool ScTable::SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark)
{
const ScStyleSheet* pSearchStyle = (const ScStyleSheet*)
pDocument->GetStyleSheetPool()->Find(
rSearchItem.GetSearchString(), SFX_STYLE_FAMILY_PARA );
- BOOL bSelect = rSearchItem.GetSelection();
- BOOL bBack = rSearchItem.GetBackward();
+ sal_Bool bSelect = rSearchItem.GetSelection();
+ sal_Bool bBack = rSearchItem.GetBackward();
ScMarkData aNewMark( rMark ); // Tabellen-Markierungen kopieren
aNewMark.ResetMark();
for (SCCOL i=0; i<=MAXCOL; i++)
{
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
SCsROW nRow = 0;
SCsROW nEndRow;
while (bFound && nRow <= MAXROW)
@@ -657,10 +657,10 @@ BOOL ScTable::SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark
return (aNewMark.IsMultiMarked());
}
-BOOL ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
+sal_Bool ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
ScDocument* pUndoDoc)
{
- BOOL bRet = SearchAllStyle(rSearchItem, rMark);
+ sal_Bool bRet = SearchAllStyle(rSearchItem, rMark);
if (bRet)
{
const ScStyleSheet* pReplaceStyle = (const ScStyleSheet*)
@@ -671,7 +671,7 @@ BOOL ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMar
{
if (pUndoDoc)
pDocument->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab,
- IDF_ATTRIB, TRUE, pUndoDoc, &rMark );
+ IDF_ATTRIB, sal_True, pUndoDoc, &rMark );
ApplySelectionStyle( *pReplaceStyle, rMark );
}
else
@@ -683,12 +683,12 @@ BOOL ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMar
return bRet;
}
-BOOL ScTable::SearchAndReplace(const SvxSearchItem& rSearchItem,
+sal_Bool ScTable::SearchAndReplace(const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
{
- USHORT nCommand = rSearchItem.GetCommand();
- BOOL bFound = FALSE;
+ sal_uInt16 nCommand = rSearchItem.GetCommand();
+ sal_Bool bFound = false;
if ( ValidColRow(rCol, rRow) ||
((nCommand == SVX_SEARCHCMD_FIND || nCommand == SVX_SEARCHCMD_REPLACE) &&
(((rCol == MAXCOLCOUNT || rCol == -1) && VALIDROW(rRow)) ||
@@ -697,13 +697,13 @@ BOOL ScTable::SearchAndReplace(const SvxSearchItem& rSearchItem,
)
)
{
- BOOL bStyles = rSearchItem.GetPattern();
+ sal_Bool bStyles = rSearchItem.GetPattern();
if (bStyles)
{
if (nCommand == SVX_SEARCHCMD_FIND)
bFound = SearchStyle(rSearchItem, rCol, rRow, rMark);
else if (nCommand == SVX_SEARCHCMD_REPLACE)
- bFound = ReplaceStyle(rSearchItem, rCol, rRow, rMark, FALSE);
+ bFound = ReplaceStyle(rSearchItem, rCol, rRow, rMark, false);
else if (nCommand == SVX_SEARCHCMD_FIND_ALL)
bFound = SearchAllStyle(rSearchItem, rMark);
else if (nCommand == SVX_SEARCHCMD_REPLACE_ALL)
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 75ad071ffcee..137759d674da 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -82,7 +82,7 @@ ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOpe
eErrorStyle( SC_VALERR_STOP ),
mnListType( ValidListType::UNSORTED )
{
- bShowInput = bShowError = FALSE;
+ bShowInput = bShowError = false;
}
ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOper,
@@ -94,7 +94,7 @@ ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOpe
eErrorStyle( SC_VALERR_STOP ),
mnListType( ValidListType::UNSORTED )
{
- bShowInput = bShowError = FALSE;
+ bShowInput = bShowError = false;
}
ScValidationData::ScValidationData( const ScValidationData& r ) :
@@ -133,14 +133,14 @@ ScValidationData::~ScValidationData()
{
}
-BOOL ScValidationData::IsEmpty() const
+sal_Bool ScValidationData::IsEmpty() const
{
String aEmpty;
ScValidationData aDefault( SC_VALID_ANY, SC_COND_EQUAL, aEmpty, aEmpty, GetDocument(), ScAddress() );
return EqualEntries( aDefault );
}
-BOOL ScValidationData::EqualEntries( const ScValidationData& r ) const
+sal_Bool ScValidationData::EqualEntries( const ScValidationData& r ) const
{
// gleiche Parameter eingestellt (ohne Key)
@@ -158,17 +158,17 @@ BOOL ScValidationData::EqualEntries( const ScValidationData& r ) const
void ScValidationData::ResetInput()
{
- bShowInput = FALSE;
+ bShowInput = false;
}
void ScValidationData::ResetError()
{
- bShowError = FALSE;
+ bShowError = false;
}
void ScValidationData::SetInput( const String& rTitle, const String& rMsg )
{
- bShowInput = TRUE;
+ bShowInput = sal_True;
aInputTitle = rTitle;
aInputMessage = rMsg;
}
@@ -176,13 +176,13 @@ void ScValidationData::SetInput( const String& rTitle, const String& rMsg )
void ScValidationData::SetError( const String& rTitle, const String& rMsg,
ScValidErrorStyle eStyle )
{
- bShowError = TRUE;
+ bShowError = sal_True;
eErrorStyle = eStyle;
aErrorTitle = rTitle;
aErrorMessage = rMsg;
}
-BOOL ScValidationData::GetErrMsg( String& rTitle, String& rMsg,
+sal_Bool ScValidationData::GetErrMsg( String& rTitle, String& rMsg,
ScValidErrorStyle& rStyle ) const
{
rTitle = aErrorTitle;
@@ -191,15 +191,15 @@ BOOL ScValidationData::GetErrMsg( String& rTitle, String& rMsg,
return bShowError;
}
-BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
+sal_Bool ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
ScFormulaCell* pCell, Window* pParent ) const
{
ScDocument* pDocument = GetDocument();
SfxObjectShell* pDocSh = pDocument->GetDocumentShell();
if ( !pDocSh || !pDocument->CheckMacroWarn() )
- return FALSE;
+ return false;
- BOOL bScriptReturnedFalse = FALSE; // Standard: kein Abbruch
+ sal_Bool bScriptReturnedFalse = false; // Standard: kein Abbruch
// Set up parameters
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aParams(2);
@@ -207,7 +207,7 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
// 1) eingegebener / berechneter Wert
String aValStr = rInput;
double nValue;
- BOOL bIsValue = FALSE;
+ sal_Bool bIsValue = false;
if ( pCell ) // wenn Zelle gesetzt, aus Interpret gerufen
{
bIsValue = pCell->IsValue();
@@ -228,9 +228,9 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
// use link-update flag to prevent closing the document
// while the macro is running
- BOOL bWasInLinkUpdate = pDocument->IsInLinkUpdate();
+ sal_Bool bWasInLinkUpdate = pDocument->IsInLinkUpdate();
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( TRUE );
+ pDocument->SetInLinkUpdate( sal_True );
if ( pCell )
pDocument->LockTable( rPos.Tab() );
@@ -246,17 +246,17 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
pDocument->UnlockTable( rPos.Tab() );
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( FALSE );
+ pDocument->SetInLinkUpdate( false );
// Check the return value from the script
// The contents of the cell get reset if the script returns false
- BOOL bTmp = FALSE;
+ sal_Bool bTmp = false;
if ( eRet == ERRCODE_NONE &&
aRet.getValueType() == getCppuBooleanType() &&
sal_True == ( aRet >>= bTmp ) &&
- bTmp == FALSE )
+ bTmp == false )
{
- bScriptReturnedFalse = TRUE;
+ bScriptReturnedFalse = sal_True;
}
if ( eRet == ERRCODE_BASIC_METHOD_NOT_FOUND && !pCell )
@@ -272,9 +272,9 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
return bScriptReturnedFalse;
}
- // TRUE -> Abbruch
+ // sal_True -> Abbruch
-BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
+sal_Bool ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
ScFormulaCell* pCell, Window* pParent ) const
{
if ( SfxApplication::IsXScriptURL( aErrorTitle ) )
@@ -285,12 +285,10 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
ScDocument* pDocument = GetDocument();
SfxObjectShell* pDocSh = pDocument->GetDocumentShell();
if ( !pDocSh || !pDocument->CheckMacroWarn() )
- return FALSE;
+ return false;
- BOOL bDone = FALSE;
- BOOL bRet = FALSE; // Standard: kein Abbruch
- SfxApplication* pSfxApp = SFX_APP();
- pSfxApp->EnterBasicCall(); // Dok-Basic anlegen etc.
+ sal_Bool bDone = false;
+ sal_Bool bRet = false; // Standard: kein Abbruch
// Wenn das Dok waehrend eines Basic-Calls geladen wurde,
// ist das Sbx-Objekt evtl. nicht angelegt (?)
@@ -331,7 +329,7 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
// 1) eingegebener / berechneter Wert
String aValStr = rInput;
double nValue = 0.0;
- BOOL bIsValue = FALSE;
+ sal_Bool bIsValue = false;
if ( pCell ) // wenn Zelle gesetzt, aus Interpret gerufen
{
bIsValue = pCell->IsValue();
@@ -352,26 +350,25 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
// use link-update flag to prevent closing the document
// while the macro is running
- BOOL bWasInLinkUpdate = pDocument->IsInLinkUpdate();
+ sal_Bool bWasInLinkUpdate = pDocument->IsInLinkUpdate();
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( TRUE );
+ pDocument->SetInLinkUpdate( sal_True );
if ( pCell )
pDocument->LockTable( rPos.Tab() );
SbxVariableRef refRes = new SbxVariable;
- ErrCode eRet = pDocSh->CallBasic( aMacroStr, aBasicStr, NULL, refPar, refRes );
+ ErrCode eRet = pDocSh->CallBasic( aMacroStr, aBasicStr, refPar, refRes );
if ( pCell )
pDocument->UnlockTable( rPos.Tab() );
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( FALSE );
+ pDocument->SetInLinkUpdate( false );
- // Eingabe abbrechen, wenn Basic-Makro FALSE zurueckgibt
- if ( eRet == ERRCODE_NONE && refRes->GetType() == SbxBOOL && refRes->GetBool() == FALSE )
- bRet = TRUE;
- bDone = TRUE;
+ // Eingabe abbrechen, wenn Basic-Makro sal_False zurueckgibt
+ if ( eRet == ERRCODE_NONE && refRes->GetType() == SbxBOOL && refRes->GetBool() == false )
+ bRet = sal_True;
+ bDone = sal_True;
}
- pSfxApp->LeaveBasicCall();
if ( !bDone && !pCell ) // Makro nicht gefunden (nur bei Eingabe)
{
@@ -391,9 +388,9 @@ void ScValidationData::DoCalcError( ScFormulaCell* pCell ) const
DoMacro( pCell->aPos, EMPTY_STRING, pCell, NULL );
}
- // TRUE -> Abbruch
+ // sal_True -> Abbruch
-BOOL ScValidationData::DoError( Window* pParent, const String& rInput,
+sal_Bool ScValidationData::DoError( Window* pParent, const String& rInput,
const ScAddress& rPos ) const
{
if ( eErrorStyle == SC_VALERR_MACRO )
@@ -430,20 +427,20 @@ BOOL ScValidationData::DoError( Window* pParent, const String& rInput,
}
MessBox aBox( pParent, WinBits(nStyle), aTitle, aMessage );
- USHORT nRet = aBox.Execute();
+ sal_uInt16 nRet = aBox.Execute();
return ( eErrorStyle == SC_VALERR_STOP || nRet == RET_CANCEL );
}
-BOOL ScValidationData::IsDataValid( const String& rTest, const ScPatternAttr& rPattern,
+sal_Bool ScValidationData::IsDataValid( const String& rTest, const ScPatternAttr& rPattern,
const ScAddress& rPos ) const
{
if ( eDataMode == SC_VALID_ANY )
- return TRUE; // alles erlaubt
+ return sal_True; // alles erlaubt
if ( rTest.GetChar(0) == '=' )
- return FALSE; // Formeln sind sonst immer ungueltig
+ return false; // Formeln sind sonst immer ungueltig
if ( !rTest.Len() )
return IsIgnoreBlank(); // leer: wie eingestellt
@@ -455,27 +452,27 @@ BOOL ScValidationData::IsDataValid( const String& rTest, const ScPatternAttr& rP
sal_uInt32 nFormat = rPattern.GetNumberFormat( pFormatter );
double nVal;
- BOOL bIsVal = pFormatter->IsNumberFormat( rTest, nFormat, nVal );
+ sal_Bool bIsVal = pFormatter->IsNumberFormat( rTest, nFormat, nVal );
ScBaseCell* pCell;
if (bIsVal)
pCell = new ScValueCell( nVal );
else
pCell = new ScStringCell( rTest );
- BOOL bRet = IsDataValid( pCell, rPos );
+ sal_Bool bRet = IsDataValid( pCell, rPos );
pCell->Delete();
return bRet;
}
-BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) const
+sal_Bool ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) const
{
if( eDataMode == SC_VALID_LIST )
return IsListValid( pCell, rPos );
double nVal = 0.0;
String aString;
- BOOL bIsVal = TRUE;
+ sal_Bool bIsVal = sal_True;
switch (pCell->GetCellType())
{
@@ -484,11 +481,11 @@ BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) c
break;
case CELLTYPE_STRING:
((ScStringCell*)pCell)->GetString( aString );
- bIsVal = FALSE;
+ bIsVal = false;
break;
case CELLTYPE_EDIT:
((ScEditCell*)pCell)->GetString( aString );
- bIsVal = FALSE;
+ bIsVal = false;
break;
case CELLTYPE_FORMULA:
{
@@ -504,7 +501,7 @@ BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) c
return IsIgnoreBlank(); // wie eingestellt
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
switch (eDataMode)
{
// SC_VALID_ANY schon oben
@@ -597,7 +594,7 @@ const String* ScStringTokenIterator::Next()
// ----------------------------------------------------------------------------
/** Returns the number format of the passed cell, or the standard format. */
-ULONG lclGetCellFormat( ScDocument& rDoc, const ScAddress& rPos )
+sal_uLong lclGetCellFormat( ScDocument& rDoc, const ScAddress& rPos )
{
const ScPatternAttr* pPattern = rDoc.GetPattern( rPos.Col(), rPos.Row(), rPos.Tab() );
if( !pPattern )
@@ -652,7 +649,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
// Use an interim matrix to create the TypedStrData below.
xMatRef = new ScMatrix(1,1);
- USHORT nErrCode = aValidationSrc.GetErrCode();
+ sal_uInt16 nErrCode = aValidationSrc.GetErrCode();
if (nErrCode)
{
/* TODO : to use later in an alert box?
@@ -684,7 +681,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
SCSIZE nCol, nRow, nCols, nRows, n = 0;
pValues->GetDimensions( nCols, nRows );
- BOOL bRef = FALSE;
+ sal_Bool bRef = false;
ScRange aRange;
ScTokenArray* pArr = (ScTokenArray*) &rTokArr;
@@ -697,7 +694,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
if( ScDBData* pDBData = pDocument->GetDBCollection()->FindIndex( t->GetIndex() ) )
{
pDBData->GetArea(aRange);
- bRef = TRUE;
+ bRef = sal_True;
}
}
else if (t->GetOpCode() == ocName)
@@ -705,7 +702,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
ScRangeData* pName = pDocument->GetRangeName()->findByIndex( t->GetIndex() );
if (pName && pName->IsReference(aRange))
{
- bRef = TRUE;
+ bRef = sal_True;
}
}
else if (t->GetType() != svIndex)
@@ -713,7 +710,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
t->CalcAbsIfRel(rPos);
if (pArr->IsValidReference(aRange))
{
- bRef = TRUE;
+ bRef = sal_True;
}
}
}
@@ -746,7 +743,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
}
else
{
- USHORT nErr = nMatVal.GetError();
+ sal_uInt16 nErr = nMatVal.GetError();
if( 0 != nErr )
{
@@ -809,7 +806,7 @@ bool ScValidationData::FillSelectionList( TypedScStrCollection& rStrColl, const
// *** try if formula is a string list ***
bool bSortList = (mnListType == ValidListType::SORTEDASCENDING);
- UINT32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
+ sal_uInt32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
ScStringTokenIterator aIt( *pTokArr );
for( const String* pString = aIt.First(); pString && aIt.Ok(); pString = aIt.Next() )
{
@@ -861,7 +858,7 @@ bool ScValidationData::IsListValid( ScBaseCell* pCell, const ScAddress& rPos ) c
// *** try if formula is a string list ***
- UINT32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
+ sal_uInt32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
ScStringTokenIterator aIt( *pTokArr );
for( const String* pString = aIt.First(); pString && aIt.Ok(); pString = aIt.Next() )
{
@@ -905,9 +902,9 @@ ScValidationDataList::ScValidationDataList(const ScValidationDataList& rList) :
{
// fuer Ref-Undo - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone() );
//! sortierte Eintraege aus rList schneller einfuegen ???
@@ -918,9 +915,9 @@ ScValidationDataList::ScValidationDataList(ScDocument* pNewDoc,
{
// fuer neues Dokument - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone(pNewDoc) );
//! sortierte Eintraege aus rList schneller einfuegen ???
@@ -930,8 +927,8 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey )
{
//! binaer suchen
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*this)[i]->GetKey() == nKey)
return (*this)[i];
@@ -941,35 +938,35 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey )
void ScValidationDataList::CompileXML()
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->CompileXML();
}
void ScValidationDataList::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz);
}
void ScValidationDataList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateMoveTab( nOldPos, nNewPos );
}
-BOOL ScValidationDataList::operator==( const ScValidationDataList& r ) const
+sal_Bool ScValidationDataList::operator==( const ScValidationDataList& r ) const
{
// fuer Ref-Undo - interne Variablen werden nicht verglichen
- USHORT nCount = Count();
- BOOL bEqual = ( nCount == r.Count() );
- for (USHORT i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
+ sal_uInt16 nCount = Count();
+ sal_Bool bEqual = ( nCount == r.Count() );
+ for (sal_uInt16 i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
if ( !(*this)[i]->EqualEntries(*r[i]) ) // Eintraege unterschiedlich ?
- bEqual = FALSE;
+ bEqual = false;
return bEqual;
}
diff --git a/sc/source/core/inc/addinhelpid.hxx b/sc/source/core/inc/addinhelpid.hxx
index 6618c97b6dc9..94ccfb64fbb3 100644
--- a/sc/source/core/inc/addinhelpid.hxx
+++ b/sc/source/core/inc/addinhelpid.hxx
@@ -30,7 +30,7 @@
#define SC_ADDINHELPID_HXX
#include <rtl/ustring.hxx>
-
+#include <rtl/string.hxx>
// ============================================================================
@@ -51,7 +51,7 @@ public:
void SetServiceName( const ::rtl::OUString& rServiceName );
/** @return The help ID of the function with given built-in name or 0 if not found. */
- sal_uInt16 GetHelpId( const ::rtl::OUString& rFuncName ) const;
+ rtl::OString GetHelpId( const ::rtl::OUString& rFuncName ) const;
};
diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx
index 69896c08160a..061c5077137b 100644
--- a/sc/source/core/inc/adiasync.hxx
+++ b/sc/source/core/inc/adiasync.hxx
@@ -60,32 +60,32 @@ private:
};
ScAddInDocs* pDocs; // Liste der benutzenden Dokumente
FuncData* pFuncData; // Zeiger auf die Daten in der Collection
- ULONG nHandle; // wird von double auf ULONG gecasted
+ sal_uLong nHandle; // wird von double auf sal_uLong gecasted
ParamType eType; // PTR_DOUBLE oder PTR_STRING Ergebnis
- BOOL bValid; // ob Wert gueltig
+ sal_Bool bValid; // ob Wert gueltig
public:
// cTor nur wenn ScAddInAsync::Get fehlschlaegt!
// nIndex: Index aus der FunctionCollection
- ScAddInAsync( ULONG nHandle, USHORT nIndex,
+ ScAddInAsync( sal_uLong nHandle, sal_uInt16 nIndex,
ScDocument* pDoc );
// default-cTor nur fuer das eine globale aSeekObj !!!
ScAddInAsync();
virtual ~ScAddInAsync();
- static ScAddInAsync* Get( ULONG nHandle );
- static void CallBack( ULONG nHandle, void* pData );
+ static ScAddInAsync* Get( sal_uLong nHandle );
+ static void CallBack( sal_uLong nHandle, void* pData );
static void RemoveDocument( ScDocument* pDocument );
- BOOL IsValid() const { return bValid; }
+ sal_Bool IsValid() const { return bValid; }
ParamType GetType() const { return eType; }
double GetValue() const { return nVal; }
const String& GetString() const { return *pStr; }
- BOOL HasDocument( ScDocument* pDoc ) const
+ sal_Bool HasDocument( ScDocument* pDoc ) const
{ return pDocs->Seek_Entry( pDoc ); }
void AddDocument( ScDocument* pDoc ) { pDocs->Insert( pDoc ); }
// Vergleichsoperatoren fuer PtrArrSort
- BOOL operator < ( const ScAddInAsync& r ) { return nHandle < r.nHandle; }
- BOOL operator ==( const ScAddInAsync& r ) { return nHandle == r.nHandle; }
+ sal_Bool operator < ( const ScAddInAsync& r ) { return nHandle < r.nHandle; }
+ sal_Bool operator ==( const ScAddInAsync& r ) { return nHandle == r.nHandle; }
};
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index 6d857c10f2e9..642baa97262b 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -48,13 +48,13 @@ private:
ScBroadcastArea* pUpdateChainNext;
SvtBroadcaster aBroadcaster;
ScRange aRange;
- ULONG nRefCount;
- BOOL bInUpdateChain;
+ sal_uLong nRefCount;
+ sal_Bool bInUpdateChain;
public:
ScBroadcastArea( const ScRange& rRange )
: pUpdateChainNext( NULL ), aRange( rRange ),
- nRefCount( 0 ), bInUpdateChain( FALSE ) {}
+ nRefCount( 0 ), bInUpdateChain( false ) {}
inline SvtBroadcaster& GetBroadcaster() { return aBroadcaster; }
inline const SvtBroadcaster& GetBroadcaster() const { return aBroadcaster; }
inline void UpdateRange( const ScRange& rNewRange )
@@ -63,12 +63,12 @@ public:
inline const ScAddress& GetStart() const { return aRange.aStart; }
inline const ScAddress& GetEnd() const { return aRange.aEnd; }
inline void IncRef() { ++nRefCount; }
- inline ULONG DecRef() { return nRefCount ? --nRefCount : 0; }
- inline ULONG GetRef() { return nRefCount; }
+ inline sal_uLong DecRef() { return nRefCount ? --nRefCount : 0; }
+ inline sal_uLong GetRef() { return nRefCount; }
inline ScBroadcastArea* GetUpdateChainNext() const { return pUpdateChainNext; }
inline void SetUpdateChainNext( ScBroadcastArea* p ) { pUpdateChainNext = p; }
- inline BOOL IsInUpdateChain() const { return bInUpdateChain; }
- inline void SetInUpdateChain( BOOL b ) { bInUpdateChain = b; }
+ inline sal_Bool IsInUpdateChain() const { return bInUpdateChain; }
+ inline void SetInUpdateChain( sal_Bool b ) { bInUpdateChain = b; }
/** Equalness of this or range. */
inline bool operator==( const ScBroadcastArea & rArea ) const;
@@ -140,7 +140,7 @@ private:
whether there would be an overflow when adding an area, setting the
proper state if so.
- @return TRUE if a HardRecalcState is effective and area is not to be
+ @return sal_True if a HardRecalcState is effective and area is not to be
added.
*/
bool CheckHardRecalcStateCondition() const;
@@ -166,7 +166,7 @@ public:
as InsertListeningArea(), so use that instead.
@return
- TRUE if rpArea passed was NULL and ScBroadcastArea is newly
+ sal_True if rpArea passed was NULL and ScBroadcastArea is newly
created.
*/
bool StartListeningArea( const ScRange& rRange,
@@ -182,9 +182,9 @@ public:
void EndListeningArea( const ScRange& rRange,
SvtListener* pListener,
ScBroadcastArea*& rpArea );
- BOOL AreaBroadcast( const ScHint& rHint ) const;
- /// @return TRUE if at least one broadcast occurred.
- BOOL AreaBroadcastInRange( const ScRange& rRange,
+ sal_Bool AreaBroadcast( const ScHint& rHint ) const;
+ /// @return sal_True if at least one broadcast occurred.
+ sal_Bool AreaBroadcastInRange( const ScRange& rRange,
const ScHint& rHint ) const;
void DelBroadcastAreasInRange( const ScRange& rRange );
void UpdateRemove( UpdateRefMode eUpdateRefMode,
@@ -246,7 +246,7 @@ private:
ScDocument *pDoc;
ScBroadcastArea *pUpdateChain;
ScBroadcastArea *pEOUpdateChain;
- ULONG nInBulkBroadcast;
+ sal_uLong nInBulkBroadcast;
inline SCSIZE ComputeSlotOffset( const ScAddress& rAddress ) const;
void ComputeAreaPoints( const ScRange& rRange,
@@ -260,9 +260,9 @@ public:
SvtListener* pListener );
void EndListeningArea( const ScRange& rRange,
SvtListener* pListener );
- BOOL AreaBroadcast( const ScHint& rHint ) const;
+ sal_Bool AreaBroadcast( const ScHint& rHint ) const;
// return: at least one broadcast occurred
- BOOL AreaBroadcastInRange( const ScRange& rRange, const ScHint& rHint ) const;
+ sal_Bool AreaBroadcastInRange( const ScRange& rRange, const ScHint& rHint ) const;
void DelBroadcastAreasInRange( const ScRange& rRange );
void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
const ScRange& rRange,
diff --git a/sc/source/core/inc/core_pch.hxx b/sc/source/core/inc/core_pch.hxx
index 5d22588fe1c9..2d906c5b1de8 100644
--- a/sc/source/core/inc/core_pch.hxx
+++ b/sc/source/core/inc/core_pch.hxx
@@ -120,7 +120,7 @@
#include <vcl/outdev.hxx>
#include <vcl/pointr.hxx>
#include <vcl/ptrstyle.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/event.hxx>
#include <tools/ownlist.hxx>
#include <svl/itempool.hxx>
diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx
index b437f10c1d68..fd9317ce28f5 100644
--- a/sc/source/core/inc/ddelink.hxx
+++ b/sc/source/core/inc/ddelink.hxx
@@ -42,16 +42,16 @@ class SvStream;
class ScDdeLink : public ::sfx2::SvBaseLink, public SvtBroadcaster
{
private:
-static BOOL bIsInUpdate;
+static sal_Bool bIsInUpdate;
ScDocument* pDoc;
String aAppl; // Verbindungsdaten
String aTopic;
String aItem;
- BYTE nMode; // Zahlformat-Modus
+ sal_uInt8 nMode; // Zahlformat-Modus
- BOOL bNeedUpdate; // wird gesetzt, wenn Update nicht moeglich war
+ sal_Bool bNeedUpdate; // wird gesetzt, wenn Update nicht moeglich war
ScMatrixRef pResult; // Ergebnis
@@ -60,7 +60,7 @@ public:
ScDdeLink( ScDocument* pD,
const String& rA, const String& rT, const String& rI,
- BYTE nM );
+ sal_uInt8 nM );
ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& rHdr );
ScDdeLink( ScDocument* pD, const ScDdeLink& rOther );
virtual ~ScDdeLink();
@@ -85,14 +85,14 @@ public:
const String& GetAppl() const { return aAppl; }
const String& GetTopic() const { return aTopic; }
const String& GetItem() const { return aItem; }
- BYTE GetMode() const { return nMode; }
+ sal_uInt8 GetMode() const { return nMode; }
void ResetValue(); // Wert zuruecksetzen
void TryUpdate();
- BOOL NeedsUpdate() const { return bNeedUpdate; }
+ sal_Bool NeedsUpdate() const { return bNeedUpdate; }
- static BOOL IsInUpdate() { return bIsInUpdate; }
+ static sal_Bool IsInUpdate() { return bIsInUpdate; }
};
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index aa366298a51f..ce59c16ffa20 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -55,14 +55,14 @@ struct ScCompare
{
double nVal[2];
String* pVal[2];
- BOOL bVal[2];
- BOOL bEmpty[2];
+ sal_Bool bVal[2];
+ sal_Bool bEmpty[2];
ScCompare( String* p1, String* p2 )
{
pVal[ 0 ] = p1;
pVal[ 1 ] = p2;
- bEmpty[0] = FALSE;
- bEmpty[1] = FALSE;
+ bEmpty[0] = false;
+ bEmpty[1] = false;
}
};
@@ -127,9 +127,9 @@ public:
/// Could string be a regular expression?
/// If pDoc!=NULL the document options are taken into account and if
- /// RegularExpressions are disabled the function returns FALSE regardless
+ /// RegularExpressions are disabled the function returns sal_False regardless
/// of the string content.
- static BOOL MayBeRegExp( const String& rStr, const ScDocument* pDoc );
+ static sal_Bool MayBeRegExp( const String& rStr, const ScDocument* pDoc );
/// Fail safe division, returning an errDivisionByZero coded into a double
/// if denominator is 0.0
@@ -147,7 +147,7 @@ public:
private:
static ScTokenStack* pGlobalStack;
- static BOOL bGlobalStackInUse;
+ static sal_Bool bGlobalStackInUse;
formula::FormulaTokenIterator aCode;
ScAddress aPos;
@@ -164,28 +164,28 @@ private:
String aTempStr; // for GetString()
ScTokenStack* pStackObj; // contains the stacks
formula::FormulaToken** pStack; // the current stack
- USHORT nGlobalError; // global (local to this formula expression) error
- USHORT sp; // stack pointer
- USHORT maxsp; // the maximal used stack pointer
- ULONG nFuncFmtIndex; // NumberFormatIndex of a function
- ULONG nCurFmtIndex; // current NumberFormatIndex
- ULONG nRetFmtIndex; // NumberFormatIndex of an expression, if any
+ sal_uInt16 nGlobalError; // global (local to this formula expression) error
+ sal_uInt16 sp; // stack pointer
+ sal_uInt16 maxsp; // the maximal used stack pointer
+ sal_uLong nFuncFmtIndex; // NumberFormatIndex of a function
+ sal_uLong nCurFmtIndex; // current NumberFormatIndex
+ sal_uLong nRetFmtIndex; // NumberFormatIndex of an expression, if any
short nFuncFmtType; // NumberFormatType of a function
short nCurFmtType; // current NumberFormatType
short nRetFmtType; // NumberFormatType of an expression
- USHORT mnStringNoValueError; // the error set in ConvertStringToValue() if no value
- BOOL glSubTotal; // flag for subtotal functions
- BYTE cPar; // current count of parameters
- BOOL bCalcAsShown; // precision as shown
- BOOL bMatrixFormula; // formula cell is a matrix formula
+ sal_uInt16 mnStringNoValueError; // the error set in ConvertStringToValue() if no value
+ sal_Bool glSubTotal; // flag for subtotal functions
+ sal_uInt8 cPar; // current count of parameters
+ sal_Bool bCalcAsShown; // precision as shown
+ sal_Bool bMatrixFormula; // formula cell is a matrix formula
VolatileType meVolaileType;
//---------------------------------Funktionen in interpre.cxx---------
// nMust <= nAct <= nMax ? ok : PushError
-inline BOOL MustHaveParamCount( short nAct, short nMust );
-inline BOOL MustHaveParamCount( short nAct, short nMust, short nMax );
-inline BOOL MustHaveParamCountMin( short nAct, short nMin );
+inline sal_Bool MustHaveParamCount( short nAct, short nMust );
+inline sal_Bool MustHaveParamCount( short nAct, short nMust, short nMax );
+inline sal_Bool MustHaveParamCountMin( short nAct, short nMin );
void PushParameterExpected();
void PushIllegalParameter();
void PushIllegalArgument();
@@ -196,8 +196,8 @@ void PushNA();
//-------------------------------------------------------------------------
void ReplaceCell( ScAddress& ); // for TableOp
void ReplaceCell( SCCOL& rCol, SCROW& rRow, SCTAB& rTab ); // for TableOp
-BOOL IsTableOpInRange( const ScRange& );
-ULONG GetCellNumberFormat( const ScAddress&, const ScBaseCell* );
+sal_Bool IsTableOpInRange( const ScRange& );
+sal_uLong GetCellNumberFormat( const ScAddress&, const ScBaseCell* );
double ConvertStringToValue( const String& );
double GetCellValue( const ScAddress&, const ScBaseCell* );
double GetCellValueOrZero( const ScAddress&, const ScBaseCell* );
@@ -205,26 +205,26 @@ double GetValueCellValue( const ScAddress&, const ScValueCell* );
ScBaseCell* GetCell( const ScAddress& rPos )
{ return pDok->GetCell( rPos ); }
void GetCellString( String& rStr, const ScBaseCell* pCell );
-inline USHORT GetCellErrCode( const ScBaseCell* pCell )
+inline sal_uInt16 GetCellErrCode( const ScBaseCell* pCell )
{ return pCell ? pCell->GetErrorCode() : 0; }
inline CellType GetCellType( const ScBaseCell* pCell )
{ return pCell ? pCell->GetCellType() : CELLTYPE_NONE; }
/// Really empty or inherited emptiness.
-inline BOOL HasCellEmptyData( const ScBaseCell* pCell )
- { return pCell ? pCell->HasEmptyData() : TRUE; }
+inline sal_Bool HasCellEmptyData( const ScBaseCell* pCell )
+ { return pCell ? pCell->HasEmptyData() : sal_True; }
/// This includes inherited emptiness, which usually is regarded as value!
-inline BOOL HasCellValueData( const ScBaseCell* pCell )
- { return pCell ? pCell->HasValueData() : FALSE; }
+inline sal_Bool HasCellValueData( const ScBaseCell* pCell )
+ { return pCell ? pCell->HasValueData() : false; }
/// Not empty and not value.
-inline BOOL HasCellStringData( const ScBaseCell* pCell )
- { return pCell ? pCell->HasStringData() : FALSE; }
+inline sal_Bool HasCellStringData( const ScBaseCell* pCell )
+ { return pCell ? pCell->HasStringData() : false; }
-BOOL CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
-BOOL CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
-BOOL CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
+sal_Bool CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr);
+sal_Bool CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr);
+sal_Bool CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr);
//-----------------------------------------------------------------------------
// Stack operations
@@ -279,7 +279,7 @@ inline bool IfErrorPushError()
result. Also obtain number format and type if _both_, type and index
pointer, are not NULL. */
void PushCellResultToken( bool bDisplayEmptyAsString, const ScAddress & rAddress,
- short * pRetTypeExpr, ULONG * pRetIndexExpr );
+ short * pRetTypeExpr, sal_uLong * pRetIndexExpr );
formula::FormulaTokenRef PopToken();
void Pop();
@@ -292,7 +292,7 @@ void ValidateRef( const ScRefList & rRefList );
void SingleRefToVars( const ScSingleRefData & rRef, SCCOL & rCol, SCROW & rRow, SCTAB & rTab );
void PopSingleRef( ScAddress& );
void PopSingleRef(SCCOL& rCol, SCROW &rRow, SCTAB& rTab);
-void DoubleRefToRange( const ScComplexRefData&, ScRange&, BOOL bDontCheckForTableOp = FALSE );
+void DoubleRefToRange( const ScComplexRefData&, ScRange&, sal_Bool bDontCheckForTableOp = false );
/** If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of
ScComplexRefData.
Else if StackVar svRefList return values of the ScComplexRefData where
@@ -302,31 +302,31 @@ void DoubleRefToRange( const ScComplexRefData&, ScRange&, BOOL bDontCheckForTabl
while(nParamCount--) PopDoubleRef(aRange,nParamCount,nRefInList);
*/
void PopDoubleRef( ScRange & rRange, short & rParam, size_t & rRefInList );
-void PopDoubleRef( ScRange&, BOOL bDontCheckForTableOp = FALSE );
+void PopDoubleRef( ScRange&, sal_Bool bDontCheckForTableOp = false );
void DoubleRefToVars( const ScToken* p,
SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp = FALSE );
+ sal_Bool bDontCheckForTableOp = false );
ScDBRangeBase* PopDBDoubleRef();
void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp = FALSE );
+ sal_Bool bDontCheckForTableOp = false );
void PopExternalSingleRef(sal_uInt16& rFileId, String& rTabName, ScSingleRefData& rRef);
void PopExternalSingleRef(ScExternalRefCache::TokenRef& rToken, ScExternalRefCache::CellFormat* pFmt = NULL);
void PopExternalDoubleRef(sal_uInt16& rFileId, String& rTabName, ScComplexRefData& rRef);
void PopExternalDoubleRef(ScExternalRefCache::TokenArrayRef& rArray);
void PopExternalDoubleRef(ScMatrixRef& rMat);
-BOOL PopDoubleRefOrSingleRef( ScAddress& rAdr );
+sal_Bool PopDoubleRefOrSingleRef( ScAddress& rAdr );
void PopDoubleRefPushMatrix();
// If MatrixFormula: convert formula::svDoubleRef to svMatrix, create JumpMatrix.
// Else convert area reference parameters marked as ForceArray to array.
-// Returns TRUE if JumpMatrix created.
+// Returns sal_True if JumpMatrix created.
bool ConvertMatrixParameters();
inline void MatrixDoubleRefToMatrix(); // if MatrixFormula: PopDoubleRefPushMatrix
// If MatrixFormula or ForceArray: ConvertMatrixParameters()
inline bool MatrixParameterConversion();
ScMatrixRef PopMatrix();
-void QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, ULONG& rRetIndexExpr);
+void QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_uLong& rRetIndexExpr);
//void PushByte(BYTE nVal);
void PushDouble(double nVal);
void PushInt( int nVal );
@@ -341,21 +341,21 @@ void PushExternalDoubleRef(sal_uInt16 nFileId, const String& rTabName,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2);
void PushMatrix(const ScMatrixRef& pMat);
-void PushError( USHORT nError );
+void PushError( sal_uInt16 nError );
/// Raw stack type without default replacements.
formula::StackVar GetRawStackType();
/// Stack type with replacement of defaults, e.g. svMissing and formula::svEmptyCell will result in formula::svDouble.
formula::StackVar GetStackType();
// peek StackType of Parameter, Parameter 1 == TOS, 2 == TOS-1, ...
-formula::StackVar GetStackType( BYTE nParam );
-BYTE GetByte() { return cPar; }
+formula::StackVar GetStackType( sal_uInt8 nParam );
+sal_uInt8 GetByte() { return cPar; }
// generiert aus DoubleRef positionsabhaengige SingleRef
-BOOL DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr );
+sal_Bool DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr );
double GetDoubleFromMatrix(const ScMatrixRef& pMat);
double GetDouble();
double GetDoubleWithDefault(double nDefault);
-BOOL IsMissing();
-BOOL GetBool() { return GetDouble() != 0.0; }
+sal_Bool IsMissing();
+sal_Bool GetBool() { return GetDouble() != 0.0; }
const String& GetString();
const String& GetStringFromMatrix(const ScMatrixRef& pMat);
// pop matrix and obtain one element, upper left or according to jump matrix
@@ -370,15 +370,15 @@ void ScTableOp(); // Mehrfachoperationen
void ScErrCell(); // Sonderbehandlung
// Fehlerzelle
//-----------------------------allgemeine Hilfsfunktionen
-void SetMaxIterationCount(USHORT n);
+void SetMaxIterationCount(sal_uInt16 n);
inline void CurFmtToFuncFmt()
{ nFuncFmtType = nCurFmtType; nFuncFmtIndex = nCurFmtIndex; }
// Check for String overflow of rResult+rAdd and set error and erase rResult
-// if so. Return TRUE if ok, FALSE if overflow
-inline BOOL CheckStringResultLen( String& rResult, const String& rAdd );
+// if so. Return sal_True if ok, sal_False if overflow
+inline sal_Bool CheckStringResultLen( String& rResult, const String& rAdd );
// Set error according to rVal, and set rVal to 0.0 if there was an error.
inline void TreatDoubleError( double& rVal );
-// Lookup using ScLookupCache, @returns TRUE if found and result address
+// Lookup using ScLookupCache, @returns sal_True if found and result address
bool LookupQueryWithCache( ScAddress & o_rResultPos,
const ScQueryParam & rParam ) const;
@@ -475,20 +475,20 @@ void ScJis();
void ScAsc();
void ScUnicode();
void ScUnichar();
-void ScMin( BOOL bTextAsZero = FALSE );
-void ScMax( BOOL bTextAsZero = FALSE );
-double IterateParameters( ScIterFunc, BOOL bTextAsZero = FALSE );
+void ScMin( sal_Bool bTextAsZero = false );
+void ScMax( sal_Bool bTextAsZero = false );
+double IterateParameters( ScIterFunc, sal_Bool bTextAsZero = false );
void ScSumSQ();
void ScSum();
void ScProduct();
-void ScAverage( BOOL bTextAsZero = FALSE );
+void ScAverage( sal_Bool bTextAsZero = false );
void ScCount();
void ScCount2();
-void GetStVarParams( double& rVal, double& rValCount, BOOL bTextAsZero = FALSE );
-void ScVar( BOOL bTextAsZero = FALSE );
-void ScVarP( BOOL bTextAsZero = FALSE );
-void ScStDev( BOOL bTextAsZero = FALSE );
-void ScStDevP( BOOL bTextAsZero = FALSE );
+void GetStVarParams( double& rVal, double& rValCount, sal_Bool bTextAsZero = false );
+void ScVar( sal_Bool bTextAsZero = false );
+void ScVarP( sal_Bool bTextAsZero = false );
+void ScStDev( sal_Bool bTextAsZero = false );
+void ScStDevP( sal_Bool bTextAsZero = false );
void ScColumns();
void ScRows();
void ScTables();
@@ -504,13 +504,13 @@ void ScHLookup();
void ScVLookup();
void ScSubTotal();
-// If upon call rMissingField==TRUE then the database field parameter may be
+// If upon call rMissingField==sal_True then the database field parameter may be
// missing (Xcl DCOUNT() syntax), or may be faked as missing by having the
// value 0.0 or being exactly the entire database range reference (old SO
-// compatibility). If this was the case then rMissingField is set to TRUE upon
-// return. If rMissingField==FALSE upon call all "missing cases" are considered
+// compatibility). If this was the case then rMissingField is set to sal_True upon
+// return. If rMissingField==sal_False upon call all "missing cases" are considered
// to be an error.
-ScDBQueryParamBase* GetDBParams( BOOL& rMissingField );
+ScDBQueryParamBase* GetDBParams( sal_Bool& rMissingField );
void DBIterator( ScIterFunc );
void ScDBSum();
@@ -548,8 +548,8 @@ void ScConcat();
void ScExternal();
void ScMissing();
void ScMacro();
-BOOL SetSbxVariable( SbxVariable* pVar, const ScAddress& );
-BOOL SetSbxVariable( SbxVariable* pVar, SCCOL nCol, SCROW nRow, SCTAB nTab );
+sal_Bool SetSbxVariable( SbxVariable* pVar, const ScAddress& );
+sal_Bool SetSbxVariable( SbxVariable* pVar, SCCOL nCol, SCROW nRow, SCTAB nTab );
void ScErrorType();
void ScDBArea();
void ScColRowNameAuto();
@@ -568,7 +568,7 @@ void ScTTT();
If TRUE, the date passed must be a valid Gregorian calendar date. No
two-digit expanding or rollover is done.
*/
-double GetDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, bool bStrict );
+double GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bStrict );
void ScGetActDate();
void ScGetActTime();
@@ -677,21 +677,21 @@ void ScSumX2DY2();
void ScSumXMY2();
void ScGrowth();
bool CalculateSkew(double& fSum,double& fCount,double& vSum,std::vector<double>& values);
-void CalculateSlopeIntercept(BOOL bSlope);
-void CalculateSmallLarge(BOOL bSmall);
-void CalculatePearsonCovar(BOOL _bPearson,BOOL _bStexy);
-bool CalculateTest( BOOL _bTemplin
+void CalculateSlopeIntercept(sal_Bool bSlope);
+void CalculateSmallLarge(sal_Bool bSmall);
+void CalculatePearsonCovar(sal_Bool _bPearson,sal_Bool _bStexy);
+bool CalculateTest( sal_Bool _bTemplin
,const SCSIZE nC1, const SCSIZE nC2,const SCSIZE nR1,const SCSIZE nR2
,const ScMatrixRef& pMat1,const ScMatrixRef& pMat2
,double& fT,double& fF);
-void CalculateLookup(BOOL HLookup);
+void CalculateLookup(sal_Bool HLookup);
bool FillEntry(ScQueryEntry& rEntry);
-void CalculateAddSub(BOOL _bSub);
+void CalculateAddSub(sal_Bool _bSub);
void CalculateTrendGrowth(bool _bGrowth);
void CalulateRGPRKP(bool _bRKP);
-void CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2);
+void CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2);
void CalculateMatrixValue(const ScMatrix* pMat,SCSIZE nC,SCSIZE nR);
-bool CheckMatrix(bool _bLOG,BYTE& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY);
+bool CheckMatrix(bool _bLOG,sal_uInt8& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY);
void ScRGP();
void ScRKP();
void ScForecast();
@@ -701,7 +701,7 @@ void ScBadName();
// Statistik:
double phi(double x);
double integralPhi(double x);
-double taylor(double* pPolynom, USHORT nMax, double x);
+double taylor(double* pPolynom, sal_uInt16 nMax, double x);
double gauss(double x);
double gaussinv(double x);
double GetBetaDist(double x, double alpha, double beta); //cumulative distribution function
@@ -760,8 +760,8 @@ void ScSkew();
void ScMedian();
double GetMedian( ::std::vector<double> & rArray );
double GetPercentile( ::std::vector<double> & rArray, double fPercentile );
-void GetNumberSequenceArray( BYTE nParamCount, ::std::vector<double>& rArray );
-void GetSortArray(BYTE nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
+void GetNumberSequenceArray( sal_uInt8 nParamCount, ::std::vector<double>& rArray );
+void GetSortArray(sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
void QuickSort(::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
void ScModalValue();
void ScAveDev();
@@ -811,17 +811,17 @@ public:
formula::StackVar Interpret();
- void SetError(USHORT nError)
+ void SetError(sal_uInt16 nError)
{ if (nError && !nGlobalError) nGlobalError = nError; }
- USHORT GetError() const { return nGlobalError; }
+ sal_uInt16 GetError() const { return nGlobalError; }
formula::StackVar GetResultType() const { return xResult->GetType(); }
const String& GetStringResult() const { return xResult->GetString(); }
double GetNumResult() const { return xResult->GetDouble(); }
formula::FormulaTokenRef
GetResultToken() const { return xResult; }
short GetRetFormatType() const { return nRetFmtType; }
- ULONG GetRetFormatIndex() const { return nRetFmtIndex; }
+ sal_uLong GetRetFormatIndex() const { return nRetFmtIndex; }
};
@@ -851,48 +851,48 @@ inline ScTokenMatrixMap& ScInterpreter::GetTokenMatrixMap()
}
-inline BOOL ScInterpreter::MustHaveParamCount( short nAct, short nMust )
+inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust )
{
if ( nAct == nMust )
- return TRUE;
+ return sal_True;
if ( nAct < nMust )
PushParameterExpected();
else
PushIllegalParameter();
- return FALSE;
+ return false;
}
-inline BOOL ScInterpreter::MustHaveParamCount( short nAct, short nMust, short nMax )
+inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust, short nMax )
{
if ( nMust <= nAct && nAct <= nMax )
- return TRUE;
+ return sal_True;
if ( nAct < nMust )
PushParameterExpected();
else
PushIllegalParameter();
- return FALSE;
+ return false;
}
-inline BOOL ScInterpreter::MustHaveParamCountMin( short nAct, short nMin )
+inline sal_Bool ScInterpreter::MustHaveParamCountMin( short nAct, short nMin )
{
if ( nAct >= nMin )
- return TRUE;
+ return sal_True;
PushParameterExpected();
- return FALSE;
+ return false;
}
-inline BOOL ScInterpreter::CheckStringResultLen( String& rResult, const String& rAdd )
+inline sal_Bool ScInterpreter::CheckStringResultLen( String& rResult, const String& rAdd )
{
- if ( (ULONG) rResult.Len() + rAdd.Len() > STRING_MAXLEN )
+ if ( (sal_uLong) rResult.Len() + rAdd.Len() > STRING_MAXLEN )
{
SetError( errStringOverflow );
rResult.Erase();
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
@@ -900,7 +900,7 @@ inline void ScInterpreter::TreatDoubleError( double& rVal )
{
if ( !::rtl::math::isFinite( rVal ) )
{
- USHORT nErr = GetDoubleErrorValue( rVal );
+ sal_uInt16 nErr = GetDoubleErrorValue( rVal );
if ( nErr )
SetError( nErr );
else
diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx
index 07dabaa536b4..be2719c0a213 100644
--- a/sc/source/core/inc/jumpmatrix.hxx
+++ b/sc/source/core/inc/jumpmatrix.hxx
@@ -123,7 +123,7 @@ public:
short nStart, short nNext,
short nStop = SHRT_MAX )
{
- pJump[ (ULONG)nCol * nRows + nRow ].
+ pJump[ (sal_uLong)nCol * nRows + nRow ].
SetJump( fBool, nStart, nNext, nStop);
}
void GetJump( SCSIZE nCol, SCSIZE nRow, double& rBool,
@@ -145,15 +145,15 @@ public:
nCol = 0;
nRow = 0;
}
- pJump[ (ULONG)nCol * nRows + nRow ].
+ pJump[ (sal_uLong)nCol * nRows + nRow ].
GetJump( rBool, rStart, rNext, rStop);
}
void SetAllJumps( double fBool,
short nStart, short nNext,
short nStop = SHRT_MAX )
{
- ULONG n = (ULONG)nCols * nRows;
- for ( ULONG j=0; j<n; ++j )
+ sal_uLong n = (sal_uLong)nCols * nRows;
+ for ( sal_uLong j=0; j<n; ++j )
{
pJump[ j ].SetJump( fBool, nStart,
nNext, nStop);
diff --git a/sc/source/core/inc/parclass.hxx b/sc/source/core/inc/parclass.hxx
index de2fba3fb694..2bd309f08d30 100644
--- a/sc/source/core/inc/parclass.hxx
+++ b/sc/source/core/inc/parclass.hxx
@@ -89,7 +89,7 @@ public:
@param nParameter
Which parameter, 0-based */
static Type GetParameterType( const formula::FormulaToken* pToken,
- USHORT nParameter);
+ sal_uInt16 nParameter);
/** Whether OpCode has a parameter of type
ForceArray or ReferenceOrForceArray. */
@@ -125,7 +125,7 @@ private:
struct RunData
{
CommonData aData;
- BYTE nMinParams; // fix or minimum, or repeat start
+ sal_uInt8 nMinParams; // fix or minimum, or repeat start
bool bHasForceArray;
};
@@ -134,7 +134,7 @@ private:
// ocExternal AddIns
static Type GetExternalParameterType(
- const formula::FormulaToken* pToken, USHORT nParameter);
+ const formula::FormulaToken* pToken, sal_uInt16 nParameter);
#if OSL_DEBUG_LEVEL > 1
// Generate documentation to stdout if environment variable
@@ -152,14 +152,14 @@ private:
/** Minimum number of parameters, or fix number
of parameters if HasRepeatParameters()
- returns FALSE. For opcodes not specified in
+ returns sal_False. For opcodes not specified in
the implementation a parameter count of 1
is assumed, for opcodes out of range 0 is
assumed. If HasRepeatParameters() returns
- TRUE, information is NOT related to whether
+ sal_True, information is NOT related to whether
any parameters are optional, only the type
of parameters is significant. */
- static inline BYTE GetMinimumParameters( OpCode eOp)
+ static inline sal_uInt8 GetMinimumParameters( OpCode eOp)
{
if ( eOp <= SC_OPCODE_LAST_OPCODE_ID )
return pData[eOp].aData.nParam[0]
diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx
index 1ecae5f11d1f..544de4029661 100644
--- a/sc/source/core/inc/refupdat.hxx
+++ b/sc/source/core/inc/refupdat.hxx
@@ -64,7 +64,7 @@ public:
static ScRefUpdateRes Update( UpdateRefMode eUpdateRefMode,
const ScBigRange& rWhere,
- INT32 nDx, INT32 nDy, INT32 nDz,
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz,
ScBigRange& rWhat );
/// Before calling, the absolute references must be up-to-date!
@@ -77,7 +77,7 @@ public:
/// Before calling, the absolute references must be up-to-date!
static ScRefUpdateRes Move( ScDocument* pDoc, const ScAddress& rPos,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScComplexRefData& rRef, BOOL bWrap, BOOL bAbsolute );
+ ScComplexRefData& rRef, sal_Bool bWrap, sal_Bool bAbsolute );
static void MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow, ScComplexRefData& rRef );
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 9421304a1eac..dd86967431d2 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -83,7 +83,7 @@ using namespace com::sun::star;
ScUnoAddInFuncData::ScUnoAddInFuncData( const String& rNam, const String& rLoc,
const String& rDesc,
- USHORT nCat, USHORT nHelp,
+ sal_uInt16 nCat, const rtl::OString& sHelp,
const uno::Reference<reflection::XIdlMethod>& rFunc,
const uno::Any& rO,
long nAC, const ScAddInArgDesc* pAD,
@@ -98,8 +98,8 @@ ScUnoAddInFuncData::ScUnoAddInFuncData( const String& rNam, const String& rLoc,
nArgCount( nAC ),
nCallerPos( nCP ),
nCategory( nCat ),
- nHelpId( nHelp ),
- bCompInitialized( FALSE )
+ sHelpId( sHelp ),
+ bCompInitialized( false )
{
if ( nArgCount )
{
@@ -152,7 +152,7 @@ const uno::Sequence<sheet::LocalizedName>& ScUnoAddInFuncData::GetCompNames() co
}
}
- bCompInitialized = TRUE; // also if not successful
+ bCompInitialized = sal_True; // also if not successful
}
return aCompNames;
}
@@ -179,10 +179,10 @@ void ScUnoAddInFuncData::SetCompNames( const uno::Sequence< sheet::LocalizedName
}
}
- bCompInitialized = TRUE;
+ bCompInitialized = sal_True;
}
-BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcelName ) const
+sal_Bool ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcelName ) const
{
const uno::Sequence<sheet::LocalizedName>& rSequence = GetCompNames();
long nSeqLen = rSequence.getLength();
@@ -203,7 +203,7 @@ BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcel
pArray[i].Locale.Country == aUserCountry )
{
rRetExcelName = pArray[i].Name;
- return TRUE;
+ return sal_True;
}
// second: check only language
@@ -212,7 +212,7 @@ BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcel
if ( pArray[i].Locale.Language == aUserLang )
{
rRetExcelName = pArray[i].Name;
- return TRUE;
+ return sal_True;
}
// third: #i57772# fall-back to en-US
@@ -223,9 +223,9 @@ BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcel
// forth: use first (default) entry
rRetExcelName = pArray[0].Name;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScUnoAddInFuncData::SetFunction( const uno::Reference< reflection::XIdlMethod>& rNewFunc, const uno::Any& rNewObj )
@@ -262,7 +262,7 @@ ScUnoAddInCollection::ScUnoAddInCollection() :
pExactHashMap( NULL ),
pNameHashMap( NULL ),
pLocalHashMap( NULL ),
- bInitialized( FALSE )
+ bInitialized( false )
{
}
@@ -285,7 +285,7 @@ void ScUnoAddInCollection::Clear()
ppFuncData = NULL;
nFuncCount = 0;
- bInitialized = FALSE;
+ bInitialized = false;
}
uno::Reference<uno::XComponentContext> getContext(uno::Reference<lang::XMultiServiceFactory> xMSF)
@@ -358,11 +358,11 @@ void ScUnoAddInCollection::Initialize()
// when argument information is needed).
ReadConfiguration();
- bInitialized = TRUE; // with or without functions
+ bInitialized = sal_True; // with or without functions
}
// -----------------------------------------------------------------------------
-USHORT lcl_GetCategory( const String& rName )
+sal_uInt16 lcl_GetCategory( const String& rName )
{
static const sal_Char* aFuncNames[SC_FUNCGROUP_COUNT] =
{
@@ -380,7 +380,7 @@ USHORT lcl_GetCategory( const String& rName )
"Text", // ID_FUNCTION_GRP_TEXT
"Add-In" // ID_FUNCTION_GRP_ADDINS
};
- for (USHORT i=0; i<SC_FUNCGROUP_COUNT; i++)
+ for (sal_uInt16 i=0; i<SC_FUNCGROUP_COUNT; i++)
if ( rName.EqualsAscii( aFuncNames[i] ) )
return i+1; // IDs start at 1
@@ -474,7 +474,7 @@ void ScUnoAddInCollection::ReadConfiguration()
{
rtl::OUString aLocalName;
rtl::OUString aDescription;
- USHORT nCategory = ID_FUNCTION_GRP_ADDINS;
+ sal_uInt16 nCategory = ID_FUNCTION_GRP_ADDINS;
// get direct information on the function
@@ -588,7 +588,7 @@ void ScUnoAddInCollection::ReadConfiguration()
ScAddInArgDesc aDesc;
aDesc.eType = SC_ADDINARG_NONE; // arg type is not in configuration
- aDesc.bOptional = FALSE;
+ aDesc.bOptional = false;
nVisibleCount = nArgumentCount;
pVisibleArgs = new ScAddInArgDesc[nVisibleCount];
@@ -608,7 +608,7 @@ void ScUnoAddInCollection::ReadConfiguration()
}
}
- USHORT nHelpId = aHelpIdGenerator.GetHelpId( pFuncNameArray[nFuncPos] );
+ rtl::OString sHelpId = aHelpIdGenerator.GetHelpId( pFuncNameArray[nFuncPos] );
uno::Reference<reflection::XIdlMethod> xFunc; // remains empty
uno::Any aObject; // also empty
@@ -617,7 +617,7 @@ void ScUnoAddInCollection::ReadConfiguration()
ScUnoAddInFuncData* pData = new ScUnoAddInFuncData(
aFuncName, aLocalName, aDescription,
- nCategory, nHelpId,
+ nCategory, sHelpId,
xFunc, aObject,
nVisibleCount, pVisibleArgs, nCallerPos );
@@ -660,16 +660,16 @@ void ScUnoAddInCollection::LoadComponent( const ScUnoAddInFuncData& rFuncData )
}
}
-BOOL ScUnoAddInCollection::GetExcelName( const String& rCalcName,
+sal_Bool ScUnoAddInCollection::GetExcelName( const String& rCalcName,
LanguageType eDestLang, String& rRetExcelName )
{
const ScUnoAddInFuncData* pFuncData = GetFuncData( rCalcName );
if ( pFuncData )
return pFuncData->GetExcelName( eDestLang, rRetExcelName);
- return FALSE;
+ return false;
}
-BOOL ScUnoAddInCollection::GetCalcName( const String& rExcelName, String& rRetCalcName )
+sal_Bool ScUnoAddInCollection::GetCalcName( const String& rExcelName, String& rRetCalcName )
{
if (!bInitialized)
Initialize();
@@ -694,24 +694,24 @@ BOOL ScUnoAddInCollection::GetCalcName( const String& rExcelName, String& rRetCa
// use the first function that has this name for any language
rRetCalcName = pFuncData->GetOriginalName();
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return false;
}
-inline BOOL IsTypeName( const rtl::OUString& rName, const uno::Type& rType )
+inline sal_Bool IsTypeName( const rtl::OUString& rName, const uno::Type& rType )
{
return rName == rType.getTypeName();
}
-BOOL lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
+sal_Bool lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
{
// this must match with ScUnoAddInCall::SetResult
- if ( !xClass.is() ) return FALSE;
+ if ( !xClass.is() ) return false;
switch (xClass->getTypeClass())
{
@@ -727,7 +727,7 @@ BOOL lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
case uno::TypeClass_FLOAT:
case uno::TypeClass_DOUBLE:
case uno::TypeClass_STRING:
- return TRUE; // values or string
+ return sal_True; // values or string
case uno::TypeClass_INTERFACE:
{
@@ -747,13 +747,13 @@ BOOL lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
rtl::OUString sName = xClass->getName();
return (
- IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<INT32> >*)0) ) ||
+ IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<sal_Int32> >*)0) ) ||
IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<double> >*)0) ) ||
IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<rtl::OUString> >*)0) ) ||
IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<uno::Any> >*)0) ) );
}
}
- return FALSE;
+ return false;
}
ScAddInArgumentType lcl_GetArgType( const uno::Reference<reflection::XIdlClass>& xClass )
@@ -775,7 +775,7 @@ ScAddInArgumentType lcl_GetArgType( const uno::Reference<reflection::XIdlClass>&
//! XIdlClass needs getType() method!
rtl::OUString sName = xClass->getName();
- if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<INT32> >*)0) ))
+ if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<sal_Int32> >*)0) ))
return SC_ADDINARG_INTEGER_ARRAY;
if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<double> >*)0) ))
@@ -870,7 +870,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
// leave out internal functions
uno::Reference<reflection::XIdlClass> xClass =
xFunc->getDeclaringClass();
- BOOL bSkip = TRUE;
+ sal_Bool bSkip = sal_True;
if ( xClass.is() )
{
//! XIdlClass needs getType() method!
@@ -892,7 +892,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
uno::Reference<reflection::XIdlClass> xReturn =
xFunc->getReturnType();
if ( !lcl_ValidReturnType( xReturn ) )
- bSkip = TRUE;
+ bSkip = sal_True;
}
if (!bSkip)
{
@@ -903,7 +903,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
aFuncName += '.';
aFuncName += String( aFuncU );
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
long nVisibleCount = 0;
long nCallerPos = SC_CALLERPOS_NONE;
@@ -915,12 +915,12 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
for (nParamPos=0; nParamPos<nParamCount; nParamPos++)
{
if ( pParArr[nParamPos].aMode != reflection::ParamMode_IN )
- bValid = FALSE;
+ bValid = false;
uno::Reference<reflection::XIdlClass> xParClass =
pParArr[nParamPos].aType;
ScAddInArgumentType eArgType = lcl_GetArgType( xParClass );
if ( eArgType == SC_ADDINARG_NONE )
- bValid = FALSE;
+ bValid = false;
else if ( eArgType == SC_ADDINARG_CALLER )
nCallerPos = nParamPos;
else
@@ -928,12 +928,12 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
}
if (bValid)
{
- USHORT nCategory = lcl_GetCategory(
+ sal_uInt16 nCategory = lcl_GetCategory(
String(
xAddIn->getProgrammaticCategoryName(
aFuncU ) ) );
- USHORT nHelpId = aHelpIdGenerator.GetHelpId( aFuncU );
+ rtl::OString sHelpId = aHelpIdGenerator.GetHelpId( aFuncU );
rtl::OUString aLocalU;
try
@@ -993,7 +993,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
aArgName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "###" ));
}
- BOOL bOptional =
+ sal_Bool bOptional =
( eArgType == SC_ADDINARG_VALUE_OR_ARRAY ||
eArgType == SC_ADDINARG_VARARGS );
@@ -1012,7 +1012,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
ppFuncData[nFuncPos+nOld] = new ScUnoAddInFuncData(
aFuncName, aLocalName, aDescription,
- nCategory, nHelpId,
+ nCategory, sHelpId,
xFunc, aObject,
nVisibleCount, pVisibleArgs, nCallerPos );
@@ -1047,8 +1047,8 @@ void lcl_UpdateFunctionList( ScFunctionList& rFunctionList, const ScUnoAddInFunc
{
::rtl::OUString aCompare = rFuncData.GetUpperLocal(); // as used in FillFunctionDescFromData
- ULONG nCount = rFunctionList.GetCount();
- for (ULONG nPos=0; nPos<nCount; nPos++)
+ sal_uLong nCount = rFunctionList.GetCount();
+ for (sal_uLong nPos=0; nPos<nCount; nPos++)
{
const ScFuncDesc* pDesc = rFunctionList.GetFunction( nPos );
if ( pDesc && pDesc->pFuncName && *pDesc->pFuncName == aCompare )
@@ -1129,7 +1129,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
// Local names and descriptions from pOldData are looked up using the
// internal argument name.
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
long nVisibleCount = 0;
long nCallerPos = SC_CALLERPOS_NONE;
@@ -1141,12 +1141,12 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
for (nParamPos=0; nParamPos<nParamCount; nParamPos++)
{
if ( pParArr[nParamPos].aMode != reflection::ParamMode_IN )
- bValid = FALSE;
+ bValid = false;
uno::Reference<reflection::XIdlClass> xParClass =
pParArr[nParamPos].aType;
ScAddInArgumentType eArgType = lcl_GetArgType( xParClass );
if ( eArgType == SC_ADDINARG_NONE )
- bValid = FALSE;
+ bValid = false;
else if ( eArgType == SC_ADDINARG_CALLER )
nCallerPos = nParamPos;
else
@@ -1177,7 +1177,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
else
aDesc.aName = aDesc.aDescription = String::CreateFromAscii( "###" );
- BOOL bOptional =
+ sal_Bool bOptional =
( eArgType == SC_ADDINARG_VALUE_OR_ARRAY ||
eArgType == SC_ADDINARG_VARARGS );
@@ -1209,7 +1209,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
}
}
-String ScUnoAddInCollection::FindFunction( const String& rUpperName, BOOL bLocalFirst )
+String ScUnoAddInCollection::FindFunction( const String& rUpperName, sal_Bool bLocalFirst )
{
if (!bInitialized)
Initialize();
@@ -1296,28 +1296,28 @@ long ScUnoAddInCollection::GetFuncCount()
return nFuncCount;
}
-BOOL ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc )
+sal_Bool ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc )
{
if (!bInitialized)
Initialize();
if (nFunc >= nFuncCount || !ppFuncData[nFunc])
- return FALSE;
+ return false;
const ScUnoAddInFuncData& rFuncData = *ppFuncData[nFunc];
return FillFunctionDescFromData( rFuncData, rDesc );
}
-BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc )
+sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc )
{
rDesc.Clear();
- BOOL bIncomplete = !rFuncData.GetFunction().is(); //! extra flag?
+ sal_Bool bIncomplete = !rFuncData.GetFunction().is(); //! extra flag?
long nArgCount = rFuncData.GetArgumentCount();
if ( nArgCount > USHRT_MAX )
- return FALSE;
+ return false;
if ( bIncomplete )
nArgCount = 0; // if incomplete, fill without argument info (no wrong order)
@@ -1326,7 +1326,7 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
rDesc.pFuncName = new ::rtl::OUString( rFuncData.GetUpperLocal() ); //! upper?
rDesc.nCategory = rFuncData.GetCategory();
- rDesc.nHelpId = rFuncData.GetHelpId();
+ rDesc.sHelpId = rFuncData.GetHelpId();
String aDesc = rFuncData.GetDescription();
if (!aDesc.Len())
@@ -1335,10 +1335,10 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
// AddInArgumentType_CALLER is already left out in FuncData
- rDesc.nArgCount = (USHORT)nArgCount;
+ rDesc.nArgCount = (sal_uInt16)nArgCount;
if ( nArgCount )
{
- BOOL bMultiple = FALSE;
+ sal_Bool bMultiple = false;
const ScAddInArgDesc* pArgs = rFuncData.GetArguments();
rDesc.ppDefArgNames = new ::rtl::OUString*[nArgCount];
@@ -1361,7 +1361,7 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
// last argument repeated?
if ( nArg+1 == nArgCount && ( pArgs[nArg].eType == SC_ADDINARG_VARARGS ) )
- bMultiple = TRUE;
+ bMultiple = sal_True;
}
if ( bMultiple )
@@ -1370,7 +1370,7 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
rDesc.bIncomplete = bIncomplete;
- return TRUE;
+ return sal_True;
}
@@ -1378,9 +1378,9 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const String& rName,
long nParamCount ) :
- bValidCount( FALSE ),
+ bValidCount( false ),
nErrCode( errNoCode ), // before function was called
- bHasString( TRUE ),
+ bHasString( sal_True ),
fValue( 0.0 ),
xMatrix( NULL )
{
@@ -1397,15 +1397,15 @@ ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const String& rName
{
long nVarCount = nParamCount - ( nDescCount - 1 ); // size of last argument
aVarArg.realloc( nVarCount );
- bValidCount = TRUE;
+ bValidCount = sal_True;
}
else if ( nParamCount <= nDescCount )
{
// all args behind nParamCount must be optional
- bValidCount = TRUE;
+ bValidCount = sal_True;
for (long i=nParamCount; i<nDescCount; i++)
if ( !pArgs[i].bOptional )
- bValidCount = FALSE;
+ bValidCount = false;
}
// else invalid (too many arguments)
@@ -1419,7 +1419,7 @@ ScUnoAddInCall::~ScUnoAddInCall()
// pFuncData is deleted with ScUnoAddInCollection
}
-BOOL ScUnoAddInCall::ValidParamCount()
+sal_Bool ScUnoAddInCall::ValidParamCount()
{
return bValidCount;
}
@@ -1441,7 +1441,7 @@ ScAddInArgumentType ScUnoAddInCall::GetArgType( long nPos )
return SC_ADDINARG_VALUE_OR_ARRAY; //! error code !!!!
}
-BOOL ScUnoAddInCall::NeedsCaller() const
+sal_Bool ScUnoAddInCall::NeedsCaller() const
{
return pFuncData && pFuncData->GetCallerPos() != SC_CALLERPOS_NONE;
}
@@ -1611,7 +1611,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
{
uno::TypeClass eMyClass;
ScApiTypeConversion::ConvertAnyToDouble( fValue, eMyClass, rNewRes);
- bHasString = FALSE;
+ bHasString = false;
}
break;
@@ -1620,7 +1620,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
rtl::OUString aUStr;
rNewRes >>= aUStr;
aString = String( aUStr );
- bHasString = TRUE;
+ bHasString = sal_True;
}
break;
@@ -1638,19 +1638,19 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
break;
default:
- if ( aType.equals( getCppuType( (uno::Sequence< uno::Sequence<INT32> > *)0 ) ) )
+ if ( aType.equals( getCppuType( (uno::Sequence< uno::Sequence<sal_Int32> > *)0 ) ) )
{
- const uno::Sequence< uno::Sequence<INT32> >* pRowSeq = NULL;
+ const uno::Sequence< uno::Sequence<sal_Int32> >* pRowSeq = NULL;
//! use pointer from any!
- uno::Sequence< uno::Sequence<INT32> > aSequence;
+ uno::Sequence< uno::Sequence<sal_Int32> > aSequence;
if ( rNewRes >>= aSequence )
pRowSeq = &aSequence;
if ( pRowSeq )
{
long nRowCount = pRowSeq->getLength();
- const uno::Sequence<INT32>* pRowArr = pRowSeq->getConstArray();
+ const uno::Sequence<sal_Int32>* pRowArr = pRowSeq->getConstArray();
long nMaxColCount = 0;
long nCol, nRow;
for (nRow=0; nRow<nRowCount; nRow++)
@@ -1667,7 +1667,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
for (nRow=0; nRow<nRowCount; nRow++)
{
long nColCount = pRowArr[nRow].getLength();
- const INT32* pColArr = pRowArr[nRow].getConstArray();
+ const sal_Int32* pColArr = pRowArr[nRow].getConstArray();
for (nCol=0; nCol<nColCount; nCol++)
xMatrix->PutDouble( pColArr[nCol],
static_cast<SCSIZE>(nCol),
diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx
index 8f347a9dea0b..02fe446f4293 100644
--- a/sc/source/core/tool/addinhelpid.cxx
+++ b/sc/source/core/tool/addinhelpid.cxx
@@ -38,7 +38,7 @@
struct ScUnoAddInHelpId
{
const sal_Char* pFuncName;
- sal_uInt16 nHelpId;
+ const sal_Char* sHelpId;
};
@@ -185,10 +185,10 @@ void ScUnoAddInHelpIdGenerator::SetServiceName( const ::rtl::OUString& rServiceN
nArrayCount = nSize / sizeof( ScUnoAddInHelpId );
}
-sal_uInt16 ScUnoAddInHelpIdGenerator::GetHelpId( const ::rtl::OUString& rFuncName ) const
+rtl::OString ScUnoAddInHelpIdGenerator::GetHelpId( const ::rtl::OUString& rFuncName ) const
{
if( !pCurrHelpIds || !nArrayCount )
- return 0;
+ return rtl::OString();
const ScUnoAddInHelpId* pFirst = pCurrHelpIds;
const ScUnoAddInHelpId* pLast = pCurrHelpIds + nArrayCount - 1;
@@ -198,14 +198,14 @@ sal_uInt16 ScUnoAddInHelpIdGenerator::GetHelpId( const ::rtl::OUString& rFuncNam
const ScUnoAddInHelpId* pMiddle = pFirst + (pLast - pFirst) / 2;
sal_Int32 nResult = rFuncName.compareToAscii( pMiddle->pFuncName );
if( !nResult )
- return pMiddle->nHelpId;
+ return pMiddle->sHelpId;
else if( nResult < 0 )
pLast = pMiddle - 1;
else
pFirst = pMiddle + 1;
}
- return 0;
+ return rtl::OString();
}
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 0b73062a2c49..5c058c1a26f3 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -157,7 +157,7 @@ const sal_Unicode* lcl_eatWhiteSpace( const sal_Unicode* p )
*/
static bool lcl_ScRange_External_TabSpan(
ScRange & rRange,
- USHORT & rFlags,
+ sal_uInt16 & rFlags,
ScAddress::ExternalInfo* pExtInfo,
const String & rExternDocName,
const String & rStartTabName,
@@ -266,7 +266,7 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start,
}
else
{
- bool only_digits = TRUE;
+ bool only_digits = sal_True;
/*
* Valid: Normal!a1
@@ -294,7 +294,7 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start,
p = start;
break;
}
- only_digits = FALSE;
+ only_digits = false;
p++;
}
else if( CharClass::isAsciiDigit( uc ))
@@ -336,12 +336,12 @@ const sal_Unicode* ScRange::Parse_XL_Header(
String& rExternDocName,
String& rStartTabName,
String& rEndTabName,
- USHORT& nFlags,
+ sal_uInt16& nFlags,
bool bOnlyAcceptSingle,
const uno::Sequence< const sheet::ExternalLinkInfo > * pExternalLinks )
{
const sal_Unicode* startTabs, *start = p;
- USHORT nSaveFlags = nFlags;
+ sal_uInt16 nSaveFlags = nFlags;
// Is this an external reference ?
rStartTabName.Erase();
@@ -531,7 +531,7 @@ const sal_Unicode* ScRange::Parse_XL_Header(
static const sal_Unicode*
lcl_r1c1_get_col( const sal_Unicode* p,
const ScAddress::Details& rDetails,
- ScAddress* pAddr, USHORT* nFlags )
+ ScAddress* pAddr, sal_uInt16* nFlags )
{
const sal_Unicode *pEnd;
long int n;
@@ -576,7 +576,7 @@ lcl_r1c1_get_col( const sal_Unicode* p,
static inline const sal_Unicode*
lcl_r1c1_get_row( const sal_Unicode* p,
const ScAddress::Details& rDetails,
- ScAddress* pAddr, USHORT* nFlags )
+ ScAddress* pAddr, sal_uInt16* nFlags )
{
const sal_Unicode *pEnd;
long int n;
@@ -619,7 +619,7 @@ lcl_r1c1_get_row( const sal_Unicode* p,
return pEnd;
}
-static USHORT
+static sal_uInt16
lcl_ScRange_Parse_XL_R1C1( ScRange& r,
const sal_Unicode* p,
ScDocument* pDoc,
@@ -629,9 +629,9 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
{
const sal_Unicode* pTmp = NULL;
String aExternDocName, aStartTabName, aEndTabName;
- USHORT nFlags = SCA_VALID | SCA_VALID_TAB;
+ sal_uInt16 nFlags = SCA_VALID | SCA_VALID_TAB;
// Keep in mind that nFlags2 gets left-shifted by 4 bits before being merged.
- USHORT nFlags2 = SCA_VALID_TAB;
+ sal_uInt16 nFlags2 = SCA_VALID_TAB;
p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName,
aEndTabName, nFlags, bOnlyAcceptSingle, NULL );
@@ -755,7 +755,7 @@ failed :
}
static inline const sal_Unicode*
-lcl_a1_get_col( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
+lcl_a1_get_col( const sal_Unicode* p, ScAddress* pAddr, sal_uInt16* nFlags )
{
SCCOL nCol;
@@ -778,7 +778,7 @@ lcl_a1_get_col( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
}
static inline const sal_Unicode*
-lcl_a1_get_row( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
+lcl_a1_get_row( const sal_Unicode* p, ScAddress* pAddr, sal_uInt16* nFlags )
{
const sal_Unicode *pEnd;
long int n;
@@ -796,7 +796,7 @@ lcl_a1_get_row( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
return pEnd;
}
-static USHORT
+static sal_uInt16
lcl_ScRange_Parse_XL_A1( ScRange& r,
const sal_Unicode* p,
ScDocument* pDoc,
@@ -806,7 +806,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
{
const sal_Unicode* tmp1, *tmp2;
String aExternDocName, aStartTabName, aEndTabName; // for external link table
- USHORT nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB;
+ sal_uInt16 nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB;
p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName,
aEndTabName, nFlags, bOnlyAcceptSingle, pExternalLinks );
@@ -943,11 +943,11 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
used in conjunction with pExtInfo to determine the tab span
of a 3D reference.
*/
-static USHORT
+static sal_uInt16
lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
ScAddress::ExternalInfo* pExtInfo = NULL, ScRange* pRange = NULL )
{
- USHORT nRes = 0;
+ sal_uInt16 nRes = 0;
String aDocName; // der pure Dokumentenname
String aTab;
bool bExtDoc = false;
@@ -976,7 +976,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
SCCOL nCol = 0;
SCROW nRow = 0;
SCTAB nTab = 0;
- USHORT nBits = SCA_VALID_TAB;
+ sal_uInt16 nBits = SCA_VALID_TAB;
const sal_Unicode* q;
if ( ScGlobal::FindUnquoted( p, '.') )
{
@@ -1144,7 +1144,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
nRes = 0;
else
{
- USHORT nFlags = nRes | SCA_VALID_TAB2;
+ sal_uInt16 nFlags = nRes | SCA_VALID_TAB2;
if (!lcl_ScRange_External_TabSpan( *pRange, nFlags,
pExtInfo, aDocName,
pExtInfo->maTabName, aTab, pDoc))
@@ -1173,7 +1173,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
}
if( !*p )
{
- USHORT nMask = nRes & ( SCA_VALID_ROW | SCA_VALID_COL | SCA_VALID_TAB );
+ sal_uInt16 nMask = nRes & ( SCA_VALID_ROW | SCA_VALID_COL | SCA_VALID_TAB );
if( nMask == ( SCA_VALID_ROW | SCA_VALID_COL | SCA_VALID_TAB ) )
nRes |= SCA_VALID;
}
@@ -1182,7 +1182,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
return nRes;
}
-static USHORT
+static sal_uInt16
lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo = NULL,
@@ -1203,7 +1203,7 @@ lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
case formula::FormulaGrammar::CONV_XL_OOX:
{
ScRange r = rAddr;
- USHORT nFlags = lcl_ScRange_Parse_XL_A1( r, p, pDoc, true, pExtInfo,
+ sal_uInt16 nFlags = lcl_ScRange_Parse_XL_A1( r, p, pDoc, true, pExtInfo,
(rDetails.eConv == formula::FormulaGrammar::CONV_XL_OOX ? pExternalLinks : NULL) );
rAddr = r.aStart;
return nFlags;
@@ -1211,7 +1211,7 @@ lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
case formula::FormulaGrammar::CONV_XL_R1C1:
{
ScRange r = rAddr;
- USHORT nFlags = lcl_ScRange_Parse_XL_R1C1( r, p, pDoc, rDetails, true, pExtInfo );
+ sal_uInt16 nFlags = lcl_ScRange_Parse_XL_R1C1( r, p, pDoc, rDetails, true, pExtInfo );
rAddr = r.aStart;
return nFlags;
}
@@ -1228,7 +1228,7 @@ bool ConvertSingleRef( ScDocument* pDoc, const String& rRefString,
if (pExtInfo || (ScGlobal::FindUnquoted( rRefString, SC_COMPILER_FILE_TAB_SEP) == STRING_NOTFOUND))
{
ScAddress aAddr( 0, 0, nDefTab );
- USHORT nRes = aAddr.Parse( rRefString, pDoc, rDetails, pExtInfo);
+ sal_uInt16 nRes = aAddr.Parse( rRefString, pDoc, rDetails, pExtInfo);
if ( nRes & SCA_VALID )
{
rRefAddress.Set( aAddr,
@@ -1251,7 +1251,7 @@ bool ConvertDoubleRef( ScDocument* pDoc, const String& rRefString, SCTAB nDefTab
if (pExtInfo || (ScGlobal::FindUnquoted( rRefString, SC_COMPILER_FILE_TAB_SEP) == STRING_NOTFOUND))
{
ScRange aRange( ScAddress( 0, 0, nDefTab));
- USHORT nRes = aRange.Parse( rRefString, pDoc, rDetails, pExtInfo);
+ sal_uInt16 nRes = aRange.Parse( rRefString, pDoc, rDetails, pExtInfo);
if ( nRes & SCA_VALID )
{
rStartRefAddress.Set( aRange.aStart,
@@ -1269,7 +1269,7 @@ bool ConvertDoubleRef( ScDocument* pDoc, const String& rRefString, SCTAB nDefTab
}
-USHORT ScAddress::Parse( const String& r, ScDocument* pDoc,
+sal_uInt16 ScAddress::Parse( const String& r, ScDocument* pDoc,
const Details& rDetails,
ExternalInfo* pExtInfo,
const uno::Sequence< const sheet::ExternalLinkInfo > * pExternalLinks )
@@ -1323,10 +1323,10 @@ void ScRange::ExtendTo( const ScRange& rRange )
*this = rRange;
}
-static USHORT
+static sal_uInt16
lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAddress::ExternalInfo* pExtInfo = NULL )
{
- USHORT nRes1 = 0, nRes2 = 0;
+ sal_uInt16 nRes1 = 0, nRes2 = 0;
xub_StrLen nPos = ScGlobal::FindUnquoted( r, ':');
if (nPos != STRING_NOTFOUND)
{
@@ -1339,7 +1339,7 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAdd
if ( (nRes2 = lcl_ScAddress_Parse_OOo( p + nPos+ 1, pDoc, aRange.aEnd, pExtInfo, &aRange ) ) != 0 )
{
// PutInOrder / Justify
- USHORT nMask, nBits1, nBits2;
+ sal_uInt16 nMask, nBits1, nBits2;
SCCOL nTempCol;
if ( aRange.aEnd.Col() < (nTempCol = aRange.aStart.Col()) )
{
@@ -1385,7 +1385,7 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAdd
return nRes1;
}
-USHORT ScRange::Parse( const String& r, ScDocument* pDoc,
+sal_uInt16 ScRange::Parse( const String& r, ScDocument* pDoc,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo,
const uno::Sequence< const sheet::ExternalLinkInfo > * pExternalLinks )
@@ -1411,11 +1411,11 @@ USHORT ScRange::Parse( const String& r, ScDocument* pDoc,
// Accept a full range, or an address
-USHORT ScRange::ParseAny( const String& r, ScDocument* pDoc,
+sal_uInt16 ScRange::ParseAny( const String& r, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
- USHORT nRet = Parse( r, pDoc, rDetails );
- const USHORT nValid = SCA_VALID | SCA_VALID_COL2 | SCA_VALID_ROW2 |
+ sal_uInt16 nRet = Parse( r, pDoc, rDetails );
+ const sal_uInt16 nValid = SCA_VALID | SCA_VALID_COL2 | SCA_VALID_ROW2 |
SCA_VALID_TAB2;
if ( (nRet & nValid) != nValid )
@@ -1429,11 +1429,11 @@ USHORT ScRange::ParseAny( const String& r, ScDocument* pDoc,
}
// Parse only full row references
-USHORT ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
+sal_uInt16 ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
const sal_Unicode* p = rStr.GetBuffer();
- USHORT nRes = 0, ignored = 0;
+ sal_uInt16 nRes = 0, ignored = 0;
if( NULL == p )
return 0;
@@ -1488,11 +1488,11 @@ USHORT ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
}
// Parse only full row references
-USHORT ScRange::ParseRows( const String& rStr, ScDocument* pDoc,
+sal_uInt16 ScRange::ParseRows( const String& rStr, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
const sal_Unicode* p = rStr.GetBuffer();
- USHORT nRes = 0, ignored = 0;
+ sal_uInt16 nRes = 0, ignored = 0;
if( NULL == p )
return 0;
@@ -1627,7 +1627,7 @@ getFileNameFromDoc( const ScDocument* pDoc )
return sFileName;
}
-void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+void ScAddress::Format( String& r, sal_uInt16 nFlags, ScDocument* pDoc,
const Details& rDetails) const
{
r.Erase();
@@ -1715,7 +1715,7 @@ void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
static void
lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab,
const ScAddress::Details& rDetails,
- USHORT nFlags,
+ sal_uInt16 nFlags,
String& rTabName, String& rDocName )
{
pDoc->GetName( nTab, rTabName );
@@ -1744,7 +1744,7 @@ lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab,
static void
lcl_ScRange_Format_XL_Header( String& r, const ScRange& rRange,
- USHORT nFlags, ScDocument* pDoc,
+ sal_uInt16 nFlags, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
if( nFlags & SCA_TAB_3D )
@@ -1771,7 +1771,7 @@ lcl_ScRange_Format_XL_Header( String& r, const ScRange& rRange,
}
}
-void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+void ScRange::Format( String& r, sal_uInt16 nFlags, ScDocument* pDoc,
const ScAddress::Details& rDetails ) const
{
r.Erase();
@@ -1785,7 +1785,7 @@ void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
switch( rDetails.eConv ) {
default :
case formula::FormulaGrammar::CONV_OOO: {
- BOOL bOneTab = (aStart.Tab() == aEnd.Tab());
+ sal_Bool bOneTab = (aStart.Tab() == aEnd.Tab());
if ( !bOneTab )
nFlags |= SCA_TAB_3D;
aStart.Format( r, nFlags, pDoc, rDetails );
@@ -1875,7 +1875,7 @@ void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
#undef absrel_differ
}
-void ScRange::Format( OUString& r, USHORT nFlags, ScDocument* pDoc,
+void ScRange::Format( OUString& r, sal_uInt16 nFlags, ScDocument* pDoc,
const ScAddress::Details& rDetails ) const
{
String aStr;
@@ -1889,19 +1889,19 @@ bool ScAddress::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* pDoc )
dx = Col() + dx;
dy = Row() + dy;
dz = Tab() + dz;
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
if( dx < 0 )
- dx = 0, bValid = FALSE;
+ dx = 0, bValid = false;
else if( dx > MAXCOL )
- dx = MAXCOL, bValid =FALSE;
+ dx = MAXCOL, bValid =false;
if( dy < 0 )
- dy = 0, bValid = FALSE;
+ dy = 0, bValid = false;
else if( dy > MAXROW )
- dy = MAXROW, bValid =FALSE;
+ dy = MAXROW, bValid =false;
if( dz < 0 )
- dz = 0, bValid = FALSE;
+ dz = 0, bValid = false;
else if( dz >= nMaxTab )
- dz = nMaxTab-1, bValid =FALSE;
+ dz = nMaxTab-1, bValid =false;
Set( dx, dy, dz );
return bValid;
}
@@ -1955,7 +1955,7 @@ String ScRefAddress::GetRefString( ScDocument* pDoc, SCTAB nActTab,
return ScGlobal::GetRscString( STR_NOREF_STR );
String aString;
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
if ( nActTab != Tab() )
{
nFlags |= SCA_TAB_3D;
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index cc7433f20caf..341aee188fd0 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -56,7 +56,7 @@ SV_IMPL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr );
extern "C" {
void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData )
{
- ScAddInAsync::CallBack( ULONG( nHandle ), pData );
+ ScAddInAsync::CallBack( sal_uLong( nHandle ), pData );
}
}
@@ -70,11 +70,11 @@ ScAddInAsync::ScAddInAsync() :
-ScAddInAsync::ScAddInAsync( ULONG nHandleP, USHORT nIndex, ScDocument* pDoc ) :
+ScAddInAsync::ScAddInAsync( sal_uLong nHandleP, sal_uInt16 nIndex, ScDocument* pDoc ) :
SvtBroadcaster(),
pStr( NULL ),
nHandle( nHandleP ),
- bValid( FALSE )
+ bValid( false )
{
pDocs = new ScAddInDocs( 1, 1 );
pDocs->Insert( pDoc );
@@ -100,9 +100,9 @@ ScAddInAsync::~ScAddInAsync()
-ScAddInAsync* ScAddInAsync::Get( ULONG nHandleP )
+ScAddInAsync* ScAddInAsync::Get( sal_uLong nHandleP )
{
- USHORT nPos;
+ sal_uInt16 nPos;
ScAddInAsync* pRet = 0;
aSeekObj.nHandle = nHandleP;
if ( theAddInAsyncTbl.Seek_Entry( &aSeekObj, &nPos ) )
@@ -113,7 +113,7 @@ ScAddInAsync* ScAddInAsync::Get( ULONG nHandleP )
-void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
+void ScAddInAsync::CallBack( sal_uLong nHandleP, void* pData )
{
ScAddInAsync* p;
if ( (p = Get( nHandleP )) == NULL )
@@ -141,12 +141,12 @@ void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
OSL_FAIL( "unbekannter AsyncType" );
return;
}
- p->bValid = TRUE;
+ p->bValid = sal_True;
p->Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) );
const ScDocument** ppDoc = (const ScDocument**) p->pDocs->GetData();
- USHORT nCount = p->pDocs->Count();
- for ( USHORT j=0; j<nCount; j++, ppDoc++ )
+ sal_uInt16 nCount = p->pDocs->Count();
+ for ( sal_uInt16 j=0; j<nCount; j++, ppDoc++ )
{
ScDocument* pDoc = (ScDocument*)*ppDoc;
pDoc->TrackFormulas();
@@ -159,7 +159,7 @@ void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP )
{
- USHORT nPos = theAddInAsyncTbl.Count();
+ sal_uInt16 nPos = theAddInAsyncTbl.Count();
if ( nPos )
{
const ScAddInAsync** ppAsync =
@@ -167,7 +167,7 @@ void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP )
for ( ; nPos-- >0; ppAsync-- )
{ // rueckwaerts wg. Pointer-Aufrueckerei im Array
ScAddInDocs* p = ((ScAddInAsync*)*ppAsync)->pDocs;
- USHORT nFoundPos;
+ sal_uInt16 nFoundPos;
if ( p->Seek_Entry( pDocumentP, &nFoundPos ) )
{
p->Remove( nFoundPos );
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index a973eebc9606..616002e1c0c2 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -55,7 +55,7 @@ using ::rtl::OUString;
// STATIC DATA -----------------------------------------------------------
-#define SC_VERSION ((USHORT)304)
+#define SC_VERSION ((sal_uInt16)304)
//========================================================================
// ScAppOptions - Applikations-Optionen
@@ -94,13 +94,13 @@ void ScAppOptions::SetDefaults()
nZoom = 100;
eZoomType = SVX_ZOOM_PERCENT;
- bSynchronizeZoom = TRUE;
+ bSynchronizeZoom = sal_True;
nStatusFunc = SUBTOTAL_FUNC_SUM;
- bAutoComplete = TRUE;
- bDetectiveAuto = TRUE;
+ bAutoComplete = sal_True;
+ bDetectiveAuto = sal_True;
delete [] pLRUList;
- pLRUList = new USHORT[5]; // sinnvoll vorbelegen
+ pLRUList = new sal_uInt16[5]; // sinnvoll vorbelegen
pLRUList[0] = SC_OPCODE_SUM;
pLRUList[1] = SC_OPCODE_AVERAGE;
pLRUList[2] = SC_OPCODE_MIN;
@@ -146,7 +146,7 @@ const ScAppOptions& ScAppOptions::operator=( const ScAppOptions& rCpy )
//------------------------------------------------------------------------
-void ScAppOptions::SetLRUFuncList( const USHORT* pList, const USHORT nCount )
+void ScAppOptions::SetLRUFuncList( const sal_uInt16* pList, const sal_uInt16 nCount )
{
delete [] pLRUList;
@@ -154,9 +154,9 @@ void ScAppOptions::SetLRUFuncList( const USHORT* pList, const USHORT nCount )
if ( nLRUFuncCount > 0 )
{
- pLRUList = new USHORT[nLRUFuncCount];
+ pLRUList = new sal_uInt16[nLRUFuncCount];
- for ( USHORT i=0; i<nLRUFuncCount; i++ )
+ for ( sal_uInt16 i=0; i<nLRUFuncCount; i++ )
pLRUList[i] = pList[i];
}
else
@@ -176,11 +176,11 @@ void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
if ( nCount < USHRT_MAX )
{
const sal_Int32* pArray = aSeq.getConstArray();
- USHORT* pUShorts = new USHORT[nCount];
+ sal_uInt16* pUShorts = new sal_uInt16[nCount];
for (long i=0; i<nCount; i++)
- pUShorts[i] = (USHORT) pArray[i];
+ pUShorts[i] = (sal_uInt16) pArray[i];
- rOpt.SetLRUFuncList( pUShorts, sal::static_int_cast<USHORT>(nCount) );
+ rOpt.SetLRUFuncList( pUShorts, sal::static_int_cast<sal_uInt16>(nCount) );
delete[] pUShorts;
}
@@ -190,7 +190,7 @@ void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
void lcl_GetLastFunctions( Any& rDest, const ScAppOptions& rOpt )
{
long nCount = rOpt.GetLRUFuncListCount();
- USHORT* pUShorts = rOpt.GetLRUFuncList();
+ sal_uInt16* pUShorts = rOpt.GetLRUFuncList();
if ( nCount && pUShorts )
{
Sequence<sal_Int32> aSeq( nCount );
@@ -214,7 +214,7 @@ void lcl_SetSortList( const Any& rValue )
// if setting is "default", keep default values from ScUserList ctor
//! mark "default" in a safe way
- BOOL bDefault = ( nCount == 1 &&
+ sal_Bool bDefault = ( nCount == 1 &&
pArray[0].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NULL" ) ) );
if (!bDefault)
@@ -242,7 +242,7 @@ void lcl_GetSortList( Any& rDest )
Sequence<OUString> aSeq( nCount );
OUString* pArray = aSeq.getArray();
for (long i=0; i<nCount; i++)
- pArray[i] = (*pUserList)[sal::static_int_cast<USHORT>(i)]->GetString();
+ pArray[i] = (*pUserList)[sal::static_int_cast<sal_uInt16>(i)]->GetString();
rDest <<= aSeq;
}
else
@@ -425,10 +425,10 @@ ScAppCfg::ScAppCfg() :
if (pValues[nProp] >>= nIntVal) SetAppMetric( (FieldUnit) nIntVal );
break;
case SCLAYOUTOPT_STATUSBAR:
- if (pValues[nProp] >>= nIntVal) SetStatusFunc( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetStatusFunc( (sal_uInt16) nIntVal );
break;
case SCLAYOUTOPT_ZOOMVAL:
- if (pValues[nProp] >>= nIntVal) SetZoom( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetZoom( (sal_uInt16) nIntVal );
break;
case SCLAYOUTOPT_ZOOMTYPE:
if (pValues[nProp] >>= nIntVal) SetZoomType( (SvxZoomType) nIntVal );
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 24b22ad1ed20..7492f52ecaa2 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -59,43 +59,43 @@ const sal_Char *linker_dummy = "";
static const sal_Char sAutoTblFmtName[] = "autotbl.fmt";
// bis SO5PF
-const USHORT AUTOFORMAT_ID_X = 9501;
-const USHORT AUTOFORMAT_ID_358 = 9601;
-const USHORT AUTOFORMAT_DATA_ID_X = 9502;
+const sal_uInt16 AUTOFORMAT_ID_X = 9501;
+const sal_uInt16 AUTOFORMAT_ID_358 = 9601;
+const sal_uInt16 AUTOFORMAT_DATA_ID_X = 9502;
// ab SO5
//! in nachfolgenden Versionen muss der Betrag dieser IDs groesser sein
-const USHORT AUTOFORMAT_ID_504 = 9801;
-const USHORT AUTOFORMAT_DATA_ID_504 = 9802;
+const sal_uInt16 AUTOFORMAT_ID_504 = 9801;
+const sal_uInt16 AUTOFORMAT_DATA_ID_504 = 9802;
-const USHORT AUTOFORMAT_ID_552 = 9901;
-const USHORT AUTOFORMAT_DATA_ID_552 = 9902;
+const sal_uInt16 AUTOFORMAT_ID_552 = 9901;
+const sal_uInt16 AUTOFORMAT_DATA_ID_552 = 9902;
// --- from 641 on: CJK and CTL font settings
-const USHORT AUTOFORMAT_ID_641 = 10001;
-const USHORT AUTOFORMAT_DATA_ID_641 = 10002;
+const sal_uInt16 AUTOFORMAT_ID_641 = 10001;
+const sal_uInt16 AUTOFORMAT_DATA_ID_641 = 10002;
// --- from 680/dr14 on: diagonal frame lines
-const USHORT AUTOFORMAT_ID_680DR14 = 10011;
-const USHORT AUTOFORMAT_DATA_ID_680DR14 = 10012;
+const sal_uInt16 AUTOFORMAT_ID_680DR14 = 10011;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR14 = 10012;
// --- from 680/dr25 on: store strings as UTF-8
-const USHORT AUTOFORMAT_ID_680DR25 = 10021;
-const USHORT AUTOFORMAT_DATA_ID_680DR25 = 10022;
+const sal_uInt16 AUTOFORMAT_ID_680DR25 = 10021;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR25 = 10022;
// --- from DEV300/overline2 on: overline support
-const USHORT AUTOFORMAT_ID_300OVRLN = 10031;
-const USHORT AUTOFORMAT_DATA_ID_300OVRLN = 10032;
+const sal_uInt16 AUTOFORMAT_ID_300OVRLN = 10031;
+const sal_uInt16 AUTOFORMAT_DATA_ID_300OVRLN = 10032;
// aktuelle Version
-const USHORT AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
-const USHORT AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
#ifdef READ_OLDVERS
-const USHORT AUTOFORMAT_OLD_ID_OLD = 4201;
-const USHORT AUTOFORMAT_OLD_DATA_ID = 4202;
-const USHORT AUTOFORMAT_OLD_ID_NEW = 4203;
+const sal_uInt16 AUTOFORMAT_OLD_ID_OLD = 4201;
+const sal_uInt16 AUTOFORMAT_OLD_DATA_ID = 4202;
+const sal_uInt16 AUTOFORMAT_OLD_ID_NEW = 4203;
#endif
@@ -104,34 +104,34 @@ const USHORT AUTOFORMAT_OLD_ID_NEW = 4203;
struct ScAfVersions
{
public:
- USHORT nFontVersion;
- USHORT nFontHeightVersion;
- USHORT nWeightVersion;
- USHORT nPostureVersion;
- USHORT nUnderlineVersion;
- USHORT nOverlineVersion;
- USHORT nCrossedOutVersion;
- USHORT nContourVersion;
- USHORT nShadowedVersion;
- USHORT nColorVersion;
- USHORT nBoxVersion;
- USHORT nLineVersion;
- USHORT nBrushVersion;
-
- USHORT nAdjustVersion;
-
- USHORT nHorJustifyVersion;
- USHORT nVerJustifyVersion;
- USHORT nOrientationVersion;
- USHORT nMarginVersion;
- USHORT nBoolVersion;
- USHORT nInt32Version;
- USHORT nRotateModeVersion;
-
- USHORT nNumFmtVersion;
+ sal_uInt16 nFontVersion;
+ sal_uInt16 nFontHeightVersion;
+ sal_uInt16 nWeightVersion;
+ sal_uInt16 nPostureVersion;
+ sal_uInt16 nUnderlineVersion;
+ sal_uInt16 nOverlineVersion;
+ sal_uInt16 nCrossedOutVersion;
+ sal_uInt16 nContourVersion;
+ sal_uInt16 nShadowedVersion;
+ sal_uInt16 nColorVersion;
+ sal_uInt16 nBoxVersion;
+ sal_uInt16 nLineVersion;
+ sal_uInt16 nBrushVersion;
+
+ sal_uInt16 nAdjustVersion;
+
+ sal_uInt16 nHorJustifyVersion;
+ sal_uInt16 nVerJustifyVersion;
+ sal_uInt16 nOrientationVersion;
+ sal_uInt16 nMarginVersion;
+ sal_uInt16 nBoolVersion;
+ sal_uInt16 nInt32Version;
+ sal_uInt16 nRotateModeVersion;
+
+ sal_uInt16 nNumFmtVersion;
ScAfVersions();
- void Load( SvStream& rStream, USHORT nVer );
+ void Load( SvStream& rStream, sal_uInt16 nVer );
static void Write(SvStream& rStream);
};
@@ -161,7 +161,7 @@ ScAfVersions::ScAfVersions() :
{
}
-void ScAfVersions::Load( SvStream& rStream, USHORT nVer )
+void ScAfVersions::Load( SvStream& rStream, sal_uInt16 nVer )
{
rStream >> nFontVersion;
rStream >> nFontHeightVersion;
@@ -201,8 +201,8 @@ void ScAfVersions::Write(SvStream& rStream)
rStream << SvxUnderlineItem(UNDERLINE_NONE, ATTR_FONT_UNDERLINE).GetVersion(SOFFICE_FILEFORMAT_40);
rStream << SvxOverlineItem(UNDERLINE_NONE, ATTR_FONT_OVERLINE).GetVersion(SOFFICE_FILEFORMAT_40);
rStream << SvxCrossedOutItem(STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT).GetVersion(SOFFICE_FILEFORMAT_40);
- rStream << SvxContourItem(sal_False, ATTR_FONT_CONTOUR).GetVersion(SOFFICE_FILEFORMAT_40);
- rStream << SvxShadowedItem(sal_False, ATTR_FONT_SHADOWED).GetVersion(SOFFICE_FILEFORMAT_40);
+ rStream << SvxContourItem(false, ATTR_FONT_CONTOUR).GetVersion(SOFFICE_FILEFORMAT_40);
+ rStream << SvxShadowedItem(false, ATTR_FONT_SHADOWED).GetVersion(SOFFICE_FILEFORMAT_40);
rStream << SvxColorItem(ATTR_FONT_COLOR).GetVersion(SOFFICE_FILEFORMAT_40);
rStream << SvxBoxItem(ATTR_BORDER).GetVersion(SOFFICE_FILEFORMAT_40);
rStream << SvxLineItem(SID_FRAME_LINESTYLE).GetVersion(SOFFICE_FILEFORMAT_40);
@@ -218,7 +218,7 @@ void ScAfVersions::Write(SvStream& rStream)
rStream << SfxInt32Item(ATTR_ROTATE_VALUE).GetVersion(SOFFICE_FILEFORMAT_40);
rStream << SvxRotateModeItem(SVX_ROTATE_MODE_STANDARD,0).GetVersion(SOFFICE_FILEFORMAT_40);
- rStream << (USHORT)0; // Num-Format
+ rStream << (sal_uInt16)0; // Num-Format
}
// ---------------------------------------------------------------------------
@@ -242,8 +242,8 @@ ScAutoFormatDataField::ScAutoFormatDataField() :
aUnderline( UNDERLINE_NONE,ATTR_FONT_UNDERLINE ),
aOverline( UNDERLINE_NONE,ATTR_FONT_OVERLINE ),
aCrossedOut( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT ),
- aContour( sal_False, ATTR_FONT_CONTOUR ),
- aShadowed( sal_False, ATTR_FONT_SHADOWED ),
+ aContour( false, ATTR_FONT_CONTOUR ),
+ aShadowed( false, ATTR_FONT_SHADOWED ),
aColor( ATTR_FONT_COLOR ),
aBox( ATTR_BORDER ),
aTLBR( ATTR_BORDER_TLBR ),
@@ -310,7 +310,7 @@ void ScAutoFormatDataField::SetAdjust( const SvxAdjustItem& rAdjust )
aItem = *(ItemType*)pNew; \
delete pNew;
-BOOL ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVersions, USHORT nVer )
+sal_Bool ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVersions, sal_uInt16 nVer )
{
SfxPoolItem* pNew;
SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0 );
@@ -394,7 +394,7 @@ BOOL ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVersio
}
#ifdef READ_OLDVERS
-BOOL ScAutoFormatDataField::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
+sal_Bool ScAutoFormatDataField::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
{
SfxPoolItem* pNew;
SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0 );
@@ -427,7 +427,7 @@ BOOL ScAutoFormatDataField::LoadOld( SvStream& rStream, const ScAfVersions& rVer
}
#endif
-BOOL ScAutoFormatDataField::Save( SvStream& rStream )
+sal_Bool ScAutoFormatDataField::Save( SvStream& rStream )
{
SvxOrientationItem aOrientation( aRotateAngle.GetValue(), aStacked.GetValue(), 0 );
@@ -489,10 +489,10 @@ ScAutoFormatData::ScAutoFormatData()
bIncludeJustify =
bIncludeFrame =
bIncludeBackground =
- bIncludeWidthHeight = TRUE;
+ bIncludeWidthHeight = sal_True;
ppDataField = new ScAutoFormatDataField*[ 16 ];
- for( USHORT nIndex = 0; nIndex < 16; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < 16; ++nIndex )
ppDataField[ nIndex ] = new ScAutoFormatDataField;
}
@@ -508,32 +508,32 @@ ScAutoFormatData::ScAutoFormatData( const ScAutoFormatData& rData ) :
bIncludeWidthHeight( rData.bIncludeWidthHeight )
{
ppDataField = new ScAutoFormatDataField*[ 16 ];
- for( USHORT nIndex = 0; nIndex < 16; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < 16; ++nIndex )
ppDataField[ nIndex ] = new ScAutoFormatDataField( rData.GetField( nIndex ) );
}
ScAutoFormatData::~ScAutoFormatData()
{
- for( USHORT nIndex = 0; nIndex < 16; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < 16; ++nIndex )
delete ppDataField[ nIndex ];
delete[] ppDataField;
}
-ScAutoFormatDataField& ScAutoFormatData::GetField( USHORT nIndex )
+ScAutoFormatDataField& ScAutoFormatData::GetField( sal_uInt16 nIndex )
{
DBG_ASSERT( nIndex < 16, "ScAutoFormatData::GetField - illegal index" );
DBG_ASSERT( ppDataField && ppDataField[ nIndex ], "ScAutoFormatData::GetField - no data" );
return *ppDataField[ nIndex ];
}
-const ScAutoFormatDataField& ScAutoFormatData::GetField( USHORT nIndex ) const
+const ScAutoFormatDataField& ScAutoFormatData::GetField( sal_uInt16 nIndex ) const
{
DBG_ASSERT( nIndex < 16, "ScAutoFormatData::GetField - illegal index" );
DBG_ASSERT( ppDataField && ppDataField[ nIndex ], "ScAutoFormatData::GetField - no data" );
return *ppDataField[ nIndex ];
}
-const SfxPoolItem* ScAutoFormatData::GetItem( USHORT nIndex, USHORT nWhich ) const
+const SfxPoolItem* ScAutoFormatData::GetItem( sal_uInt16 nIndex, sal_uInt16 nWhich ) const
{
const ScAutoFormatDataField& rField = GetField( nIndex );
switch( nWhich )
@@ -571,7 +571,7 @@ const SfxPoolItem* ScAutoFormatData::GetItem( USHORT nIndex, USHORT nWhich ) con
return NULL;
}
-void ScAutoFormatData::PutItem( USHORT nIndex, const SfxPoolItem& rItem )
+void ScAutoFormatData::PutItem( sal_uInt16 nIndex, const SfxPoolItem& rItem )
{
ScAutoFormatDataField& rField = GetField( nIndex );
switch( rItem.Which() )
@@ -608,21 +608,21 @@ void ScAutoFormatData::PutItem( USHORT nIndex, const SfxPoolItem& rItem )
}
}
-void ScAutoFormatData::CopyItem( USHORT nToIndex, USHORT nFromIndex, USHORT nWhich )
+void ScAutoFormatData::CopyItem( sal_uInt16 nToIndex, sal_uInt16 nFromIndex, sal_uInt16 nWhich )
{
const SfxPoolItem* pItem = GetItem( nFromIndex, nWhich );
if( pItem )
PutItem( nToIndex, *pItem );
}
-const ScNumFormatAbbrev& ScAutoFormatData::GetNumFormat( USHORT nIndex ) const
+const ScNumFormatAbbrev& ScAutoFormatData::GetNumFormat( sal_uInt16 nIndex ) const
{
return GetField( nIndex ).GetNumFormat();
}
-BOOL ScAutoFormatData::IsEqualData( USHORT nIndex1, USHORT nIndex2 ) const
+sal_Bool ScAutoFormatData::IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const
{
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
const ScAutoFormatDataField& rField1 = GetField( nIndex1 );
const ScAutoFormatDataField& rField2 = GetField( nIndex2 );
@@ -679,7 +679,7 @@ BOOL ScAutoFormatData::IsEqualData( USHORT nIndex1, USHORT nIndex2 ) const
return bEqual;
}
-void ScAutoFormatData::FillToItemSet( USHORT nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const
+void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const
{
const ScAutoFormatDataField& rField = GetField( nIndex );
@@ -754,7 +754,7 @@ void ScAutoFormatData::FillToItemSet( USHORT nIndex, SfxItemSet& rItemSet, ScDoc
rItemSet.Put( rField.GetBackground() );
}
-void ScAutoFormatData::GetFromItemSet( USHORT nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat )
+void ScAutoFormatData::GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat )
{
ScAutoFormatDataField& rField = GetField( nIndex );
@@ -789,10 +789,10 @@ void ScAutoFormatData::GetFromItemSet( USHORT nIndex, const SfxItemSet& rItemSet
rField.SetRotateMode ( (const SvxRotateModeItem&) rItemSet.Get( ATTR_ROTATE_MODE ) );
}
-BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
+sal_Bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
{
- BOOL bRet = TRUE;
- USHORT nVer = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVer = 0;
rStream >> nVer;
bRet = 0 == rStream.GetError();
if( bRet && (nVer == AUTOFORMAT_DATA_ID_X ||
@@ -804,7 +804,7 @@ BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
if( AUTOFORMAT_DATA_ID_552 <= nVer )
{
rStream >> nStrResId;
- USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
+ sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
if( RID_SVXSTR_TBLAFMT_BEGIN <= nId &&
nId < RID_SVXSTR_TBLAFMT_END )
{
@@ -814,7 +814,7 @@ BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
nStrResId = USHRT_MAX;
}
- BOOL b;
+ sal_Bool b;
rStream >> b; bIncludeFont = b;
rStream >> b; bIncludeJustify = b;
rStream >> b; bIncludeFrame = b;
@@ -823,25 +823,25 @@ BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
rStream >> b; bIncludeWidthHeight = b;
bRet = 0 == rStream.GetError();
- for( USHORT i = 0; bRet && i < 16; ++i )
+ for( sal_uInt16 i = 0; bRet && i < 16; ++i )
bRet = GetField( i ).Load( rStream, rVersions, nVer );
}
else
- bRet = FALSE;
+ bRet = false;
return bRet;
}
#ifdef READ_OLDVERS
-BOOL ScAutoFormatData::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
+sal_Bool ScAutoFormatData::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
{
- BOOL bRet = TRUE;
- USHORT nVal = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = (rStream.GetError() == 0);
if (bRet && (nVal == AUTOFORMAT_OLD_DATA_ID))
{
rStream.ReadByteString( aName, rStream.GetStreamCharSet() );
- BOOL b;
+ sal_Bool b;
rStream >> b; bIncludeFont = b;
rStream >> b; bIncludeJustify = b;
rStream >> b; bIncludeFrame = b;
@@ -850,19 +850,19 @@ BOOL ScAutoFormatData::LoadOld( SvStream& rStream, const ScAfVersions& rVersions
rStream >> b; bIncludeWidthHeight = b;
bRet = 0 == rStream.GetError();
- for (USHORT i=0; bRet && i < 16; i++)
+ for (sal_uInt16 i=0; bRet && i < 16; i++)
bRet = GetField( i ).LoadOld( rStream, rVersions );
}
else
- bRet = FALSE;
+ bRet = false;
return bRet;
}
#endif
-BOOL ScAutoFormatData::Save(SvStream& rStream)
+sal_Bool ScAutoFormatData::Save(SvStream& rStream)
{
- USHORT nVal = AUTOFORMAT_DATA_ID;
- BOOL b;
+ sal_uInt16 nVal = AUTOFORMAT_DATA_ID;
+ sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: store strings as UTF-8
rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
@@ -875,8 +875,8 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
rStream << ( b = bIncludeValueFormat );
rStream << ( b = bIncludeWidthHeight );
- BOOL bRet = 0 == rStream.GetError();
- for (USHORT i = 0; bRet && (i < 16); i++)
+ sal_Bool bRet = 0 == rStream.GetError();
+ for (sal_uInt16 i = 0; bRet && (i < 16); i++)
bRet = GetField( i ).Save( rStream );
return bRet;
@@ -885,9 +885,9 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
-ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
+ScAutoFormat::ScAutoFormat(sal_uInt16 nLim, sal_uInt16 nDel, sal_Bool bDup):
ScSortedCollection (nLim, nDel, bDup),
- bSaveLater (FALSE)
+ bSaveLater (false)
{
// create default autoformat
ScAutoFormatData* pData = new ScAutoFormatData;
@@ -933,7 +933,7 @@ ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
SvxBrushItem aGray70Back( Color(0x4d, 0x4d, 0x4d), ATTR_BACKGROUND );
SvxBrushItem aGray20Back( Color(0xcc, 0xcc, 0xcc), ATTR_BACKGROUND );
- for (USHORT i=0; i<16; i++)
+ for (sal_uInt16 i=0; i<16; i++)
{
pData->PutItem( i, aBox );
pData->PutItem( i, aFontItem );
@@ -972,7 +972,7 @@ ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
ScAutoFormat::ScAutoFormat(const ScAutoFormat& rAutoFormat) :
ScSortedCollection (rAutoFormat),
- bSaveLater (FALSE)
+ bSaveLater (false)
{}
ScAutoFormat::~ScAutoFormat()
@@ -984,7 +984,7 @@ ScAutoFormat::~ScAutoFormat()
Save();
}
-void ScAutoFormat::SetSaveLater( BOOL bSet )
+void ScAutoFormat::SetSaveLater( sal_Bool bSet )
{
bSaveLater = bSet;
}
@@ -1003,9 +1003,9 @@ short ScAutoFormat::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
return (short) ScGlobal::GetpTransliteration()->compareString( aStr1, aStr2 );
}
-BOOL ScAutoFormat::Load()
+sal_Bool ScAutoFormat::Load()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
INetURLObject aURL;
SvtPathOptions aPathOpt;
@@ -1013,14 +1013,14 @@ BOOL ScAutoFormat::Load()
aURL.setFinalSlash();
aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( sAutoTblFmtName ) ) );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ, sal_True );
SvStream* pStream = aMedium.GetInStream();
bRet = (pStream && pStream->GetError() == 0);
if (bRet)
{
SvStream& rStream = *pStream;
// Achtung hier muss ein allgemeiner Header gelesen werden
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
@@ -1031,11 +1031,11 @@ BOOL ScAutoFormat::Load()
if( nVal == AUTOFORMAT_ID_358 ||
(AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) )
{
- UINT16 nFileVers = SOFFICE_FILEFORMAT_40;
- BYTE nChrSet, nCnt;
+ sal_uInt16 nFileVers = SOFFICE_FILEFORMAT_40;
+ sal_uInt8 nChrSet, nCnt;
long nPos = rStream.Tell();
rStream >> nCnt >> nChrSet;
- if( rStream.Tell() != ULONG(nPos + nCnt) )
+ if( rStream.Tell() != sal_uLong(nPos + nCnt) )
{
DBG_ERRORFILE( "Der Header enthaelt mehr/neuere Daten" );
rStream.Seek( nPos + nCnt );
@@ -1050,10 +1050,10 @@ BOOL ScAutoFormat::Load()
aVersions.Load( rStream, nVal ); // Item-Versionen
ScAutoFormatData* pData;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
bRet = (rStream.GetError() == 0);
- for (USHORT i=0; bRet && (i < nAnz); i++)
+ for (sal_uInt16 i=0; bRet && (i < nAnz); i++)
{
pData = new ScAutoFormatData();
bRet = pData->Load(rStream, aVersions);
@@ -1087,10 +1087,10 @@ BOOL ScAutoFormat::Load()
AUTOFORMAT_OLD_ID_NEW == nVal )
{
ScAutoFormatData* pData;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
bRet = 0 == rStream.GetError();
- for( USHORT i=0; bRet && (i < nAnz); ++i )
+ for( sal_uInt16 i=0; bRet && (i < nAnz); ++i )
{
pData = new ScAutoFormatData();
bRet = pData->LoadOld( rStream, aVersions );
@@ -1098,18 +1098,18 @@ BOOL ScAutoFormat::Load()
}
}
else
- bRet = FALSE;
+ bRet = false;
}
#endif
}
}
- bSaveLater = FALSE;
+ bSaveLater = false;
return bRet;
}
-BOOL ScAutoFormat::Save()
+sal_Bool ScAutoFormat::Save()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
INetURLObject aURL;
SvtPathOptions aPathOpt;
@@ -1117,7 +1117,7 @@ BOOL ScAutoFormat::Save()
aURL.setFinalSlash();
aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( sAutoTblFmtName ) ) );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE, sal_True );
SvStream* pStream = aMedium.GetOutStream();
bRet = (pStream && pStream->GetError() == 0);
if (bRet)
@@ -1126,32 +1126,32 @@ BOOL ScAutoFormat::Save()
rStream.SetVersion( SOFFICE_FILEFORMAT_40 );
// Achtung hier muss ein allgemeiner Header gespeichert werden
- USHORT nVal = AUTOFORMAT_ID;
+ sal_uInt16 nVal = AUTOFORMAT_ID;
rStream << nVal
- << (BYTE)2 // Anzahl von Zeichen des Headers incl. diesem
- << (BYTE)::GetSOStoreTextEncoding(
- gsl_getSystemTextEncoding(), sal::static_int_cast<USHORT>(rStream.GetVersion()) );
+ << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
+ << (sal_uInt8)::GetSOStoreTextEncoding(
+ gsl_getSystemTextEncoding(), sal::static_int_cast<sal_uInt16>(rStream.GetVersion()) );
ScAfVersions::Write(rStream); // Item-Versionen
bRet = (rStream.GetError() == 0);
//-----------------------------------------------------------
- rStream << (USHORT)(nCount - 1);
+ rStream << (sal_uInt16)(nCount - 1);
bRet = (rStream.GetError() == 0);
- for (USHORT i=1; bRet && (i < nCount); i++)
+ for (sal_uInt16 i=1; bRet && (i < nCount); i++)
bRet = ((ScAutoFormatData*)pItems[i])->Save(rStream);
rStream.Flush();
aMedium.Commit();
}
- bSaveLater = FALSE;
+ bSaveLater = false;
return bRet;
}
-USHORT ScAutoFormat::FindIndexPerName( const String& rName ) const
+sal_uInt16 ScAutoFormat::FindIndexPerName( const String& rName ) const
{
String aName;
- for( USHORT i=0; i<nCount ; i++ )
+ for( sal_uInt16 i=0; i<nCount ; i++ )
{
ScAutoFormatData* pItem = (ScAutoFormatData*)pItems[i];
pItem->GetName( aName );
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index ad065f46eba5..67d5d913fc96 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -62,17 +62,17 @@ typedef void (CALLTYPE* ExFuncPtr14)(void*, void*, void*, void*, void*, void*, v
typedef void (CALLTYPE* ExFuncPtr15)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
typedef void (CALLTYPE* ExFuncPtr16)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* GetFuncCountPtr)(USHORT& nCount);
+typedef void (CALLTYPE* GetFuncCountPtr)(sal_uInt16& nCount);
typedef void (CALLTYPE* GetFuncDataPtr)
- (USHORT& nNo, sal_Char* pFuncName, USHORT& nParamCount, ParamType* peType, sal_Char* pInternalName);
+ (sal_uInt16& nNo, sal_Char* pFuncName, sal_uInt16& nParamCount, ParamType* peType, sal_Char* pInternalName);
-typedef void (CALLTYPE* SetLanguagePtr)( USHORT& nLanguage );
+typedef void (CALLTYPE* SetLanguagePtr)( sal_uInt16& nLanguage );
typedef void (CALLTYPE* GetParamDesc)
- (USHORT& nNo, USHORT& nParam, sal_Char* pName, sal_Char* pDesc );
+ (sal_uInt16& nNo, sal_uInt16& nParam, sal_Char* pName, sal_Char* pDesc );
-typedef void (CALLTYPE* IsAsync) ( USHORT& nNo,
+typedef void (CALLTYPE* IsAsync) ( sal_uInt16& nNo,
ParamType* peType );
-typedef void (CALLTYPE* Advice) ( USHORT& nNo,
+typedef void (CALLTYPE* Advice) ( sal_uInt16& nNo,
AdvData& pfCallback );
typedef void (CALLTYPE* Unadvice)( double& nHandle );
@@ -100,7 +100,7 @@ FuncData::FuncData(const String& rIName) :
nParamCount (0),
eAsyncType (NONE)
{
- for (USHORT i = 0; i < MAXFUNCPARAM; i++)
+ for (sal_uInt16 i = 0; i < MAXFUNCPARAM; i++)
eParamType[i] = PTR_DOUBLE;
}
@@ -109,8 +109,8 @@ FuncData::FuncData(const String& rIName) :
FuncData::FuncData(const ModuleData*pModule,
const String& rIName,
const String& rFName,
- USHORT nNo,
- USHORT nCount,
+ sal_uInt16 nNo,
+ sal_uInt16 nCount,
const ParamType* peType,
ParamType eType) :
pModuleData (pModule),
@@ -120,7 +120,7 @@ FuncData::FuncData(const ModuleData*pModule,
nParamCount (nCount),
eAsyncType (eType)
{
- for (USHORT i = 0; i < MAXFUNCPARAM; i++)
+ for (sal_uInt16 i = 0; i < MAXFUNCPARAM; i++)
eParamType[i] = peType[i];
}
@@ -135,7 +135,7 @@ FuncData::FuncData(const FuncData& rData) :
nParamCount (rData.nParamCount),
eAsyncType (rData.eAsyncType)
{
- for (USHORT i = 0; i < MAXFUNCPARAM; i++)
+ for (sal_uInt16 i = 0; i < MAXFUNCPARAM; i++)
eParamType[i] = rData.eParamType[i];
}
@@ -149,7 +149,7 @@ short FuncCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
//------------------------------------------------------------------------
-BOOL FuncCollection::SearchFunc( const String& rName, USHORT& rIndex ) const
+sal_Bool FuncCollection::SearchFunc( const String& rName, sal_uInt16& rIndex ) const
{
FuncData aDataObj(rName);
return Search( &aDataObj, rIndex );
@@ -176,13 +176,13 @@ public:
class ModuleCollection : public ScSortedCollection
{
public:
- ModuleCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( nLim, nDel, bDup ) {}
+ ModuleCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = false) : ScSortedCollection ( nLim, nDel, bDup ) {}
ModuleCollection(const ModuleCollection& rModuleCollection) : ScSortedCollection ( rModuleCollection ) {}
virtual ScDataObject* Clone() const { return new ModuleCollection(*this); }
- ModuleData* operator[]( const USHORT nIndex) const {return (ModuleData*)At(nIndex);}
+ ModuleData* operator[]( const sal_uInt16 nIndex) const {return (ModuleData*)At(nIndex);}
virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
- BOOL SearchModule( const String& rName,
+ sal_Bool SearchModule( const String& rName,
const ModuleData*& rpModule ) const;
};
@@ -198,12 +198,12 @@ short ModuleCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
//------------------------------------------------------------------------
-BOOL ModuleCollection::SearchModule( const String& rName,
+sal_Bool ModuleCollection::SearchModule( const String& rName,
const ModuleData*& rpModule ) const
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
ModuleData aSearchModule(rName, 0);
- BOOL bFound = Search( &aSearchModule, nIndex );
+ sal_Bool bFound = Search( &aSearchModule, nIndex );
if (bFound)
rpModule = (ModuleData*)At(nIndex);
else
@@ -213,19 +213,19 @@ BOOL ModuleCollection::SearchModule( const String& rName,
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL InitExternalFunc(const rtl::OUString& rModuleName)
+sal_Bool InitExternalFunc(const rtl::OUString& rModuleName)
{
String aModuleName( rModuleName );
// Module schon geladen?
const ModuleData* pTemp;
if (aModuleCollection.SearchModule(aModuleName, pTemp))
- return FALSE;
+ return false;
rtl::OUString aNP;
aNP = rModuleName;
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
osl::Module* pLib = new osl::Module( aNP );
if (pLib->is())
{
@@ -239,7 +239,7 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
if ( fpSetLanguage )
{
LanguageType eLanguage = Application::GetSettings().GetUILanguage();
- USHORT nLanguage = (USHORT) eLanguage;
+ sal_uInt16 nLanguage = (sal_uInt16) eLanguage;
(*((SetLanguagePtr)fpSetLanguage))( nLanguage );
}
@@ -251,20 +251,20 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
AdvData pfCallBack = &ScAddInAsyncCallBack;
FuncData* pFuncData;
FuncCollection* pFuncCol = ScGlobal::GetFuncCollection();
- USHORT nCount;
+ sal_uInt16 nCount;
(*((GetFuncCountPtr)fpGetCount))(nCount);
- for (USHORT i=0; i < nCount; i++)
+ for (sal_uInt16 i=0; i < nCount; i++)
{
sal_Char cFuncName[256];
sal_Char cInternalName[256];
- USHORT nParamCount;
+ sal_uInt16 nParamCount;
ParamType eParamType[MAXFUNCPARAM];
ParamType eAsyncType = NONE;
// alles initialisieren, falls das AddIn sich schlecht verhaelt
cFuncName[0] = 0;
cInternalName[0] = 0;
nParamCount = 0;
- for ( USHORT j=0; j<MAXFUNCPARAM; j++ )
+ for ( sal_uInt16 j=0; j<MAXFUNCPARAM; j++ )
{
eParamType[j] = NONE;
}
@@ -287,7 +287,7 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
eAsyncType );
pFuncCol->Insert(pFuncData);
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
delete pLib;
@@ -301,8 +301,8 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
void ExitExternalFunc()
{
- USHORT nCount = aModuleCollection.GetCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = aModuleCollection.GetCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ModuleData* pData = aModuleCollection[i];
pData->FreeInstance();
@@ -311,9 +311,9 @@ void ExitExternalFunc()
//------------------------------------------------------------------------
-BOOL FuncData::Call(void** ppParam)
+sal_Bool FuncData::Call(void** ppParam)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(aFuncName);
if (fProc != NULL)
@@ -322,81 +322,81 @@ BOOL FuncData::Call(void** ppParam)
{
case 1 :
(*((ExFuncPtr1)fProc))(ppParam[0]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 2 :
(*((ExFuncPtr2)fProc))(ppParam[0], ppParam[1]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 3 :
(*((ExFuncPtr3)fProc))(ppParam[0], ppParam[1], ppParam[2]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 4 :
(*((ExFuncPtr4)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 5 :
(*((ExFuncPtr5)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 6 :
(*((ExFuncPtr6)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 7 :
(*((ExFuncPtr7)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 8 :
(*((ExFuncPtr8)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 9 :
(*((ExFuncPtr9)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 10 :
(*((ExFuncPtr10)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 11 :
(*((ExFuncPtr11)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 12:
(*((ExFuncPtr12)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 13:
(*((ExFuncPtr13)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 14 :
(*((ExFuncPtr14)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12], ppParam[13]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 15 :
(*((ExFuncPtr15)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12], ppParam[13], ppParam[14]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 16 :
(*((ExFuncPtr16)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12], ppParam[13], ppParam[14], ppParam[15]);
- bRet = TRUE;
+ bRet = sal_True;
break;
default : break;
}
@@ -406,15 +406,15 @@ BOOL FuncData::Call(void** ppParam)
//------------------------------------------------------------------------
-BOOL FuncData::Unadvice( double nHandle )
+sal_Bool FuncData::Unadvice( double nHandle )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(UNADVICE));
if (fProc != NULL)
{
((::Unadvice)fProc)(nHandle);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index f68587399ce8..48be5206566b 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -47,10 +47,10 @@ const ScFormulaCell* pLastFormulaTreeTop = 0;
// -----------------------------------------------------------------------
-void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
+void ScCellFormat::GetString( ScBaseCell* pCell, sal_uLong nFormat, String& rString,
Color** ppColor, SvNumberFormatter& rFormatter,
- BOOL bNullVals,
- BOOL bFormula,
+ sal_Bool bNullVals,
+ sal_Bool bFormula,
ScForceTextFmt eForceTextFmt )
{
*ppColor = NULL;
@@ -121,7 +121,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
}
else
{
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
// get the number format only after interpretation (GetErrCode):
if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
@@ -156,7 +156,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
}
}
-void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rString,
+void ScCellFormat::GetInputString( ScBaseCell* pCell, sal_uLong nFormat, String& rString,
SvNumberFormatter& rFormatter )
{
if (&rFormatter==NULL)
@@ -200,7 +200,7 @@ void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rSt
((ScFormulaCell*)pCell)->GetString( rString );
}
- USHORT nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
+ sal_uInt16 nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
if (nErrCode != 0)
{
rString.Erase();
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 4f851fdc76b2..6148dac2fa11 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -85,7 +85,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, SCTAB nTab,
aName( rChartName ),
pDocument( pDoc ),
aPositioner(pDoc, nTab, nStartColP, nStartRowP, nEndColP, nEndRowP),
- bValid( TRUE )
+ bValid( sal_True )
{
}
@@ -94,7 +94,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, const ScRangeListRef& rRangeList,
aName( rChartName ),
pDocument( pDoc ),
aPositioner(pDoc, rRangeList),
- bValid( TRUE )
+ bValid( sal_True )
{
}
@@ -116,7 +116,7 @@ ScDataObject* ScChartArray::Clone() const
return new ScChartArray(*this);
}
-BOOL ScChartArray::operator==(const ScChartArray& rCmp) const
+sal_Bool ScChartArray::operator==(const ScChartArray& rCmp) const
{
return aPositioner == rCmp.aPositioner
&& aName == rCmp.aName;
@@ -226,16 +226,16 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
nRowCount = 0;
}
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
if ( !nColCount )
{
- bValidData = FALSE;
+ bValidData = false;
nColCount = 1;
aCols.push_back(nStrCol);
}
if ( !nRowCount )
{
- bValidData = FALSE;
+ bValidData = false;
nRowCount = 1;
aRows.push_back(nStrRow);
}
@@ -250,7 +250,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
{
if ( bValidData )
{
- BOOL bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
+ sal_Bool bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
ScBaseCell* pCell;
for (nCol=0; nCol<nColCount; nCol++)
{
@@ -350,15 +350,15 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
nRowCount = 0;
}
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
if ( !nColCount )
{
- bValidData = FALSE;
+ bValidData = false;
nColCount = 1;
}
if ( !nRowCount )
{
- bValidData = FALSE;
+ bValidData = false;
nRowCount = 1;
}
@@ -372,8 +372,8 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
{
SCSIZE nCol = 0;
SCSIZE nRow = 0;
- BOOL bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
- ULONG nIndex = 0;
+ sal_Bool bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
+ sal_uLong nIndex = 0;
if (bValidData)
{
for ( nCol = 0; nCol < nColCount; nCol++ )
@@ -393,7 +393,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
nVal = ((ScValueCell*)pCell)->GetValue();
if ( bCalcAsShown && nVal != 0.0 )
{
- ULONG nFormat = pDocument->GetNumberFormat( *pPos );
+ sal_uLong nFormat = pDocument->GetNumberFormat( *pPos );
nVal = pDocument->RoundValueAsShown( nVal, nFormat );
}
}
@@ -426,7 +426,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
nVal = ((ScValueCell*)pCell)->GetValue();
if ( bCalcAsShown && nVal != 0.0 )
{
- ULONG nFormat = pDocument->GetNumberFormat( *pPos );
+ sal_uLong nFormat = pDocument->GetNumberFormat( *pPos );
nVal = pDocument->RoundValueAsShown( nVal, nFormat );
}
}
@@ -516,16 +516,16 @@ ScDataObject* ScChartCollection::Clone() const
return new ScChartCollection(*this);
}
-BOOL ScChartCollection::operator==(const ScChartCollection& rCmp) const
+sal_Bool ScChartCollection::operator==(const ScChartCollection& rCmp) const
{
if (nCount != rCmp.nCount)
- return FALSE;
+ return false;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (!((*(const ScChartArray*)pItems[i]) == (*(const ScChartArray*)rCmp.pItems[i])))
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 422d7694b820..47854ec57f37 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -34,6 +34,7 @@
#include "drwlayer.hxx"
#include "rangelst.hxx"
#include "chartlis.hxx"
+#include "docuno.hxx"
#include <svx/svditer.hxx>
#include <svx/svdoole2.hxx>
@@ -51,16 +52,16 @@ namespace
{
-USHORT lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts )
+sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
return 0;
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
- USHORT nPageCount = pModel->GetPageCount();
- for (USHORT nPageNo=0; nPageNo<nPageCount; nPageNo++)
+ sal_uInt16 nPageCount = pModel->GetPageCount();
+ for (sal_uInt16 nPageNo=0; nPageNo<nPageCount; nPageNo++)
{
SdrPage* pPage = pModel->GetPage(nPageNo);
DBG_ASSERT(pPage,"Page ?");
@@ -72,12 +73,12 @@ USHORT lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCha
if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) )
{
String aName = ((SdrOle2Obj*)pObject)->GetPersistName();
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
if ( !bAllCharts )
{
ScRangeList aRanges;
- BOOL bColHeaders = FALSE;
- BOOL bRowHeaders = FALSE;
+ sal_Bool bColHeaders = false;
+ sal_Bool bRowHeaders = false;
pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders );
bHit = aRanges.In( rPos );
}
@@ -93,7 +94,7 @@ USHORT lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCha
return nFound;
}
-BOOL lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, SCTAB nTabCount )
+sal_Bool lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, SCTAB nTabCount )
{
//! if multiple sheets are copied, update references into the other copied sheets?
@@ -126,9 +127,9 @@ BOOL lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, S
}//end anonymous namespace
// === ScChartHelper ======================================
-USHORT ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc )
+sal_uInt16 ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc )
{
- return lcl_DoUpdateCharts( ScAddress(), pDoc, TRUE );
+ return lcl_DoUpdateCharts( ScAddress(), pDoc, sal_True );
}
void ScChartHelper::AdjustRangesOfChartsOnDestinationPage( ScDocument* pSrcDoc, ScDocument* pDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab )
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index f8fa036dc095..2fa1ede0b851 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -128,9 +128,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP,
mpTokens(new vector<ScTokenRef>),
pUnoData( NULL ),
pDoc( pDocP ),
- bUsed( FALSE ),
- bDirty( FALSE ),
- bSeriesRangesScheduled( FALSE )
+ bUsed( false ),
+ bDirty( false ),
+ bSeriesRangesScheduled( false )
{
SetRangeList( rRange );
}
@@ -143,9 +143,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP,
mpTokens(new vector<ScTokenRef>),
pUnoData( NULL ),
pDoc( pDocP ),
- bUsed( FALSE ),
- bDirty( FALSE ),
- bSeriesRangesScheduled( FALSE )
+ bUsed( false ),
+ bDirty( false ),
+ bSeriesRangesScheduled( false )
{
ScRefTokenHelper::getTokensFromRangeList(*mpTokens, *rRangeList);
}
@@ -157,9 +157,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, vector
mpTokens(pTokens),
pUnoData( NULL ),
pDoc( pDocP ),
- bUsed( FALSE ),
- bDirty( FALSE ),
- bSeriesRangesScheduled( FALSE )
+ bUsed( false ),
+ bDirty( false ),
+ bSeriesRangesScheduled( false )
{
}
@@ -170,7 +170,7 @@ ScChartListener::ScChartListener( const ScChartListener& r ) :
mpTokens(new vector<ScTokenRef>(*r.mpTokens)),
pUnoData( NULL ),
pDoc( r.pDoc ),
- bUsed( FALSE ),
+ bUsed( false ),
bDirty( r.bDirty ),
bSeriesRangesScheduled( r.bSeriesRangesScheduled )
{
@@ -256,7 +256,7 @@ void ScChartListener::Update()
}
if ( pUnoData )
{
- bDirty = FALSE;
+ bDirty = false;
//! irgendwann mal erkennen, was sich innerhalb des Charts geaendert hat
chart::ChartDataChangeEvent aEvent( pUnoData->GetSource(),
chart::ChartDataChangeType_ALL,
@@ -265,7 +265,7 @@ void ScChartListener::Update()
}
else if ( pDoc->GetAutoCalc() )
{
- bDirty = FALSE;
+ bDirty = false;
pDoc->UpdateChart( GetString());
}
}
@@ -375,13 +375,13 @@ void ScChartListener::EndListeningTo()
void ScChartListener::ChangeListening( const ScRangeListRef& rRangeListRef,
- BOOL bDirtyP )
+ sal_Bool bDirtyP )
{
EndListeningTo();
SetRangeList( rRangeListRef );
StartListeningTo();
if ( bDirtyP )
- SetDirty( TRUE );
+ SetDirty( sal_True );
}
@@ -389,7 +389,7 @@ void ScChartListener::UpdateScheduledSeriesRanges()
{
if ( bSeriesRangesScheduled )
{
- bSeriesRangesScheduled = FALSE;
+ bSeriesRangesScheduled = false;
UpdateSeriesRanges();
}
}
@@ -429,7 +429,7 @@ void ScChartListener::SetUpdateQueue()
pDoc->GetChartListenerCollection()->StartTimer();
}
-BOOL ScChartListener::operator==( const ScChartListener& r )
+sal_Bool ScChartListener::operator==( const ScChartListener& r )
{
bool b1 = (mpTokens.get() && !mpTokens->empty());
bool b2 = (r.mpTokens.get() && !r.mpTokens->empty());
@@ -465,7 +465,7 @@ ScChartListenerCollection::RangeListenerItem::RangeListenerItem(const ScRange& r
}
ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
- ScStrCollection( 4, 4, FALSE ),
+ ScStrCollection( 4, 4, false ),
pDoc( pDocP )
{
aTimer.SetTimeoutHdl( LINK( this, ScChartListenerCollection, TimerHdl ) );
@@ -496,18 +496,18 @@ ScDataObject* ScChartListenerCollection::Clone() const
void ScChartListenerCollection::StartAllListeners()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
((ScChartListener*) pItems[ nIndex ])->StartListeningTo();
}
}
void ScChartListenerCollection::ChangeListening( const String& rName,
- const ScRangeListRef& rRangeListRef, BOOL bDirty )
+ const ScRangeListRef& rRangeListRef, sal_Bool bDirty )
{
ScChartListener aCLSearcher( rName, pDoc, rRangeListRef );
ScChartListener* pCL;
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( Search( &aCLSearcher, nIndex ) )
{
pCL = (ScChartListener*) pItems[ nIndex ];
@@ -521,13 +521,13 @@ void ScChartListenerCollection::ChangeListening( const String& rName,
}
pCL->StartListeningTo();
if ( bDirty )
- pCL->SetDirty( TRUE );
+ pCL->SetDirty( sal_True );
}
void ScChartListenerCollection::FreeUnused()
{
// rueckwaerts wg. Pointer-Aufrueckerei im Array
- for ( USHORT nIndex = nCount; nIndex-- >0; )
+ for ( sal_uInt16 nIndex = nCount; nIndex-- >0; )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
// Uno-Charts nicht rauskicken
@@ -535,7 +535,7 @@ void ScChartListenerCollection::FreeUnused()
if ( !pCL->IsUno() )
{
if ( pCL->IsUsed() )
- pCL->SetUsed( FALSE );
+ pCL->SetUsed( false );
else
Free( pCL );
}
@@ -546,7 +546,7 @@ void ScChartListenerCollection::FreeUno( const uno::Reference< chart::XChartData
const uno::Reference< chart::XChartData >& rSource )
{
// rueckwaerts wg. Pointer-Aufrueckerei im Array
- for ( USHORT nIndex = nCount; nIndex-- >0; )
+ for ( sal_uInt16 nIndex = nCount; nIndex-- >0; )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
if ( pCL->IsUno() &&
@@ -578,7 +578,7 @@ IMPL_LINK( ScChartListenerCollection, TimerHdl, Timer*, EMPTYARG )
void ScChartListenerCollection::UpdateDirtyCharts()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
if ( pCL->IsDirty() )
@@ -591,24 +591,24 @@ void ScChartListenerCollection::UpdateDirtyCharts()
void ScChartListenerCollection::SetDirty()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
- pCL->SetDirty( TRUE );
+ pCL->SetDirty( sal_True );
}
StartTimer();
}
void ScChartListenerCollection::SetDiffDirty(
- const ScChartListenerCollection& rCmp, BOOL bSetChartRangeLists )
+ const ScChartListenerCollection& rCmp, sal_Bool bSetChartRangeLists )
{
- BOOL bDirty = FALSE;
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ sal_Bool bDirty = false;
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
- USHORT nFound;
- BOOL bFound = rCmp.Search( pCL, nFound );
+ sal_uInt16 nFound;
+ sal_Bool bFound = rCmp.Search( pCL, nFound );
if ( !bFound || (*pCL != *((const ScChartListener*) rCmp.pItems[ nFound ])) )
{
if ( bSetChartRangeLists )
@@ -618,16 +618,16 @@ void ScChartListenerCollection::SetDiffDirty(
const ScRangeListRef& rList1 = pCL->GetRangeList();
const ScRangeListRef& rList2 =
((const ScChartListener*) rCmp.pItems[ nFound ])->GetRangeList();
- BOOL b1 = rList1.Is();
- BOOL b2 = rList2.Is();
+ sal_Bool b1 = rList1.Is();
+ sal_Bool b2 = rList2.Is();
if ( b1 != b2 || (b1 && b2 && (*rList1 != *rList2)) )
pDoc->SetChartRangeList( pCL->GetString(), rList1 );
}
else
pDoc->SetChartRangeList( pCL->GetString(), pCL->GetRangeList() );
}
- bDirty = TRUE;
- pCL->SetDirty( TRUE );
+ bDirty = sal_True;
+ pCL->SetDirty( sal_True );
}
}
if ( bDirty )
@@ -637,15 +637,15 @@ void ScChartListenerCollection::SetDiffDirty(
void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange )
{
- BOOL bDirty = FALSE;
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ sal_Bool bDirty = false;
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
const ScRangeListRef& rList = pCL->GetRangeList();
if ( rList.Is() && rList->Intersects( rRange ) )
{
- bDirty = TRUE;
- pCL->SetDirty( TRUE );
+ bDirty = sal_True;
+ pCL->SetDirty( sal_True );
}
}
if ( bDirty )
@@ -663,7 +663,7 @@ void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange )
void ScChartListenerCollection::UpdateScheduledSeriesRanges()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
pCL->UpdateScheduledSeriesRanges();
@@ -674,7 +674,7 @@ void ScChartListenerCollection::UpdateScheduledSeriesRanges()
void ScChartListenerCollection::UpdateChartsContainingTab( SCTAB nTab )
{
ScRange aRange( 0, 0, nTab, MAXCOL, MAXROW, nTab );
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
pCL->UpdateChartIntersecting( aRange );
@@ -682,19 +682,19 @@ void ScChartListenerCollection::UpdateChartsContainingTab( SCTAB nTab )
}
-BOOL ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
+sal_Bool ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
{
// hier nicht ScStrCollection::operator==() verwenden, der umstaendlich via
// IsEqual und Compare laeuft, stattdessen ScChartListener::operator==()
if ( pDoc != r.pDoc || nCount != r.nCount )
- return FALSE;
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ return false;
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
if ( *((ScChartListener*) pItems[ nIndex ]) !=
*((ScChartListener*) r.pItems[ nIndex ]) )
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void ScChartListenerCollection::StartListeningHiddenRange( const ScRange& rRange, ScChartHiddenRangeListener* pListener )
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 06d508308981..7baa02ad5dc7 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -37,6 +37,22 @@
#include "document.hxx"
#include "rechead.hxx"
+namespace
+{
+ bool lcl_hasValueDataButNoDates( ScDocument* pDocument, SCCOL nCol, SCROW nRow, SCTAB nTab )
+ {
+ bool bReturn = false;
+ if (pDocument->HasValueData( nCol, nRow, nTab ))
+ {
+ //treat dates like text #i25706#
+ sal_uInt32 nNumberFormat = pDocument->GetNumberFormat( ScAddress( nCol, nRow, nTab ) );
+ short nType = pDocument->GetFormatTable()->GetType(nNumberFormat);
+ bool bIsDate = (nType & NUMBERFORMAT_DATE);
+ bReturn = !bIsDate;
+ }
+ return bReturn;
+ }
+}
ScChartPositioner::ScChartPositioner( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartColP, SCROW nStartRowP, SCCOL nEndColP, SCROW nEndRowP) :
@@ -45,9 +61,9 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, SCTAB nTab,
eGlue( SC_CHARTGLUE_NA ),
nStartCol(0),
nStartRow(0),
- bColHeaders( FALSE ),
- bRowHeaders( FALSE ),
- bDummyUpperLeft( FALSE )
+ bColHeaders( false ),
+ bRowHeaders( false ),
+ bDummyUpperLeft( false )
{
SetRangeList( ScRange( nStartColP, nStartRowP, nTab, nEndColP, nEndRowP, nTab ) );
CheckColRowHeaders();
@@ -60,9 +76,9 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, const ScRangeListRef& rR
eGlue( SC_CHARTGLUE_NA ),
nStartCol(0),
nStartRow(0),
- bColHeaders( FALSE ),
- bRowHeaders( FALSE ),
- bDummyUpperLeft( FALSE )
+ bColHeaders( false ),
+ bRowHeaders( false ),
+ bDummyUpperLeft( false )
{
if ( aRangeListRef.Is() )
CheckColRowHeaders();
@@ -86,7 +102,7 @@ ScChartPositioner::~ScChartPositioner()
delete pPositionMap;
}
-BOOL ScChartPositioner::operator==(const ScChartPositioner& rCmp) const
+sal_Bool ScChartPositioner::operator==(const ScChartPositioner& rCmp) const
{
return bColHeaders == rCmp.bColHeaders
&& bRowHeaders == rCmp.bRowHeaders
@@ -104,7 +120,7 @@ void ScChartPositioner::GlueState()
{
if ( eGlue != SC_CHARTGLUE_NA )
return;
- bDummyUpperLeft = FALSE;
+ bDummyUpperLeft = false;
ScRange* pR;
if ( aRangeListRef->size() <= 1 )
{
@@ -158,7 +174,7 @@ void ScChartPositioner::GlueState()
eGlue = SC_CHARTGLUE_COLS;
return;
}
- ULONG nCR = (ULONG)nC * nR;
+ sal_uLong nCR = (sal_uLong)nC * nR;
//2do:
/*
Erstmal simpel ohne Bitmaskiererei, maximal koennten so 8MB alloziert
@@ -168,29 +184,13 @@ void ScChartPositioner::GlueState()
Zeilen/Spalten abzulegen, wuerde aber ein weiteres durchlaufen der
RangeList und indirekten Zugriff auf das Array bedeuten.
*/
- const BYTE nHole = 0;
- const BYTE nOccu = 1;
- const BYTE nFree = 2;
- const BYTE nGlue = 3;
-#ifdef WIN
- // we hate 16bit, don't we?
- BYTE huge* p;
- BYTE huge* pA = (BYTE huge*) SvMemAlloc( nCR );
- if ( nCR > (ULONG)((USHORT)~0) )
- { // in 32k Bloecken initialisieren
- ULONG j;
- for ( j=0; j<nCR; j+=0x8000 )
- {
- memset( pA+j, nHole, Min( (ULONG)0x8000, nCR-j ) );
- }
- }
- else
- memset( pA, nHole, nCR * sizeof(BYTE) );
-#else
- BYTE* p;
- BYTE* pA = new BYTE[ nCR ];
- memset( pA, 0, nCR * sizeof(BYTE) );
-#endif
+ const sal_uInt8 nHole = 0;
+ const sal_uInt8 nOccu = 1;
+ const sal_uInt8 nFree = 2;
+ const sal_uInt8 nGlue = 3;
+ sal_uInt8* p;
+ sal_uInt8* pA = new sal_uInt8[ nCR ];
+ memset( pA, 0, nCR * sizeof(sal_uInt8) );
SCCOL nCol, nCol1, nCol2;
SCROW nRow, nRow1, nRow2;
@@ -203,17 +203,17 @@ void ScChartPositioner::GlueState()
nRow2 = pR->aEnd.Row() - nStartRow;
for ( nCol = nCol1; nCol <= nCol2; nCol++ )
{
- p = pA + (ULONG)nCol * nR + nRow1;
+ p = pA + (sal_uLong)nCol * nR + nRow1;
for ( nRow = nRow1; nRow <= nRow2; nRow++, p++ )
*p = nOccu;
}
}
- BOOL bGlue = TRUE;
+ sal_Bool bGlue = sal_True;
- BOOL bGlueCols = FALSE;
+ sal_Bool bGlueCols = false;
for ( nCol = 0; bGlue && nCol < nC; nCol++ )
{ // Spalten probieren durchzugehen und als frei markieren
- p = pA + (ULONG)nCol * nR;
+ p = pA + (sal_uLong)nCol * nR;
for ( nRow = 0; bGlue && nRow < nR; nRow++, p++ )
{
if ( *p == nOccu )
@@ -221,21 +221,21 @@ void ScChartPositioner::GlueState()
// moeglich. Am Rand koennte ok sein, wenn in dieser Spalte
// in jeder belegten Zeile einer belegt ist.
if ( nRow > 0 && nCol > 0 )
- bGlue = FALSE; // nCol==0 kann DummyUpperLeft sein
+ bGlue = false; // nCol==0 kann DummyUpperLeft sein
else
nRow = nR;
}
else
*p = nFree;
}
- if ( bGlue && *(p = (pA + ((((ULONG)nCol+1) * nR) - 1))) == nFree )
+ if ( bGlue && *(p = (pA + ((((sal_uLong)nCol+1) * nR) - 1))) == nFree )
{ // Spalte als komplett frei markieren
*p = nGlue;
- bGlueCols = TRUE; // mindestens eine freie Spalte
+ bGlueCols = sal_True; // mindestens eine freie Spalte
}
}
- BOOL bGlueRows = FALSE;
+ sal_Bool bGlueRows = false;
for ( nRow = 0; bGlue && nRow < nR; nRow++ )
{ // Zeilen probieren durchzugehen und als frei markieren
p = pA + nRow;
@@ -244,28 +244,28 @@ void ScChartPositioner::GlueState()
if ( *p == nOccu )
{
if ( nCol > 0 && nRow > 0 )
- bGlue = FALSE; // nRow==0 kann DummyUpperLeft sein
+ bGlue = false; // nRow==0 kann DummyUpperLeft sein
else
nCol = nC;
}
else
*p = nFree;
}
- if ( bGlue && *(p = (pA + ((((ULONG)nC-1) * nR) + nRow))) == nFree )
+ if ( bGlue && *(p = (pA + ((((sal_uLong)nC-1) * nR) + nRow))) == nFree )
{ // Zeile als komplett frei markieren
*p = nGlue;
- bGlueRows = TRUE; // mindestens eine freie Zeile
+ bGlueRows = sal_True; // mindestens eine freie Zeile
}
}
// n=1: die linke obere Ecke koennte bei Beschriftung automagisch
// hinzugezogen werden
p = pA + 1;
- for ( ULONG n = 1; bGlue && n < nCR; n++, p++ )
+ for ( sal_uLong n = 1; bGlue && n < nCR; n++, p++ )
{ // ein unberuehrtes Feld heisst, dass es weder spaltenweise noch
// zeilenweise zu erreichen war, also nichts zusamenzufassen
if ( *p == nHole )
- bGlue = FALSE;
+ bGlue = false;
}
if ( bGlue )
{
@@ -276,18 +276,14 @@ void ScChartPositioner::GlueState()
else
eGlue = SC_CHARTGLUE_COLS;
if ( *pA != nOccu )
- bDummyUpperLeft = TRUE;
+ bDummyUpperLeft = sal_True;
}
else
{
eGlue = SC_CHARTGLUE_NONE;
}
-#ifdef WIN
- SvMemFree( pA );
-#else
delete [] pA;
-#endif
}
void ScChartPositioner::CheckColRowHeaders()
@@ -296,31 +292,31 @@ void ScChartPositioner::CheckColRowHeaders()
SCROW nRow1, nRow2, iRow;
SCTAB nTab1, nTab2;
- BOOL bColStrings = TRUE;
- BOOL bRowStrings = TRUE;
+ sal_Bool bColStrings = sal_True;
+ sal_Bool bRowStrings = sal_True;
GlueState();
if ( aRangeListRef->size() == 1 )
{
aRangeListRef->front()->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
if ( nCol1 > nCol2 || nRow1 > nRow2 )
- bColStrings = bRowStrings = FALSE;
+ bColStrings = bRowStrings = false;
else
{
for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++)
{
- if (pDocument->HasValueData( iCol, nRow1, nTab1 ))
- bColStrings = FALSE;
+ if (lcl_hasValueDataButNoDates( pDocument, iCol, nRow1, nTab1 ))
+ bColStrings = false;
}
for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++)
{
- if (pDocument->HasValueData( nCol1, iRow, nTab1 ))
- bRowStrings = FALSE;
+ if (lcl_hasValueDataButNoDates( pDocument, nCol1, iRow, nTab1 ))
+ bRowStrings = false;
}
}
}
else
{
- BOOL bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS);
+ sal_Bool bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS);
for ( size_t i = 0, nRanges = aRangeListRef->size();
(i < nRanges) && (bColStrings || bRowStrings);
++i
@@ -328,15 +324,15 @@ void ScChartPositioner::CheckColRowHeaders()
{
ScRange* pR = (*aRangeListRef)[i];
pR->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
- BOOL bTopRow = (nRow1 == nStartRow);
+ sal_Bool bTopRow = (nRow1 == nStartRow);
if ( bRowStrings && (bVert || nCol1 == nStartCol) )
{ // NONE oder ROWS: RowStrings in jeder Selektion moeglich
// COLS oder BOTH: nur aus der ersten Spalte
if ( nCol1 <= nCol2 )
for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++)
{
- if (pDocument->HasValueData( nCol1, iRow, nTab1 ))
- bRowStrings = FALSE;
+ if (lcl_hasValueDataButNoDates( pDocument, nCol1, iRow, nTab1 ))
+ bRowStrings = false;
}
}
if ( bColStrings && bTopRow )
@@ -344,8 +340,8 @@ void ScChartPositioner::CheckColRowHeaders()
if ( nRow1 <= nRow2 )
for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++)
{
- if (pDocument->HasValueData( iCol, nRow1, nTab1 ))
- bColStrings = FALSE;
+ if (lcl_hasValueDataButNoDates( pDocument, iCol, nRow1, nTab1 ))
+ bColStrings = false;
}
}
}
@@ -388,7 +384,7 @@ void ScChartPositioner::CreatePositionMap()
GlueState();
- BOOL bNoGlue = (eGlue == SC_CHARTGLUE_NONE);
+ sal_Bool bNoGlue = (eGlue == SC_CHARTGLUE_NONE);
Table* pCols = new Table;
Table* pNewRowTable = new Table;
ScAddress* pNewAddress = new ScAddress;
@@ -402,8 +398,8 @@ void ScChartPositioner::CreatePositionMap()
for ( nTab = nTab1; nTab <= nTab2; nTab++ )
{
// nTab im ColKey, um gleiche Col/Row in anderer Table haben zu koennen
- ULONG nInsCol = (static_cast<ULONG>(nTab) << 16) | (bNoGlue ? 0 :
- static_cast<ULONG>(nCol1));
+ sal_uLong nInsCol = (static_cast<sal_uLong>(nTab) << 16) | (bNoGlue ? 0 :
+ static_cast<sal_uLong>(nCol1));
for ( nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol )
{
if ( bNoGlue || eGlue == SC_CHARTGLUE_ROWS )
@@ -427,7 +423,7 @@ void ScChartPositioner::CreatePositionMap()
}
// bei anderer Tabelle wurde bereits neuer ColKey erzeugt,
// die Zeilen muessen fuer's Dummy fuellen gleich sein!
- ULONG nInsRow = (bNoGlue ? nNoGlueRow : nRow1);
+ sal_uLong nInsRow = (bNoGlue ? nNoGlueRow : nRow1);
for ( nRow = nRow1; nRow <= nRow2; nRow++, nInsRow++ )
{
if ( pCol->Insert( nInsRow, pNewAddress ) )
@@ -489,11 +485,11 @@ void ScChartPositioner::CreatePositionMap()
if ( bNoGlue )
{ // Luecken mit Dummies fuellen, erste Spalte ist Master
Table* pFirstCol = (Table*) pCols->First();
- ULONG nCount = pFirstCol->Count();
+ sal_uLong nCount = pFirstCol->Count();
pFirstCol->First();
- for ( ULONG n = 0; n < nCount; n++, pFirstCol->Next() )
+ for ( sal_uLong n = 0; n < nCount; n++, pFirstCol->Next() )
{
- ULONG nKey = pFirstCol->GetCurKey();
+ sal_uLong nKey = pFirstCol->GetCurKey();
pCols->First();
while ( (pCol = (Table*) pCols->Next())!=NULL )
pCol->Insert( nKey, (void*)0 ); // keine Daten
@@ -518,14 +514,11 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
ppData( new ScAddress* [ nChartCols * nChartRows ] ),
ppColHeader( new ScAddress* [ nChartCols ] ),
ppRowHeader( new ScAddress* [ nChartRows ] ),
- nCount( (ULONG) nChartCols * nChartRows ),
+ nCount( (sal_uLong) nChartCols * nChartRows ),
nColCount( nChartCols ),
nRowCount( nChartRows )
{
DBG_ASSERT( nColCount && nRowCount, "ScChartPositionMap without dimension" );
-#ifdef WIN
-#error ScChartPositionMap not implemented for 16-bit dumdums
-#endif
ScAddress* pPos;
SCCOL nCol;
@@ -557,7 +550,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
pCol = (Table*) rCols.Next();
// Daten spaltenweise und Spalten-Header
- ULONG nIndex = 0;
+ sal_uLong nIndex = 0;
for ( nCol = 0; nCol < nColCount; nCol++ )
{
if ( pCol )
@@ -591,7 +584,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
ScChartPositionMap::~ScChartPositionMap()
{
- for ( ULONG nIndex=0; nIndex < nCount; nIndex++ )
+ for ( sal_uLong nIndex=0; nIndex < nCount; nIndex++ )
{
delete ppData[nIndex];
}
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 55be05cc12b9..dd9ecebe89d5 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -62,10 +62,10 @@
DECLARE_STACK( ScChangeActionStack, ScChangeAction* )
-const USHORT nMemPoolChangeActionCellListEntry = (0x2000 - 64) / sizeof(ScChangeActionCellListEntry);
+const sal_uInt16 nMemPoolChangeActionCellListEntry = (0x2000 - 64) / sizeof(ScChangeActionCellListEntry);
IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionCellListEntry, nMemPoolChangeActionCellListEntry, nMemPoolChangeActionCellListEntry )
-const USHORT nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActionLinkEntry);
+const sal_uInt16 nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActionLinkEntry);
IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionLinkEntry, nMemPoolChangeActionLinkEntry, nMemPoolChangeActionLinkEntry )
// loaded MSB > eigenes => inkompatibel
@@ -92,7 +92,7 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScRange& rRange
}
ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRange,
- const ULONG nTempAction, const ULONG nTempRejectAction,
+ const sal_uLong nTempAction, const sal_uLong nTempRejectAction,
const ScChangeActionState eTempState, const DateTime& aTempDateTime,
const String& aTempUser, const String& aTempComment)
:
@@ -114,7 +114,7 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRa
}
ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRange,
- const ULONG nTempAction)
+ const sal_uLong nTempAction)
:
aBigRange( rRange ),
pNext( NULL ),
@@ -138,45 +138,45 @@ ScChangeAction::~ScChangeAction()
}
-BOOL ScChangeAction::IsVisible() const
+sal_Bool ScChangeAction::IsVisible() const
{
//! sequence order of execution is significant
if ( IsRejected() || GetType() == SC_CAT_DELETE_TABS || IsDeletedIn() )
- return FALSE;
+ return false;
if ( GetType() == SC_CAT_CONTENT )
return ((ScChangeActionContent*)this)->IsTopContent();
- return TRUE;
+ return sal_True;
}
-BOOL ScChangeAction::IsTouchable() const
+sal_Bool ScChangeAction::IsTouchable() const
{
//! sequence order of execution is significant
if ( IsRejected() || GetType() == SC_CAT_REJECT || IsDeletedIn() )
- return FALSE;
+ return false;
// content may reject and be touchable if on top
if ( GetType() == SC_CAT_CONTENT )
return ((ScChangeActionContent*)this)->IsTopContent();
if ( IsRejecting() )
- return FALSE;
- return TRUE;
+ return false;
+ return sal_True;
}
-BOOL ScChangeAction::IsClickable() const
+sal_Bool ScChangeAction::IsClickable() const
{
//! sequence order of execution is significant
if ( !IsVirgin() )
- return FALSE;
+ return false;
if ( IsDeletedIn() )
- return FALSE;
+ return false;
if ( GetType() == SC_CAT_CONTENT )
{
ScChangeActionContentCellType eCCT =
ScChangeActionContent::GetContentCellType(
((ScChangeActionContent*)this)->GetNewCell() );
if ( eCCT == SC_CACCT_MATREF )
- return FALSE;
+ return false;
if ( eCCT == SC_CACCT_MATORG )
{ // no Accept-Select if one of the references is in a deleted col/row
const ScChangeActionLinkEntry* pL =
@@ -185,101 +185,101 @@ BOOL ScChangeAction::IsClickable() const
{
ScChangeAction* p = (ScChangeAction*) pL->GetAction();
if ( p && p->IsDeletedIn() )
- return FALSE;
+ return false;
pL = pL->GetNext();
}
}
- return TRUE; // for Select() a content doesn't have to be touchable
+ return sal_True; // for Select() a content doesn't have to be touchable
}
return IsTouchable(); // Accept()/Reject() only on touchables
}
-BOOL ScChangeAction::IsRejectable() const
+sal_Bool ScChangeAction::IsRejectable() const
{
//! sequence order of execution is significant
if ( !IsClickable() )
- return FALSE;
+ return false;
if ( GetType() == SC_CAT_CONTENT )
{
if ( ((ScChangeActionContent*)this)->IsOldMatrixReference() )
- return FALSE;
+ return false;
ScChangeActionContent* pNextContent =
((ScChangeActionContent*)this)->GetNextContent();
if ( pNextContent == NULL )
- return TRUE; // *this is TopContent
+ return sal_True; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
}
return IsTouchable();
}
-BOOL ScChangeAction::IsInternalRejectable() const
+sal_Bool ScChangeAction::IsInternalRejectable() const
{
//! sequence order of execution is significant
if ( !IsVirgin() )
- return FALSE;
+ return false;
if ( IsDeletedIn() )
- return FALSE;
+ return false;
if ( GetType() == SC_CAT_CONTENT )
{
ScChangeActionContent* pNextContent =
((ScChangeActionContent*)this)->GetNextContent();
if ( pNextContent == NULL )
- return TRUE; // *this is TopContent
+ return sal_True; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
}
return IsTouchable();
}
-BOOL ScChangeAction::IsDialogRoot() const
+sal_Bool ScChangeAction::IsDialogRoot() const
{
return IsInternalRejectable(); // only rejectables in root
}
-BOOL ScChangeAction::IsDialogParent() const
+sal_Bool ScChangeAction::IsDialogParent() const
{
//! sequence order of execution is significant
if ( GetType() == SC_CAT_CONTENT )
{
if ( !IsDialogRoot() )
- return FALSE;
+ return false;
if ( ((ScChangeActionContent*)this)->IsMatrixOrigin() && HasDependent() )
- return TRUE;
+ return sal_True;
ScChangeActionContent* pPrevContent =
((ScChangeActionContent*)this)->GetPrevContent();
return pPrevContent && pPrevContent->IsVirgin();
}
if ( HasDependent() )
- return IsDeleteType() ? TRUE : !IsDeletedIn();
+ return IsDeleteType() ? sal_True : !IsDeletedIn();
if ( HasDeleted() )
{
if ( IsDeleteType() )
{
if ( IsDialogRoot() )
- return TRUE;
+ return sal_True;
ScChangeActionLinkEntry* pL = pLinkDeleted;
while ( pL )
{
ScChangeAction* p = pL->GetAction();
if ( p && p->GetType() != eType )
- return TRUE;
+ return sal_True;
pL = pL->GetNext();
}
}
else
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScChangeAction::IsMasterDelete() const
+sal_Bool ScChangeAction::IsMasterDelete() const
{
if ( !IsDeleteType() )
- return FALSE;
+ return false;
ScChangeActionDel* pDel = (ScChangeActionDel*) this;
return pDel->IsMultiDelete() && (pDel->IsTopDelete() || pDel->IsRejectable());
}
@@ -301,9 +301,9 @@ void ScChangeAction::RemoveAllAnyLinks()
}
-BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
+sal_Bool ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
{
- BOOL bRemoved = FALSE;
+ sal_Bool bRemoved = false;
ScChangeActionLinkEntry* pL = GetDeletedIn();
while ( pL )
{
@@ -311,7 +311,7 @@ BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
if ( pL->GetAction() == p )
{
delete pL;
- bRemoved = TRUE;
+ bRemoved = sal_True;
}
pL = pNextLink;
}
@@ -319,16 +319,16 @@ BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
}
-BOOL ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const
+sal_Bool ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const
{
ScChangeActionLinkEntry* pL = GetDeletedIn();
while ( pL )
{
if ( pL->GetAction() == p )
- return TRUE;
+ return sal_True;
pL = pL->GetNext();
}
- return FALSE;
+ return false;
}
@@ -340,7 +340,7 @@ void ScChangeAction::RemoveAllDeletedIn()
}
-BOOL ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
+sal_Bool ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
{
ScChangeAction* p;
ScChangeActionLinkEntry* pL = GetDeletedIn();
@@ -366,11 +366,11 @@ BOOL ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
{
if ( (p = pL->GetAction()) != NULL &&
(p->GetType() == eDelType || p->GetType() == eInsType) )
- return TRUE;
+ return sal_True;
pL = pL->GetNext();
}
}
- return FALSE;
+ return false;
}
@@ -410,14 +410,14 @@ DateTime ScChangeAction::GetDateTime() const
void ScChangeAction::UpdateReference( const ScChangeTrack* /* pTrack */,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDx, INT32 nDy, INT32 nDz )
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
{
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, GetBigRange() );
}
void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */,
- BOOL /* bSplitRange */, bool bWarning ) const
+ sal_Bool /* bSplitRange */, bool bWarning ) const
{
if ( IsRejecting() && bWarning )
{
@@ -460,7 +460,7 @@ void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */,
else if (pReject->HasDependent())
{
ScChangeActionTable aTable;
- pCT->GetDependents( pReject, aTable, FALSE, TRUE );
+ pCT->GetDependents( pReject, aTable, false, sal_True );
for ( const ScChangeAction* p = aTable.First(); p;
p = aTable.Next() )
{
@@ -488,10 +488,10 @@ void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */,
String ScChangeAction::GetRefString( const ScBigRange& rRange,
- ScDocument* pDoc, BOOL bFlag3D ) const
+ ScDocument* pDoc, sal_Bool bFlag3D ) const
{
String aStr;
- USHORT nFlags = ( rRange.IsValid( pDoc ) ? SCA_VALID : 0 );
+ sal_uInt16 nFlags = ( rRange.IsValid( pDoc ) ? SCA_VALID : 0 );
if ( !nFlags )
aStr = ScGlobal::GetRscString( STR_NOREF_STR );
else
@@ -537,7 +537,7 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange,
void ScChangeAction::GetRefString( String& rStr, ScDocument* pDoc,
- BOOL bFlag3D ) const
+ sal_Bool bFlag3D ) const
{
rStr = GetRefString( GetBigRange(), pDoc, bFlag3D );
}
@@ -580,7 +580,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack,
}
}
SetState( SC_CAS_REJECTED ); // vor UpdateReference fuer Move
- pTrack->UpdateReference( this, TRUE ); // LinkDeleted freigeben
+ pTrack->UpdateReference( this, sal_True ); // LinkDeleted freigeben
DBG_ASSERT( !pLinkDeleted, "ScChangeAction::RejectRestoreContents: pLinkDeleted != NULL" );
// Liste der Contents abarbeiten und loeschen
ScDocument* pDoc = pTrack->GetDocument();
@@ -599,7 +599,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack,
}
-void ScChangeAction::SetDeletedInThis( ULONG nActionNumber,
+void ScChangeAction::SetDeletedInThis( sal_uLong nActionNumber,
const ScChangeTrack* pTrack )
{
if ( nActionNumber )
@@ -612,7 +612,7 @@ void ScChangeAction::SetDeletedInThis( ULONG nActionNumber,
}
-void ScChangeAction::AddDependent( ULONG nActionNumber,
+void ScChangeAction::AddDependent( sal_uLong nActionNumber,
const ScChangeTrack* pTrack )
{
if ( nActionNumber )
@@ -658,7 +658,7 @@ ScChangeActionIns::ScChangeActionIns( const ScRange& rRange )
}
-ScChangeActionIns::ScChangeActionIns(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionIns::ScChangeActionIns(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment,
const ScChangeActionType eTypeP)
:
@@ -672,11 +672,11 @@ ScChangeActionIns::~ScChangeActionIns()
void ScChangeActionIns::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
- USHORT nWhatId;
+ sal_uInt16 nWhatId;
switch ( GetType() )
{
case SC_CAT_INSERT_COLS :
@@ -699,15 +699,15 @@ void ScChangeActionIns::GetDescription( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionIns::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionIns::Reject( ScDocument* pDoc )
{
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return false;
ScRange aRange( aBigRange.MakeRange() );
if ( !pDoc->IsBlockEditable( aRange.aStart.Tab(), aRange.aStart.Col(),
aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ) )
- return FALSE;
+ return false;
switch ( GetType() )
{
@@ -727,7 +727,7 @@ BOOL ScChangeActionIns::Reject( ScDocument* pDoc )
}
SetState( SC_CAS_REJECTED );
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
@@ -771,7 +771,7 @@ ScChangeActionDel::ScChangeActionDel( const ScRange& rRange,
}
-ScChangeActionDel::ScChangeActionDel(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionDel::ScChangeActionDel(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String &sComment,
const ScChangeActionType eTypeP, const SCsCOLROW nD, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type
:
@@ -811,40 +811,40 @@ void ScChangeActionDel::DeleteCellEntries()
}
-BOOL ScChangeActionDel::IsBaseDelete() const
+sal_Bool ScChangeActionDel::IsBaseDelete() const
{
return !GetDx() && !GetDy();
}
-BOOL ScChangeActionDel::IsTopDelete() const
+sal_Bool ScChangeActionDel::IsTopDelete() const
{
const ScChangeAction* p = GetNext();
if ( !p || p->GetType() != GetType() )
- return TRUE;
+ return sal_True;
return ((ScChangeActionDel*)p)->IsBaseDelete();
}
-BOOL ScChangeActionDel::IsMultiDelete() const
+sal_Bool ScChangeActionDel::IsMultiDelete() const
{
if ( GetDx() || GetDy() )
- return TRUE;
+ return sal_True;
const ScChangeAction* p = GetNext();
if ( !p || p->GetType() != GetType() )
- return FALSE;
+ return false;
const ScChangeActionDel* pDel = (const ScChangeActionDel*) p;
if ( (pDel->GetDx() > GetDx() || pDel->GetDy() > GetDy()) &&
pDel->GetBigRange() == aBigRange )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return false;
}
-BOOL ScChangeActionDel::IsTabDeleteCol() const
+sal_Bool ScChangeActionDel::IsTabDeleteCol() const
{
if ( GetType() != SC_CAT_DELETE_COLS )
- return FALSE;
+ return false;
const ScChangeAction* p = this;
while ( p && p->GetType() == SC_CAT_DELETE_COLS &&
!((const ScChangeActionDel*)p)->IsTopDelete() )
@@ -855,7 +855,7 @@ BOOL ScChangeActionDel::IsTabDeleteCol() const
void ScChangeActionDel::UpdateReference( const ScChangeTrack* /* pTrack */,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDxP, INT32 nDyP, INT32 nDz )
+ sal_Int32 nDxP, sal_Int32 nDyP, sal_Int32 nDz )
{
ScRefUpdate::Update( eMode, rRange, nDxP, nDyP, nDz, GetBigRange() );
if ( !IsDeletedIn() )
@@ -901,11 +901,11 @@ ScBigRange ScChangeActionDel::GetOverAllRange() const
void ScChangeActionDel::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
- USHORT nWhatId;
+ sal_uInt16 nWhatId;
switch ( GetType() )
{
case SC_CAT_DELETE_COLS :
@@ -940,12 +940,12 @@ void ScChangeActionDel::GetDescription( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionDel::Reject( ScDocument* pDoc )
{
if ( !aBigRange.IsValid( pDoc ) && GetType() != SC_CAT_DELETE_TABS )
- return FALSE;
+ return false;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if ( IsTopDelete() )
{ // den kompletten Bereich in einem Rutsch restaurieren
@@ -955,30 +955,30 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
if ( GetType() == SC_CAT_DELETE_TABS )
{ // wird Tab angehaengt?
if ( aTmpRange.aStart.Tab() > pDoc->GetMaxTableNumber() )
- bOk = FALSE;
+ bOk = false;
}
else
- bOk = FALSE;
+ bOk = false;
}
if ( bOk )
{
ScRange aRange( aTmpRange.MakeRange() );
// InDelete... fuer Formel UpdateReference in Document
pTrack->SetInDeleteRange( aRange );
- pTrack->SetInDeleteTop( TRUE );
- pTrack->SetInDeleteUndo( TRUE );
- pTrack->SetInDelete( TRUE );
+ pTrack->SetInDeleteTop( sal_True );
+ pTrack->SetInDeleteUndo( sal_True );
+ pTrack->SetInDelete( sal_True );
switch ( GetType() )
{
case SC_CAT_DELETE_COLS :
if ( !(aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL) )
{ // nur wenn nicht TabDelete
- if ( ( bOk = pDoc->CanInsertCol( aRange ) ) != FALSE )
+ if ( ( bOk = pDoc->CanInsertCol( aRange ) ) != false )
bOk = pDoc->InsertCol( aRange );
}
break;
case SC_CAT_DELETE_ROWS :
- if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != FALSE )
+ if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != false )
bOk = pDoc->InsertRow( aRange );
break;
case SC_CAT_DELETE_TABS :
@@ -986,7 +986,7 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
//2do: Tabellennamen merken?
String aName;
pDoc->CreateValidTabName( aName );
- if ( ( bOk = pDoc->ValidNewTabName( aName ) ) != FALSE )
+ if ( ( bOk = pDoc->ValidNewTabName( aName ) ) != false )
bOk = pDoc->InsertTab( aRange.aStart.Tab(), aName );
}
break;
@@ -995,13 +995,13 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
// added to avoid warnings
}
}
- pTrack->SetInDelete( FALSE );
- pTrack->SetInDeleteUndo( FALSE );
+ pTrack->SetInDelete( false );
+ pTrack->SetInDeleteUndo( false );
}
if ( !bOk )
{
- pTrack->SetInDeleteTop( FALSE );
- return FALSE;
+ pTrack->SetInDeleteTop( false );
+ return false;
}
// InDeleteTop fuer UpdateReference-Undo behalten
}
@@ -1009,9 +1009,9 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
// setzt rejected und ruft UpdateReference-Undo und DeleteCellEntries
RejectRestoreContents( pTrack, GetDx(), GetDy() );
- pTrack->SetInDeleteTop( FALSE );
+ pTrack->SetInDeleteTop( false );
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
@@ -1099,7 +1099,7 @@ void ScChangeActionDel::UndoCutOffInsert()
// --- ScChangeActionMove --------------------------------------------------
-ScChangeActionMove::ScChangeActionMove(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionMove::ScChangeActionMove(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aToBigRange, const String& aUserP, const DateTime& aDateTimeP, const String &sComment,
const ScBigRange& aFromBigRange, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type
:
@@ -1134,14 +1134,14 @@ void ScChangeActionMove::DeleteCellEntries()
void ScChangeActionMove::UpdateReference( const ScChangeTrack* /* pTrack */,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDx, INT32 nDy, INT32 nDz )
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
{
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, aFromRange );
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, GetBigRange() );
}
-void ScChangeActionMove::GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const
+void ScChangeActionMove::GetDelta( sal_Int32& nDx, sal_Int32& nDy, sal_Int32& nDz ) const
{
const ScBigAddress& rToPos = GetBigRange().aStart;
const ScBigAddress& rFromPos = GetFromRange().aStart;
@@ -1152,11 +1152,11 @@ void ScChangeActionMove::GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const
void ScChangeActionMove::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
- BOOL bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() );
+ sal_Bool bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() );
String aRsc( ScGlobal::GetRscString( STR_CHANGED_MOVE ) );
@@ -1178,7 +1178,7 @@ void ScChangeActionMove::GetDescription( String& rStr, ScDocument* pDoc,
void ScChangeActionMove::GetRefString( String& rStr, ScDocument* pDoc,
- BOOL bFlag3D ) const
+ sal_Bool bFlag3D ) const
{
if ( !bFlag3D )
bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() );
@@ -1189,15 +1189,15 @@ void ScChangeActionMove::GetRefString( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionMove::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionMove::Reject( ScDocument* pDoc )
{
if ( !(aBigRange.IsValid( pDoc ) && aFromRange.IsValid( pDoc )) )
- return FALSE;
+ return false;
ScRange aToRange( aBigRange.MakeRange() );
ScRange aFrmRange( aFromRange.MakeRange() );
- BOOL bOk = pDoc->IsBlockEditable( aToRange.aStart.Tab(),
+ sal_Bool bOk = pDoc->IsBlockEditable( aToRange.aStart.Tab(),
aToRange.aStart.Col(), aToRange.aStart.Row(),
aToRange.aEnd.Col(), aToRange.aEnd.Row() );
if ( bOk )
@@ -1205,7 +1205,7 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc )
aFrmRange.aStart.Col(), aFrmRange.aStart.Row(),
aFrmRange.aEnd.Col(), aFrmRange.aEnd.Row() );
if ( !bOk )
- return FALSE;
+ return false;
pTrack->LookUpContents( aToRange, pDoc, 0, 0, 0 ); // zu movende Contents
@@ -1247,17 +1247,17 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc )
}
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
// --- ScChangeActionContent -----------------------------------------------
-const USHORT nMemPoolChangeActionContent = (0x8000 - 64) / sizeof(ScChangeActionContent);
+const sal_uInt16 nMemPoolChangeActionContent = (0x8000 - 64) / sizeof(ScChangeActionContent);
IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionContent, nMemPoolChangeActionContent, nMemPoolChangeActionContent )
-ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber,
- const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
+ const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP,
const DateTime& aDateTimeP, const String& sComment,
ScBaseCell* pTempOldCell, ScDocument* pDoc, const String& sOldValue )
@@ -1278,7 +1278,7 @@ ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber,
aOldValue = sOldValue; // set again, because SetCell removes it
}
-ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber,
+ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
ScBaseCell* pTempNewCell, const ScBigRange& aBigRangeP,
ScDocument* pDoc, const String& sNewValue )
:
@@ -1343,7 +1343,7 @@ ScChangeActionLinkEntry** ScChangeActionContent::GetDeletedInAddress()
void ScChangeActionContent::SetOldValue( const ScBaseCell* pCell,
- const ScDocument* pFromDoc, ScDocument* pToDoc, ULONG nFormat )
+ const ScDocument* pFromDoc, ScDocument* pToDoc, sal_uLong nFormat )
{
ScChangeActionContent::SetValue( aOldValue, pOldCell,
nFormat, pCell, pFromDoc, pToDoc );
@@ -1367,8 +1367,8 @@ void ScChangeActionContent::SetNewValue( const ScBaseCell* pCell,
void ScChangeActionContent::SetOldNewCells( ScBaseCell* pOldCellP,
- ULONG nOldFormat, ScBaseCell* pNewCellP,
- ULONG nNewFormat, ScDocument* pDoc )
+ sal_uLong nOldFormat, ScBaseCell* pNewCellP,
+ sal_uLong nNewFormat, ScDocument* pDoc )
{
pOldCell = pOldCellP;
pNewCell = pNewCellP;
@@ -1400,7 +1400,7 @@ void ScChangeActionContent::SetValueString( String& rValue, ScBaseCell*& pCell,
rValue.Erase();
pCell = new ScFormulaCell(
pDoc, aBigRange.aStart.MakeAddress(), rStr, formula::FormulaGrammar::GRAM_DEFAULT, formula::FormulaGrammar::CONV_OOO );
- ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE );
+ ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True );
}
else
rValue = rStr;
@@ -1432,7 +1432,7 @@ void ScChangeActionContent::GetNewString( String& rStr ) const
void ScChangeActionContent::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
@@ -1467,9 +1467,9 @@ void ScChangeActionContent::GetDescription( String& rStr, ScDocument* pDoc,
void ScChangeActionContent::GetRefString( String& rStr, ScDocument* pDoc,
- BOOL bFlag3D ) const
+ sal_Bool bFlag3D ) const
{
- USHORT nFlags = ( GetBigRange().IsValid( pDoc ) ? SCA_VALID : 0 );
+ sal_uInt16 nFlags = ( GetBigRange().IsValid( pDoc ) ? SCA_VALID : 0 );
if ( nFlags )
{
const ScBaseCell* pCell = GetNewCell();
@@ -1501,25 +1501,25 @@ void ScChangeActionContent::GetRefString( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionContent::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionContent::Reject( ScDocument* pDoc )
{
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return false;
PutOldValueToDoc( pDoc, 0, 0 );
SetState( SC_CAS_REJECTED );
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
-BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
- BOOL bOldest, Stack* pRejectActions )
+sal_Bool ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
+ sal_Bool bOldest, Stack* pRejectActions )
{
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return false;
ScChangeActionContent* pContent = this;
// accept previous contents
@@ -1574,7 +1574,7 @@ BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
else
SetState( SC_CAS_ACCEPTED );
- return TRUE;
+ return sal_True;
}
@@ -1594,7 +1594,7 @@ void ScChangeActionContent::GetStringOfCell( String& rStr,
void ScChangeActionContent::GetStringOfCell( String& rStr,
- const ScBaseCell* pCell, const ScDocument* pDoc, ULONG nFormat )
+ const ScBaseCell* pCell, const ScDocument* pDoc, sal_uLong nFormat )
{
if ( ScChangeActionContent::GetContentCellType( pCell ) )
{
@@ -1660,7 +1660,7 @@ ScChangeActionContentCellType ScChangeActionContent::GetContentCellType( const S
}
-BOOL ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell )
+sal_Bool ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell )
{
return pCell && pCell->GetCellType() == CELLTYPE_VALUE;
}
@@ -1670,12 +1670,12 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
const ScAddress& rPos, const ScBaseCell* pOrgCell,
const ScDocument* pFromDoc, ScDocument* pToDoc )
{
- ULONG nFormat = NeedsNumberFormat( pOrgCell ) ? pFromDoc->GetNumberFormat( rPos ) : 0;
+ sal_uLong nFormat = NeedsNumberFormat( pOrgCell ) ? pFromDoc->GetNumberFormat( rPos ) : 0;
SetValue( rStr, pCell, nFormat, pOrgCell, pFromDoc, pToDoc );
}
void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
- ULONG nFormat, const ScBaseCell* pOrgCell,
+ sal_uLong nFormat, const ScBaseCell* pOrgCell,
const ScDocument* pFromDoc, ScDocument* pToDoc )
{
rStr.Erase();
@@ -1694,7 +1694,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
}
break;
case CELLTYPE_FORMULA :
- ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE );
+ ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True );
break;
default:
{
@@ -1708,7 +1708,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell,
- ULONG nFormat, const ScDocument* pDoc )
+ sal_uLong nFormat, const ScDocument* pDoc )
{
rStr.Erase();
if ( pCell )
@@ -1723,7 +1723,7 @@ void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell,
}
break;
case CELLTYPE_FORMULA :
- ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE );
+ ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True );
break;
default:
{
@@ -1862,19 +1862,19 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
{
rRef1.nCol = SCCOL_MAX;
rRef1.nRelCol = SCCOL_MAX;
- rRef1.SetColDeleted( TRUE );
+ rRef1.SetColDeleted( sal_True );
}
if ( rPos.Row() < 0 || MAXROW < rPos.Row() )
{
rRef1.nRow = SCROW_MAX;
rRef1.nRelRow = SCROW_MAX;
- rRef1.SetRowDeleted( TRUE );
+ rRef1.SetRowDeleted( sal_True );
}
if ( rPos.Tab() < 0 || MAXTAB < rPos.Tab() )
{
rRef1.nTab = SCTAB_MAX;
rRef1.nRelTab = SCTAB_MAX;
- rRef1.SetTabDeleted( TRUE );
+ rRef1.SetTabDeleted( sal_True );
}
if ( rTok.GetType() == formula::svDoubleRef )
{
@@ -1883,19 +1883,19 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
{
rRef2.nCol = SCCOL_MAX;
rRef2.nRelCol = SCCOL_MAX;
- rRef2.SetColDeleted( TRUE );
+ rRef2.SetColDeleted( sal_True );
}
if ( rPos.Row() < 0 || MAXROW < rPos.Row() )
{
rRef2.nRow = SCROW_MAX;
rRef2.nRelRow = SCROW_MAX;
- rRef2.SetRowDeleted( TRUE );
+ rRef2.SetRowDeleted( sal_True );
}
if ( rPos.Tab() < 0 || MAXTAB < rPos.Tab() )
{
rRef2.nTab = SCTAB_MAX;
rRef2.nRelTab = SCTAB_MAX;
- rRef2.SetTabDeleted( TRUE );
+ rRef2.SetTabDeleted( sal_True );
}
}
}
@@ -1903,7 +1903,7 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDx, INT32 nDy, INT32 nDz )
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
{
SCSIZE nOldSlot = ScChangeTrack::ComputeContentSlot( aBigRange.aStart.Row() );
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, aBigRange );
@@ -1917,8 +1917,8 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
if ( pTrack->IsInDelete() && !pTrack->IsInDeleteTop() )
return ; // Formeln nur kompletten Bereich updaten
- BOOL bOldFormula = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_FORMULA );
- BOOL bNewFormula = ( pNewCell && pNewCell->GetCellType() == CELLTYPE_FORMULA );
+ sal_Bool bOldFormula = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_FORMULA );
+ sal_Bool bNewFormula = ( pNewCell && pNewCell->GetCellType() == CELLTYPE_FORMULA );
if ( bOldFormula || bNewFormula )
{ // via ScFormulaCell UpdateReference anpassen (dort)
if ( pTrack->IsInDelete() )
@@ -2022,7 +2022,7 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
// --- ScChangeActionReject ------------------------------------------------
-ScChangeActionReject::ScChangeActionReject(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionReject::ScChangeActionReject(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment)
:
ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment)
@@ -2095,13 +2095,13 @@ void ScChangeTrack::Init()
nLastMerge = 0;
eMergeState = SC_CTMS_NONE;
nLoadedFileFormatVersion = SC_CHGTRACK_FILEFORMAT;
- bLoadSave = FALSE;
- bInDelete = FALSE;
- bInDeleteTop = FALSE;
- bInDeleteUndo = FALSE;
- bInPasteCut = FALSE;
- bUseFixDateTime = FALSE;
- bTime100thSeconds = TRUE;
+ bLoadSave = false;
+ bInDelete = false;
+ bInDeleteTop = false;
+ bInDeleteUndo = false;
+ bInPasteCut = false;
+ bUseFixDateTime = false;
+ bTime100thSeconds = sal_True;
const SvtUserOptions& rUserOpt = SC_MOD()->GetUserOptions();
aUser = rUserOpt.GetFirstName();
@@ -2168,7 +2168,7 @@ void ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uI
if ( !pDoc->IsInDtorClear() )
{
const SvtUserOptions& rUserOptions = SC_MOD()->GetUserOptions();
- USHORT nOldCount = aUserCollection.GetCount();
+ sal_uInt16 nOldCount = aUserCollection.GetCount();
String aStr( rUserOptions.GetFirstName() );
aStr += ' ';
@@ -2203,7 +2203,7 @@ void ScChangeTrack::SetUser( const String& rUser )
void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType,
- ULONG nStartAction )
+ sal_uLong nStartAction )
{
if ( aModifiedLink.IsSet() )
{
@@ -2216,7 +2216,7 @@ void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType,
}
-void ScChangeTrack::EndBlockModify( ULONG nEndAction )
+void ScChangeTrack::EndBlockModify( sal_uLong nEndAction )
{
if ( aModifiedLink.IsSet() )
{
@@ -2234,12 +2234,12 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction )
}
if ( !pBlockModifyMsg )
{
- BOOL bNew = FALSE;
+ sal_Bool bNew = false;
ScChangeTrackMsgInfo* pMsg;
while ( ( pMsg = aMsgStackFinal.Pop() ) != NULL )
{
aMsgQueue.Put( pMsg );
- bNew = TRUE;
+ bNew = sal_True;
}
if ( bNew )
aModifiedLink.Call( this );
@@ -2249,7 +2249,7 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction )
void ScChangeTrack::NotifyModified( ScChangeTrackMsgType eMsgType,
- ULONG nStartAction, ULONG nEndAction )
+ sal_uLong nStartAction, sal_uLong nEndAction )
{
if ( aModifiedLink.IsSet() )
{
@@ -2336,7 +2336,7 @@ void ScChangeTrack::AppendLoaded( ScChangeAction* pAppend )
}
-void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
+void ScChangeTrack::Append( ScChangeAction* pAppend, sal_uLong nAction )
{
if ( nActionMax < nAction )
nActionMax = nAction;
@@ -2350,7 +2350,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
// UpdateReference auch wenn pLast==NULL, weil pAppend ein Delete sein
// kann, dass DelContents generiert haben kann
if ( pAppend->IsInsertType() && !pAppend->IsRejecting() )
- UpdateReference( pAppend, FALSE );
+ UpdateReference( pAppend, false );
if ( !pLast )
pFirst = pLast = pAppend;
else
@@ -2365,7 +2365,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
// ToRange nicht deleten.
if ( !pAppend->IsInsertType() &&
!(pAppend->GetType() == SC_CAT_MOVE && pAppend->IsRejecting()) )
- UpdateReference( pAppend, FALSE );
+ UpdateReference( pAppend, false );
MasterLinks( pAppend );
if ( aModifiedLink.IsSet() )
@@ -2376,7 +2376,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
ScChangeActionContent* pContent = (ScChangeActionContent*) pAppend;
if ( ( pContent = pContent->GetPrevContent() ) != NULL )
{
- ULONG nMod = pContent->GetActionNumber();
+ sal_uLong nMod = pContent->GetActionNumber();
NotifyModified( SC_CTM_CHANGE, nMod, nMod );
}
}
@@ -2394,7 +2394,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend )
void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
- ScDocument* pRefDoc, ULONG& nStartAction, ULONG& nEndAction, SCsTAB nDz )
+ ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction, SCsTAB nDz )
{
nStartAction = GetActionMax() + 1;
AppendDeleteRange( rRange, pRefDoc, nDz, 0 );
@@ -2403,7 +2403,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
- ScDocument* pRefDoc, SCsTAB nDz, ULONG nRejectingInsert )
+ ScDocument* pRefDoc, SCsTAB nDz, sal_uLong nRejectingInsert )
{
SetInDeleteRange( rRange );
StartBlockModify( SC_CTM_APPEND, GetActionMax() + 1 );
@@ -2429,7 +2429,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
aRange.aStart.SetCol( nCol );
aRange.aEnd.SetCol( nCol );
if ( nCol == nCol2 )
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
AppendOneDeleteRange( aRange, pRefDoc, nCol-nCol1, 0,
nTab-nTab1 + nDz, nRejectingInsert );
}
@@ -2445,7 +2445,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
aRange.aStart.SetRow( nRow );
aRange.aEnd.SetRow( nRow );
if ( nRow == nRow2 )
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
AppendOneDeleteRange( aRange, pRefDoc, 0, nRow-nRow1,
0, nRejectingInsert );
}
@@ -2459,7 +2459,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
aRange.aStart.SetCol( nCol );
aRange.aEnd.SetCol( nCol );
if ( nCol == nCol2 )
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
AppendOneDeleteRange( aRange, pRefDoc, nCol-nCol1, 0,
0, nRejectingInsert );
}
@@ -2468,7 +2468,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
{
OSL_FAIL( "ScChangeTrack::AppendDeleteRange: Block not supported!" );
}
- SetInDeleteTop( FALSE );
+ SetInDeleteTop( false );
}
}
EndBlockModify( GetActionMax() );
@@ -2477,7 +2477,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
void ScChangeTrack::AppendOneDeleteRange( const ScRange& rOrgRange,
ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ULONG nRejectingInsert )
+ sal_uLong nRejectingInsert )
{
ScRange aTrackRange( rOrgRange );
if ( nDx )
@@ -2551,7 +2551,7 @@ void ScChangeTrack::AppendMove( const ScRange& rFromRange,
}
-BOOL ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell,
+sal_Bool ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell,
const ScBaseCell* pNewCell )
{
SCCOL nC1, nC2;
@@ -2568,7 +2568,7 @@ BOOL ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell,
}
void ScChangeTrack::AppendContent( const ScAddress& rPos,
- const ScBaseCell* pOldCell, ULONG nOldFormat, ScDocument* pRefDoc )
+ const ScBaseCell* pOldCell, sal_uLong nOldFormat, ScDocument* pRefDoc )
{
if ( !pRefDoc )
pRefDoc = pDoc;
@@ -2642,7 +2642,7 @@ void ScChangeTrack::SetLastCutMoveRange( const ScRange& rRange,
void ScChangeTrack::AppendContentRange( const ScRange& rRange,
- ScDocument* pRefDoc, ULONG& nStartAction, ULONG& nEndAction,
+ ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction,
ScChangeActionClipMode eClipMode )
{
if ( eClipMode == SC_CACM_CUT )
@@ -2658,11 +2658,11 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
SCROW nRow2;
SCTAB nTab2;
rRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
- BOOL bDoContents;
+ sal_Bool bDoContents;
if ( eClipMode == SC_CACM_PASTE && HasLastCut() )
{
- bDoContents = FALSE;
- SetInPasteCut( TRUE );
+ bDoContents = false;
+ SetInPasteCut( sal_True );
// Paste und Cut abstimmen, Paste kann groesserer Range sein
ScRange aRange( rRange );
ScBigRange& r = pLastCutMove->GetBigRange();
@@ -2671,21 +2671,21 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
{
aRange.aEnd.SetCol( aRange.aStart.Col() + nTmpCol );
nCol1 += nTmpCol + 1;
- bDoContents = TRUE;
+ bDoContents = sal_True;
}
SCROW nTmpRow;
if ( (nTmpRow = (SCROW) (r.aEnd.Row() - r.aStart.Row())) != (nRow2 - nRow1) )
{
aRange.aEnd.SetRow( aRange.aStart.Row() + nTmpRow );
nRow1 += nTmpRow + 1;
- bDoContents = TRUE;
+ bDoContents = sal_True;
}
SCTAB nTmpTab;
if ( (nTmpTab = (SCTAB) (r.aEnd.Tab() - r.aStart.Tab())) != (nTab2 - nTab1) )
{
aRange.aEnd.SetTab( aRange.aStart.Tab() + nTmpTab );
nTab1 += nTmpTab + 1;
- bDoContents = TRUE;
+ bDoContents = sal_True;
}
r = aRange;
Undo( nStartLastCut, nEndLastCut ); // hier werden sich die Cuts gemerkt
@@ -2699,11 +2699,11 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
Append( pLastCutMove );
pLastCutMove = NULL;
ResetLastCut();
- SetInPasteCut( FALSE );
+ SetInPasteCut( false );
}
else
{
- bDoContents = TRUE;
+ bDoContents = sal_True;
nStartAction = GetActionMax() + 1;
StartBlockModify( SC_CTM_APPEND, nStartAction );
}
@@ -2735,7 +2735,7 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument* pRefDoc,
- ULONG& nStartAction, ULONG& nEndAction )
+ sal_uLong& nStartAction, sal_uLong& nEndAction )
{
ScDocumentIterator aIter( pRefDoc, 0, MAXTAB );
if ( aIter.GetFirst() )
@@ -2763,7 +2763,7 @@ void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument* pRefDoc,
ScChangeActionContent* ScChangeTrack::AppendContentOnTheFly(
const ScAddress& rPos, ScBaseCell* pOldCell, ScBaseCell* pNewCell,
- ULONG nOldFormat, ULONG nNewFormat )
+ sal_uLong nOldFormat, sal_uLong nNewFormat )
{
ScRange aRange( rPos );
ScChangeActionContent* pAct = new ScChangeActionContent( aRange );
@@ -2823,7 +2823,7 @@ ScChangeActionContent* ScChangeTrack::GenerateDelContent(
void ScChangeTrack::DeleteGeneratedDelContent( ScChangeActionContent* pContent )
{
- ULONG nAct = pContent->GetActionNumber();
+ sal_uLong nAct = pContent->GetActionNumber();
aGeneratedTable.Remove( nAct );
if ( pFirstGeneratedDelContent == pContent )
pFirstGeneratedDelContent = (ScChangeActionContent*) pContent->pNext;
@@ -2864,7 +2864,7 @@ void ScChangeTrack::AddDependentWithNotify( ScChangeAction* pParent,
pDependent->AddLink( pParent, pLink );
if ( aModifiedLink.IsSet() )
{
- ULONG nMod = pParent->GetActionNumber();
+ sal_uLong nMod = pParent->GetActionNumber();
NotifyModified( SC_CTM_PARENT, nMod, nMod );
}
}
@@ -2924,10 +2924,10 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
// also genau richtig
const ScBigRange& rRange = pAct->GetBigRange();
- BOOL bActNoInsert = !pAct->IsInsertType();
- BOOL bActColDel = ( eActType == SC_CAT_DELETE_COLS );
- BOOL bActRowDel = ( eActType == SC_CAT_DELETE_ROWS );
- BOOL bActTabDel = ( eActType == SC_CAT_DELETE_TABS );
+ sal_Bool bActNoInsert = !pAct->IsInsertType();
+ sal_Bool bActColDel = ( eActType == SC_CAT_DELETE_COLS );
+ sal_Bool bActRowDel = ( eActType == SC_CAT_DELETE_ROWS );
+ sal_Bool bActTabDel = ( eActType == SC_CAT_DELETE_TABS );
if ( pLinkInsertCol && (eActType == SC_CAT_INSERT_COLS ||
(bActNoInsert && !bActRowDel && !bActTabDel)) )
@@ -3021,7 +3021,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
void ScChangeTrack::Remove( ScChangeAction* pRemove )
{
// aus Track ausklinken
- ULONG nAct = pRemove->GetActionNumber();
+ sal_uLong nAct = pRemove->GetActionNumber();
aTable.Remove( nAct );
if ( nAct == nActionMax )
--nActionMax;
@@ -3050,7 +3050,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
ScChangeActionContent* pContent = (ScChangeActionContent*) pRemove;
if ( ( pContent = pContent->GetPrevContent() ) != NULL )
{
- ULONG nMod = pContent->GetActionNumber();
+ sal_uLong nMod = pContent->GetActionNumber();
NotifyModified( SC_CTM_CHANGE, nMod, nMod );
}
}
@@ -3070,7 +3070,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
}
-void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
+void ScChangeTrack::Undo( sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge )
{
// #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
if ( bMerge )
@@ -3088,7 +3088,7 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
!IsInPasteCut() )
ResetLastCut();
StartBlockModify( SC_CTM_REMOVE, nStartAction );
- for ( ULONG j = nEndAction; j >= nStartAction; --j )
+ for ( sal_uLong j = nEndAction; j >= nStartAction; --j )
{ // rueckwaerts um evtl. nActionMax zu recyclen und schnelleren
// Zugriff via pLast, Deletes in richtiger Reihenfolge
ScChangeAction* pAct = ( (j == nActionMax && pLast &&
@@ -3100,13 +3100,13 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
if ( j == nEndAction || (pAct != pLast &&
((ScChangeActionDel*)pAct)->IsTopDelete()) )
{
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
SetInDeleteRange( ((ScChangeActionDel*)pAct)->
GetOverAllRange().MakeRange() );
}
}
- UpdateReference( pAct, TRUE );
- SetInDeleteTop( FALSE );
+ UpdateReference( pAct, sal_True );
+ SetInDeleteTop( false );
Remove( pAct );
if ( IsInPasteCut() )
aPasteCutTable.Insert( pAct->GetActionNumber(), pAct );
@@ -3115,14 +3115,14 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
if ( j == nStartAction && pAct->GetType() == SC_CAT_MOVE )
{
ScChangeActionMove* pMove = (ScChangeActionMove*) pAct;
- ULONG nStart = pMove->GetStartLastCut();
- ULONG nEnd = pMove->GetEndLastCut();
+ sal_uLong nStart = pMove->GetStartLastCut();
+ sal_uLong nEnd = pMove->GetEndLastCut();
if ( nStart && nStart <= nEnd )
{ // LastCut wiederherstellen
//! Links vor Cut-Append aufloesen
pMove->RemoveAllLinks();
StartBlockModify( SC_CTM_APPEND, nStart );
- for ( ULONG nCut = nStart; nCut <= nEnd; nCut++ )
+ for ( sal_uLong nCut = nStart; nCut <= nEnd; nCut++ )
{
ScChangeAction* pCut = aPasteCutTable.Remove( nCut );
if ( pCut )
@@ -3162,22 +3162,22 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
}
-BOOL ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, ULONG nFirstMerge )
+sal_Bool ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, sal_uLong nFirstMerge )
{
if ( rAction.IsRejected() )
- return TRUE; // da kommt noch eine passende Reject-Action
+ return sal_True; // da kommt noch eine passende Reject-Action
if ( rAction.IsRejecting() && rAction.GetRejectAction() >= nFirstMerge )
- return TRUE; // da ist sie
+ return sal_True; // da ist sie
- return FALSE; // alles andere
+ return false; // alles andere
}
void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
{
SetMergeState( SC_CTMS_PREPARE );
- ULONG nFirstMerge = pFirstMerge->GetActionNumber();
+ sal_uLong nFirstMerge = pFirstMerge->GetActionNumber();
ScChangeAction* pAct = GetLast();
if ( pAct )
{
@@ -3191,13 +3191,13 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
{
if ( ((ScChangeActionDel*)pAct)->IsTopDelete() )
{
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
SetInDeleteRange( ((ScChangeActionDel*)pAct)->
GetOverAllRange().MakeRange() );
}
}
- UpdateReference( pAct, TRUE );
- SetInDeleteTop( FALSE );
+ UpdateReference( pAct, sal_True );
+ SetInDeleteTop( false );
pAct->DeleteCellEntries(); // sonst GPF bei Track Clear()
}
pAct = ( pAct == pFirstMerge ? NULL : pAct->GetPrev() );
@@ -3207,7 +3207,7 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
}
-void ScChangeTrack::MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bShared )
+void ScChangeTrack::MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, bool bShared )
{
// #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
if ( bShared || !ScChangeTrack::MergeIgnore( *pAct, nFirstMerge ) )
@@ -3217,45 +3217,45 @@ void ScChangeTrack::MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bSha
{
if ( ((ScChangeActionDel*)pAct)->IsTopDelete() )
{
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
SetInDeleteRange( ((ScChangeActionDel*)pAct)->
GetOverAllRange().MakeRange() );
}
}
- UpdateReference( pAct, FALSE );
- SetInDeleteTop( FALSE );
+ UpdateReference( pAct, false );
+ SetInDeleteTop( false );
SetMergeState( SC_CTMS_OTHER ); //! nachfolgende per default MergeOther
}
}
-void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo )
+void ScChangeTrack::UpdateReference( ScChangeAction* pAct, sal_Bool bUndo )
{
ScChangeActionType eActType = pAct->GetType();
if ( eActType == SC_CAT_CONTENT || eActType == SC_CAT_REJECT )
return ;
//! Formelzellen haengen nicht im Dokument
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE );
- BOOL bOldNoListening = pDoc->GetNoListening();
- pDoc->SetNoListening( TRUE );
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false );
+ sal_Bool bOldNoListening = pDoc->GetNoListening();
+ pDoc->SetNoListening( sal_True );
//! Formelzellen ExpandRefs synchronisiert zu denen im Dokument
- BOOL bOldExpandRefs = pDoc->IsExpandRefs();
+ sal_Bool bOldExpandRefs = pDoc->IsExpandRefs();
if ( (!bUndo && pAct->IsInsertType()) || (bUndo && pAct->IsDeleteType()) )
pDoc->SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() );
if ( pAct->IsDeleteType() )
{
SetInDeleteUndo( bUndo );
- SetInDelete( TRUE );
+ SetInDelete( sal_True );
}
else if ( GetMergeState() == SC_CTMS_OWN )
{
// Referenzen von Formelzellen wiederherstellen,
// vorheriges MergePrepare war bei einem Insert wie ein Delete
if ( pAct->IsInsertType() )
- SetInDeleteUndo( TRUE );
+ SetInDeleteUndo( sal_True );
}
//! erst die generated, als waeren sie vorher getrackt worden
@@ -3264,8 +3264,8 @@ void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo )
bUndo );
UpdateReference( &pFirst, pAct, bUndo );
- SetInDelete( FALSE );
- SetInDeleteUndo( FALSE );
+ SetInDelete( false );
+ SetInDeleteUndo( false );
pDoc->SetExpandRefs( bOldExpandRefs );
pDoc->SetNoListening( bOldNoListening );
@@ -3274,18 +3274,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo )
void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
- ScChangeAction* pAct, BOOL bUndo )
+ ScChangeAction* pAct, sal_Bool bUndo )
{
ScChangeActionType eActType = pAct->GetType();
- BOOL bGeneratedDelContents =
+ sal_Bool bGeneratedDelContents =
( ppFirstAction == (ScChangeAction**)&pFirstGeneratedDelContent );
const ScBigRange& rOrgRange = pAct->GetBigRange();
ScBigRange aRange( rOrgRange );
ScBigRange aDelRange( rOrgRange );
- INT32 nDx, nDy, nDz;
+ sal_Int32 nDx, nDy, nDz;
nDx = nDy = nDz = 0;
UpdateRefMode eMode = URM_INSDEL;
- BOOL bDel = FALSE;
+ sal_Bool bDel = false;
switch ( eActType )
{
case SC_CAT_INSERT_COLS :
@@ -3304,19 +3304,19 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
aRange.aEnd.SetCol( nInt32Max );
nDx = -(rOrgRange.aEnd.Col() - rOrgRange.aStart.Col() + 1);
aDelRange.aEnd.SetCol( aDelRange.aStart.Col() - nDx - 1 );
- bDel = TRUE;
+ bDel = sal_True;
break;
case SC_CAT_DELETE_ROWS :
aRange.aEnd.SetRow( nInt32Max );
nDy = -(rOrgRange.aEnd.Row() - rOrgRange.aStart.Row() + 1);
aDelRange.aEnd.SetRow( aDelRange.aStart.Row() - nDy - 1 );
- bDel = TRUE;
+ bDel = sal_True;
break;
case SC_CAT_DELETE_TABS :
aRange.aEnd.SetTab( nInt32Max );
nDz = -(rOrgRange.aEnd.Tab() - rOrgRange.aStart.Tab() + 1);
aDelRange.aEnd.SetTab( aDelRange.aStart.Tab() - nDz - 1 );
- bDel = TRUE;
+ bDel = sal_True;
break;
case SC_CAT_MOVE :
eMode = URM_MOVE;
@@ -3358,7 +3358,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
{
if ( p == pAct )
continue; // for
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( GetMergeState() == SC_CTMS_OTHER &&
p->GetActionNumber() <= GetLastMerge() )
{ // Delete in mergendem Dokument, Action im zu mergenden
@@ -3368,7 +3368,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// das Insert nicht schneidet.
if ( !aDelRange.Intersects( p->GetBigRange() ) )
p->UpdateReference( this, eMode, aRange, nDx, nDy, nDz );
- bUpdate = FALSE;
+ bUpdate = false;
}
else if ( p->GetType() == SC_CAT_CONTENT &&
p->IsDeletedInDelType( eInsType ) )
@@ -3376,7 +3376,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// Nicht anpassen, wenn dieses Delete in dem
// Insert-"Delete" sein wuerde (ist nur verschoben).
if ( aDelRange.In( p->GetBigRange().aStart ) )
- bUpdate = FALSE;
+ bUpdate = false;
else
{
const ScChangeActionLinkEntry* pLink = p->GetDeletedIn();
@@ -3385,7 +3385,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
const ScChangeAction* pDel = pLink->GetAction();
if ( pDel && pDel->GetType() == eInsType &&
pDel->GetBigRange().In( aDelRange ) )
- bUpdate = FALSE;
+ bUpdate = false;
pLink = pLink->GetNext();
}
}
@@ -3406,7 +3406,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
if ( bGeneratedDelContents )
pActDel->AddContent( (ScChangeActionContent*) p );
}
- bUpdate = FALSE;
+ bUpdate = false;
}
else
{
@@ -3571,7 +3571,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
{
if ( p == pAct )
continue; // for
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( aDelRange.In( p->GetBigRange() ) )
{
// #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
@@ -3596,18 +3596,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// geloescht wird in DeleteCellEntries
}
}
- bUpdate = FALSE;
+ bUpdate = false;
}
else if ( eActType != SC_CAT_DELETE_TABS &&
p->IsDeletedInDelType( SC_CAT_DELETE_TABS ) )
{ // in geloeschten Tabellen nicht updaten,
// ausser wenn Tabelle verschoben wird
- bUpdate = FALSE;
+ bUpdate = false;
}
if ( p->GetType() == eActType && pActDel->IsDeletedIn( p ) )
{
pActDel->RemoveDeletedIn( p ); // "druntergerutscht"
- bUpdate = TRUE;
+ bUpdate = sal_True;
}
}
if ( bUpdate )
@@ -3623,7 +3623,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
else if ( eActType == SC_CAT_MOVE )
{
ScChangeActionMove* pActMove = (ScChangeActionMove*) pAct;
- BOOL bLastCutMove = ( pActMove == pLastCutMove );
+ sal_Bool bLastCutMove = ( pActMove == pLastCutMove );
const ScBigRange& rTo = pActMove->GetBigRange();
const ScBigRange& rFrom = pActMove->GetFromRange();
if ( !bUndo )
@@ -3673,7 +3673,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
}
else
{ // Undo Move
- BOOL bActRejected = pActMove->IsRejected();
+ sal_Bool bActRejected = pActMove->IsRejected();
for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() )
{
if ( p == pAct )
@@ -3832,13 +3832,13 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
void ScChangeTrack::GetDependents( ScChangeAction* pAct,
- ScChangeActionTable& rTable, BOOL bListMasterDelete, BOOL bAllFlat ) const
+ ScChangeActionTable& rTable, sal_Bool bListMasterDelete, sal_Bool bAllFlat ) const
{
//! bAllFlat==TRUE: intern aus Accept oder Reject gerufen,
//! => Generated werden nicht aufgenommen
- BOOL bIsDelete = pAct->IsDeleteType();
- BOOL bIsMasterDelete = ( bListMasterDelete && pAct->IsMasterDelete() );
+ sal_Bool bIsDelete = pAct->IsDeleteType();
+ sal_Bool bIsMasterDelete = ( bListMasterDelete && pAct->IsMasterDelete() );
const ScChangeAction* pCur = pAct;
ScChangeActionStack* pStack = new ScChangeActionStack;
@@ -3854,7 +3854,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( bAllFlat )
{
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDependent() )
pStack->Push( p );
@@ -3901,7 +3901,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
if ( bAllFlat )
{
// nur ein TopContent einer Kette ist in LinkDeleted
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDeleted() ||
p->GetType() == SC_CAT_CONTENT )
@@ -3950,7 +3950,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( bAllFlat )
{
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDependent() || p->HasDeleted() )
pStack->Push( p );
@@ -3994,7 +3994,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( bAllFlat )
{
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDependent() )
pStack->Push( p );
@@ -4020,10 +4020,10 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
}
-BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest )
+sal_Bool ScChangeTrack::SelectContent( ScChangeAction* pAct, sal_Bool bOldest )
{
if ( pAct->GetType() != SC_CAT_CONTENT )
- return FALSE;
+ return false;
ScChangeActionContent* pContent = (ScChangeActionContent*) pAct;
if ( bOldest )
@@ -4036,7 +4036,7 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest )
}
if ( !pContent->IsClickable() )
- return FALSE;
+ return false;
ScBigRange aBigRange( pContent->GetBigRange() );
const ScBaseCell* pCell = (bOldest ? pContent->GetOldCell() :
@@ -4051,16 +4051,16 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest )
}
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return false;
ScRange aRange( aBigRange.MakeRange() );
if ( !pDoc->IsBlockEditable( aRange.aStart.Tab(), aRange.aStart.Col(),
aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ) )
- return FALSE;
+ return false;
if ( pContent->HasDependent() )
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
Stack aRejectActions;
const ScChangeActionLinkEntry* pL = pContent->GetFirstDependentEntry();
while ( pL )
@@ -4108,28 +4108,28 @@ void ScChangeTrack::AcceptAll()
}
-BOOL ScChangeTrack::Accept( ScChangeAction* pAct )
+sal_Bool ScChangeTrack::Accept( ScChangeAction* pAct )
{
if ( !pAct->IsClickable() )
- return FALSE;
+ return false;
if ( pAct->IsDeleteType() || pAct->GetType() == SC_CAT_CONTENT )
{
ScChangeActionTable aActionTable;
- GetDependents( pAct, aActionTable, FALSE, TRUE );
+ GetDependents( pAct, aActionTable, false, sal_True );
for ( ScChangeAction* p = aActionTable.First(); p; p = aActionTable.Next() )
{
p->Accept();
}
}
pAct->Accept();
- return TRUE;
+ return sal_True;
}
-BOOL ScChangeTrack::RejectAll()
+sal_Bool ScChangeTrack::RejectAll()
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for ( ScChangeAction* p = GetLast(); p && bOk; p = p->GetPrev() )
{ //! rueckwaerts, weil abhaengige hinten und RejectActions angehaengt
if ( p->IsInternalRejectable() )
@@ -4139,7 +4139,7 @@ BOOL ScChangeTrack::RejectAll()
}
-BOOL ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared )
+sal_Bool ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared )
{
// #i100895# When collaboration changes are reversed, it must be possible
// to reject a deleted row above another deleted row.
@@ -4147,29 +4147,29 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared )
pAct->RemoveAllDeletedIn();
if ( !pAct->IsRejectable() )
- return FALSE;
+ return false;
ScChangeActionTable* pTable = NULL;
if ( pAct->HasDependent() )
{
pTable = new ScChangeActionTable;
- GetDependents( pAct, *pTable, FALSE, TRUE );
+ GetDependents( pAct, *pTable, false, sal_True );
}
- BOOL bRejected = Reject( pAct, pTable, FALSE );
+ sal_Bool bRejected = Reject( pAct, pTable, false );
if ( pTable )
delete pTable;
return bRejected;
}
-BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
- BOOL bRecursion )
+sal_Bool ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
+ sal_Bool bRecursion )
{
if ( !pAct->IsInternalRejectable() )
- return FALSE;
+ return false;
- BOOL bOk = TRUE;
- BOOL bRejected = FALSE;
+ sal_Bool bOk = sal_True;
+ sal_Bool bRejected = false;
if ( pAct->IsInsertType() )
{
if ( pAct->HasDependent() && !bRecursion )
@@ -4183,10 +4183,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
else if ( p->IsDeleteType() )
p->Accept(); // geloeschtes ins Nirvana
else
- bOk = Reject( p, NULL, TRUE ); //! rekursiv
+ bOk = Reject( p, NULL, sal_True ); //! rekursiv
}
}
- if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE )
+ if ( bOk && (bRejected = pAct->Reject( pDoc )) != false )
{
// pRefDoc NULL := geloeschte Zellen nicht speichern
AppendDeleteRange( pAct->GetBigRange().MakeRange(), NULL, (short) 0,
@@ -4197,11 +4197,11 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
{
DBG_ASSERT( !pTable, "ScChangeTrack::Reject: Delete mit Table" );
ScBigRange aDelRange;
- ULONG nRejectAction = pAct->GetActionNumber();
- BOOL bTabDel, bTabDelOk;
+ sal_uLong nRejectAction = pAct->GetActionNumber();
+ sal_Bool bTabDel, bTabDelOk;
if ( pAct->GetType() == SC_CAT_DELETE_TABS )
{
- bTabDel = TRUE;
+ bTabDel = sal_True;
aDelRange = pAct->GetBigRange();
bOk = bTabDelOk = pAct->Reject( pDoc );
if ( bOk )
@@ -4211,14 +4211,14 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
}
else
- bTabDel = bTabDelOk = FALSE;
+ bTabDel = bTabDelOk = false;
ScChangeActionDel* pDel = (ScChangeActionDel*) pAct;
if ( bOk )
{
aDelRange = pDel->GetOverAllRange();
bOk = aDelRange.IsValid( pDoc );
}
- BOOL bOneOk = FALSE;
+ sal_Bool bOneOk = false;
if ( bOk )
{
ScChangeActionType eActType = pAct->GetType();
@@ -4239,7 +4239,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
}
ScChangeAction* p = pAct;
- BOOL bLoop = TRUE;
+ sal_Bool bLoop = sal_True;
do
{
pDel = (ScChangeActionDel*) p;
@@ -4266,10 +4266,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
}
else
- bOneOk = TRUE;
+ bOneOk = sal_True;
}
if ( pDel->IsBaseDelete() )
- bLoop = FALSE;
+ bLoop = false;
else
p = p->GetPrev();
} while ( bOk && bLoop && p && p->GetType() == eActType &&
@@ -4293,10 +4293,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
DBG_ASSERT( pTable, "ScChangeTrack::Reject: Move ohne Table" );
for ( ScChangeAction* p = pTable->Last(); p && bOk; p = pTable->Prev() )
{
- bOk = Reject( p, NULL, TRUE ); //! rekursiv
+ bOk = Reject( p, NULL, sal_True ); //! rekursiv
}
}
- if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE )
+ if ( bOk && (bRejected = pAct->Reject( pDoc )) != false )
{
ScChangeActionMove* pReject = new ScChangeActionMove(
pAct->GetBigRange().MakeRange(),
@@ -4318,7 +4318,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
pReject = new ScChangeActionContent( aRange );
pReject->SetOldValue( pDoc->GetCell( aRange.aStart ), pDoc, pDoc );
}
- if ( (bRejected = pAct->Reject( pDoc )) != FALSE && !bRecursion )
+ if ( (bRejected = pAct->Reject( pDoc )) != false && !bRecursion )
{
pReject->SetNewValue( pDoc->GetCell( aRange.aStart ), pDoc );
pReject->SetRejectAction( pAct->GetActionNumber() );
@@ -4337,7 +4337,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
-ULONG ScChangeTrack::AddLoadedGenerated(ScBaseCell* pNewCell, const ScBigRange& aBigRange, const String& sNewValue )
+sal_uLong ScChangeTrack::AddLoadedGenerated(ScBaseCell* pNewCell, const ScBigRange& aBigRange, const String& sNewValue )
{
ScChangeActionContent* pAct = new ScChangeActionContent( --nGeneratedMin, pNewCell, aBigRange, pDoc, sNewValue );
if ( pAct )
@@ -4539,7 +4539,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
{
if ( pAction->HasDeleted() )
{
- ::std::stack< ULONG > aStack;
+ ::std::stack< sal_uLong > aStack;
const ScChangeActionLinkEntry* pL = pAction->GetFirstDeletedEntry();
while ( pL )
{
@@ -4573,7 +4573,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
{
if ( pAction->HasDependent() )
{
- ::std::stack< ULONG > aStack;
+ ::std::stack< sal_uLong > aStack;
const ScChangeActionLinkEntry* pL = pAction->GetFirstDependentEntry();
while ( pL )
{
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index 514336368797..e50b43859e52 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -91,16 +91,16 @@ ScChangeViewSettings& ScChangeViewSettings::operator=( const ScChangeViewSetting
return *this;
}
-BOOL ScChangeViewSettings::IsValidComment(const String* pCommentStr) const
+sal_Bool ScChangeViewSettings::IsValidComment(const String* pCommentStr) const
{
- BOOL nTheFlag=TRUE;
+ sal_Bool nTheFlag=sal_True;
if(pCommentSearcher!=NULL)
{
xub_StrLen nStartPos = 0;
xub_StrLen nEndPos = pCommentStr->Len();
- nTheFlag=sal::static_int_cast<BOOL>(pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos));
+ nTheFlag=sal::static_int_cast<sal_Bool>(pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos));
}
return nTheFlag;
}
@@ -117,7 +117,7 @@ void ScChangeViewSettings::SetTheComment(const String& rString)
if(rString.Len()>0)
{
utl::SearchParam aSearchParam( rString,
- utl::SearchParam::SRCH_REGEXP,FALSE,FALSE,FALSE );
+ utl::SearchParam::SRCH_REGEXP,false,false,false );
pCommentSearcher = new utl::TextSearch( aSearchParam, *ScGlobal::pCharClass );
}
diff --git a/sc/source/core/tool/collect.cxx b/sc/source/core/tool/collect.cxx
index 1b929892bd1e..c202107ea425 100644
--- a/sc/source/core/tool/collect.cxx
+++ b/sc/source/core/tool/collect.cxx
@@ -49,17 +49,17 @@ ScDataObject::~ScDataObject()
// Collection
//------------------------------------------------------------------------
-void lcl_DeleteScDataObjects( ScDataObject** p, USHORT nCount )
+void lcl_DeleteScDataObjects( ScDataObject** p, sal_uInt16 nCount )
{
if ( p )
{
- for (USHORT i = 0; i < nCount; i++) delete p[i];
+ for (sal_uInt16 i = 0; i < nCount; i++) delete p[i];
delete[] p;
p = NULL;
}
}
-ScCollection::ScCollection(USHORT nLim, USHORT nDel) :
+ScCollection::ScCollection(sal_uInt16 nLim, sal_uInt16 nDel) :
nCount ( 0 ),
nLimit ( nLim ),
nDelta ( nDel ),
@@ -94,8 +94,8 @@ ScCollection::~ScCollection()
}
//------------------------------------------------------------------------
-USHORT ScCollection::GetCount() const { return nCount; }
-void ScCollection::AtFree(USHORT nIndex)
+sal_uInt16 ScCollection::GetCount() const { return nCount; }
+void ScCollection::AtFree(sal_uInt16 nIndex)
{
if ((pItems) && (nIndex < nCount))
{
@@ -124,7 +124,7 @@ void ScCollection::FreeAll()
//------------------------------------------------------------------------
-BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject)
+sal_Bool ScCollection::AtInsert(sal_uInt16 nIndex, ScDataObject* pScDataObject)
{
if ((nCount < MAXCOLLECTIONSIZE) && (nIndex <= nCount) && pItems)
{
@@ -132,8 +132,8 @@ BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject)
{
ScDataObject** pNewItems = new ScDataObject*[nLimit + nDelta];
if (!pNewItems)
- return FALSE;
- nLimit = sal::static_int_cast<USHORT>( nLimit + nDelta );
+ return false;
+ nLimit = sal::static_int_cast<sal_uInt16>( nLimit + nDelta );
memmove(pNewItems, pItems, nCount * sizeof(ScDataObject*));
delete[] pItems;
pItems = pNewItems;
@@ -142,21 +142,21 @@ BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject)
memmove(&pItems[nIndex + 1], &pItems[nIndex], (nCount - nIndex) * sizeof(ScDataObject*));
pItems[nIndex] = pScDataObject;
nCount++;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
-BOOL ScCollection::Insert(ScDataObject* pScDataObject)
+sal_Bool ScCollection::Insert(ScDataObject* pScDataObject)
{
return AtInsert(nCount, pScDataObject);
}
//------------------------------------------------------------------------
-ScDataObject* ScCollection::At(USHORT nIndex) const
+ScDataObject* ScCollection::At(sal_uInt16 nIndex) const
{
if (nIndex < nCount)
return pItems[nIndex];
@@ -166,10 +166,10 @@ ScDataObject* ScCollection::At(USHORT nIndex) const
//------------------------------------------------------------------------
-USHORT ScCollection::IndexOf(ScDataObject* pScDataObject) const
+sal_uInt16 ScCollection::IndexOf(ScDataObject* pScDataObject) const
{
- USHORT nIndex = 0xffff;
- for (USHORT i = 0; ((i < nCount) && (nIndex == 0xffff)); i++)
+ sal_uInt16 nIndex = 0xffff;
+ for (sal_uInt16 i = 0; ((i < nCount) && (nIndex == 0xffff)); i++)
{
if (pItems[i] == pScDataObject) nIndex = i;
}
@@ -186,7 +186,7 @@ ScCollection& ScCollection::operator=( const ScCollection& r )
nLimit = r.nLimit;
nDelta = r.nDelta;
pItems = new ScDataObject*[nLimit];
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
pItems[i] = r.pItems[i]->Clone();
return *this;
@@ -203,7 +203,7 @@ ScDataObject* ScCollection::Clone() const
// ScSortedCollection
//------------------------------------------------------------------------
-ScSortedCollection::ScSortedCollection(USHORT nLim, USHORT nDel, BOOL bDup) :
+ScSortedCollection::ScSortedCollection(sal_uInt16 nLim, sal_uInt16 nDel, sal_Bool bDup) :
ScCollection (nLim, nDel),
bDuplicates ( bDup)
{
@@ -211,9 +211,9 @@ ScSortedCollection::ScSortedCollection(USHORT nLim, USHORT nDel, BOOL bDup) :
//------------------------------------------------------------------------
-USHORT ScSortedCollection::IndexOf(ScDataObject* pScDataObject) const
+sal_uInt16 ScSortedCollection::IndexOf(ScDataObject* pScDataObject) const
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if (Search(pScDataObject, nIndex))
return nIndex;
else
@@ -222,10 +222,10 @@ USHORT ScSortedCollection::IndexOf(ScDataObject* pScDataObject) const
//------------------------------------------------------------------------
-BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) const
+sal_Bool ScSortedCollection::Search(ScDataObject* pScDataObject, sal_uInt16& rIndex) const
{
rIndex = nCount;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
short nLo = 0;
short nHi = nCount - 1;
short nIndex;
@@ -241,7 +241,7 @@ BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) con
nHi = nIndex - 1;
if (nCompare == 0)
{
- bFound = TRUE;
+ bFound = sal_True;
nLo = nIndex;
}
}
@@ -252,16 +252,16 @@ BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) con
//------------------------------------------------------------------------
-BOOL ScSortedCollection::Insert(ScDataObject* pScDataObject)
+sal_Bool ScSortedCollection::Insert(ScDataObject* pScDataObject)
{
- USHORT nIndex;
- BOOL bFound = Search(pScDataObject, nIndex);
+ sal_uInt16 nIndex;
+ sal_Bool bFound = Search(pScDataObject, nIndex);
if (bFound)
{
if (bDuplicates)
return AtInsert(nIndex, pScDataObject);
else
- return FALSE;
+ return false;
}
else
return AtInsert(nIndex, pScDataObject);
@@ -269,15 +269,15 @@ BOOL ScSortedCollection::Insert(ScDataObject* pScDataObject)
//------------------------------------------------------------------------
-BOOL ScSortedCollection::InsertPos(ScDataObject* pScDataObject, USHORT& nIndex)
+sal_Bool ScSortedCollection::InsertPos(ScDataObject* pScDataObject, sal_uInt16& nIndex)
{
- BOOL bFound = Search(pScDataObject, nIndex);
+ sal_Bool bFound = Search(pScDataObject, nIndex);
if (bFound)
{
if (bDuplicates)
return AtInsert(nIndex, pScDataObject);
else
- return FALSE;
+ return false;
}
else
return AtInsert(nIndex, pScDataObject);
@@ -285,21 +285,21 @@ BOOL ScSortedCollection::InsertPos(ScDataObject* pScDataObject, USHORT& nIndex)
//------------------------------------------------------------------------
-BOOL ScSortedCollection::operator==(const ScSortedCollection& rCmp) const
+sal_Bool ScSortedCollection::operator==(const ScSortedCollection& rCmp) const
{
if ( nCount != rCmp.nCount )
- return FALSE;
- for (USHORT i=0; i<nCount; i++)
+ return false;
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( !IsEqual(pItems[i],rCmp.pItems[i]) )
- return FALSE;
- return TRUE;
+ return false;
+ return sal_True;
}
//------------------------------------------------------------------------
// IsEqual - komplette Inhalte vergleichen
-BOOL ScSortedCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
+sal_Bool ScSortedCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return ( Compare(pKey1, pKey2) == 0 ); // Default: nur Index vergleichen
}
@@ -341,10 +341,10 @@ ScDataObject* TypedStrData::Clone() const
return new TypedStrData(*this);
}
-TypedScStrCollection::TypedScStrCollection( USHORT nLim , USHORT nDel , BOOL bDup )
+TypedScStrCollection::TypedScStrCollection( sal_uInt16 nLim , sal_uInt16 nDel , sal_Bool bDup )
: ScSortedCollection( nLim, nDel, bDup )
{
- bCaseSensitive = FALSE;
+ bCaseSensitive = false;
}
TypedScStrCollection::~TypedScStrCollection()
@@ -354,12 +354,12 @@ ScDataObject* TypedScStrCollection::Clone() const
return new TypedScStrCollection(*this);
}
-TypedStrData* TypedScStrCollection::operator[]( const USHORT nIndex) const
+TypedStrData* TypedScStrCollection::operator[]( const sal_uInt16 nIndex) const
{
return (TypedStrData*)At(nIndex);
}
-void TypedScStrCollection::SetCaseSensitive( BOOL bSet )
+void TypedScStrCollection::SetCaseSensitive( sal_Bool bSet )
{
bCaseSensitive = bSet;
}
@@ -406,13 +406,13 @@ short TypedScStrCollection::Compare( ScDataObject* pKey1, ScDataObject* pKey2 )
return nResult;
}
-BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
- USHORT& rPos, BOOL bBack ) const
+sal_Bool TypedScStrCollection::FindText( const String& rStart, String& rResult,
+ sal_uInt16& rPos, sal_Bool bBack ) const
{
// Die Collection ist nach String-Vergleichen sortiert, darum muss hier
// alles durchsucht werden
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
String aOldResult;
if ( rPos != SCPOS_INVALID && rPos < nCount )
@@ -424,11 +424,11 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
if ( bBack ) // rueckwaerts
{
- USHORT nStartPos = nCount;
+ sal_uInt16 nStartPos = nCount;
if ( rPos != SCPOS_INVALID )
nStartPos = rPos; // weitersuchen...
- for ( USHORT i=nStartPos; i>0; )
+ for ( sal_uInt16 i=nStartPos; i>0; )
{
--i;
TypedStrData* pData = (TypedStrData*) pItems[i];
@@ -444,7 +444,7 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
{
rResult = pData->aStrValue;
rPos = i;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -453,11 +453,11 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
}
else // vorwaerts
{
- USHORT nStartPos = 0;
+ sal_uInt16 nStartPos = 0;
if ( rPos != SCPOS_INVALID )
nStartPos = rPos + 1; // weitersuchen...
- for ( USHORT i=nStartPos; i<nCount; i++ )
+ for ( sal_uInt16 i=nStartPos; i<nCount; i++ )
{
TypedStrData* pData = (TypedStrData*) pItems[i];
if (pData->nStrType)
@@ -472,7 +472,7 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
{
rResult = pData->aStrValue;
rPos = i;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -485,20 +485,20 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
// Gross-/Kleinschreibung anpassen
-BOOL TypedScStrCollection::GetExactMatch( String& rString ) const
+sal_Bool TypedScStrCollection::GetExactMatch( String& rString ) const
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
TypedStrData* pData = (TypedStrData*) pItems[i];
if ( pData->nStrType && ScGlobal::GetpTransliteration()->isEqual(
pData->aStrValue, rString ) )
{
rString = pData->aStrValue; // String anpassen
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index db37d0302939..746438a70f1e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -223,14 +223,14 @@ bool ScCompiler::IsEnglishSymbol( const String& rName )
return true;
}
// 2. old add in functions
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
{
return true;
}
// 3. new (uno) add in functions
- String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
+ String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, false ));
if (aIntName.Len())
{
return true;
@@ -322,9 +322,9 @@ void ScCompiler::SetGrammarAndRefConvention(
SetRefConvention( eConv );
}
-String ScCompiler::FindAddInFunction( const String& rUpperName, BOOL bLocalFirst ) const
+String ScCompiler::FindAddInFunction( const String& rUpperName, sal_Bool bLocalFirst ) const
{
- return ScGlobal::GetAddInCollection()->FindFunction(rUpperName, bLocalFirst); // bLocalFirst=FALSE for english
+ return ScGlobal::GetAddInCollection()->FindFunction(rUpperName, bLocalFirst); // bLocalFirst=sal_False for english
}
@@ -341,7 +341,7 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv )
meConv( eConv )
{
int i;
- ULONG *t= new ULONG [128];
+ sal_uLong *t= new sal_uLong [128];
ScCompiler::pConventions[ meConv ] = this;
mpCharTable = t;
@@ -512,7 +512,7 @@ static bool lcl_parseExternalName(
// indexed external document names.
ScRange aRange;
String aStartTabName, aEndTabName;
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
p = aRange.Parse_XL_Header( p, pDoc, aTmpFile, aStartTabName,
aEndTabName, nFlags, true, pExternalLinks );
if (!p || p == pStart)
@@ -748,7 +748,7 @@ struct Convention_A1 : public ScCompiler::Convention
nSrcPos, nStartFlags, aAddAllowed, nContFlags, aAddAllowed );
}
- virtual ULONG getCharTableFlags( sal_Unicode c, sal_Unicode /*cLast*/ ) const
+ virtual sal_uLong getCharTableFlags( sal_Unicode c, sal_Unicode /*cLast*/ ) const
{
return mpCharTable[static_cast<sal_uInt8>(c)];
}
@@ -893,7 +893,7 @@ struct ConventionOOO_A1 : public Convention_A1
void MakeRefStr( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, false);
}
@@ -1080,7 +1080,7 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
void MakeRefStr( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, true);
}
@@ -1337,7 +1337,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
void MakeRefStr( rtl::OUStringBuffer& rBuf,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
ScComplexRefData aRef( rRef );
@@ -1539,7 +1539,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
void MakeRefStr( rtl::OUStringBuffer& rBuf,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
ScComplexRefData aRef( rRef );
@@ -1718,9 +1718,9 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
r1c1_add_col(rBuffer, aRef.Ref2);
}
- virtual ULONG getCharTableFlags( sal_Unicode c, sal_Unicode cLast ) const
+ virtual sal_uLong getCharTableFlags( sal_Unicode c, sal_Unicode cLast ) const
{
- ULONG nFlags = mpCharTable[static_cast<sal_uInt8>(c)];
+ sal_uLong nFlags = mpCharTable[static_cast<sal_uInt8>(c)];
if (c == '-' && cLast == '[')
// '-' can occur within a reference string only after '[' e.g. R[-1]C.
nFlags |= SC_COMPILER_C_IDENT;
@@ -1830,7 +1830,7 @@ void ScCompiler::SetRefConvention( const ScCompiler::Convention *pConvP )
"ScCompiler::SetRefConvention: unsupported grammar resulting");
}
-void ScCompiler::SetError(USHORT nError)
+void ScCompiler::SetError(sal_uInt16 nError)
{
if( !pArr->GetCodeError() )
pArr->SetCodeError( nError);
@@ -1916,7 +1916,7 @@ xub_StrLen ScCompiler::NextSymbol(bool bInArray)
while ((c != 0) && (eState != ssStop) )
{
pSrc++;
- ULONG nMask = GetCharTableFlags( c, cLast );
+ sal_uLong nMask = GetCharTableFlags( c, cLast );
// The parameter separator and the array column and row separators end
// things unconditionally if not in string or reference.
@@ -2352,7 +2352,7 @@ Label_MaskStateMachine:
nSrcPos = sal::static_int_cast<xub_StrLen>( nSrcPos + nSpaces );
String aSymbol;
mnRangeOpPosInSymbol = -1;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
do
{
bi18n = false;
@@ -2422,10 +2422,10 @@ Label_MaskStateMachine:
// Convert symbol to token
//---------------------------------------------------------------------------
-BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
+sal_Bool ScCompiler::IsOpCode( const String& rName, bool bInArray )
{
OpCodeHashMap::const_iterator iLook( mxSymbols->getHashMap()->find( rName));
- BOOL bFound = (iLook != mxSymbols->getHashMap()->end());
+ sal_Bool bFound = (iLook != mxSymbols->getHashMap()->end());
if (bFound)
{
ScRawToken aToken;
@@ -2468,7 +2468,7 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
ScRawToken aToken;
aToken.SetOpCode( aOdffAliases[i].eOp);
pRawToken = aToken.Clone();
- bFound = TRUE;
+ bFound = sal_True;
break; // for
}
}
@@ -2492,13 +2492,13 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
// last resort by just falling through to FindFunction(), but
// it shouldn't happen if the map was setup correctly. Don't
// waste time and bail out.
- return FALSE;
+ return false;
}
}
if (!aIntName.Len())
{
// Old (deprecated) addins first for legacy.
- USHORT nIndex;
+ sal_uInt16 nIndex;
bFound = ScGlobal::GetFuncCollection()->SearchFunc( cSymbol, nIndex);
if (bFound)
{
@@ -2507,7 +2507,7 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
pRawToken = aToken.Clone();
}
else
- // bLocalFirst=FALSE for (English) upper full original name
+ // bLocalFirst=sal_False for (English) upper full original name
// (service.function)
aIntName = ScGlobal::GetAddInCollection()->FindFunction(
rName, !mxSymbols->isEnglish());
@@ -2517,7 +2517,7 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
ScRawToken aToken;
aToken.SetExternal( aIntName.GetBuffer() ); // international name
pRawToken = aToken.Clone();
- bFound = TRUE;
+ bFound = sal_True;
}
}
OpCode eOp;
@@ -2537,10 +2537,10 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
return bFound;
}
-BOOL ScCompiler::IsOpCode2( const String& rName )
+sal_Bool ScCompiler::IsOpCode2( const String& rName )
{
- BOOL bFound = FALSE;
- USHORT i;
+ sal_Bool bFound = false;
+ sal_uInt16 i;
for( i = ocInternalBegin; i <= ocInternalEnd && !bFound; i++ )
bFound = rName.EqualsAscii( pInternal[ i-ocInternalBegin ] );
@@ -2554,7 +2554,7 @@ BOOL ScCompiler::IsOpCode2( const String& rName )
return bFound;
}
-BOOL ScCompiler::IsValue( const String& rSym )
+sal_Bool ScCompiler::IsValue( const String& rSym )
{
double fVal;
sal_uInt32 nIndex = ( mxSymbols->isEnglish() ?
@@ -2562,7 +2562,7 @@ BOOL ScCompiler::IsValue( const String& rSym )
if (pDoc->GetFormatTable()->IsNumberFormat( rSym, nIndex, fVal ) )
{
- USHORT nType = pDoc->GetFormatTable()->GetType(nIndex);
+ sal_uInt16 nType = pDoc->GetFormatTable()->GetType(nIndex);
// Don't accept 3:3 as time, it is a reference to entire row 3 instead.
// Dates should never be entered directly and automatically converted
@@ -2570,7 +2570,7 @@ BOOL ScCompiler::IsValue( const String& rSym )
// Usually it wouldn't be accepted anyway because the date separator
// clashed with other separators or operators.
if (nType & (NUMBERFORMAT_TIME | NUMBERFORMAT_DATE))
- return FALSE;
+ return false;
if (nType == NUMBERFORMAT_LOGICAL)
{
@@ -2578,7 +2578,7 @@ BOOL ScCompiler::IsValue( const String& rSym )
while( *p == ' ' )
p++;
if (*p == '(')
- return FALSE; // Boolean function instead.
+ return false; // Boolean function instead.
}
if( nType == NUMBERFORMAT_TEXT )
@@ -2587,23 +2587,23 @@ BOOL ScCompiler::IsValue( const String& rSym )
ScRawToken aToken;
aToken.SetDouble( fVal );
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-BOOL ScCompiler::IsString()
+sal_Bool ScCompiler::IsString()
{
register const sal_Unicode* p = cSymbol;
while ( *p )
p++;
xub_StrLen nLen = sal::static_int_cast<xub_StrLen>( p - cSymbol - 1 );
- BOOL bQuote = ((cSymbol[0] == '"') && (cSymbol[nLen] == '"'));
+ sal_Bool bQuote = ((cSymbol[0] == '"') && (cSymbol[nLen] == '"'));
if ((bQuote ? nLen-2 : nLen) > MAXSTRLEN-1)
{
SetError(errStringOverflow);
- return FALSE;
+ return false;
}
if ( bQuote )
{
@@ -2611,13 +2611,13 @@ BOOL ScCompiler::IsString()
ScRawToken aToken;
aToken.SetString( cSymbol+1 );
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScCompiler::IsPredetectedReference( const String& rName )
+sal_Bool ScCompiler::IsPredetectedReference( const String& rName )
{
// Speedup documents with lots of broken references, e.g. sheet deleted.
xub_StrLen nPos = rName.SearchAscii( "#REF!");
@@ -2669,12 +2669,12 @@ BOOL ScCompiler::IsPredetectedReference( const String& rName )
}
-BOOL ScCompiler::IsDoubleReference( const String& rName )
+sal_Bool ScCompiler::IsDoubleReference( const String& rName )
{
ScRange aRange( aPos, aPos );
const ScAddress::Details aDetails( pConv->meConv, aPos );
ScAddress::ExternalInfo aExtInfo;
- USHORT nFlags = aRange.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
+ sal_uInt16 nFlags = aRange.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
if( nFlags & SCA_VALID )
{
ScRawToken aToken;
@@ -2684,13 +2684,13 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
aRef.Ref1.SetRowRel( (nFlags & SCA_ROW_ABSOLUTE) == 0 );
aRef.Ref1.SetTabRel( (nFlags & SCA_TAB_ABSOLUTE) == 0 );
if ( !(nFlags & SCA_VALID_TAB) )
- aRef.Ref1.SetTabDeleted( TRUE ); // #REF!
+ aRef.Ref1.SetTabDeleted( sal_True ); // #REF!
aRef.Ref1.SetFlag3D( ( nFlags & SCA_TAB_3D ) != 0 );
aRef.Ref2.SetColRel( (nFlags & SCA_COL2_ABSOLUTE) == 0 );
aRef.Ref2.SetRowRel( (nFlags & SCA_ROW2_ABSOLUTE) == 0 );
aRef.Ref2.SetTabRel( (nFlags & SCA_TAB2_ABSOLUTE) == 0 );
if ( !(nFlags & SCA_VALID_TAB2) )
- aRef.Ref2.SetTabDeleted( TRUE ); // #REF!
+ aRef.Ref2.SetTabDeleted( sal_True ); // #REF!
aRef.Ref2.SetFlag3D( ( nFlags & SCA_TAB2_3D ) != 0 );
aRef.CalcRelFromAbs( aPos );
if (aExtInfo.mbExternal)
@@ -2711,12 +2711,12 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
}
-BOOL ScCompiler::IsSingleReference( const String& rName )
+sal_Bool ScCompiler::IsSingleReference( const String& rName )
{
ScAddress aAddr( aPos );
const ScAddress::Details aDetails( pConv->meConv, aPos );
ScAddress::ExternalInfo aExtInfo;
- USHORT nFlags = aAddr.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
+ sal_uInt16 nFlags = aAddr.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
// Something must be valid in order to recognize Sheet1.blah or blah.a1
// as a (wrong) reference.
if( nFlags & ( SCA_VALID_COL|SCA_VALID_ROW|SCA_VALID_TAB ) )
@@ -2757,14 +2757,14 @@ BOOL ScCompiler::IsSingleReference( const String& rName )
}
-BOOL ScCompiler::IsReference( const String& rName )
+sal_Bool ScCompiler::IsReference( const String& rName )
{
// Has to be called before IsValue
sal_Unicode ch1 = rName.GetChar(0);
sal_Unicode cDecSep = ( mxSymbols->isEnglish() ? '.' :
ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0) );
if ( ch1 == cDecSep )
- return FALSE;
+ return false;
// Who was that imbecile introducing '.' as the sheet name separator!?!
if ( CharClass::isAsciiNumeric( ch1 ) )
{
@@ -2779,12 +2779,12 @@ BOOL ScCompiler::IsReference( const String& rName )
{
if (ScGlobal::FindUnquoted( rName, ':') != STRING_NOTFOUND)
break; // may be 3:3, continue as usual
- return FALSE;
+ return false;
}
sal_Unicode const * const pTabSep = rName.GetBuffer() + nPos;
sal_Unicode ch2 = pTabSep[1]; // maybe a column identifier
if ( !(ch2 == '$' || CharClass::isAsciiAlpha( ch2 )) )
- return FALSE;
+ return false;
if ( cDecSep == '.' && (ch2 == 'E' || ch2 == 'e') // E + - digit
&& (GetCharTableFlags( pTabSep[2], pTabSep[1] ) & SC_COMPILER_C_VALUE_EXP) )
{ // #91053#
@@ -2801,7 +2801,7 @@ BOOL ScCompiler::IsReference( const String& rName )
String aTabName( rName.Copy( 0, nPos ) );
SCTAB nTab;
if ( !pDoc->GetTable( aTabName, nTab ) )
- return FALSE;
+ return false;
// If sheet "1" exists and the expression is 1.E+2 continue as
// usual, the ScRange/ScAddress parser will take care of it.
}
@@ -2849,14 +2849,13 @@ BOOL ScCompiler::IsReference( const String& rName )
return false;
}
-BOOL ScCompiler::IsMacro( const String& rName )
+sal_Bool ScCompiler::IsMacro( const String& rName )
{
String aName( rName);
StarBASIC* pObj = 0;
SfxObjectShell* pDocSh = pDoc->GetDocumentShell();
SfxApplication* pSfxApp = SFX_APP();
- pSfxApp->EnterBasicCall(); // initialize document's BASIC
if( pDocSh )//XXX
pObj = pDocSh->GetBasic();
@@ -2873,26 +2872,23 @@ BOOL ScCompiler::IsMacro( const String& rName )
SbxMethod* pMeth = (SbxMethod*) pObj->Find( aName, SbxCLASS_METHOD );
if( !pMeth )
{
- pSfxApp->LeaveBasicCall();
- return FALSE;
+ return false;
}
// It really should be a BASIC function!
if( pMeth->GetType() == SbxVOID
|| ( pMeth->IsFixed() && pMeth->GetType() == SbxEMPTY )
|| !pMeth->ISA(SbMethod) )
{
- pSfxApp->LeaveBasicCall();
- return FALSE;
+ return false;
}
ScRawToken aToken;
aToken.SetExternal( aName.GetBuffer() );
aToken.eOp = ocMacro;
pRawToken = aToken.Clone();
- pSfxApp->LeaveBasicCall();
- return TRUE;
+ return sal_True;
}
-BOOL ScCompiler::IsNamedRange( const String& rUpperName )
+sal_Bool ScCompiler::IsNamedRange( const String& rUpperName )
{
// IsNamedRange is called only from NextNewToken, with an upper-case string
@@ -2941,9 +2937,9 @@ bool ScCompiler::IsExternalNamedRange( const String& rSymbol )
return true;
}
-BOOL ScCompiler::IsDBRange( const String& rName )
+sal_Bool ScCompiler::IsDBRange( const String& rName )
{
- USHORT n;
+ sal_uInt16 n;
ScDBCollection* pDBColl = pDoc->GetDBCollection();
if (pDBColl->SearchName( rName, n ) )
{
@@ -2952,16 +2948,16 @@ BOOL ScCompiler::IsDBRange( const String& rName )
aToken.SetName( pData->GetIndex() );
aToken.eOp = ocDBArea;
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-BOOL ScCompiler::IsColRowName( const String& rName )
+sal_Bool ScCompiler::IsColRowName( const String& rName )
{
- BOOL bInList = FALSE;
- BOOL bFound = FALSE;
+ sal_Bool bInList = false;
+ sal_Bool bFound = false;
ScSingleRefData aRef;
String aName( rName );
DeQuote( aName );
@@ -2992,10 +2988,10 @@ BOOL ScCompiler::IsColRowName( const String& rName )
// recursive..
// Furthermore, *this* cell won't be touched, since no RPN exists yet.
CellType eType = pCell->GetCellType();
- BOOL bOk = sal::static_int_cast<BOOL>( (eType == CELLTYPE_FORMULA ?
+ sal_Bool bOk = sal::static_int_cast<sal_Bool>( (eType == CELLTYPE_FORMULA ?
((ScFormulaCell*)pCell)->GetCode()->GetCodeLen() > 0
&& ((ScFormulaCell*)pCell)->aPos != aPos // noIter
- : TRUE ) );
+ : sal_True ) );
if ( bOk && pCell->HasStringData() )
{
String aStr;
@@ -3027,11 +3023,11 @@ BOOL ScCompiler::IsColRowName( const String& rName )
aRef.nRow = aIter.GetRow();
aRef.nTab = aIter.GetTab();
if ( !jRow )
- aRef.SetColRel( TRUE ); // ColName
+ aRef.SetColRel( sal_True ); // ColName
else
- aRef.SetRowRel( TRUE ); // RowName
+ aRef.SetRowRel( sal_True ); // RowName
aRef.CalcRelFromAbs( aPos );
- bInList = bFound = TRUE;
+ bInList = bFound = sal_True;
}
}
}
@@ -3043,7 +3039,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
long nDistance = 0, nMax = 0;
long nMyCol = (long) aPos.Col();
long nMyRow = (long) aPos.Row();
- BOOL bTwo = FALSE;
+ sal_Bool bTwo = false;
ScAddress aOne( 0, 0, aPos.Tab() );
ScAddress aTwo( MAXCOL, MAXROW, aPos.Tab() );
@@ -3083,7 +3079,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
{
if ( nC < 0 || nR < 0 )
{ // right or below
- bTwo = TRUE;
+ bTwo = sal_True;
aTwo.Set( nCol, nRow, aAddress.Tab() );
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
nDistance = nD;
@@ -3093,7 +3089,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
// upper left, only if not further up than the
// current entry and nMyRow is below (CellIter
// runs column-wise)
- bTwo = FALSE;
+ bTwo = false;
aOne.Set( nCol, nRow, aAddress.Tab() );
nMax = Max( nMyCol + nC, nMyRow + nR );
nDistance = nD;
@@ -3106,7 +3102,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
nDistance = nC * nC + nR * nR;
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
}
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -3121,10 +3117,10 @@ BOOL ScCompiler::IsColRowName( const String& rName )
break; // aIter
}
CellType eType = pCell->GetCellType();
- BOOL bOk = sal::static_int_cast<BOOL>( (eType == CELLTYPE_FORMULA ?
+ sal_Bool bOk = sal::static_int_cast<sal_Bool>( (eType == CELLTYPE_FORMULA ?
((ScFormulaCell*)pCell)->GetCode()->GetCodeLen() > 0
&& ((ScFormulaCell*)pCell)->aPos != aPos // noIter
- : TRUE ) );
+ : sal_True ) );
if ( bOk && pCell->HasStringData() )
{
String aStr;
@@ -3162,7 +3158,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
{
if ( nC < 0 || nR < 0 )
{ // right or below
- bTwo = TRUE;
+ bTwo = sal_True;
aTwo.Set( nCol, nRow, aIter.GetTab() );
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
nDistance = nD;
@@ -3172,7 +3168,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
// upper left, only if not further up than the
// current entry and nMyRow is below (CellIter
// runs column-wise)
- bTwo = FALSE;
+ bTwo = false;
aOne.Set( nCol, nRow, aIter.GetTab() );
nMax = Max( nMyCol + nC, nMyRow + nR );
nDistance = nD;
@@ -3185,7 +3181,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
nDistance = nC * nC + nR * nR;
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
}
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -3227,9 +3223,9 @@ BOOL ScCompiler::IsColRowName( const String& rName )
aRef.nCol, aRef.nRow + 1, aRef.nTab ))
|| (aRef.nRow != 0 && pDoc->HasStringData(
aRef.nCol, aRef.nRow - 1, aRef.nTab )) )
- aRef.SetRowRel( TRUE ); // RowName
+ aRef.SetRowRel( sal_True ); // RowName
else
- aRef.SetColRel( TRUE ); // ColName
+ aRef.SetColRel( sal_True ); // ColName
aRef.CalcRelFromAbs( aPos );
}
}
@@ -3239,13 +3235,13 @@ BOOL ScCompiler::IsColRowName( const String& rName )
aToken.SetSingleReference( aRef );
aToken.eOp = ocColRowName;
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-BOOL ScCompiler::IsBoolean( const String& rName )
+sal_Bool ScCompiler::IsBoolean( const String& rName )
{
OpCodeHashMap::const_iterator iLook( mxSymbols->getHashMap()->find( rName ) );
if( iLook != mxSymbols->getHashMap()->end() &&
@@ -3255,10 +3251,10 @@ BOOL ScCompiler::IsBoolean( const String& rName )
ScRawToken aToken;
aToken.SetOpCode( (*iLook).second );
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------------
@@ -3287,17 +3283,17 @@ void ScCompiler::AutoCorrectParsedSymbol()
aCorrectedSymbol.SetChar( nPos, cQuote ); // '"' the 255th character
else
aCorrectedSymbol.Insert( cQuote, nPos + 1 );
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
else if ( c1 != cQuote && c2 == cQuote )
{ // ..."
aCorrectedSymbol.Insert( cQuote, 0 );
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
else if ( nPos == 0 && (c1 == cx || c1 == cX) )
{ // x => *
aCorrectedSymbol = mxSymbols->getSymbol(ocMul);
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
else if ( (GetCharTableFlags( c1, 0 ) & SC_COMPILER_C_CHAR_VALUE)
&& (GetCharTableFlags( c2, c2p ) & SC_COMPILER_C_CHAR_VALUE) )
@@ -3310,7 +3306,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
while ( (nIndex = aCorrectedSymbol.SearchAndReplace(
cx, c, nIndex )) != STRING_NOTFOUND )
nIndex++;
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
if ( (nXcount = aCorrectedSymbol.GetTokenCount( cX )) > 1 )
{ // X => *
@@ -3319,7 +3315,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
while ( (nIndex = aCorrectedSymbol.SearchAndReplace(
cX, c, nIndex )) != STRING_NOTFOUND )
nIndex++;
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
}
else
@@ -3334,16 +3330,16 @@ void ScCompiler::AutoCorrectParsedSymbol()
aSymbol.Erase( 0, nPosition + 2 );
}
xub_StrLen nRefs = aSymbol.GetTokenCount( ':' );
- BOOL bColons;
+ sal_Bool bColons;
if ( nRefs > 2 )
{ // duplicated or too many ':'? B:2::C10 => B2:C10
- bColons = TRUE;
+ bColons = sal_True;
xub_StrLen nIndex = 0;
String aTmp1( aSymbol.GetToken( 0, ':', nIndex ) );
xub_StrLen nLen1 = aTmp1.Len();
String aSym, aTmp2;
- BOOL bLastAlp, bNextNum;
- bLastAlp = bNextNum = TRUE;
+ sal_Bool bLastAlp, bNextNum;
+ bLastAlp = bNextNum = sal_True;
xub_StrLen nStrip = 0;
xub_StrLen nCount = nRefs;
for ( xub_StrLen j=1; j<nCount; j++ )
@@ -3397,7 +3393,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
aSymbol += aTmp1;
}
else
- bColons = FALSE;
+ bColons = false;
if ( nRefs && nRefs <= 2 )
{ // reference twisted? 4A => A4 etc.
String aTab[2], aRef[2];
@@ -3410,9 +3406,9 @@ void ScCompiler::AutoCorrectParsedSymbol()
else
aRef[0] = aSymbol;
- BOOL bChanged = FALSE;
- BOOL bOk = TRUE;
- USHORT nMask = SCA_VALID | SCA_VALID_COL | SCA_VALID_ROW;
+ sal_Bool bChanged = false;
+ sal_Bool bOk = sal_True;
+ sal_uInt16 nMask = SCA_VALID | SCA_VALID_COL | SCA_VALID_ROW;
for ( int j=0; j<nRefs; j++ )
{
xub_StrLen nTmp = 0;
@@ -3433,7 +3429,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
aRef[j] += aStr2;
if ( bColons || aRef[j] != aOld )
{
- bChanged = TRUE;
+ bChanged = sal_True;
ScAddress aAdr;
bOk &= ((aAdr.Parse( aRef[j], pDoc, aDetails ) & nMask) == nMask);
}
@@ -3449,7 +3445,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
aCorrectedSymbol += aTab[1];
aCorrectedSymbol += aRef[1];
}
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
}
}
@@ -3473,7 +3469,7 @@ inline bool lcl_UpperAsciiOrI18n( String& rUpper, const String& rOrg, FormulaGra
}
}
-BOOL ScCompiler::NextNewToken( bool bInArray )
+sal_Bool ScCompiler::NextNewToken( bool bInArray )
{
bool bAllowBooleans = bInArray;
xub_StrLen nSpaces = NextSymbol(bInArray);
@@ -3485,7 +3481,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
{
ScRawToken aToken;
aToken.SetOpCode( ocSpaces );
- aToken.sbyte.cByte = (BYTE) ( nSpaces > 255 ? 255 : nSpaces );
+ aToken.sbyte.cByte = (sal_uInt8) ( nSpaces > 255 ? 255 : nSpaces );
if( !static_cast<ScTokenArray*>(pArr)->AddRawToken( aToken ) )
{
SetError(errCodeOverflow);
@@ -3637,7 +3633,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
void ScCompiler::CreateStringFromXMLTokenArray( String& rFormula, String& rFormulaNmsp )
{
bool bExternal = GetGrammar() == FormulaGrammar::GRAM_EXTERNAL;
- USHORT nExpectedCount = bExternal ? 2 : 1;
+ sal_uInt16 nExpectedCount = bExternal ? 2 : 1;
DBG_ASSERT( pArr->GetLen() == nExpectedCount, "ScCompiler::CreateStringFromXMLTokenArray - wrong number of tokens" );
if( pArr->GetLen() == nExpectedCount )
{
@@ -3662,13 +3658,13 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula )
aFormula.EraseLeadingChars();
aFormula.EraseTrailingChars();
nSrcPos = 0;
- bCorrected = FALSE;
+ bCorrected = false;
if ( bAutoCorrect )
{
aCorrectedFormula.Erase();
aCorrectedSymbol.Erase();
}
- BYTE nForced = 0; // ==formula forces recalc even if cell is not visible
+ sal_uInt8 nForced = 0; // ==formula forces recalc even if cell is not visible
if( aFormula.GetChar(nSrcPos) == '=' )
{
nSrcPos++;
@@ -3723,7 +3719,7 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula )
SetError( errPairExpected );
if ( bAutoCorrect )
{
- bCorrected = TRUE;
+ bCorrected = sal_True;
aCorrectedSymbol.Erase();
}
}
@@ -3765,7 +3761,7 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula )
SetError( errPairExpected );
if ( bAutoCorrect )
{
- bCorrected = TRUE;
+ bCorrected = sal_True;
aCorrectedSymbol.Erase();
}
}
@@ -3885,12 +3881,12 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula, const String& r
}
-BOOL ScCompiler::HandleRange()
+sal_Bool ScCompiler::HandleRange()
{
ScRangeData* pRangeData = pDoc->GetRangeName()->findByIndex( pToken->GetIndex() );
if (pRangeData)
{
- USHORT nErr = pRangeData->GetErrCode();
+ sal_uInt16 nErr = pRangeData->GetErrCode();
if( nErr )
SetError( errNoName );
else if ( !bCompileForFAP )
@@ -3906,18 +3902,18 @@ BOOL ScCompiler::HandleRange()
FormulaToken* p2 = pArr->PeekNextNoSpaces();
OpCode eOp1 = (p1 ? p1->GetOpCode() : static_cast<OpCode>( ocSep ) );
OpCode eOp2 = (p2 ? p2->GetOpCode() : static_cast<OpCode>( ocSep ) );
- BOOL bBorder1 = (eOp1 == ocSep || eOp1 == ocOpen);
- BOOL bBorder2 = (eOp2 == ocSep || eOp2 == ocClose);
- BOOL bAddPair = !(bBorder1 && bBorder2);
+ sal_Bool bBorder1 = (eOp1 == ocSep || eOp1 == ocOpen);
+ sal_Bool bBorder2 = (eOp2 == ocSep || eOp2 == ocClose);
+ sal_Bool bAddPair = !(bBorder1 && bBorder2);
if ( bAddPair )
{
pNew = new ScTokenArray();
pNew->AddOpCode( ocClose );
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
}
pNew = pRangeData->GetCode()->Clone();
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
if( pRangeData->HasReferences() )
{
SetRelNameReference();
@@ -3928,7 +3924,7 @@ BOOL ScCompiler::HandleRange()
{
pNew = new ScTokenArray();
pNew->AddOpCode( ocOpen );
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
}
return GetToken();
@@ -3936,10 +3932,10 @@ BOOL ScCompiler::HandleRange()
}
else
SetError(errNoName);
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
+sal_Bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
{
// Handle external range names.
switch (_aToken.GetType())
@@ -3980,9 +3976,9 @@ BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
}
default:
OSL_FAIL("Wrong type for external reference!");
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
@@ -4004,7 +4000,7 @@ BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
//-----------------------------------------------------------------------------
-BOOL ScCompiler::HasModifiedRange()
+sal_Bool ScCompiler::HasModifiedRange()
{
pArr->Reset();
for ( FormulaToken* t = pArr->Next(); t; t = pArr->Next() )
@@ -4015,24 +4011,24 @@ BOOL ScCompiler::HasModifiedRange()
ScRangeData* pRangeData = pDoc->GetRangeName()->findByIndex(t->GetIndex());
if (pRangeData && pRangeData->IsModified())
- return TRUE;
+ return sal_True;
}
else if ( eOpCode == ocDBArea )
{
ScDBData* pDBData = pDoc->GetDBCollection()->FindIndex(t->GetIndex());
if (pDBData && pDBData->IsModified())
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------------
template< typename T, typename S >
-S lcl_adjval( S& n, T pos, T max, BOOL bRel )
+S lcl_adjval( S& n, T pos, T max, sal_Bool bRel )
{
max++;
if( bRel )
@@ -4056,12 +4052,12 @@ void ScCompiler::SetRelNameReference()
{
ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel() )
- rRef1.SetRelName( TRUE );
+ rRef1.SetRelName( sal_True );
if ( t->GetType() == svDoubleRef )
{
ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel() )
- rRef2.SetRelName( TRUE );
+ rRef2.SetRelName( sal_True );
}
}
}
@@ -4149,14 +4145,14 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
for( t = static_cast<ScToken*>(pArr->GetNextReferenceRPN()); t && !pRangeData;
t = static_cast<ScToken*>(pArr->GetNextReferenceRPN()) )
{
- BOOL bRelName = (t->GetType() == svSingleRef ?
+ sal_Bool bRelName = (t->GetType() == svSingleRef ?
t->GetSingleRef().IsRelName() :
(t->GetDoubleRef().Ref1.IsRelName() ||
t->GetDoubleRef().Ref2.IsRelName()));
if (bRelName)
{
t->CalcAbsIfRel( rOldPos);
- BOOL bValid = (t->GetType() == svSingleRef ?
+ sal_Bool bValid = (t->GetType() == svSingleRef ?
t->GetSingleRef().Valid() :
t->GetDoubleRef().Valid());
// If the reference isn't valid, copying the formula
@@ -4242,12 +4238,12 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
}
}
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
- BOOL bEasyShared, bPosInRange;
+ sal_Bool bEasyShared, bPosInRange;
if ( !pRangeData )
- bEasyShared = bPosInRange = FALSE;
+ bEasyShared = bPosInRange = false;
else
{
- bEasyShared = TRUE;
+ bEasyShared = sal_True;
bPosInRange = r.In( eUpdateRefMode == URM_MOVE ? aPos : rOldPos );
}
#endif
@@ -4257,7 +4253,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( t->GetRef() != 1 )
{
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
- bEasyShared = FALSE;
+ bEasyShared = false;
#endif
}
else
@@ -4286,7 +4282,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
const ScSingleRefData& rSRD = aMod.Ref().Ref1;
ScAddress aRef( rSRD.nCol, rSRD.nRow, rSRD.nTab );
if ( r.In( aRef ) != bPosInRange )
- bEasyShared = FALSE;
+ bEasyShared = false;
}
#endif
}
@@ -4315,7 +4311,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
{
rRefSizeChanged = true;
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
- bEasyShared = FALSE;
+ bEasyShared = false;
#endif
}
}
@@ -4327,7 +4323,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
rRef.Ref1.nTab, rRef.Ref2.nCol, rRef.Ref2.nRow,
rRef.Ref2.nTab );
if ( r.In( aRef ) != bPosInRange )
- bEasyShared = FALSE;
+ bEasyShared = false;
}
#endif
}
@@ -4347,13 +4343,13 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
}
}
-BOOL ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
+sal_Bool ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- BOOL& rChanged, BOOL bSharedFormula)
+ sal_Bool& rChanged, sal_Bool bSharedFormula)
{
- BOOL bRelRef = FALSE; // set if relative reference
- rChanged = FALSE;
+ sal_Bool bRelRef = false; // set if relative reference
+ rChanged = false;
pArr->Reset();
ScToken* t;
while ( (t = static_cast<ScToken*>(pArr->GetNextReference())) != NULL )
@@ -4387,7 +4383,7 @@ BOOL ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
if (ScRefUpdate::Update( pDoc, eUpdateRefMode, aPos, r,
nDx, nDy, nDz, rRef, ScRefUpdate::ABSOLUTE)
!= UR_NOTHING )
- rChanged = TRUE;
+ rChanged = sal_True;
}
}
return bRelRef;
@@ -4463,12 +4459,12 @@ void ScCompiler::UpdateSharedFormulaReference( UpdateRefMode eUpdateRefMode,
}
-ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
+ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, sal_Bool bIsName )
{
ScRangeData* pRangeData = NULL;
SCTAB nPosTab = aPos.Tab(); // _after_ incremented!
SCTAB nOldPosTab = ((nPosTab > nTable) ? (nPosTab - 1) : nPosTab);
- BOOL bIsRel = FALSE;
+ sal_Bool bIsRel = false;
ScToken* t;
pArr->Reset();
if (bIsName)
@@ -4502,7 +4498,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
if ( t->GetType() == svDoubleRef )
{
if ( !(bIsName && t->GetDoubleRef().Ref2.IsTabRel()) )
@@ -4519,7 +4515,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
}
if ( bIsName && bIsRel )
pRangeData = (ScRangeData*) this; // not dereferenced in rangenam
@@ -4571,15 +4567,15 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
return pRangeData;
}
-ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL bIsName,
- BOOL& rChanged)
+ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, sal_Bool /* bIsMove */, sal_Bool bIsName,
+ sal_Bool& rChanged)
{
ScRangeData* pRangeData = NULL;
SCTAB nTab, nTab2;
SCTAB nPosTab = aPos.Tab(); // _after_ decremented!
SCTAB nOldPosTab = ((nPosTab >= nTable) ? (nPosTab + 1) : nPosTab);
- rChanged = FALSE;
- BOOL bIsRel = FALSE;
+ rChanged = false;
+ sal_Bool bIsRel = false;
ScToken* t;
pArr->Reset();
if (bIsName)
@@ -4596,7 +4592,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if (pName && pName->HasType(RT_SHAREDMOD))
pRangeData = pName;
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if( t->GetType() != svIndex ) // it may be a DB area!!!
{
@@ -4610,7 +4606,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4625,7 +4621,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
|| (nTab+1) >= pDoc->GetTableCount() )
{
rRef.nTab = MAXTAB+1;
- rRef.SetTabDeleted( TRUE );
+ rRef.SetTabDeleted( sal_True );
}
// else: nTab later points to what's nTable+1 now
// => area shrunk
@@ -4633,14 +4629,14 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef.nTab = MAXTAB+1;
- rRef.SetTabDeleted( TRUE );
+ rRef.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
if ( t->GetType() == svDoubleRef )
{
if ( !(bIsName && t->GetDoubleRef().Ref2.IsTabRel()) )
@@ -4653,7 +4649,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4662,14 +4658,14 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef.nTab = MAXTAB+1;
- rRef.SetTabDeleted( TRUE );
+ rRef.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
}
if ( bIsName && bIsRel )
pRangeData = (ScRangeData*) this; // not dereferenced in rangenam
@@ -4696,7 +4692,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef1.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4711,7 +4707,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
|| (nTab+1) >= pDoc->GetTableCount() )
{
rRef1.nTab = MAXTAB+1;
- rRef1.SetTabDeleted( TRUE );
+ rRef1.SetTabDeleted( sal_True );
}
// else: nTab later points to what's nTable+1 now
// => area shrunk
@@ -4719,9 +4715,9 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef1.nTab = MAXTAB+1;
- rRef1.SetTabDeleted( TRUE );
+ rRef1.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef1.nRelTab = rRef1.nTab - nPosTab;
}
@@ -4737,7 +4733,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef2.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4746,9 +4742,9 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef2.nTab = MAXTAB+1;
- rRef2.SetTabDeleted( TRUE );
+ rRef2.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef2.nRelTab = rRef2.nTab - nPosTab;
}
@@ -4761,7 +4757,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
// aPos.Tab() must be already adjusted!
ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
- BOOL bIsName )
+ sal_Bool bIsName )
{
ScRangeData* pRangeData = NULL;
SCsTAB nTab;
@@ -4789,7 +4785,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
else
nOldPosTab = nPosTab - nDir; // moved by one
- BOOL bIsRel = FALSE;
+ sal_Bool bIsRel = false;
ScToken* t;
pArr->Reset();
if (bIsName)
@@ -4823,7 +4819,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
rRef1.nRelTab = rRef1.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
if ( t->GetType() == svDoubleRef )
{
ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
@@ -4840,7 +4836,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
rRef2.nRelTab = rRef2.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
SCsTAB nTab1, nTab2;
if ( rRef1.IsTabRel() )
nTab1 = rRef1.nRelTab + nPosTab;
@@ -5001,7 +4997,7 @@ void ScCompiler::CreateStringFromMatrix( rtl::OUStringBuffer& rBuffer,
AppendBoolean(rBuffer, pMatrix->GetDouble(nC, nR) != 0.0);
else
{
- USHORT nErr = pMatrix->GetError(nC, nR);
+ sal_uInt16 nErr = pMatrix->GetError(nC, nR);
if (nErr)
rBuffer.append(ScGlobal::GetErrorString(nErr));
else
@@ -5036,16 +5032,16 @@ void ScCompiler::CreateStringFromSingleRef(rtl::OUStringBuffer& rBuffer,FormulaT
else
{
rBuffer.append(ScGlobal::GetRscString(STR_NO_NAME_REF));
- pConv->MakeRefStr (rBuffer, *this, aRef, TRUE );
+ pConv->MakeRefStr (rBuffer, *this, aRef, sal_True );
}
}
else
- pConv->MakeRefStr( rBuffer, *this, aRef, TRUE );
+ pConv->MakeRefStr( rBuffer, *this, aRef, sal_True );
}
// -----------------------------------------------------------------------------
void ScCompiler::CreateStringFromDoubleRef(rtl::OUStringBuffer& rBuffer,FormulaToken* _pTokenP)
{
- pConv->MakeRefStr( rBuffer, *this, static_cast<ScToken*>(_pTokenP)->GetDoubleRef(), FALSE );
+ pConv->MakeRefStr( rBuffer, *this, static_cast<ScToken*>(_pTokenP)->GetDoubleRef(), false );
}
// -----------------------------------------------------------------------------
void ScCompiler::CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,FormulaToken* _pTokenP)
@@ -5087,19 +5083,19 @@ void ScCompiler::LocalizeString( String& rName )
ScGlobal::GetAddInCollection()->LocalizeString( rName );
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::IsImportingXML() const
+sal_Bool ScCompiler::IsImportingXML() const
{
return pDoc->IsImportingXML();
}
// Put quotes around string if non-alphanumeric characters are contained,
// quote characters contained within are escaped by '\\'.
-BOOL ScCompiler::EnQuote( String& rStr )
+sal_Bool ScCompiler::EnQuote( String& rStr )
{
sal_Int32 nType = ScGlobal::pCharClass->getStringType( rStr, 0, rStr.Len() );
if ( !CharClass::isNumericType( nType )
&& CharClass::isAlphaNumericType( nType ) )
- return FALSE;
+ return false;
xub_StrLen nPos = 0;
while ( (nPos = rStr.Search( '\'', nPos)) != STRING_NOTFOUND )
@@ -5109,7 +5105,7 @@ BOOL ScCompiler::EnQuote( String& rStr )
}
rStr.Insert( '\'', 0 );
rStr += '\'';
- return TRUE;
+ return sal_True;
}
sal_Unicode ScCompiler::GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const
@@ -5147,24 +5143,24 @@ void ScCompiler::fillAddInToken(::std::vector< ::com::sun::star::sheet::FormulaO
// FIXME: what about those old non-UNO AddIns?
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::HandleSingleRef()
+sal_Bool ScCompiler::HandleSingleRef()
{
ScSingleRefData& rRef = static_cast<ScToken*>(pToken.get())->GetSingleRef();
rRef.CalcAbsIfRel( aPos );
if ( !rRef.Valid() )
{
SetError( errNoRef );
- return TRUE;
+ return sal_True;
}
SCCOL nCol = rRef.nCol;
SCROW nRow = rRef.nRow;
SCTAB nTab = rRef.nTab;
ScAddress aLook( nCol, nRow, nTab );
- BOOL bColName = rRef.IsColRel();
+ sal_Bool bColName = rRef.IsColRel();
SCCOL nMyCol = aPos.Col();
SCROW nMyRow = aPos.Row();
- BOOL bInList = FALSE;
- BOOL bValidName = FALSE;
+ sal_Bool bInList = false;
+ sal_Bool bValidName = false;
ScRangePairList* pRL = (bColName ?
pDoc->GetColNameRanges() : pDoc->GetRowNameRanges());
ScRange aRange;
@@ -5173,7 +5169,7 @@ BOOL ScCompiler::HandleSingleRef()
ScRangePair* pR = (*pRL)[i];
if ( pR->GetRange(0).In( aLook ) )
{
- bInList = bValidName = TRUE;
+ bInList = bValidName = sal_True;
aRange = pR->GetRange(1);
if ( bColName )
{
@@ -5190,12 +5186,12 @@ BOOL ScCompiler::HandleSingleRef()
}
if ( !bInList && pDoc->GetDocOptions().IsLookUpColRowNames() )
{ // automagically or created by copying and NamePos isn't in list
- BOOL bString = pDoc->HasStringData( nCol, nRow, nTab );
+ sal_Bool bString = pDoc->HasStringData( nCol, nRow, nTab );
if ( !bString && !pDoc->GetCell( aLook ) )
- bString = TRUE; // empty cell is ok
+ bString = sal_True; // empty cell is ok
if ( bString )
{ //! coresponds with ScInterpreter::ScColRowNameAuto()
- bValidName = TRUE;
+ bValidName = sal_True;
if ( bColName )
{ // ColName
SCROW nStartRow = nRow + 1;
@@ -5273,10 +5269,10 @@ BOOL ScCompiler::HandleSingleRef()
// generated. A ocColRowName or ocIntersect as a neighbor results
// in a range. Special case: if label is valid for a single cell, a
// position independent SingleRef is generated.
- BOOL bSingle = (aRange.aStart == aRange.aEnd);
- BOOL bFound;
+ sal_Bool bSingle = (aRange.aStart == aRange.aEnd);
+ sal_Bool bFound;
if ( bSingle )
- bFound = TRUE;
+ bFound = sal_True;
else
{
FormulaToken* p1 = pArr->PeekPrevNoSpaces();
@@ -5289,7 +5285,7 @@ BOOL ScCompiler::HandleSingleRef()
{
if ( (SC_OPCODE_START_BIN_OP <= eOp1 && eOp1 < SC_OPCODE_STOP_BIN_OP) ||
(SC_OPCODE_START_BIN_OP <= eOp2 && eOp2 < SC_OPCODE_STOP_BIN_OP))
- bSingle = TRUE;
+ bSingle = sal_True;
}
if ( bSingle )
{ // column and/or row must match range
@@ -5309,7 +5305,7 @@ BOOL ScCompiler::HandleSingleRef()
}
}
else
- bFound = TRUE;
+ bFound = sal_True;
}
if ( !bFound )
SetError(errNoRef);
@@ -5321,9 +5317,9 @@ BOOL ScCompiler::HandleSingleRef()
ScSingleRefData aRefData;
aRefData.InitAddress( aRange.aStart );
if ( bColName )
- aRefData.SetColRel( TRUE );
+ aRefData.SetColRel( sal_True );
else
- aRefData.SetRowRel( TRUE );
+ aRefData.SetRowRel( sal_True );
aRefData.CalcRelFromAbs( aPos );
pNew->AddSingleReference( aRefData );
}
@@ -5333,13 +5329,13 @@ BOOL ScCompiler::HandleSingleRef()
aRefData.InitRange( aRange );
if ( bColName )
{
- aRefData.Ref1.SetColRel( TRUE );
- aRefData.Ref2.SetColRel( TRUE );
+ aRefData.Ref1.SetColRel( sal_True );
+ aRefData.Ref2.SetColRel( sal_True );
}
else
{
- aRefData.Ref1.SetRowRel( TRUE );
- aRefData.Ref2.SetRowRel( TRUE );
+ aRefData.Ref1.SetRowRel( sal_True );
+ aRefData.Ref2.SetRowRel( sal_True );
}
aRefData.CalcRelFromAbs( aPos );
if ( bInList )
@@ -5349,17 +5345,17 @@ BOOL ScCompiler::HandleSingleRef()
pNew->Add( new ScDoubleRefToken( aRefData, ocColRowNameAuto ) );
}
}
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
return GetToken();
}
}
else
SetError(errNoName);
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::HandleDbData()
+sal_Bool ScCompiler::HandleDbData()
{
ScDBData* pDBData = pDoc->GetDBCollection()->FindIndex( pToken->GetIndex() );
if ( !pDBData )
@@ -5377,11 +5373,11 @@ BOOL ScCompiler::HandleDbData()
aRefData.CalcRelFromAbs( aPos );
ScTokenArray* pNew = new ScTokenArray();
pNew->AddDoubleReference( aRefData );
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
return GetToken();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index f881a23d9cd2..e92963b0c645 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -107,10 +107,10 @@ void lcl_AddString( String**& pData, T& nCount, const String& rInsert )
ScConsData::ScConsData() :
eFunction(SUBTOTAL_FUNC_SUM),
- bReference(FALSE),
- bColByName(FALSE),
- bRowByName(FALSE),
- bSubTitles(FALSE),
+ bReference(false),
+ bColByName(false),
+ bRowByName(false),
+ bSubTitles(false),
nColCount(0),
nRowCount(0),
ppUsed(NULL),
@@ -124,7 +124,7 @@ ScConsData::ScConsData() :
nTitleCount(0),
ppTitles(NULL),
ppTitlePos(NULL),
- bCornerUsed(FALSE)
+ bCornerUsed(false)
{
}
@@ -136,7 +136,7 @@ ScConsData::~ScConsData()
#define DELETEARR(ppArray,nCount) \
{ \
- ULONG i; \
+ sal_uLong i; \
if (ppArray) \
for(i=0; i<nCount; i++) \
delete[] ppArray[i]; \
@@ -146,7 +146,7 @@ ScConsData::~ScConsData()
#define DELETESTR(ppArray,nCount) \
{ \
- ULONG i; \
+ sal_uLong i; \
if (ppArray) \
for(i=0; i<nCount; i++) \
delete ppArray[i]; \
@@ -183,14 +183,14 @@ void ScConsData::DeleteData()
if (bColByName) nColCount = 0; // sonst stimmt ppColHeaders nicht
if (bRowByName) nRowCount = 0;
- bCornerUsed = FALSE;
+ bCornerUsed = false;
aCornerText.Erase();
}
#undef DELETEARR
#undef DELETESTR
-void ScConsData::InitData( BOOL bDelete )
+void ScConsData::InitData( sal_Bool bDelete )
{
if (bDelete)
DeleteData();
@@ -216,11 +216,11 @@ void ScConsData::InitData( BOOL bDelete )
if (nColCount && !ppUsed)
{
- ppUsed = new BOOL*[nColCount];
+ ppUsed = new sal_Bool*[nColCount];
for (SCSIZE i=0; i<nColCount; i++)
{
- ppUsed[i] = new BOOL[nRowCount];
- memset( ppUsed[i], 0, nRowCount * sizeof(BOOL) );
+ ppUsed[i] = new sal_Bool[nRowCount];
+ memset( ppUsed[i], 0, nRowCount * sizeof(sal_Bool) );
}
}
@@ -239,7 +239,7 @@ void ScConsData::InitData( BOOL bDelete )
void ScConsData::DoneFields()
{
- InitData(FALSE);
+ InitData(false);
}
void ScConsData::SetSize( SCCOL nCols, SCROW nRows )
@@ -255,7 +255,7 @@ void ScConsData::GetSize( SCCOL& rCols, SCROW& rRows ) const
rRows = static_cast<SCROW>(nRowCount);
}
-void ScConsData::SetFlags( ScSubTotalFunc eFunc, BOOL bColName, BOOL bRowName, BOOL bRef )
+void ScConsData::SetFlags( ScSubTotalFunc eFunc, sal_Bool bColName, sal_Bool bRowName, sal_Bool bRef )
{
DeleteData();
bReference = bRef;
@@ -285,10 +285,10 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
pSrcDoc->GetString( nCol, nRow1, nTab, aTitle );
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
for (SCSIZE i=0; i<nColCount && !bFound; i++)
if ( *ppColHeaders[i] == aTitle )
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
lcl_AddString( ppColHeaders, nColCount, aTitle );
}
@@ -302,10 +302,10 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
pSrcDoc->GetString( nCol1, nRow, nTab, aTitle );
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
for (SCSIZE i=0; i<nRowCount && !bFound; i++)
if ( *ppRowHeaders[i] == aTitle )
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
lcl_AddString( ppRowHeaders, nRowCount, aTitle );
}
@@ -335,7 +335,7 @@ void ScConsData::AddName( const String& rName )
{
if (!ppUsed[nArrX][nArrY])
{
- ppUsed[nArrX][nArrY] = TRUE;
+ ppUsed[nArrX][nArrY] = sal_True;
ppRefs[nArrX][nArrY].Init();
}
ppRefs[nArrX][nArrY].SetFullSize(nMax);
@@ -390,7 +390,7 @@ void lcl_UpdateArray( ScSubTotalFunc eFunc,
case SUBTOTAL_FUNC_VAR:
case SUBTOTAL_FUNC_VARP:
{
- BOOL bOk = SubTotal::SafePlus(rSum, nVal);
+ sal_Bool bOk = SubTotal::SafePlus(rSum, nVal);
bOk = bOk && SubTotal::SafeMult(nVal, nVal);
bOk = bOk && SubTotal::SafePlus(rSumSqr, nVal);
if (!bOk)
@@ -425,7 +425,7 @@ void lcl_InitArray( ScSubTotalFunc eFunc,
case SUBTOTAL_FUNC_VARP:
{
rSum = nVal;
- BOOL bOk = SubTotal::SafeMult(nVal, nVal);
+ sal_Bool bOk = SubTotal::SafeMult(nVal, nVal);
if (bOk)
rSumSqr = nVal;
else
@@ -536,7 +536,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
else
{
aCornerText = aThisCorner;
- bCornerUsed = TRUE;
+ bCornerUsed = sal_True;
}
}
@@ -558,12 +558,12 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
SCCOL nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
for (SCSIZE i=0; i<nColCount && !bFound; i++)
if ( *ppColHeaders[i] == aTitle )
{
nPos = static_cast<SCCOL>(i);
- bFound = TRUE;
+ bFound = sal_True;
}
DBG_ASSERT(bFound, "Spalte nicht gefunden");
}
@@ -579,12 +579,12 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
SCROW nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
for (SCSIZE i=0; i<nRowCount && !bFound; i++)
if ( *ppRowHeaders[i] == aTitle )
{
nPos = static_cast<SCROW>(i);
- bFound = TRUE;
+ bFound = sal_True;
}
DBG_ASSERT(bFound, "Zeile nicht gefunden");
}
@@ -596,7 +596,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
// Daten
- BOOL bAnyCell = ( eFunction == SUBTOTAL_FUNC_CNT2 );
+ sal_Bool bAnyCell = ( eFunction == SUBTOTAL_FUNC_CNT2 );
for (nCol=nCol1; nCol<=nCol2; nCol++)
{
SCCOL nArrX = nCol-nCol1;
@@ -617,7 +617,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
ppRefs[nArrX][nArrY].AddEntry( nCol, nRow, nTab );
else
{
- ppUsed[nArrX][nArrY] = TRUE;
+ ppUsed[nArrX][nArrY] = sal_True;
ppRefs[nArrX][nArrY].Init();
ppRefs[nArrX][nArrY].AddEntry( nCol, nRow, nTab );
}
@@ -632,7 +632,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
nVal);
else
{
- ppUsed[nArrX][nArrY] = TRUE;
+ ppUsed[nArrX][nArrY] = sal_True;
lcl_InitArray( eFunction, ppCount[nArrX][nArrY],
ppSum[nArrX][nArrY],
ppSumSqr[nArrX][nArrY], nVal );
@@ -728,12 +728,12 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
ScSingleRefData aSRef; // Daten fuer Referenz-Formelzellen
aSRef.InitFlags();
- aSRef.SetFlag3D(TRUE);
+ aSRef.SetFlag3D(sal_True);
ScComplexRefData aCRef; // Daten fuer Summen-Zellen
aCRef.InitFlags();
- aCRef.Ref1.SetColRel(TRUE); aCRef.Ref1.SetRowRel(TRUE); aCRef.Ref1.SetTabRel(TRUE);
- aCRef.Ref2.SetColRel(TRUE); aCRef.Ref2.SetRowRel(TRUE); aCRef.Ref2.SetTabRel(TRUE);
+ aCRef.Ref1.SetColRel(sal_True); aCRef.Ref1.SetRowRel(sal_True); aCRef.Ref1.SetTabRel(sal_True);
+ aCRef.Ref2.SetColRel(sal_True); aCRef.Ref2.SetRowRel(sal_True); aCRef.Ref2.SetTabRel(sal_True);
for (nArrY=0; nArrY<nRowCount; nArrY++)
{
@@ -798,16 +798,16 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
// Gliederung einfuegen
- ScOutlineArray* pOutArr = pDestDoc->GetOutlineTable( nTab, TRUE )->GetRowArray();
+ ScOutlineArray* pOutArr = pDestDoc->GetOutlineTable( nTab, sal_True )->GetRowArray();
SCROW nOutStart = nRow+nArrY;
SCROW nOutEnd = nRow+nArrY+nNeeded-1;
- BOOL bSize = FALSE;
+ sal_Bool bSize = false;
pOutArr->Insert( nOutStart, nOutEnd, bSize );
pDestDoc->InitializeNoteCaptions(nTab);
for (SCROW nOutRow=nOutStart; nOutRow<=nOutEnd; nOutRow++)
- pDestDoc->ShowRow( nOutRow, nTab, FALSE );
+ pDestDoc->ShowRow( nOutRow, nTab, false );
pDestDoc->SetDrawPageSize(nTab);
- pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, FALSE );
+ pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, false );
// Zwischentitel
@@ -817,10 +817,10 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
for (SCSIZE nPos=0; nPos<nDataCount; nPos++)
{
SCSIZE nTPos = ppTitlePos[nArrY][nPos];
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
if (nPos+1<nDataCount)
if (ppTitlePos[nArrY][nPos+1] == nTPos)
- bDo = FALSE; // leer
+ bDo = false; // leer
if ( bDo && nTPos < nNeeded )
{
aString = *ppRowHeaders[nArrY];
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index 3bd737b2c572..a7e27dcf4dd2 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -47,7 +47,7 @@
ScDBData::ScDBData( const String& rName,
SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- BOOL bByR, BOOL bHasH) :
+ sal_Bool bByR, sal_Bool bHasH) :
aName (rName),
nTable (nTab),
nStartCol (nCol1),
@@ -56,16 +56,16 @@ ScDBData::ScDBData( const String& rName,
nEndRow (nRow2),
bByRow (bByR),
bHasHeader (bHasH),
- bDoSize (FALSE),
- bKeepFmt (FALSE),
- bStripData (FALSE),
- bIsAdvanced (FALSE),
- bDBSelection(FALSE),
+ bDoSize (false),
+ bKeepFmt (false),
+ bStripData (false),
+ bIsAdvanced (false),
+ bDBSelection(false),
nIndex (0),
- bAutoFilter (FALSE),
- bModified (FALSE)
+ bAutoFilter (false),
+ bModified (false)
{
- USHORT i;
+ sal_uInt16 i;
ScSortParam aSortParam;
ScQueryParam aQueryParam;
@@ -142,8 +142,8 @@ ScDBData::ScDBData( const ScDBData& rData ) :
bAutoFilter (rData.bAutoFilter),
bModified (rData.bModified)
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
for (i=0; i<MAXSORT; i++)
{
@@ -182,8 +182,8 @@ ScDBData::ScDBData( const ScDBData& rData ) :
ScDBData& ScDBData::operator= (const ScDBData& rData)
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
ScRefreshTimer::operator=( rData );
aName = rData.aName;
@@ -275,7 +275,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
return *this;
}
-BOOL ScDBData::operator== (const ScDBData& rData) const
+sal_Bool ScDBData::operator== (const ScDBData& rData) const
{
// Daten, die nicht in den Params sind
@@ -288,42 +288,42 @@ BOOL ScDBData::operator== (const ScDBData& rData) const
// bAutoFilter!= rData.bAutoFilter||
ScRefreshTimer::operator!=( rData )
)
- return FALSE;
+ return false;
if ( bIsAdvanced && aAdvSource != rData.aAdvSource )
- return FALSE;
+ return false;
ScSortParam aSort1, aSort2;
GetSortParam(aSort1);
rData.GetSortParam(aSort2);
if (!(aSort1 == aSort2))
- return FALSE;
+ return false;
ScQueryParam aQuery1, aQuery2;
GetQueryParam(aQuery1);
rData.GetQueryParam(aQuery2);
if (!(aQuery1 == aQuery2))
- return FALSE;
+ return false;
ScSubTotalParam aSubTotal1, aSubTotal2;
GetSubTotalParam(aSubTotal1);
rData.GetSubTotalParam(aSubTotal2);
if (!(aSubTotal1 == aSubTotal2))
- return FALSE;
+ return false;
ScImportParam aImport1, aImport2;
GetImportParam(aImport1);
rData.GetImportParam(aImport2);
if (!(aImport1 == aImport2))
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
ScDBData::~ScDBData()
{
StopRefreshTimer();
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<MAXQUERY; i++)
delete pQueryStr[i];
@@ -405,7 +405,7 @@ void ScDBData::SetDynamicEndRow(SCROW nRow)
void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
{
- USHORT i;
+ sal_uInt16 i;
long nDifX = ((long) nCol1) - ((long) nStartCol);
long nDifY = ((long) nRow1) - ((long) nStartRow);
@@ -418,7 +418,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
if (nSortField[i] > nSortEnd)
{
nSortField[i] = 0;
- bDoSort[i] = FALSE;
+ bDoSort[i] = false;
}
}
for (i=0; i<MAXQUERY; i++)
@@ -427,7 +427,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
if (nQueryField[i] > nCol2)
{
nQueryField[i] = 0;
- bDoQuery[i] = FALSE;
+ bDoQuery[i] = false;
}
}
for (i=0; i<MAXSUBTOTAL; i++)
@@ -436,7 +436,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
if (nSubField[i] > nCol2)
{
nSubField[i] = 0;
- bDoSubTotal[i] = FALSE;
+ bDoSubTotal[i] = false;
}
}
@@ -460,7 +460,7 @@ void ScDBData::GetSortParam( ScSortParam& rSortParam ) const
rSortParam.bIncludePattern = bIncludePattern;
rSortParam.bUserDef = bSortUserDef;
rSortParam.nUserIndex = nSortUserIndex;
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
rSortParam.bDoSort[i] = bDoSort[i];
rSortParam.nField[i] = nSortField[i];
@@ -481,7 +481,7 @@ void ScDBData::SetSortParam( const ScSortParam& rSortParam )
nSortDestRow = rSortParam.nDestRow;
bSortUserDef = rSortParam.bUserDef;
nSortUserIndex = rSortParam.nUserIndex;
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
bDoSort[i] = rSortParam.bDoSort[i];
nSortField[i] = rSortParam.nField[i];
@@ -534,9 +534,9 @@ void ScDBData::SetQueryParam(const ScQueryParam& rQueryParam)
!rQueryParam.GetEntry(MAXQUERY).bDoQuery,
"zuviele Eintraege bei ScDBData::SetQueryParam" );
- // set bIsAdvanced to FALSE for everything that is not from the
+ // set bIsAdvanced to sal_False for everything that is not from the
// advanced filter dialog
- bIsAdvanced = FALSE;
+ bIsAdvanced = false;
bQueryInplace = rQueryParam.bInplace;
bQueryCaseSens = rQueryParam.bCaseSens;
@@ -565,13 +565,13 @@ void ScDBData::SetAdvancedQuerySource(const ScRange* pSource)
if (pSource)
{
aAdvSource = *pSource;
- bIsAdvanced = TRUE;
+ bIsAdvanced = sal_True;
}
else
- bIsAdvanced = FALSE;
+ bIsAdvanced = false;
}
-BOOL ScDBData::GetAdvancedQuerySource(ScRange& rSource) const
+sal_Bool ScDBData::GetAdvancedQuerySource(ScRange& rSource) const
{
rSource = aAdvSource;
return bIsAdvanced;
@@ -579,8 +579,8 @@ BOOL ScDBData::GetAdvancedQuerySource(ScRange& rSource) const
void ScDBData::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
rSubTotalParam.nCol1 = nStartCol;
rSubTotalParam.nRow1 = nStartRow;
@@ -619,8 +619,8 @@ void ScDBData::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const
void ScDBData::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam)
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
bSubRemoveOnly = rSubTotalParam.bRemoveOnly;
bSubReplace = rSubTotalParam.bReplace;
@@ -676,7 +676,7 @@ void ScDBData::SetImportParam(const ScImportParam& rImportParam)
nDBType = rImportParam.nType;
}
-BOOL ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const
+sal_Bool ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const
{
if (nTab == nTable)
{
@@ -687,12 +687,12 @@ BOOL ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly)
nRow >= nStartRow && nRow <= nEndRow );
}
- return FALSE;
+ return false;
}
-BOOL ScDBData::IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
+sal_Bool ScDBData::IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
{
- return (BOOL)((nTab == nTable)
+ return (sal_Bool)((nTab == nTable)
&& (nCol1 == nStartCol) && (nRow1 == nStartRow)
&& (nCol2 == nEndCol) && (nRow2 == nEndRow));
}
@@ -715,19 +715,19 @@ short ScDBCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
// IsEqual - alles gleich
-BOOL ScDBCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
+sal_Bool ScDBCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return *(ScDBData*)pKey1 == *(ScDBData*)pKey2;
}
-ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const
+ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const
{
ScDBData* pNoNameData = NULL;
if (pItems)
{
const String& rNoName = ScGlobal::GetRscString( STR_DB_NONAME );
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
if (((ScDBData*)pItems[i])->IsDBAtCursor(nCol, nRow, nTab, bStartOnly))
{
ScDBData* pDB = (ScDBData*)pItems[i];
@@ -747,7 +747,7 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
{
const String& rNoName = ScGlobal::GetRscString( STR_DB_NONAME );
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
if (((ScDBData*)pItems[i])->IsDBAtArea(nTab, nCol1, nRow1, nCol2, nRow2))
{
ScDBData* pDB = (ScDBData*)pItems[i];
@@ -760,7 +760,7 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden
}
-BOOL ScDBCollection::SearchName( const String& rName, USHORT& rIndex ) const
+sal_Bool ScDBCollection::SearchName( const String& rName, sal_uInt16& rIndex ) const
{
ScDBData aDataObj( rName, 0,0,0,0,0 );
return Search( &aDataObj, rIndex );
@@ -768,7 +768,7 @@ BOOL ScDBCollection::SearchName( const String& rName, USHORT& rIndex ) const
void ScDBCollection::DeleteOnTab( SCTAB nTab )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < nCount )
{
// look for output positions on the deleted sheet
@@ -789,7 +789,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
SCCOL theCol1;
SCROW theRow1;
@@ -800,7 +800,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode,
((ScDBData*)pItems[i])->GetArea( theTab1, theCol1, theRow1, theCol2, theRow2 );
theTab2 = theTab1;
- BOOL bDoUpdate = ScRefUpdate::Update( pDoc, eUpdateRefMode,
+ sal_Bool bDoUpdate = ScRefUpdate::Update( pDoc, eUpdateRefMode,
nCol1,nRow1,nTab1, nCol2,nRow2,nTab2, nDx,nDy,nDz,
theCol1,theRow1,theTab1, theCol2,theRow2,theTab2 ) != UR_NOTHING;
if (bDoUpdate)
@@ -818,7 +818,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode,
aAdvSource.aEnd.Set( theCol2,theRow2,theTab2 );
((ScDBData*)pItems[i])->SetAdvancedQuerySource( &aAdvSource );
- bDoUpdate = TRUE; // DBData is modified
+ bDoUpdate = sal_True; // DBData is modified
}
}
@@ -833,7 +833,7 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
// wenn nOldPos vor nNewPos liegt, ist nNewPos schon angepasst
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScRange aRange;
ScDBData* pData = (ScDBData*)pItems[i];
@@ -855,7 +855,7 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
++nTab;
}
- BOOL bChanged = ( nTab != aRange.aStart.Tab() );
+ sal_Bool bChanged = ( nTab != aRange.aStart.Tab() );
if (bChanged)
pData->SetArea( nTab, aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(),aRange.aEnd .Row() );
@@ -867,9 +867,9 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
}
-ScDBData* ScDBCollection::FindIndex(USHORT nIndex)
+ScDBData* ScDBCollection::FindIndex(sal_uInt16 nIndex)
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while (i < nCount)
{
if ((*this)[i]->GetIndex() == nIndex)
@@ -879,12 +879,12 @@ ScDBData* ScDBCollection::FindIndex(USHORT nIndex)
return NULL;
}
-BOOL ScDBCollection::Insert(ScDataObject* pScDataObject)
+sal_Bool ScDBCollection::Insert(ScDataObject* pScDataObject)
{
ScDBData* pData = (ScDBData*) pScDataObject;
if (!pData->GetIndex()) // schon gesetzt?
pData->SetIndex(nEntryIndex++);
- BOOL bInserted = ScSortedCollection::Insert(pScDataObject);
+ sal_Bool bInserted = ScSortedCollection::Insert(pScDataObject);
if ( bInserted && pData->HasImportParam() && !pData->HasImportSelection() )
{
pData->SetRefreshHandler( GetRefreshHandler() );
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index c3def17327b2..1f0a1f7b5f8c 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -47,19 +47,19 @@ TYPEINIT2(ScDdeLink,::sfx2::SvBaseLink,SfxBroadcaster);
#define DDE_TXT_ENCODING gsl_getSystemTextEncoding()
-BOOL ScDdeLink::bIsInUpdate = FALSE;
+sal_Bool ScDdeLink::bIsInUpdate = false;
//------------------------------------------------------------------------
ScDdeLink::ScDdeLink( ScDocument* pD, const String& rA, const String& rT, const String& rI,
- BYTE nM ) :
+ sal_uInt8 nM ) :
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING),
pDoc( pD ),
aAppl( rA ),
aTopic( rT ),
aItem( rI ),
nMode( nM ),
- bNeedUpdate( FALSE ),
+ bNeedUpdate( false ),
pResult( NULL )
{
}
@@ -78,7 +78,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) :
aTopic ( rOther.aTopic ),
aItem ( rOther.aItem ),
nMode ( rOther.nMode ),
- bNeedUpdate( FALSE ),
+ bNeedUpdate( false ),
pResult ( NULL )
{
if (rOther.pResult)
@@ -88,7 +88,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) :
ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& rHdr ) :
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING),
pDoc( pD ),
- bNeedUpdate( FALSE ),
+ bNeedUpdate( false ),
pResult( NULL )
{
rHdr.StartEntry();
@@ -98,7 +98,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& r
rStream.ReadByteString( aTopic, eCharSet );
rStream.ReadByteString( aItem, eCharSet );
- BOOL bHasValue;
+ sal_Bool bHasValue;
rStream >> bHasValue;
if ( bHasValue )
pResult = new ScMatrix(0, 0);
@@ -120,7 +120,7 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const
rStream.WriteByteString( aTopic, eCharSet );
rStream.WriteByteString( aItem, eCharSet );
- BOOL bHasValue = ( pResult != NULL );
+ sal_Bool bHasValue = ( pResult != NULL );
rStream << bHasValue;
if( rStream.GetVersion() > SOFFICE_FILEFORMAT_40 ) // nicht bei 4.0 Export
@@ -175,7 +175,7 @@ void ScDdeLink::DataChanged( const String& rMimeType,
// SC_DDE_DEFAULT - Zahlformat aus Zellvorlage "Standard"
// SC_DDE_ENGLISH - Standard-Zahlformat fuer English/US
// SC_DDE_TEXT - ohne NumberFormatter direkt als String
- ULONG nStdFormat = 0;
+ sal_uLong nStdFormat = 0;
if ( nMode == SC_DDE_DEFAULT )
{
ScPatternAttr* pDefPattern = pDoc->GetDefPattern(); // enthaelt Standard-Vorlage
@@ -240,8 +240,8 @@ void ScDdeLink::ResetValue()
void ScDdeLink::ListenersGone()
{
- BOOL bWas = bIsInUpdate;
- bIsInUpdate = TRUE; // Remove() kann Reschedule ausloesen??!?
+ sal_Bool bWas = bIsInUpdate;
+ bIsInUpdate = sal_True; // Remove() kann Reschedule ausloesen??!?
ScDocument* pStackDoc = pDoc; // member pDoc can't be used after removing the link
@@ -261,15 +261,15 @@ void ScDdeLink::ListenersGone()
void ScDdeLink::TryUpdate()
{
if (bIsInUpdate)
- bNeedUpdate = TRUE; // kann jetzt nicht ausgefuehrt werden
+ bNeedUpdate = sal_True; // kann jetzt nicht ausgefuehrt werden
else
{
- bIsInUpdate = TRUE;
+ bIsInUpdate = true;
pDoc->IncInDdeLinkUpdate();
Update();
pDoc->DecInDdeLinkUpdate();
- bIsInUpdate = FALSE;
- bNeedUpdate = FALSE;
+ bIsInUpdate = false;
+ bNeedUpdate = false;
}
}
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index 075187105461..57000eb99844 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -47,17 +47,17 @@ SV_IMPL_PTRARR( ScDetOpArr_Impl, ScDetOpDataPtr );
ScDetOpList::ScDetOpList(const ScDetOpList& rList) :
ScDetOpArr_Impl(),
- bHasAddError( FALSE )
+ bHasAddError( false )
{
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
Append( new ScDetOpData(*rList[i]) );
}
void ScDetOpList::DeleteOnTab( SCTAB nTab )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < Count() )
{
// look for operations on the deleted sheet
@@ -72,8 +72,8 @@ void ScDetOpList::DeleteOnTab( SCTAB nTab )
void ScDetOpList::UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScAddress aPos = (*this)[i]->GetPos();
SCCOL nCol1 = aPos.Col();
@@ -96,21 +96,21 @@ void ScDetOpList::UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMod
void ScDetOpList::Append( ScDetOpData* pDetOpData )
{
if ( pDetOpData->GetOperation() == SCDETOP_ADDERROR )
- bHasAddError = TRUE;
+ bHasAddError = sal_True;
Insert( pDetOpData, Count() );
}
-BOOL ScDetOpList::operator==( const ScDetOpList& r ) const
+sal_Bool ScDetOpList::operator==( const ScDetOpList& r ) const
{
// fuer Ref-Undo
- USHORT nCount = Count();
- BOOL bEqual = ( nCount == r.Count() );
- for (USHORT i=0; i<nCount && bEqual; i++) // Reihenfolge muss auch gleich sein
+ sal_uInt16 nCount = Count();
+ sal_Bool bEqual = ( nCount == r.Count() );
+ for (sal_uInt16 i=0; i<nCount && bEqual; i++) // Reihenfolge muss auch gleich sein
if ( !(*(*this)[i] == *r[i]) ) // Eintraege unterschiedlich ?
- bEqual = FALSE;
+ bEqual = false;
return bEqual;
}
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index dd063f5d341a..801a0535c4e4 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -110,7 +110,7 @@ private:
SfxItemSet aToTabSet;
SfxItemSet aFromTabSet;
SfxItemSet aCircleSet; //! einzeln ?
- USHORT nMaxLevel;
+ sal_uInt16 nMaxLevel;
public:
ScDetectiveData( SdrModel* pModel );
@@ -121,8 +121,8 @@ public:
SfxItemSet& GetFromTabSet() { return aFromTabSet; }
SfxItemSet& GetCircleSet() { return aCircleSet; }
- void SetMaxLevel( USHORT nVal ) { nMaxLevel = nVal; }
- USHORT GetMaxLevel() const { return nMaxLevel; }
+ void SetMaxLevel( sal_uInt16 nVal ) { nMaxLevel = nVal; }
+ sal_uInt16 GetMaxLevel() const { return nMaxLevel; }
};
class ScCommentData
@@ -142,11 +142,11 @@ private:
ColorData ScDetectiveFunc::nArrowColor = 0;
ColorData ScDetectiveFunc::nErrorColor = 0;
ColorData ScDetectiveFunc::nCommentColor = 0;
-BOOL ScDetectiveFunc::bColorsInitialized = FALSE;
+sal_Bool ScDetectiveFunc::bColorsInitialized = false;
//------------------------------------------------------------------------
-BOOL lcl_HasThickLine( SdrObject& rObj )
+sal_Bool lcl_HasThickLine( SdrObject& rObj )
{
// thin lines get width 0 -> everything greater 0 is a thick line
@@ -190,28 +190,28 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
aArrowSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aCircle) ) );
aArrowSet.Put( XLineStartWidthItem( 200 ) );
- aArrowSet.Put( XLineStartCenterItem( TRUE ) );
+ aArrowSet.Put( XLineStartCenterItem( sal_True ) );
aArrowSet.Put( XLineEndItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) );
aArrowSet.Put( XLineEndWidthItem( 200 ) );
- aArrowSet.Put( XLineEndCenterItem( FALSE ) );
+ aArrowSet.Put( XLineEndCenterItem( false ) );
aToTabSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aCircle) ) );
aToTabSet.Put( XLineStartWidthItem( 200 ) );
- aToTabSet.Put( XLineStartCenterItem( TRUE ) );
+ aToTabSet.Put( XLineStartCenterItem( sal_True ) );
aToTabSet.Put( XLineEndItem( aName, basegfx::B2DPolyPolygon(aSquare) ) );
aToTabSet.Put( XLineEndWidthItem( 300 ) );
- aToTabSet.Put( XLineEndCenterItem( FALSE ) );
+ aToTabSet.Put( XLineEndCenterItem( false ) );
aFromTabSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aSquare) ) );
aFromTabSet.Put( XLineStartWidthItem( 300 ) );
- aFromTabSet.Put( XLineStartCenterItem( TRUE ) );
+ aFromTabSet.Put( XLineStartCenterItem( sal_True ) );
aFromTabSet.Put( XLineEndItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) );
aFromTabSet.Put( XLineEndWidthItem( 200 ) );
- aFromTabSet.Put( XLineEndCenterItem( FALSE ) );
+ aFromTabSet.Put( XLineEndCenterItem( false ) );
aCircleSet.Put( XLineColorItem( String(), Color( ScDetectiveFunc::GetErrorColor() ) ) );
aCircleSet.Put( XFillStyleItem( XFILL_NONE ) );
- USHORT nWidth = 55; // 54 = 1 Pixel
+ sal_uInt16 nWidth = 55; // 54 = 1 Pixel
aCircleSet.Put( XLineWidthItem( nWidth ) );
}
@@ -228,16 +228,16 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
aCaptionSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) );
aCaptionSet.Put( XLineStartWidthItem( 200 ) );
- aCaptionSet.Put( XLineStartCenterItem( FALSE ) );
+ aCaptionSet.Put( XLineStartCenterItem( false ) );
aCaptionSet.Put( XFillStyleItem( XFILL_SOLID ) );
Color aYellow( ScDetectiveFunc::GetCommentColor() );
aCaptionSet.Put( XFillColorItem( String(), aYellow ) );
// shadow
- // SdrShadowItem has FALSE, instead the shadow is set for the rectangle
+ // SdrShadowItem has sal_False, instead the shadow is set for the rectangle
// only with SetSpecialTextBoxShadow when the object is created
// (item must be set to adjust objects from older files)
- aCaptionSet.Put( SdrShadowItem( FALSE ) );
+ aCaptionSet.Put( SdrShadowItem( false ) );
aCaptionSet.Put( SdrShadowXDistItem( 100 ) );
aCaptionSet.Put( SdrShadowYDistItem( 100 ) );
@@ -247,8 +247,8 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
aCaptionSet.Put( SdrTextUpperDistItem( 100 ) );
aCaptionSet.Put( SdrTextLowerDistItem( 100 ) );
- aCaptionSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aCaptionSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aCaptionSet.Put( SdrTextAutoGrowWidthItem( false ) );
+ aCaptionSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
// do use the default cell style, so the user has a chance to
// modify the font for the annotations
@@ -265,9 +265,9 @@ void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet )
SfxWhichIter aWhichIter( rItemSet );
const SfxPoolItem* pPoolItem = 0;
- for( USHORT nWhich = aWhichIter.FirstWhich(); nWhich > 0; nWhich = aWhichIter.NextWhich() )
+ for( sal_uInt16 nWhich = aWhichIter.FirstWhich(); nWhich > 0; nWhich = aWhichIter.NextWhich() )
{
- if(rItemSet.GetItemState(nWhich, FALSE, &pPoolItem) == SFX_ITEM_SET)
+ if(rItemSet.GetItemState(nWhich, false, &pPoolItem) == SFX_ITEM_SET)
{
switch(nWhich)
{
@@ -297,20 +297,20 @@ void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet )
void ScDetectiveFunc::Modified()
{
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
}
-inline BOOL Intersect( SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1,
+inline sal_Bool Intersect( SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1,
SCCOL nStartCol2, SCROW nStartRow2, SCCOL nEndCol2, SCROW nEndRow2 )
{
return nEndCol1 >= nStartCol2 && nEndCol2 >= nStartCol1 &&
nEndRow1 >= nStartRow2 && nEndRow2 >= nStartRow1;
}
-BOOL ScDetectiveFunc::HasError( const ScRange& rRange, ScAddress& rErrPos )
+sal_Bool ScDetectiveFunc::HasError( const ScRange& rRange, ScAddress& rErrPos )
{
rErrPos = rRange.aStart;
- USHORT nError = 0;
+ sal_uInt16 nError = 0;
ScCellIterator aCellIter( pDoc, rRange);
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -391,7 +391,7 @@ Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const
return GetDrawRect( nCol, nRow, nCol, nRow );
}
-BOOL lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon )
+sal_Bool lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon )
{
// test if rPolygon is the line end for "other table" (rectangle)
if(1L == rPolyPolygon.count())
@@ -409,16 +409,16 @@ BOOL lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon )
return false;
}
-BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
+sal_Bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab )
{
- BOOL bStartAlien = ( rStart.Tab() != nTab );
- BOOL bEndAlien = ( nEndTab != nTab );
+ sal_Bool bStartAlien = ( rStart.Tab() != nTab );
+ sal_Bool bEndAlien = ( nEndTab != nTab );
if (bStartAlien && bEndAlien)
{
OSL_FAIL("bStartAlien && bEndAlien");
- return TRUE;
+ return true;
}
Rectangle aStartRect;
@@ -432,7 +432,7 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
@@ -442,18 +442,18 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
{
const SfxItemSet& rSet = pObject->GetMergedItemSet();
- BOOL bObjStartAlien =
+ sal_Bool bObjStartAlien =
lcl_IsOtherTab( ((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
- BOOL bObjEndAlien =
+ sal_Bool bObjEndAlien =
lcl_IsOtherTab( ((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
- BOOL bStartHit = bStartAlien ? bObjStartAlien :
+ sal_Bool bStartHit = bStartAlien ? bObjStartAlien :
( !bObjStartAlien && aStartRect.IsInside(pObject->GetPoint(0)) );
- BOOL bEndHit = bEndAlien ? bObjEndAlien :
+ sal_Bool bEndHit = bEndAlien ? bObjEndAlien :
( !bObjEndAlien && aEndRect.IsInside(pObject->GetPoint(1)) );
if ( bStartHit && bEndHit )
- bFound = TRUE;
+ bFound = sal_True;
}
pObject = aIter.Next();
}
@@ -461,38 +461,38 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
return bFound;
}
-BOOL ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject )
+sal_Bool ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject )
{
if ( pObject->GetLayer()==SC_LAYER_INTERN &&
pObject->IsPolyObj() && pObject->GetPointCount()==2 )
{
const SfxItemSet& rSet = pObject->GetMergedItemSet();
- BOOL bObjStartAlien =
+ sal_Bool bObjStartAlien =
lcl_IsOtherTab( ((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
- BOOL bObjEndAlien =
+ sal_Bool bObjEndAlien =
lcl_IsOtherTab( ((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
return !bObjStartAlien && !bObjEndAlien;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
// InsertXXX: called from DrawEntry/DrawAlienEntry and InsertObject
-BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
+sal_Bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
SCCOL nRefStartCol, SCROW nRefStartRow,
SCCOL nRefEndCol, SCROW nRefEndRow,
- BOOL bFromOtherTab, BOOL bRed,
+ sal_Bool bFromOtherTab, sal_Bool bRed,
ScDetectiveData& rData )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
- BOOL bArea = ( nRefStartCol != nRefEndCol || nRefStartRow != nRefEndRow );
+ sal_Bool bArea = ( nRefStartCol != nRefEndCol || nRefStartRow != nRefEndRow );
if (bArea && !bFromOtherTab)
{
// insert the rectangle before the arrow - this is relied on in FindFrameForObject
@@ -506,7 +506,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
pPage->InsertObject( pBox );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, sal_True );
pData->maStart.Set( nRefStartCol, nRefStartRow, nTab);
pData->maEnd.Set( nRefEndCol, nRefEndRow, nTab);
}
@@ -516,7 +516,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
if (bFromOtherTab)
{
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
long nPageSign = bNegativePage ? -1 : 1;
aStartPos = Point( aEndPos.X() - 1000 * nPageSign, aEndPos.Y() - 1000 );
@@ -547,7 +547,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
pPage->InsertObject( pArrow );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, sal_True );
if (bFromOtherTab)
pData->maStart.SetInvalid();
else
@@ -556,17 +556,17 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
pData->maEnd.Set( nCol, nRow, nTab);
Modified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, BOOL bRed,
+sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, sal_Bool bRed,
ScDetectiveData& rData )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
- BOOL bArea = ( nStartCol != nEndCol || nStartRow != nEndRow );
+ sal_Bool bArea = ( nStartCol != nEndCol || nStartRow != nEndRow );
if (bArea)
{
Rectangle aRect = GetDrawRect( nStartCol, nStartRow, nEndCol, nEndRow );
@@ -578,12 +578,12 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pPage->InsertObject( pBox );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, sal_True );
pData->maStart.Set( nStartCol, nStartRow, nTab);
pData->maEnd.Set( nEndCol, nEndRow, nTab);
}
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
long nPageSign = bNegativePage ? -1 : 1;
Point aStartPos = GetDrawPos( nStartCol, nStartRow, DRAWPOS_DETARROW );
@@ -612,12 +612,12 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pPage->InsertObject( pArrow );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, sal_True );
pData->maStart.Set( nStartCol, nStartRow, nTab);
pData->maEnd.SetInvalid();
Modified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -629,16 +629,16 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
// return FALSE: da war schon ein Pfeil
-BOOL ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
+sal_Bool ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
const ScRange& rRef,
ScDetectiveData& rData )
{
if ( HasArrow( rRef.aStart, nCol, nRow, nTab ) )
- return FALSE;
+ return false;
ScAddress aErrorPos;
- BOOL bError = HasError( rRef, aErrorPos );
- BOOL bAlien = ( rRef.aEnd.Tab() < nTab || rRef.aStart.Tab() > nTab );
+ sal_Bool bError = HasError( rRef, aErrorPos );
+ sal_Bool bAlien = ( rRef.aEnd.Tab() < nTab || rRef.aStart.Tab() > nTab );
return InsertArrow( nCol, nRow,
rRef.aStart.Col(), rRef.aStart.Row(),
@@ -646,14 +646,14 @@ BOOL ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
bAlien, bError, rData );
}
-BOOL ScDetectiveFunc::DrawAlienEntry( const ScRange& rRef,
+sal_Bool ScDetectiveFunc::DrawAlienEntry( const ScRange& rRef,
ScDetectiveData& rData )
{
if ( HasArrow( rRef.aStart, 0, 0, nTab+1 ) )
- return FALSE;
+ return false;
ScAddress aErrorPos;
- BOOL bError = HasError( rRef, aErrorPos );
+ sal_Bool bError = HasError( rRef, aErrorPos );
return InsertToOtherTab( rRef.aStart.Col(), rRef.aStart.Row(),
rRef.aEnd.Col(), rRef.aEnd.Row(),
@@ -680,14 +680,14 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData
pPage->InsertObject( pCircle );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pCircle ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pCircle, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pCircle, sal_True );
pData->maStart.Set( nCol, nRow, nTab);
pData->maEnd.SetInvalid();
Modified();
}
-void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt )
+void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, sal_Bool bDestPnt )
{
Rectangle aRect = GetDrawRect( nCol, nRow );
@@ -697,7 +697,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt )
pPage->RecalcObjOrdNums();
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
long nDelCount = 0;
@@ -734,7 +734,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt )
#define SC_DET_TOLERANCE 50
-inline BOOL RectIsPoints( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
+inline sal_Bool RectIsPoints( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
return rRect.Left() >= rStart.X() - SC_DET_TOLERANCE
&& rRect.Left() <= rStart.X() + SC_DET_TOLERANCE
@@ -761,7 +761,7 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
pPage->RecalcObjOrdNums();
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
long nDelCount = 0;
@@ -798,10 +798,10 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
//------------------------------------------------------------------------
-USHORT ScDetectiveFunc::InsertPredLevelArea( const ScRange& rRef,
- ScDetectiveData& rData, USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertPredLevelArea( const ScRange& rRef,
+ ScDetectiveData& rData, sal_uInt16 nLevel )
{
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
ScCellIterator aCellIter( pDoc, rRef);
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -829,8 +829,8 @@ USHORT ScDetectiveFunc::InsertPredLevelArea( const ScRange& rRef,
return nResult;
}
-USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
- USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
+ sal_uInt16 nLevel )
{
ScBaseCell* pCell;
pDoc->GetCell( nCol, nRow, nTab, pCell );
@@ -845,9 +845,9 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
@@ -863,8 +863,8 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData
if ( nLevel < rData.GetMaxLevel() )
{
- USHORT nSubResult;
- BOOL bArea = (aRef.aStart != aRef.aEnd);
+ sal_uInt16 nSubResult;
+ sal_Bool bArea = (aRef.aStart != aRef.aEnd);
if (bArea)
nSubResult = InsertPredLevelArea( aRef, rData, nLevel+1 );
else
@@ -893,15 +893,15 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData
}
}
- pFCell->SetRunning(FALSE);
+ pFCell->SetRunning(false);
return nResult;
}
-USHORT ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
- USHORT nLevel, USHORT nDeleteLevel )
+sal_uInt16 ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
+ sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
{
- USHORT nResult = nLevel;
+ sal_uInt16 nResult = nLevel;
ScCellIterator aCellIter( pDoc, rRef);
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -909,7 +909,7 @@ USHORT ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
{
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
- USHORT nTemp = FindPredLevel( aCellIter.GetCol(), aCellIter.GetRow(), nLevel, nDeleteLevel );
+ sal_uInt16 nTemp = FindPredLevel( aCellIter.GetCol(), aCellIter.GetRow(), nLevel, nDeleteLevel );
if (nTemp > nResult)
nResult = nTemp;
}
@@ -921,7 +921,7 @@ USHORT ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
// nDeleteLevel != 0 -> loeschen
-USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, USHORT nDeleteLevel )
+sal_uInt16 ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
{
DBG_ASSERT( nLevel<1000, "Level" );
@@ -938,21 +938,21 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
- USHORT nResult = nLevel;
- BOOL bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
+ sal_uInt16 nResult = nLevel;
+ sal_Bool bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
if ( bDelete )
{
- DeleteArrowsAt( nCol, nRow, TRUE ); // Pfeile, die hierher zeigen
+ DeleteArrowsAt( nCol, nRow, sal_True ); // Pfeile, die hierher zeigen
}
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
while ( aIter.GetNextRef( aRef) )
{
- BOOL bArea = ( aRef.aStart != aRef.aEnd );
+ sal_Bool bArea = ( aRef.aStart != aRef.aEnd );
if ( bDelete ) // Rahmen loeschen ?
{
@@ -965,7 +965,7 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US
{
if ( HasArrow( aRef.aStart, nCol,nRow,nTab ) )
{
- USHORT nTemp;
+ sal_uInt16 nTemp;
if (bArea)
nTemp = FindPredLevelArea( aRef, nLevel+1, nDeleteLevel );
else
@@ -977,15 +977,15 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US
}
}
- pFCell->SetRunning(FALSE);
+ pFCell->SetRunning(false);
return nResult;
}
//------------------------------------------------------------------------
-USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
- USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
+ sal_uInt16 nLevel )
{
ScBaseCell* pCell;
pDoc->GetCell( nCol, nRow, nTab, pCell );
@@ -1000,19 +1000,19 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
ScAddress aErrorPos;
- BOOL bHasError = FALSE;
+ sal_Bool bHasError = false;
while ( aIter.GetNextRef( aRef ) )
{
if (HasError( aRef, aErrorPos ))
{
- bHasError = TRUE;
+ bHasError = sal_True;
if (DrawEntry( nCol, nRow, ScRange( aErrorPos), rData ))
nResult = DET_INS_INSERTED;
@@ -1027,7 +1027,7 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat
}
}
- pFCell->SetRunning(FALSE);
+ pFCell->SetRunning(false);
// Blaetter ?
if (!bHasError)
@@ -1039,12 +1039,12 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat
//------------------------------------------------------------------------
-USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ScDetectiveData& rData, USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ ScDetectiveData& rData, sal_uInt16 nLevel )
{
// ueber ganzes Dokument
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB ); // alle Tabellen
ScBaseCell* pCell = aCellIter.GetFirst();
while (pCell)
@@ -1052,11 +1052,11 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
- BOOL bRunning = pFCell->IsRunning();
+ sal_Bool bRunning = pFCell->IsRunning();
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
@@ -1068,8 +1068,8 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
aRef.aStart.Col(),aRef.aStart.Row(),
aRef.aEnd.Col(),aRef.aEnd.Row() ))
{
- BOOL bAlien = ( aCellIter.GetTab() != nTab );
- BOOL bDrawRet;
+ sal_Bool bAlien = ( aCellIter.GetTab() != nTab );
+ sal_Bool bDrawRet;
if (bAlien)
bDrawRet = DrawAlienEntry( aRef, rData );
else
@@ -1092,7 +1092,7 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
if ( nLevel < rData.GetMaxLevel() )
{
- USHORT nSubResult = InsertSuccLevel(
+ sal_uInt16 nSubResult = InsertSuccLevel(
aCellIter.GetCol(), aCellIter.GetRow(),
aCellIter.GetCol(), aCellIter.GetRow(),
rData, nLevel+1 );
@@ -1128,13 +1128,13 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
return nResult;
}
-USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nLevel, USHORT nDeleteLevel )
+sal_uInt16 ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
{
DBG_ASSERT( nLevel<1000, "Level" );
- USHORT nResult = nLevel;
- BOOL bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
+ sal_uInt16 nResult = nLevel;
+ sal_Bool bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
ScCellIterator aCellIter( pDoc, 0,0, nTab, MAXCOL,MAXROW, nTab );
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -1143,11 +1143,11 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
- BOOL bRunning = pFCell->IsRunning();
+ sal_Bool bRunning = pFCell->IsRunning();
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
@@ -1166,13 +1166,13 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC
DeleteBox( aRef.aStart.Col(), aRef.aStart.Row(),
aRef.aEnd.Col(), aRef.aEnd.Row() );
}
- DeleteArrowsAt( aRef.aStart.Col(), aRef.aStart.Row(), FALSE );
+ DeleteArrowsAt( aRef.aStart.Col(), aRef.aStart.Row(), false );
}
else if ( !bRunning &&
HasArrow( aRef.aStart,
aCellIter.GetCol(),aCellIter.GetRow(),aCellIter.GetTab() ) )
{
- USHORT nTemp = FindSuccLevel( aCellIter.GetCol(), aCellIter.GetRow(),
+ sal_uInt16 nTemp = FindSuccLevel( aCellIter.GetCol(), aCellIter.GetRow(),
aCellIter.GetCol(), aCellIter.GetRow(),
nLevel+1, nDeleteLevel );
if (nTemp > nResult)
@@ -1195,16 +1195,16 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC
// --------------------------------------------------------------------------------
//
-BOOL ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDetectiveData aData( pModel );
- USHORT nMaxLevel = 0;
- USHORT nResult = DET_INS_CONTINUE;
+ sal_uInt16 nMaxLevel = 0;
+ sal_uInt16 nResult = DET_INS_CONTINUE;
while (nResult == DET_INS_CONTINUE && nMaxLevel < 1000)
{
aData.SetMaxLevel( nMaxLevel );
@@ -1215,16 +1215,16 @@ BOOL ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow )
return ( nResult == DET_INS_INSERTED );
}
-BOOL ScDetectiveFunc::ShowSucc( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::ShowSucc( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDetectiveData aData( pModel );
- USHORT nMaxLevel = 0;
- USHORT nResult = DET_INS_CONTINUE;
+ sal_uInt16 nMaxLevel = 0;
+ sal_uInt16 nResult = DET_INS_CONTINUE;
while (nResult == DET_INS_CONTINUE && nMaxLevel < 1000)
{
aData.SetMaxLevel( nMaxLevel );
@@ -1235,56 +1235,56 @@ BOOL ScDetectiveFunc::ShowSucc( SCCOL nCol, SCROW nRow )
return ( nResult == DET_INS_INSERTED );
}
-BOOL ScDetectiveFunc::ShowError( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::ShowError( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScRange aRange( nCol, nRow, nTab );
ScAddress aErrPos;
if ( !HasError( aRange,aErrPos ) )
- return FALSE;
+ return false;
ScDetectiveData aData( pModel );
aData.SetMaxLevel( 1000 );
- USHORT nResult = InsertErrorLevel( nCol, nRow, aData, 0 );
+ sal_uInt16 nResult = InsertErrorLevel( nCol, nRow, aData, 0 );
return ( nResult == DET_INS_INSERTED );
}
-BOOL ScDetectiveFunc::DeleteSucc( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::DeleteSucc( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
- USHORT nLevelCount = FindSuccLevel( nCol, nRow, nCol, nRow, 0, 0 );
+ sal_uInt16 nLevelCount = FindSuccLevel( nCol, nRow, nCol, nRow, 0, 0 );
if ( nLevelCount )
FindSuccLevel( nCol, nRow, nCol, nRow, 0, nLevelCount ); // loeschen
return ( nLevelCount != 0 );
}
-BOOL ScDetectiveFunc::DeletePred( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::DeletePred( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
- USHORT nLevelCount = FindPredLevel( nCol, nRow, 0, 0 );
+ sal_uInt16 nLevelCount = FindPredLevel( nCol, nRow, 0, 0 );
if ( nLevelCount )
FindPredLevel( nCol, nRow, 0, nLevelCount ); // loeschen
return ( nLevelCount != 0 );
}
-BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
+sal_Bool ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
@@ -1292,7 +1292,7 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
pPage->RecalcObjOrdNums();
long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
SdrObject** ppObj = new SdrObject*[nObjCount];
@@ -1303,11 +1303,11 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
{
if ( pObject->GetLayer() == SC_LAYER_INTERN )
{
- BOOL bDoThis = TRUE;
+ sal_Bool bDoThis = sal_True;
if ( eWhat != SC_DET_ALL )
{
- BOOL bCircle = ( pObject->ISA(SdrCircObj) );
- BOOL bCaption = ScDrawLayer::IsNoteCaption( pObject );
+ sal_Bool bCircle = ( pObject->ISA(SdrCircObj) );
+ sal_Bool bCaption = ScDrawLayer::IsNoteCaption( pObject );
if ( eWhat == SC_DET_DETECTIVE ) // Detektiv, aus Menue
bDoThis = !bCaption; // auch Kreise
else if ( eWhat == SC_DET_CIRCLES ) // Kreise, wenn neue erzeugt werden
@@ -1341,14 +1341,14 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
return ( nDelCount != 0 );
}
-BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
+sal_Bool ScDetectiveFunc::MarkInvalid(sal_Bool& rOverflow)
{
- rOverflow = FALSE;
+ rOverflow = false;
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
- BOOL bDeleted = DeleteAll( SC_DET_CIRCLES ); // nur die Kreise
+ sal_Bool bDeleted = DeleteAll( SC_DET_CIRCLES ); // nur die Kreise
ScDetectiveData aData( pModel );
long nInsCount = 0;
@@ -1362,7 +1362,7 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
const ScPatternAttr* pPattern = aAttrIter.GetNext( nCol, nRow1, nRow2 );
while ( pPattern && nInsCount < SC_DET_MAXCIRCLE )
{
- ULONG nIndex = ((const SfxUInt32Item&)pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item&)pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
if (nIndex)
{
const ScValidationData* pData = pDoc->GetValidationEntry( nIndex );
@@ -1370,7 +1370,7 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
{
// Zellen in dem Bereich durchgehen
- BOOL bMarkEmpty = !pData->IsIgnoreBlank();
+ sal_Bool bMarkEmpty = !pData->IsIgnoreBlank();
SCROW nNextRow = nRow1;
SCROW nRow;
ScCellIterator aCellIter( pDoc, nCol,nRow1,nTab, nCol,nRow2,nTab );
@@ -1405,7 +1405,7 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
}
if ( nInsCount >= SC_DET_MAXCIRCLE )
- rOverflow = TRUE;
+ rOverflow = sal_True;
return ( bDeleted || nInsCount != 0 );
}
@@ -1520,12 +1520,12 @@ void ScDetectiveFunc::UpdateAllArrowColors()
{
if ( pObject->GetLayer() == SC_LAYER_INTERN )
{
- BOOL bArrow = FALSE;
- BOOL bError = FALSE;
+ sal_Bool bArrow = false;
+ sal_Bool bError = false;
ScAddress aPos;
ScRange aSource;
- BOOL bDummy;
+ sal_Bool bDummy;
ScDetectiveObjType eType = GetDetectiveObjectType( pObject, nObjTab, aPos, aSource, bDummy );
if ( eType == SC_DETOBJ_ARROW || eType == SC_DETOBJ_TOOTHERTAB )
{
@@ -1533,9 +1533,9 @@ void ScDetectiveFunc::UpdateAllArrowColors()
ScAddress aErrPos;
if ( HasError( aSource, aErrPos ) )
- bError = TRUE;
+ bError = sal_True;
else
- bArrow = TRUE;
+ bArrow = sal_True;
}
else if ( eType == SC_DETOBJ_FROMOTHERTAB )
{
@@ -1545,15 +1545,15 @@ void ScDetectiveFunc::UpdateAllArrowColors()
ScAddress aErrPos;
if ( HasError( ScRange( aPos), aErrPos ) )
- bError = TRUE;
+ bError = sal_True;
else
- bArrow = TRUE;
+ bArrow = sal_True;
}
else if ( eType == SC_DETOBJ_CIRCLE )
{
// circles (error marks) are always red
- bError = TRUE;
+ bError = sal_True;
}
else if ( eType == SC_DETOBJ_NONE )
{
@@ -1561,7 +1561,7 @@ void ScDetectiveFunc::UpdateAllArrowColors()
if ( pObject->ISA( SdrRectObj ) && !pObject->ISA( SdrCaptionObj ) )
{
- bArrow = TRUE;
+ bArrow = sal_True;
}
}
@@ -1579,17 +1579,17 @@ void ScDetectiveFunc::UpdateAllArrowColors()
}
}
-BOOL ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
+sal_Bool ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
{
// find the rectangle for an arrow (always the object directly before the arrow)
// rRange must be initialized to the source cell of the arrow (start of area)
ScDrawLayer* pModel = pDoc->GetDrawLayer();
- if (!pModel) return FALSE;
+ if (!pModel) return false;
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
- if (!pPage) return FALSE;
+ if (!pPage) return false;
// test if the object is a direct page member
if( pObject && pObject->GetPage() && (pObject->GetPage() == pObject->GetObjList()) )
@@ -1607,18 +1607,18 @@ BOOL ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
if ( pPrevData && pPrevData->maStart.IsValid() && pPrevData->maEnd.IsValid() && (pPrevData->maStart == rRange.aStart) )
{
rRange.aEnd = pPrevData->maEnd;
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return false;
}
ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject, SCTAB nObjTab,
- ScAddress& rPosition, ScRange& rSource, BOOL& rRedLine )
+ ScAddress& rPosition, ScRange& rSource, sal_Bool& rRedLine )
{
- rRedLine = FALSE;
+ rRedLine = false;
ScDetectiveObjType eType = SC_DETOBJ_NONE;
if ( pObject && pObject->GetLayer() == SC_LAYER_INTERN )
@@ -1651,7 +1651,7 @@ ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject,
ColorData nObjColor = ((const XLineColorItem&)pObject->GetMergedItem(XATTR_LINECOLOR)).GetColorValue().GetColor();
if ( nObjColor == GetErrorColor() && nObjColor != GetArrowColor() )
- rRedLine = TRUE;
+ rRedLine = sal_True;
}
else if ( pObject->ISA(SdrCircObj) )
{
@@ -1671,7 +1671,7 @@ ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject,
void ScDetectiveFunc::InsertObject( ScDetectiveObjType eType,
const ScAddress& rPosition, const ScRange& rSource,
- BOOL bRedLine )
+ sal_Bool bRedLine )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel) return;
@@ -1731,10 +1731,10 @@ void ScDetectiveFunc::InitializeColors()
nErrorColor = rColorCfg.GetColorValue(svtools::CALCDETECTIVEERROR).nColor;
nCommentColor = rColorCfg.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor;
- bColorsInitialized = TRUE;
+ bColorsInitialized = sal_True;
}
-BOOL ScDetectiveFunc::IsColorsInitialized()
+sal_Bool ScDetectiveFunc::IsColorsInitialized()
{
return bColorsInitialized;
}
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index dc219ac62b60..113af9a69db6 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -55,7 +55,7 @@ using ::rtl::OUString;
//------------------------------------------------------------------------
-#define SC_VERSION ((USHORT)251)
+#define SC_VERSION ((sal_uInt16)251)
TYPEINIT1(ScTpCalcItem, SfxPoolItem);
@@ -69,7 +69,7 @@ inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) *
//------------------------------------------------------------------------
-USHORT lcl_GetDefaultTabDist()
+sal_uInt16 lcl_GetDefaultTabDist()
{
if ( ScOptionsUtil::IsMetricSystem() )
return 709; // 1,25 cm
@@ -123,8 +123,8 @@ ScDocOptions::~ScDocOptions()
void ScDocOptions::ResetDocOptions()
{
- bIsIgnoreCase = FALSE;
- bIsIter = FALSE;
+ bIsIgnoreCase = false;
+ bIsIter = false;
nIterCount = 100;
fIterEps = 1.0E-3;
nPrecStandardFormat = SvNumberFormatter::UNLIMITED_PRECISION;
@@ -134,11 +134,11 @@ void ScDocOptions::ResetDocOptions()
nYear = 1899;
nYear2000 = SvNumberFormatter::GetYear2000Default();
nTabDistance = lcl_GetDefaultTabDist();
- bCalcAsShown = FALSE;
- bMatchWholeCell = TRUE;
- bDoAutoSpell = FALSE;
- bLookUpColRowNames = TRUE;
- bFormulaRegexEnabled= TRUE;
+ bCalcAsShown = false;
+ bMatchWholeCell = true;
+ bDoAutoSpell = false;
+ bLookUpColRowNames = true;
+ bFormulaRegexEnabled= true;
bUseEnglishFuncName = false;
eFormulaGrammar = ::formula::FormulaGrammar::GRAM_NATIVE;
@@ -208,7 +208,7 @@ const LocaleDataWrapper& ScDocOptions::GetLocaleDataWrapper()
//------------------------------------------------------------------------
-ScTpCalcItem::ScTpCalcItem( USHORT nWhichP, const ScDocOptions& rOpt )
+ScTpCalcItem::ScTpCalcItem( sal_uInt16 nWhichP, const ScDocOptions& rOpt )
: SfxPoolItem ( nWhichP ),
theOptions ( rOpt )
{
@@ -377,7 +377,7 @@ ScDocCfg::ScDocCfg() :
Sequence<Any> aValues;
const Any* pValues = NULL;
- USHORT nDateDay, nDateMonth, nDateYear;
+ sal_uInt16 nDateDay, nDateMonth, nDateYear;
GetDate( nDateDay, nDateMonth, nDateYear );
aNames = GetCalcPropertyNames();
@@ -399,22 +399,22 @@ ScDocCfg::ScDocCfg() :
SetIter( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
break;
case SCCALCOPT_ITER_STEPS:
- if (pValues[nProp] >>= nIntVal) SetIterCount( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetIterCount( (sal_uInt16) nIntVal );
break;
case SCCALCOPT_ITER_MINCHG:
if (pValues[nProp] >>= fDoubleVal) SetIterEps( fDoubleVal );
break;
case SCCALCOPT_DATE_DAY:
- if (pValues[nProp] >>= nIntVal) nDateDay = (USHORT) nIntVal;
+ if (pValues[nProp] >>= nIntVal) nDateDay = (sal_uInt16) nIntVal;
break;
case SCCALCOPT_DATE_MONTH:
- if (pValues[nProp] >>= nIntVal) nDateMonth = (USHORT) nIntVal;
+ if (pValues[nProp] >>= nIntVal) nDateMonth = (sal_uInt16) nIntVal;
break;
case SCCALCOPT_DATE_YEAR:
- if (pValues[nProp] >>= nIntVal) nDateYear = (USHORT) nIntVal;
+ if (pValues[nProp] >>= nIntVal) nDateYear = (sal_uInt16) nIntVal;
break;
case SCCALCOPT_DECIMALS:
- if (pValues[nProp] >>= nIntVal) SetStdPrecision( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetStdPrecision( (sal_uInt16) nIntVal );
break;
case SCCALCOPT_CASESENSITIVE:
// content is reversed
@@ -530,7 +530,7 @@ ScDocCfg::ScDocCfg() :
case SCDOCLAYOUTOPT_TABSTOP:
// TabDistance in ScDocOptions is in twips
if (pValues[nProp] >>= nIntVal)
- SetTabDistance( (USHORT) HMMToTwips( nIntVal ) );
+ SetTabDistance( (sal_uInt16) HMMToTwips( nIntVal ) );
break;
}
}
@@ -567,7 +567,7 @@ IMPL_LINK( ScDocCfg, CalcCommitHdl, void *, EMPTYARG )
Sequence<Any> aValues(aNames.getLength());
Any* pValues = aValues.getArray();
- USHORT nDateDay, nDateMonth, nDateYear;
+ sal_uInt16 nDateDay, nDateMonth, nDateYear;
GetDate( nDateDay, nDateMonth, nDateYear );
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index d87407f6ba1c..5724c79715e2 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -66,7 +66,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
if (pQueryRef->getColSize() < 4)
return false;
- BOOL bValid;
+ sal_Bool bValid;
OUString aCellStr;
SCSIZE nIndex = 0;
SCROW nRow = 0;
@@ -78,7 +78,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
{
ScQueryEntry& rEntry = pParam->GetEntry(nIndex);
- bValid = FALSE;
+ bValid = false;
if (nIndex > 0)
{
@@ -88,12 +88,12 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_UND)) )
{
rEntry.eConnect = SC_AND;
- bValid = TRUE;
+ bValid = sal_True;
}
else if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_ODER)) )
{
rEntry.eConnect = SC_OR;
- bValid = TRUE;
+ bValid = sal_True;
}
}
@@ -142,7 +142,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
{
// Finally, the right-hand-side value in the 4th column.
*rEntry.pStr = pQueryRef->getString(3, nRow);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
}
nIndex++;
nRow++;
@@ -205,7 +205,7 @@ bool lcl_createExcelQuery(
pParam->GetEntry(nIndex).eConnect = SC_AND;
}
else
- bValid = FALSE;
+ bValid = false;
}
nCol++;
}
@@ -369,7 +369,7 @@ sal_uInt16 ScDBInternalRange::getCellString(OUString& rStr, ScBaseCell* pCell) c
if (pFCell->IsValue())
{
double fVal = pFCell->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aStr);
@@ -381,7 +381,7 @@ sal_uInt16 ScDBInternalRange::getCellString(OUString& rStr, ScBaseCell* pCell) c
case CELLTYPE_VALUE:
{
double fVal = ((ScValueCell*) pCell)->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aStr);
@@ -408,9 +408,9 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr)
SCCOL nDBCol2 = e.Col();
SCCOL nField = nDBCol1;
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
- bFound = FALSE;
+ bFound = false;
OUString aCellStr;
ScAddress aLook( nDBCol1, nDBRow1, nDBTab1 );
while (!bFound && (aLook.Col() <= nDBCol2))
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 3b6c0339d963..fe31cd9a0d79 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -86,8 +86,8 @@ String ScEditUtil::ModifyDelimiters( const String& rOld )
static String lcl_GetDelimitedString( const EditEngine& rEngine, const sal_Char c )
{
String aRet;
- USHORT nParCount = rEngine.GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ sal_uInt16 nParCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
if (nPar > 0)
aRet += c;
@@ -108,17 +108,17 @@ String ScEditUtil::GetMultilineString( const EditEngine& rEngine )
//------------------------------------------------------------------------
-Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToTop )
+Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, sal_Bool bForceToTop )
{
// bForceToTop = always align to top, for editing
- // (FALSE for querying URLs etc.)
+ // (sal_False for querying URLs etc.)
if (!pPattern)
pPattern = pDoc->GetPattern( nCol, nRow, nTab );
Point aStartPos = aScrPos;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
const ScMergeAttr* pMerge = (const ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
@@ -137,7 +137,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
}
const SvxMarginItem* pMargin = (const SvxMarginItem*)&pPattern->GetItem(ATTR_MARGIN);
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
if ( ((const SvxHorJustifyItem&)pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue() ==
SVX_HOR_JUSTIFY_LEFT )
nIndent = ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue();
@@ -153,7 +153,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
GetItem(ATTR_VER_JUSTIFY)).GetValue();
// asian vertical is always edited top-aligned
- BOOL bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() &&
+ sal_Bool bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() &&
((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
if ( eJust == SVX_VER_JUSTIFY_TOP ||
@@ -165,7 +165,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
pDev->SetMapMode( MAP_PIXEL );
long nTextHeight = pDoc->GetNeededSize( nCol, nRow, nTab,
- pDev, nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ pDev, nPPTX, nPPTY, aZoomX, aZoomY, false );
if (!nTextHeight)
{ // leere Zelle
Font aFont;
@@ -204,12 +204,12 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
pEngine( pEng ),
pEditAttrs( NULL ),
- bNeedsObject( FALSE ),
- bNeedsCellAttr( FALSE )
+ bNeedsObject( false ),
+ bNeedsCellAttr( false )
{
if ( pEngine->GetParagraphCount() > 1 )
{
- bNeedsObject = TRUE; //! Zellatribute finden ?
+ bNeedsObject = sal_True; //! Zellatribute finden ?
}
else
{
@@ -218,11 +218,11 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
ESelection(0,0,0,pEngine->GetTextLen(0)), EditEngineAttribs_OnlyHard ) );
const SfxItemSet& rEditDefaults = pEngine->GetDefaults();
- for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++)
+ for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++)
{
- SfxItemState eState = pEditAttrs->GetItemState( nId, FALSE, &pItem );
+ SfxItemState eState = pEditAttrs->GetItemState( nId, false, &pItem );
if (eState == SFX_ITEM_DONTCARE)
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
else if (eState == SFX_ITEM_SET)
{
if ( nId == EE_CHAR_ESCAPEMENT || nId == EE_CHAR_PAIRKERNING ||
@@ -234,27 +234,27 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
// from "user attributes applied to the cell".
if ( *pItem != rEditDefaults.Get(nId) )
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
}
else
if (!bNeedsCellAttr)
if ( *pItem != rEditDefaults.Get(nId) )
- bNeedsCellAttr = TRUE;
+ bNeedsCellAttr = sal_True;
// rEditDefaults contains the defaults from the cell format
}
}
// Feldbefehle enthalten?
- SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, false );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
// not converted characters?
- SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, FALSE );
+ SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, false );
if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET )
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
}
}
@@ -267,12 +267,12 @@ ScEditAttrTester::~ScEditAttrTester()
//------------------------------------------------------------------------
ScEnginePoolHelper::ScEnginePoolHelper( SfxItemPool* pEnginePoolP,
- BOOL bDeleteEnginePoolP )
+ sal_Bool bDeleteEnginePoolP )
:
pEnginePool( pEnginePoolP ),
pDefaults( NULL ),
bDeleteEnginePool( bDeleteEnginePoolP ),
- bDeleteDefaults( FALSE )
+ bDeleteDefaults( false )
{
}
@@ -282,7 +282,7 @@ ScEnginePoolHelper::ScEnginePoolHelper( const ScEnginePoolHelper& rOrg )
pEnginePool( rOrg.bDeleteEnginePool ? rOrg.pEnginePool->Clone() : rOrg.pEnginePool ),
pDefaults( NULL ),
bDeleteEnginePool( rOrg.bDeleteEnginePool ),
- bDeleteDefaults( FALSE )
+ bDeleteDefaults( false )
{
}
@@ -299,7 +299,7 @@ ScEnginePoolHelper::~ScEnginePoolHelper()
//------------------------------------------------------------------------
ScEditEngineDefaulter::ScEditEngineDefaulter( SfxItemPool* pEnginePoolP,
- BOOL bDeleteEnginePoolP )
+ sal_Bool bDeleteEnginePoolP )
:
ScEnginePoolHelper( pEnginePoolP, bDeleteEnginePoolP ),
EditEngine( pEnginePoolP )
@@ -325,41 +325,41 @@ ScEditEngineDefaulter::~ScEditEngineDefaulter()
}
-void ScEditEngineDefaulter::SetDefaults( const SfxItemSet& rSet, BOOL bRememberCopy )
+void ScEditEngineDefaulter::SetDefaults( const SfxItemSet& rSet, sal_Bool bRememberCopy )
{
if ( bRememberCopy )
{
if ( bDeleteDefaults )
delete pDefaults;
pDefaults = new SfxItemSet( rSet );
- bDeleteDefaults = TRUE;
+ bDeleteDefaults = sal_True;
}
const SfxItemSet& rNewSet = bRememberCopy ? *pDefaults : rSet;
- BOOL bUndo = IsUndoEnabled();
- EnableUndo( FALSE );
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUndo = IsUndoEnabled();
+ EnableUndo( false );
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
- USHORT nPara = GetParagraphCount();
- for ( USHORT j=0; j<nPara; j++ )
+ SetUpdateMode( false );
+ sal_uInt16 nPara = GetParagraphCount();
+ for ( sal_uInt16 j=0; j<nPara; j++ )
{
SetParaAttribs( j, rNewSet );
}
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
if ( bUndo )
- EnableUndo( TRUE );
+ EnableUndo( sal_True );
}
-void ScEditEngineDefaulter::SetDefaults( SfxItemSet* pSet, BOOL bTakeOwnership )
+void ScEditEngineDefaulter::SetDefaults( SfxItemSet* pSet, sal_Bool bTakeOwnership )
{
if ( bDeleteDefaults )
delete pDefaults;
pDefaults = pSet;
bDeleteDefaults = bTakeOwnership;
if ( pDefaults )
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, false );
}
@@ -368,10 +368,10 @@ void ScEditEngineDefaulter::SetDefaultItem( const SfxPoolItem& rItem )
if ( !pDefaults )
{
pDefaults = new SfxItemSet( GetEmptyItemSet() );
- bDeleteDefaults = TRUE;
+ bDeleteDefaults = sal_True;
}
pDefaults->Put( rItem );
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, false );
}
const SfxItemSet& ScEditEngineDefaulter::GetDefaults()
@@ -379,90 +379,90 @@ const SfxItemSet& ScEditEngineDefaulter::GetDefaults()
if ( !pDefaults )
{
pDefaults = new SfxItemSet( GetEmptyItemSet() );
- bDeleteDefaults = TRUE;
+ bDeleteDefaults = sal_True;
}
return *pDefaults;
}
void ScEditEngineDefaulter::SetText( const EditTextObject& rTextObject )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
EditEngine::SetText( rTextObject );
if ( pDefaults )
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, false );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObject,
- const SfxItemSet& rSet, BOOL bRememberCopy )
+ const SfxItemSet& rSet, sal_Bool bRememberCopy )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
EditEngine::SetText( rTextObject );
SetDefaults( rSet, bRememberCopy );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObject,
- SfxItemSet* pSet, BOOL bTakeOwnership )
+ SfxItemSet* pSet, sal_Bool bTakeOwnership )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
EditEngine::SetText( rTextObject );
SetDefaults( pSet, bTakeOwnership );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetText( const String& rText )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
EditEngine::SetText( rText );
if ( pDefaults )
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, false );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const String& rText,
- const SfxItemSet& rSet, BOOL bRememberCopy )
+ const SfxItemSet& rSet, sal_Bool bRememberCopy )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
EditEngine::SetText( rText );
SetDefaults( rSet, bRememberCopy );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const String& rText,
- SfxItemSet* pSet, BOOL bTakeOwnership )
+ SfxItemSet* pSet, sal_Bool bTakeOwnership )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
EditEngine::SetText( rText );
SetDefaults( pSet, bTakeOwnership );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::RepeatDefaults()
{
if ( pDefaults )
{
- USHORT nPara = GetParagraphCount();
- for ( USHORT j=0; j<nPara; j++ )
+ sal_uInt16 nPara = GetParagraphCount();
+ for ( sal_uInt16 j=0; j<nPara; j++ )
SetParaAttribs( j, *pDefaults );
}
}
@@ -470,18 +470,18 @@ void ScEditEngineDefaulter::RepeatDefaults()
void ScEditEngineDefaulter::RemoveParaAttribs()
{
SfxItemSet* pCharItems = NULL;
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
- USHORT nParCount = GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ SetUpdateMode( false );
+ sal_uInt16 nParCount = GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
const SfxItemSet& rParaAttribs = GetParaAttribs( nPar );
- USHORT nWhich;
+ sal_uInt16 nWhich;
for (nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich ++)
{
const SfxPoolItem* pParaItem;
- if ( rParaAttribs.GetItemState( nWhich, FALSE, &pParaItem ) == SFX_ITEM_SET )
+ if ( rParaAttribs.GetItemState( nWhich, false, &pParaItem ) == SFX_ITEM_SET )
{
// if defaults are set, use only items that are different from default
if ( !pDefaults || *pParaItem != pDefaults->Get(nWhich) )
@@ -501,11 +501,11 @@ void ScEditEngineDefaulter::RemoveParaAttribs()
// loop through the portions of the paragraph, and set only those items
// that are not overridden by existing character attributes
- USHORT nPCount = aPortions.Count();
- USHORT nStart = 0;
- for ( USHORT nPos=0; nPos<nPCount; nPos++ )
+ sal_uInt16 nPCount = aPortions.Count();
+ sal_uInt16 nStart = 0;
+ for ( sal_uInt16 nPos=0; nPos<nPCount; nPos++ )
{
- USHORT nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
ESelection aSel( nPar, nStart, nPar, nEnd );
SfxItemSet aOldCharAttrs = GetAttribs( aSel );
SfxItemSet aNewCharAttrs = *pCharItems;
@@ -514,7 +514,7 @@ void ScEditEngineDefaulter::RemoveParaAttribs()
// Clear those items that are different from existing character attributes.
// Where no character attributes are set, GetAttribs returns the paragraph attributes.
const SfxPoolItem* pItem;
- if ( aNewCharAttrs.GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET &&
+ if ( aNewCharAttrs.GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET &&
*pItem != aOldCharAttrs.Get(nWhich) )
{
aNewCharAttrs.ClearItem(nWhich);
@@ -538,7 +538,7 @@ void ScEditEngineDefaulter::RemoveParaAttribs()
}
}
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
//------------------------------------------------------------------------
@@ -642,13 +642,13 @@ ScHeaderFieldData::ScHeaderFieldData()
eNumType = SVX_ARABIC;
}
-ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* pEnginePoolP, BOOL bDeleteEnginePoolP )
+ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* pEnginePoolP, sal_Bool bDeleteEnginePoolP )
: ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP )
{
}
String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- USHORT /* nPara */, USHORT /* nPos */,
+ sal_uInt16 /* nPara */, sal_uInt16 /* nPos */,
Color*& /* rTxtColor */, Color*& /* rFldColor */ )
{
String aRet;
@@ -700,10 +700,10 @@ String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
//------------------------------------------------------------------------
ScFieldEditEngine::ScFieldEditEngine( SfxItemPool* pEnginePoolP,
- SfxItemPool* pTextObjectPool, BOOL bDeleteEnginePoolP )
+ SfxItemPool* pTextObjectPool, sal_Bool bDeleteEnginePoolP )
:
ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ),
- bExecuteURL( TRUE )
+ bExecuteURL( sal_True )
{
if ( pTextObjectPool )
SetEditTextObjectPool( pTextObjectPool );
@@ -713,7 +713,7 @@ ScFieldEditEngine::ScFieldEditEngine( SfxItemPool* pEnginePoolP,
}
String ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- USHORT /* nPara */, USHORT /* nPos */,
+ sal_uInt16 /* nPara */, sal_uInt16 /* nPos */,
Color*& rTxtColor, Color*& /* rFldColor */ )
{
String aRet;
@@ -755,7 +755,7 @@ String ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
return aRet;
}
-void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField, USHORT, USHORT )
+void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField, sal_uInt16, sal_uInt16 )
{
const SvxFieldData* pFld = rField.GetField();
@@ -769,7 +769,7 @@ void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField, USHORT, USHORT
//------------------------------------------------------------------------
ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP,
- SfxItemPool* pTextObjectPool, BOOL bDeleteEnginePoolP ) :
+ SfxItemPool* pTextObjectPool, sal_Bool bDeleteEnginePoolP ) :
ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP )
{
if ( pTextObjectPool )
diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx
index f23cd4e2b29a..c43a2b9c844f 100644
--- a/sc/source/core/tool/filtopt.cxx
+++ b/sc/source/core/tool/filtopt.cxx
@@ -73,7 +73,7 @@ Sequence<OUString> ScFilterOptions::GetPropertyNames()
ScFilterOptions::ScFilterOptions() :
ConfigItem( OUString(RTL_CONSTASCII_USTRINGPARAM( CFGPATH_FILTER )) ),
- bWK3Flag( FALSE ),
+ bWK3Flag( false ),
fExcelColScale( 0 ),
fExcelRowScale( 0 )
{
diff --git a/sc/source/core/tool/formulaparserpool.cxx b/sc/source/core/tool/formulaparserpool.cxx
index 6082317d03e4..0add593eae10 100644
--- a/sc/source/core/tool/formulaparserpool.cxx
+++ b/sc/source/core/tool/formulaparserpool.cxx
@@ -34,7 +34,6 @@
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/sheet/XFilterFormulaParser.hpp>
#include <rtl/instance.hxx>
#include <comphelper/processfactory.hxx>
@@ -69,21 +68,17 @@ private:
OUStringHash,
::std::equal_to< OUString > > FactoryMap;
- Reference< XComponentContext > mxContext; /// Default context of global process factory.
+ Reference< XComponentContext > mxContext; /// Global component context.
FactoryMap maFactories; /// All parser factories, mapped by formula namespace.
};
-ScParserFactoryMap::ScParserFactoryMap()
+ScParserFactoryMap::ScParserFactoryMap() :
+ mxContext( ::comphelper::getProcessComponentContext() )
{
- try
+ if( mxContext.is() ) try
{
- // get process factory and default component context
- Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_SET_THROW );
- Reference< XPropertySet > xPropSet( xFactory, UNO_QUERY_THROW );
- mxContext.set( xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ), UNO_QUERY_THROW );
-
// enumerate all implementations of the FormulaParser service
- Reference< XContentEnumerationAccess > xFactoryEA( xFactory, UNO_QUERY_THROW );
+ Reference< XContentEnumerationAccess > xFactoryEA( mxContext->getServiceManager(), UNO_QUERY_THROW );
Reference< XEnumeration > xEnum( xFactoryEA->createContentEnumeration( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.FilterFormulaParser" ) ) ), UNO_SET_THROW );
while( xEnum->hasMoreElements() ) try // single try/catch for every element
{
diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx
index 7597070fbe18..aadc8fcb2a8a 100644
--- a/sc/source/core/tool/hints.cxx
+++ b/sc/source/core/tool/hints.cxx
@@ -47,10 +47,10 @@ TYPEINIT1(ScDataPilotModifiedHint, SfxHint);
// ScPaintHint - Angabe, was neu gezeichnet werden muss
// -----------------------------------------------------------------------
-ScPaintHint::ScPaintHint( const ScRange& rRng, USHORT nPaint ) :
+ScPaintHint::ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint ) :
aRange( rRng ),
nParts( nPaint ),
- bPrint( TRUE )
+ bPrint( sal_True )
{
}
@@ -106,7 +106,7 @@ void ScLinkRefreshedHint::SetSheetLink( const String& rSourceUrl )
}
void ScLinkRefreshedHint::SetDdeLink(
- const String& rA, const String& rT, const String& rI, BYTE nM )
+ const String& rA, const String& rT, const String& rI, sal_uInt8 nM )
{
nLinkType = SC_LINKREFTYPE_DDE;
aDdeAppl = rA;
@@ -126,7 +126,7 @@ void ScLinkRefreshedHint::SetAreaLink( const ScAddress& rPos )
// -----------------------------------------------------------------------
ScAutoStyleHint::ScAutoStyleHint( const ScRange& rR, const String& rSt1,
- ULONG nT, const String& rSt2 ) :
+ sal_uLong nT, const String& rSt2 ) :
aRange( rR ),
aStyle1( rSt1 ),
aStyle2( rSt2 ),
diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx
index e2f5e90b0d92..8d300c5ebfff 100644
--- a/sc/source/core/tool/inputopt.cxx
+++ b/sc/source/core/tool/inputopt.cxx
@@ -54,7 +54,7 @@ using ::rtl::OUString;
//------------------------------------------------------------------
// Version, ab der das Item kompatibel ist
-#define SC_VERSION ((USHORT)351)
+#define SC_VERSION ((sal_uInt16)351)
//========================================================================
@@ -84,15 +84,15 @@ ScInputOptions::~ScInputOptions()
void ScInputOptions::SetDefaults()
{
nMoveDir = DIR_BOTTOM;
- bMoveSelection = TRUE;
- bEnterEdit = FALSE;
- bExtendFormat = FALSE;
- bRangeFinder = TRUE;
- bExpandRefs = FALSE;
- bMarkHeader = TRUE;
- bUseTabCol = FALSE;
- bTextWysiwyg = FALSE;
- bReplCellsWarn = TRUE;
+ bMoveSelection = sal_True;
+ bEnterEdit = false;
+ bExtendFormat = false;
+ bRangeFinder = sal_True;
+ bExpandRefs = false;
+ bMarkHeader = sal_True;
+ bUseTabCol = false;
+ bTextWysiwyg = false;
+ bReplCellsWarn = sal_True;
}
//------------------------------------------------------------------------
@@ -175,7 +175,7 @@ ScInputCfg::ScInputCfg() :
{
case SCINPUTOPT_MOVEDIR:
if ( pValues[nProp] >>= nIntVal )
- SetMoveDir( (USHORT)nIntVal );
+ SetMoveDir( (sal_uInt16)nIntVal );
break;
case SCINPUTOPT_MOVESEL:
SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 4bcdb7536d5f..3e630425e7f4 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -81,7 +81,7 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScTokenStack, 8, 4 )
IMPL_FIXEDMEMPOOL_NEWDEL( ScInterpreter, 32, 16 )
ScTokenStack* ScInterpreter::pGlobalStack = NULL;
-BOOL ScInterpreter::bGlobalStackInUse = FALSE;
+sal_Bool ScInterpreter::bGlobalStackInUse = false;
using namespace formula;
using ::std::auto_ptr;
@@ -265,7 +265,7 @@ void ScInterpreter::ScChoseJump()
fVal = ::rtl::math::approxFloor( fVal);
if ( (fVal < 1) || (fVal >= nJumpCount))
{
- bIsValue = FALSE;
+ bIsValue = false;
fVal = CreateDoubleError(
errIllegalArgument);
}
@@ -453,11 +453,11 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
// Do not modify the original range because we use it
// to adjust the size of the result matrix if necessary.
ScAddress aAdr( aRange.aStart);
- ULONG nCol = (ULONG)aAdr.Col() + nC;
- ULONG nRow = (ULONG)aAdr.Row() + nR;
- if ((nCol > static_cast<ULONG>(aRange.aEnd.Col()) &&
+ sal_uLong nCol = (sal_uLong)aAdr.Col() + nC;
+ sal_uLong nRow = (sal_uLong)aAdr.Row() + nR;
+ if ((nCol > static_cast<sal_uLong>(aRange.aEnd.Col()) &&
aRange.aEnd.Col() != aRange.aStart.Col())
- || (nRow > static_cast<ULONG>(aRange.aEnd.Row()) &&
+ || (nRow > static_cast<sal_uLong>(aRange.aEnd.Row()) &&
aRange.aEnd.Row() != aRange.aStart.Row()))
{
fVal = CreateDoubleError( NOTAVAILABLE );
@@ -579,7 +579,7 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
{ // push all results that have no jump path
if ( pResMat )
{
- // a FALSE without path results in an empty path value
+ // a sal_False without path results in an empty path value
if ( fBool == 0.0 )
pResMat->PutEmptyPath( nC, nR );
else
@@ -778,16 +778,16 @@ double ScInterpreter::Compare()
{
case svEmptyCell:
Pop();
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
break;
case svMissing:
case svDouble:
aComp.nVal[ i ] = GetDouble();
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
break;
case svString:
*aComp.pVal[ i ] = GetString();
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = false;
break;
case svDoubleRef :
case svSingleRef :
@@ -797,16 +797,16 @@ double ScInterpreter::Compare()
break;
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellEmptyData( pCell))
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
else if (HasCellStringData( pCell))
{
GetCellString( *aComp.pVal[ i ], pCell);
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = false;
}
else
{
aComp.nVal[ i ] = GetCellValue( aAdr, pCell );
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
}
}
break;
@@ -835,32 +835,32 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
{
case svEmptyCell:
Pop();
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
break;
case svMissing:
case svDouble:
aComp.nVal[ i ] = GetDouble();
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
break;
case svString:
*aComp.pVal[ i ] = GetString();
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = false;
break;
case svSingleRef:
{
PopSingleRef( aAdr );
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellEmptyData( pCell))
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
else if (HasCellStringData( pCell))
{
GetCellString( *aComp.pVal[ i ], pCell);
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = false;
}
else
{
aComp.nVal[ i ] = GetCellValue( aAdr, pCell );
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
}
}
break;
@@ -904,15 +904,15 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
{
if ( pMat[i]->IsString(j,k) )
{
- aComp.bVal[i] = FALSE;
+ aComp.bVal[i] = false;
*aComp.pVal[i] = pMat[i]->GetString(j,k);
aComp.bEmpty[i] = pMat[i]->IsEmpty(j,k);
}
else
{
- aComp.bVal[i] = TRUE;
+ aComp.bVal[i] = sal_True;
aComp.nVal[i] = pMat[i]->GetDouble(j,k);
- aComp.bEmpty[i] = FALSE;
+ aComp.bEmpty[i] = false;
}
}
pResMat->PutDouble( CompareFunc( aComp, pOptions ), j,k );
@@ -937,13 +937,13 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
{
if ( pMat[i]->IsValue(j,k) )
{
- aComp.bVal[i] = TRUE;
+ aComp.bVal[i] = true;
aComp.nVal[i] = pMat[i]->GetDouble(j,k);
- aComp.bEmpty[i] = FALSE;
+ aComp.bEmpty[i] = false;
}
else
{
- aComp.bVal[i] = FALSE;
+ aComp.bVal[i] = false;
*aComp.pVal[i] = pMat[i]->GetString(j,k);
aComp.bEmpty[i] = pMat[i]->IsEmpty(j,k);
}
@@ -1124,8 +1124,8 @@ void ScInterpreter::ScAnd()
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
- BOOL bHaveValue = FALSE;
- short nRes = TRUE;
+ sal_Bool bHaveValue = false;
+ short nRes = sal_True;
size_t nRefInList = 0;
while( nParamCount-- > 0)
{
@@ -1134,7 +1134,7 @@ void ScInterpreter::ScAnd()
switch ( GetStackType() )
{
case svDouble :
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes &= ( PopDouble() != 0.0 );
break;
case svString :
@@ -1150,7 +1150,7 @@ void ScInterpreter::ScAnd()
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData( pCell ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes &= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
// else: Xcl raises no error here
@@ -1165,11 +1165,11 @@ void ScInterpreter::ScAnd()
if ( !nGlobalError )
{
double fVal;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
ScValueIterator aValIter( pDok, aRange );
if ( aValIter.GetFirst( fVal, nErr ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
do
{
nRes &= ( fVal != 0.0 );
@@ -1185,13 +1185,13 @@ void ScInterpreter::ScAnd()
ScMatrixRef pMat = GetMatrix();
if ( pMat )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
double fVal = pMat->And();
- USHORT nErr = GetDoubleErrorValue( fVal );
+ sal_uInt16 nErr = GetDoubleErrorValue( fVal );
if ( nErr )
{
SetError( nErr );
- nRes = FALSE;
+ nRes = false;
}
else
nRes &= (fVal != 0.0);
@@ -1222,8 +1222,8 @@ void ScInterpreter::ScOr()
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
- BOOL bHaveValue = FALSE;
- short nRes = FALSE;
+ sal_Bool bHaveValue = false;
+ short nRes = false;
size_t nRefInList = 0;
while( nParamCount-- > 0)
{
@@ -1232,7 +1232,7 @@ void ScInterpreter::ScOr()
switch ( GetStackType() )
{
case svDouble :
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes |= ( PopDouble() != 0.0 );
break;
case svString :
@@ -1248,7 +1248,7 @@ void ScInterpreter::ScOr()
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData( pCell ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes |= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
// else: Xcl raises no error here
@@ -1263,11 +1263,11 @@ void ScInterpreter::ScOr()
if ( !nGlobalError )
{
double fVal;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
ScValueIterator aValIter( pDok, aRange );
if ( aValIter.GetFirst( fVal, nErr ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
do
{
nRes |= ( fVal != 0.0 );
@@ -1280,17 +1280,17 @@ void ScInterpreter::ScOr()
break;
case svMatrix:
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
ScMatrixRef pMat = GetMatrix();
if ( pMat )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
double fVal = pMat->Or();
- USHORT nErr = GetDoubleErrorValue( fVal );
+ sal_uInt16 nErr = GetDoubleErrorValue( fVal );
if ( nErr )
{
SetError( nErr );
- nRes = FALSE;
+ nRes = false;
}
else
nRes |= (fVal != 0.0);
@@ -1363,7 +1363,7 @@ void ScInterpreter::ScPercentSign()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPercentSign" );
nFuncFmtType = NUMBERFORMAT_PERCENT;
const FormulaToken* pSaveCur = pCur;
- BYTE nSavePar = cPar;
+ sal_uInt8 nSavePar = cPar;
PushInt( 100 );
cPar = 2;
FormulaByteToken aDivOp( ocDiv, cPar );
@@ -1643,7 +1643,7 @@ void ScInterpreter::ScIsEmpty()
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
nRes = pMat->IsEmpty( nC, nR);
- // else: FALSE, not empty (which is what Xcl does)
+ // else: sal_False, not empty (which is what Xcl does)
}
}
break;
@@ -1747,7 +1747,7 @@ void ScInterpreter::ScIsLogical()
{
if (HasCellValueData(pCell))
{
- ULONG nFormat = GetCellNumberFormat( aAdr, pCell );
+ sal_uLong nFormat = GetCellNumberFormat( aAdr, pCell );
nRes = ( pFormatter->GetType(nFormat)
== NUMBERFORMAT_LOGICAL);
}
@@ -1796,7 +1796,7 @@ void ScInterpreter::ScType()
break;
case CELLTYPE_VALUE :
{
- ULONG nFormat = GetCellNumberFormat( aAdr, pCell );
+ sal_uLong nFormat = GetCellNumberFormat( aAdr, pCell );
if (pFormatter->GetType(nFormat)
== NUMBERFORMAT_LOGICAL)
nType = 4;
@@ -1851,13 +1851,13 @@ void ScInterpreter::ScType()
}
-inline BOOL lcl_FormatHasNegColor( const SvNumberformat* pFormat )
+inline sal_Bool lcl_FormatHasNegColor( const SvNumberformat* pFormat )
{
return pFormat && pFormat->GetColor( 1 );
}
-inline BOOL lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
+inline sal_Bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
{
return pFormat && (pFormat->GetFormatstring().Search( '(' ) != STRING_NOTFOUND);
}
@@ -1865,11 +1865,11 @@ inline BOOL lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
void ScInterpreter::ScCell()
{ // ATTRIBUTE ; [REF]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if( MustHaveParamCount( nParamCount, 1, 2 ) )
{
ScAddress aCellPos( aPos );
- BOOL bError = FALSE;
+ sal_Bool bError = false;
if( nParamCount == 2 )
bError = !PopDoubleRefOrSingleRef( aCellPos );
String aInfoType( GetString() );
@@ -1897,7 +1897,7 @@ void ScInterpreter::ScCell()
}
else if( aInfoType.EqualsAscii( "ADDRESS" ) )
{ // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
- USHORT nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
+ sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
aCellPos.Format( aFuncResult, nFlags, pDok, pDok->GetAddressConvention() );
PushString( aFuncResult );
}
@@ -2002,10 +2002,10 @@ void ScInterpreter::ScCell()
// *** FORMATTING ***
else if( aInfoType.EqualsAscii( "FORMAT" ) )
{ // specific format code for standard formats
- ULONG nFormat = pDok->GetNumberFormat( aCellPos );
- BOOL bAppendPrec = TRUE;
- USHORT nPrec, nLeading;
- BOOL bThousand, bIsRed;
+ sal_uLong nFormat = pDok->GetNumberFormat( aCellPos );
+ sal_Bool bAppendPrec = sal_True;
+ sal_uInt16 nPrec, nLeading;
+ sal_Bool bThousand, bIsRed;
pFormatter->GetFormatSpecialInfo( nFormat, bThousand, bIsRed, nPrec, nLeading );
switch( pFormatter->GetType( nFormat ) )
@@ -2016,7 +2016,7 @@ void ScInterpreter::ScCell()
case NUMBERFORMAT_PERCENT: aFuncResult = 'P'; break;
default:
{
- bAppendPrec = FALSE;
+ bAppendPrec = false;
switch( pFormatter->GetIndexTableOffset( nFormat ) )
{
case NF_DATE_SYSTEM_SHORT:
@@ -2242,7 +2242,7 @@ void ScInterpreter::ScIsNV()
else
{
ScBaseCell* pCell = GetCell( aAdr );
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
nRes = (nErr == NOTAVAILABLE);
}
}
@@ -2291,7 +2291,7 @@ void ScInterpreter::ScIsErr()
else
{
ScBaseCell* pCell = GetCell( aAdr );
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
nRes = (nErr && nErr != NOTAVAILABLE);
}
}
@@ -2303,7 +2303,7 @@ void ScInterpreter::ScIsErr()
nRes = ((nGlobalError && nGlobalError != NOTAVAILABLE) || !pMat);
else if ( !pJumpMatrix )
{
- USHORT nErr = pMat->GetErrorIfNotString( 0, 0);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( 0, 0);
nRes = (nErr && nErr != NOTAVAILABLE);
}
else
@@ -2313,7 +2313,7 @@ void ScInterpreter::ScIsErr()
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
{
- USHORT nErr = pMat->GetErrorIfNotString( nC, nR);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( nC, nR);
nRes = (nErr && nErr != NOTAVAILABLE);
}
}
@@ -2396,7 +2396,7 @@ short ScInterpreter::IsEven()
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
if (nErr != 0)
SetError(nErr);
else
@@ -2481,11 +2481,11 @@ void ScInterpreter::ScIsOdd()
void ScInterpreter::ScN()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScN" );
- USHORT nErr = nGlobalError;
+ sal_uInt16 nErr = nGlobalError;
nGlobalError = 0;
// Temporarily override the ConvertStringToValue() error for
// GetCellValue() / GetCellValueOrZero()
- USHORT nSErr = mnStringNoValueError;
+ sal_uInt16 nSErr = mnStringNoValueError;
mnStringNoValueError = errCellNoValue;
double fVal = GetDouble();
mnStringNoValueError = nSErr;
@@ -2588,14 +2588,14 @@ void ScInterpreter::ScT()
PushInt(0);
return ;
}
- BOOL bValue = FALSE;
+ sal_Bool bValue = false;
ScBaseCell* pCell = GetCell( aAdr );
if ( GetCellErrCode( pCell ) == 0 )
{
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
- bValue = TRUE;
+ bValue = sal_True;
break;
case CELLTYPE_FORMULA :
bValue = ((ScFormulaCell*)pCell)->IsValue();
@@ -2706,7 +2706,7 @@ void ScInterpreter::ScValue()
//2do: this should be a proper unicode string method
-inline BOOL lcl_ScInterpreter_IsPrintable( sal_Unicode c )
+inline sal_Bool lcl_ScInterpreter_IsPrintable( sal_Unicode c )
{
return 0x20 <= c && c != 0x7f;
}
@@ -2764,7 +2764,7 @@ static ::rtl::OUString lcl_convertIntoHalfWidth( const ::rtl::OUString & rStr )
bFirstASCCall = false;
}
- return aTrans.transliterate( rStr, 0, USHORT( rStr.getLength() ), NULL );
+ return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
}
@@ -2779,7 +2779,7 @@ static ::rtl::OUString lcl_convertIntoFullWidth( const ::rtl::OUString & rStr )
bFirstJISCall = false;
}
- return aTrans.transliterate( rStr, 0, USHORT( rStr.getLength() ), NULL );
+ return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
}
@@ -2848,7 +2848,7 @@ void ScInterpreter::ScUnichar()
}
-void ScInterpreter::ScMin( BOOL bTextAsZero )
+void ScInterpreter::ScMin( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMin" );
short nParamCount = GetByte();
@@ -2890,7 +2890,7 @@ void ScInterpreter::ScMin( BOOL bTextAsZero )
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(nVal, nErr))
@@ -2969,11 +2969,7 @@ void ScInterpreter::ScMin( BOOL bTextAsZero )
PushDouble(nMin);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
-void ScInterpreter::ScMax( BOOL bTextAsZero )
+void ScInterpreter::ScMax( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMax" );
short nParamCount = GetByte();
@@ -3015,7 +3011,7 @@ void ScInterpreter::ScMax( BOOL bTextAsZero )
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(nVal, nErr))
@@ -3100,8 +3096,8 @@ void ScInterpreter::ScMax( BOOL bTextAsZero )
namespace {
void IterateMatrix(
- const ScMatrixRef& pMat, ScIterFunc eFunc, BOOL bTextAsZero,
- ULONG& rCount, short& rFuncFmtType, double& fRes, double& fMem, bool& bNull)
+ const ScMatrixRef& pMat, ScIterFunc eFunc, sal_Bool bTextAsZero,
+ sal_uLong& rCount, short& rFuncFmtType, double& fRes, double& fMem, bool& bNull)
{
if (!pMat)
return;
@@ -3151,7 +3147,7 @@ void IterateMatrix(
}
-double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
+double ScInterpreter::IterateParameters( ScIterFunc eFunc, sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IterateParameters" );
short nParamCount = GetByte();
@@ -3159,7 +3155,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
double fVal = 0.0;
double fMem = 0.0; // first numeric value.
bool bNull = true;
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
ScAddress aAdr;
ScRange aRange;
size_t nRefInList = 0;
@@ -3386,7 +3382,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
else
{
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
if (aValIter.GetFirst(fVal, nErr))
{
// placed the loop on the inside for performance reasons:
@@ -3487,7 +3483,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
case ifPRODUCT: if ( !nCount ) fRes = 0.0; break;
default: ; // nothing
}
- // Bei Summen etc. macht ein BOOL-Ergebnis keinen Sinn
+ // Bei Summen etc. macht ein sal_Bool-Ergebnis keinen Sinn
// und Anzahl ist immer Number (#38345#)
if( eFunc == ifCOUNT || nFuncFmtType == NUMBERFORMAT_LOGICAL )
nFuncFmtType = NUMBERFORMAT_NUMBER;
@@ -3516,7 +3512,7 @@ void ScInterpreter::ScProduct()
}
-void ScInterpreter::ScAverage( BOOL bTextAsZero )
+void ScInterpreter::ScAverage( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAverage" );
PushDouble( IterateParameters( ifAVERAGE, bTextAsZero ) );
@@ -3538,7 +3534,7 @@ void ScInterpreter::ScCount2()
void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
- BOOL bTextAsZero )
+ sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetStVarParams" );
short nParamCount = GetByte();
@@ -3585,7 +3581,7 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(fVal, nErr))
@@ -3654,7 +3650,7 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
}
-void ScInterpreter::ScVar( BOOL bTextAsZero )
+void ScInterpreter::ScVar( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVar" );
double nVal;
@@ -3668,7 +3664,7 @@ void ScInterpreter::ScVar( BOOL bTextAsZero )
}
-void ScInterpreter::ScVarP( BOOL bTextAsZero )
+void ScInterpreter::ScVarP( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVarP" );
double nVal;
@@ -3679,7 +3675,7 @@ void ScInterpreter::ScVarP( BOOL bTextAsZero )
}
-void ScInterpreter::ScStDev( BOOL bTextAsZero )
+void ScInterpreter::ScStDev( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDev" );
double nVal;
@@ -3692,7 +3688,7 @@ void ScInterpreter::ScStDev( BOOL bTextAsZero )
}
-void ScInterpreter::ScStDevP( BOOL bTextAsZero )
+void ScInterpreter::ScStDevP( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDevP" );
double nVal;
@@ -3725,8 +3721,8 @@ void ScInterpreter::ScStDevP( BOOL bTextAsZero )
void ScInterpreter::ScColumns()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScColumns" );
- BYTE nParamCount = GetByte();
- ULONG nVal = 0;
+ sal_uInt8 nParamCount = GetByte();
+ sal_uLong nVal = 0;
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
@@ -3743,8 +3739,8 @@ void ScInterpreter::ScColumns()
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- nVal += static_cast<ULONG>(nTab2 - nTab1 + 1) *
- static_cast<ULONG>(nCol2 - nCol1 + 1);
+ nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1) *
+ static_cast<sal_uLong>(nCol2 - nCol1 + 1);
break;
case svMatrix:
{
@@ -3769,8 +3765,8 @@ void ScInterpreter::ScColumns()
void ScInterpreter::ScRows()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRows" );
- BYTE nParamCount = GetByte();
- ULONG nVal = 0;
+ sal_uInt8 nParamCount = GetByte();
+ sal_uLong nVal = 0;
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
@@ -3787,8 +3783,8 @@ void ScInterpreter::ScRows()
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- nVal += static_cast<ULONG>(nTab2 - nTab1 + 1) *
- static_cast<ULONG>(nRow2 - nRow1 + 1);
+ nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1) *
+ static_cast<sal_uLong>(nRow2 - nRow1 + 1);
break;
case svMatrix:
{
@@ -3812,8 +3808,8 @@ void ScInterpreter::ScRows()
void ScInterpreter::ScTables()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTables" );
- BYTE nParamCount = GetByte();
- ULONG nVal;
+ sal_uInt8 nParamCount = GetByte();
+ sal_uLong nVal;
if ( nParamCount == 0 )
nVal = pDok->GetTableCount();
else
@@ -3835,7 +3831,7 @@ void ScInterpreter::ScTables()
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- nVal += static_cast<ULONG>(nTab2 - nTab1 + 1);
+ nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1);
break;
case svMatrix:
PopError();
@@ -3854,7 +3850,7 @@ void ScInterpreter::ScTables()
void ScInterpreter::ScColumn()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScColumn" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
double nVal = 0;
@@ -3930,7 +3926,7 @@ void ScInterpreter::ScColumn()
void ScInterpreter::ScRow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRow" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
double nVal = 0;
@@ -4005,7 +4001,7 @@ void ScInterpreter::ScRow()
void ScInterpreter::ScTable()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTable" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
SCTAB nVal = 0;
@@ -4207,7 +4203,7 @@ void ScInterpreter::ScMatch()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMatch" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fTyp;
@@ -4264,10 +4260,10 @@ void ScInterpreter::ScMatch()
rParam.nRow1 = nRow1;
rParam.nCol2 = nCol2;
rParam.nTab = nTab1;
- rParam.bMixedComparison = TRUE;
+ rParam.bMixedComparison = sal_True;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
if (fTyp < 0.0)
rEntry.eOp = SC_GREATER_EQUAL;
else if (fTyp > 0.0)
@@ -4277,14 +4273,14 @@ void ScInterpreter::ScMatch()
case svDouble:
{
fVal = GetDouble();
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = fVal;
}
break;
case svString:
{
sStr = GetString();
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
break;
@@ -4301,13 +4297,13 @@ void ScInterpreter::ScMatch()
if (HasCellValueData(pCell))
{
fVal = GetCellValue( aAdr, pCell );
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = fVal;
}
else
{
GetCellString(sStr, pCell);
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
}
@@ -4353,13 +4349,13 @@ void ScInterpreter::ScMatch()
}
if ( rEntry.bQueryByString )
{
- BOOL bIsVBAMode = FALSE;
+ sal_Bool bIsVBAMode = false;
if ( pDok )
bIsVBAMode = pDok->IsInVBAMode();
// #TODO handle MSO wildcards
if ( bIsVBAMode )
- rParam.bRegExp = FALSE;
+ rParam.bRegExp = false;
else
rParam.bRegExp = MayBeRegExp( *rEntry.pStr, pDok );
}
@@ -4474,12 +4470,12 @@ void ScInterpreter::ScMatch()
else
{ // search column in row
SCCOL nC;
- rParam.bByRow = FALSE;
+ rParam.bByRow = false;
rParam.nRow2 = nRow1;
rEntry.nField = nCol1;
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// Advance Entry.nField in Iterator if column changed
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( sal_True );
if (fTyp == 0.0)
{ // EQUAL
if ( aCellIter.GetFirst() )
@@ -4514,7 +4510,7 @@ void ScInterpreter::ScCountEmptyCells()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCountEmptyCells" );
if ( MustHaveParamCount( GetByte(), 1 ) )
{
- ULONG nMaxCount = 0, nCount = 0;
+ sal_uLong nMaxCount = 0, nCount = 0;
CellType eCellType;
switch (GetStackType())
{
@@ -4538,9 +4534,9 @@ void ScInterpreter::ScCountEmptyCells()
{
PopDoubleRef( aRange, nParam, nRefInList);
nMaxCount +=
- static_cast<ULONG>(aRange.aEnd.Row() - aRange.aStart.Row() + 1) *
- static_cast<ULONG>(aRange.aEnd.Col() - aRange.aStart.Col() + 1) *
- static_cast<ULONG>(aRange.aEnd.Tab() - aRange.aStart.Tab() + 1);
+ static_cast<sal_uLong>(aRange.aEnd.Row() - aRange.aStart.Row() + 1) *
+ static_cast<sal_uLong>(aRange.aEnd.Col() - aRange.aStart.Col() + 1) *
+ static_cast<sal_uLong>(aRange.aEnd.Tab() - aRange.aStart.Tab() + 1);
ScBaseCell* pCell;
ScCellIterator aDocIter( pDok, aRange, glSubTotal);
if ( (pCell = aDocIter.GetFirst()) != NULL )
@@ -4569,7 +4565,7 @@ void ScInterpreter::ScCountIf()
{
String rString;
double fVal = 0.0;
- BOOL bIsString = TRUE;
+ sal_Bool bIsString = sal_True;
switch ( GetStackType() )
{
case svDoubleRef :
@@ -4586,13 +4582,13 @@ void ScInterpreter::ScCountIf()
{
case CELLTYPE_VALUE :
fVal = GetCellValue( aAdr, pCell );
- bIsString = FALSE;
+ bIsString = false;
break;
case CELLTYPE_FORMULA :
if( ((ScFormulaCell*)pCell)->IsValue() )
{
fVal = GetCellValue( aAdr, pCell );
- bIsString = FALSE;
+ bIsString = false;
}
else
GetCellString(rString, pCell);
@@ -4603,7 +4599,7 @@ void ScInterpreter::ScCountIf()
break;
default:
fVal = 0.0;
- bIsString = FALSE;
+ bIsString = false;
}
}
break;
@@ -4620,7 +4616,7 @@ void ScInterpreter::ScCountIf()
default:
{
fVal = GetDouble();
- bIsString = FALSE;
+ bIsString = false;
}
}
double fSum = 0.0;
@@ -4690,10 +4686,10 @@ void ScInterpreter::ScCountIf()
rParam.nRow2 = nRow2;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
if (!bIsString)
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = fVal;
rEntry.eOp = SC_EQUAL;
}
@@ -4731,9 +4727,9 @@ void ScInterpreter::ScCountIf()
}
else
{
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// Keep Entry.nField in iterator on column change
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( true );
if ( aCellIter.GetFirst() )
{
do
@@ -4756,7 +4752,7 @@ void ScInterpreter::ScCountIf()
void ScInterpreter::ScSumIf()
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return;
@@ -4894,7 +4890,7 @@ void ScInterpreter::ScSumIf()
double fSum = 0.0;
double fMem = 0.0;
- BOOL bNull = TRUE;
+ sal_Bool bNull = true;
short nParam = 1;
size_t nRefInList = 0;
while (nParam-- > 0)
@@ -5012,10 +5008,10 @@ void ScInterpreter::ScSumIf()
rParam.nRow2 = nRow2;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = true;
if (!bIsString)
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = fVal;
rEntry.eOp = SC_EQUAL;
}
@@ -5063,7 +5059,7 @@ void ScInterpreter::ScSumIf()
fVal = pSumExtraMatrix->GetDouble( nC, nR);
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = false;
fMem = fVal;
}
else
@@ -5089,7 +5085,7 @@ void ScInterpreter::ScSumIf()
fVal = GetCellValue( aAdr, pCell );
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = false;
fMem = fVal;
}
else
@@ -5102,9 +5098,9 @@ void ScInterpreter::ScSumIf()
}
else
{
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// Increment Entry.nField in iterator when switching to next column.
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( true );
if ( aCellIter.GetFirst() )
{
if (pSumExtraMatrix)
@@ -5118,7 +5114,7 @@ void ScInterpreter::ScSumIf()
fVal = pSumExtraMatrix->GetDouble( nC, nR);
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = false;
fMem = fVal;
}
else
@@ -5138,7 +5134,7 @@ void ScInterpreter::ScSumIf()
fVal = GetCellValue( aAdr, pCell );
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = false;
fMem = fVal;
}
else
@@ -5162,7 +5158,7 @@ void ScInterpreter::ScSumIf()
void ScInterpreter::ScLookup()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLookup" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return ;
@@ -5585,13 +5581,13 @@ void ScInterpreter::ScLookup()
aParam.bByRow = bVertical;
aParam.bMixedComparison = true;
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
rEntry.eOp = SC_LESS_EQUAL;
rEntry.nField = nCol1;
if ( rEntry.bQueryByString )
aParam.bRegExp = MayBeRegExp( *rEntry.pStr, pDok );
- ScQueryCellIterator aCellIter(pDok, nTab1, aParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, aParam, false);
SCCOL nC;
SCROW nR;
// Advance Entry.nField in iterator upon switching columns if
@@ -5717,19 +5713,19 @@ void ScInterpreter::ScLookup()
void ScInterpreter::ScHLookup()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScHLookup" );
- CalculateLookup(TRUE);
+ CalculateLookup(sal_True);
}
-void ScInterpreter::CalculateLookup(BOOL HLookup)
+void ScInterpreter::CalculateLookup(sal_Bool HLookup)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateLookup" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
- BOOL bSorted;
+ sal_Bool bSorted;
if (nParamCount == 4)
bSorted = GetBool();
else
- bSorted = TRUE;
+ bSorted = sal_True;
double fIndex = ::rtl::math::approxFloor( GetDouble() ) - 1.0;
ScMatrixRef pMat = NULL;
SCSIZE nC = 0, nR = 0;
@@ -5789,7 +5785,7 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
{
rParam.nCol2 = nCol2;
rParam.nRow2 = nRow1; // nur in der ersten Zeile suchen
- rParam.bByRow = FALSE;
+ rParam.bByRow = false;
} // if ( HLookup )
else
{
@@ -5797,10 +5793,10 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
rParam.nRow2 = nRow2;
rParam.nTab = nTab1;
}
- rParam.bMixedComparison = TRUE;
+ rParam.bMixedComparison = sal_True;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
if ( bSorted )
rEntry.eOp = SC_LESS_EQUAL;
if ( !FillEntry(rEntry) )
@@ -5902,16 +5898,16 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
else
{
rEntry.nField = nCol1;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nCol = 0;
SCROW nRow = 0;
if ( bSorted )
rEntry.eOp = SC_LESS_EQUAL;
if ( HLookup )
{
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// advance Entry.nField in Iterator upon switching columns
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( sal_True );
if ( bSorted )
{
SCROW nRow1_temp;
@@ -5919,7 +5915,7 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
}
else if ( aCellIter.GetFirst() )
{
- bFound = TRUE;
+ bFound = sal_True;
nCol = aCellIter.GetCol();
}
nRow = nZIndex;
@@ -5952,14 +5948,14 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
{
case svDouble:
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = GetDouble();
}
break;
case svString:
{
const String sStr = GetString();
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
break;
@@ -5975,21 +5971,21 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = GetCellValue( aAdr, pCell );
}
else
{
if ( GetCellType( pCell ) == CELLTYPE_NOTE )
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
rEntry.nVal = 0.0;
}
else
{
String sStr;
GetCellString(sStr, pCell);
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
}
@@ -6012,17 +6008,13 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
void ScInterpreter::ScVLookup()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVLookup" );
- CalculateLookup(FALSE);
+ CalculateLookup(false);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScSubTotal()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubTotal" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 2 ) )
{
// We must fish the 1st parameter deep from the stack! And push it on top.
@@ -6034,7 +6026,7 @@ void ScInterpreter::ScSubTotal()
else
{
cPar = nParamCount - 1;
- glSubTotal = TRUE;
+ glSubTotal = sal_True;
switch( nFunc )
{
case SUBTOTAL_FUNC_AVE : ScAverage(); break;
@@ -6050,7 +6042,7 @@ void ScInterpreter::ScSubTotal()
case SUBTOTAL_FUNC_VARP : ScVarP(); break;
default : PushIllegalArgument(); break;
}
- glSubTotal = FALSE;
+ glSubTotal = false;
}
// Get rid of the 1st (fished) parameter.
double nVal = GetDouble();
@@ -6058,19 +6050,15 @@ void ScInterpreter::ScSubTotal()
PushDouble( nVal );
}
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
-ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
+ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDBParams" );
- BOOL bAllowMissingField = FALSE;
+ sal_Bool bAllowMissingField = false;
if ( rMissingField )
{
- bAllowMissingField = TRUE;
- rMissingField = FALSE;
+ bAllowMissingField = sal_True;
+ rMissingField = false;
}
if ( GetByte() == 3 )
{
@@ -6079,20 +6067,20 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
if (!pQueryRef.get())
return NULL;
- BOOL bByVal = TRUE;
+ sal_Bool bByVal = sal_True;
double nVal = 0.0;
String aStr;
ScRange aMissingRange;
- BOOL bRangeFake = FALSE;
+ sal_Bool bRangeFake = false;
switch (GetStackType())
{
case svDouble :
nVal = ::rtl::math::approxFloor( GetDouble() );
if ( bAllowMissingField && nVal == 0.0 )
- rMissingField = TRUE; // fake missing parameter
+ rMissingField = sal_True; // fake missing parameter
break;
case svString :
- bByVal = FALSE;
+ bByVal = false;
aStr = GetString();
break;
case svSingleRef :
@@ -6104,7 +6092,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
nVal = GetCellValue( aAdr, pCell );
else
{
- bByVal = FALSE;
+ bByVal = false;
GetCellString(aStr, pCell);
}
}
@@ -6112,7 +6100,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
case svDoubleRef :
if ( bAllowMissingField )
{ // fake missing parameter for old SO compatibility
- bRangeFake = TRUE;
+ bRangeFake = sal_True;
PopDoubleRef( aMissingRange );
}
else
@@ -6124,7 +6112,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
case svMissing :
PopError();
if ( bAllowMissingField )
- rMissingField = TRUE;
+ rMissingField = sal_True;
else
SetError( errIllegalParameter );
break;
@@ -6142,7 +6130,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
{
// range parameter must match entire database range
if (pDBRef->isRangeEqual(aMissingRange))
- rMissingField = TRUE;
+ rMissingField = sal_True;
else
SetError( errIllegalParameter );
}
@@ -6203,9 +6191,9 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DBIterator" );
double nErg = 0.0;
double fMem = 0.0;
- BOOL bNull = TRUE;
- ULONG nCount = 0;
- BOOL bMissingField = FALSE;
+ sal_Bool bNull = sal_True;
+ sal_uLong nCount = 0;
+ sal_Bool bMissingField = false;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
@@ -6234,7 +6222,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
case ifSUM:
if ( bNull && aValue.mfValue != 0.0 )
{
- bNull = FALSE;
+ bNull = false;
fMem = aValue.mfValue;
}
else
@@ -6274,11 +6262,11 @@ void ScInterpreter::ScDBSum()
void ScInterpreter::ScDBCount()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount" );
- BOOL bMissingField = TRUE;
+ sal_Bool bMissingField = sal_True;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
if ( bMissingField && pQueryParam->GetType() == ScDBQueryParamBase::INTERNAL )
{ // count all matching records
// TODO: currently the QueryIterators only return cell pointers of
@@ -6334,7 +6322,7 @@ void ScInterpreter::ScDBCount()
void ScInterpreter::ScDBCount2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount2" );
- BOOL bMissingField = TRUE;
+ sal_Bool bMissingField = sal_True;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
@@ -6343,7 +6331,7 @@ void ScInterpreter::ScDBCount2()
SetError(errNoValue);
return;
}
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
pQueryParam->mbSkipString = false;
ScDBQueryDataIterator aValIter( pDok, pQueryParam.release());
ScDBQueryDataIterator::Value aValue;
@@ -6400,7 +6388,7 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount )
rValCount = 0.0;
double fSum = 0.0;
- BOOL bMissingField = FALSE;
+ sal_Bool bMissingField = false;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
@@ -6520,7 +6508,7 @@ ScTokenArray* lcl_CreateExternalRefTokenArray( const ScAddress& rPos, ScDocument
void ScInterpreter::ScIndirect()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIndirect" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
bool bTryXlA1 = true; // whether to try XL_A1 style as well.
@@ -6609,7 +6597,7 @@ void ScInterpreter::ScAddressFunc()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAddressFunc" );
String sTabStr;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if( !MustHaveParamCount( nParamCount, 2, 5 ) )
return;
@@ -6620,10 +6608,10 @@ void ScInterpreter::ScAddressFunc()
if( nParamCount >= 4 && 0.0 == ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0)))
eConv = FormulaGrammar::CONV_XL_R1C1;
- USHORT nFlags = SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE; // default
+ sal_uInt16 nFlags = SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE; // default
if( nParamCount >= 3 )
{
- USHORT n = (USHORT) ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0));
+ sal_uInt16 n = (sal_uInt16) ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0));
switch ( n )
{
default :
@@ -6682,7 +6670,7 @@ void ScInterpreter::ScAddressFunc()
void ScInterpreter::ScOffset()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScOffset" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 5 ) )
{
long nColNew = -1, nRowNew = -1, nColPlus, nRowPlus;
@@ -6822,7 +6810,7 @@ void ScInterpreter::ScOffset()
void ScInterpreter::ScIndex()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIndex" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 4 ) )
{
long nArea;
@@ -6863,7 +6851,7 @@ void ScInterpreter::ScIndex()
{
if (nArea != 1)
SetError(errIllegalArgument);
- USHORT nOldSp = sp;
+ sal_uInt16 nOldSp = sp;
ScMatrixRef pMat = GetMatrix();
if (pMat)
{
@@ -6961,7 +6949,7 @@ void ScInterpreter::ScIndex()
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
- BOOL bRowArray = FALSE;
+ sal_Bool bRowArray = false;
if (GetStackType() == svRefList)
{
FormulaTokenRef xRef = PopToken();
@@ -6974,13 +6962,13 @@ void ScInterpreter::ScIndex()
DoubleRefToRange( (*(static_cast<ScToken*>(xRef.get())->GetRefList()))[nArea-1], aRange);
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if ( nParamCount == 2 && nRow1 == nRow2 )
- bRowArray = TRUE;
+ bRowArray = sal_True;
}
else
{
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if ( nParamCount == 2 && nRow1 == nRow2 )
- bRowArray = TRUE;
+ bRowArray = sal_True;
}
if ( nTab1 != nTab2 ||
(nCol > 0 && nCol1+nCol-1 > nCol2) ||
@@ -7031,7 +7019,7 @@ void ScInterpreter::ScMultiArea()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMultiArea" );
// Legacy support, convert to RefList
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (MustHaveParamCountMin( nParamCount, 1))
{
while (!nGlobalError && nParamCount-- > 1)
@@ -7045,7 +7033,7 @@ void ScInterpreter::ScMultiArea()
void ScInterpreter::ScAreas()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAreas" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (MustHaveParamCount( nParamCount, 1))
{
size_t nCount = 0;
@@ -7083,7 +7071,7 @@ void ScInterpreter::ScAreas()
void ScInterpreter::ScCurrency()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCurrency" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
String aStr;
@@ -7112,18 +7100,18 @@ void ScInterpreter::ScCurrency()
Color* pColor = NULL;
if ( fDec < 0.0 )
fDec = 0.0;
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_CURRENCY,
ScGlobal::eLnge);
- if ( (USHORT) fDec != pFormatter->GetFormatPrecision( nIndex ) )
+ if ( (sal_uInt16) fDec != pFormatter->GetFormatPrecision( nIndex ) )
{
String sFormatString;
pFormatter->GenerateFormat(sFormatString,
nIndex,
ScGlobal::eLnge,
- TRUE, // mit Tausenderpunkt
- FALSE, // nicht rot
- (USHORT) fDec,// Nachkommastellen
+ sal_True, // mit Tausenderpunkt
+ false, // nicht rot
+ (sal_uInt16) fDec,// Nachkommastellen
1); // 1 Vorkommanull
if (!pFormatter->GetPreviewString(sFormatString,
fVal,
@@ -7174,16 +7162,16 @@ void ScInterpreter::ScReplace()
void ScInterpreter::ScFixed()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFixed" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 3 ) )
{
String aStr;
double fDec;
- BOOL bThousand;
+ sal_Bool bThousand;
if (nParamCount == 3)
bThousand = !GetBool(); // Param TRUE: keine Tausenderpunkte
else
- bThousand = TRUE;
+ bThousand = sal_True;
if (nParamCount >= 2)
{
fDec = ::rtl::math::approxFloor(GetDoubleWithDefault( 2.0 ));
@@ -7209,15 +7197,15 @@ void ScInterpreter::ScFixed()
String sFormatString;
if (fDec < 0.0)
fDec = 0.0;
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GenerateFormat(sFormatString,
nIndex,
ScGlobal::eLnge,
bThousand, // mit Tausenderpunkt
- FALSE, // nicht rot
- (USHORT) fDec,// Nachkommastellen
+ false, // nicht rot
+ (sal_uInt16) fDec,// Nachkommastellen
1); // 1 Vorkommanull
if (!pFormatter->GetPreviewString(sFormatString,
fVal,
@@ -7234,7 +7222,7 @@ void ScInterpreter::ScFixed()
void ScInterpreter::ScFind()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFind" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fAnz;
@@ -7273,7 +7261,7 @@ void ScInterpreter::ScExact()
void ScInterpreter::ScLeft()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLeft" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
xub_StrLen n;
@@ -7300,7 +7288,7 @@ void ScInterpreter::ScLeft()
void ScInterpreter::ScRight()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRight" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
xub_StrLen n;
@@ -7328,7 +7316,7 @@ void ScInterpreter::ScRight()
void ScInterpreter::ScSearch()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSearch" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fAnz;
@@ -7354,7 +7342,7 @@ void ScInterpreter::ScSearch()
utl::SearchParam::SearchType eSearchType =
(MayBeRegExp( SearchStr, pDok ) ?
utl::SearchParam::SRCH_REGEXP : utl::SearchParam::SRCH_NORMAL);
- utl::SearchParam sPar(SearchStr, eSearchType, FALSE, FALSE, FALSE);
+ utl::SearchParam sPar(SearchStr, eSearchType, false, false, false);
utl::TextSearch sT( sPar, *ScGlobal::pCharClass );
int nBool = sT.SearchFrwrd(sStr, &nPos, &nEndPos);
if (!nBool)
@@ -7407,7 +7395,7 @@ void ScInterpreter::ScText()
PushTempToken( xTok.get());
// Temporarily override the ConvertStringToValue()
// error for GetCellValue() / GetCellValueOrZero()
- USHORT nSErr = mnStringNoValueError;
+ sal_uInt16 nSErr = mnStringNoValueError;
mnStringNoValueError = errNotNumericString;
fVal = GetDouble();
mnStringNoValueError = nSErr;
@@ -7460,7 +7448,7 @@ void ScInterpreter::ScText()
void ScInterpreter::ScSubstitute()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubstitute" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
xub_StrLen nAnz;
@@ -7484,7 +7472,7 @@ void ScInterpreter::ScSubstitute()
xub_StrLen nCount = 0;
xub_StrLen nNewLen = sNewStr.Len();
xub_StrLen nOldLen = sOldStr.Len();
- while( TRUE )
+ while( sal_True )
{
nPos = sStr.Search( sOldStr, nPos );
if (nPos != STRING_NOTFOUND)
@@ -7548,7 +7536,7 @@ void ScInterpreter::ScRept()
void ScInterpreter::ScConcat()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScConcat" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
String aRes;
while( nParamCount-- > 0)
{
@@ -7562,8 +7550,8 @@ void ScInterpreter::ScConcat()
void ScInterpreter::ScErrorType()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScErrorType" );
- USHORT nErr;
- USHORT nOldError = nGlobalError;
+ sal_uInt16 nErr;
+ sal_uInt16 nOldError = nGlobalError;
nGlobalError = 0;
switch ( GetStackType() )
{
@@ -7641,13 +7629,13 @@ void ScInterpreter::ScErrorType()
}
-BOOL ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc )
+sal_Bool ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::MayBeRegExp" );
if ( pDoc && !pDoc->GetDocOptions().IsFormulaRegexEnabled() )
- return FALSE;
+ return false;
if ( !rStr.Len() || (rStr.Len() == 1 && rStr.GetChar(0) != '.') )
- return FALSE; // einzelnes Metazeichen kann keine RegExp sein
+ return false; // einzelnes Metazeichen kann keine RegExp sein
static const sal_Unicode cre[] = { '.','*','+','?','[',']','^','$','\\','<','>','(',')','|', 0 };
const sal_Unicode* p1 = rStr.GetBuffer();
sal_Unicode c1;
@@ -7657,17 +7645,17 @@ BOOL ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc )
while ( *p2 )
{
if ( c1 == *p2++ )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
static bool lcl_LookupQuery( ScAddress & o_rResultPos, ScDocument * pDoc,
const ScQueryParam & rParam, const ScQueryEntry & rEntry )
{
bool bFound = false;
- ScQueryCellIterator aCellIter( pDoc, rParam.nTab, rParam, FALSE);
+ ScQueryCellIterator aCellIter( pDoc, rParam.nTab, rParam, false);
if (rEntry.eOp != SC_EQUAL)
{
// range lookup <= or >=
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index a70ec554d02d..aa06d915cb14 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -68,14 +68,14 @@ using namespace formula;
// Datum und Zeit
//-----------------------------------------------------------------------------
-double ScInterpreter::GetDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, bool bStrict )
+double ScInterpreter::GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bStrict )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDateSerial" );
if ( nYear < 100 && !bStrict )
nYear = pFormatter->ExpandTwoDigitYear( nYear );
// Do not use a default Date ctor here because it asks system time with a
// performance penalty.
- INT16 nY, nM, nD;
+ sal_Int16 nY, nM, nD;
if (bStrict)
nY = nYear, nM = nMonth, nD = nDay;
else
@@ -203,7 +203,7 @@ void ScInterpreter::ScGetDateValue()
void ScInterpreter::ScGetDayOfWeek()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGetDayOfWeek" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
short nFlag;
@@ -247,8 +247,8 @@ void ScInterpreter::ScEasterSunday()
nFuncFmtType = NUMBERFORMAT_DATE;
if ( MustHaveParamCount( GetByte(), 1 ) )
{
- INT16 nDay, nMonth, nYear;
- nYear = (INT16) ::rtl::math::approxFloor( GetDouble() );
+ sal_Int16 nDay, nMonth, nYear;
+ nYear = (sal_Int16) ::rtl::math::approxFloor( GetDouble() );
if ( nYear < 100 )
nYear = pFormatter->ExpandTwoDigitYear( nYear );
// don't worry, be happy :)
@@ -266,8 +266,8 @@ void ScInterpreter::ScEasterSunday()
L = (32 + 2 * E + 2 * I - H - K) % 7;
M = int((N + 11 * H + 22 * L) / 451);
O = H + L - 7 * M + 114;
- nDay = sal::static_int_cast<INT16>( O % 31 + 1 );
- nMonth = sal::static_int_cast<INT16>( int(O / 31) );
+ nDay = sal::static_int_cast<sal_Int16>( O % 31 + 1 );
+ nMonth = sal::static_int_cast<sal_Int16>( int(O / 31) );
PushDouble( GetDateSerial( nYear, nMonth, nDay, true ) );
}
}
@@ -278,9 +278,9 @@ void ScInterpreter::ScGetDate()
nFuncFmtType = NUMBERFORMAT_DATE;
if ( MustHaveParamCount( GetByte(), 3 ) )
{
- INT16 nDay = (INT16) ::rtl::math::approxFloor(GetDouble());
- INT16 nMonth = (INT16) ::rtl::math::approxFloor(GetDouble());
- INT16 nYear = (INT16) ::rtl::math::approxFloor(GetDouble());
+ sal_Int16 nDay = (sal_Int16) ::rtl::math::approxFloor(GetDouble());
+ sal_Int16 nMonth = (sal_Int16) ::rtl::math::approxFloor(GetDouble());
+ sal_Int16 nYear = (sal_Int16) ::rtl::math::approxFloor(GetDouble());
if (nYear < 0)
PushIllegalArgument();
else
@@ -342,14 +342,14 @@ void ScInterpreter::ScGetDiffDate360()
* In Calc the result is 419 respectively -419. I consider the -418 a bug in Excel.
*/
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- BOOL bFlag;
+ sal_Bool bFlag;
if (nParamCount == 3)
bFlag = GetBool();
else
- bFlag = FALSE;
+ bFlag = false;
double nDate2 = GetDouble();
double nDate1 = GetDouble();
if (nGlobalError)
@@ -373,7 +373,7 @@ void ScInterpreter::ScGetDiffDate360()
Date aDate2 = *(pFormatter->GetNullDate());
aDate2 += (long) ::rtl::math::approxFloor(nDate2);
if (aDate1.GetDay() == 31)
- aDate1 -= (ULONG) 1;
+ aDate1 -= (sal_uLong) 1;
else if (!bFlag)
{
if (aDate1.GetMonth() == 2)
@@ -395,7 +395,7 @@ void ScInterpreter::ScGetDiffDate360()
if (!bFlag )
{
if (aDate1.GetDay() == 30)
- aDate2 -= (ULONG) 1;
+ aDate2 -= (sal_uLong) 1;
}
else
aDate2.SetDay(30);
@@ -459,7 +459,7 @@ void ScInterpreter::ScInt()
void ScInterpreter::RoundNumber( rtl_math_RoundingMode eMode )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::RoundNumber" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double fVal = 0.0;
@@ -467,7 +467,7 @@ void ScInterpreter::RoundNumber( rtl_math_RoundingMode eMode )
fVal = ::rtl::math::round( GetDouble(), 0, eMode );
else
{
- INT32 nDec = (INT32) ::rtl::math::approxFloor(GetDouble());
+ sal_Int32 nDec = (sal_Int32) ::rtl::math::approxFloor(GetDouble());
if( nDec < -20 || nDec > 20 )
PushIllegalArgument();
else
@@ -498,10 +498,10 @@ void ScInterpreter::ScRoundUp()
void ScInterpreter::ScCeil()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCeil" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- BOOL bAbs = ( nParamCount == 3 ? GetBool() : FALSE );
+ sal_Bool bAbs = ( nParamCount == 3 ? GetBool() : false );
double fDec = GetDouble();
double fVal = GetDouble();
if ( fDec == 0.0 )
@@ -521,10 +521,10 @@ void ScInterpreter::ScCeil()
void ScInterpreter::ScFloor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFloor" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- BOOL bAbs = ( nParamCount == 3 ? GetBool() : FALSE );
+ sal_Bool bAbs = ( nParamCount == 3 ? GetBool() : false );
double fDec = GetDouble();
double fVal = GetDouble();
if ( fDec == 0.0 )
@@ -584,7 +584,7 @@ void ScInterpreter::ScArcTan2()
void ScInterpreter::ScLog()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLog" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double nBase;
@@ -659,7 +659,7 @@ void ScInterpreter::ScNPV()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nCellVal;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -684,23 +684,19 @@ void ScInterpreter::ScNPV()
}
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScIRR()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIRR" );
double fSchaetzwert;
nFuncFmtType = NUMBERFORMAT_PERCENT;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 2 ) )
return;
if (nParamCount == 2)
fSchaetzwert = GetDouble();
else
fSchaetzwert = 0.1;
- USHORT sPos = sp; // Stack-Position merken
+ sal_uInt16 sPos = sp; // Stack-Position merken
double fEps = 1.0;
double x, xNeu, fWert, fZaehler, fNenner, nCount;
if (fSchaetzwert == -1.0)
@@ -717,8 +713,8 @@ void ScInterpreter::ScIRR()
return;
}
}
- const USHORT nIterationsMax = 20;
- USHORT nItCount = 0;
+ const sal_uInt16 nIterationsMax = 20;
+ sal_uInt16 nItCount = 0;
ScRange aRange;
while (fEps > SCdEpsilon && nItCount < nIterationsMax)
{ // Newton-Verfahren:
@@ -726,7 +722,7 @@ void ScInterpreter::ScIRR()
nCount = 0.0;
fZaehler = 0.0;
fNenner = 0.0;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange );
ScValueIterator aValIter(pDok, aRange, glSubTotal);
if (aValIter.GetFirst(fWert, nErr))
@@ -754,10 +750,6 @@ void ScInterpreter::ScIRR()
else
PushError( errNoConvergence);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
void ScInterpreter::ScMIRR()
{ // range_of_values ; rate_invest ; rate_reinvest
@@ -780,10 +772,10 @@ void ScInterpreter::ScMIRR()
double fPow_invest = 1.0;
ScValueIterator aValIter( pDok, aRange, glSubTotal );
double fCellValue;
- ULONG nCount = 0;
- USHORT nIterError = 0;
+ sal_uLong nCount = 0;
+ sal_uInt16 nIterError = 0;
- BOOL bLoop = aValIter.GetFirst( fCellValue, nIterError );
+ sal_Bool bLoop = aValIter.GetFirst( fCellValue, nIterError );
while( bLoop )
{
if( fCellValue > 0.0 ) // reinvestments
@@ -851,7 +843,7 @@ void ScInterpreter::ScBW()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBW" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
double nRmz, nZzr, nZins, nZw = 0, nFlag = 0;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -911,7 +903,7 @@ void ScInterpreter::ScGDA()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGDA" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 4, 5 ) )
{
double nFaktor;
@@ -935,7 +927,7 @@ void ScInterpreter::ScGDA2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGDA2" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 5 ) )
return ;
double nMonate;
@@ -964,8 +956,8 @@ void ScInterpreter::ScGDA2()
double nSummAbRate = nErsteAbRate;
double nMin = nDauer;
if (nMin > nPeriode) nMin = nPeriode;
- USHORT iMax = (USHORT)::rtl::math::approxFloor(nMin);
- for (USHORT i = 2; i <= iMax; i++)
+ sal_uInt16 iMax = (sal_uInt16)::rtl::math::approxFloor(nMin);
+ for (sal_uInt16 i = 2; i <= iMax; i++)
{
nGda2 = (nWert - nSummAbRate) * nAbRate;
nSummAbRate += nGda2;
@@ -983,14 +975,14 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScInterVDB" );
double fVdb=0;
double fIntEnd = ::rtl::math::approxCeil(fPeriode);
- ULONG nLoopEnd = (ULONG) fIntEnd;
+ sal_uLong nLoopEnd = (sal_uLong) fIntEnd;
double fTerm, fLia;
double fRestwert = fWert - fRest;
- BOOL bNowLia = FALSE;
+ sal_Bool bNowLia = false;
double fGda;
- ULONG i;
+ sal_uLong i;
fLia=0;
for ( i = 1; i <= nLoopEnd; i++)
{
@@ -1002,7 +994,7 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer,
if (fLia > fGda)
{
fTerm = fLia;
- bNowLia = TRUE;
+ bNowLia = sal_True;
}
else
{
@@ -1033,15 +1025,15 @@ void ScInterpreter::ScVDB()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVDB" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 5, 7 ) )
{
double fWert, fRest, fDauer, fAnfang, fEnde, fFaktor, fVdb = 0.0;
- BOOL bFlag;
+ sal_Bool bFlag;
if (nParamCount == 7)
bFlag = GetBool();
else
- bFlag = FALSE;
+ bFlag = false;
if (nParamCount >= 6)
fFaktor = GetDouble();
else
@@ -1058,13 +1050,13 @@ void ScInterpreter::ScVDB()
{
double fIntStart = ::rtl::math::approxFloor(fAnfang);
double fIntEnd = ::rtl::math::approxCeil(fEnde);
- ULONG nLoopStart = (ULONG) fIntStart;
- ULONG nLoopEnd = (ULONG) fIntEnd;
+ sal_uLong nLoopStart = (sal_uLong) fIntStart;
+ sal_uLong nLoopEnd = (sal_uLong) fIntEnd;
fVdb = 0.0;
if (bFlag)
{
- for (ULONG i = nLoopStart + 1; i <= nLoopEnd; i++)
+ for (sal_uLong i = nLoopStart + 1; i <= nLoopEnd; i++)
{
double fTerm = ScGetGDA(fWert, fRest, fDauer, (double) i, fFaktor);
@@ -1155,7 +1147,7 @@ void ScInterpreter::ScRMZ()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRMZ" );
double nZins, nZzr, nBw, nZw = 0, nFlag = 0;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -1204,7 +1196,7 @@ void ScInterpreter::ScZW()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZW" );
double nZins, nZzr, nRmz, nBw = 0, nFlag = 0;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -1221,7 +1213,7 @@ void ScInterpreter::ScZZR()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZZR" );
double nZins, nRmz, nBw, nZw = 0, nFlag = 0;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -1252,8 +1244,8 @@ bool ScInterpreter::RateIteration( double fNper, double fPayment, double fPv,
bool bValid = true, bFound = false;
double fX, fXnew, fTerm, fTermDerivation;
double fGeoSeries, fGeoSeriesDerivation;
- const USHORT nIterationsMax = 150;
- USHORT nCount = 0;
+ const sal_uInt16 nIterationsMax = 150;
+ sal_uInt16 nCount = 0;
const double fEpsilonSmall = 1.0E-14;
// convert any fPayType situation to fPayType == zero situation
fFv = fFv - fPayment * fPayType;
@@ -1343,7 +1335,7 @@ void ScInterpreter::ScZins()
double fFv = 0, fPayType = 0, fGuess = 0.1;
bool bValid = true;
nFuncFmtType = NUMBERFORMAT_PERCENT;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 6 ) )
return;
if (nParamCount == 6)
@@ -1398,7 +1390,7 @@ void ScInterpreter::ScZinsZ()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZinsZ" );
double nZins, nZr, nZzr, nBw, nZw = 0, nFlag = 0;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 6 ) )
return;
if (nParamCount == 6)
@@ -1423,7 +1415,7 @@ void ScInterpreter::ScKapz()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScKapz" );
double nZins, nZr, nZzr, nBw, nZw = 0, nFlag = 0;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 6 ) )
return;
if (nParamCount == 6)
@@ -1462,8 +1454,8 @@ void ScInterpreter::ScKumZinsZ()
PushIllegalArgument();
else
{
- ULONG nAnfang = (ULONG) fAnfang;
- ULONG nEnde = (ULONG) fEnde ;
+ sal_uLong nAnfang = (sal_uLong) fAnfang;
+ sal_uLong nEnde = (sal_uLong) fEnde ;
double fRmz = ScGetRmz(fZins, fZzr, fBw, 0.0, fF);
double fZinsZ = 0.0;
if (nAnfang == 1)
@@ -1472,7 +1464,7 @@ void ScInterpreter::ScKumZinsZ()
fZinsZ = -fBw;
nAnfang++;
}
- for (ULONG i = nAnfang; i <= nEnde; i++)
+ for (sal_uLong i = nAnfang; i <= nEnde; i++)
{
if (fF > 0.0)
fZinsZ += ScGetZw(fZins, (double)(i-2), fRmz, fBw, 1.0) - fRmz;
@@ -1505,8 +1497,8 @@ void ScInterpreter::ScKumKapZ()
{
double fRmz = ScGetRmz(fZins, fZzr, fBw, 0.0, fF);
double fKapZ = 0.0;
- ULONG nAnfang = (ULONG) fAnfang;
- ULONG nEnde = (ULONG) fEnde;
+ sal_uLong nAnfang = (sal_uLong) fAnfang;
+ sal_uLong nEnde = (sal_uLong) fEnde;
if (nAnfang == 1)
{
if (fF <= 0.0)
@@ -1515,7 +1507,7 @@ void ScInterpreter::ScKumKapZ()
fKapZ = fRmz;
nAnfang++;
}
- for (ULONG i = nAnfang; i <= nEnde; i++)
+ for (sal_uLong i = nAnfang; i <= nEnde; i++)
{
if (fF > 0.0)
fKapZ += fRmz - (ScGetZw(fZins, (double)(i-2), fRmz, fBw, 1.0) - fRmz) * fZins;
@@ -1606,7 +1598,7 @@ void ScInterpreter::ScBackSolver()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBackSolver" );
if ( MustHaveParamCount( GetByte(), 3 ) )
{
- BOOL bDoneIteration = FALSE;
+ sal_Bool bDoneIteration = false;
ScAddress aValueAdr, aFormulaAdr;
double fTargetVal = GetDouble();
PopSingleRef( aFormulaAdr );
@@ -1616,7 +1608,7 @@ void ScInterpreter::ScBackSolver()
{
ScBaseCell* pVCell = GetCell( aValueAdr );
// CELLTYPE_NOTE: kein Value aber von Formel referiert
- BOOL bTempCell = (!pVCell || pVCell->GetCellType() == CELLTYPE_NOTE);
+ sal_Bool bTempCell = (!pVCell || pVCell->GetCellType() == CELLTYPE_NOTE);
ScBaseCell* pFCell = GetCell( aFormulaAdr );
if ( ((pVCell && pVCell->GetCellType() == CELLTYPE_VALUE) || bTempCell)
@@ -1636,7 +1628,7 @@ void ScInterpreter::ScBackSolver()
else
fSaveVal = GetCellValue( aValueAdr, pVCell );
- const USHORT nMaxIter = 100;
+ const sal_uInt16 nMaxIter = 100;
const double fEps = 1E-10;
const double fDelta = 1E-6;
@@ -1648,22 +1640,22 @@ void ScInterpreter::ScBackSolver()
ScValueCell* pValue = (ScValueCell*) pVCell;
pFormula->Interpret();
- BOOL bError = ( pFormula->GetErrCode() != 0 );
+ sal_Bool bError = ( pFormula->GetErrCode() != 0 );
// bError always corresponds with fF
fFPrev = pFormula->GetValue() - fTargetVal;
fBestF = fabs( fFPrev );
if ( fBestF < fDelta )
- bDoneIteration = TRUE;
+ bDoneIteration = sal_True;
double fX = fXPrev + fEps;
double fF = fFPrev;
double fSlope;
- USHORT nIter = 0;
+ sal_uInt16 nIter = 0;
- BOOL bHorMoveError = FALSE;
+ sal_Bool bHorMoveError = false;
// Nach der Regula Falsi Methode
while ( !bDoneIteration && ( nIter++ < nMaxIter ) )
{
@@ -1681,18 +1673,18 @@ void ScInterpreter::ScBackSolver()
// may become zero which ultimately causes the goal seek operation
// to fail. #i28955#
- USHORT nHorIter = 0;
+ sal_uInt16 nHorIter = 0;
const double fHorStepAngle = 5.0;
const double fHorMaxAngle = 80.0;
int nHorMaxIter = static_cast<int>( fHorMaxAngle / fHorStepAngle );
- BOOL bDoneHorMove = FALSE;
+ sal_Bool bDoneHorMove = false;
while ( !bDoneHorMove && !bHorMoveError && nHorIter++ < nHorMaxIter )
{
double fHorAngle = fHorStepAngle * static_cast<double>( nHorIter );
double fHorTangent = ::rtl::math::tan( fHorAngle * F_PI / 180 );
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while( nIdx++ < 2 && !bDoneHorMove )
{
double fHorX;
@@ -1712,12 +1704,12 @@ void ScInterpreter::ScBackSolver()
if ( fF != fFPrev )
{
fX = fHorX;
- bDoneHorMove = TRUE;
+ bDoneHorMove = sal_True;
}
}
}
if ( !bDoneHorMove )
- bHorMoveError = TRUE;
+ bHorMoveError = sal_True;
}
if ( bError )
@@ -1734,7 +1726,7 @@ void ScInterpreter::ScBackSolver()
{
// converged to root
fBestX = fX;
- bDoneIteration = TRUE;
+ bDoneIteration = sal_True;
}
else
{
@@ -2065,7 +2057,7 @@ void ScInterpreter::ScCurrent()
void ScInterpreter::ScStyle()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStyle" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (nParamCount >= 1 && nParamCount <= 3)
{
String aStyle2; // Vorlage nach Timer
@@ -2103,10 +2095,10 @@ void ScInterpreter::ScStyle()
}
ScDdeLink* lcl_GetDdeLink( sfx2::LinkManager* pLinkMgr,
- const String& rA, const String& rT, const String& rI, BYTE nM )
+ const String& rA, const String& rT, const String& rI, sal_uInt8 nM )
{
- USHORT nCount = pLinkMgr->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pLinkMgr->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++ )
{
::sfx2::SvBaseLink* pBase = *pLinkMgr->GetLinks()[i];
if (pBase->ISA(ScDdeLink))
@@ -2129,12 +2121,12 @@ void ScInterpreter::ScDde()
// Applikation, Datei, Bereich
// Application, Topic, Item
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
- BYTE nMode = SC_DDE_DEFAULT;
+ sal_uInt8 nMode = SC_DDE_DEFAULT;
if (nParamCount == 4)
- nMode = (BYTE) ::rtl::math::approxFloor(GetDouble());
+ nMode = (sal_uInt8) ::rtl::math::approxFloor(GetDouble());
String aItem = GetString();
String aTopic = GetString();
String aAppl = GetString();
@@ -2160,8 +2152,8 @@ void ScInterpreter::ScDde()
// solange der Link nicht ausgewertet ist, Idle abklemmen
// (um zirkulaere Referenzen zu vermeiden)
- BOOL bOldDis = pDok->IsIdleDisabled();
- pDok->DisableIdle( TRUE );
+ sal_Bool bOldDis = pDok->IsIdleDisabled();
+ pDok->DisableIdle( sal_True );
// Link-Objekt holen / anlegen
@@ -2170,7 +2162,7 @@ void ScInterpreter::ScDde()
//! Dde-Links (zusaetzlich) effizienter am Dokument speichern !!!!!
// ScDdeLink* pLink = pDok->GetDdeLink( aAppl, aTopic, aItem );
- BOOL bWasError = ( pMyFormulaCell->GetRawError() != 0 );
+ sal_Bool bWasError = ( pMyFormulaCell->GetRawError() != 0 );
if (!pLink)
{
@@ -2227,7 +2219,7 @@ void ScInterpreter::ScDde()
void ScInterpreter::ScBase()
{ // Value, Base [, MinLen]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
static const sal_Unicode pDigits[] = {
@@ -2270,10 +2262,10 @@ void ScInterpreter::ScBase()
}
sal_Unicode* p = pBuf + nBuf - 1;
*p = 0;
- if ( fVal <= (ULONG)(~0) )
+ if ( fVal <= (sal_uLong)(~0) )
{
- ULONG nVal = (ULONG) fVal;
- ULONG nBase = (ULONG) fBase;
+ sal_uLong nVal = (sal_uLong) fVal;
+ sal_uLong nBase = (sal_uLong) fBase;
while ( nVal && p > pBuf )
{
*--p = pDigits[ nVal % nBase ];
@@ -2283,7 +2275,7 @@ void ScInterpreter::ScBase()
}
else
{
- BOOL bDirt = FALSE;
+ sal_Bool bDirt = false;
while ( fVal && p > pBuf )
{
//! mit fmod Rundungsfehler ab 2**48
@@ -2313,7 +2305,7 @@ void ScInterpreter::ScBase()
size_t nDig;
if ( fVal < fMult )
{ // da ist was gekippt
- bDirt = TRUE;
+ bDirt = sal_True;
nDig = 0;
}
else
@@ -2321,7 +2313,7 @@ void ScInterpreter::ScBase()
double fDig = ::rtl::math::approxFloor( ::rtl::math::approxSub( fVal, fMult ) );
if ( bDirt )
{
- bDirt = FALSE;
+ bDirt = false;
--fDig;
}
if ( fDig <= 0.0 )
@@ -2434,7 +2426,7 @@ void ScInterpreter::ScConvert()
void ScInterpreter::ScRoman()
{ // Value [Mode]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double fMode = (nParamCount == 2) ? ::rtl::math::approxFloor( GetDouble() ) : 0.0;
@@ -2444,22 +2436,22 @@ void ScInterpreter::ScRoman()
else if( (fMode >= 0.0) && (fMode < 5.0) && (fVal >= 0.0) && (fVal < 4000.0) )
{
static const sal_Unicode pChars[] = { 'M', 'D', 'C', 'L', 'X', 'V', 'I' };
- static const USHORT pValues[] = { 1000, 500, 100, 50, 10, 5, 1 };
- static const USHORT nMaxIndex = (USHORT)(SAL_N_ELEMENTS(pValues) - 1);
+ static const sal_uInt16 pValues[] = { 1000, 500, 100, 50, 10, 5, 1 };
+ static const sal_uInt16 nMaxIndex = (sal_uInt16)(SAL_N_ELEMENTS(pValues) - 1);
String aRoman;
- USHORT nVal = (USHORT) fVal;
- USHORT nMode = (USHORT) fMode;
+ sal_uInt16 nVal = (sal_uInt16) fVal;
+ sal_uInt16 nMode = (sal_uInt16) fMode;
- for( UINT16 i = 0; i <= nMaxIndex / 2; i++ )
+ for( sal_uInt16 i = 0; i <= nMaxIndex / 2; i++ )
{
- USHORT nIndex = 2 * i;
- USHORT nDigit = nVal / pValues[ nIndex ];
+ sal_uInt16 nIndex = 2 * i;
+ sal_uInt16 nDigit = nVal / pValues[ nIndex ];
if( (nDigit % 5) == 4 )
{
- USHORT nIndex2 = (nDigit == 4) ? nIndex - 1 : nIndex - 2;
- USHORT nSteps = 0;
+ sal_uInt16 nIndex2 = (nDigit == 4) ? nIndex - 1 : nIndex - 2;
+ sal_uInt16 nSteps = 0;
while( (nSteps < nMode) && (nIndex < nMaxIndex) )
{
nSteps++;
@@ -2470,8 +2462,8 @@ void ScInterpreter::ScRoman()
}
aRoman += pChars[ nIndex ];
aRoman += pChars[ nIndex2 ];
- nVal = sal::static_int_cast<USHORT>( nVal + pValues[ nIndex ] );
- nVal = sal::static_int_cast<USHORT>( nVal - pValues[ nIndex2 ] );
+ nVal = sal::static_int_cast<sal_uInt16>( nVal + pValues[ nIndex ] );
+ nVal = sal::static_int_cast<sal_uInt16>( nVal - pValues[ nIndex2 ] );
}
else
{
@@ -2490,21 +2482,21 @@ void ScInterpreter::ScRoman()
}
-BOOL lcl_GetArabicValue( sal_Unicode cChar, USHORT& rnValue, BOOL& rbIsDec )
+sal_Bool lcl_GetArabicValue( sal_Unicode cChar, sal_uInt16& rnValue, sal_Bool& rbIsDec )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBase" );
switch( cChar )
{
- case 'M': rnValue = 1000; rbIsDec = TRUE; break;
- case 'D': rnValue = 500; rbIsDec = FALSE; break;
- case 'C': rnValue = 100; rbIsDec = TRUE; break;
- case 'L': rnValue = 50; rbIsDec = FALSE; break;
- case 'X': rnValue = 10; rbIsDec = TRUE; break;
- case 'V': rnValue = 5; rbIsDec = FALSE; break;
- case 'I': rnValue = 1; rbIsDec = TRUE; break;
- default: return FALSE;
+ case 'M': rnValue = 1000; rbIsDec = sal_True; break;
+ case 'D': rnValue = 500; rbIsDec = false; break;
+ case 'C': rnValue = 100; rbIsDec = sal_True; break;
+ case 'L': rnValue = 50; rbIsDec = false; break;
+ case 'X': rnValue = 10; rbIsDec = sal_True; break;
+ case 'V': rnValue = 5; rbIsDec = false; break;
+ case 'I': rnValue = 1; rbIsDec = sal_True; break;
+ default: return false;
}
- return TRUE;
+ return sal_True;
}
@@ -2518,18 +2510,18 @@ void ScInterpreter::ScArabic()
{
aRoman.ToUpperAscii();
- USHORT nValue = 0;
- USHORT nValidRest = 3999;
- USHORT nCharIndex = 0;
- USHORT nCharCount = aRoman.Len();
- BOOL bValid = TRUE;
+ sal_uInt16 nValue = 0;
+ sal_uInt16 nValidRest = 3999;
+ sal_uInt16 nCharIndex = 0;
+ sal_uInt16 nCharCount = aRoman.Len();
+ sal_Bool bValid = sal_True;
while( bValid && (nCharIndex < nCharCount) )
{
- USHORT nDigit1 = 0;
- USHORT nDigit2 = 0;
- BOOL bIsDec1 = FALSE;
- BOOL bIsDec2 = FALSE;
+ sal_uInt16 nDigit1 = 0;
+ sal_uInt16 nDigit2 = 0;
+ sal_Bool bIsDec1 = false;
+ sal_Bool bIsDec2 = false;
bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex ), nDigit1, bIsDec1 );
if( bValid && (nCharIndex + 1 < nCharCount) )
bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex + 1 ), nDigit2, bIsDec2 );
@@ -2537,24 +2529,24 @@ void ScInterpreter::ScArabic()
{
if( nDigit1 >= nDigit2 )
{
- nValue = sal::static_int_cast<USHORT>( nValue + nDigit1 );
+ nValue = sal::static_int_cast<sal_uInt16>( nValue + nDigit1 );
nValidRest %= (nDigit1 * (bIsDec1 ? 5 : 2));
bValid = (nValidRest >= nDigit1);
if( bValid )
- nValidRest = sal::static_int_cast<USHORT>( nValidRest - nDigit1 );
+ nValidRest = sal::static_int_cast<sal_uInt16>( nValidRest - nDigit1 );
nCharIndex++;
}
else if( nDigit1 * 2 != nDigit2 )
{
- USHORT nDiff = nDigit2 - nDigit1;
- nValue = sal::static_int_cast<USHORT>( nValue + nDiff );
+ sal_uInt16 nDiff = nDigit2 - nDigit1;
+ nValue = sal::static_int_cast<sal_uInt16>( nValue + nDiff );
bValid = (nValidRest >= nDiff);
if( bValid )
nValidRest = nDigit1 - 1;
nCharIndex += 2;
}
else
- bValid = FALSE;
+ bValid = false;
}
}
if( bValid )
@@ -2568,7 +2560,7 @@ void ScInterpreter::ScArabic()
void ScInterpreter::ScHyperLink()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScHyperLink" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double fVal = 0.0;
@@ -2597,7 +2589,7 @@ void ScInterpreter::ScHyperLink()
nResultType = SC_MATVAL_EMPTY;
else
{
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
if (nErr)
SetError( nErr);
else if (HasCellValueData( pCell))
@@ -2650,7 +2642,7 @@ void ScInterpreter::ScHyperLink()
}
-BOOL lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec )
+sal_Bool lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec )
{
struct ConvertInfo
{
@@ -2684,14 +2676,14 @@ BOOL lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec )
{
rfRate = aConvertTable[i].fRate;
rnDec = aConvertTable[i].nDec;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScInterpreter::ScEuroConvert()
{ //Value, FromUnit, ToUnit[, FullPrecision, [TriangulationPrecision]]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 5 ) )
{
double nPrecision = 0.0;
@@ -2704,7 +2696,7 @@ void ScInterpreter::ScEuroConvert()
return;
}
}
- BOOL bFullPrecision = FALSE;
+ sal_Bool bFullPrecision = false;
if ( nParamCount >= 4 )
bFullPrecision = GetBool();
String aToUnit( GetString() );
@@ -2875,7 +2867,7 @@ void lclAppendBlock( ByteString& rText, sal_Int32 nValue )
void ScInterpreter::ScBahtText()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBahtText" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1 ) )
{
double fValue = GetDouble();
@@ -2944,7 +2936,7 @@ void ScInterpreter::ScBahtText()
void ScInterpreter::ScGetPivotData()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGetPivotData" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 30 ) )
{
@@ -2971,14 +2963,14 @@ void ScInterpreter::ScGetPivotData()
{
// new syntax: separate name/value pairs
- USHORT nFilterCount = nParamCount / 2 - 1;
+ sal_uInt16 nFilterCount = nParamCount / 2 - 1;
aFilters.resize( nFilterCount );
- USHORT i = nFilterCount;
+ sal_uInt16 i = nFilterCount;
while( i-- > 0 )
{
//! should allow numeric constraint values
- aFilters[i].mbValIsStr = TRUE;
+ aFilters[i].mbValIsStr = sal_True;
aFilters[i].maValStr = GetString();
aFilters[i].maFieldName = GetString();
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 60f944666342..3eec9942195f 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -210,7 +210,7 @@ double ScInterpreter::integralPhi(double x)
return 0.5 * ::rtl::math::erfc(-x * 0.7071067811865475); // * 1/sqrt(2)
}
-double ScInterpreter::taylor(double* pPolynom, USHORT nMax, double x)
+double ScInterpreter::taylor(double* pPolynom, sal_uInt16 nMax, double x)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::taylor" );
double nVal = pPolynom[nMax];
@@ -249,7 +249,7 @@ double ScInterpreter::gauss(double x)
double asympt[] = { -1.0, 1.0, -3.0, 15.0, -105.0 };
double xAbs = fabs(x);
- USHORT xShort = (USHORT)::rtl::math::approxFloor(xAbs);
+ sal_uInt16 xShort = (sal_uInt16)::rtl::math::approxFloor(xAbs);
double nVal = 0.0;
if (xShort == 0)
nVal = taylor(t0, 11, (xAbs * xAbs)) * xAbs;
@@ -722,7 +722,7 @@ double ScInterpreter::GetChiSqDistPDF(double fX, double fDF)
void ScInterpreter::ScChiSqDist()
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return;
bool bCumulative;
@@ -1008,7 +1008,7 @@ double ScInterpreter::GetBetaDist(double fXin, double fAlpha, double fBeta)
void ScInterpreter::ScBetaDist()
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 6 ) ) // expanded, see #i91547#
return;
double fLowerBound, fUpperBound;
@@ -1144,7 +1144,7 @@ void ScInterpreter::ScVariationen()
else
{
double nVal = n;
- for (ULONG i = (ULONG)k-1; i >= 1; i--)
+ for (sal_uLong i = (sal_uLong)k-1; i >= 1; i--)
nVal *= n-(double)i;
PushDouble(nVal);
}
@@ -1168,7 +1168,7 @@ void ScInterpreter::ScVariationen2()
void ScInterpreter::ScB()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScB" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4 ) )
return ;
if (nParamCount == 3)
@@ -1189,16 +1189,16 @@ void ScInterpreter::ScB()
PushNoValue();
else
{
- ULONG max = (ULONG) (n - x);
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) (n - x);
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*q/p;
PushDouble(fFactor);
}
}
else
{
- ULONG max = (ULONG) x;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) x;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*p/q;
PushDouble(fFactor);
}
@@ -1233,16 +1233,16 @@ void ScInterpreter::ScB()
else
{
double fSum = 0.0;
- ULONG max;
- if (xe < (ULONG) n)
- max = (ULONG) (n-xe)-1;
+ sal_uLong max;
+ if (xe < (sal_uLong) n)
+ max = (sal_uLong) (n-xe)-1;
else
max = 0;
- ULONG i;
+ sal_uLong i;
for (i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*q/p;
- if (xs < (ULONG) n)
- max = (ULONG) (n-xs);
+ if (xs < (sal_uLong) n)
+ max = (sal_uLong) (n-xs);
else
fSum = fFactor;
for (; i < max && fFactor > 0.0; i++)
@@ -1255,25 +1255,25 @@ void ScInterpreter::ScB()
}
else
{
- ULONG max;
+ sal_uLong max;
double fSum;
- if ( (ULONG) xs == 0)
+ if ( (sal_uLong) xs == 0)
{
fSum = fFactor;
max = 0;
}
else
{
- max = (ULONG) xs-1;
+ max = (sal_uLong) xs-1;
fSum = 0.0;
}
- ULONG i;
+ sal_uLong i;
for (i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*p/q;
- if ((ULONG)xe == 0) // beide 0
+ if ((sal_uLong)xe == 0) // beide 0
fSum = fFactor;
else
- max = (ULONG) xe;
+ max = (sal_uLong) xe;
for (; i < max && fFactor > 0.0; i++)
{
fFactor *= (n-i)/(i+1)*p/q;
@@ -1322,16 +1322,16 @@ void ScInterpreter::ScBinomDist()
PushNoValue();
else
{
- ULONG max = (ULONG) (n - x);
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) (n - x);
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*q/p;
PushDouble(fFactor);
}
}
else
{
- ULONG max = (ULONG) x;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) x;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*p/q;
PushDouble(fFactor);
}
@@ -1353,8 +1353,8 @@ void ScInterpreter::ScBinomDist()
else
{
fSum = 1.0 - fFactor;
- ULONG max = (ULONG) (n - x) - 1;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) (n - x) - 1;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
{
fFactor *= (n-i)/(i+1)*q/p;
fSum -= fFactor;
@@ -1368,8 +1368,8 @@ void ScInterpreter::ScBinomDist()
else
{
fSum = fFactor;
- ULONG max = (ULONG) x;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) x;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
{
fFactor *= (n-i)/(i+1)*p/q;
fSum += fFactor;
@@ -1402,8 +1402,8 @@ void ScInterpreter::ScCritBinom()
PushNoValue();
else
{
- double fSum = 1.0 - fFactor; ULONG max = (ULONG) n;
- ULONG i;
+ double fSum = 1.0 - fFactor; sal_uLong max = (sal_uLong) n;
+ sal_uLong i;
for ( i = 0; i < max && fSum >= alpha; i++)
{
@@ -1415,8 +1415,8 @@ void ScInterpreter::ScCritBinom()
}
else
{
- double fSum = fFactor; ULONG max = (ULONG) n;
- ULONG i;
+ double fSum = fFactor; sal_uLong max = (sal_uLong) n;
+ sal_uLong i;
for ( i = 0; i < max && fSum < alpha; i++)
{
@@ -1453,7 +1453,7 @@ void ScInterpreter::ScNegBinomDist()
void ScInterpreter::ScNormDist()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScNormDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4))
return;
bool bCumulative = nParamCount == 4 ? GetBool() : true;
@@ -1474,7 +1474,7 @@ void ScInterpreter::ScNormDist()
void ScInterpreter::ScLogNormDist() //expanded, see #i100119#
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLogNormDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 4))
return;
bool bCumulative = nParamCount == 4 ? GetBool() : true; // cumulative
@@ -1615,7 +1615,7 @@ void ScInterpreter::ScWeibull()
void ScInterpreter::ScPoissonDist()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPoissonDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
bool bCumulative = (nParamCount == 3 ? GetBool() : true); // default cumulative
@@ -1917,7 +1917,7 @@ void ScInterpreter::ScHypGeomDist()
void ScInterpreter::ScGammaDist()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGammaDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4 ) )
return;
double bCumulative;
@@ -2037,7 +2037,7 @@ public:
void ScInterpreter::ScBetaInv()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBetaInv" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
double fP, fA, fB, fAlpha, fBeta;
@@ -2227,7 +2227,7 @@ void ScInterpreter::ScConfidence()
void ScInterpreter::ScZTest()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZTest" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return;
double sigma = 0.0, mue, x;
@@ -2278,7 +2278,7 @@ void ScInterpreter::ScZTest()
while (nParam-- > 0)
{
ScRange aRange;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParam, nRefInList);
ScValueIterator aValIter(pDok, aRange, glSubTotal);
if (aValIter.GetFirst(fVal, nErr))
@@ -2345,7 +2345,7 @@ void ScInterpreter::ScZTest()
PushDouble(0.5 - gauss((mue-x)*sqrt(rValCount)/sigma));
}
}
-bool ScInterpreter::CalculateTest(BOOL _bTemplin
+bool ScInterpreter::CalculateTest(sal_Bool _bTemplin
,const SCSIZE nC1, const SCSIZE nC2,const SCSIZE nR1,const SCSIZE nR2
,const ScMatrixRef& pMat1,const ScMatrixRef& pMat2
,double& fT,double& fF)
@@ -2475,11 +2475,11 @@ void ScInterpreter::ScTTest()
}
else if (fTyp == 2.0)
{
- CalculateTest(FALSE,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
+ CalculateTest(false,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
}
else if (fTyp == 3.0)
{
- CalculateTest(TRUE,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
+ CalculateTest(sal_True,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
}
else
@@ -2708,7 +2708,7 @@ void ScInterpreter::ScHarMean()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -2831,7 +2831,7 @@ void ScInterpreter::ScGeoMean()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -2967,7 +2967,7 @@ bool ScInterpreter::CalculateSkew(double& fSum,double& fCount,double& vSum,std::
case svRefList :
{
PopDoubleRef( aRange, nParamCount, nRefInList);
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
ScValueIterator aValIter(pDok, aRange);
if (aValIter.GetFirst(fVal, nErr))
{
@@ -3091,7 +3091,7 @@ double ScInterpreter::GetMedian( vector<double> & rArray )
void ScInterpreter::ScMedian()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMedian" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
vector<double> aArray;
@@ -3165,7 +3165,7 @@ void ScInterpreter::ScQuartile()
void ScInterpreter::ScModalValue()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScModalValue" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
vector<double> aSortArray;
@@ -3208,7 +3208,7 @@ void ScInterpreter::ScModalValue()
}
}
-void ScInterpreter::CalculateSmallLarge(BOOL bSmall)
+void ScInterpreter::CalculateSmallLarge(sal_Bool bSmall)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSmallLarge" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -3241,19 +3241,19 @@ void ScInterpreter::CalculateSmallLarge(BOOL bSmall)
void ScInterpreter::ScLarge()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLarge" );
- CalculateSmallLarge(FALSE);
+ CalculateSmallLarge(false);
}
void ScInterpreter::ScSmall()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSmall" );
- CalculateSmallLarge(TRUE);
+ CalculateSmallLarge(sal_True);
}
void ScInterpreter::ScPercentrank()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPercentrank" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2 ) )
return;
@@ -3328,7 +3328,7 @@ void ScInterpreter::ScTrimMean()
PushNoValue();
else
{
- ULONG nIndex = (ULONG) ::rtl::math::approxFloor(alpha*(double)nSize);
+ sal_uLong nIndex = (sal_uLong) ::rtl::math::approxFloor(alpha*(double)nSize);
if (nIndex % 2 != 0)
nIndex--;
nIndex /= 2;
@@ -3340,7 +3340,7 @@ void ScInterpreter::ScTrimMean()
}
}
-void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector<double>& rArray )
+void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double>& rArray )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetSortArray" );
ScAddress aAdr;
@@ -3374,7 +3374,7 @@ void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector<double>& rA
nCellCount *= aRange.aEnd.Row() - aRange.aStart.Row() + 1;
rArray.reserve( rArray.size() + nCellCount);
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double fCellVal;
ScValueIterator aValIter(pDok, aRange);
if (aValIter.GetFirst( fCellVal, nErr))
@@ -3424,7 +3424,7 @@ void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector<double>& rA
PopError();
}
-void ScInterpreter::GetSortArray( BYTE nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder )
+void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder )
{
GetNumberSequenceArray( nParamCount, rSortArray);
@@ -3519,16 +3519,16 @@ void ScInterpreter::QuickSort( vector<double>& rSortArray, vector<long>* pIndexO
void ScInterpreter::ScRank()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRank" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return;
- BOOL bDescending;
+ sal_Bool bDescending;
if (nParamCount == 3)
bDescending = GetBool();
else
- bDescending = FALSE;
+ bDescending = false;
double fCount = 1.0;
- BOOL bValid = FALSE;
+ sal_Bool bValid = false;
switch (GetStackType())
{
case formula::svDouble :
@@ -3536,7 +3536,7 @@ void ScInterpreter::ScRank()
double x = GetDouble();
double fVal = GetDouble();
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
break;
}
case svSingleRef :
@@ -3549,7 +3549,7 @@ void ScInterpreter::ScRank()
{
double x = GetCellValue( aAdr, pCell );
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
}
break;
}
@@ -3561,9 +3561,9 @@ void ScInterpreter::ScRank()
size_t nRefInList = 0;
while (nParam-- > 0)
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
// Preserve stack until all RefList elements are done!
- USHORT nSaveSP = sp;
+ sal_uInt16 nSaveSP = sp;
PopDoubleRef( aRange, nParam, nRefInList);
if (nParam)
--sp; // simulate pop
@@ -3575,7 +3575,7 @@ void ScInterpreter::ScRank()
if (aValIter.GetFirst(nCellVal, nErr))
{
if (nCellVal == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && nCellVal > fVal) ||
(bDescending && nCellVal < fVal) )
fCount++;
@@ -3583,7 +3583,7 @@ void ScInterpreter::ScRank()
while ((nErr == 0) && aValIter.GetNext(nCellVal, nErr))
{
if (nCellVal == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && nCellVal > fVal) ||
(bDescending && nCellVal < fVal) )
fCount++;
@@ -3608,7 +3608,7 @@ void ScInterpreter::ScRank()
{
double x = pMat->GetDouble(i);
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && x > fVal) ||
(bDescending && x < fVal) )
fCount++;
@@ -3621,7 +3621,7 @@ void ScInterpreter::ScRank()
{
double x = pMat->GetDouble(i);
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && x > fVal) ||
(bDescending && x < fVal) )
fCount++;
@@ -3641,10 +3641,10 @@ void ScInterpreter::ScRank()
void ScInterpreter::ScAveDev()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAveDev" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
- USHORT SaveSP = sp;
+ sal_uInt16 SaveSP = sp;
double nMiddle = 0.0;
double rVal = 0.0;
double rValCount = 0.0;
@@ -3674,7 +3674,7 @@ void ScInterpreter::ScAveDev()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nCellVal;
PopDoubleRef( aRange, nParam, nRefInList);
ScValueIterator aValIter(pDok, aRange);
@@ -3753,7 +3753,7 @@ void ScInterpreter::ScAveDev()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nCellVal;
PopDoubleRef( aRange, nParam, nRefInList);
ScValueIterator aValIter(pDok, aRange);
@@ -3809,7 +3809,7 @@ void ScInterpreter::ScDevSq()
void ScInterpreter::ScProbability()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScProbability" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4 ) )
return;
double fUp, fLo;
@@ -3841,7 +3841,7 @@ void ScInterpreter::ScProbability()
{
double fSum = 0.0;
double fRes = 0.0;
- BOOL bStop = FALSE;
+ sal_Bool bStop = false;
double fP, fW;
for ( SCSIZE i = 0; i < nC1 && !bStop; i++ )
{
@@ -3852,7 +3852,7 @@ void ScInterpreter::ScProbability()
fP = pMatP->GetDouble(i,j);
fW = pMatW->GetDouble(i,j);
if (fP < 0.0 || fP > 1.0)
- bStop = TRUE;
+ bStop = true;
else
{
fSum += fP;
@@ -3882,15 +3882,15 @@ void ScInterpreter::ScCorrel()
void ScInterpreter::ScCovar()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCovar" );
- CalculatePearsonCovar(FALSE,FALSE);
+ CalculatePearsonCovar(false,false);
}
void ScInterpreter::ScPearson()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPearson" );
- CalculatePearsonCovar(TRUE,FALSE);
+ CalculatePearsonCovar(sal_True,false);
}
-void ScInterpreter::CalculatePearsonCovar(BOOL _bPearson,BOOL _bStexy)
+void ScInterpreter::CalculatePearsonCovar(sal_Bool _bPearson,sal_Bool _bStexy)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculatePearsonCovar" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -4001,9 +4001,9 @@ void ScInterpreter::ScRSQ()
void ScInterpreter::ScSTEXY()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSTEXY" );
- CalculatePearsonCovar(TRUE,TRUE);
+ CalculatePearsonCovar(true,true);
}
-void ScInterpreter::CalculateSlopeIntercept(BOOL bSlope)
+void ScInterpreter::CalculateSlopeIntercept(sal_Bool bSlope)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSlopeIntercept" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -4078,13 +4078,13 @@ void ScInterpreter::CalculateSlopeIntercept(BOOL bSlope)
void ScInterpreter::ScSlope()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSlope" );
- CalculateSlopeIntercept(TRUE);
+ CalculateSlopeIntercept(sal_True);
}
void ScInterpreter::ScIntercept()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIntercept" );
- CalculateSlopeIntercept(FALSE);
+ CalculateSlopeIntercept(false);
}
void ScInterpreter::ScForecast()
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index a7cfb71a9699..17d789b0eb56 100644..100755
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -145,11 +145,11 @@ void ScInterpreter::ReplaceCell( SCCOL& rCol, SCROW& rRow, SCTAB& rTab )
}
-BOOL ScInterpreter::IsTableOpInRange( const ScRange& rRange )
+sal_Bool ScInterpreter::IsTableOpInRange( const ScRange& rRange )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsTableOpInRange" );
if ( rRange.aStart == rRange.aEnd )
- return FALSE; // not considered to be a range in TableOp sense
+ return false; // not considered to be a range in TableOp sense
// we can't replace a single cell in a range
size_t ListSize = pDok->aTableOpList.size();
@@ -157,19 +157,19 @@ BOOL ScInterpreter::IsTableOpInRange( const ScRange& rRange )
{
ScInterpreterTableOpParams* pTOp = &pDok->aTableOpList[ i ];
if ( rRange.In( pTOp->aOld1 ) )
- return TRUE;
+ return sal_True;
if ( rRange.In( pTOp->aOld2 ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-ULONG ScInterpreter::GetCellNumberFormat( const ScAddress& rPos, const ScBaseCell* pCell)
+sal_uLong ScInterpreter::GetCellNumberFormat( const ScAddress& rPos, const ScBaseCell* pCell)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetCellNumberFormat" );
- ULONG nFormat;
- USHORT nErr;
+ sal_uLong nFormat;
+ sal_uInt16 nErr;
if ( pCell )
{
if ( pCell->GetCellType() == CELLTYPE_FORMULA )
@@ -199,7 +199,7 @@ double ScInterpreter::GetValueCellValue( const ScAddress& rPos, const ScValueCel
double fVal = pCell->GetValue();
if ( bCalcAsShown && fVal != 0.0 )
{
- ULONG nFormat = pDok->GetNumberFormat( rPos );
+ sal_uLong nFormat = pDok->GetNumberFormat( rPos );
fVal = pDok->RoundValueAsShown( fVal, nFormat );
}
return fVal;
@@ -413,7 +413,7 @@ double ScInterpreter::ConvertStringToValue( const String& rStr )
double ScInterpreter::GetCellValue( const ScAddress& rPos, const ScBaseCell* pCell )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetCellValue" );
- USHORT nErr = nGlobalError;
+ sal_uInt16 nErr = nGlobalError;
nGlobalError = 0;
double nVal = GetCellValueOrZero( rPos, pCell );
if ( !nGlobalError || nGlobalError == errCellNoValue )
@@ -434,7 +434,7 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, const ScBaseCel
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = (ScFormulaCell*) pCell;
- USHORT nErr = pFCell->GetErrCode();
+ sal_uInt16 nErr = pFCell->GetErrCode();
if( !nErr )
{
if (pFCell->IsValue())
@@ -501,7 +501,7 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, const ScBaseCel
void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetCellString" );
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
if (pCell)
{
switch (pCell->GetCellType())
@@ -519,7 +519,7 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
if (pFCell->IsValue())
{
double fVal = pFCell->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, rStr);
@@ -531,7 +531,7 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
case CELLTYPE_VALUE:
{
double fVal = ((ScValueCell*) pCell)->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, rStr);
@@ -548,29 +548,29 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
}
-BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr)
+sal_Bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateDoubleArr" );
- // Old Add-Ins are hard limited to USHORT values.
+ // Old Add-Ins are hard limited to sal_uInt16 values.
#if MAXCOLCOUNT_DEFINE > USHRT_MAX
#error Add check for columns > USHRT_MAX!
#endif
if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
- return FALSE;
-
- USHORT nCount = 0;
- USHORT* p = (USHORT*) pCellArr;
- *p++ = static_cast<USHORT>(nCol1);
- *p++ = static_cast<USHORT>(nRow1);
- *p++ = static_cast<USHORT>(nTab1);
- *p++ = static_cast<USHORT>(nCol2);
- *p++ = static_cast<USHORT>(nRow2);
- *p++ = static_cast<USHORT>(nTab2);
- USHORT* pCount = p;
+ return false;
+
+ sal_uInt16 nCount = 0;
+ sal_uInt16* p = (sal_uInt16*) pCellArr;
+ *p++ = static_cast<sal_uInt16>(nCol1);
+ *p++ = static_cast<sal_uInt16>(nRow1);
+ *p++ = static_cast<sal_uInt16>(nTab1);
+ *p++ = static_cast<sal_uInt16>(nCol2);
+ *p++ = static_cast<sal_uInt16>(nRow2);
+ *p++ = static_cast<sal_uInt16>(nTab2);
+ sal_uInt16* pCount = p;
*p++ = 0;
- USHORT nPos = 14;
+ sal_uInt16 nPos = 14;
SCTAB nTab = nTab1;
ScAddress aAdr;
while (nTab <= nTab2)
@@ -587,9 +587,9 @@ BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScBaseCell* pCell = pDok->GetCell( aAdr );
if (pCell)
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nVal = 0.0;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
switch ( pCell->GetCellType() )
{
case CELLTYPE_VALUE :
@@ -602,23 +602,23 @@ BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nVal = ((ScFormulaCell*)pCell)->GetValue();
}
else
- bOk = FALSE;
+ bOk = false;
break;
default :
- bOk = FALSE;
+ bOk = false;
break;
}
if (bOk)
{
- if ((nPos + (4 * sizeof(USHORT)) + sizeof(double)) > MAXARRSIZE)
- return FALSE;
- *p++ = static_cast<USHORT>(nCol);
- *p++ = static_cast<USHORT>(nRow);
- *p++ = static_cast<USHORT>(nTab);
+ if ((nPos + (4 * sizeof(sal_uInt16)) + sizeof(double)) > MAXARRSIZE)
+ return false;
+ *p++ = static_cast<sal_uInt16>(nCol);
+ *p++ = static_cast<sal_uInt16>(nRow);
+ *p++ = static_cast<sal_uInt16>(nTab);
*p++ = nErr;
memcpy( p, &nVal, sizeof(double));
nPos += 8 + sizeof(double);
- p = (USHORT*) ( pCellArr + nPos );
+ p = (sal_uInt16*) ( pCellArr + nPos );
nCount++;
}
}
@@ -629,34 +629,34 @@ BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nTab++;
}
*pCount = nCount;
- return TRUE;
+ return sal_True;
}
-BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+sal_Bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- BYTE* pCellArr)
+ sal_uInt8* pCellArr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateStringArr" );
- // Old Add-Ins are hard limited to USHORT values.
+ // Old Add-Ins are hard limited to sal_uInt16 values.
#if MAXCOLCOUNT_DEFINE > USHRT_MAX
#error Add check for columns > USHRT_MAX!
#endif
if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
- return FALSE;
-
- USHORT nCount = 0;
- USHORT* p = (USHORT*) pCellArr;
- *p++ = static_cast<USHORT>(nCol1);
- *p++ = static_cast<USHORT>(nRow1);
- *p++ = static_cast<USHORT>(nTab1);
- *p++ = static_cast<USHORT>(nCol2);
- *p++ = static_cast<USHORT>(nRow2);
- *p++ = static_cast<USHORT>(nTab2);
- USHORT* pCount = p;
+ return false;
+
+ sal_uInt16 nCount = 0;
+ sal_uInt16* p = (sal_uInt16*) pCellArr;
+ *p++ = static_cast<sal_uInt16>(nCol1);
+ *p++ = static_cast<sal_uInt16>(nRow1);
+ *p++ = static_cast<sal_uInt16>(nTab1);
+ *p++ = static_cast<sal_uInt16>(nCol2);
+ *p++ = static_cast<sal_uInt16>(nRow2);
+ *p++ = static_cast<sal_uInt16>(nTab2);
+ sal_uInt16* pCount = p;
*p++ = 0;
- USHORT nPos = 14;
+ sal_uInt16 nPos = 14;
SCTAB nTab = nTab1;
while (nTab <= nTab2)
{
@@ -671,8 +671,8 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
if (pCell)
{
String aStr;
- USHORT nErr = 0;
- BOOL bOk = TRUE;
+ sal_uInt16 nErr = 0;
+ sal_Bool bOk = sal_True;
switch ( pCell->GetCellType() )
{
case CELLTYPE_STRING :
@@ -688,10 +688,10 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
((ScFormulaCell*)pCell)->GetString(aStr);
}
else
- bOk = FALSE;
+ bOk = false;
break;
default :
- bOk = FALSE;
+ bOk = false;
break;
}
if (bOk)
@@ -699,26 +699,26 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ByteString aTmp( aStr, osl_getThreadTextEncoding() );
// In case the xub_StrLen will be longer than USHORT
// one day, and room for pad byte check.
- if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
- return FALSE;
+ if ( aTmp.Len() > ((sal_uInt16)(~0)) - 2 )
+ return false;
// Append a 0-pad-byte if string length is not even
- //! MUST be USHORT and not xub_StrLen
- USHORT nStrLen = (USHORT) aTmp.Len();
- USHORT nLen = ( nStrLen + 2 ) & ~1;
-
- if (((ULONG)nPos + (5 * sizeof(USHORT)) + nLen) > MAXARRSIZE)
- return FALSE;
- *p++ = static_cast<USHORT>(nCol);
- *p++ = static_cast<USHORT>(nRow);
- *p++ = static_cast<USHORT>(nTab);
+ //! MUST be sal_uInt16 and not xub_StrLen
+ sal_uInt16 nStrLen = (sal_uInt16) aTmp.Len();
+ sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
+
+ if (((sal_uLong)nPos + (5 * sizeof(sal_uInt16)) + nLen) > MAXARRSIZE)
+ return false;
+ *p++ = static_cast<sal_uInt16>(nCol);
+ *p++ = static_cast<sal_uInt16>(nRow);
+ *p++ = static_cast<sal_uInt16>(nTab);
*p++ = nErr;
*p++ = nLen;
memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
nPos += 10 + nStrLen + 1;
- BYTE* q = ( pCellArr + nPos );
+ sal_uInt8* q = ( pCellArr + nPos );
if( !nStrLen & 1 )
*q++ = 0, nPos++;
- p = (USHORT*) ( pCellArr + nPos );
+ p = (sal_uInt16*) ( pCellArr + nPos );
nCount++;
}
}
@@ -729,34 +729,34 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nTab++;
}
*pCount = nCount;
- return TRUE;
+ return sal_True;
}
-BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+sal_Bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- BYTE* pCellArr)
+ sal_uInt8* pCellArr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateCellArr" );
- // Old Add-Ins are hard limited to USHORT values.
+ // Old Add-Ins are hard limited to sal_uInt16 values.
#if MAXCOLCOUNT_DEFINE > USHRT_MAX
#error Add check for columns > USHRT_MAX!
#endif
if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
- return FALSE;
-
- USHORT nCount = 0;
- USHORT* p = (USHORT*) pCellArr;
- *p++ = static_cast<USHORT>(nCol1);
- *p++ = static_cast<USHORT>(nRow1);
- *p++ = static_cast<USHORT>(nTab1);
- *p++ = static_cast<USHORT>(nCol2);
- *p++ = static_cast<USHORT>(nRow2);
- *p++ = static_cast<USHORT>(nTab2);
- USHORT* pCount = p;
+ return false;
+
+ sal_uInt16 nCount = 0;
+ sal_uInt16* p = (sal_uInt16*) pCellArr;
+ *p++ = static_cast<sal_uInt16>(nCol1);
+ *p++ = static_cast<sal_uInt16>(nRow1);
+ *p++ = static_cast<sal_uInt16>(nTab1);
+ *p++ = static_cast<sal_uInt16>(nCol2);
+ *p++ = static_cast<sal_uInt16>(nRow2);
+ *p++ = static_cast<sal_uInt16>(nTab2);
+ sal_uInt16* pCount = p;
*p++ = 0;
- USHORT nPos = 14;
+ sal_uInt16 nPos = 14;
SCTAB nTab = nTab1;
ScAddress aAdr;
while (nTab <= nTab2)
@@ -773,11 +773,11 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScBaseCell* pCell = pDok->GetCell( aAdr );
if (pCell)
{
- USHORT nErr = 0;
- USHORT nType = 0; // 0 = Zahl; 1 = String
+ sal_uInt16 nErr = 0;
+ sal_uInt16 nType = 0; // 0 = Zahl; 1 = String
double nVal = 0.0;
String aStr;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
switch ( pCell->GetCellType() )
{
case CELLTYPE_STRING :
@@ -799,23 +799,23 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
((ScFormulaCell*)pCell)->GetString(aStr);
break;
default :
- bOk = FALSE;
+ bOk = false;
break;
}
if (bOk)
{
- if ((nPos + (5 * sizeof(USHORT))) > MAXARRSIZE)
- return FALSE;
- *p++ = static_cast<USHORT>(nCol);
- *p++ = static_cast<USHORT>(nRow);
- *p++ = static_cast<USHORT>(nTab);
+ if ((nPos + (5 * sizeof(sal_uInt16))) > MAXARRSIZE)
+ return false;
+ *p++ = static_cast<sal_uInt16>(nCol);
+ *p++ = static_cast<sal_uInt16>(nRow);
+ *p++ = static_cast<sal_uInt16>(nTab);
*p++ = nErr;
*p++ = nType;
nPos += 10;
if (nType == 0)
{
if ((nPos + sizeof(double)) > MAXARRSIZE)
- return FALSE;
+ return false;
memcpy( p, &nVal, sizeof(double));
nPos += sizeof(double);
}
@@ -824,23 +824,23 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ByteString aTmp( aStr, osl_getThreadTextEncoding() );
// In case the xub_StrLen will be longer than USHORT
// one day, and room for pad byte check.
- if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
- return FALSE;
+ if ( aTmp.Len() > ((sal_uInt16)(~0)) - 2 )
+ return false;
// Append a 0-pad-byte if string length is not even
- //! MUST be USHORT and not xub_StrLen
- USHORT nStrLen = (USHORT) aTmp.Len();
- USHORT nLen = ( nStrLen + 2 ) & ~1;
- if ( ((ULONG)nPos + 2 + nLen) > MAXARRSIZE)
- return FALSE;
+ //! MUST be sal_uInt16 and not xub_StrLen
+ sal_uInt16 nStrLen = (sal_uInt16) aTmp.Len();
+ sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
+ if ( ((sal_uLong)nPos + 2 + nLen) > MAXARRSIZE)
+ return false;
*p++ = nLen;
memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
nPos += 2 + nStrLen + 1;
- BYTE* q = ( pCellArr + nPos );
+ sal_uInt8* q = ( pCellArr + nPos );
if( !nStrLen & 1 )
*q++ = 0, nPos++;
}
nCount++;
- p = (USHORT*) ( pCellArr + nPos );
+ p = (sal_uInt16*) ( pCellArr + nPos );
}
}
nCol++;
@@ -850,7 +850,7 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nTab++;
}
*pCount = nCount;
- return TRUE;
+ return sal_True;
}
@@ -966,7 +966,7 @@ void ScInterpreter::PushTempToken( const FormulaToken& r )
void ScInterpreter::PushCellResultToken( bool bDisplayEmptyAsString,
- const ScAddress & rAddress, short * pRetTypeExpr, ULONG * pRetIndexExpr )
+ const ScAddress & rAddress, short * pRetTypeExpr, sal_uLong * pRetIndexExpr )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PushCellResultToken" );
ScBaseCell* pCell = pDok->GetCell( rAddress);
@@ -978,7 +978,7 @@ void ScInterpreter::PushCellResultToken( bool bDisplayEmptyAsString,
PushTempToken( new ScEmptyCellToken( bInherited, bDisplayEmptyAsString));
return;
}
- USHORT nErr;
+ sal_uInt16 nErr;
if ((nErr = pCell->GetErrorCode()) != 0)
{
PushError( nErr);
@@ -1228,7 +1228,7 @@ void ScInterpreter::PopSingleRef( ScAddress& rAdr )
void ScInterpreter::DoubleRefToVars( const ScToken* p,
SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp )
+ sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToVars" );
const ScComplexRefData& rCRef = p->GetDoubleRef();
@@ -1283,7 +1283,7 @@ ScDBRangeBase* ScInterpreter::PopDBDoubleRef()
void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp )
+ sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRef" );
if( sp )
@@ -1309,7 +1309,7 @@ void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
void ScInterpreter::DoubleRefToRange( const ScComplexRefData & rCRef,
- ScRange & rRange, BOOL bDontCheckForTableOp )
+ ScRange & rRange, sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToRange" );
SCCOL nCol;
@@ -1374,7 +1374,7 @@ void ScInterpreter::PopDoubleRef( ScRange & rRange, short & rParam, size_t & rRe
}
-void ScInterpreter::PopDoubleRef( ScRange& rRange, BOOL bDontCheckForTableOp )
+void ScInterpreter::PopDoubleRef( ScRange& rRange, sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRef" );
if( sp )
@@ -1563,7 +1563,7 @@ void ScInterpreter::PopExternalDoubleRef(ScMatrixRef& rMat)
rMat = p->GetMatrix();
}
-BOOL ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr )
+sal_Bool ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRefOrSingleRef" );
switch ( GetStackType() )
@@ -1571,19 +1571,19 @@ BOOL ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr )
case svDoubleRef :
{
ScRange aRange;
- PopDoubleRef( aRange, TRUE );
+ PopDoubleRef( aRange, sal_True );
return DoubleRefToPosSingleRef( aRange, rAdr );
}
case svSingleRef :
{
PopSingleRef( rAdr );
- return TRUE;
+ return sal_True;
}
default:
PopError();
SetError( errNoRef );
}
- return FALSE;
+ return false;
}
@@ -1613,10 +1613,10 @@ ScTokenMatrixMap* ScInterpreter::CreateTokenMatrixMap()
bool ScInterpreter::ConvertMatrixParameters()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ConvertMatrixParameters" );
- USHORT nParams = pCur->GetParamCount();
+ sal_uInt16 nParams = pCur->GetParamCount();
DBG_ASSERT( nParams <= sp, "ConvertMatrixParameters: stack/param count mismatch");
SCSIZE nJumpCols = 0, nJumpRows = 0;
- for ( USHORT i=1; i <= nParams && i <= sp; ++i )
+ for ( sal_uInt16 i=1; i <= nParams && i <= sp; ++i )
{
FormulaToken* p = pStack[ sp - i ];
if ( p->GetOpCode() != ocPush && p->GetOpCode() != ocMissing)
@@ -1721,7 +1721,7 @@ bool ScInterpreter::ConvertMatrixParameters()
pJumpMat->SetAllJumps( 1.0, nStart, nNext, nStop);
// pop parameters and store in ScJumpMatrix, push in JumpMatrix()
ScTokenVec* pParams = new ScTokenVec( nParams);
- for ( USHORT i=1; i <= nParams && sp > 0; ++i )
+ for ( sal_uInt16 i=1; i <= nParams && sp > 0; ++i )
{
FormulaToken* p = pStack[ --sp ];
p->IncRef();
@@ -1772,7 +1772,7 @@ ScMatrixRef ScInterpreter::PopMatrix()
return NULL;
}
-void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, ULONG& rRetIndexExpr)
+void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_uLong& rRetIndexExpr)
{
if (xMat)
{
@@ -1796,7 +1796,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, ULON
}
else
{
- USHORT nErr = GetDoubleErrorValue( nMatVal.fVal);
+ sal_uInt16 nErr = GetDoubleErrorValue( nMatVal.fVal);
FormulaTokenRef xRes;
if (nErr)
xRes = new FormulaErrorToken( nErr);
@@ -1930,7 +1930,7 @@ void ScInterpreter::PushMatrix(const ScMatrixRef& pMat)
}
-void ScInterpreter::PushError( USHORT nError )
+void ScInterpreter::PushError( sal_uInt16 nError )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PushError" );
SetError( nError ); // only sets error if not already set
@@ -1972,7 +1972,7 @@ void ScInterpreter::PushNoValue()
}
-BOOL ScInterpreter::IsMissing()
+sal_Bool ScInterpreter::IsMissing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsMissing" );
return sp && pStack[sp - 1]->GetType() == svMissing;
@@ -2015,7 +2015,7 @@ StackVar ScInterpreter::GetStackType()
}
-StackVar ScInterpreter::GetStackType( BYTE nParam )
+StackVar ScInterpreter::GetStackType( sal_uInt8 nParam )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetStackType" );
StackVar eRes;
@@ -2031,17 +2031,17 @@ StackVar ScInterpreter::GetStackType( BYTE nParam )
}
-BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr )
+sal_Bool ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToPosSingleRef" );
// Check for a singleton first - no implicit intersection for them.
if( rRange.aStart == rRange.aEnd )
{
rAdr = rRange.aStart;
- return TRUE;
+ return sal_True;
}
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
if ( pJumpMatrix )
{
@@ -2076,13 +2076,13 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
nRow = rRange.aStart.Row();
if ( nRow == rRange.aEnd.Row() )
{
- bOk = TRUE;
+ bOk = sal_True;
nCol = nMyCol;
}
else if ( nTab != nMyTab && nTab == rRange.aEnd.Tab()
&& rRange.aStart.Row() <= nMyRow && nMyRow <= rRange.aEnd.Row() )
{
- bOk = TRUE;
+ bOk = sal_True;
nCol = nMyCol;
nRow = nMyRow;
}
@@ -2092,13 +2092,13 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
nCol = rRange.aStart.Col();
if ( nCol == rRange.aEnd.Col() )
{
- bOk = TRUE;
+ bOk = sal_True;
nRow = nMyRow;
}
else if ( nTab != nMyTab && nTab == rRange.aEnd.Tab()
&& rRange.aStart.Col() <= nMyCol && nMyCol <= rRange.aEnd.Col() )
{
- bOk = TRUE;
+ bOk = sal_True;
nCol = nMyCol;
nRow = nMyRow;
}
@@ -2110,7 +2110,7 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
else if ( nTab <= nMyTab && nMyTab <= rRange.aEnd.Tab() )
nTab = nMyTab;
else
- bOk = FALSE;
+ bOk = false;
if ( bOk )
rAdr.Set( nCol, nRow, nTab );
}
@@ -2241,7 +2241,7 @@ const String& ScInterpreter::GetString()
case svDouble:
{
double fVal = PopDouble();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aTempStr);
@@ -2393,7 +2393,7 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( double& rDouble,
void ScInterpreter::ScDBGet()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBGet" );
- BOOL bMissingField = FALSE;
+ sal_Bool bMissingField = false;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (!pQueryParam.get())
{
@@ -2430,8 +2430,8 @@ void ScInterpreter::ScDBGet()
void ScInterpreter::ScExternal()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScExternal" );
- USHORT nIndex;
- BYTE nParamCount = GetByte();
+ sal_uInt16 nIndex;
+ sal_uInt8 nParamCount = GetByte();
String aUnoName;
String aFuncName( ScGlobal::pCharClass->upper( pCur->GetExternal() ) );
if (ScGlobal::GetFuncCollection()->SearchFunc(aFuncName, nIndex))
@@ -2443,7 +2443,7 @@ void ScInterpreter::ScExternal()
void* ppParam[MAXFUNCPARAM];
double nVal[MAXFUNCPARAM];
sal_Char* pStr[MAXFUNCPARAM];
- BYTE* pCellArr[MAXFUNCPARAM];
+ sal_uInt8* pCellArr[MAXFUNCPARAM];
short i;
for (i = 0; i < MAXFUNCPARAM; i++)
@@ -2488,7 +2488,7 @@ void ScInterpreter::ScExternal()
SCROW nRow2;
SCTAB nTab2;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- pCellArr[i-1] = new BYTE[MAXARRSIZE];
+ pCellArr[i-1] = new sal_uInt8[MAXARRSIZE];
if (!CreateDoubleArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, pCellArr[i-1]))
SetError(errCodeOverflow);
else
@@ -2504,7 +2504,7 @@ void ScInterpreter::ScExternal()
SCROW nRow2;
SCTAB nTab2;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- pCellArr[i-1] = new BYTE[MAXARRSIZE];
+ pCellArr[i-1] = new sal_uInt8[MAXARRSIZE];
if (!CreateStringArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, pCellArr[i-1]))
SetError(errCodeOverflow);
else
@@ -2520,7 +2520,7 @@ void ScInterpreter::ScExternal()
SCROW nRow2;
SCTAB nTab2;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- pCellArr[i-1] = new BYTE[MAXARRSIZE];
+ pCellArr[i-1] = new sal_uInt8[MAXARRSIZE];
if (!CreateCellArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, pCellArr[i-1]))
SetError(errCodeOverflow);
else
@@ -2573,7 +2573,7 @@ void ScInterpreter::ScExternal()
double nErg = 0.0;
ppParam[0] = &nErg;
pFuncData->Call(ppParam);
- ULONG nHandle = ULONG( nErg );
+ sal_uLong nHandle = sal_uLong( nErg );
if ( nHandle >= 65536 )
{
ScAddInAsync* pAs = ScAddInAsync::Get( nHandle );
@@ -2625,9 +2625,9 @@ void ScInterpreter::ScExternal()
PushIllegalParameter();
}
}
- else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, FALSE) ).Len() )
+ else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, false) ).Len() )
{
- // bLocalFirst=FALSE in FindFunction, cFunc should be the stored internal name
+ // bLocalFirst=sal_False in FindFunction, cFunc should be the stored internal name
ScUnoAddInCall aCall( *ScGlobal::GetAddInCollection(), aUnoName, nParamCount );
@@ -2653,7 +2653,7 @@ void ScInterpreter::ScExternal()
--nPar; // 0 .. (nParamCount-1)
ScAddInArgumentType eType = aCall.GetArgType( nPar );
- BYTE nStackType = sal::static_int_cast<BYTE>( GetStackType() );
+ sal_uInt8 nStackType = sal::static_int_cast<sal_uInt8>( GetStackType() );
uno::Any aParam;
switch (eType)
@@ -2664,7 +2664,7 @@ void ScInterpreter::ScExternal()
double fInt = (fVal >= 0.0) ? ::rtl::math::approxFloor( fVal ) :
::rtl::math::approxCeil( fVal );
if ( fInt >= LONG_MIN && fInt <= LONG_MAX )
- aParam <<= (INT32)fInt;
+ aParam <<= (sal_Int32)fInt;
else
SetError(errIllegalArgument);
}
@@ -2690,9 +2690,9 @@ void ScInterpreter::ScExternal()
::rtl::math::approxCeil( fVal );
if ( fInt >= LONG_MIN && fInt <= LONG_MAX )
{
- INT32 nIntVal = (long)fInt;
- uno::Sequence<INT32> aInner( &nIntVal, 1 );
- uno::Sequence< uno::Sequence<INT32> > aOuter( &aInner, 1 );
+ sal_Int32 nIntVal = (long)fInt;
+ uno::Sequence<sal_Int32> aInner( &nIntVal, 1 );
+ uno::Sequence< uno::Sequence<sal_Int32> > aOuter( &aInner, 1 );
aParam <<= aOuter;
}
else
@@ -3041,7 +3041,7 @@ void ScInterpreter::ScMacro()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMacro" );
SbxBase::ResetError();
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
String aMacro( pCur->GetExternal() );
SfxObjectShell* pDocSh = pDok->GetDocumentShell();
@@ -3053,9 +3053,6 @@ void ScInterpreter::ScMacro()
// keine Sicherheitsabfrage mehr vorneweg (nur CheckMacroWarn), das passiert im CallBasic
- SfxApplication* pSfxApp = SFX_APP();
- pSfxApp->EnterBasicCall(); // Dok-Basic anlegen etc.
-
// Wenn das Dok waehrend eines Basic-Calls geladen wurde,
// ist das Sbx-Objekt evtl. nicht angelegt (?)
// pDocSh->GetSbxObject();
@@ -3068,7 +3065,6 @@ void ScInterpreter::ScMacro()
if( !pVar || pVar->GetType() == SbxVOID || !pVar->ISA(SbMethod) )
{
PushError( errNoMacro );
- pSfxApp->LeaveBasicCall();
return;
}
@@ -3099,11 +3095,11 @@ void ScInterpreter::ScMacro()
// Parameter-Array zusammenbauen
SbxArrayRef refPar = new SbxArray;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for( short i = nParamCount; i && bOk ; i-- )
{
- SbxVariable* pPar = refPar->Get( (USHORT) i );
- BYTE nStackType = sal::static_int_cast<BYTE>( GetStackType() );
+ SbxVariable* pPar = refPar->Get( (sal_uInt16) i );
+ sal_uInt8 nStackType = sal::static_int_cast<sal_uInt8>( GetStackType() );
switch( nStackType )
{
case svDouble:
@@ -3137,7 +3133,7 @@ void ScInterpreter::ScMacro()
if( nTab1 != nTab2 )
{
SetError( errIllegalParameter );
- bOk = FALSE;
+ bOk = false;
}
else
{
@@ -3178,15 +3174,15 @@ void ScInterpreter::ScMacro()
{
pMat->GetDimensions(nC, nR);
SbxDimArrayRef refArray = new SbxDimArray;
- refArray->AddDim32( 1, static_cast<INT32>(nR) );
- refArray->AddDim32( 1, static_cast<INT32>(nC) );
+ refArray->AddDim32( 1, static_cast<sal_Int32>(nR) );
+ refArray->AddDim32( 1, static_cast<sal_Int32>(nC) );
for( SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++ )
{
- INT32 nIdx[ 2 ];
- nIdx[ 0 ] = static_cast<INT32>(nMatRow+1);
+ sal_Int32 nIdx[ 2 ];
+ nIdx[ 0 ] = static_cast<sal_Int32>(nMatRow+1);
for( SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++ )
{
- nIdx[ 1 ] = static_cast<INT32>(nMatCol+1);
+ nIdx[ 1 ] = static_cast<sal_Int32>(nMatCol+1);
SbxVariable* p = refArray->Get32( nIdx );
if (pMat->IsString(nMatCol, nMatRow))
p->PutString( pMat->GetString(nMatCol, nMatRow) );
@@ -3202,7 +3198,7 @@ void ScInterpreter::ScMacro()
break;
default:
SetError( errIllegalParameter );
- bOk = FALSE;
+ bOk = false;
}
}
if( bOk )
@@ -3210,7 +3206,7 @@ void ScInterpreter::ScMacro()
pDok->LockTable( aPos.Tab() );
SbxVariableRef refRes = new SbxVariable;
pDok->IncMacroInterpretLevel();
- ErrCode eRet = pDocSh->CallBasic( aMacroStr, aBasicStr, NULL, refPar, refRes );
+ ErrCode eRet = pDocSh->CallBasic( aMacroStr, aBasicStr, refPar, refRes );
pDok->DecMacroInterpretLevel();
pDok->UnlockTable( aPos.Tab() );
@@ -3235,7 +3231,7 @@ void ScInterpreter::ScMacro()
short nDim = pDimArray->GetDims();
if ( 1 <= nDim && nDim <= 2 )
{
- INT32 nCs, nCe, nRs, nRe;
+ sal_Int32 nCs, nCe, nRs, nRe;
SCSIZE nC, nR;
SCCOL nColIdx;
SCROW nRowIdx;
@@ -3264,13 +3260,13 @@ void ScInterpreter::ScMacro()
SbxDataType eType;
for ( SCSIZE j=0; j < nR; j++ )
{
- INT32 nIdx[ 2 ];
+ sal_Int32 nIdx[ 2 ];
// bei eindimensionalem array( cols ) wird nIdx[1]
// von SbxDimArray::Get ignoriert
- nIdx[ nRowIdx ] = nRs + static_cast<INT32>(j);
+ nIdx[ nRowIdx ] = nRs + static_cast<sal_Int32>(j);
for ( SCSIZE i=0; i < nC; i++ )
{
- nIdx[ nColIdx ] = nCs + static_cast<INT32>(i);
+ nIdx[ nColIdx ] = nCs + static_cast<sal_Int32>(i);
pV = pDimArray->Get32( nIdx );
eType = pV->GetType();
if ( eType >= SbxINTEGER && eType <= SbxDOUBLE )
@@ -3298,14 +3294,14 @@ void ScInterpreter::ScMacro()
}
-BOOL ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
+sal_Bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::SetSbxVariable" );
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
ScBaseCell* pCell = pDok->GetCell( rPos );
if (pCell)
{
- USHORT nErr;
+ sal_uInt16 nErr;
double nVal;
switch( pCell->GetCellType() )
{
@@ -3344,7 +3340,7 @@ BOOL ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
}
}
else
- SetError( nErr ), bOk = FALSE;
+ SetError( nErr ), bOk = false;
break;
default :
pVar->PutDouble( 0.0 );
@@ -3359,7 +3355,7 @@ BOOL ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
void ScInterpreter::ScTableOp()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTableOp" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (nParamCount != 3 && nParamCount != 5)
{
PushIllegalParameter();
@@ -3375,15 +3371,15 @@ void ScInterpreter::ScTableOp()
PopSingleRef( pTableOp->aOld1 );
PopSingleRef( pTableOp->aFormulaPos );
- pTableOp->bValid = TRUE;
+ pTableOp->bValid = true;
pDok->aTableOpList.push_back( pTableOp );
pDok->IncInterpreterTableOpLevel();
- BOOL bReuseLastParams = (pDok->aLastTableOpParams == *pTableOp);
+ sal_Bool bReuseLastParams = (pDok->aLastTableOpParams == *pTableOp);
if ( bReuseLastParams )
{
pTableOp->aNotifiedFormulaPos = pDok->aLastTableOpParams.aNotifiedFormulaPos;
- pTableOp->bRefresh = TRUE;
+ pTableOp->bRefresh = sal_True;
for ( ::std::vector< ScAddress >::const_iterator iBroadcast(
pTableOp->aNotifiedFormulaPos.begin() );
iBroadcast != pTableOp->aNotifiedFormulaPos.end();
@@ -3400,7 +3396,7 @@ void ScInterpreter::ScTableOp()
if ( nParamCount == 5 )
pDok->SetTableOpDirty( pTableOp->aOld2 );
}
- pTableOp->bCollectNotifications = FALSE;
+ pTableOp->bCollectNotifications = false;
ScBaseCell* pFCell = pDok->GetCell( pTableOp->aFormulaPos );
if ( pFCell && pFCell->GetCellType() == CELLTYPE_FORMULA )
@@ -3494,7 +3490,7 @@ void ScInterpreter::ScColRowNameAuto()
(SCROW&) aRefData.Ref1.nRow,
(SCCOL&) aRefData.Ref2.nCol,
(SCROW&) aRefData.Ref2.nRow,
- TRUE, false );
+ sal_True, false );
// DataArea im Ursprung begrenzen
aRefData.Ref1.nCol = nStartCol;
aRefData.Ref1.nRow = nStartRow;
@@ -3558,7 +3554,7 @@ void ScInterpreter::ScColRowNameAuto()
void ScInterpreter::ScTTT()
{ // Temporaerer Test-Tanz, zum auspropieren von Funktionen etc.
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
// do something, nParamCount bei Pops runterzaehlen!
// Stack aufraeumen
@@ -3585,11 +3581,11 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc,
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTTT" );
- BYTE cMatFlag = pMyFormulaCell->GetMatrixFlag();
+ sal_uInt8 cMatFlag = pMyFormulaCell->GetMatrixFlag();
bMatrixFormula = ( cMatFlag == MM_FORMULA || cMatFlag == MM_FAKE );
if (!bGlobalStackInUse)
{
- bGlobalStackInUse = TRUE;
+ bGlobalStackInUse = sal_True;
if (!pGlobalStack)
pGlobalStack = new ScTokenStack;
pStackObj = pGlobalStack;
@@ -3606,7 +3602,7 @@ ScInterpreter::~ScInterpreter()
// delete pStack;
if ( pStackObj == pGlobalStack )
- bGlobalStackInUse = FALSE;
+ bGlobalStackInUse = false;
else
delete pStackObj;
if (pTokenMatrixMap)
@@ -3626,10 +3622,10 @@ StackVar ScInterpreter::Interpret()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Interpret" );
short nRetTypeExpr = NUMBERFORMAT_UNDEFINED;
- ULONG nRetIndexExpr = 0;
- USHORT nErrorFunction = 0;
- USHORT nErrorFunctionCount = 0;
- USHORT nStackBase;
+ sal_uLong nRetIndexExpr = 0;
+ sal_uInt16 nErrorFunction = 0;
+ sal_uInt16 nErrorFunctionCount = 0;
+ sal_uInt16 nStackBase;
nGlobalError = 0;
nStackBase = sp = maxsp = 0;
@@ -3638,7 +3634,7 @@ StackVar ScInterpreter::Interpret()
nFuncFmtIndex = nCurFmtIndex = nRetFmtIndex = 0;
xResult = NULL;
pJumpMatrix = NULL;
- glSubTotal = FALSE;
+ glSubTotal = false;
ScTokenMatrixMap::const_iterator aTokenMatrixMapIter;
// Once upon a time we used to have FP exceptions on, and there was a
@@ -3827,28 +3823,28 @@ StackVar ScInterpreter::Interpret()
case ocGetTime : ScGetTime(); break;
case ocGetDiffDate : ScGetDiffDate(); break;
case ocGetDiffDate360 : ScGetDiffDate360(); break;
- case ocMin : ScMin( FALSE ); break;
- case ocMinA : ScMin( TRUE ); break;
- case ocMax : ScMax( FALSE ); break;
- case ocMaxA : ScMax( TRUE ); break;
+ case ocMin : ScMin( false ); break;
+ case ocMinA : ScMin( sal_True ); break;
+ case ocMax : ScMax( false ); break;
+ case ocMaxA : ScMax( sal_True ); break;
case ocSum : ScSum(); break;
case ocProduct : ScProduct(); break;
case ocNPV : ScNPV(); break;
case ocIRR : ScIRR(); break;
case ocMIRR : ScMIRR(); break;
case ocISPMT : ScISPMT(); break;
- case ocAverage : ScAverage( FALSE ); break;
- case ocAverageA : ScAverage( TRUE ); break;
+ case ocAverage : ScAverage( false ); break;
+ case ocAverageA : ScAverage( sal_True ); break;
case ocCount : ScCount(); break;
case ocCount2 : ScCount2(); break;
- case ocVar : ScVar( FALSE ); break;
- case ocVarA : ScVar( TRUE ); break;
- case ocVarP : ScVarP( FALSE ); break;
- case ocVarPA : ScVarP( TRUE ); break;
- case ocStDev : ScStDev( FALSE ); break;
- case ocStDevA : ScStDev( TRUE ); break;
- case ocStDevP : ScStDevP( FALSE ); break;
- case ocStDevPA : ScStDevP( TRUE ); break;
+ case ocVar : ScVar( false ); break;
+ case ocVarA : ScVar( sal_True ); break;
+ case ocVarP : ScVarP( false ); break;
+ case ocVarPA : ScVarP( sal_True ); break;
+ case ocStDev : ScStDev( false ); break;
+ case ocStDevA : ScStDev( sal_True ); break;
+ case ocStDevP : ScStDevP( false ); break;
+ case ocStDevPA : ScStDevP( sal_True ); break;
case ocBW : ScBW(); break;
case ocDIA : ScDIA(); break;
case ocGDA : ScGDA(); break;
@@ -4057,7 +4053,7 @@ StackVar ScInterpreter::Interpret()
do
{
bGotResult = false;
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
if ( GetStackType( ++nLevel ) == svJumpMatrix )
; // nothing
else if ( GetStackType( ++nLevel ) == svJumpMatrix )
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index a40bc6e572f6..0d0b50d70baf 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -173,7 +173,7 @@ void ScInterpreter::ScGCD()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -266,7 +266,7 @@ void ScInterpreter:: ScLCM()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -605,7 +605,7 @@ void ScInterpreter::ScMatValue()
ScBaseCell* pCell = GetCell( aAdr );
if (pCell && pCell->GetCellType() == CELLTYPE_FORMULA)
{
- USHORT nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
+ sal_uInt16 nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
if (nErrCode != 0)
PushError( nErrCode);
else
@@ -892,7 +892,7 @@ void ScInterpreter::ScMatDet()
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
- if ( nC != nR || nC == 0 || (ULONG) nC * nC > ScMatrix::GetElementsMax() )
+ if ( nC != nR || nC == 0 || (sal_uLong) nC * nC > ScMatrix::GetElementsMax() )
PushIllegalArgument();
else
{
@@ -938,7 +938,7 @@ void ScInterpreter::ScMatInv()
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
- if ( nC != nR || nC == 0 || (ULONG) nC * nC > ScMatrix::GetElementsMax() )
+ if ( nC != nR || nC == 0 || (sal_uLong) nC * nC > ScMatrix::GetElementsMax() )
PushIllegalArgument();
else
{
@@ -1154,7 +1154,7 @@ ScMatrixRef ScInterpreter::MatConcat(const ScMatrixRef& pMat1, const ScMatrixRef
{
for (j = 0; j < nMinR; j++)
{
- USHORT nErr = pMat1->GetErrorIfNotString( i, j);
+ sal_uInt16 nErr = pMat1->GetErrorIfNotString( i, j);
if (!nErr)
nErr = pMat2->GetErrorIfNotString( i, j);
if (nErr)
@@ -1203,9 +1203,9 @@ void lcl_GetDiffDateTimeFmtType( short& nFuncFmt, short nFmt1, short nFmt2 )
void ScInterpreter::ScAdd()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAdd" );
- CalculateAddSub(FALSE);
+ CalculateAddSub(false);
}
-void ScInterpreter::CalculateAddSub(BOOL _bSub)
+void ScInterpreter::CalculateAddSub(sal_Bool _bSub)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateAddSub" );
ScMatrixRef pMat1 = NULL;
@@ -1214,7 +1214,7 @@ void ScInterpreter::CalculateAddSub(BOOL _bSub)
short nFmt1, nFmt2;
nFmt1 = nFmt2 = NUMBERFORMAT_UNDEFINED;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
short nFmtPercentType = nCurFmtType;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1280,18 +1280,18 @@ void ScInterpreter::CalculateAddSub(BOOL _bSub)
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1365,18 +1365,18 @@ void ScInterpreter::ScAmpersand()
else if (pMat1 || pMat2)
{
String sStr;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
sStr = sStr1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
sStr = sStr2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1394,7 +1394,7 @@ void ScInterpreter::ScAmpersand()
for (SCSIZE i = 0; i < nC; ++i)
for (SCSIZE j = 0; j < nR; ++j)
{
- USHORT nErr = pMat->GetErrorIfNotString( i, j);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( i, j);
if (nErr)
pResMat->PutError( nErr, i, j);
else
@@ -1410,7 +1410,7 @@ void ScInterpreter::ScAmpersand()
for (SCSIZE i = 0; i < nC; ++i)
for (SCSIZE j = 0; j < nR; ++j)
{
- USHORT nErr = pMat->GetErrorIfNotString( i, j);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( i, j);
if (nErr)
pResMat->PutError( nErr, i, j);
else
@@ -1437,7 +1437,7 @@ void ScInterpreter::ScAmpersand()
void ScInterpreter::ScSub()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSub" );
- CalculateAddSub(TRUE);
+ CalculateAddSub(sal_True);
}
void ScInterpreter::ScMul()
@@ -1447,7 +1447,7 @@ void ScInterpreter::ScMul()
ScMatrixRef pMat2 = NULL;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
else
@@ -1526,7 +1526,7 @@ void ScInterpreter::ScDiv()
ScMatrixRef pMat2 = NULL;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
short nFmtCurrencyType2 = NUMBERFORMAT_UNDEFINED;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1561,18 +1561,18 @@ void ScInterpreter::ScDiv()
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1643,18 +1643,18 @@ void ScInterpreter::ScPow()
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1688,7 +1688,7 @@ void ScInterpreter::ScPow()
void ScInterpreter::ScSumProduct()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumProduct" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 30 ) )
return;
@@ -1706,7 +1706,7 @@ void ScInterpreter::ScSumProduct()
pMat2->GetDimensions(nC, nR);
pMat = pMat2;
MatrixMul aMul;
- for (USHORT i = 1; i < nParamCount; i++)
+ for (sal_uInt16 i = 1; i < nParamCount; i++)
{
pMat1 = GetMatrix();
if (!pMat1)
@@ -1742,9 +1742,9 @@ void ScInterpreter::ScSumProduct()
void ScInterpreter::ScSumX2MY2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2MY2" );
- CalculateSumX2MY2SumX2DY2(FALSE);
+ CalculateSumX2MY2SumX2DY2(false);
}
-void ScInterpreter::CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2)
+void ScInterpreter::CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSumX2MY2SumX2DY2" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -1788,7 +1788,7 @@ void ScInterpreter::CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2)
void ScInterpreter::ScSumX2DY2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2DY2" );
- CalculateSumX2MY2SumX2DY2(TRUE);
+ CalculateSumX2MY2SumX2DY2(sal_True);
}
void ScInterpreter::ScSumXMY2()
@@ -2265,7 +2265,7 @@ double lcl_GetSSresid(ScMatrixRef pMatX, ScMatrixRef pMatY, double fSlope,
// Fill default values in matrix X, transform Y to log(Y) in case LOGEST|GROWTH,
// determine sizes of matrices X and Y, determine kind of regression, clone
// Y in case LOGEST|GROWTH, if constant.
-bool ScInterpreter::CheckMatrix(bool _bLOG, BYTE& nCase, SCSIZE& nCX,
+bool ScInterpreter::CheckMatrix(bool _bLOG, sal_uInt8& nCase, SCSIZE& nCX,
SCSIZE& nCY, SCSIZE& nRX, SCSIZE& nRY, SCSIZE& M,
SCSIZE& N, ScMatrixRef& pMatX, ScMatrixRef& pMatY)
{
@@ -2388,7 +2388,7 @@ void ScInterpreter::ScRKP()
void ScInterpreter::CalulateRGPRKP(bool _bRKP)
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (!MustHaveParamCount( nParamCount, 1, 4 ))
return;
bool bConstant, bStats;
@@ -2441,7 +2441,7 @@ void ScInterpreter::CalulateRGPRKP(bool _bRKP)
}
// 1 = simple; 2 = multiple with Y as column; 3 = multiple with Y as row
- BYTE nCase;
+ sal_uInt8 nCase;
SCSIZE nCX, nCY; // number of columns
SCSIZE nRX, nRY; //number of rows
@@ -2919,7 +2919,7 @@ void ScInterpreter::ScGrowth()
void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (!MustHaveParamCount( nParamCount, 1, 4 ))
return;
@@ -2973,7 +2973,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
}
// 1 = simple; 2 = multiple with Y as column; 3 = multiple with Y as row
- BYTE nCase;
+ sal_uInt8 nCase;
SCSIZE nCX, nCY; // number of columns
SCSIZE nRX, nRY; //number of rows
@@ -3244,7 +3244,7 @@ void ScInterpreter::ScMatRef()
if (ScMatrix::IsNonValueType( nMatValType))
{
if (ScMatrix::IsEmptyPathType( nMatValType))
- { // result of empty FALSE jump path
+ { // result of empty sal_False jump path
nFuncFmtType = NUMBERFORMAT_LOGICAL;
PushInt(0);
}
@@ -3268,7 +3268,7 @@ void ScInterpreter::ScMatRef()
else
{
// If not a result matrix, obtain the cell value.
- USHORT nErr = pCell->GetErrCode();
+ sal_uInt16 nErr = pCell->GetErrCode();
if (nErr)
PushError( nErr );
else if( pCell->IsValue() )
diff --git a/sc/source/core/tool/navicfg.cxx b/sc/source/core/tool/navicfg.cxx
index 703c15175536..a4c6891db19c 100644
--- a/sc/source/core/tool/navicfg.cxx
+++ b/sc/source/core/tool/navicfg.cxx
@@ -51,7 +51,7 @@ ScNavipiCfg::ScNavipiCfg() :
//------------------------------------------------------------------------
-void ScNavipiCfg::SetListMode(USHORT nNew)
+void ScNavipiCfg::SetListMode(sal_uInt16 nNew)
{
if ( nListMode != nNew )
{
@@ -60,7 +60,7 @@ void ScNavipiCfg::SetListMode(USHORT nNew)
}
}
-void ScNavipiCfg::SetDragMode(USHORT nNew)
+void ScNavipiCfg::SetDragMode(sal_uInt16 nNew)
{
if ( nDragMode != nNew )
{
@@ -69,7 +69,7 @@ void ScNavipiCfg::SetDragMode(USHORT nNew)
}
}
-void ScNavipiCfg::SetRootType(USHORT nNew)
+void ScNavipiCfg::SetRootType(sal_uInt16 nNew)
{
if ( nRootType != nNew )
{
diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx
index 377676e5647f..e11322e9a056 100644
--- a/sc/source/core/tool/optutil.cxx
+++ b/sc/source/core/tool/optutil.cxx
@@ -39,7 +39,7 @@
//------------------------------------------------------------------
-BOOL ScOptionsUtil::IsMetricSystem()
+sal_Bool ScOptionsUtil::IsMetricSystem()
{
//! which language should be used here - system language or installed office language?
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index 44cb18c093ad..698601ee6ef3 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -242,7 +242,7 @@ void ScParameterClassification::Init()
if ( pRun->aData.nParam[j] )
{
eLast = pRun->aData.nParam[j];
- pRun->nMinParams = sal::static_int_cast<BYTE>( j+1 );
+ pRun->nMinParams = sal::static_int_cast<sal_uInt8>( j+1 );
}
else
pRun->aData.nParam[j] = eLast;
@@ -255,7 +255,7 @@ void ScParameterClassification::Init()
if ( !pRun->aData.nParam[j] )
{
if ( j == 0 || pRun->aData.nParam[j-1] != Bounds )
- pRun->nMinParams = sal::static_int_cast<BYTE>( j );
+ pRun->nMinParams = sal::static_int_cast<sal_uInt8>( j );
pRun->aData.nParam[j] = Bounds;
}
}
@@ -288,7 +288,7 @@ void ScParameterClassification::Exit()
ScParameterClassification::Type ScParameterClassification::GetParameterType(
- const formula::FormulaToken* pToken, USHORT nParameter)
+ const formula::FormulaToken* pToken, sal_uInt16 nParameter)
{
OpCode eOp = pToken->GetOpCode();
switch ( eOp )
@@ -322,11 +322,11 @@ ScParameterClassification::Type ScParameterClassification::GetParameterType(
ScParameterClassification::Type
ScParameterClassification::GetExternalParameterType( const formula::FormulaToken* pToken,
- USHORT nParameter)
+ sal_uInt16 nParameter)
{
Type eRet = Unknown;
// similar to ScInterpreter::ScExternal()
- USHORT nIndex;
+ sal_uInt16 nIndex;
String aUnoName;
String aFuncName( ScGlobal::pCharClass->upper( pToken->GetExternal()));
if ( ScGlobal::GetFuncCollection()->SearchFunc( aFuncName, nIndex) )
@@ -350,7 +350,7 @@ ScParameterClassification::GetExternalParameterType( const formula::FormulaToken
}
}
else if ( (aUnoName = ScGlobal::GetAddInCollection()->FindFunction(
- aFuncName, FALSE)).Len() )
+ aFuncName, false)).Len() )
{
// the relevant parts of ScUnoAddInCall without having to create one
const ScUnoAddInFuncData* pFuncData =
@@ -425,7 +425,7 @@ void ScParameterClassification::MergeArgumentsFromFunctionResource()
nArgs = CommonData::nMaxParams;
pRun->aData.bRepeatLast = true;
}
- pRun->nMinParams = static_cast< BYTE >( nArgs );
+ pRun->nMinParams = static_cast< sal_uInt8 >( nArgs );
for ( size_t j=0; j < nArgs; ++j )
{
pRun->aData.nParam[j] = Value;
@@ -470,7 +470,7 @@ void ScParameterClassification::GenerateDocumentation()
ByteString aStr( xMap->getSymbol(eOp), RTL_TEXTENCODING_UTF8);
aStr += "(";
formula::FormulaByteToken aToken( eOp);
- BYTE nParams = GetMinimumParameters( eOp);
+ sal_uInt8 nParams = GetMinimumParameters( eOp);
// preset parameter count according to opcode value, with some
// special handling
if ( eOp < SC_OPCODE_STOP_DIV )
@@ -521,7 +521,7 @@ void ScParameterClassification::GenerateDocumentation()
if ( nParams != aToken.GetParamCount() )
fprintf( stdout, "(parameter count differs, token ParamCount: %d classification: %d) ",
aToken.GetParamCount(), nParams);
- for ( USHORT j=0; j < nParams; ++j )
+ for ( sal_uInt16 j=0; j < nParams; ++j )
{
if ( j > 0 )
aStr += ",";
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index 83010a3c9e40..35b91f1734de 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -65,8 +65,8 @@ ScPrintOptions::~ScPrintOptions()
void ScPrintOptions::SetDefaults()
{
- bSkipEmpty = TRUE;
- bAllSheets = FALSE;
+ bSkipEmpty = sal_True;
+ bAllSheets = false;
}
const ScPrintOptions& ScPrintOptions::operator=( const ScPrintOptions& rCpy )
@@ -90,7 +90,7 @@ int ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const
// -----------------------------------------------------------------------
-ScTpPrintItem::ScTpPrintItem( USHORT nWhichP, const ScPrintOptions& rOpt ) :
+ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP, const ScPrintOptions& rOpt ) :
SfxPoolItem ( nWhichP ),
theOptions ( rOpt )
{
diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx
index 35200d6b4ff9..7813539dc06b 100644
--- a/sc/source/core/tool/prnsave.cxx
+++ b/sc/source/core/tool/prnsave.cxx
@@ -50,7 +50,7 @@
ScPrintSaverTab::ScPrintSaverTab() :
mpRepeatCol(NULL),
mpRepeatRow(NULL),
- mbEntireSheet(FALSE)
+ mbEntireSheet(false)
{
}
@@ -60,7 +60,7 @@ ScPrintSaverTab::~ScPrintSaverTab()
delete mpRepeatRow;
}
-void ScPrintSaverTab::SetAreas( const ScRangeVec& rRanges, BOOL bEntireSheet )
+void ScPrintSaverTab::SetAreas( const ScRangeVec& rRanges, sal_Bool bEntireSheet )
{
maPrintRanges = rRanges;
mbEntireSheet = bEntireSheet;
@@ -74,12 +74,12 @@ void ScPrintSaverTab::SetRepeat( const ScRange* pCol, const ScRange* pRow )
mpRepeatRow = pRow ? new ScRange(*pRow) : NULL;
}
-inline BOOL PtrEqual( const ScRange* p1, const ScRange* p2 )
+inline sal_Bool PtrEqual( const ScRange* p1, const ScRange* p2 )
{
return ( !p1 && !p2 ) || ( p1 && p2 && *p1 == *p2 );
}
-BOOL ScPrintSaverTab::operator==( const ScPrintSaverTab& rCmp ) const
+sal_Bool ScPrintSaverTab::operator==( const ScPrintSaverTab& rCmp ) const
{
return
PtrEqual( mpRepeatCol, rCmp.mpRepeatCol ) &&
@@ -118,14 +118,14 @@ const ScPrintSaverTab& ScPrintRangeSaver::GetTabData(SCTAB nTab) const
return pData[nTab];
}
-BOOL ScPrintRangeSaver::operator==( const ScPrintRangeSaver& rCmp ) const
+sal_Bool ScPrintRangeSaver::operator==( const ScPrintRangeSaver& rCmp ) const
{
- BOOL bEqual = ( nTabCount == rCmp.nTabCount );
+ sal_Bool bEqual = ( nTabCount == rCmp.nTabCount );
if (bEqual)
for (SCTAB i=0; i<nTabCount; i++)
if (!(pData[i]==rCmp.pData[i]))
{
- bEqual = FALSE;
+ bEqual = false;
break;
}
return bEqual;
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index 1f3492a3d5a0..9cb767b7a487 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -47,22 +47,23 @@
#include "global.hxx"
#include "globstr.hrc"
+using namespace com::sun::star;
static ScProgress theDummyInterpretProgress;
SfxProgress* ScProgress::pGlobalProgress = NULL;
-ULONG ScProgress::nGlobalRange = 0;
-ULONG ScProgress::nGlobalPercent = 0;
-BOOL ScProgress::bGlobalNoUserBreak = TRUE;
+sal_uLong ScProgress::nGlobalRange = 0;
+sal_uLong ScProgress::nGlobalPercent = 0;
+sal_Bool ScProgress::bGlobalNoUserBreak = sal_True;
ScProgress* ScProgress::pInterpretProgress = &theDummyInterpretProgress;
ScProgress* ScProgress::pOldInterpretProgress = NULL;
-ULONG ScProgress::nInterpretProgress = 0;
-BOOL ScProgress::bAllowInterpretProgress = TRUE;
+sal_uLong ScProgress::nInterpretProgress = 0;
+sal_Bool ScProgress::bAllowInterpretProgress = sal_True;
ScDocument* ScProgress::pInterpretDoc;
-BOOL ScProgress::bIdleWasDisabled = FALSE;
+sal_Bool ScProgress::bIdleWasDisabled = false;
-BOOL lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
+sal_Bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
{
if (pObjSh)
{
@@ -71,16 +72,24 @@ BOOL lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
{
SfxItemSet* pSet = pMed->GetItemSet();
const SfxPoolItem* pItem;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_HIDDEN, TRUE, &pItem ) &&
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_HIDDEN, sal_True, &pItem ) &&
((const SfxBoolItem*)pItem)->GetValue() )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
+}
+
+bool lcl_HasControllersLocked( SfxObjectShell& rObjSh )
+{
+ uno::Reference<frame::XModel> xModel( rObjSh.GetBaseModel() );
+ if (xModel.is())
+ return xModel->hasControllersLocked();
+ return false;
}
ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText,
- ULONG nRange, BOOL bAllDocs, BOOL bWait )
+ sal_uLong nRange, sal_Bool bAllDocs, sal_Bool bWait )
{
if ( pGlobalProgress || SfxProgress::GetActiveProgress( NULL ) )
@@ -105,7 +114,8 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText,
pProgress = NULL;
}
else if ( pObjSh && ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
- pObjSh->GetProgress() ) )
+ pObjSh->GetProgress() ||
+ lcl_HasControllersLocked(*pObjSh) ) )
{
// no own progress for embedded objects,
// no second progress if the document already has one
@@ -118,7 +128,7 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText,
pGlobalProgress = pProgress;
nGlobalRange = nRange;
nGlobalPercent = 0;
- bGlobalNoUserBreak = TRUE;
+ bGlobalNoUserBreak = sal_True;
}
}
@@ -137,12 +147,12 @@ ScProgress::~ScProgress()
pGlobalProgress = NULL;
nGlobalRange = 0;
nGlobalPercent = 0;
- bGlobalNoUserBreak = TRUE;
+ bGlobalNoUserBreak = sal_True;
}
}
-void ScProgress::CreateInterpretProgress( ScDocument* pDoc, BOOL bWait )
+void ScProgress::CreateInterpretProgress( ScDocument* pDoc, sal_Bool bWait )
{
if ( bAllowInterpretProgress )
{
@@ -152,14 +162,14 @@ void ScProgress::CreateInterpretProgress( ScDocument* pDoc, BOOL bWait )
{
nInterpretProgress = 1;
bIdleWasDisabled = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE );
+ pDoc->DisableIdle( sal_True );
// Interpreter may be called in many circumstances, also if another
// progress bar is active, for example while adapting row heights.
// Keep the dummy interpret progress.
if ( !pGlobalProgress )
pInterpretProgress = new ScProgress( pDoc->GetDocumentShell(),
ScGlobal::GetRscString( STR_PROGRESS_CALCULATING ),
- pDoc->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE, FALSE, bWait );
+ pDoc->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE, false, bWait );
pInterpretDoc = pDoc;
}
}
diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx
index 12d40ff2e13a..e991b4d7277c 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -40,7 +40,7 @@ using ::std::vector;
ScQueryParamBase::ScQueryParamBase()
{
Resize( MAXQUERY );
- for (USHORT i=0; i<MAXQUERY; i++)
+ for (sal_uInt16 i=0; i<MAXQUERY; i++)
maEntries[i].Clear();
}
@@ -111,7 +111,7 @@ void ScQueryParamBase::FillInExcelSyntax(String& aCellStr, SCSIZE nIndex)
ScQueryEntry& rEntry = GetEntry(nIndex);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
// Operatoren herausfiltern
if (aCellStr.GetChar(0) == '<')
{
@@ -219,11 +219,11 @@ void ScQueryParam::Clear()
nCol1=nCol2 = 0;
nRow1=nRow2 = 0;
nTab = SCTAB_MAX;
- bHasHeader = bCaseSens = bRegExp = bMixedComparison = FALSE;
- bInplace = bByRow = bDuplicate = TRUE;
+ bHasHeader = bCaseSens = bRegExp = bMixedComparison = false;
+ bInplace = bByRow = bDuplicate = sal_True;
Resize( MAXQUERY );
- for (USHORT i=0; i<MAXQUERY; i++)
+ for (sal_uInt16 i=0; i<MAXQUERY; i++)
maEntries[i].Clear();
ClearDestParams();
@@ -269,9 +269,9 @@ ScQueryParam& ScQueryParam::operator=( const ScQueryParam& r )
//------------------------------------------------------------------------
-BOOL ScQueryParam::operator==( const ScQueryParam& rOther ) const
+sal_Bool ScQueryParam::operator==( const ScQueryParam& rOther ) const
{
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = false;
// Anzahl der Queries gleich?
SCSIZE nUsed = 0;
@@ -303,7 +303,7 @@ BOOL ScQueryParam::operator==( const ScQueryParam& rOther ) const
&& (nDynamicEndRow == rOther.nDynamicEndRow)
&& (bUseDynamicRange == rOther.bUseDynamicRange) )
{
- bEqual = TRUE;
+ bEqual = sal_True;
for ( SCSIZE i=0; i<nUsed && bEqual; i++ )
bEqual = maEntries[i] == rOther.maEntries[i];
}
@@ -330,7 +330,7 @@ void ScQueryParam::MoveToDest()
for (size_t i=0; i<n; i++)
maEntries[i].nField += nDifX;
- bInplace = TRUE;
+ bInplace = sal_True;
}
else
{
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index c570655a351b..7395da73d33e 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -125,7 +125,7 @@ private:
class FormatString : public ::std::unary_function<void, const ScRange*>
{
public:
- FormatString(String& rStr, USHORT nFlags, ScDocument* pDoc, FormulaGrammar::AddressConvention eConv, sal_Unicode cDelim) :
+ FormatString(String& rStr, sal_uInt16 nFlags, ScDocument* pDoc, FormulaGrammar::AddressConvention eConv, sal_Unicode cDelim) :
mrStr(rStr),
mnFlags(nFlags),
mpDoc(pDoc),
@@ -153,7 +153,7 @@ public:
}
private:
String& mrStr;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
ScDocument* mpDoc;
FormulaGrammar::AddressConvention meConv;
sal_Unicode mcDelim;
@@ -169,7 +169,7 @@ ScRangeList::~ScRangeList()
RemoveAll();
}
-USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
+sal_uInt16 ScRangeList::Parse( const String& rStr, ScDocument* pDoc, sal_uInt16 nMask,
formula::FormulaGrammar::AddressConvention eConv,
sal_Unicode cDelimiter )
{
@@ -179,7 +179,7 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
nMask |= SCA_VALID; // falls das jemand vergessen sollte
- USHORT nResult = (USHORT)~0; // alle Bits setzen
+ sal_uInt16 nResult = (sal_uInt16)~0; // alle Bits setzen
ScRange aRange;
String aOne;
SCTAB nTab = 0;
@@ -190,15 +190,15 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
}
else
nTab = 0;
- USHORT nTCount = rStr.GetTokenCount( cDelimiter );
- for ( USHORT i=0; i<nTCount; i++ )
+ sal_uInt16 nTCount = rStr.GetTokenCount( cDelimiter );
+ for ( sal_uInt16 i=0; i<nTCount; i++ )
{
aOne = rStr.GetToken( i, cDelimiter );
aRange.aStart.SetTab( nTab ); // Default Tab wenn nicht angegeben
- USHORT nRes = aRange.ParseAny( aOne, pDoc, eConv );
- USHORT nEndRangeBits = SCA_VALID_COL2 | SCA_VALID_ROW2 | SCA_VALID_TAB2;
- USHORT nTmp1 = ( nRes & SCA_BITS );
- USHORT nTmp2 = ( nRes & nEndRangeBits );
+ sal_uInt16 nRes = aRange.ParseAny( aOne, pDoc, eConv );
+ sal_uInt16 nEndRangeBits = SCA_VALID_COL2 | SCA_VALID_ROW2 | SCA_VALID_TAB2;
+ sal_uInt16 nTmp1 = ( nRes & SCA_BITS );
+ sal_uInt16 nTmp2 = ( nRes & nEndRangeBits );
// If we have a valid single range with
// any of the address bits we are interested in
// set - set the equiv end range bits
@@ -216,7 +216,7 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
}
-void ScRangeList::Format( String& rStr, USHORT nFlags, ScDocument* pDoc,
+void ScRangeList::Format( String& rStr, sal_uInt16 nFlags, ScDocument* pDoc,
formula::FormulaGrammar::AddressConvention eConv,
sal_Unicode cDelimiter ) const
{
@@ -603,7 +603,7 @@ bool ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode,
for ( size_t i = 0, nPairs = maPairs.size(); i < nPairs; ++i )
{
ScRangePair* pR = maPairs[ i ];
- for ( USHORT j=0; j<2; j++ )
+ for ( sal_uInt16 j=0; j<2; j++ )
{
ScRange& rRange = pR->GetRange(j);
SCCOL theCol1;
@@ -899,8 +899,8 @@ ScRangePair** ScRangePairList::CreateNameSortedArray( size_t& nListCount,
DBG_ASSERT( nListCount * sizeof(ScRangePairNameSort) <= (size_t)~0x1F,
"ScRangePairList::CreateNameSortedArray nListCount * sizeof(ScRangePairNameSort) > (size_t)~0x1F" );
ScRangePairNameSort* pSortArray = (ScRangePairNameSort*)
- new BYTE [ nListCount * sizeof(ScRangePairNameSort) ];
- ULONG j;
+ new sal_uInt8 [ nListCount * sizeof(ScRangePairNameSort) ];
+ sal_uLong j;
for ( j=0; j < nListCount; j++ )
{
pSortArray[j].pPair = maPairs[ j ];
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 29491808c6f1..05d70f834a2d 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -59,8 +59,8 @@ using ::rtl::OUString;
// Interner ctor fuer das Suchen nach einem Index
-ScRangeData::ScRangeData( USHORT n )
- : pCode( NULL ), nIndex( n ), bModified( FALSE ), mnMaxRow(-1), mnMaxCol(-1)
+ScRangeData::ScRangeData( sal_uInt16 n )
+ : pCode( NULL ), nIndex( n ), bModified( false ), mnMaxRow(-1), mnMaxCol(-1)
{}
ScRangeData::ScRangeData( ScDocument* pDok,
@@ -76,7 +76,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
eType ( nType ),
pDoc ( pDok ),
nIndex ( 0 ),
- bModified ( FALSE ),
+ bModified ( false ),
mnMaxRow (-1),
mnMaxCol (-1)
{
@@ -124,7 +124,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
eType ( nType ),
pDoc ( pDok ),
nIndex ( 0 ),
- bModified ( FALSE ),
+ bModified ( false ),
mnMaxRow (-1),
mnMaxCol (-1)
{
@@ -152,13 +152,13 @@ ScRangeData::ScRangeData( ScDocument* pDok,
eType ( RT_NAME ),
pDoc ( pDok ),
nIndex ( 0 ),
- bModified ( FALSE ),
+ bModified ( false ),
mnMaxRow (-1),
mnMaxCol (-1)
{
ScSingleRefData aRefData;
aRefData.InitAddress( rTarget );
- aRefData.SetFlag3D( TRUE );
+ aRefData.SetFlag3D( sal_True );
pCode->AddSingleReference( aRefData );
ScCompiler aComp( pDoc, aPos, *pCode );
aComp.SetGrammar(pDoc->GetGrammar());
@@ -251,15 +251,15 @@ void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
pCode->Reset();
if( pCode->GetNextReference() )
{
- BOOL bSharedFormula = ((eType & RT_SHARED) == RT_SHARED);
+ sal_Bool bSharedFormula = ((eType & RT_SHARED) == RT_SHARED);
ScCompiler aComp( pDoc, aPos, *pCode );
aComp.SetGrammar(pDoc->GetGrammar());
- const BOOL bRelRef = aComp.UpdateNameReference( eUpdateRefMode, r,
+ const sal_Bool bRelRef = aComp.UpdateNameReference( eUpdateRefMode, r,
nDx, nDy, nDz,
bChanged, bSharedFormula);
if (bSharedFormula)
@@ -277,7 +277,7 @@ void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode,
void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
ScToken* t;
pCode->Reset();
@@ -295,7 +295,7 @@ void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDes
(!rRef.Ref2.IsFlag3D() || !rRef.Ref2.IsTabRel()))))
{
if ( ScRefUpdate::UpdateTranspose( pDoc, rSource, rDest, rRef ) != UR_NOTHING )
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -305,7 +305,7 @@ void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDes
void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
ScToken* t;
pCode->Reset();
@@ -323,7 +323,7 @@ void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
(!rRef.Ref2.IsFlag3D() || !rRef.Ref2.IsTabRel()))))
{
if ( ScRefUpdate::UpdateGrow( rArea,nGrowX,nGrowY, rRef ) != UR_NOTHING )
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -331,45 +331,45 @@ void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
bModified = bChanged; // muss direkt hinterher ausgewertet werden
}
-BOOL ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo
+sal_Bool ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo
{
if ( nIndex != rData.nIndex ||
aName != rData.aName ||
aPos != rData.aPos ||
- eType != rData.eType ) return FALSE;
+ eType != rData.eType ) return false;
- USHORT nLen = pCode->GetLen();
- if ( nLen != rData.pCode->GetLen() ) return FALSE;
+ sal_uInt16 nLen = pCode->GetLen();
+ if ( nLen != rData.pCode->GetLen() ) return false;
FormulaToken** ppThis = pCode->GetArray();
FormulaToken** ppOther = rData.pCode->GetArray();
- for ( USHORT i=0; i<nLen; i++ )
+ for ( sal_uInt16 i=0; i<nLen; i++ )
if ( ppThis[i] != ppOther[i] && !(*ppThis[i] == *ppOther[i]) )
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
-BOOL ScRangeData::IsRangeAtBlock( const ScRange& rBlock ) const
+sal_Bool ScRangeData::IsRangeAtBlock( const ScRange& rBlock ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScRange aRange;
if ( IsReference(aRange) )
bRet = ( rBlock == aRange );
return bRet;
}
-BOOL ScRangeData::IsReference( ScRange& rRange ) const
+sal_Bool ScRangeData::IsReference( ScRange& rRange ) const
{
if ( (eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS )) && pCode )
return pCode->IsReference( rRange );
- return FALSE;
+ return false;
}
-BOOL ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const
+sal_Bool ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const
{
if ( (eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS ) ) && pCode )
{
@@ -380,37 +380,37 @@ BOOL ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const
return pTemp->IsReference( rRange );
}
- return FALSE;
+ return false;
}
-BOOL ScRangeData::IsValidReference( ScRange& rRange ) const
+sal_Bool ScRangeData::IsValidReference( ScRange& rRange ) const
{
if ( (eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS ) ) && pCode )
return pCode->IsValidReference( rRange );
- return FALSE;
+ return false;
}
-void ScRangeData::UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable)
+void ScRangeData::UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable)
{
pCode->Reset();
if( pCode->GetNextReference() )
{
ScRangeData* pRangeData = NULL; // must not be dereferenced
- BOOL bChanged;
+ sal_Bool bChanged;
ScCompiler aComp( pDoc, aPos, *pCode);
aComp.SetGrammar(pDoc->GetGrammar());
switch (nFlag)
{
case 1: // einfache InsertTab (doc.cxx)
- pRangeData = aComp.UpdateInsertTab(nOldTable, TRUE ); // und CopyTab (doc2.cxx)
+ pRangeData = aComp.UpdateInsertTab(nOldTable, sal_True ); // und CopyTab (doc2.cxx)
break;
case 2: // einfaches delete (doc.cxx)
- pRangeData = aComp.UpdateDeleteTab(nOldTable, FALSE, TRUE, bChanged);
+ pRangeData = aComp.UpdateDeleteTab(nOldTable, false, sal_True, bChanged);
break;
case 3: // move (doc2.cxx)
{
- pRangeData = aComp.UpdateMoveTab(nOldTable, nNewTable, TRUE );
+ pRangeData = aComp.UpdateMoveTab(nOldTable, nNewTable, sal_True );
}
break;
default:
@@ -472,18 +472,18 @@ void ScRangeData::MakeValidName( String& rName )
}
}
-BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
+sal_Bool ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
{
/* XXX If changed, sc/source/filter/ftools/ftools.cxx
* ScfTools::ConvertToScDefinedName needs to be changed too. */
xub_StrLen nPos = 0;
xub_StrLen nLen = rName.Len();
if ( !nLen || !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_CHAR_NAME ) )
- return FALSE;
+ return false;
while ( nPos < nLen )
{
if ( !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_NAME ) )
- return FALSE;
+ return false;
}
ScAddress aAddr;
ScRange aRange;
@@ -493,9 +493,9 @@ BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
// Don't check Parse on VALID, any partial only VALID may result in
// #REF! during compile later!
if (aRange.Parse( rName, pDoc, details) || aAddr.Parse( rName, pDoc, details))
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void ScRangeData::SetMaxRow(SCROW nRow)
@@ -519,15 +519,15 @@ SCCOL ScRangeData::GetMaxCol() const
}
-USHORT ScRangeData::GetErrCode()
+sal_uInt16 ScRangeData::GetErrCode()
{
return pCode ? pCode->GetCodeError() : 0;
}
-BOOL ScRangeData::HasReferences() const
+sal_Bool ScRangeData::HasReferences() const
{
pCode->Reset();
- return BOOL( pCode->GetNextReference() != NULL );
+ return sal_Bool( pCode->GetNextReference() != NULL );
}
// bei TransferTab von einem in ein anderes Dokument anpassen,
@@ -703,9 +703,9 @@ public:
class MatchByIndex : public unary_function<ScRangeData, bool>
{
- USHORT mnIndex;
+ sal_uInt16 mnIndex;
public:
- MatchByIndex(USHORT nIndex) : mnIndex(nIndex) {}
+ MatchByIndex(sal_uInt16 nIndex) : mnIndex(nIndex) {}
bool operator() (const ScRangeData& r) const
{
return mnIndex == r.GetIndex();
@@ -755,7 +755,7 @@ const ScRangeData* ScRangeName::findByUpperName(const OUString& rName) const
return itr == maData.end() ? NULL : &(*itr);
}
-ScRangeData* ScRangeName::findByIndex(USHORT i)
+ScRangeData* ScRangeName::findByIndex(sal_uInt16 i)
{
DataType::iterator itr = std::find_if(
maData.begin(), maData.end(), MatchByIndex(i));
@@ -839,11 +839,11 @@ bool ScRangeName::insert(ScRangeData* p)
if (!p->GetIndex())
{
// Assign a new index. An index must be unique.
- USHORT nHigh = 0;
+ sal_uInt16 nHigh = 0;
DataType::const_iterator itr = maData.begin(), itrEnd = maData.end();
for (; itr != itrEnd; ++itr)
{
- USHORT n = itr->GetIndex();
+ sal_uInt16 n = itr->GetIndex();
if (n > nHigh)
nHigh = n;
}
diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx
index d89e649b73c4..87c2a8f64556 100644
--- a/sc/source/core/tool/rangeseq.cxx
+++ b/sc/source/core/tool/rangeseq.cxx
@@ -57,7 +57,7 @@ long lcl_DoubleToLong( double fVal )
return 0; // out of range
}
-BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
+sal_Bool ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -65,12 +65,12 @@ BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const S
long nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
- uno::Sequence< uno::Sequence<INT32> > aRowSeq( nRowCount );
- uno::Sequence<INT32>* pRowAry = aRowSeq.getArray();
+ uno::Sequence< uno::Sequence<sal_Int32> > aRowSeq( nRowCount );
+ uno::Sequence<sal_Int32>* pRowAry = aRowSeq.getArray();
for (long nRow = 0; nRow < nRowCount; nRow++)
{
- uno::Sequence<INT32> aColSeq( nColCount );
- INT32* pColAry = aColSeq.getArray();
+ uno::Sequence<sal_Int32> aColSeq( nColCount );
+ sal_Int32* pColAry = aColSeq.getArray();
for (long nCol = 0; nCol < nColCount; nCol++)
pColAry[nCol] = lcl_DoubleToLong( pDoc->GetValue(
ScAddress( (SCCOL)(nStartCol+nCol), (SCROW)(nStartRow+nRow), nTab ) ) );
@@ -79,25 +79,25 @@ BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const S
}
rAny <<= aRowSeq;
- return TRUE; //! check for errors
+ return sal_True; //! check for errors
}
-BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, const ScMatrix* pMatrix )
+sal_Bool ScRangeToSequence::FillLongArray( uno::Any& rAny, const ScMatrix* pMatrix )
{
if (!pMatrix)
- return FALSE;
+ return false;
SCSIZE nColCount;
SCSIZE nRowCount;
pMatrix->GetDimensions( nColCount, nRowCount );
- uno::Sequence< uno::Sequence<INT32> > aRowSeq( static_cast<sal_Int32>(nRowCount) );
- uno::Sequence<INT32>* pRowAry = aRowSeq.getArray();
+ uno::Sequence< uno::Sequence<sal_Int32> > aRowSeq( static_cast<sal_Int32>(nRowCount) );
+ uno::Sequence<sal_Int32>* pRowAry = aRowSeq.getArray();
for (SCSIZE nRow = 0; nRow < nRowCount; nRow++)
{
- uno::Sequence<INT32> aColSeq( static_cast<sal_Int32>(nColCount) );
- INT32* pColAry = aColSeq.getArray();
+ uno::Sequence<sal_Int32> aColSeq( static_cast<sal_Int32>(nColCount) );
+ sal_Int32* pColAry = aColSeq.getArray();
for (SCSIZE nCol = 0; nCol < nColCount; nCol++)
if ( pMatrix->IsString( nCol, nRow ) )
pColAry[nCol] = 0;
@@ -108,12 +108,12 @@ BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, const ScMatrix* pMatrix )
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
+sal_Bool ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -135,14 +135,14 @@ BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument* pDoc, const
}
rAny <<= aRowSeq;
- return TRUE; //! check for errors
+ return sal_True; //! check for errors
}
-BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, const ScMatrix* pMatrix )
+sal_Bool ScRangeToSequence::FillDoubleArray( uno::Any& rAny, const ScMatrix* pMatrix )
{
if (!pMatrix)
- return FALSE;
+ return false;
SCSIZE nColCount;
SCSIZE nRowCount;
@@ -164,12 +164,12 @@ BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, const ScMatrix* pMatrix
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
+sal_Bool ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -194,15 +194,15 @@ BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument* pDoc, const
}
rAny <<= aRowSeq;
- return TRUE; //! check for errors
+ return sal_True; //! check for errors
}
-BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix,
+sal_Bool ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix,
SvNumberFormatter* pFormatter )
{
if (!pMatrix)
- return FALSE;
+ return false;
SCSIZE nColCount;
SCSIZE nRowCount;
@@ -235,7 +235,7 @@ BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -254,8 +254,8 @@ double lcl_GetValueFromCell( ScBaseCell& rCell )
return 0;
}
-BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange,
- BOOL bAllowNV )
+sal_Bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange,
+ sal_Bool bAllowNV )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -264,7 +264,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const
long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
String aDocStr;
- BOOL bHasErrors = FALSE;
+ sal_Bool bHasErrors = false;
uno::Sequence< uno::Sequence<uno::Any> > aRowSeq( nRowCount );
uno::Sequence<uno::Any>* pRowAry = aRowSeq.getArray();
@@ -284,7 +284,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const
((ScFormulaCell*)pCell)->GetErrCode() != 0 )
{
// if NV is allowed, leave empty for errors
- bHasErrors = TRUE;
+ bHasErrors = sal_True;
}
else if ( pCell->HasValueData() )
rElement <<= (double) lcl_GetValueFromCell( *pCell );
@@ -302,10 +302,10 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const
}
-BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix, bool bDataTypes )
+sal_Bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix, bool bDataTypes )
{
if (!pMatrix)
- return FALSE;
+ return false;
SCSIZE nColCount;
SCSIZE nRowCount;
@@ -340,7 +340,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix,
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -454,7 +454,7 @@ ScMatrixRef ScSequenceToMatrix::CreateMixedMatrix( const com::sun::star::uno::An
//------------------------------------------------------------------------
-BOOL ScByteSequenceToString::GetString( String& rString, const uno::Any& rAny,
+sal_Bool ScByteSequenceToString::GetString( String& rString, const uno::Any& rAny,
sal_uInt16 nEncoding )
{
uno::Sequence<sal_Int8> aSeq;
@@ -463,9 +463,9 @@ BOOL ScByteSequenceToString::GetString( String& rString, const uno::Any& rAny,
rString = String( (const sal_Char*)aSeq.getConstArray(),
(xub_StrLen)aSeq.getLength(), nEncoding );
rString.EraseTrailingChars( (sal_Unicode) 0 );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index fb9a7b3cdb0a..87020e34498b 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -53,7 +53,7 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
-BOOL ScRangeUtil::MakeArea( const String& rAreaStr,
+sal_Bool ScRangeUtil::MakeArea( const String& rAreaStr,
ScArea& rArea,
ScDocument* pDoc,
SCTAB nTab,
@@ -64,9 +64,9 @@ BOOL ScRangeUtil::MakeArea( const String& rAreaStr,
// BROKEN BROKEN BROKEN
// but it is only used in the consolidate dialog. Ignore for now.
- BOOL nSuccess = FALSE;
- USHORT nPointPos = rAreaStr.Search('.');
- USHORT nColonPos = rAreaStr.Search(':');
+ sal_Bool nSuccess = false;
+ sal_uInt16 nPointPos = rAreaStr.Search('.');
+ sal_uInt16 nColonPos = rAreaStr.Search(':');
String aStrArea( rAreaStr );
ScRefAddress startPos;
ScRefAddress endPos;
@@ -97,7 +97,7 @@ void ScRangeUtil::CutPosString( const String& theAreaStr,
// BROKEN BROKEN BROKEN
// but it is only used in the consolidate dialog. Ignore for now.
- USHORT nColonPos = theAreaStr.Search(':');
+ sal_uInt16 nColonPos = theAreaStr.Search(':');
if ( nColonPos != STRING_NOTFOUND )
aPosStr = theAreaStr.Copy( 0, nColonPos ); // ':' nicht mitkopieren
@@ -109,16 +109,16 @@ void ScRangeUtil::CutPosString( const String& theAreaStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
+sal_Bool ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
ScDocument* pDoc,
ScArea*** pppAreas,
- USHORT* pAreaCount,
- BOOL /* bAcceptCellRef */,
+ sal_uInt16* pAreaCount,
+ sal_Bool /* bAcceptCellRef */,
ScAddress::Details const & rDetails ) const
{
DBG_ASSERT( pDoc, "Kein Dokument uebergeben!" );
if ( !pDoc )
- return FALSE;
+ return false;
// BROKEN BROKEN BROKEN
// but it is only used in the consolidate dialog. Ignore for now.
@@ -126,7 +126,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
/*
* Erwartet wird ein String der Form
* "$Tabelle1.$A$1:$Tabelle3.$D$17"
- * Wenn bAcceptCellRef == TRUE ist, wird auch ein String der Form
+ * Wenn bAcceptCellRef == sal_True ist, wird auch ein String der Form
* "$Tabelle1.$A$1"
* akzeptiert.
*
@@ -135,7 +135,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
* wieder geloescht werden muss!
*/
- BOOL bStrOk = FALSE;
+ sal_Bool bStrOk = false;
String aTempAreaStr(rAreaStr);
String aStartPosStr;
String aEndPosStr;
@@ -146,7 +146,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
aTempAreaStr.Append(rAreaStr);
}
- USHORT nColonPos = aTempAreaStr.Search(':');
+ sal_uInt16 nColonPos = aTempAreaStr.Search(':');
if ( STRING_NOTFOUND != nColonPos
&& STRING_NOTFOUND != aTempAreaStr.Search('.') )
@@ -161,23 +161,23 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
{
if ( ConvertSingleRef( pDoc, aEndPosStr, aStartPos.Tab(), aEndPos, rDetails ) )
{
- aStartPos.SetRelCol( FALSE );
- aStartPos.SetRelRow( FALSE );
- aStartPos.SetRelTab( FALSE );
- aEndPos.SetRelCol( FALSE );
- aEndPos.SetRelRow( FALSE );
- aEndPos.SetRelTab( FALSE );
+ aStartPos.SetRelCol( false );
+ aStartPos.SetRelRow( false );
+ aStartPos.SetRelTab( false );
+ aEndPos.SetRelCol( false );
+ aEndPos.SetRelRow( false );
+ aEndPos.SetRelTab( false );
- bStrOk = TRUE;
+ bStrOk = sal_True;
if ( pppAreas && pAreaCount ) // Array zurueckgegeben?
{
SCTAB nStartTab = aStartPos.Tab();
SCTAB nEndTab = aEndPos.Tab();
- USHORT nTabCount = static_cast<USHORT>(nEndTab-nStartTab+1);
+ sal_uInt16 nTabCount = static_cast<sal_uInt16>(nEndTab-nStartTab+1);
ScArea** theAreas = new ScArea*[nTabCount];
SCTAB nTab = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
ScArea theArea( 0, aStartPos.Col(), aStartPos.Row(),
aEndPos.Col(), aEndPos.Row() );
@@ -200,7 +200,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
+sal_Bool ScRangeUtil::IsAbsArea( const String& rAreaStr,
ScDocument* pDoc,
SCTAB nTab,
String* pCompleteStr,
@@ -208,7 +208,7 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
ScRefAddress* pEndPos,
ScAddress::Details const & rDetails ) const
{
- BOOL bIsAbsArea = FALSE;
+ sal_Bool bIsAbsArea = false;
ScRefAddress startPos;
ScRefAddress endPos;
@@ -216,12 +216,12 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
if ( bIsAbsArea )
{
- startPos.SetRelCol( FALSE );
- startPos.SetRelRow( FALSE );
- startPos.SetRelTab( FALSE );
- endPos .SetRelCol( FALSE );
- endPos .SetRelRow( FALSE );
- endPos .SetRelTab( FALSE );
+ startPos.SetRelCol( false );
+ startPos.SetRelRow( false );
+ startPos.SetRelTab( false );
+ endPos .SetRelCol( false );
+ endPos .SetRelRow( false );
+ endPos .SetRelTab( false );
if ( pCompleteStr )
{
@@ -242,20 +242,20 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::IsAbsPos( const String& rPosStr,
+sal_Bool ScRangeUtil::IsAbsPos( const String& rPosStr,
ScDocument* pDoc,
SCTAB nTab,
String* pCompleteStr,
ScRefAddress* pPosTripel,
ScAddress::Details const & rDetails ) const
{
- BOOL bIsAbsPos = FALSE;
+ sal_Bool bIsAbsPos = false;
ScRefAddress thePos;
bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails );
- thePos.SetRelCol( FALSE );
- thePos.SetRelRow( FALSE );
- thePos.SetRelTab( FALSE );
+ thePos.SetRelCol( false );
+ thePos.SetRelRow( false );
+ thePos.SetRelTab( false );
if ( bIsAbsPos )
{
@@ -270,7 +270,7 @@ BOOL ScRangeUtil::IsAbsPos( const String& rPosStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::MakeRangeFromName (
+sal_Bool ScRangeUtil::MakeRangeFromName (
const String& rName,
ScDocument* pDoc,
SCTAB nCurTab,
@@ -278,7 +278,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
RutlNameScope eScope,
ScAddress::Details const & rDetails ) const
{
- BOOL bResult=FALSE;
+ sal_Bool bResult=false;
ScRangeUtil aRangeUtil;
SCTAB nTab = 0;
SCCOL nColStart = 0;
@@ -306,7 +306,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
nRowStart = aStartPos.Row();
nColEnd = aEndPos.Col();
nRowEnd = aEndPos.Row();
- bResult = TRUE;
+ bResult = sal_True;
}
else
{
@@ -318,7 +318,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
nTab = aStartPos.Tab();
nColStart = nColEnd = aStartPos.Col();
nRowStart = nRowEnd = aStartPos.Row();
- bResult = TRUE;
+ bResult = sal_True;
}
}
}
@@ -326,7 +326,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
else if( eScope==RUTL_DBASE )
{
ScDBCollection& rDbNames = *(pDoc->GetDBCollection());
- USHORT nAt = 0;
+ sal_uInt16 nAt = 0;
if ( rDbNames.SearchName( rName, nAt ) )
{
@@ -334,7 +334,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
pData->GetArea( nTab, nColStart, nRowStart,
nColEnd, nRowEnd );
- bResult = TRUE;
+ bResult = sal_True;
}
}
else
@@ -379,8 +379,8 @@ sal_Int32 ScRangeStringConverter::IndexOf(
{
sal_Int32 nLength = rString.getLength();
sal_Int32 nIndex = nOffset;
- sal_Bool bQuoted = sal_False;
- sal_Bool bExitLoop = sal_False;
+ sal_Bool bQuoted = false;
+ sal_Bool bExitLoop = false;
while( !bExitLoop && (nIndex < nLength) )
{
@@ -400,7 +400,7 @@ sal_Int32 ScRangeStringConverter::IndexOfDifferent(
{
sal_Int32 nLength = rString.getLength();
sal_Int32 nIndex = nOffset;
- sal_Bool bExitLoop = sal_False;
+ sal_Bool bExitLoop = false;
while( !bExitLoop && (nIndex < nLength) )
{
@@ -479,7 +479,7 @@ sal_Bool ScRangeStringConverter::GetAddressFromString(
if (eConv != eConvUI)
return ((rAddress.Parse(sToken, const_cast<ScDocument*>(pDocument), eConvUI) & SCA_VALID) == SCA_VALID);
}
- return sal_False;
+ return false;
}
sal_Bool ScRangeStringConverter::GetRangeFromString(
@@ -492,7 +492,7 @@ sal_Bool ScRangeStringConverter::GetRangeFromString(
sal_Unicode cQuote )
{
OUString sToken;
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
GetTokenByOffset( sToken, rRangeStr, nOffset, cSeperator, cQuote );
if( nOffset >= 0 )
{
@@ -563,7 +563,7 @@ sal_Bool ScRangeStringConverter::GetRangeListFromString(
)
rRangeList.push_back( pRange );
else if (nOffset > -1)
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
@@ -581,7 +581,7 @@ sal_Bool ScRangeStringConverter::GetAreaFromString(
sal_Unicode cQuote )
{
ScRange aScRange;
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if( GetRangeFromString( aScRange, rRangeStr, pDocument, eConv, nOffset, cSeperator, cQuote ) && (nOffset >= 0) )
{
rArea.nTab = aScRange.aStart.Tab();
@@ -607,7 +607,7 @@ sal_Bool ScRangeStringConverter::GetAddressFromString(
sal_Unicode cQuote )
{
ScAddress aScAddress;
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if( GetAddressFromString( aScAddress, rAddressStr, pDocument, eConv, nOffset, cSeperator, cQuote ) && (nOffset >= 0) )
{
ScUnoConversion::FillApiAddress( rAddress, aScAddress );
@@ -626,7 +626,7 @@ sal_Bool ScRangeStringConverter::GetRangeFromString(
sal_Unicode cQuote )
{
ScRange aScRange;
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if( GetRangeFromString( aScRange, rRangeStr, pDocument, eConv, nOffset, cSeperator, cQuote ) && (nOffset >= 0) )
{
ScUnoConversion::FillApiRange( rRange, aScRange );
@@ -655,7 +655,7 @@ sal_Bool ScRangeStringConverter::GetRangeListFromString(
rRangeSeq[ rRangeSeq.getLength() - 1 ] = aRange;
}
else
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
@@ -925,7 +925,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
ScAddress::ExternalInfo aExtInfo1, aExtInfo2;
ScAddress aCell1, aCell2;
rtl::OUString aBuf;
- USHORT nRet = aCell1.Parse(aBeginCell, pDoc, FormulaGrammar::CONV_OOO, &aExtInfo1);
+ sal_uInt16 nRet = aCell1.Parse(aBeginCell, pDoc, FormulaGrammar::CONV_OOO, &aExtInfo1);
if ((nRet & SCA_VALID) != SCA_VALID)
{
// first cell is invalid.
@@ -969,7 +969,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
// Chart always saves ranges using CONV_OOO convention.
ScAddress::ExternalInfo aExtInfo;
ScAddress aCell;
- USHORT nRet = aCell.Parse(aToken, pDoc, ::formula::FormulaGrammar::CONV_OOO, &aExtInfo);
+ sal_uInt16 nRet = aCell.Parse(aToken, pDoc, ::formula::FormulaGrammar::CONV_OOO, &aExtInfo);
if ((nRet & SCA_VALID) != SCA_VALID)
{
nRet = aCell.Parse(aToken, pDoc, eConv, &aExtInfo);
@@ -1025,7 +1025,7 @@ ScArea& ScArea::operator=( const ScArea& r )
//------------------------------------------------------------------------
-BOOL ScArea::operator==( const ScArea& r ) const
+sal_Bool ScArea::operator==( const ScArea& r ) const
{
return ( (nTab == r.nTab)
&& (nColStart == r.nColStart)
@@ -1050,7 +1050,7 @@ ScAreaNameIterator::ScAreaNameIterator( ScDocument* pDoc ) :
}
}
-BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
+sal_Bool ScAreaNameIterator::Next( String& rName, ScRange& rRange )
{
for (;;)
{
@@ -1083,11 +1083,11 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
{
pData->GetArea( rRange );
rName = pData->GetName();
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
}
else
- return FALSE; // gibt nichts mehr
+ return false; // gibt nichts mehr
}
}
}
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index 4f0d93fcbe61..47dee0c8b956 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -47,12 +47,12 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
{
sal_uInt32 nDataSize;
rStream >> nDataSize;
- ULONG nDataPos = rStream.Tell();
+ sal_uLong nDataPos = rStream.Tell();
nTotalEnd = nDataPos + nDataSize;
nEntryEnd = nTotalEnd;
rStream.SeekRel(nDataSize);
- USHORT nID;
+ sal_uInt16 nID;
rStream >> nID;
if (nID != SCID_SIZES)
{
@@ -68,7 +68,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
{
sal_uInt32 nSizeTableLen;
rStream >> nSizeTableLen;
- pBuf = new BYTE[nSizeTableLen];
+ pBuf = new sal_uInt8[nSizeTableLen];
rStream.Read( pBuf, nSizeTableLen );
pMemStream = new SvMemoryStream( (char*)pBuf, nSizeTableLen, STREAM_READ );
}
@@ -93,7 +93,7 @@ ScMultipleReadHeader::~ScMultipleReadHeader()
void ScMultipleReadHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
DBG_ASSERT( nPos <= nEntryEnd, "zuviel gelesen" );
if ( nPos != nEntryEnd )
{
@@ -107,7 +107,7 @@ void ScMultipleReadHeader::EndEntry()
void ScMultipleReadHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
sal_uInt32 nEntrySize;
(*pMemStream) >> nEntrySize;
@@ -115,9 +115,9 @@ void ScMultipleReadHeader::StartEntry()
DBG_ASSERT( nEntryEnd <= nTotalEnd, "zuviele Eintraege gelesen" );
}
-ULONG ScMultipleReadHeader::BytesLeft() const
+sal_uLong ScMultipleReadHeader::BytesLeft() const
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
if (nReadEnd <= nEntryEnd)
return nEntryEnd-nReadEnd;
@@ -140,16 +140,16 @@ ScMultipleWriteHeader::ScMultipleWriteHeader(SvStream& rNewStream, sal_uInt32 nD
ScMultipleWriteHeader::~ScMultipleWriteHeader()
{
- ULONG nDataEnd = rStream.Tell();
+ sal_uLong nDataEnd = rStream.Tell();
- rStream << (USHORT) SCID_SIZES;
+ rStream << (sal_uInt16) SCID_SIZES;
rStream << static_cast<sal_uInt32>(aMemStream.Tell());
rStream.Write( aMemStream.GetData(), aMemStream.Tell() );
if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen?
{
nDataSize = nDataEnd - nDataPos;
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek(nDataPos-sizeof(sal_uInt32));
rStream << nDataSize; // Groesse am Anfang eintragen
rStream.Seek(nPos);
@@ -158,13 +158,13 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader()
void ScMultipleWriteHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
aMemStream << static_cast<sal_uInt32>(nPos - nEntryStart);
}
void ScMultipleWriteHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
nEntryStart = nPos;
}
diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx
index 07c8442f6bd7..a4bbe7d65d54 100644
--- a/sc/source/core/tool/refdata.cxx
+++ b/sc/source/core/tool/refdata.cxx
@@ -67,25 +67,25 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos )
{
nCol = nRelCol + rPos.Col();
if ( !VALIDCOL( nCol ) )
- Flags.bColDeleted = TRUE;
+ Flags.bColDeleted = sal_True;
}
if ( Flags.bRowRel )
{
nRow = nRelRow + rPos.Row();
if ( !VALIDROW( nRow ) )
- Flags.bRowDeleted = TRUE;
+ Flags.bRowDeleted = sal_True;
}
if ( Flags.bTabRel )
{
nTab = nRelTab + rPos.Tab();
if ( !VALIDTAB( nTab ) )
- Flags.bTabDeleted = TRUE;
+ Flags.bTabDeleted = sal_True;
}
}
-BOOL ScSingleRefData::operator==( const ScSingleRefData& r ) const
+sal_Bool ScSingleRefData::operator==( const ScSingleRefData& r ) const
{
return bFlags == r.bFlags &&
(Flags.bColRel ? nRelCol == r.nRelCol : nCol == r.nCol) &&
@@ -103,8 +103,8 @@ static void lcl_putInOrder( ScSingleRefData & rRef1, ScSingleRefData & rRef2 )
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
SCTAB nTab1, nTab2;
- BOOL bTmp;
- BYTE nRelState1, nRelState2;
+ sal_Bool bTmp;
+ sal_uInt8 nRelState1, nRelState2;
if ( rRef1.Flags.bRelName )
nRelState1 =
((rRef1.Flags.bTabRel & 0x01) << 2)
@@ -185,8 +185,8 @@ static void lcl_putInOrder( ScSingleRefData & rRef1, ScSingleRefData & rRef2 )
rRef1.Flags.bTabDeleted = rRef2.Flags.bTabDeleted;
rRef2.Flags.bTabDeleted = bTmp;
}
- rRef1.Flags.bRelName = ( nRelState1 ? TRUE : FALSE );
- rRef2.Flags.bRelName = ( nRelState2 ? TRUE : FALSE );
+ rRef1.Flags.bRelName = ( nRelState1 ? sal_True : false );
+ rRef2.Flags.bRelName = ( nRelState2 ? sal_True : false );
}
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index 74c62e51f767..a3b2ce55585d 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -49,7 +49,7 @@ const sal_Unicode ScRefFinder::pDelimiters[] = {
// =======================================================================
-inline BOOL IsText( sal_Unicode c )
+inline sal_Bool IsText( sal_Unicode c )
{
bool bFound = ScGlobal::UnicodeStrChr( ScRefFinder::pDelimiters, c );
if (bFound)
@@ -61,15 +61,15 @@ inline BOOL IsText( sal_Unicode c )
return c != sep;
}
-inline BOOL IsText( BOOL& bQuote, sal_Unicode c )
+inline sal_Bool IsText( sal_Bool& bQuote, sal_Unicode c )
{
if ( c == '\'' )
{
bQuote = !bQuote;
- return TRUE;
+ return sal_True;
}
if ( bQuote )
- return TRUE;
+ return sal_True;
return IsText( c );
}
@@ -86,9 +86,9 @@ ScRefFinder::~ScRefFinder()
{
}
-USHORT lcl_NextFlags( USHORT nOld )
+sal_uInt16 lcl_NextFlags( sal_uInt16 nOld )
{
- USHORT nNew = nOld & 7; // die drei Abs-Flags
+ sal_uInt16 nNew = nOld & 7; // die drei Abs-Flags
nNew = ( nNew - 1 ) & 7; // weiterzaehlen
if (!(nOld & SCA_TAB_3D))
@@ -132,7 +132,7 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos )
while ( nEStart <= nEndPos && !IsText(pSource[nEStart]) )
++nEStart;
- BOOL bQuote = FALSE;
+ sal_Bool bQuote = false;
xub_StrLen nEEnd = nEStart;
while ( nEEnd <= nEndPos && IsText(bQuote,pSource[nEEnd]) )
++nEEnd;
@@ -142,10 +142,10 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos )
// Test, ob aExpr eine Referenz ist
- USHORT nResult = aAddr.Parse( aExpr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = aAddr.Parse( aExpr, pDoc, pDoc->GetAddressConvention() );
if ( nResult & SCA_VALID )
{
- USHORT nFlags = lcl_NextFlags( nResult );
+ sal_uInt16 nFlags = lcl_NextFlags( nResult );
aAddr.Format( aExpr, nFlags, pDoc, pDoc->GetAddressConvention() );
xub_StrLen nAbsStart = nStartPos+aResult.Len()+aSep.Len();
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index e12916a9f907..ced9c1ebaa48 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -40,7 +40,7 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const
{
if ( ppControl && *ppControl )
{
- (*ppControl)->SetAllowRefresh( FALSE );
+ (*ppControl)->SetAllowRefresh( false );
// wait for any running refresh in another thread to finnish
::osl::MutexGuard aGuard( (*ppControl)->GetMutex() );
}
@@ -55,9 +55,9 @@ ScRefreshTimer::~ScRefreshTimer()
}
-void ScRefreshTimer::SetRefreshDelay( ULONG nSeconds )
+void ScRefreshTimer::SetRefreshDelay( sal_uLong nSeconds )
{
- BOOL bActive = IsActive();
+ sal_Bool bActive = IsActive();
if ( bActive && !nSeconds )
Stop();
SetTimeout( nSeconds * 1000 );
diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index 39dade20b41d..26167cdf8ba1 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -72,7 +72,7 @@ void ScRefTokenHelper::compileRangeRepresentation(
// There MUST be exactly one reference per range token and nothing
// else, and it MUST be a valid reference, not some #REF!
- USHORT nLen = pArray->GetLen();
+ sal_uInt16 nLen = pArray->GetLen();
if (!nLen)
continue; // Should a missing range really be allowed?
if (nLen != 1)
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index 970a85d3392a..e084b5e76d75 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -42,9 +42,9 @@
//------------------------------------------------------------------------
template< typename R, typename S, typename U >
-BOOL lcl_MoveStart( R& rRef, U nStart, S nDelta, U nMask )
+sal_Bool lcl_MoveStart( R& rRef, U nStart, S nDelta, U nMask )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = false;
if ( rRef >= nStart )
rRef = sal::static_int_cast<R>( rRef + nDelta );
else if ( nDelta < 0 && rRef >= nStart + nDelta )
@@ -52,20 +52,20 @@ BOOL lcl_MoveStart( R& rRef, U nStart, S nDelta, U nMask )
if ( rRef < 0 )
{
rRef = 0;
- bCut = TRUE;
+ bCut = sal_True;
}
else if ( rRef > nMask )
{
rRef = nMask;
- bCut = TRUE;
+ bCut = sal_True;
}
return bCut;
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveEnd( R& rRef, U nStart, S nDelta, U nMask )
+sal_Bool lcl_MoveEnd( R& rRef, U nStart, S nDelta, U nMask )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = false;
if ( rRef >= nStart )
rRef = sal::static_int_cast<R>( rRef + nDelta );
else if ( nDelta < 0 && rRef >= nStart + nDelta )
@@ -73,23 +73,23 @@ BOOL lcl_MoveEnd( R& rRef, U nStart, S nDelta, U nMask )
if ( rRef < 0 )
{
rRef = 0;
- bCut = TRUE;
+ bCut = sal_True;
}
else if ( rRef > nMask )
{
rRef = nMask;
- bCut = TRUE;
+ bCut = sal_True;
}
return bCut;
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
+sal_Bool lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
{
if ( rRef >= nStart && rRef <= nEnd )
{
rRef = sal::static_int_cast<R>( rRef + nDelta );
- return TRUE;
+ return sal_True;
}
if ( nDelta > 0 ) // nach hinten schieben
@@ -100,7 +100,7 @@ BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
rRef = sal::static_int_cast<R>( rRef + nDelta ); // in the moved range
else
rRef -= nEnd - nStart + 1; // nachruecken
- return TRUE;
+ return sal_True;
}
}
else // nach vorne schieben
@@ -111,27 +111,27 @@ BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
rRef = sal::static_int_cast<R>( rRef + nDelta ); // in the moved range
else
rRef += nEnd - nStart + 1; // nachruecken
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveItCut( R& rRef, S nDelta, U nMask )
+sal_Bool lcl_MoveItCut( R& rRef, S nDelta, U nMask )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = false;
rRef = sal::static_int_cast<R>( rRef + nDelta );
if ( rRef < 0 )
{
rRef = 0;
- bCut = TRUE;
+ bCut = sal_True;
}
else if ( rRef > nMask )
{
rRef = nMask;
- bCut = TRUE;
+ bCut = sal_True;
}
return bCut;
}
@@ -147,14 +147,14 @@ void lcl_MoveItWrap( R& rRef, S nDelta, U nMask )
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1,
- R& rRef2Val, BOOL& rRef2Del, BOOL bDo2,
+sal_Bool lcl_MoveRefPart( R& rRef1Val, sal_Bool& rRef1Del, sal_Bool bDo1,
+ R& rRef2Val, sal_Bool& rRef2Del, sal_Bool bDo2,
U nStart, U nEnd, S nDelta, U nMask )
{
if ( nDelta )
{
- BOOL bDel, bCut1, bCut2;
- bDel = bCut1 = bCut2 = FALSE;
+ sal_Bool bDel, bCut1, bCut2;
+ bDel = bCut1 = bCut2 = false;
S n;
if (bDo1 && bDo2)
{
@@ -163,14 +163,14 @@ BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1,
n = nStart + nDelta;
if ( n <= rRef1Val && rRef1Val < nStart
&& n <= rRef2Val && rRef2Val < nStart )
- bDel = TRUE;
+ bDel = sal_True;
}
else
{
n = nEnd + nDelta;
if ( nEnd < rRef1Val && rRef1Val <= n
&& nEnd < rRef2Val && rRef2Val <= n )
- bDel = TRUE;
+ bDel = sal_True;
}
}
if ( bDel )
@@ -196,15 +196,15 @@ BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1,
}
}
if ( bDel || (bCut1 && bCut2) )
- rRef1Del = rRef2Del = TRUE;
+ rRef1Del = rRef2Del = sal_True;
return bDel || bCut1 || bCut2 || rRef1Del || rRef2Del;
}
else
- return FALSE;
+ return false;
}
template< typename R, typename S, typename U >
-BOOL IsExpand( R n1, R n2, U nStart, S nD )
+sal_Bool IsExpand( R n1, R n2, U nStart, S nD )
{ //! vor normalem Move...
return
nD > 0 // Insert
@@ -218,7 +218,7 @@ BOOL IsExpand( R n1, R n2, U nStart, S nD )
template< typename R, typename S, typename U >
void Expand( R& n1, R& n2, U nStart, S nD )
-{ //! nach normalem Move..., nur wenn IsExpand vorher TRUE war!
+{ //! nach normalem Move..., nur wenn IsExpand vorher sal_True war!
//! erst das Ende
if ( n2 + 1 == nStart )
{ // am Ende
@@ -230,19 +230,19 @@ void Expand( R& n1, R& n2, U nStart, S nD )
}
-BOOL lcl_IsWrapBig( INT32 nRef, INT32 nDelta )
+sal_Bool lcl_IsWrapBig( sal_Int32 nRef, sal_Int32 nDelta )
{
if ( nRef > 0 && nDelta > 0 )
return nRef + nDelta <= 0;
else if ( nRef < 0 && nDelta < 0 )
return nRef + nDelta >= 0;
- return FALSE;
+ return false;
}
-BOOL lcl_MoveBig( INT32& rRef, INT32 nStart, INT32 nDelta )
+sal_Bool lcl_MoveBig( sal_Int32& rRef, sal_Int32 nStart, sal_Int32 nDelta )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = false;
if ( rRef >= nStart )
{
if ( nDelta > 0 )
@@ -255,9 +255,9 @@ BOOL lcl_MoveBig( INT32& rRef, INT32 nStart, INT32 nDelta )
return bCut;
}
-BOOL lcl_MoveItCutBig( INT32& rRef, INT32 nDelta )
+sal_Bool lcl_MoveItCutBig( sal_Int32& rRef, sal_Int32 nDelta )
{
- BOOL bCut = lcl_IsWrapBig( rRef, nDelta );
+ sal_Bool bCut = lcl_IsWrapBig( rRef, nDelta );
rRef += nDelta;
return bCut;
}
@@ -279,15 +279,15 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
SCROW oldRow2 = theRow2;
SCTAB oldTab2 = theTab2;
- BOOL bCut1, bCut2;
+ sal_Bool bCut1, bCut2;
if (eUpdateRefMode == URM_INSDEL)
{
- BOOL bExpand = pDoc->IsExpandRefs();
+ sal_Bool bExpand = pDoc->IsExpandRefs();
if ( nDx && (theRow1 >= nRow1) && (theRow2 <= nRow2) &&
(theTab1 >= nTab1) && (theTab2 <= nTab2) )
{
- BOOL bExp = (bExpand && IsExpand( theCol1, theCol2, nCol1, nDx ));
+ sal_Bool bExp = (bExpand && IsExpand( theCol1, theCol2, nCol1, nDx ));
bCut1 = lcl_MoveStart( theCol1, nCol1, nDx, MAXCOL );
bCut2 = lcl_MoveEnd( theCol2, nCol1, nDx, MAXCOL );
if ( theCol2 < theCol1 )
@@ -306,7 +306,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
if ( nDy && (theCol1 >= nCol1) && (theCol2 <= nCol2) &&
(theTab1 >= nTab1) && (theTab2 <= nTab2) )
{
- BOOL bExp = (bExpand && IsExpand( theRow1, theRow2, nRow1, nDy ));
+ sal_Bool bExp = (bExpand && IsExpand( theRow1, theRow2, nRow1, nDy ));
bCut1 = lcl_MoveStart( theRow1, nRow1, nDy, MAXROW );
bCut2 = lcl_MoveEnd( theRow2, nRow1, nDy, MAXROW );
if ( theRow2 < theRow1 )
@@ -327,7 +327,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
{
SCsTAB nMaxTab = pDoc->GetTableCount() - 1;
nMaxTab = sal::static_int_cast<SCsTAB>(nMaxTab + nDz); // adjust to new count
- BOOL bExp = (bExpand && IsExpand( theTab1, theTab2, nTab1, nDz ));
+ sal_Bool bExp = (bExpand && IsExpand( theTab1, theTab2, nTab1, nDz ));
bCut1 = lcl_MoveStart( theTab1, nTab1, nDz, static_cast<SCTAB>(nMaxTab) );
bCut2 = lcl_MoveEnd( theTab2, nTab1, nDz, static_cast<SCTAB>(nMaxTab) );
if ( theTab2 < theTab1 )
@@ -407,18 +407,18 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
// Referenzen koennen auch ausserhalb des Dokuments liegen!
// Ganze Spalten/Zeilen (nInt32Min..nInt32Max) bleiben immer solche!
ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode,
- const ScBigRange& rWhere, INT32 nDx, INT32 nDy, INT32 nDz,
+ const ScBigRange& rWhere, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz,
ScBigRange& rWhat )
{
ScRefUpdateRes eRet = UR_NOTHING;
const ScBigRange aOldRange( rWhat );
- INT32 nCol1, nRow1, nTab1, nCol2, nRow2, nTab2;
- INT32 theCol1, theRow1, theTab1, theCol2, theRow2, theTab2;
+ sal_Int32 nCol1, nRow1, nTab1, nCol2, nRow2, nTab2;
+ sal_Int32 theCol1, theRow1, theTab1, theCol2, theRow2, theTab2;
rWhere.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
rWhat.GetVars( theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 );
- BOOL bCut1, bCut2;
+ sal_Bool bCut1, bCut2;
if (eUpdateRefMode == URM_INSDEL)
{
@@ -513,11 +513,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
if( eMode == URM_INSDEL )
{
- BOOL bExpand = pDoc->IsExpandRefs();
+ sal_Bool bExpand = pDoc->IsExpandRefs();
const ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
- BOOL bInDeleteUndo =
- ( pChangeTrack ? pChangeTrack->IsInDeleteUndo() : FALSE );
+ sal_Bool bInDeleteUndo =
+ ( pChangeTrack ? pChangeTrack->IsInDeleteUndo() : false );
SCCOL oldCol1 = rRef.Ref1.nCol;
SCROW oldRow1 = rRef.Ref1.nRow;
@@ -526,12 +526,12 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
SCROW oldRow2 = rRef.Ref2.nRow;
SCTAB oldTab2 = rRef.Ref2.nTab;
- BOOL bRef1ColDel = rRef.Ref1.IsColDeleted();
- BOOL bRef2ColDel = rRef.Ref2.IsColDeleted();
- BOOL bRef1RowDel = rRef.Ref1.IsRowDeleted();
- BOOL bRef2RowDel = rRef.Ref2.IsRowDeleted();
- BOOL bRef1TabDel = rRef.Ref1.IsTabDeleted();
- BOOL bRef2TabDel = rRef.Ref2.IsTabDeleted();
+ sal_Bool bRef1ColDel = rRef.Ref1.IsColDeleted();
+ sal_Bool bRef2ColDel = rRef.Ref2.IsColDeleted();
+ sal_Bool bRef1RowDel = rRef.Ref1.IsRowDeleted();
+ sal_Bool bRef2RowDel = rRef.Ref2.IsRowDeleted();
+ sal_Bool bRef1TabDel = rRef.Ref1.IsTabDeleted();
+ sal_Bool bRef2TabDel = rRef.Ref2.IsTabDeleted();
if( nDx &&
((rRef.Ref1.nRow >= nRow1
@@ -541,11 +541,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nTab <= nTab2) || (bRef1TabDel || bRef2TabDel))
)
{
- BOOL bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nCol,
+ sal_Bool bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nCol,
rRef.Ref2.nCol, nCol1, nDx ));
- BOOL bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref1.IsColRel()));
- BOOL bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref2.IsColRel()));
if ( lcl_MoveRefPart( rRef.Ref1.nCol, bRef1ColDel, bDo1,
rRef.Ref2.nCol, bRef2ColDel, bDo2,
@@ -556,17 +556,17 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
{
if ( bRef1ColDel && nCol1 <= rRef.Ref1.nCol &&
rRef.Ref1.nCol <= nCol1 + nDx )
- rRef.Ref1.SetColDeleted( FALSE );
+ rRef.Ref1.SetColDeleted( false );
if ( bRef2ColDel && nCol1 <= rRef.Ref2.nCol &&
rRef.Ref2.nCol <= nCol1 + nDx )
- rRef.Ref2.SetColDeleted( FALSE );
+ rRef.Ref2.SetColDeleted( false );
}
else
{
if ( bRef1ColDel )
- rRef.Ref1.SetColDeleted( TRUE );
+ rRef.Ref1.SetColDeleted( sal_True );
if ( bRef2ColDel )
- rRef.Ref2.SetColDeleted( TRUE );
+ rRef.Ref2.SetColDeleted( sal_True );
}
}
if ( bExp )
@@ -583,11 +583,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nTab <= nTab2) || (bRef1TabDel || bRef2TabDel))
)
{
- BOOL bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nRow,
+ sal_Bool bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nRow,
rRef.Ref2.nRow, nRow1, nDy ));
- BOOL bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref1.IsRowRel()));
- BOOL bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref2.IsRowRel()));
if ( lcl_MoveRefPart( rRef.Ref1.nRow, bRef1RowDel, bDo1,
rRef.Ref2.nRow, bRef2RowDel, bDo2,
@@ -598,17 +598,17 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
{
if ( bRef1RowDel && nRow1 <= rRef.Ref1.nRow &&
rRef.Ref1.nRow <= nRow1 + nDy )
- rRef.Ref1.SetRowDeleted( FALSE );
+ rRef.Ref1.SetRowDeleted( false );
if ( bRef2RowDel && nRow1 <= rRef.Ref2.nRow &&
rRef.Ref2.nRow <= nRow1 + nDy )
- rRef.Ref2.SetRowDeleted( FALSE );
+ rRef.Ref2.SetRowDeleted( false );
}
else
{
if ( bRef1RowDel )
- rRef.Ref1.SetRowDeleted( TRUE );
+ rRef.Ref1.SetRowDeleted( sal_True );
if ( bRef2RowDel )
- rRef.Ref2.SetRowDeleted( TRUE );
+ rRef.Ref2.SetRowDeleted( sal_True );
}
}
if ( bExp )
@@ -625,12 +625,12 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nRow <= nRow2) || (bRef1RowDel || bRef2RowDel))
)
{
- BOOL bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nTab,
+ sal_Bool bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nTab,
rRef.Ref2.nTab, nTab1, nDz ));
SCTAB nMaxTab = pDoc->GetTableCount() - 1;
- BOOL bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref1.IsTabRel()));
- BOOL bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref2.IsTabRel()));
if ( lcl_MoveRefPart( rRef.Ref1.nTab, bRef1TabDel, bDo1,
rRef.Ref2.nTab, bRef2TabDel, bDo2,
@@ -641,17 +641,17 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
{
if ( bRef1TabDel && nTab1 <= rRef.Ref1.nTab &&
rRef.Ref1.nTab <= nTab1 + nDz )
- rRef.Ref1.SetTabDeleted( FALSE );
+ rRef.Ref1.SetTabDeleted( false );
if ( bRef2TabDel && nTab1 <= rRef.Ref2.nTab &&
rRef.Ref2.nTab <= nTab1 + nDz )
- rRef.Ref2.SetTabDeleted( FALSE );
+ rRef.Ref2.SetTabDeleted( false );
}
else
{
if ( bRef1TabDel )
- rRef.Ref1.SetTabDeleted( TRUE );
+ rRef.Ref1.SetTabDeleted( sal_True );
if ( bRef2TabDel )
- rRef.Ref2.SetTabDeleted( TRUE );
+ rRef.Ref2.SetTabDeleted( sal_True );
}
}
if ( bExp )
@@ -685,12 +685,12 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nRow <= nRow2-nDy
&& rRef.Ref2.nTab <= nTab2-nDz )
{
- eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, TRUE ); // immer verschieben
+ eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, false, sal_True ); // immer verschieben
}
else if ( nDz && r.In( rPos ) )
{
- rRef.Ref1.SetFlag3D( TRUE );
- rRef.Ref2.SetFlag3D( TRUE );
+ rRef.Ref1.SetFlag3D( sal_True );
+ rRef.Ref2.SetFlag3D( sal_True );
eRet = UR_UPDATED;
if (eWhat != ScRefUpdate::ABSOLUTE)
rRef.CalcRelFromAbs( rPos );
@@ -699,7 +699,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
rRef.CalcRelFromAbs( rPos );
}
else if( eMode == URM_COPY && r.In( rPos ) )
- eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, FALSE ); // nur relative
+ eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, false, false ); // nur relative
// sollte nicht mehr verwendet werden muessen
else if (eWhat != ScRefUpdate::ABSOLUTE)
rRef.CalcRelFromAbs( rPos );
@@ -710,7 +710,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScComplexRefData& rRef, BOOL bWrap, BOOL bAbsolute )
+ ScComplexRefData& rRef, sal_Bool bWrap, sal_Bool bAbsolute )
{
ScRefUpdateRes eRet = UR_NOTHING;
@@ -721,10 +721,10 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
SCROW oldRow2 = rRef.Ref2.nRow;
SCTAB oldTab2 = rRef.Ref2.nTab;
- BOOL bCut1, bCut2;
+ sal_Bool bCut1, bCut2;
if ( nDx )
{
- bCut1 = bCut2 = FALSE;
+ bCut1 = bCut2 = false;
if( bAbsolute || rRef.Ref1.IsColRel() )
{
if( bWrap )
@@ -743,13 +743,13 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
eRet = UR_UPDATED;
if ( bCut1 && bCut2 )
{
- rRef.Ref1.SetColDeleted( TRUE );
- rRef.Ref2.SetColDeleted( TRUE );
+ rRef.Ref1.SetColDeleted( sal_True );
+ rRef.Ref2.SetColDeleted( sal_True );
}
}
if ( nDy )
{
- bCut1 = bCut2 = FALSE;
+ bCut1 = bCut2 = false;
if( bAbsolute || rRef.Ref1.IsRowRel() )
{
if( bWrap )
@@ -768,13 +768,13 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
eRet = UR_UPDATED;
if ( bCut1 && bCut2 )
{
- rRef.Ref1.SetRowDeleted( TRUE );
- rRef.Ref2.SetRowDeleted( TRUE );
+ rRef.Ref1.SetRowDeleted( sal_True );
+ rRef.Ref2.SetRowDeleted( sal_True );
}
}
if ( nDz )
{
- bCut1 = bCut2 = FALSE;
+ bCut1 = bCut2 = false;
SCsTAB nMaxTab = (SCsTAB) pDoc->GetTableCount() - 1;
if( bAbsolute || rRef.Ref1.IsTabRel() )
{
@@ -796,8 +796,8 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
eRet = UR_UPDATED;
if ( bCut1 && bCut2 )
{
- rRef.Ref1.SetTabDeleted( TRUE );
- rRef.Ref2.SetTabDeleted( TRUE );
+ rRef.Ref1.SetTabDeleted( sal_True );
+ rRef.Ref2.SetTabDeleted( sal_True );
}
}
@@ -913,11 +913,11 @@ ScRefUpdateRes ScRefUpdate::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCRO
// in Y-Richtung darf die Ref auch eine Zeile weiter unten anfangen,
// falls ein Bereich Spaltenkoepfe enthaelt
- BOOL bUpdateX = ( nGrowX &&
+ sal_Bool bUpdateX = ( nGrowX &&
rRef.Ref1.nCol == rArea.aStart.Col() && rRef.Ref2.nCol == rArea.aEnd.Col() &&
rRef.Ref1.nRow >= rArea.aStart.Row() && rRef.Ref2.nRow <= rArea.aEnd.Row() &&
rRef.Ref1.nTab >= rArea.aStart.Tab() && rRef.Ref2.nTab <= rArea.aEnd.Tab() );
- BOOL bUpdateY = ( nGrowY &&
+ sal_Bool bUpdateY = ( nGrowY &&
rRef.Ref1.nCol >= rArea.aStart.Col() && rRef.Ref2.nCol <= rArea.aEnd.Col() &&
( rRef.Ref1.nRow == rArea.aStart.Row() || rRef.Ref1.nRow == rArea.aStart.Row()+1 ) &&
rRef.Ref2.nRow == rArea.aEnd.Row() &&
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 22b316aa71de..9add45e417ec 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -194,7 +194,7 @@ public:
SCSIZE CalcOffset( SCSIZE nC, SCSIZE nR) const;
bool ValidColRowReplicated( SCSIZE & rC, SCSIZE & rR ) const;
bool ValidColRowOrReplicated( SCSIZE & rC, SCSIZE & rR ) const;
- void SetErrorAtInterpreter( USHORT nError ) const;
+ void SetErrorAtInterpreter( sal_uInt16 nError ) const;
void PutDouble(double fVal, SCSIZE nC, SCSIZE nR);
void PutDouble( double fVal, SCSIZE nIndex);
void PutString(const String& rStr, SCSIZE nC, SCSIZE nR);
@@ -202,9 +202,9 @@ public:
void PutEmpty(SCSIZE nC, SCSIZE nR);
void PutEmptyPath(SCSIZE nC, SCSIZE nR);
- void PutError( USHORT nErrorCode, SCSIZE nC, SCSIZE nR );
+ void PutError( sal_uInt16 nErrorCode, SCSIZE nC, SCSIZE nR );
void PutBoolean(bool bVal, SCSIZE nC, SCSIZE nR);
- USHORT GetError( SCSIZE nC, SCSIZE nR) const;
+ sal_uInt16 GetError( SCSIZE nC, SCSIZE nR) const;
double GetDouble(SCSIZE nC, SCSIZE nR) const;
double GetDouble( SCSIZE nIndex) const;
const String& GetString(SCSIZE nC, SCSIZE nR) const;
@@ -337,7 +337,7 @@ bool ScMatrixImpl::ValidColRowOrReplicated( SCSIZE & rC, SCSIZE & rR ) const
return ValidColRow( rC, rR) || ValidColRowReplicated( rC, rR);
}
-void ScMatrixImpl::SetErrorAtInterpreter( USHORT nError ) const
+void ScMatrixImpl::SetErrorAtInterpreter( sal_uInt16 nError ) const
{
if ( pErrorInterpreter )
pErrorInterpreter->SetError( nError);
@@ -403,7 +403,7 @@ void ScMatrixImpl::PutEmptyPath(SCSIZE nC, SCSIZE nR)
}
}
-void ScMatrixImpl::PutError( USHORT nErrorCode, SCSIZE nC, SCSIZE nR )
+void ScMatrixImpl::PutError( sal_uInt16 nErrorCode, SCSIZE nC, SCSIZE nR )
{
maMat.set_numeric(nR, nC, CreateDoubleError(nErrorCode));
}
@@ -418,7 +418,7 @@ void ScMatrixImpl::PutBoolean(bool bVal, SCSIZE nC, SCSIZE nR)
}
}
-USHORT ScMatrixImpl::GetError( SCSIZE nC, SCSIZE nR) const
+sal_uInt16 ScMatrixImpl::GetError( SCSIZE nC, SCSIZE nR) const
{
if (ValidColRowOrReplicated( nC, nR ))
{
@@ -439,7 +439,7 @@ double ScMatrixImpl::GetDouble(SCSIZE nC, SCSIZE nR) const
double fVal = maMat.get_numeric(nR, nC);
if ( pErrorInterpreter )
{
- USHORT nError = GetDoubleErrorValue(fVal);
+ sal_uInt16 nError = GetDoubleErrorValue(fVal);
if ( nError )
SetErrorAtInterpreter( nError);
}
@@ -497,7 +497,7 @@ String ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE nC, SCSIZE
{
if (IsEmptyPath( nC, nR))
{ // result of empty FALSE jump path
- ULONG nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_LOGICAL,
+ sal_uLong nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_LOGICAL,
ScGlobal::eLnge);
String aStr;
Color* pColor = NULL;
@@ -507,7 +507,7 @@ String ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE nC, SCSIZE
return GetString( nC, nR);
}
- USHORT nError = GetError( nC, nR);
+ sal_uInt16 nError = GetError( nC, nR);
if (nError)
{
SetErrorAtInterpreter( nError);
@@ -515,7 +515,7 @@ String ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE nC, SCSIZE
}
double fVal= GetDouble( nC, nR);
- ULONG nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_NUMBER,
+ sal_uLong nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
String aStr;
rFormatter.GetInputLineString( fVal, nKey, aStr);
@@ -1039,7 +1039,7 @@ void ScMatrix::PutEmptyPath(SCSIZE nC, SCSIZE nR)
pImpl->PutEmptyPath(nC, nR);
}
-void ScMatrix::PutError( USHORT nErrorCode, SCSIZE nC, SCSIZE nR )
+void ScMatrix::PutError( sal_uInt16 nErrorCode, SCSIZE nC, SCSIZE nR )
{
pImpl->PutError(nErrorCode, nC, nR);
}
@@ -1049,7 +1049,7 @@ void ScMatrix::PutBoolean(bool bVal, SCSIZE nC, SCSIZE nR)
pImpl->PutBoolean(bVal, nC, nR);
}
-USHORT ScMatrix::GetError( SCSIZE nC, SCSIZE nR) const
+sal_uInt16 ScMatrix::GetError( SCSIZE nC, SCSIZE nR) const
{
return pImpl->GetError(nC, nR);
}
@@ -1084,47 +1084,47 @@ ScMatrixValue ScMatrix::Get(SCSIZE nC, SCSIZE nR) const
return pImpl->Get(nC, nR);
}
-BOOL ScMatrix::IsString( SCSIZE nIndex ) const
+sal_Bool ScMatrix::IsString( SCSIZE nIndex ) const
{
return pImpl->IsString(nIndex);
}
-BOOL ScMatrix::IsString( SCSIZE nC, SCSIZE nR ) const
+sal_Bool ScMatrix::IsString( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsString(nC, nR);
}
-BOOL ScMatrix::IsEmpty( SCSIZE nC, SCSIZE nR ) const
+sal_Bool ScMatrix::IsEmpty( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsEmpty(nC, nR);
}
-BOOL ScMatrix::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
+sal_Bool ScMatrix::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsEmptyPath(nC, nR);
}
-BOOL ScMatrix::IsValue( SCSIZE nIndex ) const
+sal_Bool ScMatrix::IsValue( SCSIZE nIndex ) const
{
return pImpl->IsValue(nIndex);
}
-BOOL ScMatrix::IsValue( SCSIZE nC, SCSIZE nR ) const
+sal_Bool ScMatrix::IsValue( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsValue(nC, nR);
}
-BOOL ScMatrix::IsValueOrEmpty( SCSIZE nC, SCSIZE nR ) const
+sal_Bool ScMatrix::IsValueOrEmpty( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsValueOrEmpty(nC, nR);
}
-BOOL ScMatrix::IsBoolean( SCSIZE nC, SCSIZE nR ) const
+sal_Bool ScMatrix::IsBoolean( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsBoolean(nC, nR);
}
-BOOL ScMatrix::IsNumeric() const
+sal_Bool ScMatrix::IsNumeric() const
{
return pImpl->IsNumeric();
}
diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx
index 7f211cef4033..e1c1b607a908 100644
--- a/sc/source/core/tool/subtotal.cxx
+++ b/sc/source/core/tool/subtotal.cxx
@@ -37,14 +37,14 @@
// -----------------------------------------------------------------------
-BOOL SubTotal::SafePlus(double& fVal1, double fVal2)
+sal_Bool SubTotal::SafePlus(double& fVal1, double fVal2)
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SAL_MATH_FPEXCEPTIONS_OFF();
fVal1 += fVal2;
if (!::rtl::math::isFinite(fVal1))
{
- bOk = FALSE;
+ bOk = false;
if (fVal2 > 0.0)
fVal1 = DBL_MAX;
else
@@ -54,28 +54,28 @@ BOOL SubTotal::SafePlus(double& fVal1, double fVal2)
}
-BOOL SubTotal::SafeMult(double& fVal1, double fVal2)
+sal_Bool SubTotal::SafeMult(double& fVal1, double fVal2)
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SAL_MATH_FPEXCEPTIONS_OFF();
fVal1 *= fVal2;
if (!::rtl::math::isFinite(fVal1))
{
- bOk = FALSE;
+ bOk = false;
fVal1 = DBL_MAX;
}
return bOk;
}
-BOOL SubTotal::SafeDiv(double& fVal1, double fVal2)
+sal_Bool SubTotal::SafeDiv(double& fVal1, double fVal2)
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SAL_MATH_FPEXCEPTIONS_OFF();
fVal1 /= fVal2;
if (!::rtl::math::isFinite(fVal1))
{
- bOk = FALSE;
+ bOk = false;
fVal1 = DBL_MAX;
}
return bOk;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 0e41bd2f86fc..9ddb3509ad81 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -112,19 +112,19 @@ namespace
// ScRawToken size is FixMembers + MAXSTRLEN + ~4 ~= 1036
IMPL_FIXEDMEMPOOL_NEWDEL( ScRawToken, 8, 4 )
// Some ScDoubleRawToken, FixMembers + sizeof(double) ~= 16
-const USHORT nMemPoolDoubleRawToken = 0x0400 / sizeof(ScDoubleRawToken);
+const sal_uInt16 nMemPoolDoubleRawToken = 0x0400 / sizeof(ScDoubleRawToken);
IMPL_FIXEDMEMPOOL_NEWDEL( ScDoubleRawToken, nMemPoolDoubleRawToken, nMemPoolDoubleRawToken )
// Need a whole bunch of ScSingleRefToken
-const USHORT nMemPoolSingleRefToken = (0x4000 - 64) / sizeof(ScSingleRefToken);
+const sal_uInt16 nMemPoolSingleRefToken = (0x4000 - 64) / sizeof(ScSingleRefToken);
IMPL_FIXEDMEMPOOL_NEWDEL( ScSingleRefToken, nMemPoolSingleRefToken, nMemPoolSingleRefToken )
// Need quite a lot of ScDoubleRefToken
-const USHORT nMemPoolDoubleRefToken = (0x2000 - 64) / sizeof(ScDoubleRefToken);
+const sal_uInt16 nMemPoolDoubleRefToken = (0x2000 - 64) / sizeof(ScDoubleRefToken);
IMPL_FIXEDMEMPOOL_NEWDEL( ScDoubleRefToken, nMemPoolDoubleRefToken, nMemPoolDoubleRefToken )
// --- helpers --------------------------------------------------------------
-inline BOOL lcl_IsReference( OpCode eOp, StackVar eType )
+inline sal_Bool lcl_IsReference( OpCode eOp, StackVar eType )
{
return
(eOp == ocPush && (eType == svSingleRef || eType == svDoubleRef))
@@ -223,7 +223,7 @@ void ScRawToken::SetDouble(double rVal)
nRefCnt = 0;
}
-void ScRawToken::SetName( USHORT n )
+void ScRawToken::SetName( sal_uInt16 n )
{
eOp = ocName;
eType = svIndex;
@@ -288,13 +288,13 @@ void ScRawToken::SetExternal( const sal_Unicode* pStr )
nRefCnt = 0;
}
-USHORT lcl_ScRawTokenOffset()
+sal_uInt16 lcl_ScRawTokenOffset()
{
// offset of sbyte in ScRawToken
// offsetof(ScRawToken, sbyte) gives a warning with gcc, because ScRawToken is no POD
ScRawToken aToken;
- return static_cast<USHORT>( reinterpret_cast<char*>(&aToken.sbyte) - reinterpret_cast<char*>(&aToken) );
+ return static_cast<sal_uInt16>( reinterpret_cast<char*>(&aToken.sbyte) - reinterpret_cast<char*>(&aToken) );
}
ScRawToken* ScRawToken::Clone() const
@@ -309,21 +309,21 @@ ScRawToken* ScRawToken::Clone() const
}
else
{
- static USHORT nOffset = lcl_ScRawTokenOffset(); // offset of sbyte
- USHORT n = nOffset;
+ static sal_uInt16 nOffset = lcl_ScRawTokenOffset(); // offset of sbyte
+ sal_uInt16 n = nOffset;
switch( eType )
{
case svSep: break;
case svByte: n += sizeof(ScRawToken::sbyte); break;
case svDouble: n += sizeof(double); break;
- case svString: n = sal::static_int_cast<USHORT>( n + GetStrLenBytes( cStr ) + GetStrLenBytes( 1 ) ); break;
+ case svString: n = sal::static_int_cast<sal_uInt16>( n + GetStrLenBytes( cStr ) + GetStrLenBytes( 1 ) ); break;
case svSingleRef:
case svDoubleRef: n += sizeof(aRef); break;
case svMatrix: n += sizeof(ScMatrix*); break;
- case svIndex: n += sizeof(USHORT); break;
+ case svIndex: n += sizeof(sal_uInt16); break;
case svJump: n += nJump[ 0 ] * 2 + 2; break;
- case svExternal: n = sal::static_int_cast<USHORT>( n + GetStrLenBytes( cStr+1 ) + GetStrLenBytes( 2 ) ); break;
+ case svExternal: n = sal::static_int_cast<sal_uInt16>( n + GetStrLenBytes( cStr+1 ) + GetStrLenBytes( 2 ) ); break;
// external references
case svExternalSingleRef:
@@ -334,11 +334,11 @@ ScRawToken* ScRawToken::Clone() const
DBG_ERROR1( "unknown ScRawToken::Clone() type %d", int(eType));
}
}
- p = (ScRawToken*) new BYTE[ n ];
- memcpy( p, this, n * sizeof(BYTE) );
+ p = (ScRawToken*) new sal_uInt8[ n ];
+ memcpy( p, this, n * sizeof(sal_uInt8) );
}
p->nRefCnt = 0;
- p->bRaw = FALSE;
+ p->bRaw = false;
return p;
}
@@ -427,7 +427,7 @@ void ScRawToken::Delete()
delete (ScDoubleRawToken*) this; // FixedMemPool ScDoubleRawToken
break;
default:
- delete [] (BYTE*) this;
+ delete [] (sal_uInt8*) this;
}
}
}
@@ -455,14 +455,14 @@ ScToken::~ScToken()
}
// TextEqual: if same formula entered (for optimization in sort)
-BOOL ScToken::TextEqual( const FormulaToken& _rToken ) const
+sal_Bool ScToken::TextEqual( const FormulaToken& _rToken ) const
{
if ( eType == svSingleRef || eType == svDoubleRef )
{
// in relative Refs only compare relative parts
if ( eType != _rToken.GetType() || GetOpCode() != _rToken.GetOpCode() )
- return FALSE;
+ return false;
const ScToken& rToken = static_cast<const ScToken&>(_rToken);
ScComplexRefData aTemp1;
@@ -503,24 +503,24 @@ BOOL ScToken::TextEqual( const FormulaToken& _rToken ) const
}
-BOOL ScToken::Is3DRef() const
+sal_Bool ScToken::Is3DRef() const
{
switch ( eType )
{
case svDoubleRef :
if ( GetSingleRef2().IsFlag3D() )
- return TRUE;
+ return sal_True;
//! fallthru
case svSingleRef :
if ( GetSingleRef().IsFlag3D() )
- return TRUE;
+ return sal_True;
break;
default:
{
// added to avoid warnings
}
}
- return FALSE;
+ return false;
}
FormulaTokenRef ScToken::ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2,
@@ -744,7 +744,7 @@ void ScSingleRefToken::CalcAbsIfRel( const ScAddress& rPos )
{ aSingleRef.CalcAbsIfRel( rPos ); }
void ScSingleRefToken::CalcRelFromAbs( const ScAddress& rPos )
{ aSingleRef.CalcRelFromAbs( rPos ); }
-BOOL ScSingleRefToken::operator==( const FormulaToken& r ) const
+sal_Bool ScSingleRefToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && aSingleRef == static_cast<const ScToken&>(r).GetSingleRef();
}
@@ -760,7 +760,7 @@ void ScDoubleRefToken::CalcAbsIfRel( const ScAddress& rPos )
{ aDoubleRef.CalcAbsIfRel( rPos ); }
void ScDoubleRefToken::CalcRelFromAbs( const ScAddress& rPos )
{ aDoubleRef.CalcRelFromAbs( rPos ); }
-BOOL ScDoubleRefToken::operator==( const FormulaToken& r ) const
+sal_Bool ScDoubleRefToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && aDoubleRef == static_cast<const ScToken&>(r).GetDoubleRef();
}
@@ -778,7 +778,7 @@ void ScRefListToken::CalcRelFromAbs( const ScAddress& rPos )
for (ScRefList::iterator it( aRefList.begin()); it != aRefList.end(); ++it)
(*it).CalcRelFromAbs( rPos);
}
-BOOL ScRefListToken::operator==( const FormulaToken& r ) const
+sal_Bool ScRefListToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && &aRefList == static_cast<const ScToken&>(r).GetRefList();
}
@@ -786,7 +786,7 @@ BOOL ScRefListToken::operator==( const FormulaToken& r ) const
const ScMatrix* ScMatrixToken::GetMatrix() const { return pMatrix.get(); }
ScMatrix* ScMatrixToken::GetMatrix() { return pMatrix.get(); }
-BOOL ScMatrixToken::operator==( const FormulaToken& r ) const
+sal_Bool ScMatrixToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && pMatrix == static_cast<const ScToken&>(r).GetMatrix();
}
@@ -813,7 +813,7 @@ ScExternalSingleRefToken::~ScExternalSingleRefToken()
{
}
-USHORT ScExternalSingleRefToken::GetIndex() const
+sal_uInt16 ScExternalSingleRefToken::GetIndex() const
{
return mnFileId;
}
@@ -843,7 +843,7 @@ void ScExternalSingleRefToken::CalcRelFromAbs( const ScAddress& rPos )
maSingleRef.CalcRelFromAbs( rPos );
}
-BOOL ScExternalSingleRefToken::operator ==( const FormulaToken& r ) const
+sal_Bool ScExternalSingleRefToken::operator ==( const FormulaToken& r ) const
{
if (!FormulaToken::operator==(r))
return false;
@@ -879,7 +879,7 @@ ScExternalDoubleRefToken::~ScExternalDoubleRefToken()
{
}
-USHORT ScExternalDoubleRefToken::GetIndex() const
+sal_uInt16 ScExternalDoubleRefToken::GetIndex() const
{
return mnFileId;
}
@@ -929,7 +929,7 @@ void ScExternalDoubleRefToken::CalcRelFromAbs( const ScAddress& rPos )
maDoubleRef.CalcRelFromAbs( rPos );
}
-BOOL ScExternalDoubleRefToken::operator ==( const FormulaToken& r ) const
+sal_Bool ScExternalDoubleRefToken::operator ==( const FormulaToken& r ) const
{
if (!ScToken::operator==(r))
return false;
@@ -961,7 +961,7 @@ ScExternalNameToken::ScExternalNameToken( const ScExternalNameToken& r ) :
ScExternalNameToken::~ScExternalNameToken() {}
-USHORT ScExternalNameToken::GetIndex() const
+sal_uInt16 ScExternalNameToken::GetIndex() const
{
return mnFileId;
}
@@ -971,7 +971,7 @@ const String& ScExternalNameToken::GetString() const
return maName;
}
-BOOL ScExternalNameToken::operator==( const FormulaToken& r ) const
+sal_Bool ScExternalNameToken::operator==( const FormulaToken& r ) const
{
if ( !FormulaToken::operator==(r) )
return false;
@@ -997,7 +997,7 @@ BOOL ScExternalNameToken::operator==( const FormulaToken& r ) const
// ============================================================================
ScJumpMatrix* ScJumpMatrixToken::GetJumpMatrix() const { return pJumpMatrix; }
-BOOL ScJumpMatrixToken::operator==( const FormulaToken& r ) const
+sal_Bool ScJumpMatrixToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && pJumpMatrix == static_cast<const ScToken&>(r).GetJumpMatrix();
}
@@ -1012,7 +1012,7 @@ const String & ScEmptyCellToken::GetString() const
static String aDummyString;
return aDummyString;
}
-BOOL ScEmptyCellToken::operator==( const FormulaToken& r ) const
+sal_Bool ScEmptyCellToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) &&
bInherited == static_cast< const ScEmptyCellToken & >(r).IsInherited() &&
@@ -1029,7 +1029,7 @@ ScMatrix* ScMatrixCellResultToken::GetMatrix()
{
return const_cast<ScMatrix*>(xMatrix.operator->());
}
-BOOL ScMatrixCellResultToken::operator==( const FormulaToken& r ) const
+sal_Bool ScMatrixCellResultToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) &&
xUpperLeft == static_cast<const ScMatrixCellResultToken &>(r).xUpperLeft &&
@@ -1037,7 +1037,7 @@ BOOL ScMatrixCellResultToken::operator==( const FormulaToken& r ) const
}
-BOOL ScMatrixFormulaCellToken::operator==( const FormulaToken& r ) const
+sal_Bool ScMatrixFormulaCellToken::operator==( const FormulaToken& r ) const
{
const ScMatrixFormulaCellToken* p = dynamic_cast<const ScMatrixFormulaCellToken*>(&r);
return p && ScMatrixCellResultToken::operator==( r ) &&
@@ -1089,7 +1089,7 @@ void ScMatrixFormulaCellToken::SetUpperLeftDouble( double f )
double ScHybridCellToken::GetDouble() const { return fDouble; }
const String & ScHybridCellToken::GetString() const { return aString; }
-BOOL ScHybridCellToken::operator==( const FormulaToken& r ) const
+sal_Bool ScHybridCellToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) &&
fDouble == r.GetDouble() && aString == r.GetString() &&
@@ -1223,9 +1223,9 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a
}
return bError;
}
-BOOL ScTokenArray::ImplGetReference( ScRange& rRange, BOOL bValidOnly ) const
+sal_Bool ScTokenArray::ImplGetReference( ScRange& rRange, sal_Bool bValidOnly ) const
{
- BOOL bIs = FALSE;
+ sal_Bool bIs = false;
if ( pCode && nLen == 1 )
{
const FormulaToken* pToken = pCode[0];
@@ -1251,14 +1251,14 @@ BOOL ScTokenArray::ImplGetReference( ScRange& rRange, BOOL bValidOnly ) const
return bIs;
}
-BOOL ScTokenArray::IsReference( ScRange& rRange ) const
+sal_Bool ScTokenArray::IsReference( ScRange& rRange ) const
{
- return ImplGetReference( rRange, FALSE );
+ return ImplGetReference( rRange, false );
}
-BOOL ScTokenArray::IsValidReference( ScRange& rRange ) const
+sal_Bool ScTokenArray::IsValidReference( ScRange& rRange ) const
{
- return ImplGetReference( rRange, TRUE );
+ return ImplGetReference( rRange, sal_True );
}
////////////////////////////////////////////////////////////////////////////
@@ -1298,7 +1298,7 @@ ScTokenArray* ScTokenArray::Clone() const
{
pp = p->pCode = new FormulaToken*[ nLen ];
memcpy( pp, pCode, nLen * sizeof( ScToken* ) );
- for( USHORT i = 0; i < nLen; i++, pp++ )
+ for( sal_uInt16 i = 0; i < nLen; i++, pp++ )
{
*pp = (*pp)->Clone();
(*pp)->IncRef();
@@ -1308,14 +1308,14 @@ ScTokenArray* ScTokenArray::Clone() const
{
pp = p->pRPN = new FormulaToken*[ nRPN ];
memcpy( pp, pRPN, nRPN * sizeof( ScToken* ) );
- for( USHORT i = 0; i < nRPN; i++, pp++ )
+ for( sal_uInt16 i = 0; i < nRPN; i++, pp++ )
{
FormulaToken* t = *pp;
if( t->GetRef() > 1 )
{
FormulaToken** p2 = pCode;
- USHORT nIdx = 0xFFFF;
- for( USHORT j = 0; j < nLen; j++, p2++ )
+ sal_uInt16 nIdx = 0xFFFF;
+ for( sal_uInt16 j = 0; j < nLen; j++, p2++ )
{
if( *p2 == t )
{
@@ -1520,7 +1520,7 @@ FormulaToken* ScTokenArray::MergeArray( )
pCode[i] = NULL;
t->DecRef();
}
- nLen = USHORT( nStart );
+ nLen = sal_uInt16( nStart );
return AddMatrix( pArray );
}
@@ -1529,7 +1529,7 @@ FormulaToken* ScTokenArray::MergeRangeReference( const ScAddress & rPos )
{
if (!pCode || !nLen)
return NULL;
- USHORT nIdx = nLen;
+ sal_uInt16 nIdx = nLen;
FormulaToken *p1, *p2, *p3; // ref, ocRange, ref
// The actual types are checked in ExtendRangeReference().
if (((p3 = PeekPrev(nIdx)) != 0) &&
@@ -1598,7 +1598,7 @@ FormulaToken* ScTokenArray::AddColRowName( const ScSingleRefData& rRef )
return Add( new ScSingleRefToken( rRef, ocColRowName ) );
}
-BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
+sal_Bool ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
const ScAddress& rPos, ScDirection eDir )
{
SCCOL nCol = 0;
@@ -1609,40 +1609,40 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
if ( rPos.Row() < MAXROW )
nRow = (nExtend = rPos.Row()) + 1;
else
- return FALSE;
+ return false;
break;
case DIR_RIGHT :
if ( rPos.Col() < MAXCOL )
nCol = static_cast<SCCOL>(nExtend = rPos.Col()) + 1;
else
- return FALSE;
+ return false;
break;
case DIR_TOP :
if ( rPos.Row() > 0 )
nRow = (nExtend = rPos.Row()) - 1;
else
- return FALSE;
+ return false;
break;
case DIR_LEFT :
if ( rPos.Col() > 0 )
nCol = static_cast<SCCOL>(nExtend = rPos.Col()) - 1;
else
- return FALSE;
+ return false;
break;
default:
DBG_ERRORFILE( "unknown Direction" );
- return FALSE;
+ return false;
}
if ( pRPN && nRPN )
{
FormulaToken* t = pRPN[nRPN-1];
if ( t->GetType() == svByte )
{
- BYTE nParamCount = t->GetByte();
+ sal_uInt8 nParamCount = t->GetByte();
if ( nParamCount && nRPN > nParamCount )
{
- BOOL bRet = FALSE;
- USHORT nParam = nRPN - nParamCount - 1;
+ sal_Bool bRet = false;
+ sal_uInt16 nParam = nRPN - nParamCount - 1;
for ( ; nParam < nRPN-1; nParam++ )
{
FormulaToken* p = pRPN[nParam];
@@ -1659,7 +1659,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.nRow > nExtend )
{
nExtend = rRef.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_RIGHT :
@@ -1668,7 +1668,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
> nExtend )
{
nExtend = rRef.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_TOP :
@@ -1676,7 +1676,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.nRow < nExtend )
{
nExtend = rRef.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_LEFT :
@@ -1685,7 +1685,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
< nExtend )
{
nExtend = rRef.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
@@ -1702,7 +1702,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.Ref2.nRow > nExtend )
{
nExtend = rRef.Ref2.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_RIGHT :
@@ -1711,7 +1711,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
> nExtend )
{
nExtend = rRef.Ref2.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_TOP :
@@ -1719,7 +1719,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.Ref1.nRow < nExtend )
{
nExtend = rRef.Ref1.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_LEFT :
@@ -1728,7 +1728,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
< nExtend )
{
nExtend = rRef.Ref1.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
@@ -1744,14 +1744,14 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
}
}
}
- return FALSE;
+ return false;
}
void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos,
const ScAddress& rNewPos )
{
- for ( USHORT j=0; j<nLen; ++j )
+ for ( sal_uInt16 j=0; j<nLen; ++j )
{
switch ( pCode[j]->GetType() )
{
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 27eaede85175..90f30cd6774c 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -103,8 +103,8 @@ void ScUnitConverterData::BuildIndexString( String& rStr,
#define CFGSTR_UNIT_TO "ToUnit"
#define CFGSTR_UNIT_FACTOR "Factor"
-ScUnitConverter::ScUnitConverter( USHORT nInit, USHORT nDeltaP ) :
- ScStrCollection( nInit, nDeltaP, FALSE )
+ScUnitConverter::ScUnitConverter( sal_uInt16 nInit, sal_uInt16 nDeltaP ) :
+ ScStrCollection( nInit, nDeltaP, false )
{
// read from configuration - "convert.ini" is no longer used
//! config item as member to allow change of values
@@ -162,18 +162,18 @@ ScUnitConverter::ScUnitConverter( USHORT nInit, USHORT nDeltaP ) :
}
}
-BOOL ScUnitConverter::GetValue( double& fValue, const String& rFromUnit,
+sal_Bool ScUnitConverter::GetValue( double& fValue, const String& rFromUnit,
const String& rToUnit ) const
{
ScUnitConverterData aSearch( rFromUnit, rToUnit );
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( Search( &aSearch, nIndex ) )
{
fValue = ((const ScUnitConverterData*)(At( nIndex )))->GetValue();
- return TRUE;
+ return sal_True;
}
fValue = 1.0;
- return FALSE;
+ return false;
}
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index edbaf7aba3c0..6e96b85ee00c 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -50,12 +50,12 @@
void ScUserListData::InitTokens()
{
sal_Unicode cSep = ScGlobal::cListDelimiter;
- nTokenCount = (USHORT) aStr.GetTokenCount(cSep);
+ nTokenCount = (sal_uInt16) aStr.GetTokenCount(cSep);
if (nTokenCount)
{
pSubStrings = new String[nTokenCount];
pUpperSub = new String[nTokenCount];
- for (USHORT i=0; i<nTokenCount; i++)
+ for (sal_uInt16 i=0; i<nTokenCount; i++)
{
pUpperSub[i] = pSubStrings[i] = aStr.GetToken((xub_StrLen)i,cSep);
ScGlobal::pCharClass->toUpper(pUpperSub[i]);
@@ -93,19 +93,19 @@ void ScUserListData::SetString( const String& rStr )
InitTokens();
}
-USHORT ScUserListData::GetSubCount() const
+sal_uInt16 ScUserListData::GetSubCount() const
{
return nTokenCount;
}
-BOOL ScUserListData::GetSubIndex(const String& rSubStr, USHORT& rIndex) const
+sal_Bool ScUserListData::GetSubIndex(const String& rSubStr, sal_uInt16& rIndex) const
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<nTokenCount; i++)
if (rSubStr == pSubStrings[i])
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
String aUpStr = rSubStr;
@@ -114,13 +114,13 @@ BOOL ScUserListData::GetSubIndex(const String& rSubStr, USHORT& rIndex) const
if (aUpStr == pUpperSub[i])
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-String ScUserListData::GetSubStr(USHORT nIndex) const
+String ScUserListData::GetSubStr(sal_uInt16 nIndex) const
{
if (nIndex < nTokenCount)
return pSubStrings[nIndex];
@@ -130,10 +130,10 @@ String ScUserListData::GetSubStr(USHORT nIndex) const
StringCompare ScUserListData::Compare(const String& rSubStr1, const String& rSubStr2) const
{
- USHORT nIndex1;
- USHORT nIndex2;
- BOOL bFound1 = GetSubIndex(rSubStr1, nIndex1);
- BOOL bFound2 = GetSubIndex(rSubStr2, nIndex2);
+ sal_uInt16 nIndex1;
+ sal_uInt16 nIndex2;
+ sal_Bool bFound1 = GetSubIndex(rSubStr1, nIndex1);
+ sal_Bool bFound2 = GetSubIndex(rSubStr2, nIndex2);
if (bFound1)
{
if (bFound2)
@@ -156,10 +156,10 @@ StringCompare ScUserListData::Compare(const String& rSubStr1, const String& rSub
StringCompare ScUserListData::ICompare(const String& rSubStr1, const String& rSubStr2) const
{
- USHORT nIndex1;
- USHORT nIndex2;
- BOOL bFound1 = GetSubIndex(rSubStr1, nIndex1);
- BOOL bFound2 = GetSubIndex(rSubStr2, nIndex2);
+ sal_uInt16 nIndex1;
+ sal_uInt16 nIndex2;
+ sal_Bool bFound1 = GetSubIndex(rSubStr1, nIndex1);
+ sal_Bool bFound2 = GetSubIndex(rSubStr2, nIndex2);
if (bFound1)
{
if (bFound2)
@@ -180,7 +180,7 @@ StringCompare ScUserListData::ICompare(const String& rSubStr1, const String& rSu
return (StringCompare) ScGlobal::GetpTransliteration()->compareString( rSubStr1, rSubStr2 );
}
-ScUserList::ScUserList(USHORT nLim, USHORT nDel) :
+ScUserList::ScUserList(sal_uInt16 nLim, sal_uInt16 nDel) :
ScCollection ( nLim, nDel )
{
using namespace ::com::sun::star;
@@ -254,24 +254,24 @@ ScDataObject* ScUserList::Clone() const
ScUserListData* ScUserList::GetData(const String& rSubStr) const
{
- USHORT nIndex;
- USHORT i = 0;
+ sal_uInt16 nIndex;
+ sal_uInt16 i = 0;
for (i=0; i < nCount; i++)
if (((ScUserListData*)pItems[i])->GetSubIndex(rSubStr, nIndex))
return (ScUserListData*)pItems[i];
return NULL;
}
-BOOL ScUserList::operator==( const ScUserList& r ) const
+sal_Bool ScUserList::operator==( const ScUserList& r ) const
{
- BOOL bEqual = (nCount == r.nCount);
+ sal_Bool bEqual = (nCount == r.nCount);
if ( bEqual )
{
ScUserListData* pMyData = NULL;
ScUserListData* pOtherData = NULL;
- for ( USHORT i=0; i<nCount && bEqual; i++)
+ for ( sal_uInt16 i=0; i<nCount && bEqual; i++)
{
pMyData = (ScUserListData*)At(i);
pOtherData = (ScUserListData*)r.At(i);
@@ -285,15 +285,15 @@ BOOL ScUserList::operator==( const ScUserList& r ) const
}
-BOOL ScUserList::HasEntry( const String& rStr ) const
+sal_Bool ScUserList::HasEntry( const String& rStr ) const
{
- for ( USHORT i=0; i<nCount; i++)
+ for ( sal_uInt16 i=0; i<nCount; i++)
{
const ScUserListData* pMyData = (ScUserListData*) At(i);
if ( pMyData->aStr == rStr )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 618959958834..fdf8c8581d26 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -54,7 +54,7 @@ using ::rtl::OUString;
TYPEINIT1(ScTpViewItem, SfxPoolItem);
-#define SC_VERSION ((USHORT)302)
+#define SC_VERSION ((sal_uInt16)302)
//========================================================================
@@ -153,7 +153,7 @@ void ScViewOptions::SetDefaults()
aOptArr[ VOPT_FORMULAS ] =
aOptArr[ VOPT_SYNTAX ] =
aOptArr[ VOPT_HELPLINES ] =
- aOptArr[ VOPT_BIGHANDLES ] = FALSE;
+ aOptArr[ VOPT_BIGHANDLES ] = false;
aOptArr[ VOPT_NOTES ] =
aOptArr[ VOPT_NULLVALS ] =
aOptArr[ VOPT_VSCROLL ] =
@@ -165,7 +165,7 @@ void ScViewOptions::SetDefaults()
aOptArr[ VOPT_ANCHOR ] =
aOptArr[ VOPT_PAGEBREAKS ] =
aOptArr[ VOPT_SOLIDHANDLES] =
- aOptArr[ VOPT_CLIPMARKS ] = TRUE;
+ aOptArr[ VOPT_CLIPMARKS ] = sal_True;
aModeArr[VOBJ_TYPE_OLE ] =
aModeArr[VOBJ_TYPE_CHART] =
@@ -191,7 +191,7 @@ Color ScViewOptions::GetGridColor( String* pStrName ) const
const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy )
{
- USHORT i;
+ sal_uInt16 i;
for ( i=0; i<MAX_OPT; i++ ) aOptArr [i] = rCpy.aOptArr[i];
for ( i=0; i<MAX_TYPE; i++ ) aModeArr[i] = rCpy.aModeArr[i];
@@ -207,8 +207,8 @@ const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy )
int ScViewOptions::operator==( const ScViewOptions& rOpt ) const
{
- BOOL bEqual = TRUE;
- USHORT i;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16 i;
for ( i=0; i<MAX_OPT && bEqual; i++ ) bEqual = (aOptArr [i] == rOpt.aOptArr[i]);
for ( i=0; i<MAX_TYPE && bEqual; i++ ) bEqual = (aModeArr[i] == rOpt.aModeArr[i]);
@@ -222,7 +222,7 @@ int ScViewOptions::operator==( const ScViewOptions& rOpt ) const
//------------------------------------------------------------------------
-SvxGridItem* ScViewOptions::CreateGridItem( USHORT nId /* = SID_ATTR_GRID_OPTIONS */ ) const
+SvxGridItem* ScViewOptions::CreateGridItem( sal_uInt16 nId /* = SID_ATTR_GRID_OPTIONS */ ) const
{
SvxGridItem* pItem = new SvxGridItem( nId );
@@ -246,7 +246,7 @@ SvxGridItem* ScViewOptions::CreateGridItem( USHORT nId /* = SID_ATTR_GRID_OPTION
//------------------------------------------------------------------------
-ScTpViewItem::ScTpViewItem( USHORT nWhichP, const ScViewOptions& rOpt )
+ScTpViewItem::ScTpViewItem( sal_uInt16 nWhichP, const ScViewOptions& rOpt )
: SfxPoolItem ( nWhichP ),
theOptions ( rOpt )
{
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index b1df1c384b77..9fd1b6f9ed36 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -55,7 +55,7 @@ ScNumFormatAbbrev::ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat) :
{
}
-ScNumFormatAbbrev::ScNumFormatAbbrev(ULONG nFormat,
+ScNumFormatAbbrev::ScNumFormatAbbrev(sal_uLong nFormat,
SvNumberFormatter& rFormatter)
{
PutFormatIndex(nFormat, rFormatter);
@@ -63,7 +63,7 @@ ScNumFormatAbbrev::ScNumFormatAbbrev(ULONG nFormat,
void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet )
{
- USHORT nSysLang, nLang;
+ sal_uInt16 nSysLang, nLang;
rStream.ReadByteString( sFormatstring, eByteStrSet );
rStream >> nSysLang >> nLang;
eLnge = (LanguageType) nLang;
@@ -75,10 +75,10 @@ void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet )
void ScNumFormatAbbrev::Save( SvStream& rStream, CharSet eByteStrSet ) const
{
rStream.WriteByteString( sFormatstring, eByteStrSet );
- rStream << (USHORT) eSysLnge << (USHORT) eLnge;
+ rStream << (sal_uInt16) eSysLnge << (sal_uInt16) eLnge;
}
-void ScNumFormatAbbrev::PutFormatIndex(ULONG nFormat,
+void ScNumFormatAbbrev::PutFormatIndex(sal_uLong nFormat,
SvNumberFormatter& rFormatter)
{
const SvNumberformat* pFormat = rFormatter.GetEntry(nFormat);
@@ -97,10 +97,10 @@ void ScNumFormatAbbrev::PutFormatIndex(ULONG nFormat,
}
}
-ULONG ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter)
+sal_uLong ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter)
{
short nType;
- BOOL bNewInserted;
+ sal_Bool bNewInserted;
xub_StrLen nCheckPos;
return rFormatter.GetIndexPuttingAndConverting( sFormatstring, eLnge,
eSysLnge, nType, bNewInserted, nCheckPos);
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 0a04d2ca7d6f..9ebf05f31080 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -48,7 +48,7 @@
#include "ftools.hxx"
FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* pDoc,
- const ScAddress& rOutPos, const CharSet eNach, UINT32 nDifOption )
+ const ScAddress& rOutPos, const CharSet eNach, sal_uInt32 nDifOption )
{
SCCOL nEndCol;
SCROW nEndRow;
@@ -63,7 +63,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* p
FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc,
- const ScRange&rRange, const CharSet eCharSet, UINT32 nDifOption )
+ const ScRange&rRange, const CharSet eCharSet, sal_uInt32 nDifOption )
{
DBG_ASSERT( rRange.aStart <= rRange.aEnd, "*ScExportDif(): Range unsortiert!" );
DBG_ASSERTWARNING( rRange.aStart.Tab() == rRange.aEnd.Tab(),
@@ -76,11 +76,11 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
sal_Unicode cStrDelim('"');
ByteString aStrDelimEncoded; // only used if not Unicode
UniString aStrDelimDecoded; // only used if context encoding
- BOOL bContextOrNotAsciiEncoding;
+ sal_Bool bContextOrNotAsciiEncoding;
if ( eCharSet == RTL_TEXTENCODING_UNICODE )
{
rOut.StartWritingUnicodeText();
- bContextOrNotAsciiEncoding = FALSE;
+ bContextOrNotAsciiEncoding = false;
}
else
{
@@ -96,7 +96,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
aStrDelimDecoded = String( aStrDelimEncoded, eCharSet );
}
else
- bContextOrNotAsciiEncoding = FALSE;
+ bContextOrNotAsciiEncoding = false;
}
const sal_Char* p2DoubleQuotes_LF = "\"\"\n";
@@ -117,7 +117,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
double fVal;
- const BOOL bPlain = ( nDifOption == SC_DIFOPT_PLAIN );
+ const sal_Bool bPlain = ( nDifOption == SC_DIFOPT_PLAIN );
ScProgress aPrgrsBar( pDoc->GetDocumentShell(), ScGlobal::GetRscString( STR_LOAD_DOC ), nNumRows );
@@ -185,7 +185,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
fVal = ( ( ScValueCell * ) pAkt )->GetValue();
aOS += String( ::rtl::math::doubleToUString(
fVal, rtl_math_StringFormat_G, 14, '.',
- TRUE));
+ sal_True));
}
else
{
@@ -213,7 +213,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
fVal = ( ( ScFormulaCell * ) pAkt )->GetValue();
aOS += String( ::rtl::math::doubleToUString(
fVal, rtl_math_StringFormat_G, 14,
- '.', TRUE));
+ '.', sal_True));
}
else
{
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 8f87d50cf826..18d0c532fff9 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -61,20 +61,20 @@ const sal_Unicode pKey1_0[] = { '1', ',', '0', 0 };
FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, const ScAddress& rInsPos,
- const CharSet eVon, UINT32 nDifOption )
+ const CharSet eVon, sal_uInt32 nDifOption )
{
DifParser aDifParser( rIn, nDifOption, *pDoc, eVon );
- const BOOL bPlain = aDifParser.IsPlain();
+ const sal_Bool bPlain = aDifParser.IsPlain();
SCTAB nBaseTab = rInsPos.Tab();
TOPIC eTopic = T_UNKNOWN;
- BOOL bSyntErrWarn = FALSE;
- BOOL bOverflowWarn = FALSE;
+ sal_Bool bSyntErrWarn = false;
+ sal_Bool bOverflowWarn = false;
String& rData = aDifParser.aData;
- BOOL bData = FALSE;
+ sal_Bool bData = false;
rIn.Seek( 0 );
@@ -93,7 +93,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
case T_TABLE:
{
if( aDifParser.nVector != 0 || aDifParser.nVal != 1 )
- bSyntErrWarn = TRUE;
+ bSyntErrWarn = sal_True;
if( bData )
pDoc->RenameTab( nBaseTab, rData );
}
@@ -101,19 +101,19 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
case T_VECTORS:
{
if( aDifParser.nVector != 0 )
- bSyntErrWarn = TRUE;
+ bSyntErrWarn = true;
}
break;
case T_TUPLES:
{
if( aDifParser.nVector != 0 )
- bSyntErrWarn = TRUE;
+ bSyntErrWarn = true;
}
break;
case T_DATA:
{
if( aDifParser.nVector != 0 || aDifParser.nVal != 0 )
- bSyntErrWarn = TRUE;
+ bSyntErrWarn = sal_True;
}
break;
case T_LABEL:
@@ -193,10 +193,10 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
pCell = new ScStringCell( aTmp );
}
- pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, pCell, ( BOOL ) TRUE );
+ pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, pCell, ( sal_Bool ) sal_True );
}
else
- bOverflowWarn = TRUE;
+ bOverflowWarn = sal_True;
nColCnt++;
break;
@@ -209,11 +209,11 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
if( rData.Len() > 0 )
{
pDoc->PutCell( nColCnt, nRowCnt, nBaseTab,
- ScBaseCell::CreateTextCell( rData, pDoc ), ( BOOL ) TRUE );
+ ScBaseCell::CreateTextCell( rData, pDoc ), ( sal_Bool ) sal_True );
}
}
else
- bOverflowWarn = TRUE;
+ bOverflowWarn = sal_True;
nColCnt++;
break;
@@ -243,7 +243,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
}
-DifParser::DifParser( SvStream& rNewIn, const UINT32 nOption, ScDocument& rDoc, CharSet e ) :
+DifParser::DifParser( SvStream& rNewIn, const sal_uInt32 nOption, ScDocument& rDoc, CharSet e ) :
rIn( rNewIn )
{
eCharSet = e;
@@ -252,8 +252,7 @@ DifParser::DifParser( SvStream& rNewIn, const UINT32 nOption, ScDocument& rDoc,
DBG_ERRORFILE( "CharSet passed overrides and modifies StreamCharSet" );
rIn.SetStreamCharSet( eCharSet );
}
- if ( eCharSet == RTL_TEXTENCODING_UNICODE )
- rIn.StartReadingUnicodeText();
+ rIn.StartReadingUnicodeText( eCharSet );
bPlain = ( nOption == SC_DIFOPT_PLAIN );
@@ -335,8 +334,8 @@ TOPIC DifParser::GetNextTopic( void )
case S_START:
{
const sal_Unicode* pRef;
- UINT16 nCnt = 0;
- BOOL bSearch = TRUE;
+ sal_uInt16 nCnt = 0;
+ sal_Bool bSearch = sal_True;
pRef = ppKeys[ nCnt ];
@@ -345,14 +344,14 @@ TOPIC DifParser::GetNextTopic( void )
if( aLine == pRef )
{
eRet = pTopics[ nCnt ];
- bSearch = FALSE;
+ bSearch = false;
}
else
{
nCnt++;
pRef = ppKeys[ nCnt ];
if( !*pRef )
- bSearch = FALSE;
+ bSearch = false;
}
}
@@ -616,7 +615,7 @@ DATASET DifParser::GetNextDataset( void )
}
-const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRet )
+const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, sal_uInt32& rRet )
{
// eat leading whitespace, not specified, but seen in the wild
while (*pStart == ' ' || *pStart == '\t')
@@ -625,7 +624,7 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRe
sal_Unicode cAkt = *pStart;
if( IsNumber( cAkt ) )
- rRet = ( UINT32 ) ( cAkt - '0' );
+ rRet = ( sal_uInt32 ) ( cAkt - '0' );
else
return NULL;
@@ -635,7 +634,7 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRe
while( IsNumber( cAkt ) && rRet < ( 0xFFFFFFFF / 10 ) )
{
rRet *= 10;
- rRet += ( UINT32 ) ( cAkt - '0' );
+ rRet += ( sal_uInt32 ) ( cAkt - '0' );
pStart++;
cAkt = *pStart;
@@ -645,18 +644,18 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRe
}
-BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart )
+sal_Bool DifParser::ScanFloatVal( const sal_Unicode* pStart )
{
double fNewVal = 0.0;
- BOOL bNeg = FALSE;
+ sal_Bool bNeg = false;
double fFracPos = 1.0;
- INT32 nExp = 0;
- BOOL bExpNeg = FALSE;
- BOOL bExpOverflow = FALSE;
- static const UINT16 nExpLimit = 4096; // ACHTUNG: muss genauer ermittelt werden!
+ sal_Int32 nExp = 0;
+ sal_Bool bExpNeg = false;
+ sal_Bool bExpOverflow = false;
+ static const sal_uInt16 nExpLimit = 4096; // ACHTUNG: muss genauer ermittelt werden!
sal_Unicode cAkt;
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
enum STATE { S_FIRST, S_PRE, S_POST, S_EXP_FIRST, S_EXP, S_END, S_FINDEND };
@@ -717,7 +716,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart )
eS = S_EXP;
break;
case 0x00: // IsNumberEnding( cAkt )
- bRet = TRUE; // no
+ bRet = sal_True; // no
default: // break!
eS = S_END;
}
@@ -738,7 +737,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart )
eS = S_EXP_FIRST;
break;
case 0x00: // IsNumberEnding( cAkt )
- bRet = TRUE; // no
+ bRet = sal_True; // no
default: // break!
eS = S_END;
}
@@ -750,7 +749,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart )
if( nExp < nExpLimit )
{
nExp *= 10;
- nExp += ( UINT16 ) ( cAkt - '0' );
+ nExp += ( sal_uInt16 ) ( cAkt - '0' );
}
eS = S_EXP;
}
@@ -774,11 +773,11 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart )
if( nExp < ( 0xFFFF / 10 ) )
{
nExp *= 10;
- nExp += ( UINT16 ) ( cAkt - '0' );
+ nExp += ( sal_uInt16 ) ( cAkt - '0' );
}
else
{
- bExpOverflow = TRUE;
+ bExpOverflow = sal_True;
eS = S_FINDEND;
}
}
@@ -791,7 +790,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart )
case S_FINDEND:
if( IsNumberEnding( cAkt ) )
{
- bRet = TRUE; // damit sinnvoll weitergeparst werden kann
+ bRet = sal_True; // damit sinnvoll weitergeparst werden kann
eS = S_END;
}
break;
@@ -807,7 +806,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart )
if( bRet )
{
if( bExpOverflow )
- return sal_False; // ACHTUNG: hier muss noch differenziert werden
+ return false; // ACHTUNG: hier muss noch differenziert werden
if( bNeg )
fNewVal *= 1.0;
@@ -853,7 +852,7 @@ void DifColumn::SetLogical( SCROW nRow )
}
-void DifColumn::SetNumFormat( SCROW nRow, const UINT32 nNumFormat )
+void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat )
{
DBG_ASSERT( ValidRow(nRow), "*DifColumn::SetNumFormat(): Row zu gross!" );
@@ -879,7 +878,7 @@ void DifColumn::SetNumFormat( SCROW nRow, const UINT32 nNumFormat )
}
-void DifColumn::NewEntry( const SCROW nPos, const UINT32 nNumFormat )
+void DifColumn::NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat )
{
pAkt = new ENTRY;
pAkt->nStart = pAkt->nEnd = nPos;
@@ -915,7 +914,7 @@ void DifColumn::Apply( ScDocument& rDoc, const SCCOL nCol, const SCTAB nTab )
}
-DifAttrCache::DifAttrCache( const BOOL bNewPlain )
+DifAttrCache::DifAttrCache( const sal_Bool bNewPlain )
{
bPlain = bNewPlain;
ppCols = new DifColumn *[ MAXCOL + 1 ];
@@ -944,7 +943,7 @@ void DifAttrCache::SetLogical( const SCCOL nCol, const SCROW nRow )
ppCols[ nCol ]->SetLogical( nRow );
}
-void DifAttrCache::SetNumFormat( const SCCOL nCol, const SCROW nRow, const UINT32 nNumFormat )
+void DifAttrCache::SetNumFormat( const SCCOL nCol, const SCROW nRow, const sal_uInt32 nNumFormat )
{
DBG_ASSERT( ValidCol(nCol), "-DifAttrCache::SetNumFormat(): Col zu gross!" );
DBG_ASSERT( !bPlain, "*DifAttrCache::SetNumFormat(): sollte nicht Plain sein!" );
diff --git a/sc/source/filter/excel/colrowst.cxx b/sc/source/filter/excel/colrowst.cxx
index 363e522092f4..17270c14fc00 100644
--- a/sc/source/filter/excel/colrowst.cxx
+++ b/sc/source/filter/excel/colrowst.cxx
@@ -303,7 +303,7 @@ void XclImpColRowSettings::ConvertHiddenFlags( SCTAB nScTab )
// hide the columns
for( SCCOL nScCol = 0; nScCol <= MAXCOL; ++nScCol )
if( ::get_flag( maColFlags[ nScCol ], EXC_COLROW_HIDDEN ) )
- rDoc.ShowCol( nScCol, nScTab, FALSE );
+ rDoc.ShowCol( nScCol, nScTab, false );
// #i38093# rows hidden by filter need extra flag
SCROW nFirstFilterScRow = SCROW_MAX;
@@ -358,7 +358,7 @@ void XclImpColRowSettings::ConvertHiddenFlags( SCTAB nScTab )
// #i47438# if default row format is hidden, hide remaining rows
if( ::get_flag( mnDefRowFlags, EXC_DEFROW_HIDDEN ) && (mnLastScRow < MAXROW) )
- rDoc.ShowRows( mnLastScRow + 1, MAXROW, nScTab, FALSE );
+ rDoc.ShowRows( mnLastScRow + 1, MAXROW, nScTab, false );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 6bd9a1388513..1b2491ae15dd 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -194,8 +194,8 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
SCTAB nC;
String aTmpString;
SCTAB nScTabCount = rTabInfo.GetScTabCount();
- UINT16 nExcTabCount = rTabInfo.GetXclTabCount();
- UINT16 nCodenames = static_cast< UINT16 >( GetExtDocOptions().GetCodeNameCount() );
+ sal_uInt16 nExcTabCount = rTabInfo.GetXclTabCount();
+ sal_uInt16 nCodenames = static_cast< sal_uInt16 >( GetExtDocOptions().GetCodeNameCount() );
SfxObjectShell* pShell = GetDocShell();
sal_uInt16 nWriteProtHash = pShell ? pShell->GetModifyPasswordHash() : 0;
@@ -219,7 +219,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
else
{
if( IsDocumentEncrypted() )
- Add( new XclExpFilePass( GetRoot() ) );
+ Add( new XclExpFileEncryption( GetRoot() ) );
Add( new XclExpInterfaceHdr( nCodePage ) );
Add( new XclExpUInt16Record( EXC_ID_MMS, 0 ) );
Add( new XclExpInterfaceEnd );
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index c0012c5519f7..4bd3654caa64 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -32,6 +32,8 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/app.hxx>
+#include <sfx2/frame.hxx>
+#include <sfx2/request.hxx>
#include <sot/storage.hxx>
#include <sot/exchange.hxx>
#include <tools/globname.hxx>
@@ -93,17 +95,24 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
aArgs[ 0 ] <<= getProcessServiceFactory();
aArgs[ 1 ] <<= aArgSeq;
uno::Reference< document::XImporter > xImporter( ScfApiHelper::CreateInstanceWithArgs(
- CREATE_OUSTRING( "com.sun.star.comp.oox.ExcelBiffFilter" ), aArgs ), uno::UNO_QUERY_THROW );
+ CREATE_OUSTRING( "com.sun.star.comp.oox.xls.ExcelBiffFilter" ), aArgs ), uno::UNO_QUERY_THROW );
xImporter->setTargetDocument( xComponent );
MediaDescriptor aMediaDesc;
SfxItemSet* pItemSet = rMedium.GetItemSet();
if( pItemSet )
{
- if( const SfxStringItem* pItem = static_cast< const SfxStringItem* >( pItemSet->GetItem( SID_FILE_NAME ) ) )
- aMediaDesc[ MediaDescriptor::PROP_URL() ] <<= ::rtl::OUString( pItem->GetValue() );
- if( const SfxStringItem* pItem = static_cast< const SfxStringItem* >( pItemSet->GetItem( SID_PASSWORD ) ) )
- aMediaDesc[ MediaDescriptor::PROP_PASSWORD() ] <<= ::rtl::OUString( pItem->GetValue() );
+ SFX_ITEMSET_ARG( pItemSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, false);
+ if( pFileNameItem )
+ aMediaDesc[ MediaDescriptor::PROP_URL() ] <<= ::rtl::OUString( pFileNameItem->GetValue() );
+
+ SFX_ITEMSET_ARG( pItemSet, pPasswordItem, SfxStringItem, SID_PASSWORD, false);
+ if( pPasswordItem )
+ aMediaDesc[ MediaDescriptor::PROP_PASSWORD() ] <<= ::rtl::OUString( pPasswordItem->GetValue() );
+
+ SFX_ITEMSET_ARG( pItemSet, pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false);
+ if( pEncryptionDataItem )
+ aMediaDesc[ MediaDescriptor::PROP_ENCRYPTIONDATA() ] = pEncryptionDataItem->GetValue();
}
aMediaDesc[ MediaDescriptor::PROP_INPUTSTREAM() ] <<= rMedium.GetInputStream();
aMediaDesc[ MediaDescriptor::PROP_INTERACTIONHANDLER() ] <<= rMedium.GetInteractionHandler();
@@ -136,7 +145,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
SotStorageStreamRef xStrgStrm;
if( SotStorage::IsStorageFile( pMedStrm ) )
{
- xRootStrg = new SotStorage( pMedStrm, FALSE );
+ xRootStrg = new SotStorage( pMedStrm, false );
if( xRootStrg->GetError() )
xRootStrg = 0;
}
@@ -209,10 +218,10 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument,
- SvStream* pMedStrm, BOOL bBiff8, CharSet eNach )
+ SvStream* pMedStrm, sal_Bool bBiff8, CharSet eNach )
{
// try to open an OLE storage
- SotStorageRef xRootStrg = new SotStorage( pMedStrm, FALSE );
+ SotStorageRef xRootStrg = new SotStorage( pMedStrm, false );
if( xRootStrg->GetError() ) return eERR_OPEN;
// create BIFF dependent strings
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index c9cb9ccb301f..ff3c3e118f9f 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -46,8 +46,8 @@
using ::std::vector;
-const UINT16 ExcelToSc::nRowMask = 0x3FFF;
-const UINT16 ExcelToSc::nLastInd = 399;
+const sal_uInt16 ExcelToSc::nRowMask = 0x3FFF;
+const sal_uInt16 ExcelToSc::nLastInd = 399;
@@ -55,16 +55,16 @@ const UINT16 ExcelToSc::nLastInd = 399;
void ImportExcel::Formula25()
{
XclAddress aXclPos;
- UINT16 nXF = 0, nFormLen;
+ sal_uInt16 nXF = 0, nFormLen;
double fCurVal;
- BYTE nFlag0;
- BOOL bShrFmla;
+ sal_uInt8 nFlag0;
+ sal_Bool bShrFmla;
aIn >> aXclPos;
if( GetBiff() == EXC_BIFF2 )
{// BIFF2
- BYTE nDummy;
+ sal_uInt8 nDummy;
aIn.Ignore( 3 );
@@ -72,7 +72,7 @@ void ImportExcel::Formula25()
aIn.Ignore( 1 );
aIn >> nDummy;
nFormLen = nDummy;
- bShrFmla = FALSE;
+ bShrFmla = false;
}
else
{// BIFF5
@@ -99,9 +99,9 @@ void ImportExcel::Formula3()
void ImportExcel::Formula4()
{
XclAddress aXclPos;
- UINT16 nXF, nFormLen;
+ sal_uInt16 nXF, nFormLen;
double fCurVal;
- BYTE nFlag0;
+ sal_uInt8 nFlag0;
aIn >> aXclPos >> nXF >> fCurVal >> nFlag0;
aIn.Ignore( 1 );
@@ -109,12 +109,12 @@ void ImportExcel::Formula4()
nLastXF = nXF;
- Formula( aXclPos, nXF, nFormLen, fCurVal, FALSE );
+ Formula( aXclPos, nXF, nFormLen, fCurVal, false );
}
void ImportExcel::Formula( const XclAddress& rXclPos,
- UINT16 nXF, UINT16 nFormLen, double& rCurVal, BOOL bShrFmla )
+ sal_uInt16 nXF, sal_uInt16 nFormLen, double& rCurVal, sal_Bool bShrFmla )
{
ConvErr eErr = ConvOK;
@@ -123,14 +123,14 @@ void ImportExcel::Formula( const XclAddress& rXclPos,
{
// jetzt steht Lesemarke auf Formel, Laenge in nFormLen
const ScTokenArray* pErgebnis = 0;
- BOOL bConvert;
+ sal_Bool bConvert;
pFormConv->Reset( aScPos );
if( bShrFmla )
bConvert = !pFormConv->GetShrFmla( pErgebnis, maStrm, nFormLen );
else
- bConvert = TRUE;
+ bConvert = sal_True;
if( bConvert )
eErr = pFormConv->Convert( pErgebnis, maStrm, nFormLen, true, FT_CellFormula);
@@ -140,7 +140,7 @@ void ImportExcel::Formula( const XclAddress& rXclPos,
if( pErgebnis )
{
pZelle = new ScFormulaCell( pD, aScPos, pErgebnis );
- pD->PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pZelle, (BOOL)TRUE );
+ pD->PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pZelle, (sal_Bool)sal_True );
}
else
{
@@ -196,23 +196,23 @@ void ExcelToSc::GetDummy( const ScTokenArray*& pErgebnis )
ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, sal_Size nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
{
RootData& rR = GetOldRoot();
- BYTE nOp, nLen, nByte;
- UINT16 nUINT16;
- INT16 nINT16;
+ sal_uInt8 nOp, nLen, nByte;
+ sal_uInt16 nUINT16;
+ sal_Int16 nINT16;
double fDouble;
String aString;
- BOOL bError = FALSE;
- BOOL bArrayFormula = FALSE;
+ sal_Bool bError = false;
+ sal_Bool bArrayFormula = false;
TokenId nMerk0;
- const BOOL bRangeName = eFT == FT_RangeName;
- const BOOL bSharedFormula = eFT == FT_SharedFormula;
- const BOOL bRNorSF = bRangeName || bSharedFormula;
+ const sal_Bool bRangeName = eFT == FT_RangeName;
+ const sal_Bool bSharedFormula = eFT == FT_SharedFormula;
+ const sal_Bool bRNorSF = bRangeName || bSharedFormula;
ScSingleRefData aSRD;
ScComplexRefData aCRD;
ExtensionTypeVec aExtensions;
- bExternName = FALSE;
+ bExternName = false;
if( eStatus != ConvOK )
{
@@ -250,7 +250,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
aIn.Ignore( nUINT16 );
- bArrayFormula = TRUE;
+ bArrayFormula = sal_True;
break;
case 0x03: // Addition [312 264]
aStack >> nMerk0;
@@ -368,8 +368,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
break;
case 0x19: // Special Attribute [327 279]
{
- UINT16 nData, nFakt;
- BYTE nOpt;
+ sal_uInt16 nData, nFakt;
+ sal_uInt8 nOpt;
aIn >> nOpt;
@@ -535,7 +535,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
aSRD.nCol = static_cast<SCsCOL>(nByte);
aSRD.nRow = nUINT16 & 0x3FFF;
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel( nUINT16, nByte, aSRD, bRangeName );
@@ -546,8 +546,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x6A:
case 0x2A: // Deleted Cell Reference [323 273]
// no information which part is deleted, set both
- aSRD.SetColDeleted( TRUE );
- aSRD.SetRowDeleted( TRUE );
+ aSRD.SetColDeleted( sal_True );
+ aSRD.SetRowDeleted( sal_True );
}
aStack << aPool.Store( aSRD );
@@ -559,16 +559,16 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x6B:
case 0x2B: // Deleted Area Refernce [323 273]
{
- UINT16 nRowFirst, nRowLast;
- UINT8 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt8 nColFirst, nColLast;
ScSingleRefData& rSRef1 = aCRD.Ref1;
ScSingleRefData& rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
rSRef1.nRelTab = rSRef2.nRelTab = 0;
- rSRef1.SetTabRel( TRUE );
- rSRef2.SetTabRel( TRUE );
+ rSRef1.SetTabRel( sal_True );
+ rSRef2.SetTabRel( sal_True );
rSRef1.SetFlag3D( bRangeName );
rSRef2.SetFlag3D( bRangeName );
@@ -586,10 +586,10 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x6B:
case 0x2B: // Deleted Area Refernce [323 273]
// no information which part is deleted, set all
- rSRef1.SetColDeleted( TRUE );
- rSRef1.SetRowDeleted( TRUE );
- rSRef2.SetColDeleted( TRUE );
- rSRef2.SetRowDeleted( TRUE );
+ rSRef1.SetColDeleted( sal_True );
+ rSRef1.SetRowDeleted( sal_True );
+ rSRef2.SetColDeleted( sal_True );
+ rSRef2.SetRowDeleted( sal_True );
}
aStack << aPool.Store( aCRD );
@@ -617,7 +617,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
aIn >> nUINT16 >> nByte; // >> Attribute, Row >> Col
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel( nUINT16, nByte, aSRD, bRNorSF );
@@ -629,12 +629,12 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x6D:
case 0x2D: // Area Reference Within a Name [324 ]
{ // Area Reference Within a Shared Formula[ 274]
- UINT16 nRowFirst, nRowLast;
- UINT8 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt8 nColFirst, nColLast;
aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0;
- aCRD.Ref1.SetTabRel( TRUE );
- aCRD.Ref2.SetTabRel( TRUE );
+ aCRD.Ref1.SetTabRel( sal_True );
+ aCRD.Ref2.SetTabRel( sal_True );
aCRD.Ref1.SetFlag3D( bRangeName );
aCRD.Ref2.SetFlag3D( bRangeName );
@@ -682,12 +682,12 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
{
const ExtName* pExtName = rR.pExtNameBuff->GetNameByIndex( nINT16, nUINT16 );
if( pExtName && pExtName->IsDDE() &&
- rR.pExtSheetBuff->IsLink( ( UINT16 ) nINT16 ) )
+ rR.pExtSheetBuff->IsLink( ( sal_uInt16 ) nINT16 ) )
{
String aAppl, aExtDoc;
TokenId nPar1, nPar2;
- rR.pExtSheetBuff->GetLink( ( UINT16 ) nINT16 , aAppl, aExtDoc );
+ rR.pExtSheetBuff->GetLink( ( sal_uInt16 ) nINT16 , aAppl, aExtDoc );
nPar1 = aPool.Store( aAppl );
nPar2 = aPool.Store( aExtDoc );
nMerk0 = aPool.Store( pExtName->aName );
@@ -712,9 +712,9 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x7C:
case 0x3C: // Deleted 3-D Cell Reference [ 277]
{
- UINT16 nTabFirst, nTabLast, nRow;
- INT16 nExtSheet;
- BYTE nCol;
+ sal_uInt16 nTabFirst, nTabLast, nRow;
+ sal_Int16 nExtSheet;
+ sal_uInt8 nCol;
aIn >> nExtSheet;
aIn.Ignore( 8 );
@@ -738,8 +738,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
if( nExtSheet <= 0 )
{ // in aktuellem Workbook
aSRD.nTab = static_cast<SCTAB>(nTabFirst);
- aSRD.SetFlag3D( TRUE );
- aSRD.SetTabRel( FALSE );
+ aSRD.SetFlag3D( sal_True );
+ aSRD.SetTabRel( false );
ExcRelToScRel( nRow, nCol, aSRD, bRangeName );
@@ -749,11 +749,11 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x7C:
case 0x3C: // Deleted 3-D Cell Reference [ 277]
// no information which part is deleted, set both
- aSRD.SetColDeleted( TRUE );
- aSRD.SetRowDeleted( TRUE );
+ aSRD.SetColDeleted( sal_True );
+ aSRD.SetRowDeleted( sal_True );
}
if ( !ValidTab(static_cast<SCTAB>(nTabFirst)) )
- aSRD.SetTabDeleted( TRUE );
+ aSRD.SetTabDeleted( sal_True );
if( nTabLast != nTabFirst )
{
@@ -775,9 +775,9 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x7D:
case 0x3D: // Deleted 3-D Area Reference [ 277]
{
- UINT16 nTabFirst, nTabLast, nRowFirst, nRowLast;
- INT16 nExtSheet;
- BYTE nColFirst, nColLast;
+ sal_uInt16 nTabFirst, nTabLast, nRowFirst, nRowLast;
+ sal_Int16 nExtSheet;
+ sal_uInt8 nColFirst, nColLast;
aIn >> nExtSheet;
aIn.Ignore( 8 );
@@ -808,10 +808,10 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
rR1.nTab = static_cast<SCTAB>(nTabFirst);
rR2.nTab = static_cast<SCTAB>(nTabLast);
- rR1.SetFlag3D( TRUE );
- rR1.SetTabRel( FALSE );
+ rR1.SetFlag3D( sal_True );
+ rR1.SetTabRel( false );
rR2.SetFlag3D( nTabFirst != nTabLast );
- rR2.SetTabRel( FALSE );
+ rR2.SetTabRel( false );
ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName );
ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName );
@@ -827,21 +827,21 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x7D:
case 0x3D: // Deleted 3-D Area Reference [ 277]
// no information which part is deleted, set all
- rR1.SetColDeleted( TRUE );
- rR1.SetRowDeleted( TRUE );
- rR2.SetColDeleted( TRUE );
- rR2.SetRowDeleted( TRUE );
+ rR1.SetColDeleted( sal_True );
+ rR1.SetRowDeleted( sal_True );
+ rR2.SetColDeleted( sal_True );
+ rR2.SetRowDeleted( sal_True );
}
if ( !ValidTab(static_cast<SCTAB>(nTabFirst)) )
- rR1.SetTabDeleted( TRUE );
+ rR1.SetTabDeleted( sal_True );
if ( !ValidTab(static_cast<SCTAB>(nTabLast)) )
- rR2.SetTabDeleted( TRUE );
+ rR2.SetTabDeleted( sal_True );
aStack << aPool.Store( aCRD );
}//ENDE in aktuellem Workbook
}
break;
- default: bError = TRUE;
+ default: bError = sal_True;
}
bError |= !aIn.IsValid();
}
@@ -892,21 +892,21 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
SCsTAB nTab, const FORMULA_TYPE eFT )
{
RootData& rR = GetOldRoot();
- BYTE nOp, nLen;
+ sal_uInt8 nOp, nLen;
sal_Size nIgnore;
- UINT16 nUINT16;
- UINT8 nByte;
- BOOL bError = FALSE;
- BOOL bArrayFormula = FALSE;
- const BOOL bRangeName = eFT == FT_RangeName;
- const BOOL bSharedFormula = eFT == FT_SharedFormula;
- const BOOL bRNorSF = bRangeName || bSharedFormula;
+ sal_uInt16 nUINT16;
+ sal_uInt8 nByte;
+ sal_Bool bError = false;
+ sal_Bool bArrayFormula = false;
+ const sal_Bool bRangeName = eFT == FT_RangeName;
+ const sal_Bool bSharedFormula = eFT == FT_SharedFormula;
+ const sal_Bool bRNorSF = bRangeName || bSharedFormula;
ScSingleRefData aSRD;
ScComplexRefData aCRD;
aCRD.Ref1.nTab = aCRD.Ref2.nTab = aEingPos.Tab();
- bExternName = FALSE;
+ bExternName = false;
if( eStatus != ConvOK )
{
@@ -933,7 +933,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
case 0x01: // Array Formula [325 ]
// Array Formula or Shared Formula [ 277]
nIgnore = (meBiff == EXC_BIFF2) ? 3 : 4;
- bArrayFormula = TRUE;
+ bArrayFormula = sal_True;
break;
case 0x02: // Data Table [325 277]
nIgnore = (meBiff == EXC_BIFF2) ? 3 : 4;
@@ -965,8 +965,8 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
break;
case 0x19: // Special Attribute [327 279]
{
- UINT16 nData, nFakt;
- BYTE nOpt;
+ sal_uInt16 nData, nFakt;
+ sal_uInt8 nOpt;
aIn >> nOpt;
@@ -1052,7 +1052,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
aSRD.nCol = static_cast<SCsCOL>(nByte);
aSRD.nRow = nUINT16 & 0x3FFF;
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel( nUINT16, nByte, aSRD, bRangeName );
@@ -1063,16 +1063,16 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
case 0x65:
case 0x25: // Area Reference [320 270]
{
- UINT16 nRowFirst, nRowLast;
- UINT8 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt8 nColFirst, nColLast;
ScSingleRefData &rSRef1 = aCRD.Ref1;
ScSingleRefData &rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
rSRef1.nRelTab = rSRef2.nRelTab = 0;
- rSRef1.SetTabRel( TRUE );
- rSRef2.SetTabRel( TRUE );
+ rSRef1.SetTabRel( sal_True );
+ rSRef2.SetTabRel( sal_True );
rSRef1.SetFlag3D( bRangeName );
rSRef2.SetFlag3D( bRangeName );
@@ -1116,7 +1116,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
aIn >> nUINT16 >> nByte; // >> Attribute, Row >> Col
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel( nUINT16, nByte, aSRD, bRNorSF );
@@ -1128,12 +1128,12 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
case 0x6D:
case 0x2D: // Area Reference Within a Name [324 ]
{ // Area Reference Within a Shared Formula[ 274]
- UINT16 nRowFirst, nRowLast;
- UINT8 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt8 nColFirst, nColLast;
aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0;
- aCRD.Ref1.SetTabRel( TRUE );
- aCRD.Ref2.SetTabRel( TRUE );
+ aCRD.Ref1.SetTabRel( sal_True );
+ aCRD.Ref2.SetTabRel( sal_True );
aCRD.Ref1.SetFlag3D( bRangeName );
aCRD.Ref2.SetFlag3D( bRangeName );
@@ -1175,9 +1175,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
case 0x7A:
case 0x3A: // 3-D Cell Reference [ 275]
{
- UINT16 nTabFirst, nTabLast, nRow;
- INT16 nExtSheet;
- BYTE nCol;
+ sal_uInt16 nTabFirst, nTabLast, nRow;
+ sal_Int16 nExtSheet;
+ sal_uInt8 nCol;
aIn >> nExtSheet;
aIn.Ignore( 8 );
@@ -1201,10 +1201,10 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
if( nExtSheet <= 0 )
{// in aktuellem Workbook
- BOOL b3D = ( static_cast<SCTAB>(nTabFirst) != aEingPos.Tab() ) || bRangeName;
+ sal_Bool b3D = ( static_cast<SCTAB>(nTabFirst) != aEingPos.Tab() ) || bRangeName;
aSRD.nTab = static_cast<SCTAB>(nTabFirst);
aSRD.SetFlag3D( b3D );
- aSRD.SetTabRel( FALSE );
+ aSRD.SetTabRel( false );
ExcRelToScRel( nRow, nCol, aSRD, bRangeName );
@@ -1216,7 +1216,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
aCRD.Ref2.nTab = static_cast<SCTAB>(nTabLast);
b3D = ( static_cast<SCTAB>(nTabLast) != aEingPos.Tab() );
aCRD.Ref2.SetFlag3D( b3D );
- aCRD.Ref2.SetTabRel( FALSE );
+ aCRD.Ref2.SetTabRel( false );
rRangeList.Append( aCRD, nTab );
}
else
@@ -1229,9 +1229,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
case 0x7B:
case 0x3B: // 3-D Area Reference [ 276]
{
- UINT16 nTabFirst, nTabLast, nRowFirst, nRowLast;
- INT16 nExtSheet;
- BYTE nColFirst, nColLast;
+ sal_uInt16 nTabFirst, nTabLast, nRowFirst, nRowLast;
+ sal_Int16 nExtSheet;
+ sal_uInt8 nColFirst, nColLast;
aIn >> nExtSheet;
aIn.Ignore( 8 );
@@ -1263,9 +1263,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
rR1.nTab = static_cast<SCTAB>(nTabFirst);
rR2.nTab = static_cast<SCTAB>(nTabLast);
rR1.SetFlag3D( ( static_cast<SCTAB>(nTabFirst) != aEingPos.Tab() ) || bRangeName );
- rR1.SetTabRel( FALSE );
+ rR1.SetTabRel( false );
rR2.SetFlag3D( ( static_cast<SCTAB>(nTabLast) != aEingPos.Tab() ) || bRangeName );
- rR2.SetTabRel( FALSE );
+ rR2.SetTabRel( false );
ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName );
ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName );
@@ -1289,7 +1289,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
case 0x3D: // Deleted 3-D Area Reference [ 277]
nIgnore = 20;
break;
- default: bError = TRUE;
+ default: bError = sal_True;
}
bError |= !aIn.IsValid();
@@ -1320,11 +1320,11 @@ ConvErr ExcelToSc::ConvertExternName( const ScTokenArray*& /*rpArray*/, XclImpSt
return ConvErrNi;
}
-BOOL ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen )
+sal_Bool ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen )
{
DBG_ASSERT_BIFF( GetBiff() == EXC_BIFF5 );
if( GetBiff() != EXC_BIFF5 )
- return FALSE;
+ return false;
sal_uInt8 nOp;
sal_uInt16 nRow1, nRow2;
@@ -1509,8 +1509,8 @@ BOOL ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Si
break;
case 0x19: // Special Attribute [327 279]
{
- BYTE nOpt;
- UINT16 nData;
+ sal_uInt8 nOpt;
+ sal_uInt16 nData;
rStrm >> nOpt >> nData;
if( nOpt & 0x04 )
nSeek = nData * 2 + 2;
@@ -1528,7 +1528,7 @@ BOOL ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Si
void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCount )
{
TokenId eParam[ 256 ];
- INT32 nLauf;
+ sal_Int32 nLauf;
if( eId == ocCeil || eId == ocFloor )
{
@@ -1565,10 +1565,10 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo
if( nAnz > 0 )
{
// attention: 0 = last parameter, nAnz-1 = first parameter
- INT16 nNull = -1; // skip this parameter
- INT16 nSkipEnd = -1; // skip all parameters <= nSkipEnd
+ sal_Int16 nNull = -1; // skip this parameter
+ sal_Int16 nSkipEnd = -1; // skip all parameters <= nSkipEnd
- INT16 nLast = nAnz - 1;
+ sal_Int16 nLast = nAnz - 1;
// Funktionen, bei denen Parameter wegfallen muessen
if( eId == ocPercentrank && nAnz == 3 )
@@ -1577,13 +1577,13 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo
// Joost-Spezialfaelle
else if( eId == ocIf )
{
- UINT16 nNullParam = 0;
+ sal_uInt16 nNullParam = 0;
for( nLauf = 0 ; nLauf < nAnz ; nLauf++ )
{
if( aPool.IsSingleOp( eParam[ nLauf ], ocMissing ) )
{
if( !nNullParam )
- nNullParam = (UINT16) aPool.Store( ( double ) 0.0 );
+ nNullParam = (sal_uInt16) aPool.Store( ( double ) 0.0 );
eParam[ nLauf ] = nNullParam;
}
}
@@ -1592,7 +1592,7 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo
// FIXME: ideally we'd want to import all missing args, but this
// conflicts with lots of fn's understanding of nParams - we need
// a function table, and pre-call argument normalisation 1st.
- INT16 nLastRemovable = nLast - nMinParamCount;
+ sal_Int16 nLastRemovable = nLast - nMinParamCount;
// skip missing parameters at end of parameter list
while( nSkipEnd < nLastRemovable &&
@@ -1619,36 +1619,36 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo
}
-void ExcelToSc::ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData &rSRD, const BOOL bName )
+void ExcelToSc::ExcRelToScRel( sal_uInt16 nRow, sal_uInt8 nCol, ScSingleRefData &rSRD, const sal_Bool bName )
{
if( bName )
{
// C O L
if( nRow & 0x4000 )
{// rel Col
- rSRD.SetColRel( TRUE );
- rSRD.nRelCol = static_cast<SCsCOL>(static_cast<INT8>(nCol));
+ rSRD.SetColRel( sal_True );
+ rSRD.nRelCol = static_cast<SCsCOL>(static_cast<sal_Int8>(nCol));
}
else
{// abs Col
- rSRD.SetColRel( FALSE );
+ rSRD.SetColRel( false );
rSRD.nCol = static_cast<SCCOL>(nCol);
}
// R O W
if( nRow & 0x8000 )
{// rel Row
- rSRD.SetRowRel( TRUE );
+ rSRD.SetRowRel( sal_True );
if( nRow & 0x2000 ) // Bit 13 gesetzt?
// -> Row negativ
- rSRD.nRelRow = static_cast<SCsROW>(static_cast<INT16>(nRow | 0xC000));
+ rSRD.nRelRow = static_cast<SCsROW>(static_cast<sal_Int16>(nRow | 0xC000));
else
// -> Row positiv
rSRD.nRelRow = static_cast<SCsROW>(nRow & nRowMask);
}
else
{// abs Row
- rSRD.SetRowRel( FALSE );
+ rSRD.SetRowRel( false );
rSRD.nRow = static_cast<SCROW>(nRow & nRowMask);
}
@@ -1682,7 +1682,7 @@ void ExcelToSc::ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData &rSRD, c
const ScTokenArray* ExcelToSc::GetBoolErr( XclBoolError eType )
{
- UINT16 nError;
+ sal_uInt16 nError;
aPool.Reset();
aStack.Reset();
@@ -1724,13 +1724,13 @@ const ScTokenArray* ExcelToSc::GetBoolErr( XclBoolError eType )
// if a shared formula was found, stream seeks to first byte after <nFormulaLen>,
// else stream pointer stays unchanged
-BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, sal_Size nFormulaLen )
+sal_Bool ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, sal_Size nFormulaLen )
{
- BYTE nOp;
- BOOL bRet = TRUE;
+ sal_uInt8 nOp;
+ sal_Bool bRet = sal_True;
if( nFormulaLen == 0 )
- bRet = FALSE;
+ bRet = false;
else
{
aIn.PushPosition();
@@ -1739,17 +1739,17 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn,
if( nOp == 0x01 ) // Shared Formula [ 277]
{
- UINT16 nCol, nRow;
+ sal_uInt16 nCol, nRow;
aIn >> nRow >> nCol;
aStack << aPool.Store( GetOldRoot().pShrfmlaBuff->Find(
ScAddress( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), GetCurrScTab() ) ) );
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = false;
aIn.PopPosition();
}
@@ -1768,7 +1768,7 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn,
void ExcelToSc::SetError( ScFormulaCell &rCell, const ConvErr eErr )
{
- UINT16 nInd;
+ sal_uInt16 nInd;
switch( eErr )
{
@@ -1807,8 +1807,8 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn )
{
// printf( "inline array;\n" );
- BYTE nByte;
- UINT16 nUINT16;
+ sal_uInt8 nByte;
+ sal_uInt16 nUINT16;
double fDouble;
String aString;
ScMatrix* pMatrix;
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 772d41ddbcad..2508e20681f4 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -63,7 +63,7 @@ ExcelToSc8::~ExcelToSc8()
{
}
-bool ExcelToSc8::GetExternalFileIdFromXti( UINT16 nIxti, sal_uInt16& rFileId ) const
+bool ExcelToSc8::GetExternalFileIdFromXti( sal_uInt16 nIxti, sal_uInt16& rFileId ) const
{
const String* pFileUrl = rLinkMan.GetSupbookUrl(nIxti);
if (!pFileUrl || pFileUrl->Len() == 0 || !GetDocShell())
@@ -76,7 +76,7 @@ bool ExcelToSc8::GetExternalFileIdFromXti( UINT16 nIxti, sal_uInt16& rFileId ) c
return true;
}
-bool ExcelToSc8::Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo )
+bool ExcelToSc8::Read3DTabReference( sal_uInt16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo )
{
rFirstTab = rLastTab = 0;
rExtInfo.mbExternal = !rLinkMan.IsSelfRef(nIxti);
@@ -97,16 +97,16 @@ bool ExcelToSc8::Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLas
// otherwise it will seek to the first byte past additional content after <nFormulaLen>
ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, sal_Size nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
{
- BYTE nOp, nLen, nByte;
- UINT16 nUINT16;
+ sal_uInt8 nOp, nLen, nByte;
+ sal_uInt16 nUINT16;
double fDouble;
String aString;
- BOOL bError = FALSE;
- BOOL bArrayFormula = FALSE;
+ sal_Bool bError = false;
+ sal_Bool bArrayFormula = false;
TokenId nMerk0;
- const BOOL bRangeName = eFT == FT_RangeName;
- const BOOL bSharedFormula = eFT == FT_SharedFormula;
- const BOOL bRNorSF = bRangeName || bSharedFormula;
+ const sal_Bool bRangeName = eFT == FT_RangeName;
+ const sal_Bool bSharedFormula = eFT == FT_SharedFormula;
+ const sal_Bool bRNorSF = bRangeName || bSharedFormula;
ScSingleRefData aSRD;
ScComplexRefData aCRD;
@@ -143,7 +143,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x02: // Data Table [325 277]
aIn.Ignore( 4 );
- bArrayFormula = TRUE;
+ bArrayFormula = sal_True;
break;
case 0x03: // Addition [312 264]
aStack >> nMerk0;
@@ -261,8 +261,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
break;
case 0x18: // natural language formula
{
- UINT8 nEptg;
- UINT16 nCol, nRow;
+ sal_uInt8 nEptg;
+ sal_uInt16 nCol, nRow;
aIn >> nEptg;
switch( nEptg )
{ // name size ext type
@@ -280,9 +280,9 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
aSRD.InitAddress( ScAddress( static_cast<SCCOL>(nCol & 0xFF), static_cast<SCROW>(nRow), aEingPos.Tab() ) );
if( nEptg == 0x02 || nEptg == 0x06 )
- aSRD.SetRowRel( TRUE );
+ aSRD.SetRowRel( sal_True );
else
- aSRD.SetColRel( TRUE );
+ aSRD.SetColRel( sal_True );
aSRD.CalcRelFromAbs( aEingPos );
@@ -294,7 +294,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
aSRD.InitAddress( ScAddress( static_cast<SCCOL>(nCol & 0xFF), static_cast<SCROW>(nRow), aEingPos.Tab() ) );
- aSRD.SetColRel( TRUE );
+ aSRD.SetColRel( sal_True );
aSRD.CalcRelFromAbs( aEingPos );
@@ -329,8 +329,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
break;
case 0x19: // Special Attribute [327 279]
{
- UINT16 nData, nFakt;
- BYTE nOpt;
+ sal_uInt16 nData, nFakt;
+ sal_uInt8 nOpt;
aIn >> nOpt >> nData;
nFakt = 2;
@@ -445,14 +445,14 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x6A:
case 0x2A: // Deleted Cell Reference [323 273]
{
- UINT16 nCol, nRow;
+ sal_uInt16 nCol, nRow;
aIn >> nRow >> nCol;
aSRD.nCol = static_cast<SCCOL>(nCol);
aSRD.nRow = nRow & 0x3FFF;
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel8( nRow, nCol, aSRD, bRangeName );
@@ -463,8 +463,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x6A:
case 0x2A: // Deleted Cell Reference [323 273]
// no information which part is deleted, set both
- aSRD.SetColDeleted( TRUE );
- aSRD.SetRowDeleted( TRUE );
+ aSRD.SetColDeleted( sal_True );
+ aSRD.SetRowDeleted( sal_True );
}
aStack << aPool.Store( aSRD );
@@ -477,16 +477,16 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x6B:
case 0x2B: // Deleted Area Refernce [323 273]
{
- UINT16 nRowFirst, nRowLast;
- UINT16 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt16 nColFirst, nColLast;
ScSingleRefData &rSRef1 = aCRD.Ref1;
ScSingleRefData &rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
rSRef1.nRelTab = rSRef2.nRelTab = 0;
- rSRef1.SetTabRel( TRUE );
- rSRef2.SetTabRel( TRUE );
+ rSRef1.SetTabRel( sal_True );
+ rSRef2.SetTabRel( sal_True );
rSRef1.SetFlag3D( bRangeName );
rSRef2.SetFlag3D( bRangeName );
@@ -504,10 +504,10 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x6B:
case 0x2B: // Deleted Area Refernce [323 273]
// no information which part is deleted, set all
- rSRef1.SetColDeleted( TRUE );
- rSRef1.SetRowDeleted( TRUE );
- rSRef2.SetColDeleted( TRUE );
- rSRef2.SetRowDeleted( TRUE );
+ rSRef1.SetColDeleted( sal_True );
+ rSRef1.SetRowDeleted( sal_True );
+ rSRef2.SetColDeleted( sal_True );
+ rSRef2.SetRowDeleted( sal_True );
}
aStack << aPool.Store( aCRD );
@@ -543,12 +543,12 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x2C: // Cell Reference Within a Name [323 ]
// Cell Reference Within a Shared Formula[ 273]
{
- UINT16 nRow, nCol;
+ sal_uInt16 nRow, nCol;
aIn >> nRow >> nCol;
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel8( nRow, nCol, aSRD, bRNorSF );
@@ -560,12 +560,12 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x6D:
case 0x2D: // Area Reference Within a Name [324 ]
{ // Area Reference Within a Shared Formula[ 274]
- UINT16 nRowFirst, nRowLast;
- UINT16 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt16 nColFirst, nColLast;
aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0;
- aCRD.Ref1.SetTabRel( TRUE );
- aCRD.Ref2.SetTabRel( TRUE );
+ aCRD.Ref1.SetTabRel( sal_True );
+ aCRD.Ref2.SetTabRel( sal_True );
aCRD.Ref1.SetFlag3D( bRangeName );
aCRD.Ref2.SetFlag3D( bRangeName );
@@ -699,7 +699,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x7C:
case 0x3C: // Deleted 3-D Cell Reference [ 277]
{
- UINT16 nIxti, nRw, nGrbitCol;
+ sal_uInt16 nIxti, nRw, nGrbitCol;
SCTAB nTabFirst, nTabLast;
aIn >> nIxti >> nRw >> nGrbitCol;
@@ -713,8 +713,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
}
aSRD.nTab = nTabFirst;
- aSRD.SetFlag3D( TRUE );
- aSRD.SetTabRel( FALSE );
+ aSRD.SetFlag3D( sal_True );
+ aSRD.SetTabRel( false );
ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName );
@@ -724,8 +724,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x7C:
case 0x3C: // Deleted 3-D Cell Reference [ 277]
// no information which part is deleted, set both
- aSRD.SetColDeleted( TRUE );
- aSRD.SetRowDeleted( TRUE );
+ aSRD.SetColDeleted( sal_True );
+ aSRD.SetRowDeleted( sal_True );
}
if (aExtInfo.mbExternal)
@@ -748,7 +748,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
else
{
if ( !ValidTab(nTabFirst))
- aSRD.SetTabDeleted( TRUE );
+ aSRD.SetTabDeleted( sal_True );
if( nTabLast != nTabFirst )
{
@@ -769,7 +769,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x7D:
case 0x3D: // Deleted 3-D Area Reference [ 277]
{
- UINT16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2;
+ sal_uInt16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2;
SCTAB nTabFirst, nTabLast;
aIn >> nIxti >> nRw1 >> nRw2 >> nGrbitCol1 >> nGrbitCol2;
@@ -786,10 +786,10 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
rR1.nTab = nTabFirst;
rR2.nTab = nTabLast;
- rR1.SetFlag3D( TRUE );
- rR1.SetTabRel( FALSE );
+ rR1.SetFlag3D( sal_True );
+ rR1.SetTabRel( false );
rR2.SetFlag3D( nTabFirst != nTabLast );
- rR2.SetTabRel( FALSE );
+ rR2.SetTabRel( false );
ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName );
ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName );
@@ -805,10 +805,10 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x7D:
case 0x3D: // Deleted 3-D Area Reference [ 277]
// no information which part is deleted, set all
- rR1.SetColDeleted( TRUE );
- rR1.SetRowDeleted( TRUE );
- rR2.SetColDeleted( TRUE );
- rR2.SetRowDeleted( TRUE );
+ rR1.SetColDeleted( sal_True );
+ rR1.SetRowDeleted( sal_True );
+ rR2.SetColDeleted( sal_True );
+ rR2.SetRowDeleted( sal_True );
}
if (aExtInfo.mbExternal)
@@ -818,15 +818,15 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
else
{
if ( !ValidTab(nTabFirst) )
- rR1.SetTabDeleted( TRUE );
+ rR1.SetTabDeleted( sal_True );
if ( !ValidTab(nTabLast) )
- rR2.SetTabDeleted( TRUE );
+ rR2.SetTabDeleted( sal_True );
aStack << aPool.Store( aCRD );
}
}
break;
- default: bError = TRUE;
+ default: bError = sal_True;
}
bError |= !aIn.IsValid();
}
@@ -871,16 +871,16 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen,
SCsTAB nTab, const FORMULA_TYPE eFT )
{
- BYTE nOp, nLen;//, nByte;
- BOOL bError = FALSE;
- const BOOL bRangeName = eFT == FT_RangeName;
- const BOOL bSharedFormula = eFT == FT_SharedFormula;
- const BOOL bRNorSF = bRangeName || bSharedFormula;
+ sal_uInt8 nOp, nLen;//, nByte;
+ sal_Bool bError = false;
+ const sal_Bool bRangeName = eFT == FT_RangeName;
+ const sal_Bool bSharedFormula = eFT == FT_SharedFormula;
+ const sal_Bool bRNorSF = bRangeName || bSharedFormula;
ScSingleRefData aSRD;
ScComplexRefData aCRD;
- bExternName = FALSE;
+ bExternName = false;
if( eStatus != ConvOK )
{
@@ -938,8 +938,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
break;
case 0x19: // Special Attribute [327 279]
{
- UINT16 nData, nFakt;
- BYTE nOpt;
+ sal_uInt16 nData, nFakt;
+ sal_uInt8 nOpt;
aIn >> nOpt >> nData;
nFakt = 2;
@@ -985,14 +985,14 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
case 0x64:
case 0x24: // Cell Reference [319 270]
{
- UINT16 nCol, nRow;
+ sal_uInt16 nCol, nRow;
aIn >> nRow >> nCol;
aSRD.nCol = static_cast<SCCOL>(nCol);
aSRD.nRow = nRow & 0x3FFF;
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel8( nRow, nCol, aSRD, bRangeName );
@@ -1004,16 +1004,16 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
case 0x65:
case 0x25: // Area Reference [320 270]
{
- UINT16 nRowFirst, nRowLast;
- UINT16 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt16 nColFirst, nColLast;
ScSingleRefData &rSRef1 = aCRD.Ref1;
ScSingleRefData &rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
rSRef1.nRelTab = rSRef2.nRelTab = 0;
- rSRef1.SetTabRel( TRUE );
- rSRef2.SetTabRel( TRUE );
+ rSRef1.SetTabRel( sal_True );
+ rSRef2.SetTabRel( sal_True );
rSRef1.SetFlag3D( bRangeName );
rSRef2.SetFlag3D( bRangeName );
@@ -1059,12 +1059,12 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
case 0x2C: // Cell Reference Within a Name [323 ]
// Cell Reference Within a Shared Formula[ 273]
{
- UINT16 nRow, nCol;
+ sal_uInt16 nRow, nCol;
aIn >> nRow >> nCol;
aSRD.nRelTab = 0;
- aSRD.SetTabRel( TRUE );
+ aSRD.SetTabRel( sal_True );
aSRD.SetFlag3D( bRangeName );
ExcRelToScRel8( nRow, nCol, aSRD, bRNorSF );
@@ -1076,12 +1076,12 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
case 0x6D:
case 0x2D: // Area Reference Within a Name [324 ]
{ // Area Reference Within a Shared Formula[ 274]
- UINT16 nRowFirst, nRowLast;
- UINT16 nColFirst, nColLast;
+ sal_uInt16 nRowFirst, nRowLast;
+ sal_uInt16 nColFirst, nColLast;
aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0;
- aCRD.Ref1.SetTabRel( TRUE );
- aCRD.Ref2.SetTabRel( TRUE );
+ aCRD.Ref1.SetTabRel( sal_True );
+ aCRD.Ref2.SetTabRel( sal_True );
aCRD.Ref1.SetFlag3D( bRangeName );
aCRD.Ref2.SetFlag3D( bRangeName );
@@ -1118,7 +1118,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
case 0x7A:
case 0x3A: // 3-D Cell Reference [ 275]
{
- UINT16 nIxti, nRw, nGrbitCol;
+ sal_uInt16 nIxti, nRw, nGrbitCol;
aIn >> nIxti >> nRw >> nGrbitCol;
@@ -1126,8 +1126,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
if( rLinkMan.GetScTabRange( nFirstScTab, nLastScTab, nIxti ) )
{
aSRD.nTab = nFirstScTab;
- aSRD.SetFlag3D( TRUE );
- aSRD.SetTabRel( FALSE );
+ aSRD.SetFlag3D( sal_True );
+ aSRD.SetTabRel( false );
ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName );
@@ -1148,7 +1148,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
case 0x7B:
case 0x3B: // 3-D Area Reference [ 276]
{
- UINT16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2;
+ sal_uInt16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2;
aIn >> nIxti >> nRw1 >> nRw2 >> nGrbitCol1 >> nGrbitCol2;
@@ -1160,10 +1160,10 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
rR1.nTab = nFirstScTab;
rR2.nTab = nLastScTab;
- rR1.SetFlag3D( TRUE );
- rR1.SetTabRel( FALSE );
+ rR1.SetFlag3D( sal_True );
+ rR1.SetTabRel( false );
rR2.SetFlag3D( nFirstScTab != nLastScTab );
- rR2.SetTabRel( FALSE );
+ rR2.SetTabRel( false );
ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName );
ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName );
@@ -1188,7 +1188,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
aIn.Ignore( 10 );
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
bError |= !aIn.IsValid();
}
@@ -1358,11 +1358,11 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea
return eRet;
}
-void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, const BOOL bName )
+void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData &rSRD, const sal_Bool bName )
{
- const BOOL bColRel = ( nC & 0x4000 ) != 0;
- const BOOL bRowRel = ( nC & 0x8000 ) != 0;
- const UINT8 nCol = static_cast<UINT8>(nC);
+ const sal_Bool bColRel = ( nC & 0x4000 ) != 0;
+ const sal_Bool bRowRel = ( nC & 0x8000 ) != 0;
+ const sal_uInt8 nCol = static_cast<sal_uInt8>(nC);
rSRD.SetColRel( bColRel );
rSRD.SetRowRel( bRowRel );
@@ -1372,7 +1372,7 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD,
// C O L
if( bColRel )
// rel Col
- rSRD.nRelCol = static_cast<SCsCOL>(static_cast<INT8>(nC));
+ rSRD.nRelCol = static_cast<SCsCOL>(static_cast<sal_Int8>(nC));
else
// abs Col
rSRD.nCol = static_cast<SCCOL>(nCol);
@@ -1380,7 +1380,7 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD,
// R O W
if( bRowRel )
// rel Row
- rSRD.nRelRow = static_cast<SCsROW>(static_cast<INT16>(nRow));
+ rSRD.nRelRow = static_cast<SCsROW>(static_cast<sal_Int16>(nRow));
else
// abs Row
rSRD.nRow = Min( static_cast<SCROW>(nRow), MAXROW);
@@ -1413,12 +1413,12 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD,
// stream seeks to first byte after <nLen>
-BOOL ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen )
+sal_Bool ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen )
{
- UINT8 nOp;
- UINT16 nRow1, nRow2, nCol1, nCol2;
+ sal_uInt8 nOp;
+ sal_uInt16 nRow1, nRow2, nCol1, nCol2;
SCTAB nTab1, nTab2;
- UINT16 nIxti;
+ sal_uInt16 nIxti;
sal_Size nSeek;
@@ -1558,7 +1558,7 @@ BOOL ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen )
break;
case 0x17: // String Constant [314 266]
{
- UINT8 nStrLen;
+ sal_uInt8 nStrLen;
aIn >> nStrLen;
aIn.IgnoreUniString( nStrLen ); // reads Grbit even if nLen==0
nSeek = 0;
@@ -1566,8 +1566,8 @@ BOOL ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen )
break;
case 0x19: // Special Attribute [327 279]
{
- UINT16 nData;
- UINT8 nOpt;
+ sal_uInt16 nData;
+ sal_uInt8 nOpt;
aIn >> nOpt >> nData;
if( nOpt & 0x04 )
{// nFakt -> Bytes oder Words ueberlesen AttrChoose
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index b18e3a33b323..beb64b9b30ca 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -31,10 +31,9 @@
#include "excimp8.hxx"
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-
#include <scitems.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/mediadescriptor.hxx>
#include <unotools/fltrcfg.hxx>
#include <svtools/wmf.hxx>
@@ -43,6 +42,11 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/docinf.hxx>
+#include <sfx2/frame.hxx>
+
#include <editeng/brshitem.hxx>
#include <editeng/editdata.hxx>
#include <editeng/editeng.hxx>
@@ -55,19 +59,16 @@
#include <editeng/crsditem.hxx>
#include <editeng/flditem.hxx>
#include <svx/xflclit.hxx>
-#include <filter/msfilter/svxmsbas.hxx>
-#include <basic/basmgr.hxx>
#include <vcl/graph.hxx>
#include <vcl/bmpacc.hxx>
#include <sot/exchange.hxx>
-#include <sfx2/docinf.hxx>
+#include <svl/stritem.hxx>
#include <tools/string.hxx>
#include <tools/urlobj.hxx>
#include <rtl/math.hxx>
-#include <rtl/ustrbuf.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/charclass.hxx>
#include <drwlayer.hxx>
@@ -249,8 +250,8 @@ void ImportExcel8::Iteration( void )
void ImportExcel8::Boundsheet( void )
{
- UINT8 nLen;
- UINT16 nGrbit;
+ sal_uInt8 nLen;
+ sal_uInt16 nGrbit;
aIn.DisableDecryption();
maSheetOffsets.push_back( aIn.ReaduInt32() );
@@ -268,7 +269,7 @@ void ImportExcel8::Boundsheet( void )
}
if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) )
- pD->SetVisible( nScTab, FALSE );
+ pD->SetVisible( nScTab, false );
if( !pD->RenameTab( nScTab, aName ) )
{
@@ -282,7 +283,7 @@ void ImportExcel8::Boundsheet( void )
void ImportExcel8::Scenman( void )
{
- UINT16 nLastDispl;
+ sal_uInt16 nLastDispl;
aIn.Ignore( 4 );
aIn >> nLastDispl;
@@ -300,8 +301,8 @@ void ImportExcel8::Scenario( void )
void ImportExcel8::Labelsst( void )
{
XclAddress aXclPos;
- UINT16 nXF;
- UINT32 nSst;
+ sal_uInt16 nXF;
+ sal_uInt32 nSst;
aIn >> aXclPos >> nXF >> nSst;
@@ -324,8 +325,7 @@ void ImportExcel8::ReadBasic( void )
{
SfxObjectShell* pShell = GetDocShell();
SotStorageRef xRootStrg = GetRootStorage();
- SvtFilterOptions* pFilterOpt = SvtFilterOptions::Get();
- if( pShell && xRootStrg.Is() && pFilterOpt )
+ if( pShell && xRootStrg.Is() ) try
{
bool bLoadCode = pFilterOpt->IsLoadExcelBasicCode();
bool bLoadExecutable = pFilterOpt->IsLoadExcelBasicExecutable();
@@ -392,6 +392,15 @@ void ImportExcel8::ReadBasic( void )
catch( uno::Exception& )
{
}
+ aMediaDesc[ MediaDescriptor::PROP_INPUTSTREAM() ] <<= rMedium.GetInputStream();
+ aMediaDesc[ MediaDescriptor::PROP_INTERACTIONHANDLER() ] <<= rMedium.GetInteractionHandler();
+
+ // call the filter
+ uno::Reference< document::XFilter > xFilter( xImporter, uno::UNO_QUERY_THROW );
+ xFilter->filter( aMediaDesc.getAsConstPropertyValueList() );
+ }
+ catch( uno::Exception& )
+ {
}
}
@@ -498,10 +507,10 @@ XclImpAutoFilterData::XclImpAutoFilterData( RootData* pRoot, const ScRange& rRan
ExcRoot( pRoot ),
pCurrDBData(NULL),
nFirstEmpty( 0 ),
- bActive( FALSE ),
- bHasConflict( FALSE ),
- bCriteria( FALSE ),
- bAutoOrAdvanced(FALSE),
+ bActive( false ),
+ bHasConflict( false ),
+ bCriteria( false ),
+ bAutoOrAdvanced(false),
aFilterName(rName)
{
aParam.nCol1 = rRange.aStart.Col();
@@ -510,7 +519,7 @@ XclImpAutoFilterData::XclImpAutoFilterData( RootData* pRoot, const ScRange& rRan
aParam.nCol2 = rRange.aEnd.Col();
aParam.nRow2 = rRange.aEnd.Row();
- aParam.bInplace = TRUE;
+ aParam.bInplace = sal_True;
}
@@ -518,7 +527,7 @@ void XclImpAutoFilterData::CreateFromDouble( String& rStr, double fVal )
{
rStr += String( ::rtl::math::doubleToUString( fVal,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
- ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE));
+ ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True));
}
void XclImpAutoFilterData::SetCellAttribs()
@@ -526,7 +535,7 @@ void XclImpAutoFilterData::SetCellAttribs()
ScDocument& rDoc = pExcRoot->pIR->GetDoc();
for ( SCCOL nCol = StartCol(); nCol <= EndCol(); nCol++ )
{
- INT16 nFlag = ((ScMergeFlagAttr*) rDoc.GetAttr( nCol, StartRow(), Tab(), ATTR_MERGE_FLAG ))->GetValue();
+ sal_Int16 nFlag = ((ScMergeFlagAttr*) rDoc.GetAttr( nCol, StartRow(), Tab(), ATTR_MERGE_FLAG ))->GetValue();
rDoc.ApplyAttr( nCol, StartRow(), Tab(), ScMergeFlagAttr( nFlag | SC_MF_AUTO) );
}
}
@@ -536,7 +545,7 @@ void XclImpAutoFilterData::InsertQueryParam()
if( pCurrDBData && !bHasConflict )
{
ScRange aAdvRange;
- BOOL bHasAdv = pCurrDBData->GetAdvancedQuerySource( aAdvRange );
+ sal_Bool bHasAdv = pCurrDBData->GetAdvancedQuerySource( aAdvRange );
if( bHasAdv )
pExcRoot->pIR->GetDoc().CreateQueryParam( aAdvRange.aStart.Col(),
aAdvRange.aStart.Row(), aAdvRange.aEnd.Col(), aAdvRange.aEnd.Row(),
@@ -547,7 +556,7 @@ void XclImpAutoFilterData::InsertQueryParam()
pCurrDBData->SetAdvancedQuerySource( &aAdvRange );
else
{
- pCurrDBData->SetAutoFilter( TRUE );
+ pCurrDBData->SetAutoFilter( sal_True );
SetCellAttribs();
}
}
@@ -587,14 +596,14 @@ static void ExcelQueryToOooQuery( ScQueryEntry& rEntry )
void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
{
- UINT16 nCol, nFlags;
+ sal_uInt16 nCol, nFlags;
rStrm >> nCol >> nFlags;
ScQueryConnect eConn = ::get_flagvalue( nFlags, EXC_AFFLAG_ANDORMASK, SC_OR, SC_AND );
- BOOL bTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10 );
- BOOL bTopOfTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10TOP );
- BOOL bPercent = ::get_flag( nFlags, EXC_AFFLAG_TOP10PERC );
- UINT16 nCntOfTop10 = nFlags >> 7;
+ sal_Bool bTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10 );
+ sal_Bool bTopOfTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10TOP );
+ sal_Bool bPercent = ::get_flag( nFlags, EXC_AFFLAG_TOP10PERC );
+ sal_uInt16 nCntOfTop10 = nFlags >> 7;
SCSIZE nCount = aParam.GetEntryCount();
if( bTop10 )
@@ -602,8 +611,8 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
if( nFirstEmpty < nCount )
{
ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty );
- aEntry.bDoQuery = TRUE;
- aEntry.bQueryByString = TRUE;
+ aEntry.bDoQuery = sal_True;
+ aEntry.bQueryByString = sal_True;
aEntry.nField = static_cast<SCCOLROW>(StartCol() + static_cast<SCCOL>(nCol));
aEntry.eOp = bTopOfTop10 ?
(bPercent ? SC_TOPPERC : SC_TOPVAL) : (bPercent ? SC_BOTPERC : SC_BOTVAL);
@@ -616,12 +625,12 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
}
else
{
- UINT8 nE, nType, nOper, nBoolErr, nVal;
- INT32 nRK;
+ sal_uInt8 nE, nType, nOper, nBoolErr, nVal;
+ sal_Int32 nRK;
double fVal;
- BOOL bIgnore;
+ sal_Bool bIgnore;
- UINT8 nStrLen[ 2 ] = { 0, 0 };
+ sal_uInt8 nStrLen[ 2 ] = { 0, 0 };
ScQueryEntry *pQueryEntries[ 2 ] = { NULL, NULL };
for( nE = 0; nE < 2; nE++ )
@@ -630,7 +639,7 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
{
ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty );
pQueryEntries[ nE ] = &aEntry;
- bIgnore = FALSE;
+ bIgnore = false;
rStrm >> nType >> nOper;
switch( nOper )
@@ -678,21 +687,21 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
rStrm >> nBoolErr >> nVal;
rStrm.Ignore( 6 );
aEntry.pStr->Assign( String::CreateFromInt32( (sal_Int32) nVal ) );
- bIgnore = (BOOL) nBoolErr;
+ bIgnore = (sal_Bool) nBoolErr;
break;
case EXC_AFTYPE_EMPTY:
- aEntry.bQueryByString = FALSE;
+ aEntry.bQueryByString = false;
aEntry.nVal = SC_EMPTYFIELDS;
aEntry.eOp = SC_EQUAL;
break;
case EXC_AFTYPE_NOTEMPTY:
- aEntry.bQueryByString = FALSE;
+ aEntry.bQueryByString = false;
aEntry.nVal = SC_NONEMPTYFIELDS;
aEntry.eOp = SC_EQUAL;
break;
default:
rStrm.Ignore( 8 );
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
/* #i39464# conflict, if two conditions of one column are 'OR'ed,
@@ -702,11 +711,11 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
'A1 AND (B1 OR B2)' in this case, but Calc would do
'(A1 AND B1) OR B2' instead. */
if( (nFirstEmpty > 1) && nE && (eConn == SC_OR) && !bIgnore )
- bHasConflict = TRUE;
+ bHasConflict = sal_True;
if( !bHasConflict && !bIgnore )
{
- aEntry.bDoQuery = TRUE;
- aEntry.bQueryByString = TRUE;
+ aEntry.bDoQuery = sal_True;
+ aEntry.bQueryByString = sal_True;
aEntry.nField = static_cast<SCCOLROW>(StartCol() + static_cast<SCCOL>(nCol));
aEntry.eConnect = nE ? eConn : SC_AND;
nFirstEmpty++;
@@ -731,10 +740,10 @@ void XclImpAutoFilterData::SetAdvancedRange( const ScRange* pRange )
if (pRange)
{
aCriteriaRange = *pRange;
- bCriteria = TRUE;
+ bCriteria = sal_True;
}
else
- bCriteria = FALSE;
+ bCriteria = false;
}
void XclImpAutoFilterData::SetExtractPos( const ScAddress& rAddr )
@@ -742,11 +751,11 @@ void XclImpAutoFilterData::SetExtractPos( const ScAddress& rAddr )
aParam.nDestCol = rAddr.Col();
aParam.nDestRow = rAddr.Row();
aParam.nDestTab = rAddr.Tab();
- aParam.bInplace = FALSE;
- aParam.bDestPers = TRUE;
+ aParam.bInplace = false;
+ aParam.bDestPers = sal_True;
}
-void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed )
+void XclImpAutoFilterData::Apply( const sal_Bool bUseUnNamed )
{
CreateScDBData(bUseUnNamed);
@@ -758,7 +767,7 @@ void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed )
// SCROW nRow1 = StartRow();
// SCROW nRow2 = EndRow();
// size_t nRows = nRow2 - nRow1 + 1;
-// boost::scoped_array<BYTE> pFlags( new BYTE[nRows]);
+// boost::scoped_array<sal_uInt8> pFlags( new sal_uInt8[nRows]);
// pExcRoot->pDoc->GetRowFlagsArray( Tab()).FillDataArray( nRow1, nRow2,
// pFlags.get());
// for (size_t j=0; j<nRows; ++j)
@@ -770,7 +779,7 @@ void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed )
}
}
-void XclImpAutoFilterData::CreateScDBData( const BOOL bUseUnNamed )
+void XclImpAutoFilterData::CreateScDBData( const sal_Bool bUseUnNamed )
{
// Create the ScDBData() object if the AutoFilter is activated
@@ -809,7 +818,7 @@ void XclImpAutoFilterData::EnableRemoveFilter()
if( !bActive && bAutoOrAdvanced )
{
ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty );
- aEntry.bDoQuery = TRUE;
+ aEntry.bDoQuery = sal_True;
++nFirstEmpty;
}
@@ -818,7 +827,7 @@ void XclImpAutoFilterData::EnableRemoveFilter()
// inside the advanced range
}
-void XclImpAutoFilterData::AmendAFName(const BOOL bUseUnNamed)
+void XclImpAutoFilterData::AmendAFName(const sal_Bool bUseUnNamed)
{
// If-and-only-if we have one AF filter then
// use the Calc "unnamed" range name. Calc
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 032a540c867a..ec4c425c1621 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -97,15 +97,13 @@
#include "xcl97rec.hxx"
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
using ::com::sun::star::uno::Sequence;
-
-
using ::rtl::OString;
//--------------------------------------------------------- class ExcDummy_00 -
-const BYTE ExcDummy_00::pMyData[] = {
+const sal_uInt8 ExcDummy_00::pMyData[] = {
0x5c, 0x00, 0x20, 0x00, 0x04, 'C', 'a', 'l', 'c', // WRITEACCESS
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
@@ -114,20 +112,20 @@ const BYTE ExcDummy_00::pMyData[] = {
const sal_Size ExcDummy_00::nMyLen = sizeof( ExcDummy_00::pMyData );
//-------------------------------------------------------- class ExcDummy_04x -
-const BYTE ExcDummy_040::pMyData[] = {
+const sal_uInt8 ExcDummy_040::pMyData[] = {
0x40, 0x00, 0x02, 0x00, 0x00, 0x00, // BACKUP
0x8d, 0x00, 0x02, 0x00, 0x00, 0x00, // HIDEOBJ
};
const sal_Size ExcDummy_040::nMyLen = sizeof( ExcDummy_040::pMyData );
-const BYTE ExcDummy_041::pMyData[] = {
+const sal_uInt8 ExcDummy_041::pMyData[] = {
0x0e, 0x00, 0x02, 0x00, 0x01, 0x00, // PRECISION
0xda, 0x00, 0x02, 0x00, 0x00, 0x00 // BOOKBOOL
};
const sal_Size ExcDummy_041::nMyLen = sizeof( ExcDummy_041::pMyData );
//-------------------------------------------------------- class ExcDummy_02a -
-const BYTE ExcDummy_02a::pMyData[] = {
+const sal_uInt8 ExcDummy_02a::pMyData[] = {
0x0d, 0x00, 0x02, 0x00, 0x01, 0x00, // CALCMODE
0x0c, 0x00, 0x02, 0x00, 0x64, 0x00, // CALCCOUNT
0x0f, 0x00, 0x02, 0x00, 0x01, 0x00, // REFMODE
@@ -167,7 +165,7 @@ void ExcEmptyRec::Save( XclExpStream& /*rStrm*/ )
}
-UINT16 ExcEmptyRec::GetNum() const
+sal_uInt16 ExcEmptyRec::GetNum() const
{
return 0;
}
@@ -205,7 +203,7 @@ void ExcDummyRec::Save( XclExpStream& rStrm )
}
-UINT16 ExcDummyRec::GetNum( void ) const
+sal_uInt16 ExcDummyRec::GetNum( void ) const
{
return 0x0000;
}
@@ -216,7 +214,7 @@ UINT16 ExcDummyRec::GetNum( void ) const
void ExcBoolRecord::SaveCont( XclExpStream& rStrm )
{
- rStrm << (UINT16)(bVal ? 0x0001 : 0x0000);
+ rStrm << (sal_uInt16)(bVal ? 0x0001 : 0x0000);
}
@@ -253,7 +251,7 @@ void ExcBof::SaveCont( XclExpStream& rStrm )
}
-UINT16 ExcBof::GetNum( void ) const
+sal_uInt16 ExcBof::GetNum( void ) const
{
return 0x0809;
}
@@ -282,7 +280,7 @@ void ExcBofW::SaveCont( XclExpStream& rStrm )
-UINT16 ExcBofW::GetNum( void ) const
+sal_uInt16 ExcBofW::GetNum( void ) const
{
return 0x0809;
}
@@ -298,7 +296,7 @@ sal_Size ExcBofW::GetLen( void ) const
//-------------------------------------------------------------- class ExcEof -
-UINT16 ExcEof::GetNum( void ) const
+sal_uInt16 ExcEof::GetNum( void ) const
{
return 0x000A;
}
@@ -319,7 +317,7 @@ sal_Size ExcDummy_00::GetLen( void ) const
}
-const BYTE* ExcDummy_00::GetData( void ) const
+const sal_uInt8* ExcDummy_00::GetData( void ) const
{
return pMyData;
}
@@ -334,7 +332,7 @@ sal_Size ExcDummy_040::GetLen( void ) const
}
-const BYTE* ExcDummy_040::GetData( void ) const
+const sal_uInt8* ExcDummy_040::GetData( void ) const
{
return pMyData;
}
@@ -348,7 +346,7 @@ sal_Size ExcDummy_041::GetLen( void ) const
}
-const BYTE* ExcDummy_041::GetData( void ) const
+const sal_uInt8* ExcDummy_041::GetData( void ) const
{
return pMyData;
}
@@ -360,12 +358,12 @@ const BYTE* ExcDummy_041::GetData( void ) const
Exc1904::Exc1904( ScDocument& rDoc )
{
Date* pDate = rDoc.GetFormatTable()->GetNullDate();
- bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : FALSE;
- bDateCompatibility = pDate ? !( *pDate == Date( 30, 12, 1899 )) : FALSE;
+ bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : false;
+ bDateCompatibility = pDate ? !( *pDate == Date( 30, 12, 1899 )) : false;
}
-UINT16 Exc1904::GetNum( void ) const
+sal_uInt16 Exc1904::GetNum( void ) const
{
return 0x0022;
}
@@ -421,7 +419,7 @@ void ExcBundlesheetBase::UpdateStreamPos( XclExpStream& rStrm )
}
-UINT16 ExcBundlesheetBase::GetNum( void ) const
+sal_uInt16 ExcBundlesheetBase::GetNum( void ) const
{
return 0x0085;
}
@@ -441,7 +439,7 @@ ExcBundlesheet::ExcBundlesheet( RootData& rRootData, SCTAB _nTab ) :
void ExcBundlesheet::SaveCont( XclExpStream& rStrm )
{
nOwnPos = rStrm.GetSvStreamPos();
- rStrm << (UINT32) 0x00000000 // dummy (stream position of the sheet)
+ rStrm << (sal_uInt32) 0x00000000 // dummy (stream position of the sheet)
<< nGrbit;
rStrm.WriteByteString( aName ); // 8 bit length, max 255 chars
}
@@ -460,7 +458,7 @@ sal_Size ExcDummy_02a::GetLen( void ) const
return nMyLen;
}
-const BYTE* ExcDummy_02a::GetData( void ) const
+const sal_uInt8* ExcDummy_02a::GetData( void ) const
{
return pMyData;
}
@@ -593,7 +591,7 @@ sal_Size ExcFilterCondition::GetTextBytes() const
return pText ? (1 + pText->GetBufferSize()) : 0;
}
-void ExcFilterCondition::SetCondition( UINT8 nTp, UINT8 nOp, double fV, String* pT )
+void ExcFilterCondition::SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, String* pT )
{
nType = nTp;
nOper = nOp;
@@ -613,17 +611,17 @@ void ExcFilterCondition::Save( XclExpStream& rStrm )
break;
case EXC_AFTYPE_STRING:
DBG_ASSERT( pText, "ExcFilterCondition::Save() -- pText is NULL!" );
- rStrm << (UINT32)0 << (UINT8) pText->Len() << (UINT16)0 << (UINT8)0;
+ rStrm << (sal_uInt32)0 << (sal_uInt8) pText->Len() << (sal_uInt16)0 << (sal_uInt8)0;
break;
case EXC_AFTYPE_BOOLERR:
- rStrm << (UINT8)0 << (UINT8)((fVal != 0) ? 1 : 0) << (UINT32)0 << (UINT16)0;
+ rStrm << (sal_uInt8)0 << (sal_uInt8)((fVal != 0) ? 1 : 0) << (sal_uInt32)0 << (sal_uInt16)0;
break;
default:
- rStrm << (UINT32)0 << (UINT32)0;
+ rStrm << (sal_uInt32)0 << (sal_uInt32)0;
}
}
-static const char* lcl_GetOperator( UINT8 nOper )
+static const char* lcl_GetOperator( sal_uInt8 nOper )
{
switch( nOper )
{
@@ -638,7 +636,7 @@ static const char* lcl_GetOperator( UINT8 nOper )
}
}
-static OString lcl_GetValue( UINT8 nType, double fVal, XclExpString* pStr )
+static OString lcl_GetValue( sal_uInt8 nType, double fVal, XclExpString* pStr )
{
switch( nType )
{
@@ -672,7 +670,7 @@ void ExcFilterCondition::SaveText( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
-XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, UINT16 nC ) :
+XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC ) :
XclExpRecord( EXC_ID_AUTOFILTER, 24 ),
XclExpRoot( rRoot ),
nCol( nC ),
@@ -680,13 +678,13 @@ XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, UINT16 nC ) :
{
}
-BOOL XclExpAutofilter::AddCondition( ScQueryConnect eConn, UINT8 nType, UINT8 nOp,
- double fVal, String* pText, BOOL bSimple )
+sal_Bool XclExpAutofilter::AddCondition( ScQueryConnect eConn, sal_uInt8 nType, sal_uInt8 nOp,
+ double fVal, String* pText, sal_Bool bSimple )
{
if( !aCond[ 1 ].IsEmpty() )
- return FALSE;
+ return false;
- UINT16 nInd = aCond[ 0 ].IsEmpty() ? 0 : 1;
+ sal_uInt16 nInd = aCond[ 0 ].IsEmpty() ? 0 : 1;
if( nInd == 1 )
nFlags |= (eConn == SC_OR) ? EXC_AFFLAG_OR : EXC_AFFLAG_AND;
@@ -697,12 +695,12 @@ BOOL XclExpAutofilter::AddCondition( ScQueryConnect eConn, UINT8 nType, UINT8 nO
AddRecSize( aCond[ nInd ].GetTextBytes() );
- return TRUE;
+ return sal_True;
}
-BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
+sal_Bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
{
- BOOL bConflict = FALSE;
+ sal_Bool bConflict = false;
String sText;
if( rEntry.pStr )
@@ -732,23 +730,23 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
}
}
- BOOL bLen = sText.Len() > 0;
+ sal_Bool bLen = sText.Len() > 0;
// empty/nonempty fields
if( !bLen && (rEntry.nVal == SC_EMPTYFIELDS) )
- 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, NULL, sal_True );
else if( !bLen && (rEntry.nVal == SC_NONEMPTYFIELDS) )
- 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, NULL, sal_True );
// other conditions
else
{
double fVal = 0.0;
sal_uInt32 nIndex = 0;
- BOOL bIsNum = bLen ? GetFormatter().IsNumberFormat( sText, nIndex, fVal ) : TRUE;
+ sal_Bool bIsNum = bLen ? GetFormatter().IsNumberFormat( sText, nIndex, fVal ) : sal_True;
String* pText = bIsNum ? NULL : &sText;
// top10 flags
- UINT16 nNewFlags = 0x0000;
+ sal_uInt16 nNewFlags = 0x0000;
switch( rEntry.eOp )
{
case SC_TOPVAL:
@@ -765,7 +763,7 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
break;
default:;
}
- BOOL bNewTop10 = ::get_flag( nNewFlags, EXC_AFFLAG_TOP10 );
+ sal_Bool bNewTop10 = ::get_flag( nNewFlags, EXC_AFFLAG_TOP10 );
bConflict = HasTop10() && bNewTop10;
if( !bConflict )
@@ -774,13 +772,13 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
{
if( fVal < 0 ) fVal = 0;
if( fVal >= 501 ) fVal = 500;
- nFlags |= (nNewFlags | (UINT16)(fVal) << 7);
+ nFlags |= (nNewFlags | (sal_uInt16)(fVal) << 7);
}
// normal condition
else
{
- UINT8 nType = bIsNum ? EXC_AFTYPE_DOUBLE : EXC_AFTYPE_STRING;
- UINT8 nOper = EXC_AFOPER_NONE;
+ sal_uInt8 nType = bIsNum ? EXC_AFTYPE_DOUBLE : EXC_AFTYPE_STRING;
+ sal_uInt8 nOper = EXC_AFOPER_NONE;
switch( rEntry.eOp )
{
@@ -862,9 +860,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
XclExpNameManager& rNameMgr = GetNameManager();
// search for first DB-range with filter
- UINT16 nIndex = 0;
- BOOL bFound = FALSE;
- BOOL bAdvanced = FALSE;
+ sal_uInt16 nIndex = 0;
+ sal_Bool bFound = false;
+ sal_Bool bAdvanced = false;
ScDBData* pData = NULL;
ScRange aAdvRange;
while( (nIndex < rDBColl.GetCount()) && !bFound )
@@ -917,9 +915,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
// AutoFilter
else
{
- BOOL bConflict = FALSE;
- BOOL bContLoop = TRUE;
- BOOL bHasOr = FALSE;
+ sal_Bool bConflict = false;
+ sal_Bool bContLoop = sal_True;
+ sal_Bool bHasOr = false;
SCCOLROW nFirstField = aParam.GetEntry( 0 ).nField;
// create AUTOFILTER records for filtered columns
@@ -984,12 +982,12 @@ XclExpAutofilter* ExcAutoFilterRecs::GetByCol( SCCOL nCol )
return xFilter.get();
}
-BOOL ExcAutoFilterRecs::IsFiltered( SCCOL nCol )
+sal_Bool ExcAutoFilterRecs::IsFiltered( SCCOL nCol )
{
for( size_t nPos = 0, nSize = maFilterList.GetSize(); nPos < nSize; ++nPos )
if( maFilterList.GetRecord( nPos )->GetCol() == static_cast<sal_uInt16>(nCol) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return false;
}
void ExcAutoFilterRecs::AddObjRecs()
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index 4797d4b71c7b..2b442a240bb8 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -161,7 +161,7 @@ void XclImpOutlineBuffer::MakeScOutline()
else if (nFirstPos > 0)
bCollapsed = maCollapsedPosSet.count(nFirstPos-1) > 0;
- BOOL bDummy;
+ sal_Bool bDummy;
mpOutlineArray->Insert(nFirstPos, nPos-1, bDummy, bCollapsed);
}
}
@@ -193,8 +193,8 @@ ExcScenarioCell::ExcScenarioCell( const UINT16 nC, const UINT16 nR )
ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR )
: nTab( rR.pIR->GetCurrScTab() )
{
- UINT16 nCref;
- UINT8 nName, nComment;
+ sal_uInt16 nCref;
+ sal_uInt8 nName, nComment;
rIn >> nCref;
rIn >> nProtected;
@@ -217,8 +217,8 @@ ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR )
else
pComment = new String;
- UINT16 n = nCref;
- UINT16 nC, nR;
+ sal_uInt16 n = nCref;
+ sal_uInt16 nC, nR;
while( n )
{
rIn >> nR >> nC;
@@ -245,16 +245,16 @@ ExcScenario::~ExcScenario()
delete pUserName;
}
-void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast )
+void ExcScenario::Apply( const XclImpRoot& rRoot, const sal_Bool bLast )
{
ScDocument& r = rRoot.GetDoc();
String aSzenName( *pName );
- UINT16 nNewTab = nTab + 1;
+ sal_uInt16 nNewTab = nTab + 1;
if( !r.InsertTab( nNewTab, aSzenName ) )
return;
- r.SetScenario( nNewTab, TRUE );
+ r.SetScenario( nNewTab, true );
// do not show scenario frames
r.SetScenarioData( nNewTab, *pComment, COL_LIGHTGRAY, /*SC_SCENARIO_SHOWFRAME|*/SC_SCENARIO_COPYALL|(nProtected ? SC_SCENARIO_PROTECT : 0) );
@@ -271,7 +271,7 @@ void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast )
}
if( bLast )
- r.SetActiveScenario( nNewTab, TRUE );
+ r.SetActiveScenario( nNewTab, sal_True );
// modify what the Active tab is set to if the new
// scenario tab occurs before the active tab.
diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx
index 643b557300c6..f52c0d7feec2 100644
--- a/sc/source/filter/excel/expop2.cxx
+++ b/sc/source/filter/excel/expop2.cxx
@@ -98,7 +98,7 @@ FltError ExportBiff5::Write()
if( pDocShell && xRootStrg.Is() && bWriteBasicStrg )
{
SvxImportMSVBasic aBasicImport( *pDocShell, *xRootStrg, bWriteBasicCode, bWriteBasicStrg );
- ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, EXC_STORAGE_VBA_PROJECT );
+ sal_uLong nErr = aBasicImport.SaveOrDelMSVBAStorage( sal_True, EXC_STORAGE_VBA_PROJECT );
if( nErr != ERRCODE_NONE )
pDocShell->SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
@@ -119,7 +119,7 @@ FltError ExportBiff5::Write()
if ( SvtFilterOptions::Get()->IsEnableCalcPreview() )
{
::boost::shared_ptr<GDIMetaFile> pMetaFile =
- pDocShell->GetPreviewMetaFile (sal_False);
+ pDocShell->GetPreviewMetaFile (false);
uno::Sequence<sal_uInt8> metaFile(
sfx2::convertMetaFile(pMetaFile.get()));
sfx2::SaveOlePropertySet(xDocProps, xRootStrg, &metaFile);
diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx
index 21f99163f52a..26db50f0166f 100644
--- a/sc/source/filter/excel/fontbuff.cxx
+++ b/sc/source/filter/excel/fontbuff.cxx
@@ -49,11 +49,11 @@
#include "patattr.hxx"
#include "ftools.hxx"
-const UINT16 LotusFontBuffer::nSize = 8;
+const sal_uInt16 LotusFontBuffer::nSize = 8;
-void LotusFontBuffer::Fill( const UINT8 nIndex, SfxItemSet& rItemSet )
+void LotusFontBuffer::Fill( const sal_uInt8 nIndex, SfxItemSet& rItemSet )
{
- UINT8 nIntIndex = nIndex & 0x07;
+ sal_uInt8 nIntIndex = nIndex & 0x07;
ENTRY* pAkt = pData + nIntIndex;
@@ -94,7 +94,7 @@ void LotusFontBuffer::Fill( const UINT8 nIndex, SfxItemSet& rItemSet )
}
-void LotusFontBuffer::SetName( const UINT16 nIndex, const String& rName )
+void LotusFontBuffer::SetName( const sal_uInt16 nIndex, const String& rName )
{
DBG_ASSERT( nIndex < nSize, "*LotusFontBuffer::SetName(): Array zu klein!" );
if( nIndex < nSize )
@@ -108,15 +108,15 @@ void LotusFontBuffer::SetName( const UINT16 nIndex, const String& rName )
}
-void LotusFontBuffer::SetHeight( const UINT16 nIndex, const UINT16 nHeight )
+void LotusFontBuffer::SetHeight( const sal_uInt16 nIndex, const sal_uInt16 nHeight )
{
DBG_ASSERT( nIndex < nSize, "*LotusFontBuffer::SetHeight(): Array zu klein!" );
if( nIndex < nSize )
- pData[ nIndex ].Height( *( new SvxFontHeightItem( ( ULONG ) nHeight * 20, 100, ATTR_FONT_HEIGHT ) ) );
+ pData[ nIndex ].Height( *( new SvxFontHeightItem( ( sal_uLong ) nHeight * 20, 100, ATTR_FONT_HEIGHT ) ) );
}
-void LotusFontBuffer::SetType( const UINT16 nIndex, const UINT16 nType )
+void LotusFontBuffer::SetType( const sal_uInt16 nIndex, const sal_uInt16 nType )
{
DBG_ASSERT( nIndex < nSize, "*LotusFontBuffer::SetType(): Array zu klein!" );
if( nIndex < nSize )
diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx
index 26db049dfdb8..0b34736d8c8f 100644
--- a/sc/source/filter/excel/frmbase.cxx
+++ b/sc/source/filter/excel/frmbase.cxx
@@ -35,10 +35,10 @@ _ScRangeListTabs::_ScRangeListTabs()
{
ppTabLists = new _ScRangeList*[ MAXTAB + 1 ];
- for( UINT16 n = 0 ; n <= MAXTAB ; n++ )
+ for( sal_uInt16 n = 0 ; n <= MAXTAB ; n++ )
ppTabLists[ n ] = NULL;
- bHasRanges = FALSE;
+ bHasRanges = false;
pAct = NULL;
nAct = 0;
}
@@ -47,7 +47,7 @@ _ScRangeListTabs::~_ScRangeListTabs()
{
if( bHasRanges )
{
- for( UINT16 n = 0 ; n <= MAXTAB ; n++ )
+ for( sal_uInt16 n = 0 ; n <= MAXTAB ; n++ )
{
if( ppTabLists[ n ] )
delete ppTabLists[ n ];
@@ -58,7 +58,7 @@ _ScRangeListTabs::~_ScRangeListTabs()
}
-void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const BOOL b )
+void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const sal_Bool b )
{
if( b )
{
@@ -76,7 +76,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const BOOL b )
DBG_ASSERT( ValidTab(a.nTab), "-_ScRangeListTabs::Append(): Luegen haben kurze Abstuerze!" );
}
- bHasRanges = TRUE;
+ bHasRanges = sal_True;
if( nTab == SCTAB_MAX)
return;
@@ -94,7 +94,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const BOOL b )
}
}
-void _ScRangeListTabs::Append( ScComplexRefData a, SCsTAB nTab, const BOOL b )
+void _ScRangeListTabs::Append( ScComplexRefData a, SCsTAB nTab, const sal_Bool b )
{
if( b )
{
@@ -140,7 +140,7 @@ void _ScRangeListTabs::Append( ScComplexRefData a, SCsTAB nTab, const BOOL b )
"+_ScRangeListTabs::Append(): 3D-Ranges werden in SC nicht unterstuetzt!" );
}
- bHasRanges = TRUE;
+ bHasRanges = sal_True;
if( nTab == SCTAB_MAX)
return;
@@ -188,7 +188,7 @@ const ScRange* _ScRangeListTabs::Next ()
return NULL;
}
-ConverterBase::ConverterBase( UINT16 nNewBuffer ) :
+ConverterBase::ConverterBase( sal_uInt16 nNewBuffer ) :
aEingPos( 0, 0, 0 ),
eStatus( ConvOK ),
nBufferSize( nNewBuffer )
@@ -212,7 +212,7 @@ void ConverterBase::Reset()
-ExcelConverterBase::ExcelConverterBase( UINT16 nNewBuffer ) :
+ExcelConverterBase::ExcelConverterBase( sal_uInt16 nNewBuffer ) :
ConverterBase( nNewBuffer )
{
}
@@ -236,7 +236,7 @@ void ExcelConverterBase::Reset()
-LotusConverterBase::LotusConverterBase( SvStream &rStr, UINT16 nNewBuffer ) :
+LotusConverterBase::LotusConverterBase( SvStream &rStr, sal_uInt16 nNewBuffer ) :
ConverterBase( nNewBuffer ),
aIn( rStr ),
nBytesLeft( 0 )
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 6267c64a2c3c..7f862721a3b2 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -89,7 +89,7 @@
#include "excimp8.hxx"
#include "excform.hxx"
-#if defined( WNT ) || defined( WIN )
+#if defined( WNT )
#include <math.h>
#else
#include <stdlib.h>
@@ -147,7 +147,7 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ):
// ab Biff8
pFormConv = pExcRoot->pFmlaConverter = new ExcelToSc( GetRoot() );
- bTabTruncated = FALSE;
+ bTabTruncated = false;
// Excel-Dokument per Default auf 31.12.1899, entspricht Excel-Einstellungen mit 1.1.1900
ScDocOptions aOpt = pD->GetDocOptions();
@@ -156,9 +156,9 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ):
pD->GetFormatTable()->ChangeNullDate( 30, 12, 1899 );
ScDocOptions aDocOpt( pD->GetDocOptions() );
- aDocOpt.SetIgnoreCase( TRUE ); // always in Excel
- aDocOpt.SetFormulaRegexEnabled( FALSE ); // regular expressions? what's that?
- aDocOpt.SetLookUpColRowNames( FALSE ); // default: no natural language refs
+ aDocOpt.SetIgnoreCase( sal_True ); // always in Excel
+ aDocOpt.SetFormulaRegexEnabled( false ); // regular expressions? what's that?
+ aDocOpt.SetLookUpColRowNames( false ); // default: no natural language refs
pD->SetDocOptions( aDocOpt );
}
@@ -183,7 +183,7 @@ void ImportExcel::ReadFileSharing()
if( (nRecommendReadOnly != 0) || (nPasswordHash != 0) )
{
if( SfxItemSet* pItemSet = GetMedium().GetItemSet() )
- pItemSet->Put( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
+ pItemSet->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
if( SfxObjectShell* pShell = GetDocShell() )
{
@@ -384,7 +384,7 @@ void ImportExcel::Window1()
void ImportExcel::Row25( void )
{
- UINT16 nRow, nRowHeight;
+ sal_uInt16 nRow, nRowHeight;
aIn >> nRow;
aIn.Ignore( 4 ); // Mic und Mac ueberspringen
@@ -400,7 +400,7 @@ void ImportExcel::Row25( void )
}
else
{// -------------------- BIFF5
- UINT16 nGrbit;
+ sal_uInt16 nGrbit;
aIn.Ignore( 2 ); // reserved
aIn >> nGrbit;
@@ -467,8 +467,8 @@ void ImportExcel:: WinProtection( void )
void ImportExcel::Columndefault( void )
{// Default Cell Attributes
- UINT16 nColMic, nColMac;
- BYTE nOpt0;
+ sal_uInt16 nColMic, nColMac;
+ sal_uInt8 nOpt0;
aIn >> nColMic >> nColMac;
@@ -478,9 +478,9 @@ void ImportExcel::Columndefault( void )
nColMac--;
if( nColMac > MAXCOL )
- nColMac = static_cast<UINT16>(MAXCOL);
+ nColMac = static_cast<sal_uInt16>(MAXCOL);
- for( UINT16 nCol = nColMic ; nCol <= nColMac ; nCol++ )
+ for( sal_uInt16 nCol = nColMic ; nCol <= nColMac ; nCol++ )
{
aIn >> nOpt0;
aIn.Ignore( 2 ); // nur 0. Attribut-Byte benutzt
@@ -493,8 +493,8 @@ void ImportExcel::Columndefault( void )
void ImportExcel::Array25( void )
{
- UINT16 nFirstRow, nLastRow, nFormLen;
- BYTE nFirstCol, nLastCol;
+ sal_uInt16 nFirstRow, nLastRow, nFormLen;
+ sal_uInt8 nFirstCol, nLastCol;
aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol;
@@ -532,7 +532,7 @@ void ImportExcel::Array25( void )
void ImportExcel::Rec1904( void )
{
- UINT16 n1904;
+ sal_uInt16 n1904;
aIn >> n1904;
@@ -548,12 +548,12 @@ void ImportExcel::Rec1904( void )
void ImportExcel::Externname25( void )
{
- UINT32 nRes;
- UINT16 nOpt;
+ sal_uInt32 nRes;
+ sal_uInt16 nOpt;
aIn >> nOpt >> nRes;
- String aName( aIn.ReadByteString( FALSE ) );
+ String aName( aIn.ReadByteString( false ) );
if( ( nOpt & 0x0001 ) || ( ( nOpt & 0xFFFE ) == 0x0000 ) )
{// external name
@@ -573,16 +573,16 @@ void ImportExcel::Externname25( void )
void ImportExcel::Colwidth( void )
{// Column Width
- BYTE nColFirst, nColLast;
- UINT16 nColWidth;
+ sal_uInt8 nColFirst, nColLast;
+ sal_uInt16 nColWidth;
aIn >> nColFirst >> nColLast >> nColWidth;
//! TODO: add a check for the unlikely case of changed MAXCOL (-> XclImpAddressConverter)
// if( nColLast > MAXCOL )
-// nColLast = static_cast<UINT16>(MAXCOL);
+// nColLast = static_cast<sal_uInt16>(MAXCOL);
- USHORT nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() );
+ sal_uInt16 nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() );
pColRowBuff->SetWidthRange( nColFirst, nColLast, nScWidth );
}
@@ -641,7 +641,7 @@ void ImportExcel::DefColWidth( void )
long nFontHt = GetFontBuffer().GetAppFontData().mnHeight;
fDefWidth += XclTools::GetXclDefColWidthCorrection( nFontHt );
- USHORT nScWidth = XclTools::GetScColumnWidth( limit_cast< sal_uInt16 >( fDefWidth ), GetCharWidth() );
+ sal_uInt16 nScWidth = XclTools::GetScColumnWidth( limit_cast< sal_uInt16 >( fDefWidth ), GetCharWidth() );
pColRowBuff->SetDefWidth( nScWidth );
}
@@ -653,8 +653,8 @@ void ImportExcel::Builtinfmtcnt( void )
void ImportExcel::Colinfo( void )
{// Column Formatting Information
- UINT16 nColFirst, nColLast, nColWidth, nXF;
- UINT16 nOpt;
+ sal_uInt16 nColFirst, nColLast, nColWidth, nXF;
+ sal_uInt16 nOpt;
aIn >> nColFirst >> nColLast >> nColWidth >> nXF >> nOpt;
@@ -662,7 +662,7 @@ void ImportExcel::Colinfo( void )
return;
if( nColLast > MAXCOL )
- nColLast = static_cast<UINT16>(MAXCOL);
+ nColLast = static_cast<sal_uInt16>(MAXCOL);
bool bHidden = ::get_flag( nOpt, EXC_COLINFO_HIDDEN );
bool bCollapsed = ::get_flag( nOpt, EXC_COLINFO_COLLAPSED );
@@ -672,7 +672,7 @@ void ImportExcel::Colinfo( void )
if( bHidden )
pColRowBuff->HideColRange( nColFirst, nColLast );
- USHORT nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() );
+ sal_uInt16 nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() );
pColRowBuff->SetWidthRange( nColFirst, nColLast, nScWidth );
pColRowBuff->SetDefaultXF( nColFirst, nColLast, nXF );
}
@@ -680,7 +680,7 @@ void ImportExcel::Colinfo( void )
void ImportExcel::Wsbool( void )
{
- UINT16 nFlags;
+ sal_uInt16 nFlags;
aIn >> nFlags;
pRowOutlineBuff->SetButtonMode( ::get_flag( nFlags, EXC_WSBOOL_ROWBELOW ) );
@@ -692,7 +692,7 @@ void ImportExcel::Wsbool( void )
void ImportExcel::Boundsheet( void )
{
- UINT16 nGrbit = 0;
+ sal_uInt16 nGrbit = 0;
if( GetBiff() == EXC_BIFF5 )
{
@@ -702,7 +702,7 @@ void ImportExcel::Boundsheet( void )
aIn >> nGrbit;
}
- String aName( aIn.ReadByteString( FALSE ) );
+ String aName( aIn.ReadByteString( false ) );
SCTAB nScTab = static_cast< SCTAB >( nBdshtTab );
if( nScTab > 0 )
@@ -712,7 +712,7 @@ void ImportExcel::Boundsheet( void )
}
if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) )
- pD->SetVisible( nScTab, FALSE );
+ pD->SetVisible( nScTab, false );
if( !pD->RenameTab( nScTab, aName ) )
{
@@ -746,7 +746,7 @@ void ImportExcel::ReadUsesElfs()
if( maStrm.ReaduInt16() != 0 )
{
ScDocOptions aDocOpt = GetDoc().GetDocOptions();
- aDocOpt.SetLookUpColRowNames( TRUE );
+ aDocOpt.SetLookUpColRowNames( sal_True );
GetDoc().SetDocOptions( aDocOpt );
}
}
@@ -754,7 +754,7 @@ void ImportExcel::ReadUsesElfs()
void ImportExcel::Hideobj( void )
{
- UINT16 nHide;
+ sal_uInt16 nHide;
ScVObjMode eOle, eChart, eDraw;
aIn >> nHide;
@@ -795,15 +795,15 @@ void ImportExcel::Bundleheader( void )
void ImportExcel::Standardwidth( void )
{
- USHORT nScWidth = XclTools::GetScColumnWidth( maStrm.ReaduInt16(), GetCharWidth() );
- pColRowBuff->SetDefWidth( nScWidth, TRUE );
+ sal_uInt16 nScWidth = XclTools::GetScColumnWidth( maStrm.ReaduInt16(), GetCharWidth() );
+ pColRowBuff->SetDefWidth( nScWidth, sal_True );
}
void ImportExcel::Shrfmla( void )
{
- UINT16 nFirstRow, nLastRow, nLenExpr;
- BYTE nFirstCol, nLastCol;
+ sal_uInt16 nFirstRow, nLastRow, nLenExpr;
+ sal_uInt8 nFirstCol, nLastCol;
aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol;
aIn.Ignore( 2 );
@@ -829,8 +829,8 @@ void ImportExcel::Shrfmla( void )
void ImportExcel::Mulrk( void )
{
XclAddress aXclPos;
- UINT16 nXF;
- INT32 nRkNum;
+ sal_uInt16 nXF;
+ sal_Int32 nRkNum;
aIn >> aXclPos;
@@ -851,7 +851,7 @@ void ImportExcel::Mulrk( void )
void ImportExcel::Mulblank( void )
{
XclAddress aXclPos;
- UINT16 nXF;
+ sal_uInt16 nXF;
aIn >> aXclPos;
@@ -927,7 +927,7 @@ void ImportExcel::Olesize( void )
void ImportExcel::Row34( void )
{
- UINT16 nRow, nRowHeight, nGrbit, nXF;
+ sal_uInt16 nRow, nRowHeight, nGrbit, nXF;
aIn >> nRow;
aIn.Ignore( 4 ); // Mic und Mac ueberspringen
@@ -972,8 +972,8 @@ void ImportExcel::Bof3( void )
void ImportExcel::Array34( void )
{
- UINT16 nFirstRow, nLastRow, nFormLen;
- BYTE nFirstCol, nLastCol;
+ sal_uInt16 nFirstRow, nLastRow, nFormLen;
+ sal_uInt8 nFirstCol, nLastCol;
aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol;
aIn.Ignore( (GetBiff() >= EXC_BIFF5) ? 6 : 2 );
@@ -1015,10 +1015,10 @@ void ImportExcel::Defrowheight345( void )
void ImportExcel::TableOp( void )
{
- UINT16 nFirstRow, nLastRow;
- UINT8 nFirstCol, nLastCol;
- UINT16 nGrbit;
- UINT16 nInpRow, nInpCol, nInpRow2, nInpCol2;
+ sal_uInt16 nFirstRow, nLastRow;
+ sal_uInt8 nFirstCol, nLastCol;
+ sal_uInt16 nGrbit;
+ sal_uInt16 nInpRow, nInpCol, nInpRow2, nInpCol2;
aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol >> nGrbit
>> nInpRow >> nInpCol >> nInpRow2 >> nInpCol2;
@@ -1029,50 +1029,50 @@ void ImportExcel::TableOp( void )
{
ScTabOpParam aTabOpParam;
aTabOpParam.nMode = (nGrbit & EXC_TABLEOP_BOTH) ? 2 : ((nGrbit & EXC_TABLEOP_ROW) ? 1 : 0 );
- USHORT nCol = nFirstCol - 1;
- USHORT nRow = nFirstRow - 1;
+ sal_uInt16 nCol = nFirstCol - 1;
+ sal_uInt16 nRow = nFirstRow - 1;
SCTAB nTab = GetCurrScTab();
switch( aTabOpParam.nMode )
{
case 0: // COL
aTabOpParam.aRefFormulaCell.Set(
static_cast<SCCOL>(nFirstCol),
- static_cast<SCROW>(nFirstRow - 1), nTab, FALSE,
- FALSE, FALSE );
+ static_cast<SCROW>(nFirstRow - 1), nTab, false,
+ false, false );
aTabOpParam.aRefFormulaEnd.Set(
static_cast<SCCOL>(nLastCol),
- static_cast<SCROW>(nFirstRow - 1), nTab, FALSE,
- FALSE, FALSE );
+ static_cast<SCROW>(nFirstRow - 1), nTab, false,
+ false, false );
aTabOpParam.aRefColCell.Set( static_cast<SCCOL>(nInpCol),
- static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE,
- FALSE );
+ static_cast<SCROW>(nInpRow), nTab, false, false,
+ false );
nRow++;
break;
case 1: // ROW
aTabOpParam.aRefFormulaCell.Set(
static_cast<SCCOL>(nFirstCol - 1),
- static_cast<SCROW>(nFirstRow), nTab, FALSE, FALSE,
- FALSE );
+ static_cast<SCROW>(nFirstRow), nTab, false, false,
+ false );
aTabOpParam.aRefFormulaEnd.Set(
static_cast<SCCOL>(nFirstCol - 1),
- static_cast<SCROW>(nLastRow), nTab, FALSE, FALSE,
- FALSE );
+ static_cast<SCROW>(nLastRow), nTab, false, false,
+ false );
aTabOpParam.aRefRowCell.Set( static_cast<SCCOL>(nInpCol),
- static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE,
- FALSE );
+ static_cast<SCROW>(nInpRow), nTab, false, false,
+ false );
nCol++;
break;
case 2: // TWO-INPUT
aTabOpParam.aRefFormulaCell.Set(
static_cast<SCCOL>(nFirstCol - 1),
- static_cast<SCROW>(nFirstRow - 1), nTab, FALSE,
- FALSE, FALSE );
+ static_cast<SCROW>(nFirstRow - 1), nTab, false,
+ false, false );
aTabOpParam.aRefRowCell.Set( static_cast<SCCOL>(nInpCol),
- static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE,
- FALSE );
+ static_cast<SCROW>(nInpRow), nTab, false, false,
+ false );
aTabOpParam.aRefColCell.Set( static_cast<SCCOL>(nInpCol2),
- static_cast<SCROW>(nInpRow2), nTab, FALSE, FALSE,
- FALSE );
+ static_cast<SCROW>(nInpRow2), nTab, false, false,
+ false );
break;
}
@@ -1085,7 +1085,7 @@ void ImportExcel::TableOp( void )
}
else
{
- bTabTruncated = TRUE;
+ bTabTruncated = sal_True;
GetTracer().TraceInvalidRow(GetCurrScTab(), nLastRow, MAXROW);
}
}
@@ -1112,7 +1112,7 @@ void ImportExcel::Bof4( void )
void ImportExcel::Bof5( void )
{
//POST: eDateiTyp = Typ der zu lesenden Datei
- UINT16 nSubType, nVers;
+ sal_uInt16 nSubType, nVers;
BiffTyp eDatei;
maStrm.DisableDecryption();
@@ -1176,7 +1176,7 @@ void ImportExcel::NeueTabelle( void )
}
-const ScTokenArray* ImportExcel::ErrorToFormula( BYTE bErrOrVal, BYTE nError, double& rVal )
+const ScTokenArray* ImportExcel::ErrorToFormula( sal_uInt8 bErrOrVal, sal_uInt8 nError, double& rVal )
{
return pFormConv->GetBoolErr( XclTools::ErrorToEnum( rVal, bErrOrVal, nError ) );
}
@@ -1259,7 +1259,7 @@ void ImportExcel::PostDocLoad( void )
{
for( SCTAB n = 0 ; n < nLast ; n++ )
{
- p = pExcRoot->pPrintRanges->First( static_cast<UINT16>(n) );
+ p = pExcRoot->pPrintRanges->First( static_cast<sal_uInt16>(n) );
if( p )
{
DBG_ASSERT( pExcRoot->pPrintRanges->HasActList(),
@@ -1285,27 +1285,27 @@ void ImportExcel::PostDocLoad( void )
{
for( SCTAB n = 0 ; n < nLast ; n++ )
{
- p = pExcRoot->pPrintTitles->First( static_cast<UINT16>(n) );
+ p = pExcRoot->pPrintTitles->First( static_cast<sal_uInt16>(n) );
if( p )
{
DBG_ASSERT( pExcRoot->pPrintTitles->HasActList(),
"-ImportExcel::PostDocLoad(): Imaginaere Tabelle gefunden!" );
- BOOL bRowVirgin = TRUE;
- BOOL bColVirgin = TRUE;
+ sal_Bool bRowVirgin = sal_True;
+ sal_Bool bColVirgin = sal_True;
while( p )
{
if( p->aStart.Col() == 0 && p->aEnd.Col() == MAXCOL && bRowVirgin )
{
pD->SetRepeatRowRange( n, p );
- bRowVirgin = FALSE;
+ bRowVirgin = false;
}
if( p->aStart.Row() == 0 && p->aEnd.Row() == MAXROW && bColVirgin )
{
pD->SetRepeatColRange( n, p );
- bColVirgin = FALSE;
+ bColVirgin = false;
}
p = pExcRoot->pPrintTitles->Next();
@@ -1330,10 +1330,10 @@ XclImpOutlineDataBuffer::~XclImpOutlineDataBuffer()
void XclImpOutlineDataBuffer::Convert()
{
- mxColOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, TRUE )->GetColArray() );
+ mxColOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, sal_True )->GetColArray() );
mxColOutlineBuff->MakeScOutline();
- mxRowOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, TRUE )->GetRowArray() );
+ mxRowOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, sal_True )->GetRowArray() );
mxRowOutlineBuff->MakeScOutline();
mxColRowBuff->ConvertHiddenFlags( mnScTab );
diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx
index 42ebd6d4c5a2..fe388a218e95 100644
--- a/sc/source/filter/excel/namebuff.cxx
+++ b/sc/source/filter/excel/namebuff.cxx
@@ -45,16 +45,16 @@
#include "xiroot.hxx"
-UINT32 StringHashEntry::MakeHashCode( const String& r )
+sal_uInt32 StringHashEntry::MakeHashCode( const String& r )
{
- register UINT32 n = 0;
+ register sal_uInt32 n = 0;
const sal_Unicode* pAkt = r.GetBuffer();
register sal_Unicode cAkt = *pAkt;
while( cAkt )
{
n *= 70;
- n += ( UINT32 ) cAkt;
+ n += ( sal_uInt32 ) cAkt;
pAkt++;
cAkt = *pAkt;
}
@@ -87,14 +87,14 @@ void NameBuffer::operator <<( const String &rNewString )
#ifdef DBG_UTIL
-UINT16 nShrCnt;
+sal_uInt16 nShrCnt;
#endif
size_t ShrfmlaBuffer::ScAddressHashFunc::operator() (const ScAddress &addr) const
{
// Use something simple, it is just a hash.
- return static_cast< UINT16 >( addr.Row() ) | (static_cast< UINT8 >( addr.Col() ) << 16);
+ return static_cast< sal_uInt16 >( addr.Row() ) | (static_cast< sal_uInt8 >( addr.Col() ) << 16);
}
const size_t nBase = 16384; // Range~ und Shared~ Dingens mit jeweils der Haelfte Ids
@@ -128,15 +128,15 @@ void ShrfmlaBuffer::Store( const ScRange& rRange, const ScTokenArray& rToken )
const ScAddress& rMaxPos = pExcRoot->pIR->GetMaxPos();
pData->SetMaxCol(rMaxPos.Col());
pData->SetMaxRow(rMaxPos.Row());
- pData->SetIndex( static_cast< USHORT >( mnCurrIdx ) );
+ pData->SetIndex( static_cast< sal_uInt16 >( mnCurrIdx ) );
pExcRoot->pIR->GetNamedRanges().insert( pData );
- index_hash[rRange.aStart] = static_cast< USHORT >( mnCurrIdx );
+ index_hash[rRange.aStart] = static_cast< sal_uInt16 >( mnCurrIdx );
index_list.push_front (rRange);
++mnCurrIdx;
}
-USHORT ShrfmlaBuffer::Find( const ScAddress & aAddr ) const
+sal_uInt16 ShrfmlaBuffer::Find( const ScAddress & aAddr ) const
{
ShrfmlaHash::const_iterator hash = index_hash.find (aAddr);
if (hash != index_hash.end())
@@ -146,8 +146,8 @@ USHORT ShrfmlaBuffer::Find( const ScAddress & aAddr ) const
unsigned int ind = nBase;
for (ShrfmlaList::const_iterator ptr = index_list.end(); ptr != index_list.begin() ; ind++)
if ((--ptr)->In (aAddr))
- return static_cast< USHORT >( ind );
- return static_cast< USHORT >( mnCurrIdx );
+ return static_cast< sal_uInt16 >( ind );
+ return static_cast< sal_uInt16 >( mnCurrIdx );
}
@@ -181,7 +181,7 @@ ExtSheetBuffer::~ExtSheetBuffer()
}
-sal_Int16 ExtSheetBuffer::Add( const String& rFPAN, const String& rTN, const BOOL bSWB )
+sal_Int16 ExtSheetBuffer::Add( const String& rFPAN, const String& rTN, const sal_Bool bSWB )
{
List::Insert( new Cont( rFPAN, rTN, bSWB ), LIST_APPEND );
// return 1-based index of EXTERNSHEET
@@ -189,21 +189,21 @@ sal_Int16 ExtSheetBuffer::Add( const String& rFPAN, const String& rTN, const BOO
}
-BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex )
+sal_Bool ExtSheetBuffer::GetScTabIndex( sal_uInt16 nExcIndex, sal_uInt16& rScIndex )
{
DBG_ASSERT( nExcIndex,
"*ExtSheetBuffer::GetScTabIndex(): Sheet-Index == 0!" );
nExcIndex--;
Cont* pCur = ( Cont * ) List::GetObject( nExcIndex );
- UINT16& rTabNum = pCur->nTabNum;
+ sal_uInt16& rTabNum = pCur->nTabNum;
if( pCur )
{
if( rTabNum < 0xFFFD )
{
rScIndex = rTabNum;
- return TRUE;
+ return sal_True;
}
if( rTabNum == 0xFFFF )
@@ -213,8 +213,8 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex )
{// Tabelle ist im selben Workbook!
if( pExcRoot->pIR->GetDoc().GetTable( pCur->aTab, nNewTabNum ) )
{
- rScIndex = rTabNum = static_cast<UINT16>(nNewTabNum);
- return TRUE;
+ rScIndex = rTabNum = static_cast<sal_uInt16>(nNewTabNum);
+ return sal_True;
}
else
rTabNum = 0xFFFD;
@@ -228,8 +228,8 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex )
String aTabName( ScGlobal::GetDocTabName( aURL, pCur->aTab ) );
if( pExcRoot->pIR->GetDoc().LinkExternalTab( nNewTabNum, aTabName, aURL, pCur->aTab ) )
{
- rScIndex = rTabNum = static_cast<UINT16>(nNewTabNum);
- return TRUE;
+ rScIndex = rTabNum = static_cast<sal_uInt16>(nNewTabNum);
+ return sal_True;
}
else
rTabNum = 0xFFFE; // Tabelle einmal nicht angelegt -> wird
@@ -242,11 +242,11 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex )
}
}
- return FALSE;
+ return false;
}
-BOOL ExtSheetBuffer::IsLink( const UINT16 nExcIndex ) const
+sal_Bool ExtSheetBuffer::IsLink( const sal_uInt16 nExcIndex ) const
{
DBG_ASSERT( nExcIndex > 0, "*ExtSheetBuffer::IsLink(): Index muss >0 sein!" );
Cont* pRet = ( Cont * ) List::GetObject( nExcIndex - 1 );
@@ -254,11 +254,11 @@ BOOL ExtSheetBuffer::IsLink( const UINT16 nExcIndex ) const
if( pRet )
return pRet->bLink;
else
- return FALSE;
+ return false;
}
-BOOL ExtSheetBuffer::GetLink( const UINT16 nExcIndex, String& rAppl, String& rDoc ) const
+sal_Bool ExtSheetBuffer::GetLink( const sal_uInt16 nExcIndex, String& rAppl, String& rDoc ) const
{
DBG_ASSERT( nExcIndex > 0, "*ExtSheetBuffer::GetLink(): Index muss >0 sein!" );
Cont* pRet = ( Cont * ) List::GetObject( nExcIndex - 1 );
@@ -267,10 +267,10 @@ BOOL ExtSheetBuffer::GetLink( const UINT16 nExcIndex, String& rAppl, String& rDo
{
rAppl = pRet->aFile;
rDoc = pRet->aTab;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
@@ -289,13 +289,13 @@ void ExtSheetBuffer::Reset( void )
-BOOL ExtName::IsDDE( void ) const
+sal_Bool ExtName::IsDDE( void ) const
{
return ( nFlags & 0x0001 ) != 0;
}
-BOOL ExtName::IsOLE( void ) const
+sal_Bool ExtName::IsOLE( void ) const
{
return ( nFlags & 0x0002 ) != 0;
}
@@ -314,7 +314,7 @@ void ExtNameBuff::AddDDE( const String& rName, sal_Int16 nRefIdx )
}
-void ExtNameBuff::AddOLE( const String& rName, sal_Int16 nRefIdx, UINT32 nStorageId )
+void ExtNameBuff::AddOLE( const String& rName, sal_Int16 nRefIdx, sal_uInt32 nStorageId )
{
ExtName aNew( rName, 0x0002 );
aNew.nStorageId = nStorageId;
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 3e4227062863..07a8ba1aaf03 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -719,7 +719,7 @@ FltError ImportExcel::Read( void )
break;
case Biff5V:
default:
- pD->SetVisible( GetCurrScTab(), FALSE );
+ pD->SetVisible( GetCurrScTab(), false );
ePrev = eAkt;
eAkt = Z_Biffn0;
}
@@ -779,7 +779,7 @@ FltError ImportExcel8::Read( void )
{
#if EXC_INCL_DUMPER
{
- Biff8RecDumper aDumper( GetRoot(), TRUE );
+ Biff8RecDumper aDumper( GetRoot(), sal_True );
if( aDumper.Dump( aIn ) )
return ERRCODE_ABORT;
}
@@ -1058,7 +1058,7 @@ FltError ImportExcel8::Read( void )
case Biff8V: // VB module
default:
// TODO: do not create a sheet in the Calc document
- pD->SetVisible( GetCurrScTab(), FALSE );
+ pD->SetVisible( GetCurrScTab(), false );
XclTools::SkipSubStream( maStrm );
IncCurrScTab();
}
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index 3959019382b0..9c144b3d00e8 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -41,10 +41,10 @@
#include <stdio.h> // printf
-const UINT16 TokenPool::nScTokenOff = 8192;
+const sal_uInt16 TokenPool::nScTokenOff = 8192;
-TokenStack::TokenStack( UINT16 nNewSize )
+TokenStack::TokenStack( sal_uInt16 nNewSize )
{
pStack = new TokenId[ nNewSize ];
@@ -70,17 +70,17 @@ TokenStack::~TokenStack()
TokenPool::TokenPool( void )
{
- UINT16 nLauf = nScTokenOff;
+ sal_uInt16 nLauf = nScTokenOff;
// Sammelstelle fuer Id-Folgen
nP_Id = 256;
- pP_Id = new UINT16[ nP_Id ];
+ pP_Id = new sal_uInt16[ nP_Id ];
// Sammelstelle fuer Ids
nElement = 32;
- pElement = new UINT16[ nElement ];
+ pElement = new sal_uInt16[ nElement ];
pType = new E_TYPE[ nElement ];
- pSize = new UINT16[ nElement ];
+ pSize = new sal_uInt16[ nElement ];
nP_IdLast = 0;
// Sammelstelle fuer Strings
@@ -95,7 +95,7 @@ TokenPool::TokenPool( void )
// Sammelstelle fuer error codes
nP_Err = 8;
- pP_Err = new USHORT[ nP_Err ];
+ pP_Err = new sal_uInt16[ nP_Err ];
// Sammelstellen fuer Referenzen
nP_RefTr = 32;
@@ -123,7 +123,7 @@ TokenPool::TokenPool( void )
TokenPool::~TokenPool()
{
- UINT16 n;
+ sal_uInt16 n;
delete[] pP_Id;
delete[] pElement;
@@ -173,8 +173,8 @@ TokenPool::~TokenPool()
void TokenPool::GrowString( void )
{
- UINT16 nP_StrNew = nP_Str * 2;
- UINT16 nL;
+ sal_uInt16 nP_StrNew = nP_Str * 2;
+ sal_uInt16 nL;
String** ppP_StrNew = new String *[ nP_StrNew ];
@@ -192,11 +192,11 @@ void TokenPool::GrowString( void )
void TokenPool::GrowDouble( void )
{
- UINT16 nP_DblNew = nP_Dbl * 2;
+ sal_uInt16 nP_DblNew = nP_Dbl * 2;
double* pP_DblNew = new double[ nP_DblNew ];
- for( UINT16 nL = 0 ; nL < nP_Dbl ; nL++ )
+ for( sal_uInt16 nL = 0 ; nL < nP_Dbl ; nL++ )
pP_DblNew[ nL ] = pP_Dbl[ nL ];
nP_Dbl = nP_DblNew;
@@ -207,8 +207,8 @@ void TokenPool::GrowDouble( void )
void TokenPool::GrowTripel( void )
{
- UINT16 nP_RefTrNew = nP_RefTr * 2;
- UINT16 nL;
+ sal_uInt16 nP_RefTrNew = nP_RefTr * 2;
+ sal_uInt16 nL;
ScSingleRefData** ppP_RefTrNew = new ScSingleRefData *[ nP_RefTrNew ];
@@ -226,11 +226,11 @@ void TokenPool::GrowTripel( void )
void TokenPool::GrowId( void )
{
- UINT16 nP_IdNew = nP_Id * 2;
+ sal_uInt16 nP_IdNew = nP_Id * 2;
- UINT16* pP_IdNew = new UINT16[ nP_IdNew ];
+ sal_uInt16* pP_IdNew = new sal_uInt16[ nP_IdNew ];
- for( UINT16 nL = 0 ; nL < nP_Id ; nL++ )
+ for( sal_uInt16 nL = 0 ; nL < nP_Id ; nL++ )
pP_IdNew[ nL ] = pP_Id[ nL ];
nP_Id = nP_IdNew;
@@ -242,13 +242,13 @@ void TokenPool::GrowId( void )
void TokenPool::GrowElement( void )
{
- UINT16 nElementNew = nElement * 2;
+ sal_uInt16 nElementNew = nElement * 2;
- UINT16* pElementNew = new UINT16[ nElementNew ];
+ sal_uInt16* pElementNew = new sal_uInt16[ nElementNew ];
E_TYPE* pTypeNew = new E_TYPE[ nElementNew ];
- UINT16* pSizeNew = new UINT16[ nElementNew ];
+ sal_uInt16* pSizeNew = new sal_uInt16[ nElementNew ];
- for( UINT16 nL = 0 ; nL < nElement ; nL++ )
+ for( sal_uInt16 nL = 0 ; nL < nElement ; nL++ )
{
pElementNew[ nL ] = pElement[ nL ];
pTypeNew[ nL ] = pType[ nL ];
@@ -268,7 +268,7 @@ void TokenPool::GrowElement( void )
void TokenPool::GrowExt( void )
{
- UINT16 nNewSize = nP_Ext * 2;
+ sal_uInt16 nNewSize = nP_Ext * 2;
EXTCONT** ppNew = new EXTCONT*[ nNewSize ];
@@ -283,7 +283,7 @@ void TokenPool::GrowExt( void )
void TokenPool::GrowNlf( void )
{
- UINT16 nNewSize = nP_Nlf * 2;
+ sal_uInt16 nNewSize = nP_Nlf * 2;
NLFCONT** ppNew = new NLFCONT*[ nNewSize ];
@@ -298,7 +298,7 @@ void TokenPool::GrowNlf( void )
void TokenPool::GrowMatrix( void )
{
- UINT16 nNewSize = nP_Matrix * 2;
+ sal_uInt16 nNewSize = nP_Matrix * 2;
ScMatrix** ppNew = new ScMatrix*[ nNewSize ];
@@ -310,7 +310,7 @@ void TokenPool::GrowMatrix( void )
nP_Matrix = nNewSize;
}
-void TokenPool::GetElement( const UINT16 nId )
+void TokenPool::GetElement( const sal_uInt16 nId )
{
DBG_ASSERT( nId < nElementAkt, "*TokenPool::GetElement(): Id zu gross!?" );
@@ -334,7 +334,7 @@ void TokenPool::GetElement( const UINT16 nId )
case T_Err:
break;
case T_RefC:
- pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (UINT16) nId ] ] );
+ pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (sal_uInt16) nId ] ] );
break;
case T_RefA:
{
@@ -349,7 +349,7 @@ void TokenPool::GetElement( const UINT16 nId )
break;
case T_Ext:
{
- UINT16 n = pElement[ nId ];
+ sal_uInt16 n = pElement[ nId ];
EXTCONT* p = ( n < nP_Ext )? ppP_Ext[ n ] : NULL;
if( p )
@@ -363,7 +363,7 @@ void TokenPool::GetElement( const UINT16 nId )
break;
case T_Nlf:
{
- UINT16 n = pElement[ nId ];
+ sal_uInt16 n = pElement[ nId ];
NLFCONT* p = ( n < nP_Nlf )? ppP_Nlf[ n ] : NULL;
if( p )
@@ -372,7 +372,7 @@ void TokenPool::GetElement( const UINT16 nId )
break;
case T_Matrix:
{
- UINT16 n = pElement[ nId ];
+ sal_uInt16 n = pElement[ nId ];
ScMatrix* p = ( n < nP_Matrix )? ppP_Matrix[ n ] : NULL;
if( p )
@@ -381,7 +381,7 @@ void TokenPool::GetElement( const UINT16 nId )
break;
case T_ExtName:
{
- UINT16 n = pElement[nId];
+ sal_uInt16 n = pElement[nId];
if (n < maExtNames.size())
{
const ExtName& r = maExtNames[n];
@@ -390,7 +390,7 @@ void TokenPool::GetElement( const UINT16 nId )
}
case T_ExtRefC:
{
- UINT16 n = pElement[nId];
+ sal_uInt16 n = pElement[nId];
if (n < maExtCellRefs.size())
{
const ExtCellRef& r = maExtCellRefs[n];
@@ -399,7 +399,7 @@ void TokenPool::GetElement( const UINT16 nId )
}
case T_ExtRefA:
{
- UINT16 n = pElement[nId];
+ sal_uInt16 n = pElement[nId];
if (n < maExtAreaRefs.size())
{
const ExtAreaRef& r = maExtAreaRefs[n];
@@ -414,7 +414,7 @@ void TokenPool::GetElement( const UINT16 nId )
}
-void TokenPool::GetElementRek( const UINT16 nId )
+void TokenPool::GetElementRek( const sal_uInt16 nId )
{
#ifdef DBG_UTIL
nRek++;
@@ -426,8 +426,8 @@ void TokenPool::GetElementRek( const UINT16 nId )
DBG_ASSERT( pType[ nId ] == T_Id, "-TokenPool::GetElementRek(): nId nicht Id-Folge!" );
- UINT16 nAnz = pSize[ nId ];
- UINT16* pAkt = &pP_Id[ pElement[ nId ] ];
+ sal_uInt16 nAnz = pSize[ nId ];
+ sal_uInt16* pAkt = &pP_Id[ pElement[ nId ] ];
for( ; nAnz > 0 ; nAnz--, pAkt++ )
{
if( *pAkt < nScTokenOff )
@@ -461,7 +461,7 @@ void TokenPool::GetElementRek( const UINT16 nId )
break;
case T_Ext:
{
- UINT16 n = pElement[ *pAkt ];
+ sal_uInt16 n = pElement[ *pAkt ];
EXTCONT* p = ( n < nP_Ext )? ppP_Ext[ n ] : NULL;
if( p )
@@ -470,7 +470,7 @@ void TokenPool::GetElementRek( const UINT16 nId )
break;
case T_Nlf:
{
- UINT16 n = pElement[ *pAkt ];
+ sal_uInt16 n = pElement[ *pAkt ];
NLFCONT* p = ( n < nP_Nlf )? ppP_Nlf[ n ] : NULL;
if( p )
@@ -479,7 +479,7 @@ void TokenPool::GetElementRek( const UINT16 nId )
break;
case T_Matrix:
{
- UINT16 n = pElement[ *pAkt ];
+ sal_uInt16 n = pElement[ *pAkt ];
ScMatrix* p = ( n < nP_Matrix )? ppP_Matrix[ n ] : NULL;
if( p )
@@ -488,7 +488,7 @@ void TokenPool::GetElementRek( const UINT16 nId )
break;
case T_ExtName:
{
- UINT16 n = pElement[*pAkt];
+ sal_uInt16 n = pElement[*pAkt];
if (n < maExtNames.size())
{
const ExtName& r = maExtNames[n];
@@ -497,7 +497,7 @@ void TokenPool::GetElementRek( const UINT16 nId )
}
case T_ExtRefC:
{
- UINT16 n = pElement[*pAkt];
+ sal_uInt16 n = pElement[*pAkt];
if (n < maExtCellRefs.size())
{
const ExtCellRef& r = maExtCellRefs[n];
@@ -506,7 +506,7 @@ void TokenPool::GetElementRek( const UINT16 nId )
}
case T_ExtRefA:
{
- UINT16 n = pElement[*pAkt];
+ sal_uInt16 n = pElement[*pAkt];
if (n < maExtAreaRefs.size())
{
const ExtAreaRef& r = maExtAreaRefs[n];
@@ -568,7 +568,7 @@ const TokenId TokenPool::Store( const double& rDouble )
}
-const TokenId TokenPool::Store( const UINT16 nIndex )
+const TokenId TokenPool::Store( const sal_uInt16 nIndex )
{
if( nElementAkt >= nElement )
GrowElement();
@@ -604,7 +604,7 @@ const TokenId TokenPool::Store( const String& rString )
DBG_ASSERT( sizeof( xub_StrLen ) <= 2, "*TokenPool::Store(): StrLen doesn't match!" );
- pSize[ nElementAkt ] = ( UINT16 ) ppP_Str[ nP_StrAkt ]->Len();
+ pSize[ nElementAkt ] = ( sal_uInt16 ) ppP_Str[ nP_StrAkt ]->Len();
nElementAkt++;
nP_StrAkt++;
@@ -743,7 +743,7 @@ const TokenId TokenPool::StoreExtName( sal_uInt16 nFileId, const String& rName )
if ( nElementAkt >= nElement )
GrowElement();
- pElement[nElementAkt] = static_cast<UINT16>(maExtNames.size());
+ pElement[nElementAkt] = static_cast<sal_uInt16>(maExtNames.size());
pType[nElementAkt] = T_ExtName;
maExtNames.push_back(ExtName());
@@ -761,7 +761,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const String& rTabName
if ( nElementAkt >= nElement )
GrowElement();
- pElement[nElementAkt] = static_cast<UINT16>(maExtCellRefs.size());
+ pElement[nElementAkt] = static_cast<sal_uInt16>(maExtCellRefs.size());
pType[nElementAkt] = T_ExtRefC;
maExtCellRefs.push_back(ExtCellRef());
@@ -780,7 +780,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const String& rTabName
if ( nElementAkt >= nElement )
GrowElement();
- pElement[nElementAkt] = static_cast<UINT16>(maExtAreaRefs.size());
+ pElement[nElementAkt] = static_cast<sal_uInt16>(maExtAreaRefs.size());
pType[nElementAkt] = T_ExtRefA;
maExtAreaRefs.push_back(ExtAreaRef());
@@ -803,9 +803,9 @@ void TokenPool::Reset( void )
}
-BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const
+sal_Bool TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const
{
- UINT16 nId = (UINT16) rId;
+ sal_uInt16 nId = (sal_uInt16) rId;
if( nId && nId <= nElementAkt )
{// existent?
nId--;
@@ -813,7 +813,7 @@ BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const
{// Tokenfolge?
if( pSize[ nId ] == 1 )
{// GENAU 1 Token
- UINT16 nSecId = pP_Id[ pElement[ nId ] ];
+ sal_uInt16 nSecId = pP_Id[ pElement[ nId ] ];
if( nSecId >= nScTokenOff )
{// Default-Token?
return ( DefTokenId ) ( nSecId - nScTokenOff ) == eId; // Gesuchter?
@@ -822,13 +822,13 @@ BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const
}
}
- return FALSE;
+ return false;
}
const String* TokenPool::GetExternal( const TokenId& rId ) const
{
const String* p = NULL;
- UINT16 n = (UINT16) rId;
+ sal_uInt16 n = (sal_uInt16) rId;
if( n && n <= nElementAkt )
{
n--;
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index a5f47770e4a2..ebf622b080c5 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -38,9 +38,13 @@
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart/ChartAxisPosition.hpp>
+#include <com/sun/star/chart/ChartLegendExpansion.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
+#include <com/sun/star/chart/TimeInterval.hpp>
+#include <com/sun/star/chart/TimeUnit.hpp>
+#include <com/sun/star/chart/XAxisSupplier.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart/XDiagramPositioning.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -56,9 +60,9 @@
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
-#include <com/sun/star/chart2/LegendExpansion.hpp>
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
#include <com/sun/star/chart2/TickmarkStyle.hpp>
@@ -93,6 +97,7 @@ using ::com::sun::star::drawing::XShapes;
using ::com::sun::star::chart2::IncrementData;
using ::com::sun::star::chart2::RelativePosition;
+using ::com::sun::star::chart2::RelativeSize;
using ::com::sun::star::chart2::ScaleData;
using ::com::sun::star::chart2::SubIncrement;
using ::com::sun::star::chart2::XAxis;
@@ -181,6 +186,56 @@ bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, bool bLogSc
return bIsAuto;
}
+sal_uInt16 lclGetTimeValue( const XclExpRoot& rRoot, double fSerialDate, sal_uInt16 nTimeUnit )
+{
+ DateTime aDateTime = rRoot.GetDateTimeFromDouble( fSerialDate );
+ switch( nTimeUnit )
+ {
+ case EXC_CHDATERANGE_DAYS:
+ return ::limit_cast< sal_uInt16, double >( fSerialDate, 0, SAL_MAX_UINT16 );
+ case EXC_CHDATERANGE_MONTHS:
+ return ::limit_cast< sal_uInt16, sal_uInt16 >( 12 * (aDateTime.GetYear() - rRoot.GetBaseYear()) + aDateTime.GetMonth() - 1, 0, SAL_MAX_INT16 );
+ case EXC_CHDATERANGE_YEARS:
+ return ::limit_cast< sal_uInt16, sal_uInt16 >( aDateTime.GetYear() - rRoot.GetBaseYear(), 0, SAL_MAX_INT16 );
+ default:
+ OSL_ENSURE( false, "lclGetTimeValue - unexpected time unit" );
+ }
+ return ::limit_cast< sal_uInt16, double >( fSerialDate, 0, SAL_MAX_UINT16 );
+}
+
+bool lclConvertTimeValue( const XclExpRoot& rRoot, sal_uInt16& rnValue, const Any& rAny, sal_uInt16 nTimeUnit )
+{
+ double fSerialDate = 0;
+ bool bAuto = lclIsAutoAnyOrGetValue( fSerialDate, rAny );
+ if( !bAuto )
+ rnValue = lclGetTimeValue( rRoot, fSerialDate, nTimeUnit );
+ return bAuto;
+}
+
+sal_uInt16 lclGetTimeUnit( sal_Int32 nApiTimeUnit )
+{
+ switch( nApiTimeUnit )
+ {
+ case cssc::TimeUnit::DAY: return EXC_CHDATERANGE_DAYS;
+ case cssc::TimeUnit::MONTH: return EXC_CHDATERANGE_MONTHS;
+ case cssc::TimeUnit::YEAR: return EXC_CHDATERANGE_YEARS;
+ default: OSL_ENSURE( false, "lclGetTimeUnit - unexpected time unit" );
+ }
+ return EXC_CHDATERANGE_DAYS;
+}
+
+bool lclConvertTimeInterval( sal_uInt16 rnValue, sal_uInt16& rnTimeUnit, const Any& rAny )
+{
+ cssc::TimeInterval aInterval;
+ bool bAuto = lclIsAutoAnyOrGetValue( aInterval, rAny );
+ if( !bAuto )
+ {
+ rnValue = ::limit_cast< sal_uInt16, sal_Int32 >( aInterval.Number, 1, SAL_MAX_UINT16 );
+ rnTimeUnit = lclGetTimeUnit( aInterval.TimeUnit );
+ }
+ return bAuto;
+}
+
} // namespace
// Common =====================================================================
@@ -769,6 +824,12 @@ void XclExpChFrame::Convert( const ScfPropertySet& rPropSet )
ConvertFrameBase( GetChRoot(), rPropSet, meObjType );
}
+void XclExpChFrame::SetAutoFlags( bool bAutoPos, bool bAutoSize )
+{
+ ::set_flag( maData.mnFlags, EXC_CHFRAME_AUTOPOS, bAutoPos );
+ ::set_flag( maData.mnFlags, EXC_CHFRAME_AUTOSIZE, bAutoSize );
+}
+
bool XclExpChFrame::IsDefault() const
{
return IsDefaultFrameBase( GetFormatInfo( meObjType ).meDefFrameType );
@@ -1286,7 +1347,7 @@ bool XclExpChText::ConvertDataLabel( const ScfPropertySet& rPropSet,
sal_uInt16 nLabelPos = EXC_CHTEXT_POS_AUTO;
if( rPropSet.GetProperty( nPlacement, EXC_CHPROP_LABELPLACEMENT ) )
{
- using namespace ::com::sun::star::chart::DataLabelPlacement;
+ using namespace cssc::DataLabelPlacement;
if( nPlacement == rTypeInfo.mnDefaultLabelPos )
{
nLabelPos = EXC_CHTEXT_POS_DEFAULT;
@@ -1507,7 +1568,7 @@ void XclExpCh3dDataFormat::Convert( const ScfPropertySet& rPropSet )
sal_Int32 nApiType(0);
if( rPropSet.GetProperty( nApiType, EXC_CHPROP_GEOMETRY3D ) )
{
- using namespace ::com::sun::star::chart2::DataPointGeometry3D;
+ using namespace cssc2::DataPointGeometry3D;
switch( nApiType )
{
case CUBOID:
@@ -2252,33 +2313,52 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet )
mxText.reset( new XclExpChText( GetChRoot() ) );
mxText->ConvertLegend( rPropSet );
- // legend position
- Any aRelPosAny;
+ // legend position and size
+ Any aRelPosAny, aRelSizeAny;
rPropSet.GetAnyProperty( aRelPosAny, EXC_CHPROP_RELATIVEPOSITION );
- if( aRelPosAny.has< RelativePosition >() )
+ rPropSet.GetAnyProperty( aRelSizeAny, EXC_CHPROP_RELATIVESIZE );
+ cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
+ rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION );
+ if( aRelPosAny.has< RelativePosition >() || ((eApiExpand == cssc::ChartLegendExpansion_CUSTOM) && aRelSizeAny.has< RelativeSize >()) )
{
try
{
- /* The 'RelativePosition' property is used as indicator of manually
- changed legend position, but due to the different anchor modes
- used by this property (in the RelativePosition.Anchor member)
- it cannot be used to calculate the position easily. For this,
- the Chart1 API will be used instead. */
- Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW );
+ /* The 'RelativePosition' or 'RelativeSize' properties are used as
+ indicator of manually changed legend position/size, but due to
+ the different anchor modes used by this property (in the
+ RelativePosition.Anchor member) it cannot be used to calculate
+ the position easily. For this, the Chart1 API will be used
+ instead. */
+ Reference< cssc::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW );
Reference< XShape > xChart1Legend( xChart1Doc->getLegend(), UNO_SET_THROW );
// coordinates in CHLEGEND record written but not used by Excel
mxFramePos.reset( new XclExpChFramePos( EXC_CHFRAMEPOS_CHARTSIZE, EXC_CHFRAMEPOS_PARENT ) );
XclChFramePos& rFramePos = mxFramePos->GetFramePosData();
- rFramePos.maRect.mnX = maData.maRect.mnX = CalcChartXFromHmm( xChart1Legend->getPosition().X );
- rFramePos.maRect.mnY = maData.maRect.mnY = CalcChartYFromHmm( xChart1Legend->getPosition().Y );
+ rFramePos.mnTLMode = EXC_CHFRAMEPOS_CHARTSIZE;
+ ::com::sun::star::awt::Point aLegendPos = xChart1Legend->getPosition();
+ rFramePos.maRect.mnX = maData.maRect.mnX = CalcChartXFromHmm( aLegendPos.X );
+ rFramePos.maRect.mnY = maData.maRect.mnY = CalcChartYFromHmm( aLegendPos.Y );
+ // legend size, Excel expects points in CHFRAMEPOS record
+ rFramePos.mnBRMode = EXC_CHFRAMEPOS_ABSSIZE_POINTS;
+ ::com::sun::star::awt::Size aLegendSize = xChart1Legend->getSize();
+ rFramePos.maRect.mnWidth = static_cast< sal_uInt16 >( aLegendSize.Width * EXC_POINTS_PER_HMM + 0.5 );
+ rFramePos.maRect.mnHeight = static_cast< sal_uInt16 >( aLegendSize.Height * EXC_POINTS_PER_HMM + 0.5 );
+ maData.maRect.mnWidth = CalcChartXFromHmm( aLegendSize.Width );
+ maData.maRect.mnHeight = CalcChartYFromHmm( aLegendSize.Height );
+ eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
// manual legend position implies manual plot area
GetChartData().SetManualPlotArea();
maData.mnDockMode = EXC_CHLEGEND_NOTDOCKED;
+ // a CHFRAME record with cleared auto flags is needed
+ if( !mxFrame )
+ mxFrame.reset( new XclExpChFrame( GetChRoot(), EXC_CHOBJTYPE_LEGEND ) );
+ mxFrame->SetAutoFlags( false, false );
}
catch( Exception& )
{
OSL_ENSURE( false, "XclExpChLegend::Convert - cannot get legend shape" );
maData.mnDockMode = EXC_CHLEGEND_RIGHT;
+ eApiExpand = cssc::ChartLegendExpansion_HIGH;
}
}
else
@@ -2294,13 +2374,10 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet )
default:
OSL_ENSURE( false, "XclExpChLegend::Convert - unrecognized legend position" );
maData.mnDockMode = EXC_CHLEGEND_RIGHT;
+ eApiExpand = cssc::ChartLegendExpansion_HIGH;
}
}
-
- // legend expansion
- cssc2::LegendExpansion eApiExpand = cssc2::LegendExpansion_BALANCED;
- rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION );
- ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand != cssc2::LegendExpansion_WIDE );
+ ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand == cssc::ChartLegendExpansion_HIGH );
// other flags
::set_flag( maData.mnFlags, EXC_CHLEGEND_AUTOSERIES );
@@ -2366,9 +2443,9 @@ void XclExpChTypeGroup::ConvertType(
// spline - TODO: get from single series (#i66858#)
ScfPropertySet aTypeProp( xChartType );
- ::com::sun::star::chart2::CurveStyle eCurveStyle;
+ cssc2::CurveStyle eCurveStyle;
bool bSpline = aTypeProp.GetProperty( eCurveStyle, EXC_CHPROP_CURVESTYLE ) &&
- (eCurveStyle != ::com::sun::star::chart2::CurveStyle_LINES);
+ (eCurveStyle != cssc2::CurveStyle_LINES);
// extended type info
maTypeInfo.Set( maType.GetTypeInfo(), b3dChart, bSpline );
@@ -2568,16 +2645,53 @@ XclExpChLabelRange::XclExpChLabelRange( const XclExpChRoot& rRoot ) :
{
}
-void XclExpChLabelRange::Convert( const ScaleData& rScaleData, bool bMirrorOrient )
+void XclExpChLabelRange::Convert( const ScaleData& rScaleData, const ScfPropertySet& rChart1Axis, bool bMirrorOrient )
{
+ /* Base time unit (using the property 'ExplicitTimeIncrement' from the old
+ chart API allows to detect axis type (date axis, if property exists),
+ and to receive the base time unit currently used in case the base time
+ unit is set to 'automatic'. */
+ cssc::TimeIncrement aTimeIncrement;
+ if( rChart1Axis.GetProperty( aTimeIncrement, EXC_CHPROP_EXPTIMEINCREMENT ) )
+ {
+ // property exists -> this is a date axis currently
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS );
+
+ // automatic base time unit, if the UNO Any 'rScaleData.TimeIncrement.TimeResolution' does not contain a valid value...
+ bool bAutoBase = !rScaleData.TimeIncrement.TimeResolution.has< cssc::TimeIncrement >();
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOBASE, bAutoBase );
+
+ // ...but get the current base time unit from the property of the old chart API
+ sal_Int32 nApiTimeUnit = 0;
+ bool bValidBaseUnit = aTimeIncrement.TimeResolution >>= nApiTimeUnit;
+ DBG_ASSERT( bValidBaseUnit, "XclExpChLabelRange::Convert - cannot ghet base time unit" );
+ maDateData.mnBaseUnit = bValidBaseUnit ? lclGetTimeUnit( nApiTimeUnit ) : EXC_CHDATERANGE_DAYS;
+
+ /* Min/max values depend on base time unit, they specify the number of
+ days, months, or years starting from null date. */
+ bool bAutoMin = lclConvertTimeValue( GetRoot(), maDateData.mnMinDate, rScaleData.Minimum, maDateData.mnBaseUnit );
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMIN, bAutoMin );
+ bool bAutoMax = lclConvertTimeValue( GetRoot(), maDateData.mnMaxDate, rScaleData.Maximum, maDateData.mnBaseUnit );
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAX, bAutoMax );
+ }
+
+ // automatic axis type detection
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTODATE, rScaleData.AutoDateAxis );
+
+ // increment
+ bool bAutoMajor = lclConvertTimeInterval( maDateData.mnMajorStep, maDateData.mnMajorUnit, rScaleData.TimeIncrement.MajorTimeInterval );
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAJOR, bAutoMajor );
+ bool bAutoMinor = lclConvertTimeInterval( maDateData.mnMinorStep, maDateData.mnMinorUnit, rScaleData.TimeIncrement.MinorTimeInterval );
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMINOR, bAutoMinor );
+
// origin
double fOrigin = 0.0;
if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin ) )
- maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 31999 );
+ maLabelData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 31999 );
// reverse order
- if( (rScaleData.Orientation == ::com::sun::star::chart2::AxisOrientation_REVERSE) != bMirrorOrient )
- ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE );
+ if( (rScaleData.Orientation == cssc2::AxisOrientation_REVERSE) != bMirrorOrient )
+ ::set_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_REVERSE );
}
void XclExpChLabelRange::ConvertAxisPosition( const ScfPropertySet& rPropSet )
@@ -2586,19 +2700,55 @@ void XclExpChLabelRange::ConvertAxisPosition( const ScfPropertySet& rPropSet )
rPropSet.GetProperty( eAxisPos, EXC_CHPROP_CROSSOVERPOSITION );
double fCrossingPos = 1.0;
rPropSet.GetProperty( fCrossingPos, EXC_CHPROP_CROSSOVERVALUE );
+
+ bool bDateAxis = ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS );
switch( eAxisPos )
{
- case cssc::ChartAxisPosition_ZERO: maData.mnCross = 1; break;
- case cssc::ChartAxisPosition_START: maData.mnCross = 1; break;
- case cssc::ChartAxisPosition_END: ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS ); break;
- case cssc::ChartAxisPosition_VALUE: maData.mnCross = limit_cast< sal_uInt16 >( fCrossingPos, 1, 31999 ); break;
- default: maData.mnCross = 1;
+ case cssc::ChartAxisPosition_ZERO:
+ case cssc::ChartAxisPosition_START:
+ maLabelData.mnCross = 1;
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS );
+ break;
+ case cssc::ChartAxisPosition_END:
+ ::set_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_MAXCROSS );
+ break;
+ case cssc::ChartAxisPosition_VALUE:
+ maLabelData.mnCross = limit_cast< sal_uInt16 >( fCrossingPos, 1, 31999 );
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS, false );
+ if( bDateAxis )
+ maDateData.mnCross = lclGetTimeValue( GetRoot(), fCrossingPos, maDateData.mnBaseUnit );
+ break;
+ default:
+ maLabelData.mnCross = 1;
+ ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS );
+ }
+}
+
+void XclExpChLabelRange::Save( XclExpStream& rStrm )
+{
+ // the CHLABELRANGE record
+ XclExpRecord::Save( rStrm );
+
+ // the CHDATERANGE record with date axis settings (BIFF8 only)
+ if( GetBiff() == EXC_BIFF8 )
+ {
+ rStrm.StartRecord( EXC_ID_CHDATERANGE, 18 );
+ rStrm << maDateData.mnMinDate
+ << maDateData.mnMaxDate
+ << maDateData.mnMajorStep
+ << maDateData.mnMajorUnit
+ << maDateData.mnMinorStep
+ << maDateData.mnMinorUnit
+ << maDateData.mnBaseUnit
+ << maDateData.mnCross
+ << maDateData.mnFlags;
+ rStrm.EndRecord();
}
}
void XclExpChLabelRange::WriteBody( XclExpStream& rStrm )
{
- rStrm << maData.mnCross << maData.mnLabelFreq << maData.mnTickFreq << maData.mnFlags;
+ rStrm << maLabelData.mnCross << maLabelData.mnLabelFreq << maLabelData.mnTickFreq << maLabelData.mnFlags;
}
// ----------------------------------------------------------------------------
@@ -2683,7 +2833,7 @@ namespace {
sal_uInt8 lclGetXclTickPos( sal_Int32 nApiTickmarks )
{
- using namespace ::com::sun::star::chart2::TickmarkStyle;
+ using namespace cssc2::TickmarkStyle;
sal_uInt8 nXclTickPos = 0;
::set_flag( nXclTickPos, EXC_CHTICK_INSIDE, ::get_flag( nApiTickmarks, INNER ) );
::set_flag( nXclTickPos, EXC_CHTICK_OUTSIDE, ::get_flag( nApiTickmarks, OUTER ) );
@@ -2786,6 +2936,30 @@ Reference< XAxis > lclGetApiAxis( Reference< XCoordinateSystem > xCoordSystem,
return xAxis;
}
+Reference< cssc::XAxis > lclGetApiChart1Axis( Reference< XChartDocument > xChartDoc,
+ sal_Int32 nApiAxisDim, sal_Int32 nApiAxesSetIdx )
+{
+ Reference< cssc::XAxis > xChart1Axis;
+ try
+ {
+ Reference< cssc::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY_THROW );
+ Reference< cssc::XAxisSupplier > xChart1AxisSupp( xChart1Doc->getDiagram(), UNO_QUERY_THROW );
+ switch( nApiAxesSetIdx )
+ {
+ case EXC_CHART_AXESSET_PRIMARY:
+ xChart1Axis = xChart1AxisSupp->getAxis( nApiAxisDim );
+ break;
+ case EXC_CHART_AXESSET_SECONDARY:
+ xChart1Axis = xChart1AxisSupp->getSecondaryAxis( nApiAxisDim );
+ break;
+ }
+ }
+ catch( Exception& )
+ {
+ }
+ return xChart1Axis;
+}
+
} // namespace
XclExpChAxis::XclExpChAxis( const XclExpChRoot& rRoot, sal_uInt16 nAxisType ) :
@@ -2808,7 +2982,8 @@ void XclExpChAxis::SetRotation( sal_uInt16 nRotation )
mxTick->SetRotation( nRotation );
}
-void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossingAxis, const XclChExtTypeInfo& rTypeInfo )
+void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossingAxis,
+ Reference< cssc::XAxis > xChart1Axis, const XclChExtTypeInfo& rTypeInfo )
{
ScfPropertySet aAxisProp( xAxis );
bool bCategoryAxis = ((GetAxisType() == EXC_CHAXIS_X) && rTypeInfo.mbCategoryAxis) || (GetAxisType() == EXC_CHAXIS_Z);
@@ -2828,8 +3003,11 @@ void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossi
mxLabelRange.reset( new XclExpChLabelRange( GetChRoot() ) );
mxLabelRange->SetTicksBetweenCateg( rTypeInfo.mbTicksBetweenCateg );
if( xAxis.is() )
+ {
+ ScfPropertySet aChart1AxisProp( xChart1Axis );
// #i71684# radar charts have reversed rotation direction
- mxLabelRange->Convert( xAxis->getScaleData(), (GetAxisType() == EXC_CHAXIS_X) && (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR) );
+ mxLabelRange->Convert( xAxis->getScaleData(), aChart1AxisProp, (GetAxisType() == EXC_CHAXIS_X) && (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR) );
+ }
// get position of crossing axis on this axis from passed axis object
if( aCrossingProp.Is() )
mxLabelRange->ConvertAxisPosition( aCrossingProp );
@@ -2957,7 +3135,7 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16
bool b3dChart = xCoordSystem.is() && (xCoordSystem->getDimension() == 3);
// percent charts
- namespace ApiAxisType = ::com::sun::star::chart2::AxisType;
+ namespace ApiAxisType = cssc2::AxisType;
Reference< XAxis > xApiYAxis = lclGetApiAxis( xCoordSystem, EXC_CHART_AXIS_Y, nApiAxesSetIdx );
bool bPercent = xApiYAxis.is() && (xApiYAxis->getScaleData().AxisType == ApiAxisType::PERCENT);
@@ -3064,8 +3242,8 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16
// inner and outer plot area position and size
try
{
- Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW );
- Reference< ::com::sun::star::chart::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW );
+ Reference< cssc::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW );
+ Reference< cssc::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW );
// set manual flag in chart data
if( !xPositioning->isAutomaticDiagramPositioning() )
GetChartData().SetManualPlotArea();
@@ -3132,7 +3310,8 @@ void XclExpChAxesSet::ConvertAxis(
sal_Int32 nApiAxesSetIdx = GetApiAxesSetIndex();
Reference< XAxis > xAxis = lclGetApiAxis( xCoordSystem, nApiAxisDim, nApiAxesSetIdx );
Reference< XAxis > xCrossingAxis = lclGetApiAxis( xCoordSystem, nCrossingAxisDim, nApiAxesSetIdx );
- rxChAxis->Convert( xAxis, xCrossingAxis, rTypeInfo );
+ Reference< cssc::XAxis > xChart1Axis = lclGetApiChart1Axis( GetChartDocument(), nApiAxisDim, nApiAxesSetIdx );
+ rxChAxis->Convert( xAxis, xCrossingAxis, xChart1Axis, rTypeInfo );
// create and convert axis title
Reference< XTitled > xTitled( xAxis, UNO_QUERY );
@@ -3215,7 +3394,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
sal_Int32 nMissingValues = 0;
if( aDiaProp.GetProperty( nMissingValues, EXC_CHPROP_MISSINGVALUETREATMENT ) )
{
- using namespace ::com::sun::star::chart::MissingValueTreatment;
+ using namespace cssc::MissingValueTreatment;
switch( nMissingValues )
{
case LEAVE_GAP: maProps.mnEmptyMode = EXC_CHPROPS_EMPTY_SKIP; break;
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index aecf72da0937..b25cc7f20b1e 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -56,7 +56,7 @@
#include "xestyle.hxx"
#include "xename.hxx"
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
@@ -853,7 +853,7 @@ XclExpCondfmt::XclExpCondfmt( const XclExpRoot& rRoot, const ScConditionalFormat
GetAddressConverter().ConvertRangeList( maXclRanges, aScRanges, true );
if( !maXclRanges.empty() )
{
- for( USHORT nIndex = 0, nCount = rCondFormat.Count(); nIndex < nCount; ++nIndex )
+ for( sal_uInt16 nIndex = 0, nCount = rCondFormat.Count(); nIndex < nCount; ++nIndex )
if( const ScCondFormatEntry* pEntry = rCondFormat.GetEntry( nIndex ) )
maCFList.AppendNewRecord( new XclExpCF( GetRoot(), *pEntry ) );
aScRanges.Format( msSeqRef, SCA_VALID, NULL, formula::FormulaGrammar::CONV_XL_A1 );
@@ -996,7 +996,7 @@ const char* lcl_GetOperatorType( sal_uInt32 nFlags )
// ----------------------------------------------------------------------------
-XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) :
+XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) :
XclExpRecord( EXC_ID_DV ),
XclExpRoot( rRoot ),
mnFlags( 0 ),
@@ -1006,7 +1006,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) :
{
// prompt box - empty string represented by single NUL character
String aTitle, aText;
- bool bShowPrompt = (pValData->GetInput( aTitle, aText ) == TRUE);
+ bool bShowPrompt = (pValData->GetInput( aTitle, aText ) == sal_True);
if( aTitle.Len() )
maPromptTitle.Assign( aTitle );
else
@@ -1018,7 +1018,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) :
// error box - empty string represented by single NUL character
ScValidErrorStyle eScErrorStyle;
- bool bShowError = (pValData->GetErrMsg( aTitle, aText, eScErrorStyle ) == TRUE);
+ bool bShowError = (pValData->GetErrMsg( aTitle, aText, eScErrorStyle ) == sal_True);
if( aTitle.Len() )
maErrorTitle.Assign( aTitle );
else
@@ -1222,7 +1222,7 @@ XclExpDval::~XclExpDval()
{
}
-void XclExpDval::InsertCellRange( const ScRange& rRange, ULONG nScHandle )
+void XclExpDval::InsertCellRange( const ScRange& rRange, sal_uLong nScHandle )
{
if( GetBiff() == EXC_BIFF8 )
{
@@ -1267,7 +1267,7 @@ void XclExpDval::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->endElement( XML_dataValidations );
}
-XclExpDV& XclExpDval::SearchOrCreateDv( ULONG nScHandle )
+XclExpDV& XclExpDval::SearchOrCreateDv( sal_uLong nScHandle )
{
// test last found record
if( mxLastFoundDV.get() && (mxLastFoundDV->GetScHandle() == nScHandle) )
@@ -1280,7 +1280,7 @@ XclExpDV& XclExpDval::SearchOrCreateDv( ULONG nScHandle )
size_t nFirstPos = 0;
size_t nLastPos = maDVList.GetSize() - 1;
bool bLoop = true;
- ULONG nCurrScHandle = ::std::numeric_limits< ULONG >::max();
+ sal_uLong nCurrScHandle = ::std::numeric_limits< sal_uLong >::max();
while( (nFirstPos <= nLastPos) && bLoop )
{
nCurrPos = (nFirstPos + nLastPos) / 2;
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index e26a0b3e630c..c7cfe136bff2 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -531,10 +531,10 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc
ScfPropertySet aCtrlProp( XclControlHelper::GetControlModel( xShape ) );
// OBJ record flags
- SetLocked( TRUE );
+ SetLocked( sal_True );
SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) );
- SetAutoFill( FALSE );
- SetAutoLine( FALSE );
+ SetAutoFill( false );
+ SetAutoLine( false );
// fill DFF property set
mrEscherEx.OpenContainer( ESCHER_SpContainer );
@@ -553,7 +553,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc
// meta file
//! TODO - needs check
Reference< XPropertySet > xShapePS( xShape, UNO_QUERY );
- if( xShapePS.is() && aPropOpt.CreateGraphicProperties( xShapePS, CREATE_STRING( "MetaFile" ), sal_False ) )
+ if( xShapePS.is() && aPropOpt.CreateGraphicProperties( xShapePS, CREATE_STRING( "MetaFile" ), false ) )
{
sal_uInt32 nBlipId;
if( aPropOpt.GetOpt( ESCHER_Prop_pib, nBlipId ) )
@@ -675,10 +675,10 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
return;
// OBJ record flags
- SetLocked( TRUE );
+ SetLocked( sal_True );
SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) );
- SetAutoFill( FALSE );
- SetAutoLine( FALSE );
+ SetAutoFill( false );
+ SetAutoLine( false );
// fill DFF property set
mrEscherEx.OpenContainer( ESCHER_SpContainer );
@@ -1256,7 +1256,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
// AutoFill style would change if Postit.cxx object creation values are changed
OUString aCol(((XFillColorItem &)GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR)).GetValue());
- mbAutoFill = !aCol.getLength() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, ULONG) == XFILL_SOLID);
+ mbAutoFill = !aCol.getLength() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, sal_uLong) == XFILL_SOLID);
mbAutoLine = true;
mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab()));
mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab()));
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index 4373cff8edac..4d40aaf1d206 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -521,7 +521,7 @@ XclTokenArrayRef XclExpFmlaCompImpl::CreateFormula( XclFormulaType eType,
if( mxData->mbOk )
{
XclExpScToken aTokData( GetNextToken() );
- USHORT nScError = rScTokArr.GetCodeError();
+ sal_uInt16 nScError = rScTokArr.GetCodeError();
if( (nScError != 0) && (!aTokData.Is() || (aTokData.GetOpCode() == ocStop)) )
{
// #i50253# convert simple ocStop token to error code formula (e.g. =#VALUE!)
@@ -1319,7 +1319,7 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData )
AppendExt( static_cast< sal_uInt8 >( nMatVal.GetBoolean() ? 1 : 0 ) );
AppendExt( 0, 7 );
}
- else if( USHORT nErr = nMatVal.GetError() )
+ else if( sal_uInt16 nErr = nMatVal.GetError() )
{
AppendExt( EXC_CACHEDVAL_ERROR );
AppendExt( XclTools::GetXclErrorCode( nErr ) );
@@ -1744,7 +1744,11 @@ void XclExpFmlaCompImpl::AppendTrailingParam( XclExpFuncData& rFuncData )
break;
- default:;
+ default:
+ // #i108420# function without parameters stored as macro call needs the external name reference
+ if( (nParamCount == 0) && rFuncData.IsMacroFunc() )
+ AppendDefaultParam( rFuncData );
+
}
}
@@ -1808,7 +1812,7 @@ void XclExpFmlaCompImpl::ConvertRefData(
if( bTruncMaxCol && (rnScCol == mnMaxScCol) )
rnScCol = mnMaxAbsCol;
else if( (rnScCol < 0) || (rnScCol > mnMaxAbsCol) )
- rRefData.SetColDeleted( TRUE );
+ rRefData.SetColDeleted( sal_True );
rXclPos.mnCol = static_cast< sal_uInt16 >( rnScCol ) & mnMaxColMask;
// convert row index
@@ -1816,7 +1820,7 @@ void XclExpFmlaCompImpl::ConvertRefData(
if( bTruncMaxRow && (rnScRow == mnMaxScRow) )
rnScRow = mnMaxAbsRow;
else if( (rnScRow < 0) || (rnScRow > mnMaxAbsRow) )
- rRefData.SetRowDeleted( TRUE );
+ rRefData.SetRowDeleted( sal_True );
rXclPos.mnRow = static_cast< sal_uInt16 >( rnScRow ) & mnMaxRowMask;
}
else
@@ -1984,7 +1988,7 @@ void XclExpFmlaCompImpl::ProcessExternalCellRef( const XclExpScToken& rTokData )
ConvertRefData( aRefData, aXclPos, false, false, false );
// store external cell contents in CRN records
- USHORT nFileId = rTokData.mpScToken->GetIndex();
+ sal_uInt16 nFileId = rTokData.mpScToken->GetIndex();
const String& rTabName = rTokData.mpScToken->GetString();
if( mxData->mrCfg.mbFromCell && mxData->mpScBasePos )
mxData->mpLinkMgr->StoreCell( nFileId, rTabName, aRefData );
@@ -2020,7 +2024,7 @@ void XclExpFmlaCompImpl::ProcessExternalRangeRef( const XclExpScToken& rTokData
ConvertRefData( aRefData, aXclRange, false );
// store external cell contents in CRN records
- USHORT nFileId = rTokData.mpScToken->GetIndex();
+ sal_uInt16 nFileId = rTokData.mpScToken->GetIndex();
const String& rTabName = rTokData.mpScToken->GetString();
if( mxData->mrCfg.mbFromCell && mxData->mpScBasePos )
mxData->mpLinkMgr->StoreCellRange( nFileId, rTabName, aRefData );
@@ -2079,7 +2083,7 @@ void XclExpFmlaCompImpl::ProcessExternalName( const XclExpScToken& rTokData )
if( mxData->mpLinkMgr )
{
ScExternalRefManager& rExtRefMgr = *GetDoc().GetExternalRefManager();
- USHORT nFileId = rTokData.mpScToken->GetIndex();
+ sal_uInt16 nFileId = rTokData.mpScToken->GetIndex();
const String& rName = rTokData.mpScToken->GetString();
ScExternalRefCache::TokenArrayRef xArray = rExtRefMgr.getRangeNameTokens( nFileId, rName );
if( xArray.get() )
@@ -2519,11 +2523,11 @@ void lclInitOwnTab( ScSingleRefData& rRef, const ScAddress& rScPos, SCTAB nCurrS
if( b3DRefOnly )
{
// no reduction to 2D reference, if global link manager is used
- rRef.SetFlag3D( TRUE );
+ rRef.SetFlag3D( sal_True );
}
else if( rScPos.Tab() == nCurrScTab )
{
- rRef.SetTabRel( TRUE );
+ rRef.SetTabRel( sal_True );
rRef.nRelTab = 0;
}
}
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 93eb4e54cb63..90743a7ffb28 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -479,7 +479,7 @@ XclExpStringRef lclCreateFormattedString(
{
// test if the character is a text field
const SfxPoolItem* pItem;
- if( aEditSet.GetItemState( EE_FEATURE_FIELD, FALSE, &pItem ) == SFX_ITEM_SET )
+ if( aEditSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_SET )
{
const SvxFieldData* pField = static_cast< const SvxFieldItem* >( pItem )->GetField();
if( const SvxURLField* pUrlField = PTR_CAST( SvxURLField, pField ) )
@@ -592,8 +592,8 @@ XclExpStringRef XclExpStringHelper::CreateCellString(
{
// formatted cell
ScEditEngineDefaulter& rEE = rRoot.GetEditEngine();
- BOOL bOldUpdateMode = rEE.GetUpdateMode();
- rEE.SetUpdateMode( TRUE );
+ sal_Bool bOldUpdateMode = rEE.GetUpdateMode();
+ rEE.SetUpdateMode( sal_True );
// default items
const SfxItemSet& rItemSet = pCellAttr ? pCellAttr->GetItemSet() : rRoot.GetDoc().GetDefPattern()->GetItemSet();
SfxItemSet* pEEItemSet = new SfxItemSet( rEE.GetEmptyItemSet() );
@@ -622,8 +622,8 @@ XclExpStringRef XclExpStringHelper::CreateString(
if( const OutlinerParaObject* pParaObj = rTextObj.GetOutlinerParaObject() )
{
EditEngine& rEE = rRoot.GetDrawEditEngine();
- BOOL bOldUpdateMode = rEE.GetUpdateMode();
- rEE.SetUpdateMode( TRUE );
+ sal_Bool bOldUpdateMode = rEE.GetUpdateMode();
+ rEE.SetUpdateMode( sal_True );
// create the string
rEE.SetText( pParaObj->GetTextObject() );
xString = lclCreateFormattedString( rRoot, rEE, 0, nFlags, nMaxLen );
@@ -650,8 +650,8 @@ XclExpStringRef XclExpStringHelper::CreateString(
{
XclExpStringRef xString;
EditEngine& rEE = rRoot.GetDrawEditEngine();
- BOOL bOldUpdateMode = rEE.GetUpdateMode();
- rEE.SetUpdateMode( TRUE );
+ sal_Bool bOldUpdateMode = rEE.GetUpdateMode();
+ rEE.SetUpdateMode( sal_True );
rEE.SetText( rEditObj );
xString = lclCreateFormattedString( rRoot, rEE, 0, nFlags, nMaxLen );
rEE.SetUpdateMode( bOldUpdateMode );
@@ -710,8 +710,8 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
SfxItemSet aItemSet( *GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
// edit engine
- BOOL bOldUpdateMode = mrEE.GetUpdateMode();
- mrEE.SetUpdateMode( TRUE );
+ sal_Bool bOldUpdateMode = mrEE.GetUpdateMode();
+ mrEE.SetUpdateMode( sal_True );
mrEE.SetText( *pTextObj );
// font information
@@ -832,7 +832,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
const SfxPoolItem* pItem;
if( (aSel.nStartPos + 1 == aSel.nEndPos) && // fields are single characters
- (aEditSet.GetItemState( EE_FEATURE_FIELD, sal_False, &pItem ) == SFX_ITEM_SET) )
+ (aEditSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_SET) )
{
if( const SvxFieldData* pFieldData = static_cast< const SvxFieldItem* >( pItem )->GetField() )
{
@@ -931,7 +931,7 @@ bool lclConvertToDos( String& rUrl, const String& rBasePath, bool bSaveRelUrl )
bool bLoop = true;
while( bLoop && ((nPos = aDosBase.Search( '\\', nStartSearch )) != STRING_NOTFOUND) )
{
- bLoop = (TRUE == aDosBase.Equals( aDosUrl, 0, nPos + 1 ));
+ bLoop = (sal_True == aDosBase.Equals( aDosUrl, 0, nPos + 1 ));
if( bLoop )
{
aDosBase.Erase( 0, nPos + 1 );
@@ -1106,7 +1106,7 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const
rStrm << EXC_CACHEDVAL_BOOL << nBool;
rStrm.WriteZeroBytes( 7 );
}
- else if( USHORT nScError = nMatVal.GetError() )
+ else if( sal_uInt16 nScError = nMatVal.GetError() )
{
sal_Int8 nError ( XclTools::GetXclErrorCode( nScError ) );
rStrm.SetSliceSize( 9 );
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 39396179f8d8..43f8342bf815 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1063,7 +1063,7 @@ sal_uInt16 XclExpExtNameBuffer::InsertDde(
sal_uInt16 nIndex = GetIndex( rItem );
if( nIndex == 0 )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( GetDoc().FindDdeLink( rApplic, rTopic, rItem, SC_DDE_IGNOREMODE, nPos ) )
{
// create the leading 'StdDocumentName' EXTERNNAME record
@@ -1157,7 +1157,7 @@ void XclExpCrn::WriteDouble( XclExpStream& rStrm, double fValue )
{
if( ::rtl::math::isNan( fValue ) )
{
- USHORT nScError = static_cast< USHORT >( reinterpret_cast< const sal_math_Double* >( &fValue )->nan_parts.fraction_lo );
+ sal_uInt16 nScError = static_cast< sal_uInt16 >( reinterpret_cast< const sal_math_Double* >( &fValue )->nan_parts.fraction_lo );
WriteError( rStrm, XclTools::GetXclErrorCode( nScError ) );
}
else
@@ -1278,7 +1278,7 @@ void XclExpXct::Save( XclExpStream& rStrm )
::std::pair< SCCOL, SCCOL > aColRange = mxCacheTable->getColRange( nScRow );
for( SCCOL nScCol = aColRange.first; bValid && (nScCol < aColRange.second); ++nScCol )
{
- if( maUsedCells.IsCellMarked( nScCol, nScRow, TRUE ) )
+ if( maUsedCells.IsCellMarked( nScCol, nScRow, sal_True ) )
{
sal_uInt32 nScNumFmt = 0;
ScExternalRefCache::TokenRef xToken = mxCacheTable->getCell( nScCol, nScRow, &nScNumFmt );
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index ae95b6a0725a..9bd32dc63fd4 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -42,9 +42,10 @@
// for filter manager
#include "excrecds.hxx"
-#include <oox/core/tokens.hxx>
#include <formula/grammar.hxx>
+using namespace ::oox;
+
using ::rtl::OString;
// ============================================================================
@@ -136,9 +137,9 @@ public:
void Initialize();
/** Inserts the Calc name with the passed index and returns the Excel NAME index. */
- sal_uInt16 InsertName( USHORT nScNameIdx );
+ sal_uInt16 InsertName( sal_uInt16 nScNameIdx );
/** Inserts the Calc database range with the passed index and returns the Excel NAME index. */
- sal_uInt16 InsertDBRange( USHORT nScDBRangeIdx );
+ sal_uInt16 InsertDBRange( sal_uInt16 nScDBRangeIdx );
/** Inserts a new built-in defined name. */
sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab );
@@ -165,11 +166,11 @@ public:
private:
typedef XclExpRecordList< XclExpName > XclExpNameList;
typedef XclExpNameList::RecordRefType XclExpNameRef;
- typedef ::std::map< USHORT, sal_uInt16 > XclExpIndexMap;
+ typedef ::std::map< sal_uInt16, sal_uInt16 > XclExpIndexMap;
private:
/** Finds the index of a NAME record from the passed Calc index in the specified map. */
- sal_uInt16 FindNameIdx( const XclExpIndexMap& rMap, USHORT nScIdx ) const;
+ sal_uInt16 FindNameIdx( const XclExpIndexMap& rMap, sal_uInt16 nScIdx ) const;
/** Returns the index of an existing built-in NAME record with the passed definition, otherwise 0. */
sal_uInt16 FindBuiltInNameIdx( const String& rName,
const XclTokenArray& rTokArr, bool bDBRange ) const;
@@ -378,7 +379,7 @@ void XclExpNameManagerImpl::Initialize()
CreateDatabaseNames();
}
-sal_uInt16 XclExpNameManagerImpl::InsertName( USHORT nScNameIdx )
+sal_uInt16 XclExpNameManagerImpl::InsertName( sal_uInt16 nScNameIdx )
{
sal_uInt16 nNameIdx = FindNameIdx( maNameMap, nScNameIdx );
if( nNameIdx == 0 )
@@ -387,7 +388,7 @@ sal_uInt16 XclExpNameManagerImpl::InsertName( USHORT nScNameIdx )
return nNameIdx;
}
-sal_uInt16 XclExpNameManagerImpl::InsertDBRange( USHORT nScDBRangeIdx )
+sal_uInt16 XclExpNameManagerImpl::InsertDBRange( sal_uInt16 nScDBRangeIdx )
{
sal_uInt16 nNameIdx = FindNameIdx( maDBRangeMap, nScDBRangeIdx );
if( nNameIdx == 0 )
@@ -482,7 +483,7 @@ void XclExpNameManagerImpl::SaveXml( XclExpXmlStream& rStrm )
// private --------------------------------------------------------------------
-sal_uInt16 XclExpNameManagerImpl::FindNameIdx( const XclExpIndexMap& rMap, USHORT nScIdx ) const
+sal_uInt16 XclExpNameManagerImpl::FindNameIdx( const XclExpIndexMap& rMap, sal_uInt16 nScIdx ) const
{
XclExpIndexMap::const_iterator aIt = rMap.find( nScIdx );
return (aIt == rMap.end()) ? 0 : aIt->second;
@@ -628,7 +629,7 @@ void XclExpNameManagerImpl::CreateBuiltInNames()
if( rDoc.HasPrintRange() )
{
ScRangeList aRangeList;
- for( USHORT nIdx = 0, nCount = rDoc.GetPrintRangeCount( nScTab ); nIdx < nCount; ++nIdx )
+ for( sal_uInt16 nIdx = 0, nCount = rDoc.GetPrintRangeCount( nScTab ); nIdx < nCount; ++nIdx )
{
ScRange aRange( *rDoc.GetPrintRange( nScTab, nIdx ) );
// Calc document does not care about sheet index in print ranges
@@ -684,7 +685,7 @@ void XclExpNameManagerImpl::CreateUserNames()
void XclExpNameManagerImpl::CreateDatabaseNames()
{
const ScDBCollection& rDBRanges = GetDatabaseRanges();
- for( USHORT nDBIdx = 0, nDBCount = rDBRanges.GetCount(); nDBIdx < nDBCount; ++nDBIdx )
+ for( sal_uInt16 nDBIdx = 0, nDBCount = rDBRanges.GetCount(); nDBIdx < nDBCount; ++nDBIdx )
{
const ScDBData* pDBData = rDBRanges[ nDBIdx ];
DBG_ASSERT( pDBData, "XclExpNameManagerImpl::CreateDatabaseNames - missing database range" );
@@ -711,12 +712,12 @@ void XclExpNameManager::Initialize()
mxImpl->Initialize();
}
-sal_uInt16 XclExpNameManager::InsertName( USHORT nScNameIdx )
+sal_uInt16 XclExpNameManager::InsertName( sal_uInt16 nScNameIdx )
{
return mxImpl->InsertName( nScNameIdx );
}
-sal_uInt16 XclExpNameManager::InsertDBRange( USHORT nScDBRangeIdx )
+sal_uInt16 XclExpNameManager::InsertDBRange( sal_uInt16 nScDBRangeIdx )
{
return mxImpl->InsertDBRange( nScDBRangeIdx );
}
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 4d3f3dae9d9e..47396d620e41 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -49,7 +49,7 @@
#include <set>
#include <limits>
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
using ::rtl::OString;
using ::std::set;
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 56c98a199f9a..069c9a7719e6 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -52,7 +52,7 @@
#include "xestring.hxx"
#include "xelink.hxx"
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
using ::com::sun::star::sheet::DataPilotFieldOrientation;
using ::com::sun::star::sheet::DataPilotFieldOrientation_HIDDEN;
@@ -938,7 +938,7 @@ String lclGetDataFieldCaption( const String& rFieldName, GeneralFunction eFunc )
{
String aCaption;
- USHORT nResIdx = 0;
+ sal_uInt16 nResIdx = 0;
using namespace ::com::sun::star::sheet;
switch( eFunc )
{
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index f02e2db82fc1..f210efd1a4a1 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -31,7 +31,7 @@
#include "xerecord.hxx"
#include "xeroot.hxx"
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
// Base classes to export Excel records =======================================
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 4b6169ceb20a..d72f9c77d61d 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -29,7 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
+#include <rtl/random.h>
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <sfx2/sfxsids.hrc>
#include <unotools/saveopt.hxx>
#include <svl/itemset.hxx>
@@ -52,6 +55,8 @@
#include "document.hxx"
#include "scextopt.hxx"
+using namespace ::com::sun::star;
+
// Global data ================================================================
XclExpRootData::XclExpRootData( XclBiff eBiff, SfxMedium& rMedium,
@@ -242,23 +247,66 @@ bool XclExpRoot::IsDocumentEncrypted() const
if (pDocProt && pDocProt->isProtected() && pDocProt->isOptionEnabled(ScDocProtection::STRUCTURE))
return true;
- if (GetPassword().Len() > 0)
+ if ( GetEncryptionData().getLength() > 0 )
// Password is entered directly into the save dialog.
return true;
return false;
}
-String XclExpRoot::GetPassword() const
+uno::Sequence< beans::NamedValue > XclExpRoot::GenerateEncryptionData( const ::rtl::OUString& aPass ) const
{
- if( SfxItemSet* pItemSet = GetMedium().GetItemSet() )
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+
+ if ( aPass.getLength() > 0 && aPass.getLength() < 16 )
{
- const SfxPoolItem* pItem = 0;
- if( pItemSet->GetItemState( SID_PASSWORD, TRUE, &pItem ) == SFX_ITEM_SET )
- if( const SfxStringItem* pStrItem = dynamic_cast< const SfxStringItem* >( pItem ) )
- return pStrItem->GetValue();
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool ();
+ rtl_random_addBytes ( aRandomPool, &aTime, 8 );
+
+ sal_uInt8 pnDocId[16];
+ rtl_random_getBytes( aRandomPool, pnDocId, 16 );
+
+ rtl_random_destroyPool( aRandomPool );
+
+ sal_uInt16 pnPasswd[16];
+ memset( pnPasswd, 0, sizeof( pnPasswd ) );
+ for (xub_StrLen nChar = 0; nChar < aPass.getLength(); ++nChar )
+ pnPasswd[nChar] = aPass.getStr()[nChar];
+
+ ::msfilter::MSCodec_Std97 aCodec;
+ aCodec.InitKey( pnPasswd, pnDocId );
+ aEncryptionData = aCodec.GetEncryptionData();
}
- return String::EmptyString();
+
+ return aEncryptionData;
+}
+
+uno::Sequence< beans::NamedValue > XclExpRoot::GetEncryptionData() const
+{
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( GetMedium().GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false );
+ if ( pEncryptionDataItem )
+ pEncryptionDataItem->GetValue() >>= aEncryptionData;
+ else
+ {
+ // try to get the encryption data from the password
+ SFX_ITEMSET_ARG( GetMedium().GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false );
+ if ( pPasswordItem && pPasswordItem->GetValue().Len() )
+ aEncryptionData = GenerateEncryptionData( pPasswordItem->GetValue() );
+ }
+
+ return aEncryptionData;
+}
+
+uno::Sequence< beans::NamedValue > XclExpRoot::GenerateDefaultEncryptionData() const
+{
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ if ( GetDefaultPassword().Len() > 0 )
+ aEncryptionData = GenerateEncryptionData( GetDefaultPassword() );
+
+ return aEncryptionData;
}
XclExpRootData::XclExpLinkMgrRef XclExpRoot::GetLocalLinkMgrRef() const
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index e1e44a52b7cc..d8fe4bed9234 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -33,6 +33,8 @@
#include <utility>
#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/random.h>
#include <sax/fshelper.hxx>
#include <unotools/streamwrap.hxx>
@@ -78,10 +80,17 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::XInterface;
using ::rtl::OString;
using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
using ::utl::OStreamWrapper;
using ::std::vector;
-using namespace formula;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::sheet;
+using namespace ::com::sun::star::uno;
+using namespace ::formula;
+using namespace ::oox;
// ============================================================================
@@ -473,17 +482,16 @@ void XclExpStream::WriteRawZeroBytes( sal_Size nBytes )
// ============================================================================
-XclExpBiff8Encrypter::XclExpBiff8Encrypter( const XclExpRoot& rRoot, const sal_uInt8 nDocId[16],
- const sal_uInt8 nSalt[16] ) :
+XclExpBiff8Encrypter::XclExpBiff8Encrypter( const XclExpRoot& rRoot ) :
mrRoot(rRoot),
mnOldPos(STREAM_SEEK_TO_END),
mbValid(false)
{
- String aPass = rRoot.GetPassword();
- if (aPass.Len() == 0)
+ Sequence< NamedValue > aEncryptionData = rRoot.GetEncryptionData();
+ if( !aEncryptionData.hasElements() )
// Empty password. Get the default biff8 password.
- aPass = rRoot.GetDefaultPassword();
- Init(aPass, nDocId, nSalt);
+ aEncryptionData = rRoot.GenerateDefaultEncryptionData();
+ Init( aEncryptionData );
}
XclExpBiff8Encrypter::~XclExpBiff8Encrypter()
@@ -495,9 +503,22 @@ bool XclExpBiff8Encrypter::IsValid() const
return mbValid;
}
-void XclExpBiff8Encrypter::GetSaltDigest( sal_uInt8 nSaltDigest[16] ) const
+void XclExpBiff8Encrypter::GetSaltDigest( sal_uInt8 pnSaltDigest[16] ) const
{
- memcpy(nSaltDigest, mnSaltDigest, 16);
+ if ( sizeof( mpnSaltDigest ) == 16 )
+ memcpy( pnSaltDigest, mpnSaltDigest, 16 );
+}
+
+void XclExpBiff8Encrypter::GetSalt( sal_uInt8 pnSalt[16] ) const
+{
+ if ( sizeof( mpnSalt ) == 16 )
+ memcpy( pnSalt, mpnSalt, 16 );
+}
+
+void XclExpBiff8Encrypter::GetDocId( sal_uInt8 pnDocId[16] ) const
+{
+ if ( sizeof( mpnDocId ) == 16 )
+ memcpy( pnDocId, mpnDocId, 16 );
}
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt8 nData )
@@ -554,46 +575,42 @@ void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_Int32 nData )
Encrypt(rStrm, static_cast<sal_uInt32>(nData));
}
-void XclExpBiff8Encrypter::Init( const String& aPass, const sal_uInt8 nDocId[16],
- const sal_uInt8 nSalt[16] )
+void XclExpBiff8Encrypter::Init( const Sequence< NamedValue >& rEncryptionData )
{
- memset(mnSaltDigest, 0, sizeof(mnSaltDigest));
+ mbValid = false;
- xub_StrLen nLen = aPass.Len();
- bool bValid = (0 < nLen) && (nLen < 16);
- if ( bValid )
+ if( maCodec.InitCodec( rEncryptionData ) )
{
- // transform String to sal_uInt16 array
- memset(mnPassw, 0, sizeof(mnPassw));
- for (xub_StrLen nChar = 0; nChar < nLen; ++nChar)
- mnPassw[nChar] = static_cast<sal_uInt16>(aPass.GetChar(nChar));
+ maCodec.GetDocId( mpnDocId );
- // copy document ID
- memcpy(mnDocId, nDocId, sizeof(mnDocId));
+ // generate the salt here
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool ();
+ rtl_random_addBytes( aRandomPool, &aTime, 8 );
+ rtl_random_getBytes( aRandomPool, mpnSalt, 16 );
+ rtl_random_destroyPool( aRandomPool );
- // init codec
- maCodec.InitKey(mnPassw, mnDocId);
+ memset( mpnSaltDigest, 0, sizeof( mpnSaltDigest ) );
// generate salt hash.
::msfilter::MSCodec_Std97 aCodec;
- aCodec.InitKey(mnPassw, mnDocId);
- aCodec.CreateSaltDigest(nSalt, mnSaltDigest);
+ aCodec.InitCodec( rEncryptionData );
+ aCodec.CreateSaltDigest( mpnSalt, mpnSaltDigest );
// verify to make sure it's in good shape.
- bValid = maCodec.VerifyKey(nSalt, mnSaltDigest);
+ mbValid = maCodec.VerifyKey( mpnSalt, mpnSaltDigest );
}
-
- mbValid = bValid;
}
sal_uInt32 XclExpBiff8Encrypter::GetBlockPos( sal_Size nStrmPos ) const
{
- return static_cast<sal_uInt32>(nStrmPos / EXC_ENCR_BLOCKSIZE);
+ return static_cast< sal_uInt32 >( nStrmPos / EXC_ENCR_BLOCKSIZE );
}
sal_uInt16 XclExpBiff8Encrypter::GetOffsetInBlock( sal_Size nStrmPos ) const
{
- return static_cast<sal_uInt16>(nStrmPos % EXC_ENCR_BLOCKSIZE);
+ return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE );
}
void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBytes )
@@ -660,7 +677,7 @@ void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBy
mnOldPos = nStrmPos;
}
-static const char* lcl_GetErrorString( USHORT nScErrCode )
+static const char* lcl_GetErrorString( sal_uInt16 nScErrCode )
{
sal_uInt8 nXclErrCode = XclTools::GetXclErrorCode( nScErrCode );
switch( nXclErrCode )
@@ -683,7 +700,7 @@ void XclXmlUtils::GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& rsT
case NUMBERFORMAT_NUMBER:
{
// either value or error code
- USHORT nScErrCode = rCell.GetErrCode();
+ sal_uInt16 nScErrCode = rCell.GetErrCode();
if( nScErrCode )
{
rsType = "e";
@@ -726,7 +743,7 @@ void XclXmlUtils::GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& rsT
rtl::OUString XclXmlUtils::GetStreamName( const char* sStreamDir, const char* sStream, sal_Int32 nId )
{
- rtl::OUStringBuffer sBuf;
+ OUStringBuffer sBuf;
if( sStreamDir )
sBuf.appendAscii( sStreamDir );
sBuf.appendAscii( sStream );
@@ -739,7 +756,7 @@ rtl::OUString XclXmlUtils::GetStreamName( const char* sStreamDir, const char* sS
return sBuf.makeStringAndClear();
}
-rtl::OString XclXmlUtils::ToOString( const Color& rColor )
+OString XclXmlUtils::ToOString( const Color& rColor )
{
char buf[9];
sprintf( buf, "%.2X%.2X%.2X%.2X", rColor.GetTransparency(), rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() );
@@ -747,37 +764,37 @@ rtl::OString XclXmlUtils::ToOString( const Color& rColor )
return OString( buf );
}
-rtl::OString XclXmlUtils::ToOString( const ::rtl::OUString& s )
+OString XclXmlUtils::ToOString( const OUString& s )
{
return OUStringToOString( s, RTL_TEXTENCODING_UTF8 );
}
-rtl::OString XclXmlUtils::ToOString( const String& s )
+OString XclXmlUtils::ToOString( const String& s )
{
- return rtl::OString( s.GetBuffer(), s.Len(), RTL_TEXTENCODING_UTF8 );
+ return OString( s.GetBuffer(), s.Len(), RTL_TEXTENCODING_UTF8 );
}
-rtl::OString XclXmlUtils::ToOString( const ScAddress& rAddress )
+OString XclXmlUtils::ToOString( const ScAddress& rAddress )
{
String sAddress;
rAddress.Format( sAddress, SCA_VALID, NULL, ScAddress::Details( FormulaGrammar::CONV_XL_A1 ) );
return ToOString( sAddress );
}
-rtl::OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer )
+OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer )
{
const sal_uInt16* pBuffer = &rBuffer [0];
- return ::rtl::OString( pBuffer, rBuffer.size(), RTL_TEXTENCODING_UTF8 );
+ return OString( pBuffer, rBuffer.size(), RTL_TEXTENCODING_UTF8 );
}
-rtl::OString XclXmlUtils::ToOString( const ScRange& rRange )
+OString XclXmlUtils::ToOString( const ScRange& rRange )
{
String sRange;
rRange.Format( sRange, SCA_VALID, NULL, ScAddress::Details( FormulaGrammar::CONV_XL_A1 ) );
return ToOString( sRange );
}
-rtl::OString XclXmlUtils::ToOString( const ScRangeList& rRangeList )
+OString XclXmlUtils::ToOString( const ScRangeList& rRangeList )
{
String s;
rRangeList.Format( s, SCA_VALID, NULL, FormulaGrammar::CONV_XL_A1, ' ' );
@@ -797,12 +814,12 @@ static ScAddress lcl_ToAddress( const XclAddress& rAddress )
return aAddress;
}
-rtl::OString XclXmlUtils::ToOString( const XclAddress& rAddress )
+OString XclXmlUtils::ToOString( const XclAddress& rAddress )
{
return ToOString( lcl_ToAddress( rAddress ) );
}
-rtl::OString XclXmlUtils::ToOString( const XclExpString& s )
+OString XclXmlUtils::ToOString( const XclExpString& s )
{
DBG_ASSERT( !s.IsRich(), "XclXmlUtils::ToOString(XclExpString): rich text string found!" );
return ToOString( s.GetUnicodeBuffer() );
@@ -852,7 +869,7 @@ OUString XclXmlUtils::ToOUString( const String& s )
return OUString( s.GetBuffer(), s.Len() );
}
-rtl::OUString XclXmlUtils::ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray )
+OUString XclXmlUtils::ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray )
{
ScCompiler aCompiler( &rDocument, rAddress, *pTokenArray);
aCompiler.SetGrammar(FormulaGrammar::GRAM_ENGLISH_XL_A1);
@@ -1033,7 +1050,7 @@ sax_fastparser::FSHelperPtr XclExpXmlStream::CreateOutputStream (
const Reference< XOutputStream >& xParentRelation,
const char* sContentType,
const char* sRelationshipType,
- ::rtl::OUString* pRelationshipId )
+ OUString* pRelationshipId )
{
OUString sRelationshipId;
if (xParentRelation.is())
@@ -1138,7 +1155,12 @@ OUString XlsxExport_getImplementationName()
return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME ) );
}
-::rtl::OUString XclExpXmlStream::implGetImplementationName() const
+::oox::ole::VbaProject* XclExpXmlStream::implCreateVbaProject() const
+{
+ return new ::oox::xls::ExcelVbaProject( getComponentContext(), Reference< XSpreadsheetDocument >( getModel(), UNO_QUERY ) );
+}
+
+OUString XclExpXmlStream::implGetImplementationName() const
{
return CREATE_OUSTRING( "TODO" );
}
@@ -1168,7 +1190,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const
SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
{
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
if( pRegistryKey )
{
@@ -1183,7 +1205,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan
}
catch( InvalidRegistryException& )
{
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ OSL_ENSURE( false, "### InvalidRegistryException!" );
}
}
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index b6e6dc02115c..987b25dba294 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -38,7 +38,7 @@
#include "xestyle.hxx"
#include "xestring.hxx"
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
using ::rtl::OString;
using ::rtl::OUString;
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 8964b9f52366..79b4d1949507 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -837,7 +837,7 @@ void XclExpPalette::WriteBody( XclExpStream& rStrm )
namespace {
-typedef ::std::pair< USHORT, sal_Int16 > WhichAndScript;
+typedef ::std::pair< sal_uInt16, sal_Int16 > WhichAndScript;
sal_Int16 lclCheckFontItems( const SfxItemSet& rItemSet,
const WhichAndScript& rWAS1, const WhichAndScript& rWAS2, const WhichAndScript& rWAS3 )
@@ -901,7 +901,7 @@ Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxIte
nScript = GetFirstUsedScript( rRoot, rItemSet );
// convert to core script type constants
- BYTE nScScript = SCRIPTTYPE_LATIN;
+ sal_uInt8 nScScript = SCRIPTTYPE_LATIN;
switch( nScript )
{
case ApiScriptType::LATIN: nScScript = SCRIPTTYPE_LATIN; break;
@@ -918,14 +918,14 @@ Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxIte
bool XclExpFontHelper::CheckItems( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript, bool bDeep )
{
- static const USHORT pnCommonIds[] = {
+ static const sal_uInt16 pnCommonIds[] = {
ATTR_FONT_UNDERLINE, ATTR_FONT_CROSSEDOUT, ATTR_FONT_CONTOUR,
ATTR_FONT_SHADOWED, ATTR_FONT_COLOR, ATTR_FONT_LANGUAGE, 0 };
- static const USHORT pnLatinIds[] = {
+ static const sal_uInt16 pnLatinIds[] = {
ATTR_FONT, ATTR_FONT_HEIGHT, ATTR_FONT_WEIGHT, ATTR_FONT_POSTURE, 0 };
- static const USHORT pnAsianIds[] = {
+ static const sal_uInt16 pnAsianIds[] = {
ATTR_CJK_FONT, ATTR_CJK_FONT_HEIGHT, ATTR_CJK_FONT_WEIGHT, ATTR_CJK_FONT_POSTURE, 0 };
- static const USHORT pnComplexIds[] = {
+ static const sal_uInt16 pnComplexIds[] = {
ATTR_CTL_FONT, ATTR_CTL_FONT_HEIGHT, ATTR_CTL_FONT_WEIGHT, ATTR_CTL_FONT_POSTURE, 0 };
bool bUsed = ScfTools::CheckItems( rItemSet, pnCommonIds, bDeep );
@@ -1213,8 +1213,8 @@ size_t XclExpFontBuffer::Find( const XclFontData& rFontData )
/** Predicate for search algorithm. */
struct XclExpNumFmtPred
{
- ULONG mnScNumFmt;
- inline explicit XclExpNumFmtPred( ULONG nScNumFmt ) : mnScNumFmt( nScNumFmt ) {}
+ sal_uLong mnScNumFmt;
+ inline explicit XclExpNumFmtPred( sal_uLong nScNumFmt ) : mnScNumFmt( nScNumFmt ) {}
inline bool operator()( const XclExpNumFmt& rFormat ) const
{ return rFormat.mnScNumFmt == mnScNumFmt; }
};
@@ -1252,7 +1252,7 @@ XclExpNumFmtBuffer::~XclExpNumFmtBuffer()
delete[] mpKeywordTable;
}
-sal_uInt16 XclExpNumFmtBuffer::Insert( ULONG nScNumFmt )
+sal_uInt16 XclExpNumFmtBuffer::Insert( sal_uLong nScNumFmt )
{
XclExpNumFmtVec::const_iterator aIt =
::std::find_if( maFormatMap.begin(), maFormatMap.end(), XclExpNumFmtPred( nScNumFmt ) );
@@ -1403,7 +1403,7 @@ bool XclExpCellAlign::FillFromItemSet(
bUsed |= ScfTools::CheckItem( rItemSet, ATTR_INDENT, bStyle );
// shrink to fit
- mbShrink = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_SHRINKTOFIT, BOOL );
+ mbShrink = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_SHRINKTOFIT, sal_Bool );
bUsed |= ScfTools::CheckItem( rItemSet, ATTR_SHRINKTOFIT, bStyle );
// CTL text direction
@@ -1419,7 +1419,7 @@ bool XclExpCellAlign::FillFromItemSet(
bUsed |= ScfTools::CheckItem( rItemSet, ATTR_VER_JUSTIFY, bStyle );
// stacked/rotation
- bool bStacked = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_STACKED, BOOL );
+ bool bStacked = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_STACKED, sal_Bool );
bUsed |= ScfTools::CheckItem( rItemSet, ATTR_STACKED, bStyle );
if( bStacked )
{
@@ -1895,7 +1895,7 @@ void XclExpXFId::ConvertXFIndex( const XclExpRoot& rRoot )
XclExpXF::XclExpXF(
const XclExpRoot& rRoot, const ScPatternAttr& rPattern, sal_Int16 nScript,
- ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) :
+ sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) :
XclXFBase( true ),
XclExpRoot( rRoot )
{
@@ -1923,7 +1923,7 @@ XclExpXF::XclExpXF( const XclExpRoot& rRoot, bool bCellXF ) :
}
bool XclExpXF::Equals( const ScPatternAttr& rPattern,
- ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const
+ sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const
{
return IsCellXF() && (mpItemSet == &rPattern.GetItemSet()) &&
(!bForceLineBreak || maAlignment.mbLineBreak) &&
@@ -1960,7 +1960,7 @@ void XclExpXF::InitDefault()
}
void XclExpXF::Init( const SfxItemSet& rItemSet, sal_Int16 nScript,
- ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak, bool bDefStyle )
+ sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak, bool bDefStyle )
{
InitDefault();
mpItemSet = &rItemSet;
@@ -1982,7 +1982,7 @@ void XclExpXF::Init( const SfxItemSet& rItemSet, sal_Int16 nScript,
// number format
mnScNumFmt = (nForceScNumFmt == NUMBERFORMAT_ENTRY_NOT_FOUND) ?
- GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALUE_FORMAT, ULONG ) : nForceScNumFmt;
+ GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ) : nForceScNumFmt;
mnXclNumFmt = GetNumFmtBuffer().Insert( mnScNumFmt );
mbFmtUsed = ScfTools::CheckItem( rItemSet, ATTR_VALUE_FORMAT, IsStyleXF() );
@@ -2304,7 +2304,7 @@ sal_uInt32 XclExpXFBuffer::InsertWithFont( const ScPatternAttr* pPattern, sal_In
return InsertCellXF( pPattern, nScript, NUMBERFORMAT_ENTRY_NOT_FOUND, nForceXclFont, bForceLineBreak );
}
-sal_uInt32 XclExpXFBuffer::InsertWithNumFmt( const ScPatternAttr* pPattern, sal_Int16 nScript, ULONG nForceScNumFmt, bool bForceLineBreak )
+sal_uInt32 XclExpXFBuffer::InsertWithNumFmt( const ScPatternAttr* pPattern, sal_Int16 nScript, sal_uLong nForceScNumFmt, bool bForceLineBreak )
{
return InsertCellXF( pPattern, nScript, nForceScNumFmt, EXC_FONT_NOTFOUND, bForceLineBreak );
}
@@ -2563,7 +2563,7 @@ void XclExpXFBuffer::SaveXFXml( XclExpXmlStream& rStrm, XclExpXF& rXF )
}
sal_uInt32 XclExpXFBuffer::FindXF( const ScPatternAttr& rPattern,
- ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const
+ sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const
{
for( size_t nPos = 0, nSize = maXFList.GetSize(); nPos < nSize; ++nPos )
if( maXFList.GetRecord( nPos )->Equals( rPattern, nForceScNumFmt, nForceXclFont, bForceLineBreak ) )
@@ -2588,7 +2588,7 @@ sal_uInt32 XclExpXFBuffer::FindBuiltInXF( sal_uInt8 nStyleId, sal_uInt8 nLevel )
}
sal_uInt32 XclExpXFBuffer::InsertCellXF( const ScPatternAttr* pPattern, sal_Int16 nScript,
- ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak )
+ sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak )
{
const ScPatternAttr* pDefPattern = GetDoc().GetDefPattern();
if( !pPattern )
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index eb113ad932f0..ac86a0b065c4 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -44,7 +44,7 @@
#include "xecontent.hxx"
#include "xeescher.hxx"
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
using ::rtl::OString;
using ::rtl::OUString;
@@ -779,12 +779,12 @@ XclExpFormulaCell::XclExpFormulaCell(
XclExpNumFmtBuffer& rNumFmtBfr = rRoot.GetNumFmtBuffer();
// current cell number format
- ULONG nScNumFmt = pPattern ?
- GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, ULONG ) :
+ sal_uLong nScNumFmt = pPattern ?
+ GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ) :
rNumFmtBfr.GetStandardFormat();
// alternative number format passed to XF buffer
- ULONG nAltScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND;
+ sal_uLong nAltScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND;
/* Xcl doesn't know Boolean number formats, we write
"TRUE";"FALSE" (language dependent). Don't do it for automatic
formula formats, because Excel gets them right. */
@@ -938,7 +938,7 @@ void XclExpFormulaCell::WriteContents( XclExpStream& rStrm )
case NUMBERFORMAT_NUMBER:
{
// either value or error code
- USHORT nScErrCode = mrScFmlaCell.GetErrCode();
+ sal_uInt16 nScErrCode = mrScFmlaCell.GetErrCode();
if( nScErrCode )
rStrm << EXC_FORMULA_RES_ERROR << sal_uInt8( 0 )
<< XclTools::GetXclErrorCode( nScErrCode )
@@ -1304,7 +1304,7 @@ XclExpOutlineBuffer::XclExpOutlineBuffer( const XclExpRoot& rRoot, bool bRows )
mpScOLArray = bRows ? pOutlineTable->GetRowArray() : pOutlineTable->GetColArray();
if( mpScOLArray )
- for( USHORT nLevel = 0; nLevel < SC_OL_MAXDEPTH; ++nLevel )
+ for( sal_uInt16 nLevel = 0; nLevel < SC_OL_MAXDEPTH; ++nLevel )
if( ScOutlineEntry* pEntry = mpScOLArray->GetEntryByPos( nLevel, 0 ) )
maLevelInfos[ nLevel ].mnScEndPos = pEntry->GetEnd();
}
@@ -1314,7 +1314,7 @@ void XclExpOutlineBuffer::UpdateColRow( SCCOLROW nScPos )
if( mpScOLArray )
{
// find open level index for passed position
- USHORT nNewOpenScLevel = 0; // new open level (0-based Calc index)
+ sal_uInt16 nNewOpenScLevel = 0; // new open level (0-based Calc index)
sal_uInt8 nNewLevel = 0; // new open level (1-based Excel index)
if( mpScOLArray->FindTouchedLevel( nScPos, nScPos, nNewOpenScLevel ) )
@@ -1325,7 +1325,7 @@ void XclExpOutlineBuffer::UpdateColRow( SCCOLROW nScPos )
if( nNewLevel >= mnCurrLevel )
{
// new level(s) opened, or no level closed - update all level infos
- for( USHORT nScLevel = 0; nScLevel <= nNewOpenScLevel; ++nScLevel )
+ for( sal_uInt16 nScLevel = 0; nScLevel <= nNewOpenScLevel; ++nScLevel )
{
/* In each level: check if a new group is started (there may be
neighbored groups without gap - therefore check ALL levels). */
@@ -1343,8 +1343,8 @@ void XclExpOutlineBuffer::UpdateColRow( SCCOLROW nScPos )
{
// level(s) closed - check if any of the closed levels are collapsed
// Calc uses 0-based level indexes
- USHORT nOldOpenScLevel = mnCurrLevel - 1;
- for( USHORT nScLevel = nNewOpenScLevel + 1; !mbCurrCollapse && (nScLevel <= nOldOpenScLevel); ++nScLevel )
+ sal_uInt16 nOldOpenScLevel = mnCurrLevel - 1;
+ for( sal_uInt16 nScLevel = nNewOpenScLevel + 1; !mbCurrCollapse && (nScLevel <= nOldOpenScLevel); ++nScLevel )
mbCurrCollapse = maLevelInfos[ nScLevel ].mbHidden;
}
@@ -1499,7 +1499,7 @@ XclExpColinfo::XclExpColinfo( const XclExpRoot& rRoot,
rDoc.GetMostUsedPattern( nScCol, 0, nLastScRow, nScTab ), GetDefApiScript() );
// column width
- USHORT nScWidth = rDoc.GetColWidth( nScCol, nScTab );
+ sal_uInt16 nScWidth = rDoc.GetColWidth( nScCol, nScTab );
mnWidth = XclTools::GetXclColumnWidth( nScWidth, GetCharWidth() );
// column flags
@@ -1726,8 +1726,8 @@ XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt16 nXclRow,
// *** Row flags *** ------------------------------------------------------
- BYTE nRowFlags = GetDoc().GetRowFlags( nScRow, nScTab );
- bool bUserHeight = ::get_flag< BYTE >( nRowFlags, CR_MANUALSIZE );
+ sal_uInt8 nRowFlags = GetDoc().GetRowFlags( nScRow, nScTab );
+ bool bUserHeight = ::get_flag< sal_uInt8 >( nRowFlags, CR_MANUALSIZE );
bool bHidden = GetDoc().RowHidden(nScRow, nScTab);
::set_flag( mnFlags, EXC_ROW_UNSYNCED, bUserHeight );
::set_flag( mnFlags, EXC_ROW_HIDDEN, bHidden );
@@ -2273,7 +2273,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
// try to create a Boolean cell
if( pPattern && ((fValue == 0.0) || (fValue == 1.0)) )
{
- ULONG nScNumFmt = GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, ULONG );
+ sal_uLong nScNumFmt = GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong );
if( rFormatter.GetType( nScNumFmt ) == NUMBERFORMAT_LOGICAL )
xCell.reset( new XclExpBooleanCell(
GetRoot(), aXclPos, pPattern, nMergeBaseXFId, fValue != 0.0 ) );
@@ -2373,7 +2373,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
// data validation
if( ScfTools::CheckItem( rItemSet, ATTR_VALIDDATA, false ) )
{
- ULONG nScHandle = GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALIDDATA, ULONG );
+ sal_uLong nScHandle = GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALIDDATA, sal_uLong );
ScRange aScRange( aScPos );
aScRange.aEnd.SetCol( nLastScCol );
mxDval->InsertCellRange( aScRange, nScHandle );
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index 85cd24ece0a5..df69840081cb 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -35,7 +35,7 @@
#include "xelink.hxx"
#include "xestyle.hxx"
-#include <oox/core/tokens.hxx>
+using namespace ::oox;
using ::rtl::OString;
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index d262342b65a4..0393ad2d45bf 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -44,6 +44,9 @@
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
#include <com/sun/star/chart/ChartAxisPosition.hpp>
+#include <com/sun/star/chart/ChartLegendExpansion.hpp>
+#include <com/sun/star/chart/TimeInterval.hpp>
+#include <com/sun/star/chart/TimeUnit.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart/XDiagramPositioning.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -60,11 +63,11 @@
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
-#include <com/sun/star/chart2/LegendExpansion.hpp>
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
#include <com/sun/star/chart2/TickmarkStyle.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
@@ -108,6 +111,7 @@ using ::com::sun::star::drawing::XShape;
using ::com::sun::star::chart2::IncrementData;
using ::com::sun::star::chart2::RelativePosition;
+using ::com::sun::star::chart2::RelativeSize;
using ::com::sun::star::chart2::ScaleData;
using ::com::sun::star::chart2::SubIncrement;
using ::com::sun::star::chart2::XAxis;
@@ -151,13 +155,12 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclChRectangle& rRect )
return rStrm >> rRect.mnX >> rRect.mnY >> rRect.mnWidth >> rRect.mnHeight;
}
-template< typename Type >
-void lclSetValueOrClearAny( Any& rAny, const Type& rValue, bool bClear )
+inline void lclSetValueOrClearAny( Any& rAny, double fValue, bool bClear )
{
if( bClear )
rAny.clear();
else
- rAny <<= rValue;
+ rAny <<= fValue;
}
void lclSetExpValueOrClearAny( Any& rAny, double fValue, bool bLogScale, bool bClear )
@@ -167,6 +170,50 @@ void lclSetExpValueOrClearAny( Any& rAny, double fValue, bool bLogScale, bool bC
lclSetValueOrClearAny( rAny, fValue, bClear );
}
+double lclGetSerialDay( const XclImpRoot& rRoot, sal_uInt16 nValue, sal_uInt16 nTimeUnit )
+{
+ switch( nTimeUnit )
+ {
+ case EXC_CHDATERANGE_DAYS:
+ return nValue;
+ case EXC_CHDATERANGE_MONTHS:
+ return rRoot.GetDoubleFromDateTime( Date( 1, static_cast< sal_uInt16 >( 1 + nValue % 12 ), static_cast< sal_uInt16 >( rRoot.GetBaseYear() + nValue / 12 ) ) );
+ case EXC_CHDATERANGE_YEARS:
+ return rRoot.GetDoubleFromDateTime( Date( 1, 1, static_cast< sal_uInt16 >( rRoot.GetBaseYear() + nValue ) ) );
+ default:
+ OSL_ENSURE( false, "lclGetSerialDay - unexpected time unit" );
+ }
+ return nValue;
+}
+
+void lclConvertTimeValue( const XclImpRoot& rRoot, Any& rAny, sal_uInt16 nValue, bool bAuto, sal_uInt16 nTimeUnit )
+{
+ if( bAuto )
+ rAny.clear();
+ else
+ rAny <<= lclGetSerialDay( rRoot, nValue, nTimeUnit );
+}
+
+sal_Int32 lclGetApiTimeUnit( sal_uInt16 nTimeUnit )
+{
+ switch( nTimeUnit )
+ {
+ case EXC_CHDATERANGE_DAYS: return cssc::TimeUnit::DAY;
+ case EXC_CHDATERANGE_MONTHS: return cssc::TimeUnit::MONTH;
+ case EXC_CHDATERANGE_YEARS: return cssc::TimeUnit::YEAR;
+ default: OSL_ENSURE( false, "lclGetApiTimeUnit - unexpected time unit" );
+ }
+ return cssc::TimeUnit::DAY;
+}
+
+void lclConvertTimeInterval( Any& rInterval, sal_uInt16 nValue, bool bAuto, sal_uInt16 nTimeUnit )
+{
+ if( bAuto || (nValue == 0) )
+ rInterval.clear();
+ else
+ rInterval <<= cssc::TimeInterval( nValue, lclGetApiTimeUnit( nTimeUnit ) );
+}
+
} // namespace
// Common =====================================================================
@@ -296,14 +343,24 @@ sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_Int32 nPosY ) const
CalcHmmFromChartY( rRect.mnHeight ) );
}
+double XclImpChRoot::CalcRelativeFromHmmX( sal_Int32 nPosX ) const
+{
+ return static_cast< double >( nPosX ) / mxChData->maChartRect.GetWidth();
+}
+
+double XclImpChRoot::CalcRelativeFromHmmY( sal_Int32 nPosY ) const
+{
+ return static_cast< double >( nPosY ) / mxChData->maChartRect.GetHeight();
+}
+
double XclImpChRoot::CalcRelativeFromChartX( sal_Int32 nPosX ) const
{
- return static_cast< double >( CalcHmmFromChartX( nPosX ) ) / mxChData->maChartRect.GetWidth();
+ return CalcRelativeFromHmmX( CalcHmmFromChartX( nPosX ) );
}
double XclImpChRoot::CalcRelativeFromChartY( sal_Int32 nPosY ) const
{
- return static_cast< double >( CalcHmmFromChartY( nPosY ) ) / mxChData->maChartRect.GetHeight();
+ return CalcRelativeFromHmmY( CalcHmmFromChartY( nPosY ) );
}
void XclImpChRoot::ConvertLineFormat( ScfPropertySet& rPropSet,
@@ -2460,18 +2517,30 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const
manual mode, if the legend is moved or resized). With manual plot
areas, Excel ignores the value in maData.mnDockMode completely. */
cssc2::LegendPosition eApiPos = cssc2::LegendPosition_CUSTOM;
- cssc2::LegendExpansion eApiExpand = cssc2::LegendExpansion_BALANCED;
+ cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
if( !GetChartData().IsManualPlotArea() ) switch( maData.mnDockMode )
{
- case EXC_CHLEGEND_LEFT: eApiPos = cssc2::LegendPosition_LINE_START; eApiExpand = cssc2::LegendExpansion_HIGH; break;
- case EXC_CHLEGEND_RIGHT: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc2::LegendExpansion_HIGH; break;
- case EXC_CHLEGEND_TOP: eApiPos = cssc2::LegendPosition_PAGE_START; eApiExpand = cssc2::LegendExpansion_WIDE; break;
- case EXC_CHLEGEND_BOTTOM: eApiPos = cssc2::LegendPosition_PAGE_END; eApiExpand = cssc2::LegendExpansion_WIDE; break;
+ case EXC_CHLEGEND_LEFT:
+ eApiPos = cssc2::LegendPosition_LINE_START;
+ eApiExpand = cssc::ChartLegendExpansion_HIGH;
+ break;
+ case EXC_CHLEGEND_RIGHT:
// top-right not supported
- case EXC_CHLEGEND_CORNER: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc2::LegendExpansion_HIGH; break;
+ case EXC_CHLEGEND_CORNER:
+ eApiPos = cssc2::LegendPosition_LINE_END;
+ eApiExpand = cssc::ChartLegendExpansion_HIGH;
+ break;
+ case EXC_CHLEGEND_TOP:
+ eApiPos = cssc2::LegendPosition_PAGE_START;
+ eApiExpand = cssc::ChartLegendExpansion_WIDE;
+ break;
+ case EXC_CHLEGEND_BOTTOM:
+ eApiPos = cssc2::LegendPosition_PAGE_END;
+ eApiExpand = cssc::ChartLegendExpansion_WIDE;
+ break;
}
- // no automatic position: try to find the correct position and size
+ // no automatic position/size: try to find the correct position and size
if( eApiPos == cssc2::LegendPosition_CUSTOM )
{
const XclChFramePos* pFramePos = mxFramePos ? &mxFramePos->GetFramePosData() : 0;
@@ -2481,38 +2550,35 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const
ignored. */
if( pFramePos )
{
- RelativePosition aRelPos;
- aRelPos.Primary = CalcRelativeFromChartX( pFramePos->maRect.mnX );
- aRelPos.Secondary = CalcRelativeFromChartY( pFramePos->maRect.mnY );
- aRelPos.Anchor = ::com::sun::star::drawing::Alignment_TOP_LEFT;
+ RelativePosition aRelPos(
+ CalcRelativeFromChartX( pFramePos->maRect.mnX ),
+ CalcRelativeFromChartY( pFramePos->maRect.mnY ),
+ ::com::sun::star::drawing::Alignment_TOP_LEFT );
aLegendProp.SetProperty( EXC_CHPROP_RELATIVEPOSITION, aRelPos );
}
else
{
- // no manual position found, just go for the default
+ // no manual position/size found, just go for the default
eApiPos = cssc2::LegendPosition_LINE_END;
}
-
- /* Legend size. #i71697# It is not possible to set the legend size
- directly in the Chart, do some magic here. */
- if( !pFramePos || (pFramePos->mnBRMode != EXC_CHFRAMEPOS_ABSSIZE_POINTS) ||
- (pFramePos->maRect.mnWidth == 0) || (pFramePos->maRect.mnHeight == 0) )
+ /* Legend size. The member mnBRMode specifies whether size is
+ automatic or changes manually. Manual size is given in points,
+ not in chart units. */
+ if( pFramePos && (pFramePos->mnBRMode == EXC_CHFRAMEPOS_ABSSIZE_POINTS) &&
+ (pFramePos->maRect.mnWidth > 0) && (pFramePos->maRect.mnHeight > 0) )
{
- // automatic size: determine entry direction from flags
- eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED,
- cssc2::LegendExpansion_HIGH, cssc2::LegendExpansion_WIDE );
+ eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
+ sal_Int32 nWidthHmm = static_cast< sal_Int32 >( pFramePos->maRect.mnWidth / EXC_POINTS_PER_HMM );
+ sal_Int32 nHeightHmm = static_cast< sal_Int32 >( pFramePos->maRect.mnHeight / EXC_POINTS_PER_HMM );
+ RelativeSize aRelSize( CalcRelativeFromHmmX( nWidthHmm ), CalcRelativeFromHmmY( nHeightHmm ) );
+ aLegendProp.SetProperty( EXC_CHPROP_RELATIVESIZE, aRelSize );
}
else
{
- // legend size is given in points, not in chart units
- double fRatio = static_cast< double >( pFramePos->maRect.mnWidth ) / pFramePos->maRect.mnHeight;
- if( fRatio > 1.5 )
- eApiExpand = cssc2::LegendExpansion_WIDE;
- else if( fRatio < 0.75 )
- eApiExpand = cssc2::LegendExpansion_HIGH;
- else
- eApiExpand = cssc2::LegendExpansion_BALANCED;
+ // automatic size: determine entry direction from flags
+ eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED,
+ cssc::ChartLegendExpansion_HIGH, cssc::ChartLegendExpansion_WIDE );
}
}
aLegendProp.SetProperty( EXC_CHPROP_ANCHORPOSITION, eApiPos );
@@ -2866,20 +2932,60 @@ XclImpChLabelRange::XclImpChLabelRange( const XclImpChRoot& rRoot ) :
void XclImpChLabelRange::ReadChLabelRange( XclImpStream& rStrm )
{
- rStrm >> maData.mnCross >> maData.mnLabelFreq >> maData.mnTickFreq >> maData.mnFlags;
+ rStrm >> maLabelData.mnCross >> maLabelData.mnLabelFreq >> maLabelData.mnTickFreq >> maLabelData.mnFlags;
+}
+
+void XclImpChLabelRange::ReadChDateRange( XclImpStream& rStrm )
+{
+ rStrm >> maDateData.mnMinDate
+ >> maDateData.mnMaxDate
+ >> maDateData.mnMajorStep
+ >> maDateData.mnMajorUnit
+ >> maDateData.mnMinorStep
+ >> maDateData.mnMinorUnit
+ >> maDateData.mnBaseUnit
+ >> maDateData.mnCross
+ >> maDateData.mnFlags;
}
void XclImpChLabelRange::Convert( ScfPropertySet& rPropSet, ScaleData& rScaleData, bool bMirrorOrient ) const
{
- // do not overlap text unless all labels are visible
- rPropSet.SetBoolProperty( EXC_CHPROP_TEXTOVERLAP, maData.mnLabelFreq == 1 );
- // do not break text into several lines unless all labels are visible
- rPropSet.SetBoolProperty( EXC_CHPROP_TEXTBREAK, maData.mnLabelFreq == 1 );
- // do not stagger labels in two lines
- rPropSet.SetProperty( EXC_CHPROP_ARRANGEORDER, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE );
+ // automatic axis type detection
+ rScaleData.AutoDateAxis = ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTODATE );
+
+ // the flag EXC_CHDATERANGE_DATEAXIS specifies whether this is a date axis
+ if( ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS ) )
+ {
+ /* Chart2 requires axis type CATEGORY for automatic category/date axis
+ (even if it is a date axis currently). */
+ rScaleData.AxisType = rScaleData.AutoDateAxis ? cssc2::AxisType::CATEGORY : cssc2::AxisType::DATE;
+ rScaleData.Scaling.set( ScfApiHelper::CreateInstance( SERVICE_CHART2_LINEARSCALING ), UNO_QUERY );
+ /* Min/max values depend on base time unit, they specify the number of
+ days, months, or years starting from null date. */
+ lclConvertTimeValue( GetRoot(), rScaleData.Minimum, maDateData.mnMinDate, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMIN ), maDateData.mnBaseUnit );
+ lclConvertTimeValue( GetRoot(), rScaleData.Maximum, maDateData.mnMaxDate, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAX ), maDateData.mnBaseUnit );
+ // increment
+ cssc::TimeIncrement& rTimeIncrement = rScaleData.TimeIncrement;
+ lclConvertTimeInterval( rTimeIncrement.MajorTimeInterval, maDateData.mnMajorStep, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAJOR ), maDateData.mnMajorUnit );
+ lclConvertTimeInterval( rTimeIncrement.MinorTimeInterval, maDateData.mnMinorStep, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMINOR ), maDateData.mnMinorUnit );
+ // base unit
+ if( ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOBASE ) )
+ rTimeIncrement.TimeResolution.clear();
+ else
+ rTimeIncrement.TimeResolution <<= lclGetApiTimeUnit( maDateData.mnBaseUnit );
+ }
+ else
+ {
+ // do not overlap text unless all labels are visible
+ rPropSet.SetBoolProperty( EXC_CHPROP_TEXTOVERLAP, maLabelData.mnLabelFreq == 1 );
+ // do not break text into several lines unless all labels are visible
+ rPropSet.SetBoolProperty( EXC_CHPROP_TEXTBREAK, maLabelData.mnLabelFreq == 1 );
+ // do not stagger labels in two lines
+ rPropSet.SetProperty( EXC_CHPROP_ARRANGEORDER, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE );
+ }
// reverse order
- bool bReverse = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE ) != bMirrorOrient;
+ bool bReverse = ::get_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_REVERSE ) != bMirrorOrient;
rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL;
//! TODO #i58731# show n-th category
@@ -2891,13 +2997,29 @@ void XclImpChLabelRange::ConvertAxisPosition( ScfPropertySet& rPropSet, bool b3d
does not move the Y axis in 3D charts, regardless of actual settings.
But: the Y axis has to be moved to "end", if the X axis is mirrored,
to keep it at the left end of the chart. */
- bool bMaxCross = ::get_flag( maData.mnFlags, b3dChart ? EXC_CHLABELRANGE_REVERSE : EXC_CHLABELRANGE_MAXCROSS );
+ bool bMaxCross = ::get_flag( maLabelData.mnFlags, b3dChart ? EXC_CHLABELRANGE_REVERSE : EXC_CHLABELRANGE_MAXCROSS );
cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE;
rPropSet.SetProperty( EXC_CHPROP_CROSSOVERPOSITION, eAxisPos );
- // crossing position
- double fCrossingPos = b3dChart ? 1.0 : maData.mnCross;
- rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos );
+ // crossing position (depending on axis type text/date)
+ if( ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS ) )
+ {
+ bool bAutoCross = ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS );
+ /* Crossing position value depends on base time unit, it specifies the
+ number of days, months, or years from null date. Note that Excel
+ 2007/2010 write broken BIFF8 files, they always stores the number
+ of days cregardless of the base time unit (and they are reading it
+ the same way, thus wrongly displaying files written by Excel
+ 97-2003). This filter sticks to the correct behaviour of Excel
+ 97-2003. */
+ double fCrossingPos = bAutoCross ? 1.0 : lclGetSerialDay( GetRoot(), maDateData.mnCross, maDateData.mnBaseUnit );
+ rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos );
+ }
+ else
+ {
+ double fCrossingPos = b3dChart ? 1.0 : maLabelData.mnCross;
+ rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos );
+ }
}
// ----------------------------------------------------------------------------
@@ -2938,6 +3060,7 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements;
rSubIncrementSeq.realloc( 1 );
Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount;
+ rIntervalCount.clear();
if( bLogScale )
{
if( !bAutoMinor )
@@ -2945,14 +3068,12 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
}
else
{
- sal_Int32 nCount = 0;
if( !bAutoMajor && !bAutoMinor && (0.0 < maData.mfMinorStep) && (maData.mfMinorStep <= maData.mfMajorStep) )
{
double fCount = maData.mfMajorStep / maData.mfMinorStep + 0.5;
- if( fCount < 1001.0 )
- nCount = static_cast< sal_Int32 >( fCount );
+ if( (1.0 <= fCount) && (fCount < 1001.0) )
+ rIntervalCount <<= static_cast< sal_Int32 >( fCount );
}
- lclSetValueOrClearAny( rIntervalCount, nCount, nCount == 0 );
}
// reverse order
@@ -3073,6 +3194,11 @@ void XclImpChAxis::ReadSubRecord( XclImpStream& rStrm )
mxLabelRange.reset( new XclImpChLabelRange( GetChRoot() ) );
mxLabelRange->ReadChLabelRange( rStrm );
break;
+ case EXC_ID_CHDATERANGE:
+ if( !mxLabelRange )
+ mxLabelRange.reset( new XclImpChLabelRange( GetChRoot() ) );
+ mxLabelRange->ReadChDateRange( rStrm );
+ break;
case EXC_ID_CHVALUERANGE:
mxValueRange.reset( new XclImpChValueRange( GetChRoot() ) );
mxValueRange->ReadChValueRange( rStrm );
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 1d5323645650..40a3e7ab9d23 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -626,7 +626,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
if( !mxScCondFmt.get() )
{
- ULONG nKey = 0;
+ sal_uLong nKey = 0;
mxScCondFmt.reset( new ScConditionalFormat( nKey, GetDocPtr() ) );
}
@@ -641,7 +641,7 @@ void XclImpCondFormat::Apply()
{
ScDocument& rDoc = GetDoc();
- ULONG nKey = rDoc.AddCondFormat( *mxScCondFmt );
+ sal_uLong nKey = rDoc.AddCondFormat( *mxScCondFmt );
ScPatternAttr aPattern( rDoc.GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_CONDITIONAL, nKey ) );
@@ -863,7 +863,7 @@ void XclImpValidationManager::Apply()
{
DVItem& rItem = *itr;
// set the handle ID
- ULONG nHandle = rDoc.AddValidationEntry( rItem.maValidData );
+ sal_uLong nHandle = rDoc.AddValidationEntry( rItem.maValidData );
ScPatternAttr aPattern( rDoc.GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nHandle ) );
@@ -931,14 +931,13 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm )
String aTables( rStrm.ReadUniString() );
const sal_Unicode cSep = ';';
- aTables.SearchAndReplaceAll( ',', cSep );
String aQuotedPairs( RTL_CONSTASCII_USTRINGPARAM( "\"\"" ) );
- xub_StrLen nTokenCnt = aTables.GetQuotedTokenCount( aQuotedPairs, cSep );
+ xub_StrLen nTokenCnt = aTables.GetQuotedTokenCount( aQuotedPairs, ',' );
maTables.Erase();
xub_StrLen nStringIx = 0;
for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken )
{
- String aToken( aTables.GetQuotedToken( 0, aQuotedPairs, cSep, nStringIx ) );
+ String aToken( aTables.GetQuotedToken( 0, aQuotedPairs, ',', nStringIx ) );
sal_Int32 nTabNum = CharClass::isAsciiNumeric( aToken ) ? aToken.ToInt32() : 0;
if( nTabNum > 0 )
ScGlobal::AddToken( maTables, ScfTools::GetNameFromHTMLIndex( static_cast< sal_uInt32 >( nTabNum ) ), cSep );
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index fa0f1dab8b2e..3039fba3b81e 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -481,7 +481,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb
if( (maMacroName.Len() > 0 ) ||
(maHyperlink.Len() > 0) )
{
- if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) )
+ if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, sal_True ) )
{
pInfo->SetMacro( XclTools::GetSbMacroUrl( maMacroName, GetDocShell() ) );
pInfo->SetHlink( maHyperlink );
@@ -570,9 +570,9 @@ void XclImpDrawObjBase::ConvertLineStyle( SdrObject& rSdrObj, const XclObjLineDa
rSdrObj.SetMergedItem( XLineColorItem( EMPTY_STRING, GetPalette().GetColor( rLineData.mnColorIdx ) ) );
rSdrObj.SetMergedItem( XLineJointItem( XLINEJOINT_MITER ) );
- ULONG nDotLen = ::std::max< ULONG >( 70 * rLineData.mnWidth, 35 );
- ULONG nDashLen = 3 * nDotLen;
- ULONG nDist = 2 * nDotLen;
+ sal_uLong nDotLen = ::std::max< sal_uLong >( 70 * rLineData.mnWidth, 35 );
+ sal_uLong nDashLen = 3 * nDotLen;
+ sal_uLong nDist = 2 * nDotLen;
switch( rLineData.mnStyle )
{
@@ -668,7 +668,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa
aMemStrm << sal_uInt32( pnPattern[ nIdx ] ); // 32-bit little-endian
aMemStrm.Seek( STREAM_SEEK_TO_BEGIN );
Bitmap aBitmap;
- aBitmap.Read( aMemStrm, FALSE );
+ aBitmap.Read( aMemStrm, false );
XOBitmap aXOBitmap( aBitmap );
aXOBitmap.Bitmap2Array();
aXOBitmap.SetBitmapType( XBITMAP_8X8 );
@@ -686,7 +686,7 @@ void XclImpDrawObjBase::ConvertFrameStyle( SdrObject& rSdrObj, sal_uInt16 nFrame
{
if( ::get_flag( nFrameFlags, EXC_OBJ_FRAME_SHADOW ) )
{
- rSdrObj.SetMergedItem( SdrShadowItem( TRUE ) );
+ rSdrObj.SetMergedItem( SdrShadowItem( sal_True ) );
rSdrObj.SetMergedItem( SdrShadowXDistItem( 35 ) );
rSdrObj.SetMergedItem( SdrShadowYDistItem( 35 ) );
rSdrObj.SetMergedItem( SdrShadowColorItem( EMPTY_STRING, GetPalette().GetColor( EXC_COLOR_WINDOWTEXT ) ) );
@@ -1082,13 +1082,13 @@ SdrObject* XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Re
{
xSdrObj->SetMergedItem( XLineStartItem( EMPTY_STRING, aArrowPolyPoly ) );
xSdrObj->SetMergedItem( XLineStartWidthItem( nWidth ) );
- xSdrObj->SetMergedItem( XLineStartCenterItem( FALSE ) );
+ xSdrObj->SetMergedItem( XLineStartCenterItem( false ) );
}
if( bLineEnd )
{
xSdrObj->SetMergedItem( XLineEndItem( EMPTY_STRING, aArrowPolyPoly ) );
xSdrObj->SetMergedItem( XLineEndWidthItem( nWidth ) );
- xSdrObj->SetMergedItem( XLineEndCenterItem( FALSE ) );
+ xSdrObj->SetMergedItem( XLineEndCenterItem( false ) );
}
}
rDffConv.Progress();
@@ -1373,10 +1373,10 @@ SdrObject* XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Re
OUString aRectType = CREATE_OUSTRING( "rectangle" );
xSdrObj->MergeDefaultAttributes( &aRectType );
ConvertRectStyle( *xSdrObj );
- BOOL bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE );
+ sal_Bool bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE );
xSdrObj->SetMergedItem( SdrTextAutoGrowWidthItem( bAutoSize ) );
xSdrObj->SetMergedItem( SdrTextAutoGrowHeightItem( bAutoSize ) );
- xSdrObj->SetMergedItem( SdrTextWordWrapItem( TRUE ) );
+ xSdrObj->SetMergedItem( SdrTextWordWrapItem( sal_True ) );
rDffConv.Progress();
return xSdrObj.release();
}
@@ -3129,7 +3129,7 @@ XclImpSimpleDffConverter::~XclImpSimpleDffConverter()
{
}
-bool XclImpSimpleDffConverter::GetColorFromPalette( USHORT nIndex, Color& rColor ) const
+bool XclImpSimpleDffConverter::GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const
{
ColorData nColor = GetPalette().GetColorData( static_cast< sal_uInt16 >( nIndex ) );
@@ -3285,7 +3285,7 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxObj,
::com::sun::star::awt::Size aDummySize;
Reference< XShape > xShape;
XclImpDffConvData& rConvData = GetConvData();
- if( rConvData.mxCtrlForm.is() && InsertControl( xFormComp, aDummySize, &xShape, TRUE ) )
+ if( rConvData.mxCtrlForm.is() && InsertControl( xFormComp, aDummySize, &xShape, sal_True ) )
{
xSdrObj.reset( rTbxObj.CreateSdrObjectFromShape( xShape, rAnchorRect ) );
// try to attach a macro to the control
@@ -3321,7 +3321,7 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj,
mxCtlsStrm->Seek( rPicObj.GetCtlsStreamPos() );
// read from mxCtlsStrm into xShape, insert the control model into the form
Reference< XShape > xShape;
- if( GetConvData().mxCtrlForm.is() && ReadOCXExcelKludgeStream( mxCtlsStrm, &xShape, TRUE ) )
+ if( GetConvData().mxCtrlForm.is() && ReadOCXExcelKludgeStream( mxCtlsStrm, &xShape, sal_True ) )
xSdrObj.reset( rPicObj.CreateSdrObjectFromShape( xShape, rAnchorRect ) );
}
catch( Exception& )
@@ -3485,14 +3485,14 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO
return xSdrObj.release();
}
-ULONG XclImpDffConverter::Calc_nBLIPPos( ULONG /*nOrgVal*/, ULONG nStreamPos ) const
+sal_uLong XclImpDffConverter::Calc_nBLIPPos( sal_uLong /*nOrgVal*/, sal_uLong nStreamPos ) const
{
return nStreamPos + 4;
}
sal_Bool XclImpDffConverter::InsertControl( const Reference< XFormComponent >& rxFormComp,
const ::com::sun::star::awt::Size& /*rSize*/, Reference< XShape >* pxShape,
- BOOL /*bFloatingCtrl*/ )
+ sal_Bool /*bFloatingCtrl*/ )
{
if( GetDocShell() ) try
{
@@ -3520,7 +3520,7 @@ sal_Bool XclImpDffConverter::InsertControl( const Reference< XFormComponent >& r
DBG_ERRORFILE( "XclImpDffConverter::InsertControl - cannot create form control" );
}
- return sal_False;
+ return false;
}
// private --------------------------------------------------------------------
@@ -3917,7 +3917,7 @@ void XclImpDrawing::ReadBmp( Graphic& rGraphic, const XclImpRoot& rRoot, XclImpS
// import the graphic from memory stream
aMemStrm.Seek( STREAM_SEEK_TO_BEGIN );
Bitmap aBitmap;
- if( aBitmap.Read( aMemStrm, FALSE ) ) // read DIB without file header
+ if( aBitmap.Read( aMemStrm, false ) ) // read DIB without file header
rGraphic = aBitmap;
}
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index f0bd8425d661..34a02e028070 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -811,7 +811,7 @@ XclImpCachedValue::~XclImpCachedValue()
{
}
-USHORT XclImpCachedValue::GetScError() const
+sal_uInt16 XclImpCachedValue::GetScError() const
{
return (mnType == EXC_CACHEDVAL_ERROR) ? XclTools::GetScErrorCode( mnBoolErr ) : 0;
}
@@ -851,7 +851,7 @@ ScMatrixRef XclImpCachedMatrix::CreateScMatrix() const
{
ScMatrixRef xScMatrix;
DBG_ASSERT( mnScCols * mnScRows == maValueList.size(), "XclImpCachedMatrix::CreateScMatrix - element count mismatch" );
- if( mnScCols && mnScRows && static_cast< ULONG >( mnScCols * mnScRows ) <= maValueList.size() )
+ if( mnScCols && mnScRows && static_cast< sal_uLong >( mnScCols * mnScRows ) <= maValueList.size() )
{
xScMatrix = new ScMatrix( mnScCols, mnScRows );
XclImpValueList::const_iterator itValue = maValueList.begin();
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 03a49acfc787..b5eba95c6755 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -255,7 +255,7 @@ XclImpNameManager::XclImpNameManager( const XclImpRoot& rRoot ) :
void XclImpNameManager::ReadName( XclImpStream& rStrm )
{
- ULONG nCount = maNameList.size();
+ sal_uLong nCount = maNameList.size();
if( nCount < 0xFFFF )
maNameList.push_back( new XclImpName( rStrm, static_cast< sal_uInt16 >( nCount + 1 ) ) );
}
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index bcdf78f588f7..b6ba93124e0e 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -498,7 +498,7 @@ ScDPNumGroupInfo XclImpPCField::GetScNumGroupInfo() const
{
ScDPNumGroupInfo aNumInfo;
aNumInfo.Enable = sal_True;
- aNumInfo.DateValues = sal_False;
+ aNumInfo.DateValues = false;
aNumInfo.AutoStart = sal_True;
aNumInfo.AutoEnd = sal_True;
@@ -522,7 +522,7 @@ ScDPNumGroupInfo XclImpPCField::GetScDateGroupInfo() const
{
ScDPNumGroupInfo aDateInfo;
aDateInfo.Enable = sal_True;
- aDateInfo.DateValues = sal_False;
+ aDateInfo.DateValues = false;
aDateInfo.AutoStart = sal_True;
aDateInfo.AutoEnd = sal_True;
@@ -982,7 +982,7 @@ void XclImpPTField::ConvertRowColField( ScDPSaveData& rSaveData ) const
DBG_ASSERT( maFieldInfo.mnAxes & EXC_SXVD_AXIS_ROWCOL, "XclImpPTField::ConvertRowColField - no row/column field" );
// special data orientation field?
if( maFieldInfo.mnCacheIdx == EXC_SXIVD_DATA )
- rSaveData.GetDataLayoutDimension()->SetOrientation( static_cast< USHORT >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOL ) ) );
+ rSaveData.GetDataLayoutDimension()->SetOrientation( static_cast< sal_uInt16 >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOL ) ) );
else
ConvertRCPField( rSaveData );
}
@@ -1086,7 +1086,7 @@ ScDPSaveDimension* XclImpPTField::ConvertRCPField( ScDPSaveData& rSaveData ) con
ScDPSaveDimension& rSaveDim = *rSaveData.GetNewDimensionByName( rFieldName );
// orientation
- rSaveDim.SetOrientation( static_cast< USHORT >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOLPAGE ) ) );
+ rSaveDim.SetOrientation( static_cast< sal_uInt16 >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOLPAGE ) ) );
// general field info
ConvertFieldInfo( rSaveDim );
@@ -1160,7 +1160,7 @@ void XclImpPTField::ConvertDataFieldInfo( ScDPSaveDimension& rSaveDim, const Xcl
rSaveDim.SetLayoutName( *pVisName );
// aggregation function
- rSaveDim.SetFunction( static_cast< USHORT >( rDataInfo.GetApiAggFunc() ) );
+ rSaveDim.SetFunction( static_cast< sal_uInt16 >( rDataInfo.GetApiAggFunc() ) );
// result field reference
sal_Int32 nRefType = rDataInfo.GetApiRefType();
@@ -1366,7 +1366,7 @@ void XclImpPivotTable::Convert()
aSaveData.SetRowGrand( ::get_flag( maPTInfo.mnFlags, EXC_SXVIEW_ROWGRAND ) );
aSaveData.SetColumnGrand( ::get_flag( maPTInfo.mnFlags, EXC_SXVIEW_COLGRAND ) );
- aSaveData.SetFilterButton( FALSE );
+ aSaveData.SetFilterButton( false );
aSaveData.SetDrillDown( ::get_flag( maPTExtInfo.mnFlags, EXC_SXEX_DRILLDOWN ) );
// *** fields ***
@@ -1435,7 +1435,7 @@ void XclImpPivotTable::Convert()
pDPObj->SetSaveData( aSaveData );
pDPObj->SetSheetDesc( aDesc );
pDPObj->SetOutRange( aOutRange );
- pDPObj->SetAlive( TRUE );
+ pDPObj->SetAlive( sal_True );
pDPObj->SetHeaderLayout( maPTViewEx9Info.mnGridLayout == 0 );
GetDoc().GetDPCollection()->InsertNewTable(pDPObj);
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index e0af805fa09a..9a4bcfb43d10 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -29,6 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
+#include <comphelper/docpasswordhelper.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+
#include "xistream.hxx"
#include "xlstring.hxx"
#include "xiroot.hxx"
@@ -39,6 +42,8 @@ using ::rtl::OString;
using ::rtl::OUString;
using ::rtl::OUStringToOString;
+using namespace ::com::sun::star;
+
// ============================================================================
// Decryption
// ============================================================================
@@ -70,9 +75,16 @@ XclImpDecrypterRef XclImpDecrypter::Clone() const
return xNewDecr;
}
-::comphelper::DocPasswordVerifierResult XclImpDecrypter::verifyPassword( const OUString& rPassword )
+::comphelper::DocPasswordVerifierResult XclImpDecrypter::verifyPassword( const ::rtl::OUString& rPassword, uno::Sequence< beans::NamedValue >& o_rEncryptionData )
+{
+ o_rEncryptionData = OnVerifyPassword( rPassword );
+ mnError = o_rEncryptionData.getLength() ? ERRCODE_NONE : ERRCODE_ABORT;
+ return o_rEncryptionData.getLength() ? ::comphelper::DocPasswordVerifierResult_OK : ::comphelper::DocPasswordVerifierResult_WRONG_PASSWORD;
+}
+
+::comphelper::DocPasswordVerifierResult XclImpDecrypter::verifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData )
{
- bool bValid = OnVerify( rPassword );
+ bool bValid = OnVerifyEncryptionData( rEncryptionData );
mnError = bValid ? ERRCODE_NONE : ERRCODE_ABORT;
return bValid ? ::comphelper::DocPasswordVerifierResult_OK : ::comphelper::DocPasswordVerifierResult_WRONG_PASSWORD;
}
@@ -111,7 +123,6 @@ sal_uInt16 XclImpDecrypter::Read( SvStream& rStrm, void* pData, sal_uInt16 nByte
// ----------------------------------------------------------------------------
XclImpBiff5Decrypter::XclImpBiff5Decrypter( sal_uInt16 nKey, sal_uInt16 nHash ) :
- maPassword( 16 ),
mnKey( nKey ),
mnHash( nHash )
{
@@ -119,12 +130,12 @@ XclImpBiff5Decrypter::XclImpBiff5Decrypter( sal_uInt16 nKey, sal_uInt16 nHash )
XclImpBiff5Decrypter::XclImpBiff5Decrypter( const XclImpBiff5Decrypter& rSrc ) :
XclImpDecrypter( rSrc ),
- maPassword( rSrc.maPassword ),
+ maEncryptionData( rSrc.maEncryptionData ),
mnKey( rSrc.mnKey ),
mnHash( rSrc.mnHash )
{
if( IsValid() )
- maCodec.InitKey( &maPassword.front() );
+ maCodec.InitCodec( maEncryptionData );
}
XclImpBiff5Decrypter* XclImpBiff5Decrypter::OnClone() const
@@ -132,24 +143,59 @@ XclImpBiff5Decrypter* XclImpBiff5Decrypter::OnClone() const
return new XclImpBiff5Decrypter( *this );
}
-bool XclImpBiff5Decrypter::OnVerify( const OUString& rPassword )
+uno::Sequence< beans::NamedValue > XclImpBiff5Decrypter::OnVerifyPassword( const ::rtl::OUString& rPassword )
{
+ maEncryptionData.realloc( 0 );
+
/* Convert password to a byte string. TODO: this needs some finetuning
according to the spec... */
OString aBytePassword = OUStringToOString( rPassword, osl_getThreadTextEncoding() );
sal_Int32 nLen = aBytePassword.getLength();
if( (0 < nLen) && (nLen < 16) )
{
- // copy byte string to sal_uInt8 array
- maPassword.clear();
- maPassword.resize( 16, 0 );
- memcpy( &maPassword.front(), aBytePassword.getStr(), static_cast< size_t >( nLen ) );
+ // init codec
+ maCodec.InitKey( (sal_uInt8*)aBytePassword.getStr() );
+
+ if ( maCodec.VerifyKey( mnKey, mnHash ) )
+ {
+ maEncryptionData = maCodec.GetEncryptionData();
+
+ // since the export uses Std97 encryption always we have to request it here
+ ::std::vector< sal_uInt16 > aPassVect( 16 );
+ ::std::vector< sal_uInt16 >::iterator aIt = aPassVect.begin();
+ for( sal_Int32 nInd = 0; nInd < nLen; ++nInd, ++aIt )
+ *aIt = static_cast< sal_uInt16 >( rPassword.getStr()[nInd] );
+
+ uno::Sequence< sal_Int8 > aDocId = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 );
+ OSL_ENSURE( aDocId.getLength() == 16, "Unexpected length of the senquence!" );
+
+ ::msfilter::MSCodec_Std97 aCodec97;
+ aCodec97.InitKey( &aPassVect.front(), (sal_uInt8*)aDocId.getConstArray() );
+
+ // merge the EncryptionData, there should be no conflicts
+ ::comphelper::SequenceAsHashMap aEncryptionHash( maEncryptionData );
+ aEncryptionHash.update( ::comphelper::SequenceAsHashMap( aCodec97.GetEncryptionData() ) );
+ aEncryptionHash >> maEncryptionData;
+ }
+ }
+
+ return maEncryptionData;
+}
+bool XclImpBiff5Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData )
+{
+ maEncryptionData.realloc( 0 );
+
+ if( rEncryptionData.getLength() )
+ {
// init codec
- maCodec.InitKey( &maPassword.front() );
- return maCodec.VerifyKey( mnKey, mnHash );
+ maCodec.InitCodec( rEncryptionData );
+
+ if ( maCodec.VerifyKey( mnKey, mnHash ) )
+ maEncryptionData = rEncryptionData;
}
- return false;
+
+ return maEncryptionData.getLength();
}
void XclImpBiff5Decrypter::OnUpdate( sal_Size /*nOldStrmPos*/, sal_Size nNewStrmPos, sal_uInt16 nRecSize )
@@ -169,7 +215,6 @@ sal_uInt16 XclImpBiff5Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal
XclImpBiff8Decrypter::XclImpBiff8Decrypter( sal_uInt8 pnSalt[ 16 ],
sal_uInt8 pnVerifier[ 16 ], sal_uInt8 pnVerifierHash[ 16 ] ) :
- maPassword( 16, 0 ),
maSalt( pnSalt, pnSalt + 16 ),
maVerifier( pnVerifier, pnVerifier + 16 ),
maVerifierHash( pnVerifierHash, pnVerifierHash + 16 )
@@ -178,13 +223,13 @@ XclImpBiff8Decrypter::XclImpBiff8Decrypter( sal_uInt8 pnSalt[ 16 ],
XclImpBiff8Decrypter::XclImpBiff8Decrypter( const XclImpBiff8Decrypter& rSrc ) :
XclImpDecrypter( rSrc ),
- maPassword( rSrc.maPassword ),
+ maEncryptionData( rSrc.maEncryptionData ),
maSalt( rSrc.maSalt ),
maVerifier( rSrc.maVerifier ),
maVerifierHash( rSrc.maVerifierHash )
{
if( IsValid() )
- maCodec.InitKey( &maPassword.front(), &maSalt.front() );
+ maCodec.InitCodec( maEncryptionData );
}
XclImpBiff8Decrypter* XclImpBiff8Decrypter::OnClone() const
@@ -192,25 +237,44 @@ XclImpBiff8Decrypter* XclImpBiff8Decrypter::OnClone() const
return new XclImpBiff8Decrypter( *this );
}
-bool XclImpBiff8Decrypter::OnVerify( const OUString& rPassword )
+uno::Sequence< beans::NamedValue > XclImpBiff8Decrypter::OnVerifyPassword( const ::rtl::OUString& rPassword )
{
+ maEncryptionData.realloc( 0 );
+
sal_Int32 nLen = rPassword.getLength();
if( (0 < nLen) && (nLen < 16) )
{
// copy string to sal_uInt16 array
- maPassword.clear();
- maPassword.resize( 16, 0 );
+ ::std::vector< sal_uInt16 > aPassVect( 16 );
const sal_Unicode* pcChar = rPassword.getStr();
const sal_Unicode* pcCharEnd = pcChar + nLen;
- ::std::vector< sal_uInt16 >::iterator aIt = maPassword.begin();
+ ::std::vector< sal_uInt16 >::iterator aIt = aPassVect.begin();
for( ; pcChar < pcCharEnd; ++pcChar, ++aIt )
*aIt = static_cast< sal_uInt16 >( *pcChar );
// init codec
- maCodec.InitKey( &maPassword.front(), &maSalt.front() );
- return maCodec.VerifyKey( &maVerifier.front(), &maVerifierHash.front() );
+ maCodec.InitKey( &aPassVect.front(), &maSalt.front() );
+ if ( maCodec.VerifyKey( &maVerifier.front(), &maVerifierHash.front() ) )
+ maEncryptionData = maCodec.GetEncryptionData();
+ }
+
+ return maEncryptionData;
+}
+
+bool XclImpBiff8Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData )
+{
+ maEncryptionData.realloc( 0 );
+
+ if( rEncryptionData.getLength() )
+ {
+ // init codec
+ maCodec.InitCodec( rEncryptionData );
+
+ if ( maCodec.VerifyKey( &maVerifier.front(), &maVerifierHash.front() ) )
+ maEncryptionData = rEncryptionData;
}
- return false;
+
+ return maEncryptionData.getLength();
}
void XclImpBiff8Decrypter::OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 /*nRecSize*/ )
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index c3e6ae6b273a..290ce0eebdcf 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -157,6 +157,19 @@ ColorData XclImpPalette::GetColorData( sal_uInt16 nXclIndex ) const
return GetDefColorData( nXclIndex );
}
+::com::sun::star::uno::Sequence< sal_Int32 > XclImpPalette::CreateColorSequence() const
+{
+ sal_Int32 nCount = static_cast< sal_Int32 >( maColorTable.size() );
+ ::com::sun::star::uno::Sequence< sal_Int32 > aSeq( nCount );
+ if( nCount > 0 )
+ {
+ sal_Int32* pnSeqColor = aSeq.getArray();
+ for( ColorDataVec::const_iterator aIt = maColorTable.begin(), aEnd = maColorTable.end(); aIt != aEnd; ++aIt, ++pnSeqColor )
+ *pnSeqColor = static_cast< sal_Int32 >( *aIt );
+ }
+ return aSeq;
+}
+
void XclImpPalette::ReadPalette( XclImpStream& rStrm )
{
sal_uInt16 nCount;
@@ -674,7 +687,7 @@ void XclImpNumFmtBuffer::CreateScFormats()
}
}
-ULONG XclImpNumFmtBuffer::GetScFormat( sal_uInt16 nXclNumFmt ) const
+sal_uLong XclImpNumFmtBuffer::GetScFormat( sal_uInt16 nXclNumFmt ) const
{
XclImpIndexMap::const_iterator aIt = maIndexMap.find( nXclNumFmt );
return (aIt != maIndexMap.end()) ? aIt->second : NUMBERFORMAT_ENTRY_NOT_FOUND;
@@ -682,17 +695,17 @@ ULONG XclImpNumFmtBuffer::GetScFormat( sal_uInt16 nXclNumFmt ) const
void XclImpNumFmtBuffer::FillToItemSet( SfxItemSet& rItemSet, sal_uInt16 nXclNumFmt, bool bSkipPoolDefs ) const
{
- ULONG nScNumFmt = GetScFormat( nXclNumFmt );
+ sal_uLong nScNumFmt = GetScFormat( nXclNumFmt );
if( nScNumFmt == NUMBERFORMAT_ENTRY_NOT_FOUND )
nScNumFmt = GetStdScNumFmt();
FillScFmtToItemSet( rItemSet, nScNumFmt, bSkipPoolDefs );
}
-void XclImpNumFmtBuffer::FillScFmtToItemSet( SfxItemSet& rItemSet, ULONG nScNumFmt, bool bSkipPoolDefs ) const
+void XclImpNumFmtBuffer::FillScFmtToItemSet( SfxItemSet& rItemSet, sal_uLong nScNumFmt, bool bSkipPoolDefs ) const
{
DBG_ASSERT( nScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND, "XclImpNumFmtBuffer::FillScFmtToItemSet - invalid number format" );
ScfTools::PutItem( rItemSet, SfxUInt32Item( ATTR_VALUE_FORMAT, nScNumFmt ), bSkipPoolDefs );
- if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, FALSE ) == SFX_ITEM_SET )
+ if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, false ) == SFX_ITEM_SET )
ScGlobal::AddLanguage( rItemSet, GetFormatter() );
}
@@ -1632,7 +1645,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex )
{
XclImpXFRange* pPrevRange;
XclImpXFRange* pNextRange;
- ULONG nNextIndex;
+ sal_uLong nNextIndex;
Find( pPrevRange, pNextRange, nNextIndex, nScRow );
@@ -1647,7 +1660,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex )
SCROW nFirstScRow = pPrevRange->mnScRow1;
SCROW nLastScRow = pPrevRange->mnScRow2;
- ULONG nIndex = nNextIndex - 1;
+ sal_uLong nIndex = nNextIndex - 1;
XclImpXFRange* pThisRange = pPrevRange;
pPrevRange = (nIndex > 0 && nIndex <= maIndexList.size()) ? &(maIndexList[ nIndex - 1 ]) : 0;
@@ -1694,14 +1707,14 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex )
Insert( new XclImpXFRange( nScRow, rXFIndex ), nNextIndex );
}
-void XclImpXFRangeColumn::Insert(XclImpXFRange* pXFRange, ULONG nIndex)
+void XclImpXFRangeColumn::Insert(XclImpXFRange* pXFRange, sal_uLong nIndex)
{
maIndexList.insert( maIndexList.begin() + nIndex, pXFRange );
}
void XclImpXFRangeColumn::Find(
XclImpXFRange*& rpPrevRange, XclImpXFRange*& rpNextRange,
- ULONG& rnNextIndex, SCROW nScRow )
+ sal_uLong& rnNextIndex, SCROW nScRow )
{
// test whether list is empty
@@ -1737,8 +1750,8 @@ void XclImpXFRangeColumn::Find(
// loop: find range entries before and after new row
// break the loop if there is no more range between first and last -or-
// if rpPrevRange contains nScRow (rpNextRange will never contain nScRow)
- ULONG nPrevIndex = 0;
- ULONG nMidIndex;
+ sal_uLong nPrevIndex = 0;
+ sal_uLong nMidIndex;
rnNextIndex = maIndexList.size() - 1;
XclImpXFRange* pMidRange;
while( ((rnNextIndex - nPrevIndex) > 1) && (rpPrevRange->mnScRow2 < nScRow) )
@@ -1766,7 +1779,7 @@ void XclImpXFRangeColumn::Find(
}
}
-void XclImpXFRangeColumn::TryConcatPrev( ULONG nIndex )
+void XclImpXFRangeColumn::TryConcatPrev( sal_uLong nIndex )
{
if( !nIndex || nIndex >= maIndexList.size() )
return;
@@ -1865,7 +1878,7 @@ void XclImpXFRangeBuffer::SetColumnDefXF( SCCOL nScCol, sal_uInt16 nXFIndex )
maColumns[ nIndex ]->SetDefaultXF( XclImpXFIndex( nXFIndex ) );
}
-void XclImpXFRangeBuffer::SetBorderLine( const ScRange& rRange, SCTAB nScTab, USHORT nLine )
+void XclImpXFRangeBuffer::SetBorderLine( const ScRange& rRange, SCTAB nScTab, sal_uInt16 nLine )
{
SCCOL nFromScCol = (nLine == BOX_LINE_RIGHT) ? rRange.aEnd.Col() : rRange.aStart.Col();
SCROW nFromScRow = (nLine == BOX_LINE_BOTTOM) ? rRange.aEnd.Row() : rRange.aStart.Row();
diff --git a/sc/source/filter/excel/xiview.cxx b/sc/source/filter/excel/xiview.cxx
index 79bf333fcacd..1220b2afa0c6 100644
--- a/sc/source/filter/excel/xiview.cxx
+++ b/sc/source/filter/excel/xiview.cxx
@@ -227,8 +227,8 @@ void XclImpTabViewSettings::Finalize()
// sheet flags
if( maData.mbMirrored )
- // do not call this function with FALSE, it would mirror away all drawing objects
- rDoc.SetLayoutRTL( nScTab, TRUE );
+ // do not call this function with sal_False, it would mirror away all drawing objects
+ rDoc.SetLayoutRTL( nScTab, sal_True );
rTabSett.mbSelected = maData.mbSelected || bDisplayed;
// first visible cell in top-left pane and in additional pane(s)
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 8fcace686292..033468998ea5 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -331,6 +331,24 @@ XclChLabelRange::XclChLabelRange() :
// ----------------------------------------------------------------------------
+XclChDateRange::XclChDateRange() :
+ mnMinDate( 0 ),
+ mnMaxDate( 0 ),
+ mnMajorStep( 0 ),
+ mnMajorUnit( EXC_CHDATERANGE_DAYS ),
+ mnMinorStep( 0 ),
+ mnMinorUnit( EXC_CHDATERANGE_DAYS ),
+ mnBaseUnit( EXC_CHDATERANGE_DAYS ),
+ mnCross( 0 ),
+ mnFlags( EXC_CHDATERANGE_AUTOMIN | EXC_CHDATERANGE_AUTOMAX |
+ EXC_CHDATERANGE_AUTOMAJOR | EXC_CHDATERANGE_AUTOMINOR |
+ EXC_CHDATERANGE_AUTOBASE | EXC_CHDATERANGE_AUTOCROSS |
+ EXC_CHDATERANGE_AUTODATE )
+{
+}
+
+// ----------------------------------------------------------------------------
+
XclChValueRange::XclChValueRange() :
mfMin( 0.0 ),
mfMax( 0.0 ),
@@ -338,7 +356,8 @@ XclChValueRange::XclChValueRange() :
mfMinorStep( 0.0 ),
mfCross( 0.0 ),
mnFlags( EXC_CHVALUERANGE_AUTOMIN | EXC_CHVALUERANGE_AUTOMAX |
- EXC_CHVALUERANGE_AUTOMAJOR | EXC_CHVALUERANGE_AUTOMINOR | EXC_CHVALUERANGE_AUTOCROSS | EXC_CHVALUERANGE_BIT8 )
+ EXC_CHVALUERANGE_AUTOMAJOR | EXC_CHVALUERANGE_AUTOMINOR |
+ EXC_CHVALUERANGE_AUTOCROSS | EXC_CHVALUERANGE_BIT8 )
{
}
@@ -1057,17 +1076,17 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet,
{
if( rEscherFmt.mxItemSet )
{
- if( const XFillStyleItem* pStyleItem = static_cast< const XFillStyleItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLSTYLE, FALSE ) ) )
+ if( const XFillStyleItem* pStyleItem = static_cast< const XFillStyleItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLSTYLE, false ) ) )
{
switch( pStyleItem->GetValue() )
{
case XFILL_SOLID:
// #i84812# Excel 2007 writes Escher properties for solid fill
- if( const XFillColorItem* pColorItem = static_cast< const XFillColorItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLCOLOR, FALSE ) ) )
+ if( const XFillColorItem* pColorItem = static_cast< const XFillColorItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLCOLOR, false ) ) )
{
namespace cssd = ::com::sun::star::drawing;
// get solid transparence too
- const XFillTransparenceItem* pTranspItem = static_cast< const XFillTransparenceItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLTRANSPARENCE, FALSE ) );
+ const XFillTransparenceItem* pTranspItem = static_cast< const XFillTransparenceItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLTRANSPARENCE, false ) );
sal_uInt16 nTransp = pTranspItem ? pTranspItem->GetValue() : 0;
ScfPropSetHelper& rAreaHlp = GetAreaHelper( ePropMode );
rAreaHlp.InitializeWrite();
@@ -1076,7 +1095,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet,
}
break;
case XFILL_GRADIENT:
- if( const XFillGradientItem* pGradItem = static_cast< const XFillGradientItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLGRADIENT, FALSE ) ) )
+ if( const XFillGradientItem* pGradItem = static_cast< const XFillGradientItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLGRADIENT, false ) ) )
{
Any aGradientAny;
if( pGradItem->QueryValue( aGradientAny, MID_FILLGRADIENT ) )
@@ -1094,7 +1113,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet,
}
break;
case XFILL_BITMAP:
- if( const XFillBitmapItem* pBmpItem = static_cast< const XFillBitmapItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLBITMAP, FALSE ) ) )
+ if( const XFillBitmapItem* pBmpItem = static_cast< const XFillBitmapItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLBITMAP, false ) ) )
{
Any aBitmapAny;
if( pBmpItem->QueryValue( aBitmapAny, MID_GRAFURL ) )
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index c06d4ed07179..336de4ded284 100644..100755
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -394,7 +394,7 @@ static const XclFunctionInfo saFuncTable_Odf[] =
EXC_FUNCENTRY_ODF( ocVariationen2, 2, 2, 0, "PERMUTATIONA" ),
EXC_FUNCENTRY_ODF( ocPhi, 1, 1, 0, "PHI" ),
EXC_FUNCENTRY_ODF( ocZGZ, 3, 3, 0, "RRI" ),
- EXC_FUNCENTRY_ODF( ocTable, 1, 1, 0, "SHEET" ),
+ EXC_FUNCENTRY_ODF( ocTable, 0, 1, 0, "SHEET" ),
EXC_FUNCENTRY_ODF( ocTables, 0, 1, 0, "SHEETS" ),
EXC_FUNCENTRY_ODF( ocNoName, 1, MX, 0, "SKEWP" ),
EXC_FUNCENTRY_ODF( ocUnichar, 1, 1, 0, "UNICHAR" ),
@@ -601,7 +601,7 @@ void XclTokenArrayIterator::Init()
void XclTokenArrayIterator::Init( const ScTokenArray& rScTokArr, bool bSkipSpaces )
{
- USHORT nTokArrLen = rScTokArr.GetLen();
+ 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;
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 5d439a249bc1..418ae1d0f689 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -72,6 +72,8 @@ using ::com::sun::star::frame::XFrame;
using ::com::sun::star::frame::XFramesSupplier;
using ::com::sun::star::lang::XMultiServiceFactory;
+using namespace ::com::sun::star;
+
// Global data ================================================================
#ifdef DBG_UTIL
@@ -257,7 +259,7 @@ String XclRoot::RequestPassword( ::comphelper::IDocPasswordVerifier& rVerifier )
{
::std::vector< OUString > aDefaultPasswords;
aDefaultPasswords.push_back( mrData.maDefPassword );
- return ScfApiHelper::QueryPasswordForMedium( mrData.mrMedium, rVerifier, &aDefaultPasswords );
+ return ScfApiHelper::QueryEncryptionDataForMedium( mrData.mrMedium, rVerifier, &aDefaultPasswords );
}
bool XclRoot::HasVbaStorage() const
@@ -337,6 +339,12 @@ DateTime XclRoot::GetNullDate() const
return *GetFormatter().GetNullDate();
}
+sal_uInt16 XclRoot::GetBaseYear() const
+{
+ // return 1904 for 1904-01-01, and 1900 for 1899-12-30
+ return (GetNullDate().GetYear() == 1904) ? 1904 : 1900;
+}
+
double XclRoot::GetDoubleFromDateTime( const DateTime& rDateTime ) const
{
double fValue = rDateTime - GetNullDate();
@@ -363,8 +371,8 @@ ScEditEngineDefaulter& XclRoot::GetEditEngine() const
ScEditEngineDefaulter& rEE = *mrData.mxEditEngine;
rEE.SetRefMapMode( MAP_100TH_MM );
rEE.SetEditTextObjectPool( GetDoc().GetEditPool() );
- rEE.SetUpdateMode( FALSE );
- rEE.EnableUndo( FALSE );
+ rEE.SetUpdateMode( false );
+ rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS );
}
return *mrData.mxEditEngine;
@@ -374,11 +382,11 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const
{
if( !mrData.mxHFEditEngine.get() )
{
- mrData.mxHFEditEngine.reset( new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE ) );
+ mrData.mxHFEditEngine.reset( new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True ) );
ScHeaderEditEngine& rEE = *mrData.mxHFEditEngine;
rEE.SetRefMapMode( MAP_TWIP ); // headers/footers use twips as default metric
- rEE.SetUpdateMode( FALSE );
- rEE.EnableUndo( FALSE );
+ rEE.SetUpdateMode( false );
+ rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS );
// set Calc header/footer defaults
@@ -401,8 +409,8 @@ EditEngine& XclRoot::GetDrawEditEngine() const
mrData.mxDrawEditEng.reset( new EditEngine( &GetDoc().GetDrawLayer()->GetItemPool() ) );
EditEngine& rEE = *mrData.mxDrawEditEng;
rEE.SetRefMapMode( MAP_100TH_MM );
- rEE.SetUpdateMode( FALSE );
- rEE.EnableUndo( FALSE );
+ rEE.SetUpdateMode( false );
+ rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS );
}
return *mrData.mxDrawEditEng;
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 950d92f5a99c..0d0b63c0ebc7 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -217,7 +217,7 @@ sal_uInt8 XclTools::GetXclOrientFromRot( sal_uInt16 nXclRot )
return EXC_ORIENT_NONE;
}
-sal_uInt8 XclTools::GetXclErrorCode( USHORT nScError )
+sal_uInt8 XclTools::GetXclErrorCode( sal_uInt16 nScError )
{
using namespace ScErrorCodes;
switch( nScError )
@@ -242,7 +242,7 @@ sal_uInt8 XclTools::GetXclErrorCode( USHORT nScError )
return EXC_ERR_NA;
}
-USHORT XclTools::GetScErrorCode( sal_uInt8 nXclError )
+sal_uInt16 XclTools::GetScErrorCode( sal_uInt8 nXclError )
{
using namespace ScErrorCodes;
switch( nXclError )
@@ -330,13 +330,13 @@ sal_Int32 XclTools::GetHmmFromTwips( sal_Int32 nTwips )
return GetHmmFromInch( GetInchFromTwips( nTwips ) );
}
-USHORT XclTools::GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth )
+sal_uInt16 XclTools::GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth )
{
double fScWidth = static_cast< double >( nXclWidth ) / 256.0 * nScCharWidth + 0.5;
- return limit_cast< USHORT >( fScWidth );
+ return limit_cast< sal_uInt16 >( fScWidth );
}
-sal_uInt16 XclTools::GetXclColumnWidth( USHORT nScWidth, long nScCharWidth )
+sal_uInt16 XclTools::GetXclColumnWidth( sal_uInt16 nScWidth, long nScCharWidth )
{
double fXclWidth = static_cast< double >( nScWidth ) * 256.0 / nScCharWidth + 0.5;
return limit_cast< sal_uInt16 >( fXclWidth );
@@ -697,9 +697,9 @@ const OUString XclTools::maSbMacroSuffix( RTL_CONSTASCII_USTRINGPARAM( "?languag
OUString XclTools::GetSbMacroUrl( const String& rMacroName, SfxObjectShell* pDocShell )
{
OSL_ENSURE( rMacroName.Len() > 0, "XclTools::GetSbMacroUrl - macro name is empty" );
- ::ooo::vba::VBAMacroResolvedInfo aMacroInfo = ::ooo::vba::resolveVBAMacro( pDocShell, rMacroName, false );
- if( aMacroInfo.IsResolved() )
- return ::ooo::vba::makeMacroURL( aMacroInfo.ResolvedMacro() );
+ ::ooo::vba::MacroResolvedInfo aMacroInfo = ::ooo::vba::resolveVBAMacro( pDocShell, rMacroName, false );
+ if( aMacroInfo.mbFound )
+ return ::ooo::vba::makeMacroURL( aMacroInfo.msResolvedMacro );
return OUString();
}
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index ac41cc47b224..3e96a92d6485 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -39,6 +39,8 @@
#include <tools/urlobj.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <sfx2/sfxsids.hrc>
#include <svl/stritem.hxx>
#include <svl/itemset.hxx>
@@ -60,6 +62,8 @@ using ::com::sun::star::lang::XServiceName;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER;
+using namespace ::com::sun::star;
+
// Static helper functions ====================================================
OUString ScfApiHelper::GetServiceName( Reference< XInterface > xInt )
@@ -131,25 +135,33 @@ Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs(
return CreateInstanceWithArgs( ::comphelper::getProcessServiceFactory(), rServiceName, rArgs );
}
-String ScfApiHelper::QueryPasswordForMedium( SfxMedium& rMedium,
+uno::Sequence< beans::NamedValue > ScfApiHelper::QueryEncryptionDataForMedium( SfxMedium& rMedium,
::comphelper::IDocPasswordVerifier& rVerifier, const ::std::vector< OUString >* pDefaultPasswords )
{
- OUString aMediaPassword;
- SfxItemSet* pItemSet = rMedium.GetItemSet();
- const SfxPoolItem *pPasswordItem;
- if( pItemSet && (SFX_ITEM_SET == pItemSet->GetItemState( SID_PASSWORD, TRUE, &pPasswordItem )) )
- aMediaPassword = static_cast< const SfxStringItem* >( pPasswordItem )->GetValue();
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false);
+ if ( pEncryptionDataItem )
+ pEncryptionDataItem->GetValue() >>= aEncryptionData;
+
+ ::rtl::OUString aPassword;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false);
+ if ( pPasswordItem )
+ aPassword = pPasswordItem->GetValue();
+
OUString aDocName = INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET );
bool bIsDefaultPassword = false;
- OUString aPassword = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword(
- rVerifier, aMediaPassword, rMedium.GetInteractionHandler(), aDocName,
+ aEncryptionData = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword(
+ rVerifier, aEncryptionData, aPassword, rMedium.GetInteractionHandler(), aDocName,
::comphelper::DocPasswordRequestType_MS, pDefaultPasswords, &bIsDefaultPassword );
- if( !bIsDefaultPassword && (aPassword.getLength() > 0) && pItemSet )
- pItemSet->Put( SfxStringItem( SID_PASSWORD, aPassword ) );
+ rMedium.GetItemSet()->ClearItem( SID_PASSWORD );
+ rMedium.GetItemSet()->ClearItem( SID_ENCRYPTIONDATA );
+
+ if( !bIsDefaultPassword && (aEncryptionData.getLength() > 0) )
+ rMedium.GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
- return aPassword;
+ return aEncryptionData;
}
// Property sets ==============================================================
diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx
index 418ea656ebda..20e227f69f46 100644
--- a/sc/source/filter/ftools/fprogressbar.cxx
+++ b/sc/source/filter/ftools/fprogressbar.cxx
@@ -53,7 +53,7 @@ ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, const String& rText )
Init( pDocShell );
}
-ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, USHORT nResId ) :
+ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, sal_uInt16 nResId ) :
maText( ScGlobal::GetRscString( nResId ) )
{
Init( pDocShell );
@@ -101,7 +101,7 @@ void ScfProgressBar::SetCurrSegment( ScfProgressSegment* pSegment )
{
// System progress has an internal limit of ULONG_MAX/100.
mnSysProgressScale = 1;
- ULONG nSysTotalSize = static_cast< ULONG >( mnTotalSize );
+ sal_uLong nSysTotalSize = static_cast< sal_uLong >( mnTotalSize );
while( nSysTotalSize >= ULONG_MAX / 100 )
{
nSysTotalSize /= 2;
@@ -137,7 +137,7 @@ void ScfProgressBar::IncreaseProgressBar( sal_Size nDelta )
if( nNewPos >= mnNextUnitPos )
{
mnNextUnitPos = nNewPos + mnUnitSize;
- mxSysProgress->SetState( static_cast< ULONG >( nNewPos / mnSysProgressScale ) );
+ mxSysProgress->SetState( static_cast< sal_uLong >( nNewPos / mnSysProgressScale ) );
}
}
else
@@ -213,7 +213,7 @@ ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDoc
Init( nSize );
}
-ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, USHORT nResId ) :
+ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId ) :
maProgress( pDocShell, nResId )
{
Init( nSize );
@@ -226,7 +226,7 @@ void ScfSimpleProgressBar::Init( sal_Size nSize )
maProgress.ActivateSegment( nSegment );
}
-ScfStreamProgressBar::ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, USHORT nResId ) :
+ScfStreamProgressBar::ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, sal_uInt16 nResId ) :
mrStrm( rStrm )
{
Init( pDocShell, ScGlobal::GetRscString( nResId ) );
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index ce6264b50828..dd708ff35ea2 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -207,15 +207,15 @@ SotStorageStreamRef ScfTools::OpenStorageStreamWrite( SotStorageRef xStrg, const
// *** item handling *** ------------------------------------------------------
-bool ScfTools::CheckItem( const SfxItemSet& rItemSet, USHORT nWhichId, bool bDeep )
+bool ScfTools::CheckItem( const SfxItemSet& rItemSet, sal_uInt16 nWhichId, bool bDeep )
{
return rItemSet.GetItemState( nWhichId, bDeep ) == SFX_ITEM_SET;
}
-bool ScfTools::CheckItems( const SfxItemSet& rItemSet, const USHORT* pnWhichIds, bool bDeep )
+bool ScfTools::CheckItems( const SfxItemSet& rItemSet, const sal_uInt16* pnWhichIds, bool bDeep )
{
DBG_ASSERT( pnWhichIds, "ScfTools::CheckItems - no which id list" );
- for( const USHORT* pnWhichId = pnWhichIds; *pnWhichId != 0; ++pnWhichId )
+ for( const sal_uInt16* pnWhichId = pnWhichIds; *pnWhichId != 0; ++pnWhichId )
if( CheckItem( rItemSet, *pnWhichId, bDeep ) )
return true;
return false;
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 63c94ca764d0..05338c3849b1 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -110,20 +110,20 @@ const static sal_Char sMyEndComment[] = " -->";
const static sal_Char sFontFamily[] = "font-family:";
const static sal_Char sFontSize[] = "font-size:";
-const USHORT ScHTMLExport::nDefaultFontSize[SC_HTML_FONTSIZES] =
+const sal_uInt16 ScHTMLExport::nDefaultFontSize[SC_HTML_FONTSIZES] =
{
HTMLFONTSZ1_DFLT, HTMLFONTSZ2_DFLT, HTMLFONTSZ3_DFLT, HTMLFONTSZ4_DFLT,
HTMLFONTSZ5_DFLT, HTMLFONTSZ6_DFLT, HTMLFONTSZ7_DFLT
};
-USHORT ScHTMLExport::nFontSize[SC_HTML_FONTSIZES] = { 0 };
+sal_uInt16 ScHTMLExport::nFontSize[SC_HTML_FONTSIZES] = { 0 };
const char* ScHTMLExport::pFontSizeCss[SC_HTML_FONTSIZES] =
{
"xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"
};
-const USHORT ScHTMLExport::nCellSpacing = 0;
+const sal_uInt16 ScHTMLExport::nCellSpacing = 0;
const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] =
"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
@@ -133,7 +133,7 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] =
#define OUT_PROLOGUE() (rStrm << sHTML30_Prologue << ScExportBase::sNewLine \
<< ScExportBase::sNewLine)
#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag )
-#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, FALSE )
+#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, false )
#define OUT_STR( str ) HTMLOutFuncs::Out_String( rStrm, str, eDestEnc, &aNonConvertibleChars )
#define OUT_STR_NO_CONV( str ) HTMLOutFuncs::Out_String( rStrm, str, eDestEnc )
#define OUT_LF() rStrm << ScExportBase::sNewLine << GetIndentStr()
@@ -157,7 +157,7 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] =
//========================================================================
FltError ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const String& rBaseURL, ScDocument* pDoc,
- const ScRange& rRange, const CharSet /*eNach*/, BOOL bAll,
+ const ScRange& rRange, const CharSet /*eNach*/, sal_Bool bAll,
const String& rStreamPath, String& rNonConvertibleChars )
{
ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath );
@@ -218,7 +218,7 @@ void lcl_AppendHTMLColorTripel( ByteString& rStr, const Color& rColor )
ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument* pDocP,
const ScRange& rRangeP,
- BOOL bAllP, const String& rStreamPathP ) :
+ sal_Bool bAllP, const String& rStreamPathP ) :
ScExportBase( rStrmP, pDocP, rRangeP ),
aBaseURL( rBaseURL ),
aStreamPath( rStreamPathP ),
@@ -228,10 +228,10 @@ ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument
nUsedTables( 0 ),
nIndent( 0 ),
bAll( bAllP ),
- bTabHasGraphics( FALSE ),
+ bTabHasGraphics( false ),
bCalcAsShown( pDocP->GetDocOptions().IsCalcAsShown() ),
- bTableDataWidth( TRUE ),
- bTableDataHeight( TRUE )
+ bTableDataWidth( sal_True ),
+ bTableDataHeight( sal_True )
{
strcpy( sIndent, sIndentSource );
sIndent[0] = 0;
@@ -240,9 +240,9 @@ ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
eDestEnc = (pDoc->IsClipOrUndo() ? RTL_TEXTENCODING_UTF8 : pHtmlOptions->GetTextEncoding());
bCopyLocalFileToINet = pHtmlOptions->IsSaveGraphicsLocal();
- for ( USHORT j=0; j < SC_HTML_FONTSIZES; j++ )
+ for ( sal_uInt16 j=0; j < SC_HTML_FONTSIZES; j++ )
{
- USHORT nSize = pHtmlOptions->GetFontSize( j );
+ sal_uInt16 nSize = pHtmlOptions->GetFontSize( j );
// remember in Twips, like our SvxFontHeightItem
if ( nSize )
nFontSize[j] = nSize * 20;
@@ -279,10 +279,10 @@ ScHTMLExport::~ScHTMLExport()
}
-USHORT ScHTMLExport::GetFontSizeNumber( USHORT nHeight )
+sal_uInt16 ScHTMLExport::GetFontSizeNumber( sal_uInt16 nHeight )
{
- USHORT nSize = 1;
- for ( USHORT j=SC_HTML_FONTSIZES-1; j>0; j-- )
+ sal_uInt16 nSize = 1;
+ for ( sal_uInt16 j=SC_HTML_FONTSIZES-1; j>0; j-- )
{
if( nHeight > (nFontSize[j] + nFontSize[j-1]) / 2 )
{ // der naechstgelegene
@@ -293,18 +293,18 @@ USHORT ScHTMLExport::GetFontSizeNumber( USHORT nHeight )
return nSize;
}
-const char* ScHTMLExport::GetFontSizeCss( USHORT nHeight )
+const char* ScHTMLExport::GetFontSizeCss( sal_uInt16 nHeight )
{
- USHORT nSize = GetFontSizeNumber( nHeight );
+ sal_uInt16 nSize = GetFontSizeNumber( nHeight );
return pFontSizeCss[ nSize-1 ];
}
-USHORT ScHTMLExport::ToPixel( USHORT nVal )
+sal_uInt16 ScHTMLExport::ToPixel( sal_uInt16 nVal )
{
if( nVal )
{
- nVal = (USHORT)pAppWin->LogicToPixel(
+ nVal = (sal_uInt16)pAppWin->LogicToPixel(
Size( nVal, nVal ), MapMode( MAP_TWIP ) ).Width();
if( !nVal ) // wo ein Twip ist sollte auch ein Pixel sein
nVal = 1;
@@ -326,7 +326,7 @@ Size ScHTMLExport::MMToPixel( const Size& rSize )
}
-ULONG ScHTMLExport::Write()
+sal_uLong ScHTMLExport::Write()
{
rStrm << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype32 << '>'
<< sNewLine << sNewLine;
@@ -403,7 +403,7 @@ void ScHTMLExport::WriteHeader()
}
}
rStrm << "; " << sFontSize
- << GetFontSizeCss( ( USHORT ) aHTMLStyle.nFontHeight ) << " }";
+ << GetFontSizeCss( ( sal_uInt16 ) aHTMLStyle.nFontHeight ) << " }";
OUT_LF();
rStrm << sMyEndComment;
IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style );
@@ -473,7 +473,7 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
ScGlobal::GetScriptedWhichID(
aHTMLStyle.nDefaultScriptType, ATTR_FONT_HEIGHT
)))).GetHeight();
- aHTMLStyle.nFontSizeNumber = GetFontSizeNumber( static_cast< USHORT >( aHTMLStyle.nFontHeight ) );
+ aHTMLStyle.nFontSizeNumber = GetFontSizeNumber( static_cast< sal_uInt16 >( aHTMLStyle.nFontHeight ) );
}
// Page style sheet printer settings, e.g. for background graphics.
@@ -488,7 +488,7 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
{
const SvxBrushItem* pBrushItem = (const SvxBrushItem*)&rSet.Get( ATTR_BACKGROUND );
aHTMLStyle.aBackgroundColor = pBrushItem->GetColor();
- aHTMLStyle.bInitialized = TRUE;
+ aHTMLStyle.bInitialized = sal_True;
}
return rSet;
}
@@ -549,7 +549,7 @@ void ScHTMLExport::WriteBody()
{
// Grafik als (JPG-)File speichern
aGrfNm = aStreamPath;
- USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm,
CREATE_STRING( "JPG" ), XOUTBMP_USE_NATIVE_IF_POSSIBLE );
if( !nErr ) // fehlerhaft, da ist nichts auszugeben
{
@@ -688,7 +688,7 @@ void ScHTMLExport::WriteTables()
// FRAME=VOID, we do the styling of the cells in <TD>
(((aByteStrOut += ' ') += OOO_STRING_SVTOOLS_HTML_frame) += '=') += OOO_STRING_SVTOOLS_HTML_TF_void;
- bTabHasGraphics = bTabAlignedLeft = FALSE;
+ bTabHasGraphics = bTabAlignedLeft = false;
if ( bAll && pDrawLayer )
PrepareGraphics( pDrawLayer, nTab, nStartCol, nStartRow,
nEndCol, nEndRow );
@@ -740,7 +740,7 @@ void ScHTMLExport::WriteTables()
IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_tbody );
// At least old (3.x, 4.x?) Netscape doesn't follow <TABLE COLS=n> and
// <COL WIDTH=x> specified, but needs a width at every column.
- bTableDataWidth = TRUE; // widths in first row
+ bTableDataWidth = sal_True; // widths in first row
bool bHasHiddenRows = pDoc->HasHiddenRows(nStartRow, nEndRow, nTab);
for ( SCROW nRow=nStartRow; nRow<=nEndRow; nRow++ )
{
@@ -752,7 +752,7 @@ void ScHTMLExport::WriteTables()
}
IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_tablerow );
- bTableDataHeight = TRUE; // height at every first cell of each row
+ bTableDataHeight = sal_True; // height at every first cell of each row
for ( SCCOL nCol2=nStartCol; nCol2<=nEndCol; nCol2++ )
{
if ( pDoc->ColHidden(nCol2, nTab) )
@@ -761,9 +761,9 @@ void ScHTMLExport::WriteTables()
if ( nCol2 == nEndCol )
IncIndent(-1);
WriteCell( nCol2, nRow, nTab );
- bTableDataHeight = FALSE;
+ bTableDataHeight = false;
}
- bTableDataWidth = FALSE; // widths only in first row
+ bTableDataWidth = false; // widths only in first row
if ( nRow == nEndRow )
IncIndent(-1);
@@ -826,9 +826,9 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
}
ScBaseCell* pCell = pDoc->GetCell( aPos );
- ULONG nFormat = pAttr->GetNumberFormat( pFormatter );
- BOOL bValueData;
- BYTE nScriptType;
+ sal_uLong nFormat = pAttr->GetNumberFormat( pFormatter );
+ sal_Bool bValueData;
+ sal_uInt8 nScriptType;
if ( pCell )
{
bValueData = pCell->HasValueData();
@@ -836,7 +836,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
}
else
{
- bValueData = FALSE;
+ bValueData = false;
nScriptType = 0;
}
if ( nScriptType == 0 )
@@ -861,15 +861,15 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
}
const sal_Char* pChar;
- USHORT nWidthPixel;
- USHORT nHeightPixel;
+ sal_uInt16 nWidthPixel;
+ sal_uInt16 nHeightPixel;
const ScMergeAttr& rMergeAttr = (const ScMergeAttr&) pAttr->GetItem( ATTR_MERGE, pCondItemSet );
if ( pGraphEntry || rMergeAttr.IsMerged() )
{
SCCOL nC, jC;
SCROW nR;
- ULONG v;
+ sal_uLong v;
if ( pGraphEntry )
nC = Max( SCCOL(pGraphEntry->aRange.aEnd.Col() - nCol + 1),
SCCOL(rMergeAttr.GetColMerge()) );
@@ -881,7 +881,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
nC = nC + nCol;
for ( jC=nCol, v=0; jC<nC; jC++ )
v += pDoc->GetColWidth( jC, nTab );
- nWidthPixel = ToPixel( static_cast< USHORT >( v ) );
+ nWidthPixel = ToPixel( static_cast< sal_uInt16 >( v ) );
}
else
nWidthPixel = ToPixel( pDoc->GetColWidth( nCol, nTab ) );
@@ -896,7 +896,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
(((aStrTD += ' ') += OOO_STRING_SVTOOLS_HTML_O_rowspan) += '=') += ByteString::CreateFromInt32( nR );
nR += nRow;
v = pDoc->GetRowHeight( nRow, nR-1, nTab );
- nHeightPixel = ToPixel( static_cast< USHORT >( v ) );
+ nHeightPixel = ToPixel( static_cast< sal_uInt16 >( v ) );
}
else
nHeightPixel = ToPixel( pDoc->GetRowHeight( nRow, nTab ) );
@@ -949,21 +949,21 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
else
aBgColor = rBrushItem.GetColor();
- BOOL bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() );
- BOOL bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
- BOOL bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() );
- BOOL bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now
- BOOL bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
- USHORT nSetFontSizeNumber = 0;
- UINT32 nFontHeight = rFontHeightItem.GetHeight();
+ sal_Bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() );
+ sal_Bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
+ sal_Bool bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() );
+ sal_Bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now
+ sal_Bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
+ sal_uInt16 nSetFontSizeNumber = 0;
+ sal_uInt32 nFontHeight = rFontHeightItem.GetHeight();
if ( nFontHeight != aHTMLStyle.nFontHeight )
{
- nSetFontSizeNumber = GetFontSizeNumber( (USHORT) nFontHeight );
+ nSetFontSizeNumber = GetFontSizeNumber( (sal_uInt16) nFontHeight );
if ( nSetFontSizeNumber == aHTMLStyle.nFontSizeNumber )
nSetFontSizeNumber = 0; // no difference, don't set
}
- BOOL bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber);
+ sal_Bool bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber);
//! TODO: we could entirely use CSS1 here instead, but that would exclude
//! Netscape 3.0 and Netscape 4.x without JavaScript enabled.
@@ -1084,7 +1084,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
}
String aStrOut;
- BOOL bFieldText = FALSE;
+ sal_Bool bFieldText = false;
if ( pCell )
{ // cell content
Color* pColor;
@@ -1143,51 +1143,51 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
}
-BOOL ScHTMLExport::WriteFieldText( const ScEditCell* pCell )
+sal_Bool ScHTMLExport::WriteFieldText( const ScEditCell* pCell )
{
- BOOL bFields = FALSE;
+ sal_Bool bFields = false;
const EditTextObject* pData;
pCell->GetData( pData );
// text and anchor of URL fields, Doc-Engine is a ScFieldEditEngine
EditEngine& rEngine = pDoc->GetEditEngine();
rEngine.SetText( *pData );
- USHORT nParas = rEngine.GetParagraphCount();
+ sal_uInt16 nParas = rEngine.GetParagraphCount();
if ( nParas )
{
ESelection aSel( 0, 0, nParas-1, rEngine.GetTextLen( nParas-1 ) );
SfxItemSet aSet( rEngine.GetAttribs( aSel ) );
- SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
- bFields = TRUE;
+ bFields = sal_True;
}
if ( bFields )
{
- BOOL bOldUpdateMode = rEngine.GetUpdateMode();
- rEngine.SetUpdateMode( TRUE ); // no portions if not formatted
- for ( USHORT nPar=0; nPar < nParas; nPar++ )
+ sal_Bool bOldUpdateMode = rEngine.GetUpdateMode();
+ rEngine.SetUpdateMode( sal_True ); // no portions if not formatted
+ for ( sal_uInt16 nPar=0; nPar < nParas; nPar++ )
{
if ( nPar > 0 )
TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak );
SvUShorts aPortions;
rEngine.GetPortions( nPar, aPortions );
- USHORT nCnt = aPortions.Count();
- USHORT nStart = 0;
- for ( USHORT nPos = 0; nPos < nCnt; nPos++ )
+ sal_uInt16 nCnt = aPortions.Count();
+ sal_uInt16 nStart = 0;
+ for ( sal_uInt16 nPos = 0; nPos < nCnt; nPos++ )
{
- USHORT nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
ESelection aSel( nPar, nStart, nPar, nEnd );
- BOOL bUrl = FALSE;
+ sal_Bool bUrl = false;
// fields are single characters
if ( nEnd == nStart+1 )
{
const SfxPoolItem* pItem;
SfxItemSet aSet = rEngine.GetAttribs( aSel );
- if ( aSet.GetItemState( EE_FEATURE_FIELD, FALSE, &pItem ) == SFX_ITEM_ON )
+ if ( aSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_ON )
{
const SvxFieldData* pField = ((const SvxFieldItem*)pItem)->GetField();
if ( pField && pField->ISA(SvxURLField) )
{
- bUrl = TRUE;
+ bUrl = sal_True;
const SvxURLField* pURLField = (const SvxURLField*)pField;
// String aFieldText = rEngine.GetText( aSel );
rStrm << '<' << OOO_STRING_SVTOOLS_HTML_anchor << ' ' << OOO_STRING_SVTOOLS_HTML_O_href << "=\"";
@@ -1209,10 +1209,10 @@ BOOL ScHTMLExport::WriteFieldText( const ScEditCell* pCell )
}
-BOOL ScHTMLExport::CopyLocalFileToINet( String& rFileNm,
- const String& rTargetNm, BOOL bFileToFile )
+sal_Bool ScHTMLExport::CopyLocalFileToINet( String& rFileNm,
+ const String& rTargetNm, sal_Bool bFileToFile )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
INetURLObject aFileUrl, aTargetUrl;
aFileUrl.SetSmartURL( rFileNm );
aTargetUrl.SetSmartURL( rTargetNm );
@@ -1225,11 +1225,11 @@ BOOL ScHTMLExport::CopyLocalFileToINet( String& rFileNm,
if( pSrcArr )
{
// wurde die Datei schon verschoben
- USHORT nPos;
+ sal_uInt16 nPos;
if( pSrcArr->Seek_Entry( &rFileNm, &nPos ))
{
rFileNm = *(*pDestArr)[ nPos ];
- return TRUE;
+ return sal_True;
}
}
else
@@ -1256,7 +1256,7 @@ BOOL ScHTMLExport::CopyLocalFileToINet( String& rFileNm,
else
{
SfxMedium aMedium( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE,
- FALSE );
+ false );
{
SvFileStream aCpy( aMedium.GetPhysicalName(), STREAM_WRITE );
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index ae072892e7d4..0100c1d9d258 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -65,7 +65,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab,
SdrPage* pDrawPage = pDrawLayer->GetPage( static_cast<sal_uInt16>(nTab) );
if ( pDrawPage )
{
- bTabHasGraphics = TRUE;
+ bTabHasGraphics = true;
FillGraphList( pDrawPage, nTab, nStartCol, nStartRow, nEndCol, nEndRow );
size_t ListSize = aGraphList.size();
for ( size_t i = 0; i < ListSize; ++i )
@@ -73,7 +73,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab,
ScHTMLGraphEntry* pE = &aGraphList[ i ];
if ( !pE->bInCell )
{ // nicht alle in Zellen: einige neben Tabelle
- bTabAlignedLeft = TRUE;
+ bTabAlignedLeft = sal_True;
break;
}
}
@@ -85,7 +85,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab,
void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
{
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if ( nObjCount )
{
Rectangle aRect;
@@ -110,7 +110,7 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab,
SCCOL nCol2 = aR.aEnd.Col();
SCROW nRow2 = aR.aEnd.Row();
// All cells empty under object?
- BOOL bInCell = (pDoc->GetEmptyLinesInBlock(
+ sal_Bool bInCell = (pDoc->GetEmptyLinesInBlock(
nCol1, nRow1, nTab, nCol2, nRow2, nTab, DIR_TOP )
== static_cast< SCSIZE >( nRow2 - nRow1 )); // rows-1 !
if ( bInCell )
@@ -156,11 +156,11 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE )
{
const SdrGrafObj* pSGO = (SdrGrafObj*)pObject;
const SdrGrafObjGeoData* pGeo = (SdrGrafObjGeoData*)pSGO->GetGeoData();
- USHORT nMirrorCase = (pGeo->aGeo.nDrehWink == 18000 ?
+ sal_uInt16 nMirrorCase = (pGeo->aGeo.nDrehWink == 18000 ?
( pGeo->bMirrored ? 3 : 4 ) : ( pGeo->bMirrored ? 2 : 1 ));
- BOOL bHMirr = ( ( nMirrorCase == 2 ) || ( nMirrorCase == 4 ) );
- BOOL bVMirr = ( ( nMirrorCase == 3 ) || ( nMirrorCase == 4 ) );
- ULONG nXOutFlags = 0;
+ sal_Bool bHMirr = ( ( nMirrorCase == 2 ) || ( nMirrorCase == 4 ) );
+ sal_Bool bVMirr = ( ( nMirrorCase == 3 ) || ( nMirrorCase == 4 ) );
+ sal_uLong nXOutFlags = 0;
if ( bHMirr )
nXOutFlags |= XOUTBMP_MIRROR_HORZ;
if ( bVMirr )
@@ -169,7 +169,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE )
if ( pSGO->IsLinkedGraphic() )
aLinkName = pSGO->GetFileName();
WriteImage( aLinkName, pSGO->GetGraphic(), aOpt, nXOutFlags );
- pE->bWritten = TRUE;
+ pE->bWritten = sal_True;
}
break;
case OBJ_OLE2:
@@ -179,7 +179,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE )
{
String aLinkName;
WriteImage( aLinkName, *pGraphic, aOpt );
- pE->bWritten = TRUE;
+ pE->bWritten = sal_True;
}
}
break;
@@ -189,14 +189,14 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE )
pDoc->GetDrawLayer(), pObject ) );
String aLinkName;
WriteImage( aLinkName, aGraph, aOpt );
- pE->bWritten = TRUE;
+ pE->bWritten = sal_True;
}
}
}
void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf,
- const ByteString& rImgOptions, ULONG nXOutFlags )
+ const ByteString& rImgOptions, sal_uLong nXOutFlags )
{
// embeddete Grafik -> via WriteGraphic schreiben
if( !rLinkName.Len() )
@@ -206,7 +206,7 @@ void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf,
// Grafik als (JPG-)File speichern
String aGrfNm( aStreamPath );
nXOutFlags |= XOUTBMP_USE_NATIVE_IF_POSSIBLE;
- USHORT nErr = XOutBitmap::WriteGraphic( rGrf, aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( rGrf, aGrfNm,
CREATE_STRING( "JPG" ), nXOutFlags );
if( !nErr ) // sonst fehlerhaft, da ist nichts auszugeben
{
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index 17d0592f5784..5bae367a3f65 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -61,23 +61,23 @@
//------------------------------------------------------------------------
FltError ScFormatFilterPluginImpl::ScImportHTML( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc,
- ScRange& rRange, double nOutputFactor, BOOL bCalcWidthHeight, SvNumberFormatter* pFormatter,
+ ScRange& rRange, double nOutputFactor, sal_Bool bCalcWidthHeight, SvNumberFormatter* pFormatter,
bool bConvertDate )
{
ScHTMLImport aImp( pDoc, rBaseURL, rRange, bCalcWidthHeight );
FltError nErr = (FltError) aImp.Read( rStream, rBaseURL );
ScRange aR = aImp.GetRange();
rRange.aEnd = aR.aEnd;
- aImp.WriteToDocument( TRUE, nOutputFactor, pFormatter, bConvertDate );
+ aImp.WriteToDocument( sal_True, nOutputFactor, pFormatter, bConvertDate );
return nErr;
}
-ScEEAbsImport *ScFormatFilterPluginImpl::CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight )
+ScEEAbsImport *ScFormatFilterPluginImpl::CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight )
{
return new ScHTMLImport( pDocP, rBaseURL, rRange, bCalcWidthHeight );
}
-ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight ) :
+ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight ) :
ScEEImport( pDocP, rRange )
{
Size aPageSize;
@@ -137,7 +137,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const String& rName, const
}
void ScHTMLImport::WriteToDocument(
- BOOL bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate )
+ sal_Bool bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate )
{
ScEEImport::WriteToDocument( bSizeColsRows, nOutputFactor, pFormatter, bConvertDate );
@@ -235,7 +235,7 @@ String ScHTMLImport::GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrig
String aToken( rOrigName.GetToken( 0, ';', nStringIx ) );
if( pRangeNames && ScfTools::IsHTMLTablesName( aToken ) )
{ // build list with all HTML tables
- ULONG nIndex = 1;
+ sal_uLong nIndex = 1;
bool bLoop = true;
while( bLoop )
{
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index bdb142a2ba9f..c1f6cacd7eb6 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -71,7 +71,7 @@
using namespace ::com::sun::star;
-SV_IMPL_VARARR_SORT( ScHTMLColOffset, ULONG );
+SV_IMPL_VARARR_SORT( ScHTMLColOffset, sal_uLong );
// ============================================================================
@@ -113,10 +113,10 @@ ScHTMLLayoutParser::ScHTMLLayoutParser( EditEngine* pEditP, const String& rBaseU
nColOffsetStart(0),
nMetaCnt(0),
nOffsetTolerance( SC_HTML_OFFSET_TOLERANCE_SMALL ),
- bTabInTabCell( FALSE ),
- bFirstRow( TRUE ),
- bInCell( FALSE ),
- bInTitle( FALSE )
+ bTabInTabCell( false ),
+ bFirstRow( sal_True ),
+ bInCell( false ),
+ bInTitle( false )
{
MakeColNoRef( pLocalColOffset, 0, 0, 0, 0 );
MakeColNoRef( pColOffset, 0, 0, 0, 0 );
@@ -156,13 +156,13 @@ ScHTMLLayoutParser::~ScHTMLLayoutParser()
}
-ULONG ScHTMLLayoutParser::Read( SvStream& rStream, const String& rBaseURL )
+sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, const String& rBaseURL )
{
Link aOldLink = pEdit->GetImportHdl();
pEdit->SetImportHdl( LINK( this, ScHTMLLayoutParser, HTMLImportHdl ) );
SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
- BOOL bLoading = pObjSh && pObjSh->IsLoading();
+ sal_Bool bLoading = pObjSh && pObjSh->IsLoading();
SvKeyValueIteratorRef xValues;
SvKeyValueIterator* pAttributes = NULL;
@@ -185,17 +185,17 @@ ULONG ScHTMLLayoutParser::Read( SvStream& rStream, const String& rBaseURL )
}
}
- ULONG nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_HTML, pAttributes );
+ sal_uLong nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_HTML, pAttributes );
pEdit->SetImportHdl( aOldLink );
// Spaltenbreiten erzeugen
Adjust();
OutputDevice* pDefaultDev = Application::GetDefaultDevice();
- USHORT nCount = pColOffset->Count();
- const ULONG* pOff = (const ULONG*) pColOffset->GetData();
- ULONG nOff = *pOff++;
+ sal_uInt16 nCount = pColOffset->Count();
+ const sal_uLong* pOff = (const sal_uLong*) pColOffset->GetData();
+ sal_uLong nOff = *pOff++;
Size aSize;
- for ( USHORT j = 1; j < nCount; j++, pOff++ )
+ for ( sal_uInt16 j = 1; j < nCount; j++, pOff++ )
{
aSize.Width() = *pOff - nOff;
aSize = pDefaultDev->PixelToLogic( aSize, MapMode( MAP_TWIP ) );
@@ -253,61 +253,61 @@ void ScHTMLLayoutParser::NextRow( ImportInfo* pInfo )
nRowMax = nRowCnt;
nColCnt = nColCntStart;
nColOffset = nColOffsetStart;
- bFirstRow = FALSE;
+ bFirstRow = false;
}
-BOOL ScHTMLLayoutParser::SeekOffset( ScHTMLColOffset* pOffset, USHORT nOffset,
- SCCOL* pCol, USHORT nOffsetTol )
+sal_Bool ScHTMLLayoutParser::SeekOffset( ScHTMLColOffset* pOffset, sal_uInt16 nOffset,
+ SCCOL* pCol, sal_uInt16 nOffsetTol )
{
DBG_ASSERT( pOffset, "ScHTMLLayoutParser::SeekOffset - illegal call" );
- USHORT nPos;
- BOOL bFound = pOffset->Seek_Entry( nOffset, &nPos );
+ sal_uInt16 nPos;
+ sal_Bool bFound = pOffset->Seek_Entry( nOffset, &nPos );
*pCol = static_cast<SCCOL>(nPos);
if ( bFound )
- return TRUE;
- USHORT nCount = pOffset->Count();
+ return sal_True;
+ sal_uInt16 nCount = pOffset->Count();
if ( !nCount )
- return FALSE;
+ return false;
// nPos ist Einfuegeposition, da liegt der Naechsthoehere (oder auch nicht)
if ( nPos < nCount && (((*pOffset)[nPos] - nOffsetTol) <= nOffset) )
- return TRUE;
+ return sal_True;
// nicht kleiner als alles andere? dann mit Naechstniedrigerem vergleichen
else if ( nPos && (((*pOffset)[nPos-1] + nOffsetTol) >= nOffset) )
{
(*pCol)--;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-void ScHTMLLayoutParser::MakeCol( ScHTMLColOffset* pOffset, USHORT& nOffset,
- USHORT& nWidth, USHORT nOffsetTol, USHORT nWidthTol )
+void ScHTMLLayoutParser::MakeCol( ScHTMLColOffset* pOffset, sal_uInt16& nOffset,
+ sal_uInt16& nWidth, sal_uInt16 nOffsetTol, sal_uInt16 nWidthTol )
{
DBG_ASSERT( pOffset, "ScHTMLLayoutParser::MakeCol - illegal call" );
SCCOL nPos;
if ( SeekOffset( pOffset, nOffset, &nPos, nOffsetTol ) )
- nOffset = (USHORT)(*pOffset)[nPos];
+ nOffset = (sal_uInt16)(*pOffset)[nPos];
else
pOffset->Insert( nOffset );
if ( nWidth )
{
if ( SeekOffset( pOffset, nOffset + nWidth, &nPos, nWidthTol ) )
- nWidth = (USHORT)(*pOffset)[nPos] - nOffset;
+ nWidth = (sal_uInt16)(*pOffset)[nPos] - nOffset;
else
pOffset->Insert( nOffset + nWidth );
}
}
-void ScHTMLLayoutParser::MakeColNoRef( ScHTMLColOffset* pOffset, USHORT nOffset,
- USHORT nWidth, USHORT nOffsetTol, USHORT nWidthTol )
+void ScHTMLLayoutParser::MakeColNoRef( ScHTMLColOffset* pOffset, sal_uInt16 nOffset,
+ sal_uInt16 nWidth, sal_uInt16 nOffsetTol, sal_uInt16 nWidthTol )
{
DBG_ASSERT( pOffset, "ScHTMLLayoutParser::MakeColNoRef - illegal call" );
SCCOL nPos;
if ( SeekOffset( pOffset, nOffset, &nPos, nOffsetTol ) )
- nOffset = (USHORT)(*pOffset)[nPos];
+ nOffset = (sal_uInt16)(*pOffset)[nPos];
else
pOffset->Insert( nOffset );
if ( nWidth )
@@ -318,31 +318,31 @@ void ScHTMLLayoutParser::MakeColNoRef( ScHTMLColOffset* pOffset, USHORT nOffset,
}
-void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, USHORT& nOldOffset,
- USHORT& nNewOffset, USHORT nOffsetTol )
+void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, sal_uInt16& nOldOffset,
+ sal_uInt16& nNewOffset, sal_uInt16 nOffsetTol )
{
DBG_ASSERT( pOffset, "ScHTMLLayoutParser::ModifyOffset - illegal call" );
SCCOL nPos;
if ( !SeekOffset( pOffset, nOldOffset, &nPos, nOffsetTol ) )
{
if ( SeekOffset( pOffset, nNewOffset, &nPos, nOffsetTol ) )
- nNewOffset = (USHORT)(*pOffset)[nPos];
+ nNewOffset = (sal_uInt16)(*pOffset)[nPos];
else
pOffset->Insert( nNewOffset );
return ;
}
- nOldOffset = (USHORT)(*pOffset)[nPos];
+ nOldOffset = (sal_uInt16)(*pOffset)[nPos];
SCCOL nPos2;
if ( SeekOffset( pOffset, nNewOffset, &nPos2, nOffsetTol ) )
{
- nNewOffset = (USHORT)(*pOffset)[nPos2];
+ nNewOffset = (sal_uInt16)(*pOffset)[nPos2];
return ;
}
- ULONG* pData = ((ULONG*) pOffset->GetData()) + nPos; //! QAD
+ sal_uLong* pData = ((sal_uLong*) pOffset->GetData()) + nPos; //! QAD
long nDiff = nNewOffset - nOldOffset;
if ( nDiff < 0 )
{
- const ULONG* pStop = pOffset->GetData();
+ const sal_uLong* pStop = pOffset->GetData();
do
{
*pData += nDiff;
@@ -350,7 +350,7 @@ void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, USHORT& nOldOff
}
else
{
- const ULONG* pStop = pOffset->GetData() + pOffset->Count();
+ const sal_uLong* pStop = pOffset->GetData() + pOffset->Count();
do
{
*pData += nDiff;
@@ -359,17 +359,17 @@ void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, USHORT& nOldOff
}
-void ScHTMLLayoutParser::SkipLocked( ScEEParseEntry* pE, BOOL bJoin )
+void ScHTMLLayoutParser::SkipLocked( ScEEParseEntry* pE, sal_Bool bJoin )
{
if ( ValidCol(pE->nCol) )
{ // wuerde sonst bei ScAddress falschen Wert erzeugen, evtl. Endlosschleife!
- BOOL bBadCol = FALSE;
- BOOL bAgain;
+ sal_Bool bBadCol = false;
+ sal_Bool bAgain;
ScRange aRange( pE->nCol, pE->nRow, 0,
pE->nCol + pE->nColOverlap - 1, pE->nRow + pE->nRowOverlap - 1, 0 );
do
{
- bAgain = FALSE;
+ bAgain = false;
for ( size_t i = 0, nRanges = xLockedList->size(); i < nRanges; ++i )
{
ScRange* pR = (*xLockedList)[i];
@@ -378,10 +378,10 @@ void ScHTMLLayoutParser::SkipLocked( ScEEParseEntry* pE, BOOL bJoin )
pE->nCol = pR->aEnd.Col() + 1;
SCCOL nTmp = pE->nCol + pE->nColOverlap - 1;
if ( pE->nCol > MAXCOL || nTmp > MAXCOL )
- bBadCol = TRUE;
+ bBadCol = sal_True;
else
{
- bAgain = TRUE;
+ bAgain = sal_True;
aRange.aStart.SetCol( pE->nCol );
aRange.aEnd.SetCol( nTmp );
}
@@ -401,11 +401,11 @@ void ScHTMLLayoutParser::Adjust()
ScHTMLAdjustStack aStack;
ScHTMLAdjustStackEntry* pS;
- USHORT nTab = 0;
+ sal_uInt16 nTab = 0;
SCCOL nLastCol = SCCOL_MAX;
SCROW nNextRow = 0;
SCROW nCurRow = 0;
- USHORT nPageWidth = (USHORT) aPageSize.Width();
+ sal_uInt16 nPageWidth = (sal_uInt16) aPageSize.Width();
Table* pTab = NULL;
for ( size_t i = 0, nListSize = maList.size(); i < nListSize; ++i )
{
@@ -431,7 +431,7 @@ void ScHTMLLayoutParser::Adjust()
else
nCurRow = nNextRow = pE->nRow;
SCROW nR;
- if ( pTab && ((nR = (SCROW)(ULONG)pTab->Get( nCurRow )) != 0) )
+ if ( pTab && ((nR = (SCROW)(sal_uLong)pTab->Get( nCurRow )) != 0) )
nNextRow += nR;
else
nNextRow++;
@@ -447,7 +447,7 @@ void ScHTMLLayoutParser::Adjust()
pTab = (pTables ? (Table*) pTables->Get( nTab ) : NULL);
// neuer Zeilenabstand
SCROW nR;
- if ( pTab && ((nR = (SCROW)(ULONG)pTab->Get( nCurRow )) != 0) )
+ if ( pTab && ((nR = (SCROW)(sal_uLong)pTab->Get( nCurRow )) != 0) )
nNextRow = nCurRow + nR;
else
nNextRow = nCurRow + 1;
@@ -461,7 +461,7 @@ void ScHTMLLayoutParser::Adjust()
SCROW nRowSpan = pE->nRowOverlap;
for ( SCROW j=0; j < nRowSpan; j++ )
{ // aus merged Zeilen resultierendes RowSpan
- SCROW nRows = (SCROW)(ULONG)pTab->Get( nRow+j );
+ SCROW nRows = (SCROW)(sal_uLong)pTab->Get( nRow+j );
if ( nRows > 1 )
{
pE->nRowOverlap += nRows - 1;
@@ -478,18 +478,18 @@ void ScHTMLLayoutParser::Adjust()
// echte Col
SeekOffset( pColOffset, pE->nOffset, &pE->nCol, nOffsetTolerance );
SCCOL nColBeforeSkip = pE->nCol;
- SkipLocked( pE, FALSE );
+ SkipLocked( pE, false );
if ( pE->nCol != nColBeforeSkip )
{
SCCOL nCount = (SCCOL)pColOffset->Count();
if ( nCount <= pE->nCol )
{
- pE->nOffset = (USHORT) (*pColOffset)[nCount-1];
+ pE->nOffset = (sal_uInt16) (*pColOffset)[nCount-1];
MakeCol( pColOffset, pE->nOffset, pE->nWidth, nOffsetTolerance, nOffsetTolerance );
}
else
{
- pE->nOffset = (USHORT) (*pColOffset)[pE->nCol];
+ pE->nOffset = (sal_uInt16) (*pColOffset)[pE->nCol];
}
}
SCCOL nPos;
@@ -515,7 +515,7 @@ void ScHTMLLayoutParser::Adjust()
}
-USHORT ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE )
+sal_uInt16 ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE )
{
if ( pE->nWidth )
return pE->nWidth;
@@ -523,7 +523,7 @@ USHORT ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE )
nColCntStart + pE->nColOverlap),
static_cast<sal_Int32>( pLocalColOffset->Count() - 1));
SCCOL nPos = (nTmp < 0 ? 0 : static_cast<SCCOL>(nTmp));
- USHORT nOff2 = (USHORT) (*pLocalColOffset)[nPos];
+ sal_uInt16 nOff2 = (sal_uInt16) (*pLocalColOffset)[nPos];
if ( pE->nOffset < nOff2 )
return nOff2 - pE->nOffset;
return 0;
@@ -535,26 +535,26 @@ void ScHTMLLayoutParser::SetWidths()
ScEEParseEntry* pE;
SCCOL nCol;
if ( !nTableWidth )
- nTableWidth = (USHORT) aPageSize.Width();
+ nTableWidth = (sal_uInt16) aPageSize.Width();
SCCOL nColsPerRow = nMaxCol - nColCntStart;
if ( nColsPerRow <= 0 )
nColsPerRow = 1;
if ( pLocalColOffset->Count() <= 2 )
{ // nur PageSize, es gab keine Width-Angabe
- USHORT nWidth = nTableWidth / static_cast<USHORT>(nColsPerRow);
- USHORT nOff = nColOffsetStart;
- pLocalColOffset->Remove( (USHORT)0, pLocalColOffset->Count() );
+ sal_uInt16 nWidth = nTableWidth / static_cast<sal_uInt16>(nColsPerRow);
+ sal_uInt16 nOff = nColOffsetStart;
+ pLocalColOffset->Remove( (sal_uInt16)0, pLocalColOffset->Count() );
for ( nCol = 0; nCol <= nColsPerRow; ++nCol, nOff = nOff + nWidth )
{
MakeColNoRef( pLocalColOffset, nOff, 0, 0, 0 );
}
- nTableWidth = (USHORT)((*pLocalColOffset)[pLocalColOffset->Count() -1 ] - (*pLocalColOffset)[0]);
+ nTableWidth = (sal_uInt16)((*pLocalColOffset)[pLocalColOffset->Count() -1 ] - (*pLocalColOffset)[0]);
for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i )
{
pE = maList[ i ];
if ( pE->nTab == nTable )
{
- pE->nOffset = (USHORT) (*pLocalColOffset)[pE->nCol - nColCntStart];
+ pE->nOffset = (sal_uInt16) (*pLocalColOffset)[pE->nCol - nColCntStart];
pE->nWidth = 0; // to be recalculated later
}
}
@@ -564,10 +564,10 @@ void ScHTMLLayoutParser::SetWidths()
// wieso eigentlich kein pE ?!?
if ( nFirstTableCell < maList.size() )
{
- USHORT* pOffsets = new USHORT[ nColsPerRow+1 ];
- memset( pOffsets, 0, (nColsPerRow+1) * sizeof(USHORT) );
- USHORT* pWidths = new USHORT[ nColsPerRow ];
- memset( pWidths, 0, nColsPerRow * sizeof(USHORT) );
+ sal_uInt16* pOffsets = new sal_uInt16[ nColsPerRow+1 ];
+ memset( pOffsets, 0, (nColsPerRow+1) * sizeof(sal_uInt16) );
+ sal_uInt16* pWidths = new sal_uInt16[ nColsPerRow ];
+ memset( pWidths, 0, nColsPerRow * sizeof(sal_uInt16) );
pOffsets[0] = nColOffsetStart;
for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i )
{
@@ -584,8 +584,8 @@ void ScHTMLLayoutParser::SetWidths()
}
else
{ // try to find a single undefined width
- USHORT nTotal = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 nTotal = 0;
+ sal_Bool bFound = false;
SCCOL nHere = 0;
SCCOL nStop = Min( static_cast<SCCOL>(nCol + pE->nColOverlap), nColsPerRow );
for ( ; nCol < nStop; nCol++ )
@@ -596,10 +596,10 @@ void ScHTMLLayoutParser::SetWidths()
{
if ( bFound )
{
- bFound = FALSE;
+ bFound = false;
break; // for
}
- bFound = TRUE;
+ bFound = sal_True;
nHere = nCol;
}
}
@@ -609,8 +609,8 @@ void ScHTMLLayoutParser::SetWidths()
}
}
}
- USHORT nWidths = 0;
- USHORT nUnknown = 0;
+ sal_uInt16 nWidths = 0;
+ sal_uInt16 nUnknown = 0;
for ( nCol = 0; nCol < nColsPerRow; nCol++ )
{
if ( pWidths[nCol] )
@@ -620,7 +620,7 @@ void ScHTMLLayoutParser::SetWidths()
}
if ( nUnknown )
{
- USHORT nW = ((nWidths < nTableWidth) ?
+ sal_uInt16 nW = ((nWidths < nTableWidth) ?
((nTableWidth - nWidths) / nUnknown) :
(nTableWidth / nUnknown));
for ( nCol = 0; nCol < nColsPerRow; nCol++ )
@@ -633,7 +633,7 @@ void ScHTMLLayoutParser::SetWidths()
{
pOffsets[nCol] = pOffsets[nCol-1] + pWidths[nCol-1];
}
- pLocalColOffset->Remove( (USHORT)0, pLocalColOffset->Count() );
+ pLocalColOffset->Remove( (sal_uInt16)0, pLocalColOffset->Count() );
for ( nCol = 0; nCol <= nColsPerRow; nCol++ )
{
MakeColNoRef( pLocalColOffset, pOffsets[nCol], 0, 0, 0 );
@@ -664,7 +664,7 @@ void ScHTMLLayoutParser::SetWidths()
}
if ( pLocalColOffset->Count() )
{
- USHORT nMax = (USHORT) (*pLocalColOffset)[pLocalColOffset->Count() - 1];
+ sal_uInt16 nMax = (sal_uInt16) (*pLocalColOffset)[pLocalColOffset->Count() - 1];
if ( aPageSize.Width() < nMax )
aPageSize.Width() = nMax;
}
@@ -698,12 +698,12 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE )
nCol = pE->nCol - nColCntStart;
SCCOL nCount = static_cast<SCCOL>(pLocalColOffset->Count());
if ( nCol < nCount )
- nColOffset = (USHORT) (*pLocalColOffset)[nCol];
+ nColOffset = (sal_uInt16) (*pLocalColOffset)[nCol];
else
- nColOffset = (USHORT) (*pLocalColOffset)[nCount - 1];
+ nColOffset = (sal_uInt16) (*pLocalColOffset)[nCount - 1];
}
pE->nOffset = nColOffset;
- USHORT nWidth = GetWidth( pE );
+ sal_uInt16 nWidth = GetWidth( pE );
MakeCol( pLocalColOffset, pE->nOffset, nWidth, nOffsetTolerance, nOffsetTolerance );
if ( pE->nWidth )
pE->nWidth = nWidth;
@@ -715,10 +715,10 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE )
void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo )
{
- bInCell = FALSE;
+ bInCell = false;
if ( bTabInTabCell )
{ // in TableOff vom Stack geholt
- bTabInTabCell = FALSE;
+ bTabInTabCell = false;
bool found = false;
for ( size_t i = 0, nListSize = maList.size(); i < nListSize; ++i )
{
@@ -734,7 +734,7 @@ void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo )
return ;
}
if ( pActEntry->nTab == 0 )
- pActEntry->nWidth = (USHORT) aPageSize.Width();
+ pActEntry->nWidth = (sal_uInt16) aPageSize.Width();
Colonize( pActEntry );
nColCnt = pActEntry->nCol + pActEntry->nColOverlap;
if ( nMaxCol < nColCnt )
@@ -759,7 +759,7 @@ void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo )
rSel.nEndPara = rSel.nStartPara;
}
if ( rSel.HasRange() )
- pActEntry->aItemSet.Put( SfxBoolItem( ATTR_LINEBREAK, TRUE ) );
+ pActEntry->aItemSet.Put( SfxBoolItem( ATTR_LINEBREAK, true ) );
maList.push_back( pActEntry );
NewActEntry( pActEntry ); // neuer freifliegender pActEntry
}
@@ -783,9 +783,9 @@ IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo )
// If text remains: create paragraph, without calling CloseEntry().
if( bInCell ) // ...but only in opened table cells.
{
- bInCell = FALSE;
+ bInCell = false;
NextRow( pInfo );
- bInCell = TRUE;
+ bInCell = sal_True;
}
CloseEntry( pInfo );
}
@@ -848,11 +848,11 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo )
OSL_FAIL( "Dummbatz-Dok! <TH> oder <TD> ohne vorheriges <TABLE>" );
TableOn( pInfo );
}
- bInCell = TRUE;
- BOOL bHorJustifyCenterTH = (pInfo->nToken == HTML_TABLEHEADER_ON);
+ bInCell = sal_True;
+ sal_Bool bHorJustifyCenterTH = (pInfo->nToken == HTML_TABLEHEADER_ON);
const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions();
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -869,7 +869,7 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo )
break;
case HTML_O_ALIGN:
{
- bHorJustifyCenterTH = FALSE;
+ bHorJustifyCenterTH = false;
SvxCellHorJustify eVal;
const String& rOptVal = pOption->GetString();
if ( rOptVal.CompareIgnoreCaseToAscii( OOO_STRING_SVTOOLS_HTML_AL_right ) == COMPARE_EQUAL )
@@ -961,25 +961,25 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
if ( ++nTableLevel > 1 )
{ // Table in Table
- USHORT nTmpColOffset = nColOffset; // wird in Colonize noch angepasst
+ sal_uInt16 nTmpColOffset = nColOffset; // wird in Colonize noch angepasst
Colonize( pActEntry );
aTableStack.Push( new ScHTMLTableStackEntry(
pActEntry, xLockedList, pLocalColOffset, nFirstTableCell,
nColCnt, nRowCnt, nColCntStart, nMaxCol, nTable,
nTableWidth, nColOffset, nColOffsetStart,
bFirstRow ) );
- USHORT nLastWidth = nTableWidth;
+ sal_uInt16 nLastWidth = nTableWidth;
nTableWidth = GetWidth( pActEntry );
if ( nTableWidth == nLastWidth && nMaxCol - nColCntStart > 1 )
{ // es muss mehr als einen geben, also kann dieser nicht alles sein
- nTableWidth = nLastWidth / static_cast<USHORT>((nMaxCol - nColCntStart));
+ nTableWidth = nLastWidth / static_cast<sal_uInt16>((nMaxCol - nColCntStart));
}
nLastWidth = nTableWidth;
if ( pInfo->nToken == HTML_TABLE_ON )
{ // es kann auch TD oder TH sein, wenn es vorher kein TABLE gab
const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions();
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -998,15 +998,15 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
}
}
}
- bInCell = FALSE;
+ bInCell = false;
if ( bTabInTabCell && !(nTableWidth < nLastWidth) )
{ // mehrere Tabellen in einer Zelle, untereinander
- bTabInTabCell = FALSE;
+ bTabInTabCell = false;
NextRow( pInfo );
}
else
{ // in dieser Zelle geht's los, oder nebeneinander
- bTabInTabCell = FALSE;
+ bTabInTabCell = false;
nColCntStart = nColCnt;
nColOffset = nTmpColOffset;
nColOffsetStart = nColOffset;
@@ -1036,8 +1036,8 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
if ( pInfo->nToken == HTML_TABLE_ON )
{ // es kann auch TD oder TH sein, wenn es vorher kein TABLE gab
const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions();
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -1058,7 +1058,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
}
}
nTable = ++nMaxTable;
- bFirstRow = TRUE;
+ bFirstRow = true;
nFirstTableCell = maList.size();
pLocalColOffset = new ScHTMLColOffset;
@@ -1087,7 +1087,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
if ( nRows > 1 )
{ // Groesse der Tabelle an dieser Position eintragen
SCROW nRow = pS->nRowCnt;
- USHORT nTab = pS->nTable;
+ sal_uInt16 nTab = pS->nTable;
if ( !pTables )
pTables = new Table;
// Hoehen der aeusseren Table
@@ -1127,8 +1127,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
{ // aussen
for ( SCROW j=0; j < nRowSpan; j++ )
{
- ULONG nRowKey = nRow + j;
- SCROW nR = (SCROW)(ULONG)pTab1->Get( nRowKey );
+ sal_uLong nRowKey = nRow + j;
+ SCROW nR = (SCROW)(sal_uLong)pTab1->Get( nRowKey );
if ( !nR )
pTab1->Insert( nRowKey, (void*)(sal_IntPtr)nRowsPerRow1 );
else if ( nRowsPerRow1 > nR )
@@ -1141,7 +1141,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
nR += nAdd;
if ( (nR % nRows) == 0 )
{ // nur wenn abbildbar
- SCROW nR2 = (SCROW)(ULONG)pTab1->Get( nRowKey+1 );
+ SCROW nR2 = (SCROW)(sal_uLong)pTab1->Get( nRowKey+1 );
if ( nR2 > nAdd )
{ // nur wenn wirklich Platz
pTab1->Replace( nRowKey, (void*)(sal_IntPtr)nR );
@@ -1161,8 +1161,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
}
for ( SCROW j=0; j < nRows; j++ )
{
- ULONG nRowKey = nRow + j;
- SCROW nR = (SCROW)(ULONG)pTab2->Get( nRowKey );
+ sal_uLong nRowKey = nRow + j;
+ SCROW nR = (SCROW)(sal_uLong)pTab2->Get( nRowKey );
if ( !nR )
pTab2->Insert( nRowKey, (void*)(sal_IntPtr)nRowsPerRow2 );
else if ( nRowsPerRow2 > nR )
@@ -1178,10 +1178,10 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
pE->nWidth = nTableWidth;
else if ( pE->nWidth < nTableWidth )
{
- USHORT nOldOffset = pE->nOffset + pE->nWidth;
- USHORT nNewOffset = pE->nOffset + nTableWidth;
+ sal_uInt16 nOldOffset = pE->nOffset + pE->nWidth;
+ sal_uInt16 nNewOffset = pE->nOffset + nTableWidth;
ModifyOffset( pS->pLocalColOffset, nOldOffset, nNewOffset, nOffsetTolerance );
- USHORT nTmp = nNewOffset - pE->nOffset - pE->nWidth;
+ sal_uInt16 nTmp = nNewOffset - pE->nOffset - pE->nWidth;
pE->nWidth = nNewOffset - pE->nOffset;
pS->nTableWidth = pS->nTableWidth + nTmp;
if ( pS->nColOffset >= nOldOffset )
@@ -1209,8 +1209,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
pActEntry = pE;
delete pS;
}
- bTabInTabCell = TRUE;
- bInCell = TRUE;
+ bTabInTabCell = sal_True;
+ bInCell = sal_True;
}
else
{ // einfache Table beendet
@@ -1234,8 +1234,8 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
ScHTMLImage* pImage = new ScHTMLImage;
pActEntry->maImageList.push_back( pImage );
const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions();
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -1283,7 +1283,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
return ;
}
- USHORT nFormat;
+ sal_uInt16 nFormat;
Graphic* pGraphic = new Graphic;
GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
if ( GRFILTER_OK != GraphicFilter::LoadGraphic( pImage->aURL, pImage->aFilterName,
@@ -1294,7 +1294,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
}
if ( !pActEntry->bHasGraphic )
{ // discard any ALT text in this cell if we have any image
- pActEntry->bHasGraphic = TRUE;
+ pActEntry->bHasGraphic = sal_True;
pActEntry->aAltText.Erase();
}
pImage->aFilterName = pFilter->GetImportFormatName( nFormat );
@@ -1327,15 +1327,15 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
void ScHTMLLayoutParser::ColOn( ImportInfo* pInfo )
{
const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions();
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*pOptions)[i];
switch( pOption->GetToken() )
{
case HTML_O_WIDTH:
{
- USHORT nVal = GetWidthPixel( pOption );
+ sal_uInt16 nVal = GetWidthPixel( pOption );
MakeCol( pLocalColOffset, nColOffset, nVal, 0, 0 );
nColOffset = nColOffset + nVal;
}
@@ -1345,13 +1345,13 @@ void ScHTMLLayoutParser::ColOn( ImportInfo* pInfo )
}
-USHORT ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption )
+sal_uInt16 ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption )
{
const String& rOptVal = pOption->GetString();
if ( rOptVal.Search('%') != STRING_NOTFOUND )
{ // Prozent
- USHORT nW = (nTableWidth ? nTableWidth : (USHORT) aPageSize.Width());
- return (USHORT)((pOption->GetNumber() * nW) / 100);
+ sal_uInt16 nW = (nTableWidth ? nTableWidth : (sal_uInt16) aPageSize.Width());
+ return (sal_uInt16)((pOption->GetNumber() * nW) / 100);
}
else
{
@@ -1361,7 +1361,7 @@ USHORT ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption )
return 0;
}
else
- return (USHORT)pOption->GetNumber(); // Pixel
+ return (sal_uInt16)pOption->GetNumber(); // Pixel
}
}
@@ -1369,8 +1369,8 @@ USHORT ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption )
void ScHTMLLayoutParser::AnchorOn( ImportInfo* pInfo )
{
const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions();
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -1385,7 +1385,7 @@ void ScHTMLLayoutParser::AnchorOn( ImportInfo* pInfo )
}
-BOOL ScHTMLLayoutParser::IsAtBeginningOfText( ImportInfo* pInfo )
+sal_Bool ScHTMLLayoutParser::IsAtBeginningOfText( ImportInfo* pInfo )
{
ESelection& rSel = pActEntry->aSel;
return rSel.nStartPara == rSel.nEndPara &&
@@ -1399,8 +1399,8 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo )
if ( IsAtBeginningOfText( pInfo ) )
{ // nur am Anfang des Textes, gilt dann fuer gesamte Zelle
const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions();
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -1426,7 +1426,7 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo )
break;
case HTML_O_SIZE :
{
- USHORT nSize = (USHORT) pOption->GetNumber();
+ sal_uInt16 nSize = (sal_uInt16) pOption->GetNumber();
if ( nSize == 0 )
nSize = 1;
else if ( nSize > SC_HTML_FONTSIZES )
@@ -1450,7 +1450,7 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo )
void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
{
- BOOL bSetLastToken = TRUE;
+ sal_Bool bSetLastToken = sal_True;
switch ( pInfo->nToken )
{
case HTML_META:
@@ -1465,7 +1465,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
break;
case HTML_TITLE_ON:
{
- bInTitle = TRUE;
+ bInTitle = sal_True;
aString.Erase();
}
break;
@@ -1481,7 +1481,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
uno::UNO_QUERY_THROW);
xDPS->getDocumentProperties()->setTitle(aString);
}
- bInTitle = FALSE;
+ bInTitle = false;
}
break;
case HTML_TABLE_ON:
@@ -1498,7 +1498,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
{
if ( bInCell )
CloseEntry( pInfo );
- // bInCell nicht TRUE setzen, das macht TableDataOn
+ // bInCell nicht sal_True setzen, das macht TableDataOn
pActEntry->aItemSet.Put(
SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT) );
} // fall thru
@@ -1612,7 +1612,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
break;
default:
{ // nLastToken nicht setzen!
- bSetLastToken = FALSE;
+ bSetLastToken = false;
}
}
if ( bSetLastToken )
@@ -2731,7 +2731,7 @@ ScHTMLQueryParser::~ScHTMLQueryParser()
{
}
-ULONG ScHTMLQueryParser::Read( SvStream& rStrm, const String& rBaseURL )
+sal_uLong ScHTMLQueryParser::Read( SvStream& rStrm, const String& rBaseURL )
{
SvKeyValueIteratorRef xValues;
SvKeyValueIterator* pAttributes = 0;
@@ -2759,7 +2759,7 @@ ULONG ScHTMLQueryParser::Read( SvStream& rStrm, const String& rBaseURL )
Link aOldLink = pEdit->GetImportHdl();
pEdit->SetImportHdl( LINK( this, ScHTMLQueryParser, HTMLImportHdl ) );
- ULONG nErr = pEdit->Read( rStrm, rBaseURL, EE_FORMAT_HTML, pAttributes );
+ sal_uLong nErr = pEdit->Read( rStrm, rBaseURL, EE_FORMAT_HTML, pAttributes );
pEdit->SetImportHdl( aOldLink );
mxGlobTable->Recalc();
diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index f908fb1d9668..29799635aa2b 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -58,7 +58,7 @@ public:
inline const sal_uInt8* GetGUID() const { return aGUID; }
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -94,7 +94,7 @@ private:
public:
XclExpUsersViewBegin( const sal_uInt8* pGUID, sal_uInt32 nTab );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -107,7 +107,7 @@ private:
virtual void SaveCont( XclExpStream& rStrm );
public:
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -120,7 +120,7 @@ private:
virtual void SaveCont( XclExpStream& rStrm );
public:
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -133,7 +133,7 @@ private:
virtual void SaveCont( XclExpStream& rStrm );
public:
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -146,7 +146,7 @@ private:
virtual void SaveCont( XclExpStream& rStrm );
public:
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -159,7 +159,7 @@ private:
virtual void SaveCont( XclExpStream& rStrm );
public:
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -169,13 +169,13 @@ public:
class XclExpChTrEmpty : public ExcRecord
{
private:
- UINT16 nRecNum;
+ sal_uInt16 nRecNum;
public:
- inline XclExpChTrEmpty( UINT16 nNum ) : nRecNum( nNum ) {}
+ inline XclExpChTrEmpty( sal_uInt16 nNum ) : nRecNum( nNum ) {}
virtual ~XclExpChTrEmpty();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -190,7 +190,7 @@ private:
public:
virtual ~XclExpChTr0x0195();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -209,7 +209,7 @@ public:
inline XclExpChTr0x0194( const ScChangeTrack& rChangeTrack );
virtual ~XclExpChTr0x0194();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -237,7 +237,7 @@ public:
inline void SetGUID( const sal_uInt8* pGUID ) { memcpy( aGUID, pGUID, 16 ); }
inline void SetCount( sal_uInt32 nNew ) { nCount = nNew; }
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -264,7 +264,7 @@ public:
sal_Int32 nLogNumber );
virtual ~XclExpChTrInfo();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -344,7 +344,7 @@ public:
void Copy( const XclExpChTrTabIdBuffer& rBuffer );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -504,7 +504,7 @@ public:
const XclExpChTrTabIdBuffer& rTabIdBuffer );
virtual ~XclExpChTrCellContent();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -533,7 +533,7 @@ public:
ScChangeTrack& rChangeTrack );
virtual ~XclExpChTrInsert();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -557,7 +557,7 @@ public:
const XclExpChTrTabIdBuffer& rTabIdBuffer );
virtual ~XclExpChTrInsertTab();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -584,7 +584,7 @@ public:
ScChangeTrack& rChangeTrack );
virtual ~XclExpChTrMoveRange();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -602,7 +602,7 @@ public:
XclExpChTr0x014A( const XclExpChTrInsert& rAction );
virtual ~XclExpChTr0x014A();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx
index 402085eae6e7..029e334d79d2 100644
--- a/sc/source/filter/inc/XclImpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclImpChangeTrack.hxx
@@ -174,7 +174,7 @@ class XclImpChTrFmlConverter : public ExcelToSc8
private:
XclImpChangeTrack& rChangeTrack;
- virtual bool Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo );
+ virtual bool Read3DTabReference( sal_uInt16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo );
public:
inline XclImpChTrFmlConverter(
diff --git a/sc/source/filter/inc/decl.h b/sc/source/filter/inc/decl.h
index c57446c8299d..91157cf9a9a8 100644
--- a/sc/source/filter/inc/decl.h
+++ b/sc/source/filter/inc/decl.h
@@ -39,7 +39,7 @@ typedef sal_Char STRING16[ 16 ];
typedef sal_Char STRING14[ 14 ];
typedef sal_Char STRING8[ 8 ];
typedef sal_Char STRING6[ 6 ];
-typedef USHORT USHORT4[ 4 ];
+typedef sal_uInt16 USHORT4[ 4 ];
//typedef unsigned short USHORT4[ 4 ];
#endif
diff --git a/sc/source/filter/inc/dif.hxx b/sc/source/filter/inc/dif.hxx
index 57627c1f7347..374ea301b976 100644
--- a/sc/source/filter/inc/dif.hxx
+++ b/sc/source/filter/inc/dif.hxx
@@ -72,41 +72,41 @@ class DifParser
public:
String aData;
double fVal;
- UINT32 nVector;
- UINT32 nVal;
- UINT32 nNumFormat;
+ sal_uInt32 nVector;
+ sal_uInt32 nVal;
+ sal_uInt32 nNumFormat;
CharSet eCharSet;
private:
SvNumberFormatter* pNumFormatter;
SvStream& rIn;
- BOOL bPlain;
+ sal_Bool bPlain;
String aLookAheadLine;
bool ReadNextLine( String& rStr );
bool LookAhead();
DATASET GetNumberDataset( const sal_Unicode* pPossibleNumericData );
- static inline BOOL IsBOT( const sal_Unicode* pRef );
- static inline BOOL IsEOD( const sal_Unicode* pRef );
- static inline BOOL Is1_0( const sal_Unicode* pRef );
+ static inline sal_Bool IsBOT( const sal_Unicode* pRef );
+ static inline sal_Bool IsEOD( const sal_Unicode* pRef );
+ static inline sal_Bool Is1_0( const sal_Unicode* pRef );
public:
- DifParser( SvStream&, const UINT32 nOption, ScDocument&, CharSet );
+ DifParser( SvStream&, const sal_uInt32 nOption, ScDocument&, CharSet );
TOPIC GetNextTopic( void );
DATASET GetNextDataset( void );
- const sal_Unicode* ScanIntVal( const sal_Unicode* pStart, UINT32& rRet );
- BOOL ScanFloatVal( const sal_Unicode* pStart );
+ const sal_Unicode* ScanIntVal( const sal_Unicode* pStart, sal_uInt32& rRet );
+ sal_Bool ScanFloatVal( const sal_Unicode* pStart );
- inline BOOL IsNumber( const sal_Unicode cChar );
- inline BOOL IsNumberEnding( const sal_Unicode cChar );
+ inline sal_Bool IsNumber( const sal_Unicode cChar );
+ inline sal_Bool IsNumberEnding( const sal_Unicode cChar );
- static inline BOOL IsV( const sal_Unicode* pRef );
+ static inline sal_Bool IsV( const sal_Unicode* pRef );
- inline BOOL IsPlain( void ) const;
+ inline sal_Bool IsPlain( void ) const;
};
-inline BOOL DifParser::IsBOT( const sal_Unicode* pRef )
+inline sal_Bool DifParser::IsBOT( const sal_Unicode* pRef )
{
return ( pRef[ 0 ] == pKeyBOT[0] &&
pRef[ 1 ] == pKeyBOT[1] &&
@@ -114,7 +114,7 @@ inline BOOL DifParser::IsBOT( const sal_Unicode* pRef )
pRef[ 3 ] == pKeyBOT[3] );
}
-inline BOOL DifParser::IsEOD( const sal_Unicode* pRef )
+inline sal_Bool DifParser::IsEOD( const sal_Unicode* pRef )
{
return ( pRef[ 0 ] == pKeyEOD[0] &&
pRef[ 1 ] == pKeyEOD[1] &&
@@ -122,7 +122,7 @@ inline BOOL DifParser::IsEOD( const sal_Unicode* pRef )
pRef[ 3 ] == pKeyEOD[3] );
}
-inline BOOL DifParser::Is1_0( const sal_Unicode* pRef )
+inline sal_Bool DifParser::Is1_0( const sal_Unicode* pRef )
{
return ( pRef[ 0 ] == pKey1_0[0] &&
pRef[ 1 ] == pKey1_0[1] &&
@@ -130,23 +130,23 @@ inline BOOL DifParser::Is1_0( const sal_Unicode* pRef )
pRef[ 3 ] == pKey1_0[3] );
}
-inline BOOL DifParser::IsV( const sal_Unicode* pRef )
+inline sal_Bool DifParser::IsV( const sal_Unicode* pRef )
{
return ( pRef[ 0 ] == pKeyV[0] &&
pRef[ 1 ] == pKeyV[1] );
}
-inline BOOL DifParser::IsNumber( const sal_Unicode cChar )
+inline sal_Bool DifParser::IsNumber( const sal_Unicode cChar )
{
return ( cChar >= '0' && cChar <= '9' );
}
-inline BOOL DifParser::IsNumberEnding( const sal_Unicode cChar )
+inline sal_Bool DifParser::IsNumberEnding( const sal_Unicode cChar )
{
return ( cChar == 0x00 );
}
-inline BOOL DifParser::IsPlain( void ) const
+inline sal_Bool DifParser::IsPlain( void ) const
{
return bPlain;
}
@@ -157,7 +157,7 @@ class DifColumn
struct ENTRY
{
- UINT32 nNumFormat;
+ sal_uInt32 nNumFormat;
SCROW nStart;
SCROW nEnd;
};
@@ -169,9 +169,9 @@ class DifColumn
void SetLogical( SCROW nRow );
- void SetNumFormat( SCROW nRow, const UINT32 nNumFormat );
+ void SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat );
- void NewEntry( const SCROW nPos, const UINT32 nNumFormat );
+ void NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat );
void Apply( ScDocument&, const SCCOL nCol, const SCTAB nTab, const ScPatternAttr& );
@@ -182,20 +182,20 @@ class DifAttrCache
{
public:
- DifAttrCache( const BOOL bPlain );
+ DifAttrCache( const sal_Bool bPlain );
~DifAttrCache();
void SetLogical( const SCCOL nCol, const SCROW nRow );
- void SetNumFormat( const SCCOL nCol, const SCROW nRow, const UINT32 nNumFormat );
+ void SetNumFormat( const SCCOL nCol, const SCROW nRow, const sal_uInt32 nNumFormat );
void Apply( ScDocument&, SCTAB nTab );
private:
DifColumn** ppCols;
- BOOL bPlain;
+ sal_Bool bPlain;
};
#endif
diff --git a/sc/source/filter/inc/eeimport.hxx b/sc/source/filter/inc/eeimport.hxx
index 2d1081c3debc..ed74cc22c140 100644
--- a/sc/source/filter/inc/eeimport.hxx
+++ b/sc/source/filter/inc/eeimport.hxx
@@ -50,7 +50,7 @@ protected:
ScTabEditEngine* mpEngine;
Table* mpRowHeights;
- BOOL GraphicSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ sal_Bool GraphicSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScEEParseEntry* );
void InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScEEParseEntry* );
@@ -58,9 +58,9 @@ public:
ScEEImport( ScDocument* pDoc, const ScRange& rRange );
virtual ~ScEEImport();
- virtual ULONG Read( SvStream& rStream, const String& rBaseURL );
+ virtual sal_uLong Read( SvStream& rStream, const String& rBaseURL );
virtual ScRange GetRange() { return maRange; }
- virtual void WriteToDocument( BOOL bSizeColsRows = FALSE,
+ virtual void WriteToDocument( sal_Bool bSizeColsRows = false,
double nOutputFactor = 1.0,
SvNumberFormatter* pFormatter = NULL,
bool bConvertDate = true );
diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index 45abeeab9051..0f5e2ddc627e 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -85,14 +85,14 @@ struct ScEEParseEntry
pNumStr( NULL ), pName( NULL ),
nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0),
nColOverlap(1), nRowOverlap(1),
- nOffset(0), nWidth(0), bHasGraphic(FALSE), bEntirePara(true)
+ nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true)
{}
ScEEParseEntry( const SfxItemSet& rItemSet ) :
aItemSet( rItemSet ), pValStr( NULL ),
pNumStr( NULL ), pName( NULL ),
nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0),
nColOverlap(1), nRowOverlap(1),
- nOffset(0), nWidth(0), bHasGraphic(FALSE), bEntirePara(true)
+ nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true)
{}
~ScEEParseEntry()
{
@@ -131,7 +131,7 @@ public:
ScEEParser( EditEngine* );
virtual ~ScEEParser();
- virtual ULONG Read( SvStream&, const String& rBaseURL ) = 0;
+ virtual sal_uLong Read( SvStream&, const String& rBaseURL ) = 0;
Table* GetColWidths() const { return pColWidths; }
void GetDimensions( SCCOL& nCols, SCROW& nRows ) const
diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx
index 3ba8b5e65936..75c0f2433569 100644
--- a/sc/source/filter/inc/excdoc.hxx
+++ b/sc/source/filter/inc/excdoc.hxx
@@ -62,9 +62,9 @@ private:
XclExpCellTableRef mxCellTable;
SCTAB mnScTab; // table number SC document
- UINT16 nExcTab; // table number Excel document
- UINT16 nAktRow; // fuer'n Iterator
- UINT16 nAktCol;
+ sal_uInt16 nExcTab; // table number Excel document
+ sal_uInt16 nAktRow; // fuer'n Iterator
+ sal_uInt16 nAktCol;
NameBuffer* pTabNames;
diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx
index 9332f1ad502d..0744bdf52c64 100644
--- a/sc/source/filter/inc/excform.hxx
+++ b/sc/source/filter/inc/excform.hxx
@@ -44,9 +44,9 @@ protected:
enum ExtensionType { EXTENSION_ARRAY, EXTENSION_NLR, EXTENSION_MEMAREA };
typedef ::std::vector< ExtensionType > ExtensionTypeVec;
- BOOL bExternName; // wenn External Name gefunden wurde
- static const UINT16 nRowMask;
- static const UINT16 nLastInd; // letzter Index fuer Excel->SC-
+ sal_Bool bExternName; // wenn External Name gefunden wurde
+ static const sal_uInt16 nRowMask;
+ static const sal_uInt16 nLastInd; // letzter Index fuer Excel->SC-
// Token Umsetzung
XclFunctionProvider maFuncProv;
const XclBiff meBiff;
@@ -54,7 +54,7 @@ protected:
// ---------------------------------------------------------------
void DoMulArgs( DefTokenId eId, sal_uInt8 nNumArgs, sal_uInt8 mnMinParamCount = 0 );
- void ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData&, const BOOL bName );
+ void ExcRelToScRel( sal_uInt16 nRow, sal_uInt8 nCol, ScSingleRefData&, const sal_Bool bName );
public:
ExcelToSc( const XclImpRoot& rRoot );
@@ -67,16 +67,16 @@ public:
virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen,
const String& rUrl, const ::std::vector<String>& rTabNames );
- virtual BOOL GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen );
+ virtual sal_Bool GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen );
void GetDummy( const ScTokenArray*& );
const ScTokenArray* GetBoolErr( XclBoolError );
- BOOL GetShrFmla( const ScTokenArray*&, XclImpStream& rStrm, sal_Size nFormulaLen );
+ sal_Bool GetShrFmla( const ScTokenArray*&, XclImpStream& rStrm, sal_Size nFormulaLen );
static void SetError( ScFormulaCell& rCell, const ConvErr eErr );
- static inline BOOL IsComplColRange( const UINT16 nCol1, const UINT16 nCol2 );
- static inline BOOL IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 );
+ static inline sal_Bool IsComplColRange( const sal_uInt16 nCol1, const sal_uInt16 nCol2 );
+ static inline sal_Bool IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 );
void SetComplCol( ScComplexRefData& );
void SetComplRow( ScComplexRefData& );
@@ -90,13 +90,13 @@ public:
};
-inline BOOL ExcelToSc::IsComplColRange( const UINT16 nCol1, const UINT16 nCol2 )
+inline sal_Bool ExcelToSc::IsComplColRange( const sal_uInt16 nCol1, const sal_uInt16 nCol2 )
{
return ( nCol1 == 0x00 ) && ( nCol2 == 0xFF );
}
-inline BOOL ExcelToSc::IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 )
+inline sal_Bool ExcelToSc::IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 )
{
return ( ( nRow1 & 0x3FFF ) == 0x0000 ) && ( ( nRow2 & 0x3FFF ) == 0x3FFF );
}
@@ -121,12 +121,12 @@ public:
private:
const XclImpLinkManager& rLinkMan;
- void ExcRelToScRel8( UINT16 nRow, UINT16 nCol, ScSingleRefData&,
- const BOOL bName );
+ void ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nCol, ScSingleRefData&,
+ const sal_Bool bName );
- bool GetExternalFileIdFromXti( UINT16 nIxti, sal_uInt16& rFileId ) const;
+ bool GetExternalFileIdFromXti( sal_uInt16 nIxti, sal_uInt16& rFileId ) const;
- virtual bool Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo );
+ virtual bool Read3DTabReference( sal_uInt16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo );
public:
ExcelToSc8( const XclImpRoot& rRoot );
@@ -139,13 +139,13 @@ public:
virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen,
const String& rUrl, const ::std::vector<String>& rTabNames );
- static inline BOOL IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 );
+ static inline sal_Bool IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 );
- virtual BOOL GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen );
+ virtual sal_Bool GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen );
};
-inline BOOL ExcelToSc8::IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 )
+inline sal_Bool ExcelToSc8::IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 )
{
return ( nRow1 == 0x0000 ) && ( nRow2 == 0xFFFF );
}
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index 5d3679a73256..65adb65b16e6 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -77,7 +77,7 @@ protected:
void Labelsst( void ); // 0xFD
void Hlink( void ); // 0x01B8
- void Codename( BOOL bWBGlobals ); // 0x01BA
+ void Codename( sal_Bool bWBGlobals ); // 0x01BA
void SheetProtection( void ); // 0x0867
virtual void EndSheet( void );
@@ -98,17 +98,17 @@ private:
ScDBData* pCurrDBData;
ScQueryParam aParam;
SCSIZE nFirstEmpty;
- BOOL bActive;
- BOOL bHasConflict;
- BOOL bCriteria;
- BOOL bAutoOrAdvanced;
+ sal_Bool bActive;
+ sal_Bool bHasConflict;
+ sal_Bool bCriteria;
+ sal_Bool bAutoOrAdvanced;
ScRange aCriteriaRange;
String aFilterName;
void CreateFromDouble( String& rStr, double fVal );
void SetCellAttribs();
void InsertQueryParam();
- void AmendAFName(const BOOL bUseUnNamed);
+ void AmendAFName(const sal_Bool bUseUnNamed);
protected:
public:
@@ -127,12 +127,12 @@ public:
void ReadAutoFilter( XclImpStream& rStrm );
- inline void Activate() { bActive = TRUE; }
+ inline void Activate() { bActive = sal_True; }
void SetAdvancedRange( const ScRange* pRange );
void SetExtractPos( const ScAddress& rAddr );
- inline void SetAutoOrAdvanced() { bAutoOrAdvanced = TRUE; }
- void Apply( const BOOL bUseUnNamed = FALSE );
- void CreateScDBData( const BOOL bUseUnNamed );
+ inline void SetAutoOrAdvanced() { bAutoOrAdvanced = sal_True; }
+ void Apply( const sal_Bool bUseUnNamed = false );
+ void CreateScDBData( const sal_Bool bUseUnNamed );
void EnableRemoveFilter();
};
@@ -142,7 +142,7 @@ class XclImpAutoFilterBuffer : private List
private:
using List::Insert;
- UINT16 nAFActiveCount;
+ sal_uInt16 nAFActiveCount;
inline XclImpAutoFilterData* _First() { return (XclImpAutoFilterData*) List::First(); }
inline XclImpAutoFilterData* _Next() { return (XclImpAutoFilterData*) List::Next(); }
@@ -162,7 +162,7 @@ public:
XclImpAutoFilterData* GetByTab( SCTAB nTab );
inline void IncrementActiveAF() { nAFActiveCount++; }
- inline BOOL UseUnNamed() { return nAFActiveCount == 1; }
+ inline sal_Bool UseUnNamed() { return nAFActiveCount == 1; }
};
#endif
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 7e1ce313c26b..b579b28e782e 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -76,7 +76,7 @@ public:
virtual void Save( XclExpStream& rStrm );
virtual void SaveXml( XclExpXmlStream& rStrm );
- virtual UINT16 GetNum() const = 0;
+ virtual sal_uInt16 GetNum() const = 0;
virtual sal_Size GetLen() const = 0;
protected:
@@ -96,7 +96,7 @@ private:
protected:
public:
virtual void Save( XclExpStream& rStrm );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -116,7 +116,7 @@ public:
inline ExcRecord* Next( void ) { return ( ExcRecord* ) List::Next(); }
inline void Append( ExcRecord* pNew ) { if( pNew ) List::Insert( pNew, LIST_APPEND ); }
- inline const ExcRecord* Get( UINT32 nNum ) const { return ( ExcRecord* ) List::GetObject( nNum ); }
+ inline const ExcRecord* Get( sal_uInt32 nNum ) const { return ( ExcRecord* ) List::GetObject( nNum ); }
virtual void Save( XclExpStream& rStrm );
};
@@ -129,13 +129,13 @@ class ExcDummyRec : public ExcRecord
protected:
public:
virtual void Save( XclExpStream& rStrm );
- virtual UINT16 GetNum() const;
- virtual const BYTE* GetData() const = 0; // byte data must contain header and body
+ virtual sal_uInt16 GetNum() const;
+ virtual const sal_uInt8* GetData() const = 0; // byte data must contain header and body
};
//------------------------------------------------------- class ExcBoolRecord -
-// stores BOOL as 16bit val ( 0x0000 | 0x0001 )
+// stores sal_Bool as 16bit val ( 0x0000 | 0x0001 )
class ExcBoolRecord : public ExcRecord
{
@@ -143,12 +143,12 @@ private:
virtual void SaveCont( XclExpStream& rStrm );
protected:
- BOOL bVal;
+ sal_Bool bVal;
- inline ExcBoolRecord() : bVal( FALSE ) {}
+ inline ExcBoolRecord() : bVal( false ) {}
public:
- inline ExcBoolRecord( const BOOL bDefault ) : bVal( bDefault ) {}
+ inline ExcBoolRecord( const sal_Bool bDefault ) : bVal( bDefault ) {}
virtual sal_Size GetLen( void ) const;
};
@@ -160,10 +160,10 @@ class ExcBof_Base : public ExcRecord
{
private:
protected:
- UINT16 nDocType;
- UINT16 nVers;
- UINT16 nRupBuild;
- UINT16 nRupYear;
+ sal_uInt16 nDocType;
+ sal_uInt16 nVers;
+ sal_uInt16 nRupBuild;
+ sal_uInt16 nRupYear;
public:
ExcBof_Base( void );
};
@@ -179,7 +179,7 @@ private:
public:
ExcBof( void );
- virtual UINT16 GetNum( void ) const;
+ virtual sal_uInt16 GetNum( void ) const;
virtual sal_Size GetLen( void ) const;
};
@@ -194,7 +194,7 @@ private:
public:
ExcBofW( void );
- virtual UINT16 GetNum( void ) const;
+ virtual sal_uInt16 GetNum( void ) const;
virtual sal_Size GetLen( void ) const;
};
@@ -205,7 +205,7 @@ class ExcEof : public ExcRecord
{
private:
public:
- virtual UINT16 GetNum( void ) const;
+ virtual sal_uInt16 GetNum( void ) const;
virtual sal_Size GetLen( void ) const;
};
@@ -216,11 +216,11 @@ public:
class ExcDummy_00 : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen( void ) const;
- virtual const BYTE* GetData( void ) const;
+ virtual const sal_uInt8* GetData( void ) const;
};
// EXC_ID_WINDOWPROTECTION
@@ -259,11 +259,11 @@ private:
class ExcDummy_040 : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen( void ) const;
- virtual const BYTE* GetData( void ) const;
+ virtual const sal_uInt8* GetData( void ) const;
};
@@ -271,11 +271,11 @@ public:
class ExcDummy_041 : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen( void ) const;
- virtual const BYTE* GetData( void ) const;
+ virtual const sal_uInt8* GetData( void ) const;
};
@@ -285,11 +285,11 @@ class Exc1904 : public ExcBoolRecord
{
public:
Exc1904( ScDocument& rDoc );
- virtual UINT16 GetNum( void ) const;
+ virtual sal_uInt16 GetNum( void ) const;
virtual void SaveXml( XclExpXmlStream& rStrm );
private:
- BOOL bDateCompatibility;
+ sal_Bool bDateCompatibility;
};
@@ -300,7 +300,7 @@ class ExcBundlesheetBase : public ExcRecord
protected:
sal_Size nStrPos;
sal_Size nOwnPos; // Position NACH # und Len
- UINT16 nGrbit;
+ sal_uInt16 nGrbit;
SCTAB nTab;
ExcBundlesheetBase();
@@ -311,7 +311,7 @@ public:
inline void SetStreamPos( sal_Size nNewStrPos ) { nStrPos = nNewStrPos; }
void UpdateStreamPos( XclExpStream& rStrm );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
};
@@ -334,11 +334,11 @@ public:
class ExcDummy_02a : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen( void ) const;
- virtual const BYTE* GetData( void ) const;
+ virtual const sal_uInt8* GetData( void ) const;
};
@@ -400,8 +400,8 @@ private:
class ExcFilterCondition
{
private:
- UINT8 nType;
- UINT8 nOper;
+ sal_uInt8 nType;
+ sal_uInt8 nOper;
double fVal;
XclExpString* pText;
@@ -410,11 +410,11 @@ public:
ExcFilterCondition();
~ExcFilterCondition();
- inline BOOL IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); }
- inline BOOL HasEqual() const { return (nOper == EXC_AFOPER_EQUAL); }
- ULONG GetTextBytes() const;
+ inline sal_Bool IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); }
+ inline sal_Bool HasEqual() const { return (nOper == EXC_AFOPER_EQUAL); }
+ sal_uLong GetTextBytes() const;
- void SetCondition( UINT8 nTp, UINT8 nOp, double fV, String* pT );
+ void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, String* pT );
void Save( XclExpStream& rStrm );
void SaveXml( XclExpXmlStream& rStrm );
@@ -426,25 +426,25 @@ public:
class XclExpAutofilter : public XclExpRecord, protected XclExpRoot
{
private:
- UINT16 nCol;
- UINT16 nFlags;
+ sal_uInt16 nCol;
+ sal_uInt16 nFlags;
ExcFilterCondition aCond[ 2 ];
- BOOL AddCondition( ScQueryConnect eConn, UINT8 nType,
- UINT8 nOp, double fVal, String* pText,
- BOOL bSimple = FALSE );
+ sal_Bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType,
+ sal_uInt8 nOp, double fVal, String* pText,
+ sal_Bool bSimple = false );
virtual void WriteBody( XclExpStream& rStrm );
protected:
public:
- XclExpAutofilter( const XclExpRoot& rRoot, UINT16 nC );
+ XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC );
- inline UINT16 GetCol() const { return nCol; }
- inline BOOL HasCondition() const { return !aCond[ 0 ].IsEmpty(); }
- inline BOOL HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); }
+ inline sal_uInt16 GetCol() const { return nCol; }
+ inline sal_Bool HasCondition() const { return !aCond[ 0 ].IsEmpty(); }
+ inline sal_Bool HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); }
- BOOL AddEntry( const ScQueryEntry& rEntry );
+ sal_Bool AddEntry( const ScQueryEntry& rEntry );
virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -466,7 +466,7 @@ public:
private:
XclExpAutofilter* GetByCol( SCCOL nCol ); // always 0-based
- BOOL IsFiltered( SCCOL nCol );
+ sal_Bool IsFiltered( SCCOL nCol );
private:
typedef XclExpRecordList< XclExpAutofilter > XclExpAutofilterList;
diff --git a/sc/source/filter/inc/excscen.hxx b/sc/source/filter/inc/excscen.hxx
index ccdec2eb143c..b1c671b956e6 100644
--- a/sc/source/filter/inc/excscen.hxx
+++ b/sc/source/filter/inc/excscen.hxx
@@ -44,8 +44,8 @@ class ExcScenarioCell
private:
String aValue;
public:
- const UINT16 nCol;
- const UINT16 nRow;
+ const sal_uInt16 nCol;
+ const sal_uInt16 nRow;
ExcScenarioCell( const UINT16 nC, const UINT16 nR );
@@ -62,7 +62,7 @@ public:
~ExcScenario();
- void Apply( const XclImpRoot& rRoot, const BOOL bLast = FALSE );
+ void Apply( const XclImpRoot& rRoot, const sal_Bool bLast = false );
protected:
diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx
index ff1f1f11bcb5..3dabe04e6070 100644
--- a/sc/source/filter/inc/exp_op.hxx
+++ b/sc/source/filter/inc/exp_op.hxx
@@ -64,7 +64,7 @@ public:
class ExportWK1 : public ExportTyp
{
private:
- BYTE GenFormByte( const ScPatternAttr& );
+ sal_uInt8 GenFormByte( const ScPatternAttr& );
void Bof();
void Eof();
void Calcmode();
@@ -74,10 +74,10 @@ private:
void Dimensions();
void Window1();
void Colw();
- void Blank( const UINT16 nC, const UINT16 nR, const ScPatternAttr& );
- void Number( const UINT16 nC, const UINT16 nR, const double f, const ScPatternAttr& );
- void Label( const UINT16 nC, const UINT16 nR, const String&, const ScPatternAttr& );
- void Formula( const UINT16 nC, const UINT16 nR, const ScFormulaCell*, const ScPatternAttr& );
+ void Blank( const sal_uInt16 nC, const sal_uInt16 nR, const ScPatternAttr& );
+ void Number( const sal_uInt16 nC, const sal_uInt16 nR, const double f, const ScPatternAttr& );
+ void Label( const sal_uInt16 nC, const sal_uInt16 nR, const String&, const ScPatternAttr& );
+ void Formula( const sal_uInt16 nC, const sal_uInt16 nR, const ScFormulaCell*, const ScPatternAttr& );
void Protect();
void Footer();
void Header();
@@ -85,14 +85,14 @@ private:
void Labelfmt();
void Calccount();
void Cursorw12();
- void WKString( const UINT16 nC, const UINT16 nR, const ScFormulaCell*, const ScPatternAttr& );
+ void WKString( const sal_uInt16 nC, const sal_uInt16 nR, const ScFormulaCell*, const ScPatternAttr& );
void Snrange();
void Hidcol();
void Cpi();
public:
- static const USHORT WK1MAXCOL;
- static const USHORT WK1MAXROW;
+ static const sal_uInt16 WK1MAXCOL;
+ static const sal_uInt16 WK1MAXROW;
inline ExportWK1( SvStream& r, ScDocument* p, CharSet e ) :
ExportTyp( r, p, e ) {};
diff --git a/sc/source/filter/inc/expbase.hxx b/sc/source/filter/inc/expbase.hxx
index 807d83d02e4e..fe840674383a 100644
--- a/sc/source/filter/inc/expbase.hxx
+++ b/sc/source/filter/inc/expbase.hxx
@@ -60,19 +60,19 @@ public:
virtual ~ScExportBase();
// Hidden Cols/Rows an den Raendern trimmen,
- // return: TRUE wenn Bereich vorhanden
+ // return: sal_True wenn Bereich vorhanden
// Start/End/Col/Row muessen gueltige Ausgangswerte sein
- BOOL TrimDataArea( SCTAB nTab, SCCOL& nStartCol,
+ sal_Bool TrimDataArea( SCTAB nTab, SCCOL& nStartCol,
SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const;
// Ausgabebereich einer Tabelle ermitteln,
// Hidden Cols/Rows an den Raendern beruecksichtigt,
- // return: TRUE wenn Bereich vorhanden
- BOOL GetDataArea( SCTAB nTab, SCCOL& nStartCol,
+ // return: sal_True wenn Bereich vorhanden
+ sal_Bool GetDataArea( SCTAB nTab, SCCOL& nStartCol,
SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const;
// Tabelle nicht vorhanden oder leer
- BOOL IsEmptyTable( SCTAB nTab ) const;
+ sal_Bool IsEmptyTable( SCTAB nTab ) const;
ScFieldEditEngine& GetEditEngine() const;
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index 9f091bb7c6cd..36b8c873f213 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -34,6 +34,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
#include <tools/color.hxx>
#include <comphelper/types.hxx>
#include "ftools.hxx"
@@ -101,9 +102,9 @@ public:
const ::rtl::OUString& rServiceName,
const UnoAnySequence& rArgs );
- /** Opens a password dialog and returns the entered password.
- @return The entered password or an empty string on 'Cancel' or any error. */
- static String QueryPasswordForMedium( SfxMedium& rMedium,
+ /** Opens a password dialog and returns the encryption data.
+ @return The encryption data or an empty sequence on 'Cancel' or any error. */
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > QueryEncryptionDataForMedium( SfxMedium& rMedium,
::comphelper::IDocPasswordVerifier& rVerifier,
const ::std::vector< ::rtl::OUString >* pDefaultPasswords = 0 );
};
diff --git a/sc/source/filter/inc/filt_pch.hxx b/sc/source/filter/inc/filt_pch.hxx
index 481413f39300..2943677712bd 100644
--- a/sc/source/filter/inc/filt_pch.hxx
+++ b/sc/source/filter/inc/filt_pch.hxx
@@ -122,7 +122,7 @@
#include <tools/fract.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/mapmod.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include <vcl/region.hxx>
#include <svl/lstner.hxx>
#include <patattr.hxx>
@@ -174,7 +174,7 @@
#include <vcl/window.hxx>
#include <vcl/pointr.hxx>
#include <vcl/ptrstyle.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/inputctx.hxx>
#include <vcl/event.hxx>
#include <tools/ownlist.hxx>
@@ -244,7 +244,7 @@
#include <vcl/menu.hxx>
#include <vcl/combobox.hxx>
#include <vcl/combobox.h>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrame.hdl>
#include <com/sun/star/awt/XWindow.hpp>
diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx
index 72984e77bf58..9cf88b17ac26 100644
--- a/sc/source/filter/inc/formel.hxx
+++ b/sc/source/filter/inc/formel.hxx
@@ -69,7 +69,7 @@ class _ScRangeListTabs
iterator iterCur;
};
- BOOL bHasRanges;
+ sal_Bool bHasRanges;
_ScRangeList** ppTabLists;
_ScRangeList* pAct;
UINT16 nAct;
@@ -80,8 +80,8 @@ public:
~_ScRangeListTabs();
- void Append( ScSingleRefData aSRD, SCsTAB nTab, const BOOL bLimit = TRUE );
- void Append( ScComplexRefData aCRD, SCsTAB nTab, const BOOL bLimit = TRUE );
+ void Append( ScSingleRefData aSRD, SCsTAB nTab, const sal_Bool bLimit = true );
+ void Append( ScComplexRefData aCRD, SCsTAB nTab, const sal_Bool bLimit = true );
const ScRange* First ( const UINT16 nTab = 0 );
const ScRange* Next ();
@@ -99,9 +99,9 @@ protected:
ScAddress aEingPos;
ConvErr eStatus;
sal_Char* pBuffer; // Universal-Puffer
- UINT16 nBufferSize; // ...und seine Groesse
+ sal_uInt16 nBufferSize; // ...und seine Groesse
- ConverterBase( UINT16 nNewBuffer );
+ ConverterBase( sal_uInt16 nNewBuffer );
virtual ~ConverterBase();
void Reset();
@@ -118,7 +118,7 @@ public:
class ExcelConverterBase : public ConverterBase
{
protected:
- ExcelConverterBase( UINT16 nNewBuffer );
+ ExcelConverterBase( sal_uInt16 nNewBuffer );
virtual ~ExcelConverterBase();
public:
@@ -137,23 +137,23 @@ class LotusConverterBase : public ConverterBase
{
protected:
SvStream& aIn;
- INT32 nBytesLeft;
+ sal_Int32 nBytesLeft;
inline void Ignore( const long nSeekRel );
inline void Read( sal_Char& nByte );
- inline void Read( BYTE& nByte );
- inline void Read( UINT16& nUINT16 );
- inline void Read( INT16& nINT16 );
+ inline void Read( sal_uInt8& nByte );
+ inline void Read( sal_uInt16& nUINT16 );
+ inline void Read( sal_Int16& nINT16 );
inline void Read( double& fDouble );
- inline void Read( UINT32& nUINT32 );
+ inline void Read( sal_uInt32& nUINT32 );
- LotusConverterBase( SvStream& rStr, UINT16 nNewBuffer );
+ LotusConverterBase( SvStream& rStr, sal_uInt16 nNewBuffer );
virtual ~LotusConverterBase();
public:
void Reset( const ScAddress& rEingPos );
- virtual ConvErr Convert( const ScTokenArray*& rpErg, INT32& nRest,
+ virtual ConvErr Convert( const ScTokenArray*& rpErg, sal_Int32& nRest,
const FORMULA_TYPE eFT = FT_CellFormula ) = 0;
protected:
@@ -173,19 +173,19 @@ inline void LotusConverterBase::Read( sal_Char& nByte )
nBytesLeft--;
}
-inline void LotusConverterBase::Read( BYTE& nByte )
+inline void LotusConverterBase::Read( sal_uInt8& nByte )
{
aIn >> nByte;
nBytesLeft--;
}
-inline void LotusConverterBase::Read( UINT16& nUINT16 )
+inline void LotusConverterBase::Read( sal_uInt16& nUINT16 )
{
aIn >> nUINT16;
nBytesLeft -= 2;
}
-inline void LotusConverterBase::Read( INT16& nINT16 )
+inline void LotusConverterBase::Read( sal_Int16& nINT16 )
{
aIn >> nINT16;
nBytesLeft -= 2;
@@ -197,7 +197,7 @@ inline void LotusConverterBase::Read( double& fDouble )
nBytesLeft -= 8;
}
-inline void LotusConverterBase::Read( UINT32& nUINT32 )
+inline void LotusConverterBase::Read( sal_uInt32& nUINT32 )
{
aIn >> nUINT32;
nBytesLeft -= 4;
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index 3828327f3b92..cfcd872eff89 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -117,7 +117,7 @@ class ScfProgressBar : private boost::noncopyable
{
public:
explicit ScfProgressBar( SfxObjectShell* pDocShell, const String& rText );
- explicit ScfProgressBar( SfxObjectShell* pDocShell, USHORT nResId );
+ explicit ScfProgressBar( SfxObjectShell* pDocShell, sal_uInt16 nResId );
virtual ~ScfProgressBar();
/** Adds a new segment to the progress bar.
@@ -202,7 +202,7 @@ class ScfSimpleProgressBar
{
public:
explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const String& rText );
- explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, USHORT nResId );
+ explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId );
/** Set progress bar to the specified position. */
inline void ProgressAbs( sal_Size nPos ) { maProgress.ProgressAbs( nPos ); }
@@ -223,7 +223,7 @@ private:
class ScfStreamProgressBar
{
public:
- explicit ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, USHORT nResId = STR_LOAD_DOC );
+ explicit ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, sal_uInt16 nResId = STR_LOAD_DOC );
/** Sets the progress bar to the current stream position. */
void Progress();
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index b9c32095fe56..cf15e543e0ee 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -193,11 +193,11 @@ public:
/** Returns true, if the passed item set contains the item.
@param bDeep true = Searches in parent item sets too. */
- static bool CheckItem( const SfxItemSet& rItemSet, USHORT nWhichId, bool bDeep );
+ static bool CheckItem( const SfxItemSet& rItemSet, sal_uInt16 nWhichId, bool bDeep );
/** Returns true, if the passed item set contains at least one of the items.
@param pnWhichIds Zero-terminated array of Which-IDs.
@param bDeep true = Searches in parent item sets too. */
- static bool CheckItems( const SfxItemSet& rItemSet, const USHORT* pnWhichIds, bool bDeep );
+ static bool CheckItems( const SfxItemSet& rItemSet, const sal_uInt16* pnWhichIds, bool bDeep );
/** Puts the item into the passed item set.
@descr The item will be put into the item set, if bSkipPoolDef is false,
@@ -208,7 +208,7 @@ public:
@param bSkipPoolDef true = Do not put item if it is equal to pool default; false = Always put the item. */
static void PutItem(
SfxItemSet& rItemSet, const SfxPoolItem& rItem,
- USHORT nWhichId, bool bSkipPoolDef );
+ sal_uInt16 nWhichId, bool bSkipPoolDef );
/** Puts the item into the passed item set.
@descr The item will be put into the item set, if bSkipPoolDef is false,
@@ -310,14 +310,14 @@ class ScFormatFilterPluginImpl : public ScFormatFilterPlugin {
// eFormat == EIF_BIFF_LE4 -> nur Nicht-Storage-Dateien _koennen_ zum Erfolg fuehren
virtual FltError ScImportStarCalc10( SvStream&, ScDocument* );
virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos,
- const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, UINT32 nDifOption = SC_DIFOPT_EXCEL );
+ const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL );
virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange );
virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange,
- double nOutputFactor = 1.0, BOOL bCalcWidthHeight = TRUE,
+ double nOutputFactor = 1.0, sal_Bool bCalcWidthHeight = true,
SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true );
virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange );
- virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight );
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight );
virtual String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName );
// various export filters
@@ -326,10 +326,10 @@ class ScFormatFilterPluginImpl : public ScFormatFilterPlugin {
#endif
virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, CharSet eDest );
virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const CharSet eDest,
- UINT32 nDifOption = SC_DIFOPT_EXCEL );
+ sal_uInt32 nDifOption = SC_DIFOPT_EXCEL );
virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest,
- UINT32 nDifOption = SC_DIFOPT_EXCEL );
- virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, BOOL bAll,
+ sal_uInt32 nDifOption = SC_DIFOPT_EXCEL );
+ virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, sal_Bool bAll,
const String& rStreamPath, String& rNonConvertibleChars );
virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest );
};
diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx
index e4392944abdc..705d118178cf 100644
--- a/sc/source/filter/inc/htmlexp.hxx
+++ b/sc/source/filter/inc/htmlexp.hxx
@@ -53,10 +53,10 @@ struct ScHTMLStyle
{ // Defaults aus StyleSheet
Color aBackgroundColor;
String aFontFamilyName;
- UINT32 nFontHeight; // Item-Value
- USHORT nFontSizeNumber; // HTML value 1-7
- BYTE nDefaultScriptType; // Font values are valid for the default script type
- BOOL bInitialized;
+ sal_uInt32 nFontHeight; // Item-Value
+ sal_uInt16 nFontSizeNumber; // HTML value 1-7
+ sal_uInt8 nDefaultScriptType; // Font values are valid for the default script type
+ sal_Bool bInitialized;
ScHTMLStyle() : nFontHeight(0), nFontSizeNumber(2), nDefaultScriptType(0),
bInitialized(0) {}
@@ -79,13 +79,13 @@ struct ScHTMLGraphEntry
Size aSize; // Groesse in Pixeln
Size aSpace; // Spacing in Pixeln
SdrObject* pObject;
- BOOL bInCell; // ob in Zelle ausgegeben wird
- BOOL bWritten;
+ sal_Bool bInCell; // ob in Zelle ausgegeben wird
+ sal_Bool bWritten;
ScHTMLGraphEntry( SdrObject* pObj, const ScRange& rRange,
- const Size& rSize, BOOL bIn, const Size& rSpace ) :
+ const Size& rSize, sal_Bool bIn, const Size& rSpace ) :
aRange( rRange ), aSize( rSize ), aSpace( rSpace ),
- pObject( pObj ), bInCell( bIn ), bWritten( FALSE ) {}
+ pObject( pObj ), bInCell( bIn ), bWritten( false ) {}
};
@@ -95,11 +95,11 @@ const short nIndentMax = 23;
class ScHTMLExport : public ScExportBase
{
// default HtmlFontSz[1-7]
- static const USHORT nDefaultFontSize[SC_HTML_FONTSIZES];
+ static const sal_uInt16 nDefaultFontSize[SC_HTML_FONTSIZES];
// HtmlFontSz[1-7] in s*3.ini [user]
- static USHORT nFontSize[SC_HTML_FONTSIZES];
+ static sal_uInt16 nFontSize[SC_HTML_FONTSIZES];
static const char* pFontSizeCss[SC_HTML_FONTSIZES];
- static const USHORT nCellSpacing;
+ static const sal_uInt16 nCellSpacing;
static const sal_Char sIndentSource[];
boost::ptr_vector< ScHTMLGraphEntry > aGraphList;
@@ -115,13 +115,13 @@ class ScHTMLExport : public ScExportBase
SCTAB nUsedTables;
short nIndent;
sal_Char sIndent[nIndentMax+1];
- BOOL bAll; // ganzes Dokument
- BOOL bTabHasGraphics;
- BOOL bTabAlignedLeft;
- BOOL bCalcAsShown;
- BOOL bCopyLocalFileToINet;
- BOOL bTableDataWidth;
- BOOL bTableDataHeight;
+ sal_Bool bAll; // ganzes Dokument
+ sal_Bool bTabHasGraphics;
+ sal_Bool bTabAlignedLeft;
+ sal_Bool bCalcAsShown;
+ sal_Bool bCopyLocalFileToINet;
+ sal_Bool bTableDataWidth;
+ sal_Bool bTableDataHeight;
const SfxItemSet& PageDefaults( SCTAB nTab );
@@ -133,16 +133,16 @@ class ScHTMLExport : public ScExportBase
void WriteGraphEntry( ScHTMLGraphEntry* );
void WriteImage( String& rLinkName,
const Graphic&, const ByteString& rImgOptions,
- ULONG nXOutFlags = 0 );
+ sal_uLong nXOutFlags = 0 );
// nXOutFlags fuer XOutBitmap::WriteGraphic
// write to stream if and only if URL fields in edit cell
- BOOL WriteFieldText( const ScEditCell* pCell );
+ sal_Bool WriteFieldText( const ScEditCell* pCell );
// kopiere ggfs. eine lokale Datei ins Internet
- BOOL CopyLocalFileToINet( String& rFileNm,
- const String& rTargetNm, BOOL bFileToFile = FALSE );
- BOOL HasCId() { return aCId.Len() > 0; }
+ sal_Bool CopyLocalFileToINet( String& rFileNm,
+ const String& rTargetNm, sal_Bool bFileToFile = false );
+ sal_Bool HasCId() { return aCId.Len() > 0; }
void MakeCIdURL( String& rURL );
void PrepareGraphics( ScDrawLayer*, SCTAB nTab,
@@ -155,18 +155,18 @@ class ScHTMLExport : public ScExportBase
void BorderToStyle( ByteString& rOut, const char* pBorderName,
const SvxBorderLine* pLine, bool& bInsertSemicolon );
- USHORT GetFontSizeNumber( USHORT nHeight );
- const char* GetFontSizeCss( USHORT nHeight );
- USHORT ToPixel( USHORT nTwips );
+ sal_uInt16 GetFontSizeNumber( sal_uInt16 nHeight );
+ const char* GetFontSizeCss( sal_uInt16 nHeight );
+ sal_uInt16 ToPixel( sal_uInt16 nTwips );
Size MMToPixel( const Size& r100thMMSize );
void IncIndent( short nVal );
const sal_Char* GetIndentStr() { return sIndent; }
public:
ScHTMLExport( SvStream&, const String&, ScDocument*, const ScRange&,
- BOOL bAll, const String& aStreamPath );
+ sal_Bool bAll, const String& aStreamPath );
virtual ~ScHTMLExport();
- ULONG Write();
+ sal_uLong Write();
const String& GetNonConvertibleChars() const
{ return aNonConvertibleChars; }
};
diff --git a/sc/source/filter/inc/htmlimp.hxx b/sc/source/filter/inc/htmlimp.hxx
index 31c2dd0dbd2b..c79bf6d4f1e2 100644
--- a/sc/source/filter/inc/htmlimp.hxx
+++ b/sc/source/filter/inc/htmlimp.hxx
@@ -39,11 +39,11 @@ private:
static void InsertRangeName( ScDocument* pDoc, const String& rName, const ScRange& rRange );
public:
- ScHTMLImport( ScDocument* pDoc, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight = TRUE );
+ ScHTMLImport( ScDocument* pDoc, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight = sal_True );
virtual ~ScHTMLImport();
const ScHTMLParser* GetParser() const { return (ScHTMLParser*)mpParser; }
- virtual void WriteToDocument( BOOL bSizeColsRows = FALSE, double nOutputFactor = 1.0,
+ virtual void WriteToDocument( sal_Bool bSizeColsRows = false, double nOutputFactor = 1.0,
SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true );
static String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName );
diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx
index 84b0b04dcd2f..5548338e82f3 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -42,8 +42,8 @@
const sal_uInt32 SC_HTML_FONTSIZES = 7; // wie Export, HTML-Options
// Pixel tolerance for SeekOffset and related.
-const USHORT SC_HTML_OFFSET_TOLERANCE_SMALL = 1; // single table
-const USHORT SC_HTML_OFFSET_TOLERANCE_LARGE = 10; // nested
+const sal_uInt16 SC_HTML_OFFSET_TOLERANCE_SMALL = 1; // single table
+const sal_uInt16 SC_HTML_OFFSET_TOLERANCE_LARGE = 10; // nested
// ============================================================================
// BASE class for HTML parser classes
@@ -62,7 +62,7 @@ public:
explicit ScHTMLParser( EditEngine* pEditEngine, ScDocument* pDoc );
virtual ~ScHTMLParser();
- virtual ULONG Read( SvStream& rStrm, const String& rBaseURL ) = 0;
+ virtual sal_uLong Read( SvStream& rStrm, const String& rBaseURL ) = 0;
/** Returns the "global table" which contains the entire HTML document. */
virtual const ScHTMLTable* GetGlobalTable() const = 0;
@@ -71,30 +71,30 @@ public:
// ============================================================================
-SV_DECL_VARARR_SORT( ScHTMLColOffset, ULONG, 16, 4)
+SV_DECL_VARARR_SORT( ScHTMLColOffset, sal_uLong, 16, 4)
struct ScHTMLTableStackEntry
{
ScRangeListRef xLockedList;
ScEEParseEntry* pCellEntry;
ScHTMLColOffset* pLocalColOffset;
- ULONG nFirstTableCell;
+ sal_uLong nFirstTableCell;
SCCOL nColCnt;
SCROW nRowCnt;
SCCOL nColCntStart;
SCCOL nMaxCol;
- USHORT nTable;
- USHORT nTableWidth;
- USHORT nColOffset;
- USHORT nColOffsetStart;
- BOOL bFirstRow;
+ sal_uInt16 nTable;
+ sal_uInt16 nTableWidth;
+ sal_uInt16 nColOffset;
+ sal_uInt16 nColOffsetStart;
+ sal_Bool bFirstRow;
ScHTMLTableStackEntry( ScEEParseEntry* pE,
const ScRangeListRef& rL, ScHTMLColOffset* pTO,
- ULONG nFTC,
+ sal_uLong nFTC,
SCCOL nCol, SCROW nRow,
- SCCOL nStart, SCCOL nMax, USHORT nTab,
- USHORT nTW, USHORT nCO, USHORT nCOS,
- BOOL bFR )
+ SCCOL nStart, SCCOL nMax, sal_uInt16 nTab,
+ sal_uInt16 nTW, sal_uInt16 nCO, sal_uInt16 nCOS,
+ sal_Bool bFR )
: xLockedList( rL ), pCellEntry( pE ),
pLocalColOffset( pTO ),
nFirstTableCell( nFTC ),
@@ -139,23 +139,23 @@ private:
Table* pTables;
ScHTMLColOffset* pColOffset;
ScHTMLColOffset* pLocalColOffset; // je Table
- ULONG nFirstTableCell; // je Table
+ sal_uLong nFirstTableCell; // je Table
short nTableLevel;
- USHORT nTable;
- USHORT nMaxTable;
+ sal_uInt16 nTable;
+ sal_uInt16 nMaxTable;
SCCOL nColCntStart; // erste Col je Table
SCCOL nMaxCol; // je Table
- USHORT nTableWidth; // je Table
- USHORT nColOffset; // aktuell, Pixel
- USHORT nColOffsetStart; // Startwert je Table, in Pixel
- USHORT nMetaCnt; // fuer ParseMetaOptions
- USHORT nOffsetTolerance; // for use with SeekOffset and related
- BOOL bCalcWidthHeight; // TRUE: calculate real column width
+ sal_uInt16 nTableWidth; // je Table
+ sal_uInt16 nColOffset; // aktuell, Pixel
+ sal_uInt16 nColOffsetStart; // Startwert je Table, in Pixel
+ sal_uInt16 nMetaCnt; // fuer ParseMetaOptions
+ sal_uInt16 nOffsetTolerance; // for use with SeekOffset and related
+ sal_Bool bCalcWidthHeight; // TRUE: calculate real column width
// FALSE: 1 html-col = 1 sc-col
- BOOL bTabInTabCell;
- BOOL bFirstRow; // je Table, ob in erster Zeile
- BOOL bInCell;
- BOOL bInTitle;
+ sal_Bool bTabInTabCell;
+ sal_Bool bFirstRow; // je Table, ob in erster Zeile
+ sal_Bool bInCell;
+ sal_Bool bInTitle;
DECL_LINK( HTMLImportHdl, ImportInfo* );
void NewActEntry( ScEEParseEntry* );
@@ -163,24 +163,24 @@ private:
void ProcToken( ImportInfo* );
void CloseEntry( ImportInfo* );
void NextRow( ImportInfo* );
- void SkipLocked( ScEEParseEntry*, BOOL bJoin = TRUE );
- static BOOL SeekOffset( ScHTMLColOffset*, USHORT nOffset,
- SCCOL* pCol, USHORT nOffsetTol );
- static void MakeCol( ScHTMLColOffset*, USHORT& nOffset,
- USHORT& nWidth, USHORT nOffsetTol,
- USHORT nWidthTol );
- static void MakeColNoRef( ScHTMLColOffset*, USHORT nOffset,
- USHORT nWidth, USHORT nOffsetTol,
- USHORT nWidthTol );
- static void ModifyOffset( ScHTMLColOffset*, USHORT& nOldOffset,
- USHORT& nNewOffset, USHORT nOffsetTol );
+ void SkipLocked( ScEEParseEntry*, sal_Bool bJoin = sal_True );
+ static sal_Bool SeekOffset( ScHTMLColOffset*, sal_uInt16 nOffset,
+ SCCOL* pCol, sal_uInt16 nOffsetTol );
+ static void MakeCol( ScHTMLColOffset*, sal_uInt16& nOffset,
+ sal_uInt16& nWidth, sal_uInt16 nOffsetTol,
+ sal_uInt16 nWidthTol );
+ static void MakeColNoRef( ScHTMLColOffset*, sal_uInt16 nOffset,
+ sal_uInt16 nWidth, sal_uInt16 nOffsetTol,
+ sal_uInt16 nWidthTol );
+ static void ModifyOffset( ScHTMLColOffset*, sal_uInt16& nOldOffset,
+ sal_uInt16& nNewOffset, sal_uInt16 nOffsetTol );
void Colonize( ScEEParseEntry* );
- USHORT GetWidth( ScEEParseEntry* );
+ sal_uInt16 GetWidth( ScEEParseEntry* );
void SetWidths();
void Adjust();
- USHORT GetWidthPixel( const HTMLOption* );
- BOOL IsAtBeginningOfText( ImportInfo* );
+ sal_uInt16 GetWidthPixel( const HTMLOption* );
+ sal_Bool IsAtBeginningOfText( ImportInfo* );
void TableOn( ImportInfo* );
void ColOn( ImportInfo* );
@@ -196,7 +196,7 @@ private:
public:
ScHTMLLayoutParser( EditEngine*, const String& rBaseURL, const Size& aPageSize, ScDocument* );
virtual ~ScHTMLLayoutParser();
- virtual ULONG Read( SvStream&, const String& rBaseURL );
+ virtual sal_uLong Read( SvStream&, const String& rBaseURL );
virtual const ScHTMLTable* GetGlobalTable() const;
};
@@ -588,7 +588,7 @@ public:
explicit ScHTMLQueryParser( EditEngine* pEditEngine, ScDocument* pDoc );
virtual ~ScHTMLQueryParser();
- virtual ULONG Read( SvStream& rStrm, const String& rBaseURL );
+ virtual sal_uLong Read( SvStream& rStrm, const String& rBaseURL );
/** Returns the "global table" which contains the entire HTML document. */
virtual const ScHTMLTable* GetGlobalTable() const;
diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx
index cad73ce95517..57a3374762a1 100644
--- a/sc/source/filter/inc/imp_op.hxx
+++ b/sc/source/filter/inc/imp_op.hxx
@@ -113,12 +113,12 @@ protected:
XclImpOutlineListBuffer* pOutlineListBuffer;
sal_Int16 mnLastRefIdx;
- UINT16 nIxfeIndex; // merkt sich Angabe im IXFE-Record
- UINT16 nLastXF; // letzter XF in Formula-Record
+ sal_uInt16 nIxfeIndex; // merkt sich Angabe im IXFE-Record
+ sal_uInt16 nLastXF; // letzter XF in Formula-Record
SCTAB nBdshtTab; // Counter fuer Boundsheet
ScFormulaCell* pLastFormCell; // fuer String-Records
- BOOL bTabTruncated; // wenn Bereichsueberschreitung zum
+ sal_Bool bTabTruncated; // wenn Bereichsueberschreitung zum
// Abschneiden von Zellen fuehrt
// Record-Funktionen
@@ -185,12 +185,12 @@ protected:
// ---------------------------------------------------------------
void Formula( const XclAddress& rXclPos,
- UINT16 nXF, UINT16 nFormLen, double &rCurVal, BOOL bShrFmla );
+ sal_uInt16 nXF, sal_uInt16 nFormLen, double &rCurVal, sal_Bool bShrFmla );
// -> excform.cxx
virtual void EndSheet( void );
void NeueTabelle( void );
- const ScTokenArray* ErrorToFormula( BYTE bErrOrVal, BYTE nError,
+ const ScTokenArray* ErrorToFormula( sal_uInt8 bErrOrVal, sal_uInt8 nError,
double& rVal );
virtual void AdjustRowHeight();
diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx
index 5fdcc8a6ecb9..eecd4c11916f 100644
--- a/sc/source/filter/inc/lotattr.hxx
+++ b/sc/source/filter/inc/lotattr.hxx
@@ -80,7 +80,7 @@ private:
struct ENTRY
{
ScPatternAttr* pPattAttr;
- UINT32 nHash0;
+ sal_uInt32 nHash0;
ENTRY (const ScPatternAttr &r);
@@ -90,10 +90,10 @@ private:
inline bool operator == (const ENTRY &r) const { return nHash0 == r.nHash0; }
- inline bool operator == (const UINT32 &r) const { return nHash0 == r; }
+ inline bool operator == (const sal_uInt32 &r) const { return nHash0 == r; }
};
- inline static void MakeHash( const LotAttrWK3& rAttr, UINT32& rOut )
+ inline static void MakeHash( const LotAttrWK3& rAttr, sal_uInt32& rOut )
{
( ( UINT8* ) &rOut )[ 0 ] = rAttr.nFont & 0x7F;
( ( UINT8* ) &rOut )[ 1 ] = rAttr.nLineStyle;
@@ -122,7 +122,7 @@ public:
void SetAttr (const SCROW nRow, const ScPatternAttr&);
- void Apply (const SCCOL nCol, const SCTAB nTab, const BOOL bClear = TRUE);
+ void Apply (const SCCOL nCol, const SCTAB nTab, const sal_Bool bClear = true);
void Clear ();
diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx
index 0cbdda762bc4..cb90efc3fc3d 100644
--- a/sc/source/filter/inc/lotfntbf.hxx
+++ b/sc/source/filter/inc/lotfntbf.hxx
@@ -49,7 +49,7 @@ private:
SvxFontItem* pFont;
SvxFontHeightItem* pHeight;
SvxColorItem* pColor;
- INT32 nType; // < 0 -> undefiniert
+ sal_Int32 nType; // < 0 -> undefiniert
inline ENTRY( void )
{
pTmpName = NULL;
@@ -94,17 +94,17 @@ private:
delete pColor;
pColor = &rNew;
}
- inline void Type( const UINT16 nNew ) { nType = nNew; }
+ inline void Type( const sal_uInt16 nNew ) { nType = nNew; }
};
ENTRY pData[ 8 ];
- const static UINT16 nSize;
+ const static sal_uInt16 nSize;
void MakeFont( ENTRY* pEntry );
public:
- void Fill( const UINT8 nIndex, SfxItemSet& rItemSet );
- void SetName( const UINT16 nIndex, const String& rName );
- void SetHeight( const UINT16 nIndex, const UINT16 nHeight );
- void SetType( const UINT16 nIndex, const UINT16 nType );
+ void Fill( const sal_uInt8 nIndex, SfxItemSet& rItemSet );
+ void SetName( const sal_uInt16 nIndex, const String& rName );
+ void SetHeight( const sal_uInt16 nIndex, const sal_uInt16 nHeight );
+ void SetType( const sal_uInt16 nIndex, const sal_uInt16 nType );
};
diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx
index b9fac939192e..9d23abfaf887 100644
--- a/sc/source/filter/inc/lotform.hxx
+++ b/sc/source/filter/inc/lotform.hxx
@@ -79,18 +79,18 @@ private:
TokenId nSubToken; // ~
TokenId n0Token; // '0.0';
// ---------------------------------------------------------------
- static FUNC_TYPE IndexToType( BYTE );
- static DefTokenId IndexToToken( BYTE );
- static FUNC_TYPE IndexToTypeWK123( BYTE );
- static DefTokenId IndexToTokenWK123( BYTE );
- void DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtName );
- void LotusRelToScRel( UINT16 nCol, UINT16 nRow,
+ static FUNC_TYPE IndexToType( sal_uInt8 );
+ static DefTokenId IndexToToken( sal_uInt8 );
+ static FUNC_TYPE IndexToTypeWK123( sal_uInt8 );
+ static DefTokenId IndexToTokenWK123( sal_uInt8 );
+ void DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtName );
+ void LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow,
ScSingleRefData& rSRD );
- BOOL bWK3; // alternative Codeumsetzung statt fuer < WK1
- BOOL bWK123; // alternative for 123
+ sal_Bool bWK3; // alternative Codeumsetzung statt fuer < WK1
+ sal_Bool bWK123; // alternative for 123
// -------------------------------------------------------------------
- void ReadSRD( ScSingleRefData& rSRD, BYTE nFlags );
- inline void ReadCRD( ScComplexRefData& rCRD, BYTE nFlags );
+ void ReadSRD( ScSingleRefData& rSRD, sal_uInt8 nFlags );
+ inline void ReadCRD( ScComplexRefData& rCRD, sal_uInt8 nFlags );
void IncToken( TokenId &rParam );
// ACHTUNG: hier wird die aktuelle Token-Kette im Pool
// mit '(<rParam>)+1' fortgeschrieben und mit
@@ -100,8 +100,8 @@ private:
void NegToken( TokenId& rParam );
// ACHTUNG: wie ~, nur wird '-(<rParam>)' gebildet
public:
- LotusToSc( SvStream& aStr, CharSet eSrc, BOOL b );
- virtual ConvErr Convert( const ScTokenArray*& rpErg, INT32& nRest,
+ LotusToSc( SvStream& aStr, CharSet eSrc, sal_Bool b );
+ virtual ConvErr Convert( const ScTokenArray*& rpErg, sal_Int32& nRest,
const FORMULA_TYPE eFT = FT_CellFormula );
void Reset( const ScAddress& rEingPos );
@@ -112,7 +112,7 @@ private:
};
-inline void LotusToSc::ReadCRD( ScComplexRefData& rCRD, BYTE nRelBit )
+inline void LotusToSc::ReadCRD( ScComplexRefData& rCRD, sal_uInt8 nRelBit )
{
// erster Teil
ReadSRD( rCRD.Ref1, nRelBit );
@@ -124,7 +124,7 @@ inline void LotusToSc::ReadCRD( ScComplexRefData& rCRD, BYTE nRelBit )
inline void LotusToSc::SetWK3( void )
{
- bWK3 = TRUE;
+ bWK3 = sal_True;
}
diff --git a/sc/source/filter/inc/lotimpop.hxx b/sc/source/filter/inc/lotimpop.hxx
index 09efab80320a..8856f45cb4a9 100644
--- a/sc/source/filter/inc/lotimpop.hxx
+++ b/sc/source/filter/inc/lotimpop.hxx
@@ -48,45 +48,45 @@ private:
SvStream* pIn; // benoetigt wegen multiplem Read()!
LotusFontBuffer* pFontBuff;
LotusToSc aConv;
- UINT16 nTab; // z.Zt. bearbeitete Tabelle
- INT32 nExtTab;
+ sal_uInt16 nTab; // z.Zt. bearbeitete Tabelle
+ sal_Int32 nExtTab;
// -------------------------------------------------------------------
// in WK?-Datei
void Bof( void ); // 0x0000 00
- BOOL BofFm3( void ); // 0x0000 00
- void Columnwidth( UINT16 nRecLen ); // 0x0007 07
- void Hiddencolumn( UINT16 nRecLen ); // 0x0008 08
+ sal_Bool BofFm3( void ); // 0x0000 00
+ void Columnwidth( sal_uInt16 nRecLen ); // 0x0007 07
+ void Hiddencolumn( sal_uInt16 nRecLen ); // 0x0008 08
void Userrange( void ); // 0x0009 09
void Errcell( void ); // 0x0014 20
void Nacell( void ); // 0x0015 21
void Labelcell( void ); // 0x0016 22
void Numbercell( void ); // 0x0017 23
void Smallnumcell( void ); // 0x0018 24
- ScFormulaCell* Formulacell( UINT16 nRecLen ); // 0x0019 25
+ ScFormulaCell* Formulacell( sal_uInt16 nRecLen ); // 0x0019 25
void Formulastring( ScFormulaCell& ); // 0x001a 26
// 0x001b 27 special
void NamedSheet( void ); // 14000
- void RowPresentation( UINT16 nRecLen ); // 2007
+ void RowPresentation( sal_uInt16 nRecLen ); // 2007
// -------------------------------------------------------------------
// in FM?-Datei
void Font_Face( void ); // 174
void Font_Type( void ); // 176
void Font_Ysize( void ); // 177
- void _Row( const UINT16 nRecLen ); // 197 ?
+ void _Row( const sal_uInt16 nRecLen ); // 197 ?
// -------------------------------------------------------------------
inline void Read( ScAddress& );
inline void Read( ScRange& );
// fuer Addresses/Ranges im Format Row(16)/Tab(8)/Col(8)
inline void Read( sal_Char& );
- inline void Read( BYTE& );
- inline void Read( UINT16& );
- inline void Read( INT16& );
- inline void Read( UINT32& );
+ inline void Read( sal_uInt8& );
+ inline void Read( sal_uInt16& );
+ inline void Read( sal_Int16& );
+ inline void Read( sal_uInt32& );
inline void Read( double& ); // 10-Byte-IEEE lesen
inline void Read( LotAttrWK3& );
void Read( String& ); // 0-terminierten String einlesen
- inline void Skip( const UINT16 nNumBytes );
+ inline void Skip( const sal_uInt16 nNumBytes );
// -------------------------------------------------------------------
public:
ImportLotus( SvStream&, ScDocument*, CharSet eSrc );
@@ -100,10 +100,10 @@ public:
inline void ImportLotus::Read( ScAddress& rAddr )
{
- UINT16 nRow;
+ sal_uInt16 nRow;
*pIn >> nRow;
rAddr.SetRow( static_cast<SCROW>(nRow) );
- BYTE nByte;
+ sal_uInt8 nByte;
*pIn >> nByte;
rAddr.SetTab( static_cast<SCTAB>(nByte) );
*pIn >> nByte;
@@ -124,25 +124,25 @@ inline void ImportLotus::Read( sal_Char& r )
}
-inline void ImportLotus::Read( BYTE& r )
+inline void ImportLotus::Read( sal_uInt8& r )
{
*pIn >> r;
}
-inline void ImportLotus::Read( UINT16& r )
+inline void ImportLotus::Read( sal_uInt16& r )
{
*pIn >> r;
}
-inline void ImportLotus::Read( INT16& r )
+inline void ImportLotus::Read( sal_Int16& r )
{
*pIn >> r;
}
-inline void ImportLotus::Read( UINT32& r )
+inline void ImportLotus::Read( sal_uInt32& r )
{
*pIn >> r;
}
@@ -160,7 +160,7 @@ inline void ImportLotus::Read( LotAttrWK3& r )
}
-inline void ImportLotus::Skip( const UINT16 n )
+inline void ImportLotus::Skip( const sal_uInt16 n )
{
pIn->SeekRel( n );
}
diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx
index 2f520deff2c9..2456a28f3a8b 100644
--- a/sc/source/filter/inc/lotrange.hxx
+++ b/sc/source/filter/inc/lotrange.hxx
@@ -36,14 +36,14 @@
class LotusRangeList;
-typedef UINT16 LR_ID;
+typedef sal_uInt16 LR_ID;
#define ID_FAIL 0xFFFF
class LotusRange
{
friend class LotusRangeList;
private:
- UINT32 nHash;
+ sal_uInt32 nHash;
SCCOL nColStart;
SCROW nRowStart;
SCCOL nColEnd;
@@ -57,9 +57,9 @@ public:
LotusRange( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE );
LotusRange( const LotusRange& );
inline LotusRange &operator =( const LotusRange& );
- inline BOOL operator ==( const LotusRange& ) const;
- inline BOOL operator !=( const LotusRange& ) const;
- inline BOOL IsSingle( void ) const;
+ inline sal_Bool operator ==( const LotusRange& ) const;
+ inline sal_Bool operator !=( const LotusRange& ) const;
+ inline sal_Bool IsSingle( void ) const;
};
@@ -85,7 +85,7 @@ inline LotusRange &LotusRange::operator =( const LotusRange& rCpy )
}
-inline BOOL LotusRange::operator ==( const LotusRange& rRef ) const
+inline sal_Bool LotusRange::operator ==( const LotusRange& rRef ) const
{
return ( nHash == rRef.nHash && nColStart == rRef.nColStart &&
nRowStart == rRef.nRowStart && nColEnd == rRef.nColEnd &&
@@ -93,7 +93,7 @@ inline BOOL LotusRange::operator ==( const LotusRange& rRef ) const
}
-inline BOOL LotusRange::operator !=( const LotusRange& rRef ) const
+inline sal_Bool LotusRange::operator !=( const LotusRange& rRef ) const
{
return ( nHash != rRef.nHash || nColStart != rRef.nColStart ||
nRowStart != rRef.nRowStart || nColEnd != rRef.nColEnd ||
@@ -101,7 +101,7 @@ inline BOOL LotusRange::operator !=( const LotusRange& rRef ) const
}
-inline BOOL LotusRange::IsSingle( void ) const
+inline sal_Bool LotusRange::IsSingle( void ) const
{
return ( nColStart == nColEnd && nRowStart == nRowEnd );
}
@@ -120,9 +120,9 @@ private:
public:
LotusRangeList( void );
~LotusRangeList( void );
- inline UINT16 GetIndex( SCCOL nCol, SCROW nRow );
- inline UINT16 GetIndex( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE );
- UINT16 GetIndex( const LotusRange& );
+ inline sal_uInt16 GetIndex( SCCOL nCol, SCROW nRow );
+ inline sal_uInt16 GetIndex( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE );
+ sal_uInt16 GetIndex( const LotusRange& );
inline void Append( SCCOL nCol, SCROW nRow, const String& );
inline void Append( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE, const String& );
void Append( LotusRange* pLR, const String& rName );
diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx
index ccefd529f065..1a6619c73f9f 100644
--- a/sc/source/filter/inc/namebuff.hxx
+++ b/sc/source/filter/inc/namebuff.hxx
@@ -51,16 +51,16 @@ class StringHashEntry
private:
friend class NameBuffer;
String aString;
- UINT32 nHash;
+ sal_uInt32 nHash;
- static UINT32 MakeHashCode( const String& );
+ static sal_uInt32 MakeHashCode( const String& );
public:
inline StringHashEntry( const String& );
inline StringHashEntry( void );
inline void operator =( const sal_Char* );
inline void operator =( const String& );
inline void operator =( const StringHashEntry& );
- inline BOOL operator ==( const StringHashEntry& ) const;
+ inline sal_Bool operator ==( const StringHashEntry& ) const;
};
@@ -96,7 +96,7 @@ inline void StringHashEntry::operator =( const StringHashEntry& r )
}
-inline BOOL StringHashEntry::operator ==( const StringHashEntry& r ) const
+inline sal_Bool StringHashEntry::operator ==( const StringHashEntry& r ) const
{
return ( nHash == r.nHash && aString == r.aString );
}
@@ -106,16 +106,16 @@ inline BOOL StringHashEntry::operator ==( const StringHashEntry& r ) const
class NameBuffer : private List, public ExcRoot
{
private:
- UINT16 nBase; // Index-Basis
+ sal_uInt16 nBase; // Index-Basis
public:
// inline NameBuffer( void ); //prevent empty rootdata
inline NameBuffer( RootData* );
- inline NameBuffer( RootData*, UINT16 nNewBase );
+ inline NameBuffer( RootData*, sal_uInt16 nNewBase );
virtual ~NameBuffer();
- inline const String* Get( UINT16 nIndex );
- inline UINT16 GetLastIndex( void );
- inline void SetBase( UINT16 nNewBase = 0 );
+ inline const String* Get( sal_uInt16 nIndex );
+ inline sal_uInt16 GetLastIndex( void );
+ inline void SetBase( sal_uInt16 nNewBase = 0 );
void operator <<( const String& rNewString );
};
@@ -132,13 +132,13 @@ inline NameBuffer::NameBuffer( RootData* p ) : ExcRoot( p )
}
-inline NameBuffer::NameBuffer( RootData* p, UINT16 nNewBase ) : ExcRoot( p )
+inline NameBuffer::NameBuffer( RootData* p, sal_uInt16 nNewBase ) : ExcRoot( p )
{
nBase = nNewBase;
}
-inline const String* NameBuffer::Get( UINT16 n )
+inline const String* NameBuffer::Get( sal_uInt16 n )
{
if( n < nBase )
return NULL;
@@ -154,15 +154,15 @@ inline const String* NameBuffer::Get( UINT16 n )
}
-inline UINT16 NameBuffer::GetLastIndex( void )
+inline sal_uInt16 NameBuffer::GetLastIndex( void )
{
DBG_ASSERT( Count() + nBase <= 0xFFFF, "*NameBuffer::GetLastIndex(): Ich hab' die Nase voll!" );
- return ( UINT16 ) ( Count() + nBase );
+ return ( sal_uInt16 ) ( Count() + nBase );
}
-inline void NameBuffer::SetBase( UINT16 nNewBase )
+inline void NameBuffer::SetBase( sal_uInt16 nNewBase )
{
nBase = nNewBase;
}
@@ -176,7 +176,7 @@ class ShrfmlaBuffer : public ExcRoot
{
size_t operator() (const ScAddress &addr) const;
};
- typedef boost::unordered_map <ScAddress, USHORT, ScAddressHashFunc> ShrfmlaHash;
+ typedef boost::unordered_map <ScAddress, sal_uInt16, ScAddressHashFunc> ShrfmlaHash;
typedef std::list <ScRange> ShrfmlaList;
ShrfmlaHash index_hash;
@@ -188,7 +188,7 @@ public:
virtual ~ShrfmlaBuffer();
void Clear();
void Store( const ScRange& rRange, const ScTokenArray& );
- USHORT Find (const ScAddress & rAddress ) const;
+ sal_uInt16 Find (const ScAddress & rAddress ) const;
static String CreateName( const ScRange& );
};
@@ -204,9 +204,9 @@ private:
StringHashEntry aStrHashEntry;
ScComplexRefData aScComplexRefDataRel;
String aScAbsName;
- UINT16 nAbsInd; // == 0 -> noch keine Abs-Name!
- UINT16 nRelInd;
- BOOL bSingleRef;
+ sal_uInt16 nAbsInd; // == 0 -> noch keine Abs-Name!
+ sal_uInt16 nRelInd;
+ sal_Bool bSingleRef;
ENTRY( const String& rName, const String& rScName, const ScComplexRefData& rCRD ) :
aStrHashEntry( rName ),
aScComplexRefDataRel( rCRD ),
@@ -218,14 +218,14 @@ private:
};
ScTokenArray* pScTokenArray;
- UINT16 nIntCount;
+ sal_uInt16 nIntCount;
public:
RangeNameBufferWK3( void );
virtual ~RangeNameBufferWK3();
void Add( const String& rName, const ScComplexRefData& rCRD );
inline void Add( const String& rName, const ScRange& aScRange );
- BOOL FindRel( const String& rRef, UINT16& rIndex );
- BOOL FindAbs( const String& rRef, UINT16& rIndex );
+ sal_Bool FindRel( const String& rRef, sal_uInt16& rIndex );
+ sal_Bool FindAbs( const String& rRef, sal_uInt16& rIndex );
};
@@ -237,27 +237,27 @@ inline void RangeNameBufferWK3::Add( const String& rName, const ScRange& aScRang
pSRD = &aCRD.Ref1;
pScAddr = &aScRange.aStart;
- pSRD->SetFlag3D( TRUE );
+ pSRD->SetFlag3D( sal_True );
pSRD->nCol = pScAddr->Col();
pSRD->nRow = pScAddr->Row();
pSRD->nTab = pScAddr->Tab();
// zunaechst ALLE Refs nur absolut
- pSRD->SetColRel( FALSE );
- pSRD->SetRowRel( FALSE );
- pSRD->SetTabRel( FALSE );
+ pSRD->SetColRel( false );
+ pSRD->SetRowRel( false );
+ pSRD->SetTabRel( false );
pSRD = &aCRD.Ref2;
pScAddr = &aScRange.aEnd;
- pSRD->SetFlag3D( TRUE );
+ pSRD->SetFlag3D( sal_True );
pSRD->nCol = pScAddr->Col();
pSRD->nRow = pScAddr->Row();
pSRD->nTab = pScAddr->Tab();
// zunaechst ALLE Refs nur absolut
- pSRD->SetColRel( FALSE );
- pSRD->SetRowRel( FALSE );
- pSRD->SetTabRel( FALSE );
+ pSRD->SetColRel( false );
+ pSRD->SetRowRel( false );
+ pSRD->SetTabRel( false );
Add( rName, aCRD );
}
@@ -272,26 +272,26 @@ private:
{
String aFile;
String aTab;
- UINT16 nTabNum; // 0xFFFF -> noch nicht angelegt
+ sal_uInt16 nTabNum; // 0xFFFF -> noch nicht angelegt
// 0xFFFE -> versucht anzulegen, ging aber schief
// 0xFFFD -> soll im selben Workbook sein, findet's aber nicht
- BOOL bSWB;
- BOOL bLink;
+ sal_Bool bSWB;
+ sal_Bool bLink;
Cont( const String& rFilePathAndName, const String& rTabName ) :
aFile( rFilePathAndName ),
aTab( rTabName )
{
nTabNum = 0xFFFF; // -> Tabelle noch nicht erzeugt
- bSWB = bLink = FALSE;
+ bSWB = bLink = false;
}
Cont( const String& rFilePathAndName, const String& rTabName,
- const BOOL bSameWB ) :
+ const sal_Bool bSameWB ) :
aFile( rFilePathAndName ),
aTab( rTabName )
{
nTabNum = 0xFFFF; // -> Tabelle noch nicht erzeugt
bSWB = bSameWB;
- bLink = FALSE;
+ bLink = false;
}
};
public:
@@ -299,11 +299,11 @@ public:
virtual ~ExtSheetBuffer();
sal_Int16 Add( const String& rFilePathAndName,
- const String& rTabName, const BOOL bSameWorkbook = FALSE );
+ const String& rTabName, const sal_Bool bSameWorkbook = false );
- BOOL GetScTabIndex( UINT16 nExcSheetIndex, UINT16& rIn_LastTab_Out_ScIndex );
- BOOL IsLink( const UINT16 nExcSheetIndex ) const;
- BOOL GetLink( const UINT16 nExcSheetIndex, String &rAppl, String &rDoc ) const;
+ sal_Bool GetScTabIndex( sal_uInt16 nExcSheetIndex, sal_uInt16& rIn_LastTab_Out_ScIndex );
+ sal_Bool IsLink( const sal_uInt16 nExcSheetIndex ) const;
+ sal_Bool GetLink( const sal_uInt16 nExcSheetIndex, String &rAppl, String &rDoc ) const;
void Reset( void );
};
@@ -319,13 +319,13 @@ inline ExtSheetBuffer::ExtSheetBuffer( RootData* p ) : ExcRoot( p )
struct ExtName
{
String aName;
- UINT32 nStorageId;
- UINT16 nFlags;
+ sal_uInt32 nStorageId;
+ sal_uInt16 nFlags;
inline ExtName( const String& r, sal_uInt16 n ) : aName( r ), nStorageId( 0 ), nFlags( n ) {}
- BOOL IsDDE( void ) const;
- BOOL IsOLE( void ) const;
+ sal_Bool IsDDE( void ) const;
+ sal_Bool IsOLE( void ) const;
};
@@ -337,7 +337,7 @@ public:
explicit ExtNameBuff( const XclImpRoot& rRoot );
void AddDDE( const String& rName, sal_Int16 nRefIdx );
- void AddOLE( const String& rName, sal_Int16 nRefIdx, UINT32 nStorageId );
+ void AddOLE( const String& rName, sal_Int16 nRefIdx, sal_uInt32 nStorageId );
void AddName( const String& rName, sal_Int16 nRefIdx );
const ExtName* GetNameByIndex( sal_Int16 nRefIdx, sal_uInt16 nNameIdx ) const;
diff --git a/sc/source/filter/inc/op.h b/sc/source/filter/inc/op.h
index d44053de2a44..42d3d747153d 100644
--- a/sc/source/filter/inc/op.h
+++ b/sc/source/filter/inc/op.h
@@ -34,37 +34,37 @@
// OP-Code-Funktionen
class SvStream;
-void NI( SvStream &aStream, USHORT nLaenge );
-void OP_BOF( SvStream &aStream, USHORT nLaenge );
-void OP_EOF( SvStream &aStream, USHORT nLaenge );
-void OP_Integer( SvStream &aStream, USHORT nLaenge );
-void OP_Number( SvStream &aStream, USHORT nLaenge );
-void OP_Label( SvStream &aStream, USHORT nLaenge );
-void OP_Integer3( SvStream &aStream, USHORT nLaenge ); // WK3
-void OP_Number3( SvStream &aStream, USHORT nLaenge ); // WK3
-void OP_Formula( SvStream &aStream, USHORT nLaenge );
-void OP_Formula3( SvStream &aStream, USHORT nLaenge ); // WK3
-void OP_ColumnWidth( SvStream &aStream, USHORT nLaenge );
-void OP_NamedRange( SvStream &aStream, USHORT nLaenge );
-void OP_SymphNamedRange( SvStream &aStream, USHORT nLaenge );
-void OP_Footer( SvStream &aStream, USHORT nLaenge );
-void OP_Header( SvStream &aStream, USHORT nLaenge );
-void OP_Margins( SvStream &aStream, USHORT nLaenge );
-void OP_HiddenCols( SvStream &aStream, USHORT nLaenge );
-void OP_Window1( SvStream &aStream, USHORT nLaenge );
-void OP_Blank( SvStream &aStream, USHORT nLaenge );
+void NI( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_BOF( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_EOF( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Integer( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Number( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Label( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Integer3( SvStream &aStream, sal_uInt16 nLaenge ); // WK3
+void OP_Number3( SvStream &aStream, sal_uInt16 nLaenge ); // WK3
+void OP_Formula( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Formula3( SvStream &aStream, sal_uInt16 nLaenge ); // WK3
+void OP_ColumnWidth( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_NamedRange( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_SymphNamedRange( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Footer( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Header( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Margins( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_HiddenCols( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Window1( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Blank( SvStream &aStream, sal_uInt16 nLaenge );
// Lotus 123 bits.
-void OP_BOF123( SvStream &aStream, USHORT nLaenge );
-void OP_EOF123( SvStream &aStream, USHORT nLaenge );
-void OP_Number123( SvStream &aStream, USHORT nLaenge );
-void OP_Label123( SvStream &aStream, USHORT nLaenge );
-void OP_Formula123( SvStream &aStream, USHORT nLaenge );
-void OP_IEEENumber123(SvStream& r, UINT16 n);
-void OP_Note123(SvStream &aStream, USHORT nLaenge);
-void OP_CreatePattern123(SvStream &aStream, USHORT nLaenge);
-void OP_SheetName123( SvStream &rStream, USHORT nLength );
-void OP_HorAlign123(BYTE nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ );
-void OP_VerAlign123(BYTE nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ );
+void OP_BOF123( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_EOF123( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Number123( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Label123( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_Formula123( SvStream &aStream, sal_uInt16 nLaenge );
+void OP_IEEENumber123(SvStream& r, sal_uInt16 n);
+void OP_Note123(SvStream &aStream, sal_uInt16 nLaenge);
+void OP_CreatePattern123(SvStream &aStream, sal_uInt16 nLaenge);
+void OP_SheetName123( SvStream &rStream, sal_uInt16 nLength );
+void OP_HorAlign123(sal_uInt8 nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ );
+void OP_VerAlign123(sal_uInt8 nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ );
void OP_ApplyPatternArea123(SvStream& r);
#endif
diff --git a/sc/source/filter/inc/optab.h b/sc/source/filter/inc/optab.h
index f4fb22af08c1..f40065214270 100644
--- a/sc/source/filter/inc/optab.h
+++ b/sc/source/filter/inc/optab.h
@@ -29,7 +29,7 @@
#ifndef SC_OPTAB_H
#define SC_OPTAB_H
-typedef void ( *OPCODE_FKT )( SvStream &aStream, USHORT nLaenge );
+typedef void ( *OPCODE_FKT )( SvStream &aStream, sal_uInt16 nLaenge );
#define FKT_LIMIT 101
diff --git a/sc/source/filter/inc/rtfexp.hxx b/sc/source/filter/inc/rtfexp.hxx
index c37e647f5ec5..e058afea4586 100644
--- a/sc/source/filter/inc/rtfexp.hxx
+++ b/sc/source/filter/inc/rtfexp.hxx
@@ -34,7 +34,7 @@
class ScRTFExport : public ScExportBase
{
- ULONG* pCellX; // kumulierte Zellbreiten einer Tabelle
+ sal_uLong* pCellX; // kumulierte Zellbreiten einer Tabelle
void WriteTab( SCTAB nTab );
void WriteRow( SCTAB nTab, SCROW nRow );
@@ -45,7 +45,7 @@ public:
ScRTFExport( SvStream&, ScDocument*, const ScRange& );
virtual ~ScRTFExport();
- ULONG Write();
+ sal_uLong Write();
};
diff --git a/sc/source/filter/inc/rtfparse.hxx b/sc/source/filter/inc/rtfparse.hxx
index 0d691ba9f874..021a0b585262 100644
--- a/sc/source/filter/inc/rtfparse.hxx
+++ b/sc/source/filter/inc/rtfparse.hxx
@@ -38,7 +38,7 @@ struct ScRTFCellDefault
{
SfxItemSet aItemSet;
SCCOL nCol;
- USHORT nTwips; // rechter Rand der Zelle
+ sal_uInt16 nTwips; // rechter Rand der Zelle
SCCOL nColOverlap; // MergeCell wenn >1, merged cells wenn 0
ScRTFCellDefault( SfxItemPool* pPool ) :
@@ -47,7 +47,7 @@ struct ScRTFCellDefault
typedef boost::ptr_vector< ScRTFCellDefault > ScRTFDefaultList;
// deswegen ULONG, typedef bringt's auch nicht :-(
-SV_DECL_VARARR_SORT( ScRTFColTwips, ULONG, 16, 4)
+SV_DECL_VARARR_SORT( ScRTFColTwips, sal_uLong, 16, 4)
#else // SC_RTFPARSE_CXX
@@ -68,22 +68,22 @@ private:
ScRTFCellDefault* pInsDefault;
ScRTFCellDefault* pActDefault;
ScRTFCellDefault* pDefMerge;
- ULONG nStartAdjust;
- USHORT nLastWidth;
- BOOL bNewDef;
+ sal_uLong nStartAdjust;
+ sal_uInt16 nLastWidth;
+ sal_Bool bNewDef;
DECL_LINK( RTFImportHdl, ImportInfo* );
inline void NextRow();
void EntryEnd( ScEEParseEntry*, const ESelection& );
void ProcToken( ImportInfo* );
void ColAdjust();
- BOOL SeekTwips( USHORT nTwips, SCCOL* pCol );
+ sal_Bool SeekTwips( sal_uInt16 nTwips, SCCOL* pCol );
void NewCellRow( ImportInfo* );
public:
ScRTFParser( EditEngine* );
virtual ~ScRTFParser();
- virtual ULONG Read( SvStream&, const String& rBaseURL );
+ virtual sal_uLong Read( SvStream&, const String& rBaseURL );
};
diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx
index de8e342ac28d..e66ba12e0c00 100644
--- a/sc/source/filter/inc/scflt.hxx
+++ b/sc/source/filter/inc/scflt.hxx
@@ -188,37 +188,37 @@
// Datum/Uhrzeit
struct Sc10DateTime
{
- USHORT Year;
- USHORT Month;
- USHORT Day;
- USHORT Hour;
- USHORT Min;
- USHORT Sec;
+ sal_uInt16 Year;
+ sal_uInt16 Month;
+ sal_uInt16 Day;
+ sal_uInt16 Hour;
+ sal_uInt16 Min;
+ sal_uInt16 Sec;
};
// ZahlenFormate
struct Sc10ValueFormat
{
- BYTE Format; // Zahl, Waehrung, Prozent etc.
- BYTE Info; // Anzahl Nachkommastellen, Anzahl Stellen, bzw. Datums/Zeitformat
+ sal_uInt8 Format; // Zahl, Waehrung, Prozent etc.
+ sal_uInt8 Info; // Anzahl Nachkommastellen, Anzahl Stellen, bzw. Datums/Zeitformat
};
// Fontbeschreibung
struct Sc10LogFont
{
- INT16 lfHeight;
- INT16 lfWidth;
- INT16 lfEscapement;
- INT16 lfOrientation;
- INT16 lfWeight;
- BYTE lfItalic;
- BYTE lfUnderline;
- BYTE lfStrikeOut;
- BYTE lfCharSet;
- BYTE lfOutPrecision;
- BYTE lfClipPrecision;
- BYTE lfQuality;
- BYTE lfPitchAndFamily;
+ sal_Int16 lfHeight;
+ sal_Int16 lfWidth;
+ sal_Int16 lfEscapement;
+ sal_Int16 lfOrientation;
+ sal_Int16 lfWeight;
+ sal_uInt8 lfItalic;
+ sal_uInt8 lfUnderline;
+ sal_uInt8 lfStrikeOut;
+ sal_uInt8 lfCharSet;
+ sal_uInt8 lfOutPrecision;
+ sal_uInt8 lfClipPrecision;
+ sal_uInt8 lfQuality;
+ sal_uInt8 lfPitchAndFamily;
sal_Char lfFaceName[32];
int operator==( const Sc10LogFont& rData ) const;
@@ -227,51 +227,51 @@ struct Sc10LogFont
// RGB-Frabwerte
struct Sc10Color
{
- BYTE Dummy;
- BYTE Blue;
- BYTE Green;
- BYTE Red;
+ sal_uInt8 Dummy;
+ sal_uInt8 Blue;
+ sal_uInt8 Green;
+ sal_uInt8 Red;
int operator==( const Sc10Color& rColor ) const;
};
// Blockbeschreibung
struct Sc10BlockRect
{
- INT16 x1;
- INT16 y1;
- INT16 x2;
- INT16 y2;
+ sal_Int16 x1;
+ sal_Int16 y1;
+ sal_Int16 x2;
+ sal_Int16 y2;
};
// Datenbank-Bereich
struct Sc10DataBaseRec
{
sal_Char Name[32];
- INT16 Tab;
+ sal_Int16 Tab;
Sc10BlockRect Block;
- BYTE RowHeader;
- INT16 SortField0;
- BYTE SortUpOrder0;
- INT16 SortField1;
- BYTE SortUpOrder1;
- INT16 SortField2;
- BYTE SortUpOrder2;
- BYTE IncludeFormat;
- INT16 QueryField0;
- INT16 QueryOp0;
- BYTE QueryByString0;
+ sal_uInt8 RowHeader;
+ sal_Int16 SortField0;
+ sal_uInt8 SortUpOrder0;
+ sal_Int16 SortField1;
+ sal_uInt8 SortUpOrder1;
+ sal_Int16 SortField2;
+ sal_uInt8 SortUpOrder2;
+ sal_uInt8 IncludeFormat;
+ sal_Int16 QueryField0;
+ sal_Int16 QueryOp0;
+ sal_uInt8 QueryByString0;
sal_Char QueryString0[64];
double QueryValue0;
- INT16 QueryConnect1;
- INT16 QueryField1;
- INT16 QueryOp1;
- BYTE QueryByString1;
+ sal_Int16 QueryConnect1;
+ sal_Int16 QueryField1;
+ sal_Int16 QueryOp1;
+ sal_uInt8 QueryByString1;
sal_Char QueryString1[64];
double QueryValue1;
- INT16 QueryConnect2;
- INT16 QueryField2;
- INT16 QueryOp2;
- BYTE QueryByString2;
+ sal_Int16 QueryConnect2;
+ sal_Int16 QueryField2;
+ sal_Int16 QueryOp2;
+ sal_uInt8 QueryByString2;
sal_Char QueryString2[64];
double QueryValue2;
};
@@ -281,15 +281,15 @@ struct Sc10HeadFootLine
{
sal_Char Title[128];
Sc10LogFont LogFont;
- BYTE HorJustify;
- BYTE VerJustify;
- USHORT Raster;
- USHORT Frame;
+ sal_uInt8 HorJustify;
+ sal_uInt8 VerJustify;
+ sal_uInt16 Raster;
+ sal_uInt16 Frame;
Sc10Color TextColor;
Sc10Color BackColor;
Sc10Color RasterColor;
- USHORT FrameColor; // Nibble Codierte Farben link oben rechts unten
- USHORT Reserved;
+ sal_uInt16 FrameColor; // Nibble Codierte Farben link oben rechts unten
+ sal_uInt16 Reserved;
int operator==( const Sc10HeadFootLine& rData ) const;
};
@@ -299,31 +299,31 @@ struct Sc10PageFormat
{
Sc10HeadFootLine HeadLine;
Sc10HeadFootLine FootLine;
- INT16 Orientation;
- INT16 Width;
- INT16 Height;
- INT16 NonPrintableX;
- INT16 NonPrintableY;
- INT16 Left;
- INT16 Top;
- INT16 Right;
- INT16 Bottom;
- INT16 Head;
- INT16 Foot;
- BYTE HorCenter;
- BYTE VerCenter;
- BYTE PrintGrid;
- BYTE PrintColRow;
- BYTE PrintNote;
- BYTE TopBottomDir;
+ sal_Int16 Orientation;
+ sal_Int16 Width;
+ sal_Int16 Height;
+ sal_Int16 NonPrintableX;
+ sal_Int16 NonPrintableY;
+ sal_Int16 Left;
+ sal_Int16 Top;
+ sal_Int16 Right;
+ sal_Int16 Bottom;
+ sal_Int16 Head;
+ sal_Int16 Foot;
+ sal_uInt8 HorCenter;
+ sal_uInt8 VerCenter;
+ sal_uInt8 PrintGrid;
+ sal_uInt8 PrintColRow;
+ sal_uInt8 PrintNote;
+ sal_uInt8 TopBottomDir;
sal_Char PrintAreaName[32];
Sc10BlockRect PrintArea;
sal_Char PrnZoom[6]; // Pascal 6 Byte Realzahl
- USHORT FirstPageNo;
- INT16 RowRepeatStart;
- INT16 RowRepeatEnd;
- INT16 ColRepeatStart;
- INT16 ColRepeatEnd;
+ sal_uInt16 FirstPageNo;
+ sal_Int16 RowRepeatStart;
+ sal_Int16 RowRepeatEnd;
+ sal_Int16 ColRepeatStart;
+ sal_Int16 ColRepeatEnd;
sal_Char Reserved[26];
int operator==( const Sc10PageFormat& rData ) const;
@@ -333,23 +333,23 @@ struct Sc10PageFormat
struct Sc10TableProtect
{
sal_Char PassWord[16];
- USHORT Flags;
- BYTE Protect;
+ sal_uInt16 Flags;
+ sal_uInt8 Protect;
};
// Documentschutz
struct Sc10SheetProtect
{
sal_Char PassWord[16];
- USHORT Flags;
- BYTE Protect;
+ sal_uInt16 Flags;
+ sal_uInt8 Protect;
};
// Dateikopf StarCalc 1.0 Datei
struct Sc10FileHeader
{
sal_Char CopyRight[30];
- USHORT Version;
+ sal_uInt16 Version;
sal_Char Reserved[32];
};
@@ -391,29 +391,29 @@ struct Sc10FileInfo
struct Sc10EditStateInfo
{
// Cursor Position
- USHORT CarretX;
- USHORT CarretY;
- USHORT CarretZ;
+ sal_uInt16 CarretX;
+ sal_uInt16 CarretY;
+ sal_uInt16 CarretZ;
// Linke obere Ecke der Tabelle im Fenster
- USHORT DeltaX;
- USHORT DeltaY;
- USHORT DeltaZ;
+ sal_uInt16 DeltaX;
+ sal_uInt16 DeltaY;
+ sal_uInt16 DeltaZ;
// Ueberfluessig in StarCalc 3.0
- BYTE DataBaseMode;
+ sal_uInt8 DataBaseMode;
sal_Char Reserved[51];
};
// Attribut-Eintrag
struct Sc10ColData
{
- USHORT Row;
- USHORT Value;
+ sal_uInt16 Row;
+ sal_uInt16 Value;
};
// ZellAttribut-Beschreibung
struct Sc10ColAttr
{
- USHORT Count;
+ sal_uInt16 Count;
Sc10ColData* pData;
Sc10ColAttr() : pData(NULL) {}
@@ -422,18 +422,18 @@ struct Sc10ColAttr
// GraphHeader
struct Sc10GraphHeader
{
- BYTE Typ; // Typ der Grafik (Ole-Objekt, Image (Bitmap oder MetaFile), Chart-Object)
- INT16 CarretX; // ZellPosition der Grafik
- INT16 CarretY;
- INT16 CarretZ;
- INT32 x; // x,y Abstand zum Zellrand in Pixel (Pixel weil ich Grafiken in Fenstern ablege)
- INT32 y;
- INT32 w; // w,h Breite und Hoehe in Pixel
- INT32 h;
- BYTE IsRelPos; // Ist die Position relativ zur Zelle oder absolute in der Tabelle
- BYTE DoPrint; // Soll die Grafik ausgedruckt werden
- USHORT FrameType; // Art der Umrandung um die Grafik (Keine, Einfach, Doppelt, Einfach Dick, Doppelt Dick)
- BYTE IsTransparent; // Soll der Hintergrund gezeichnet werden
+ sal_uInt8 Typ; // Typ der Grafik (Ole-Objekt, Image (Bitmap oder MetaFile), Chart-Object)
+ sal_Int16 CarretX; // ZellPosition der Grafik
+ sal_Int16 CarretY;
+ sal_Int16 CarretZ;
+ sal_Int32 x; // x,y Abstand zum Zellrand in Pixel (Pixel weil ich Grafiken in Fenstern ablege)
+ sal_Int32 y;
+ sal_Int32 w; // w,h Breite und Hoehe in Pixel
+ sal_Int32 h;
+ sal_uInt8 IsRelPos; // Ist die Position relativ zur Zelle oder absolute in der Tabelle
+ sal_uInt8 DoPrint; // Soll die Grafik ausgedruckt werden
+ sal_uInt16 FrameType; // Art der Umrandung um die Grafik (Keine, Einfach, Doppelt, Einfach Dick, Doppelt Dick)
+ sal_uInt8 IsTransparent; // Soll der Hintergrund gezeichnet werden
Sc10Color FrameColor; // Umrandungsfarbe als RGB-Wert
Sc10Color BackColor; // Hintergrundfarbe als RGB-Wert
sal_Char Reserved[32]; // Na was wohl
@@ -443,50 +443,50 @@ struct Sc10GraphHeader
struct Sc10ImageHeader
{
sal_Char FileName[128]; // Dateiname des urspruenglich eingefuegten Bildes
- INT16 Typ; // Typ der Grafik (Bitmap oder Metafile)
- BYTE Linked; // Kann nicht vorkommen
- INT16 x1; // Urspruengliche Groesse der Grafik (nur fuer Metafiles)
- INT16 y1;
- INT16 x2;
- INT16 y2;
+ sal_Int16 Typ; // Typ der Grafik (Bitmap oder Metafile)
+ sal_uInt8 Linked; // Kann nicht vorkommen
+ sal_Int16 x1; // Urspruengliche Groesse der Grafik (nur fuer Metafiles)
+ sal_Int16 y1;
+ sal_Int16 x2;
+ sal_Int16 y2;
sal_uInt32 Size; // Groesse der Grafik in BYTES
};
// ChartHeader
struct Sc10ChartHeader
{
- INT16 MM; // Meatfile Struktur MapMode, Breite, Hoehe
- INT16 xExt;
- INT16 yExt;
+ sal_Int16 MM; // Meatfile Struktur MapMode, Breite, Hoehe
+ sal_Int16 xExt;
+ sal_Int16 yExt;
sal_uInt32 Size; // Groesse der Grafik in BYTES
};
// ChartSheetData
struct Sc10ChartSheetData
{
- BYTE HasTitle; // Hat das Chart Daten aus der Tabell fuer einen Titel
- INT16 TitleX; // Zellposition des Titels
- INT16 TitleY;
- BYTE HasSubTitle; // Hat das Chart Daten aus der Tabell fuer einen Untertitel
- INT16 SubTitleX; // Zellposition des Untertitels
- INT16 SubTitleY;
- BYTE HasLeftTitle; // Hat das Chart Daten aus der Tabelle fuer einen Linken-Titel
- INT16 LeftTitleX; // Zellposition des Linken-Titels
- INT16 LeftTitleY;
- BYTE HasLegend; // Hat das Chart Daten aus der Tabelle fuer eine Legende
- INT16 LegendX1; // Zellen der Legende
- INT16 LegendY1;
- INT16 LegendX2;
- INT16 LegendY2;
- BYTE HasLabel; // Hat das Chart Daten aus der Tabelle fuer die Achsbeschriftung
- INT16 LabelX1; // Zellen der Achsbeschriftung
- INT16 LabelY1;
- INT16 LabelX2;
- INT16 LabelY2;
- INT16 DataX1; // Zellen der Daten
- INT16 DataY1;
- INT16 DataX2;
- INT16 DataY2;
+ sal_uInt8 HasTitle; // Hat das Chart Daten aus der Tabell fuer einen Titel
+ sal_Int16 TitleX; // Zellposition des Titels
+ sal_Int16 TitleY;
+ sal_uInt8 HasSubTitle; // Hat das Chart Daten aus der Tabell fuer einen Untertitel
+ sal_Int16 SubTitleX; // Zellposition des Untertitels
+ sal_Int16 SubTitleY;
+ sal_uInt8 HasLeftTitle; // Hat das Chart Daten aus der Tabelle fuer einen Linken-Titel
+ sal_Int16 LeftTitleX; // Zellposition des Linken-Titels
+ sal_Int16 LeftTitleY;
+ sal_uInt8 HasLegend; // Hat das Chart Daten aus der Tabelle fuer eine Legende
+ sal_Int16 LegendX1; // Zellen der Legende
+ sal_Int16 LegendY1;
+ sal_Int16 LegendX2;
+ sal_Int16 LegendY2;
+ sal_uInt8 HasLabel; // Hat das Chart Daten aus der Tabelle fuer die Achsbeschriftung
+ sal_Int16 LabelX1; // Zellen der Achsbeschriftung
+ sal_Int16 LabelY1;
+ sal_Int16 LabelX2;
+ sal_Int16 LabelY2;
+ sal_Int16 DataX1; // Zellen der Daten
+ sal_Int16 DataY1;
+ sal_Int16 DataX2;
+ sal_Int16 DataY2;
sal_Char Reserved[64];
};
@@ -505,29 +505,29 @@ typedef sal_Char Sc10ChartText[30];
struct Sc10ChartTypeData
{
- INT16 NumSets;
- INT16 NumPoints;
- INT16 DrawMode;
- INT16 GraphType;
- INT16 GraphStyle;
+ sal_Int16 NumSets;
+ sal_Int16 NumPoints;
+ sal_Int16 DrawMode;
+ sal_Int16 GraphType;
+ sal_Int16 GraphStyle;
sal_Char GraphTitle[80];
sal_Char BottomTitle[80];
- INT16 SymbolData[256];
- INT16 ColorData[256];
- INT16 ThickLines[256];
- INT16 PatternData[256];
- INT16 LinePatternData[256];
- INT16 NumGraphStyles[11];
- INT16 ShowLegend;
+ sal_Int16 SymbolData[256];
+ sal_Int16 ColorData[256];
+ sal_Int16 ThickLines[256];
+ sal_Int16 PatternData[256];
+ sal_Int16 LinePatternData[256];
+ sal_Int16 NumGraphStyles[11];
+ sal_Int16 ShowLegend;
Sc10ChartText LegendText[256];
- INT16 ExplodePie;
- INT16 FontUse;
- INT16 FontFamily[5];
- INT16 FontStyle[5];
- INT16 FontSize[5];
- INT16 GridStyle;
- INT16 Labels;
- INT16 LabelEvery;
+ sal_Int16 ExplodePie;
+ sal_Int16 FontUse;
+ sal_Int16 FontFamily[5];
+ sal_Int16 FontStyle[5];
+ sal_Int16 FontSize[5];
+ sal_Int16 GridStyle;
+ sal_Int16 Labels;
+ sal_Int16 LabelEvery;
Sc10ChartText LabelText[50];
sal_Char LeftTitle[80];
sal_Char Reserved[4646];
@@ -538,9 +538,9 @@ struct Sc10ChartTypeData
class Sc10FontData : public ScDataObject
{
public:
- INT16 Height;
- BYTE CharSet;
- BYTE PitchAndFamily;
+ sal_Int16 Height;
+ sal_uInt8 CharSet;
+ sal_uInt8 PitchAndFamily;
sal_Char FaceName[32];
Sc10FontData( const Sc10FontData& rData ) :
@@ -561,11 +561,11 @@ public:
class Sc10FontCollection : public ScCollection
{
protected:
- ULONG nError;
+ sal_uLong nError;
public:
Sc10FontCollection( SvStream& rStream );
- ULONG GetError() { return nError; }
- Sc10FontData* At(USHORT nIndex) { return (Sc10FontData*)ScCollection::At(nIndex); }
+ sal_uLong GetError() { return nError; }
+ Sc10FontData* At(sal_uInt16 nIndex) { return (Sc10FontData*)ScCollection::At(nIndex); }
private:
using ScCollection::At;
};
@@ -597,11 +597,11 @@ public :
class Sc10NameCollection : public ScCollection
{
protected:
- ULONG nError;
+ sal_uLong nError;
public:
Sc10NameCollection(SvStream& rStream);
-ULONG GetError() { return nError; }
-Sc10NameData* At(USHORT nIndex) { return (Sc10NameData*)ScCollection::At(nIndex); }
+sal_uLong GetError() { return nError; }
+Sc10NameData* At(sal_uInt16 nIndex) { return (Sc10NameData*)ScCollection::At(nIndex); }
private:
using ScCollection::At;
};
@@ -614,14 +614,14 @@ public:
sal_Char Name[32];
Sc10ValueFormat ValueFormat;
Sc10LogFont LogFont;
- USHORT Attr;
- USHORT Justify;
- USHORT Frame;
- USHORT Raster;
- USHORT nColor;
- USHORT FrameColor;
- USHORT Flags;
- USHORT FormatFlags;
+ sal_uInt16 Attr;
+ sal_uInt16 Justify;
+ sal_uInt16 Frame;
+ sal_uInt16 Raster;
+ sal_uInt16 nColor;
+ sal_uInt16 FrameColor;
+ sal_uInt16 Flags;
+ sal_uInt16 FormatFlags;
sal_Char Reserved[8];
Sc10PatternData(const Sc10PatternData& rData) :
@@ -650,11 +650,11 @@ virtual ScDataObject* Clone() const { return new Sc10PatternData(*this); }
class Sc10PatternCollection : public ScCollection
{
protected:
- ULONG nError;
+ sal_uLong nError;
public:
Sc10PatternCollection(SvStream& rStream);
- ULONG GetError() { return nError; }
- Sc10PatternData* At(USHORT nIndex) { return (Sc10PatternData*)ScCollection::At(nIndex); }
+ sal_uLong GetError() { return nError; }
+ Sc10PatternData* At(sal_uInt16 nIndex) { return (Sc10PatternData*)ScCollection::At(nIndex); }
private:
using ScCollection::At;
};
@@ -680,12 +680,12 @@ virtual ScDataObject* Clone() const { return new Sc10DataBaseData(*this);
class Sc10DataBaseCollection : public ScCollection
{
protected:
- ULONG nError;
+ sal_uLong nError;
sal_Char ActName[32];
public:
Sc10DataBaseCollection(SvStream& rStream);
- ULONG GetError() { return nError; }
- Sc10DataBaseData* At(USHORT nIndex) { return (Sc10DataBaseData*)ScCollection::At(nIndex); }
+ sal_uLong GetError() { return nError; }
+ Sc10DataBaseData* At(sal_uInt16 nIndex) { return (Sc10DataBaseData*)ScCollection::At(nIndex); }
private:
using ScCollection::At;
};
@@ -706,8 +706,8 @@ class Sc10PageCollection : public ScCollection
{
public:
Sc10PageCollection() : ScCollection(1,1) {};
- Sc10PageData* At(USHORT nIndex) { return (Sc10PageData*)ScCollection::At(nIndex); }
- USHORT InsertFormat( const Sc10PageFormat& rData );
+ Sc10PageData* At(sal_uInt16 nIndex) { return (Sc10PageData*)ScCollection::At(nIndex); }
+ sal_uInt16 InsertFormat( const Sc10PageFormat& rData );
void PutToDoc( ScDocument* pDoc );
private:
using ScCollection::At;
@@ -730,8 +730,8 @@ class Sc10Import
Sc10NameCollection* pNameCollection;
Sc10PatternCollection* pPatternCollection;
Sc10DataBaseCollection* pDataBaseCollection;
- ULONG nError;
- INT16 TabCount;
+ sal_uLong nError;
+ sal_Int16 TabCount;
SCTAB nShowTab;
ScViewOptions aSc30ViewOpt;
ScfStreamProgressBar* pPrgrsBar;
@@ -740,7 +740,7 @@ public:
Sc10Import( SvStream& rStr, ScDocument* pDocument );
~Sc10Import();
- ULONG Import();
+ sal_uLong Import();
void LoadFileHeader();
void LoadFileInfo();
void LoadEditStateInfo();
@@ -757,7 +757,7 @@ public:
void LoadCol(SCCOL Col, SCTAB Tab);
void LoadColAttr(SCCOL Col, SCTAB Tab);
void LoadAttr(Sc10ColAttr& rAttr);
- void ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey);
+ void ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey);
void LoadObjects();
};
diff --git a/sc/source/filter/inc/scfobj.hxx b/sc/source/filter/inc/scfobj.hxx
index a83c2ea0a1d5..c31106f16ebc 100644
--- a/sc/source/filter/inc/scfobj.hxx
+++ b/sc/source/filter/inc/scfobj.hxx
@@ -38,7 +38,7 @@ class Sc10InsertObject
{
public:
static void InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect,
- SCTAB nSrcTab, USHORT nX1, USHORT nY1, USHORT nX2, USHORT nY2 );
+ SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 );
};
diff --git a/sc/source/filter/inc/scmem.h b/sc/source/filter/inc/scmem.h
index 029351639f72..99222707b64d 100644
--- a/sc/source/filter/inc/scmem.h
+++ b/sc/source/filter/inc/scmem.h
@@ -31,7 +31,7 @@
#include <tools/solar.h>
-BOOL MemNew( void );
+sal_Bool MemNew( void );
void MemDelete( void );
#endif
diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx
index 0fc780bab344..8e84e6da647d 100644
--- a/sc/source/filter/inc/tokstack.hxx
+++ b/sc/source/filter/inc/tokstack.hxx
@@ -37,26 +37,26 @@
#include <vector>
typedef OpCode DefTokenId;
-// in PRODUCT version: ambiguity between OpCode (being USHORT) and UINT16
+// in PRODUCT version: ambiguity between OpCode (being sal_uInt16) and UINT16
// Unfortunately a typedef is just a dumb alias and not a real type ...
-//typedef UINT16 TokenId;
+//typedef sal_uInt16 TokenId;
struct TokenId
{
- UINT16 nId;
+ sal_uInt16 nId;
TokenId() : nId( 0 ) {}
- TokenId( UINT16 n ) : nId( n ) {}
+ TokenId( sal_uInt16 n ) : nId( n ) {}
TokenId( const TokenId& r ) : nId( r.nId ) {}
inline TokenId& operator =( const TokenId& r ) { nId = r.nId; return *this; }
- inline TokenId& operator =( UINT16 n ) { nId = n; return *this; }
- inline operator UINT16&() { return nId; }
- inline operator const UINT16&() const { return nId; }
- inline BOOL operator <( UINT16 n ) const { return nId < n; }
- inline BOOL operator >( UINT16 n ) const { return nId > n; }
- inline BOOL operator <=( UINT16 n ) const { return nId <= n; }
- inline BOOL operator >=( UINT16 n ) const { return nId >= n; }
- inline BOOL operator ==( UINT16 n ) const { return nId == n; }
- inline BOOL operator !=( UINT16 n ) const { return nId != n; }
+ inline TokenId& operator =( sal_uInt16 n ) { nId = n; return *this; }
+ inline operator sal_uInt16&() { return nId; }
+ inline operator const sal_uInt16&() const { return nId; }
+ inline sal_Bool operator <( sal_uInt16 n ) const { return nId < n; }
+ inline sal_Bool operator >( sal_uInt16 n ) const { return nId > n; }
+ inline sal_Bool operator <=( sal_uInt16 n ) const { return nId <= n; }
+ inline sal_Bool operator >=( sal_uInt16 n ) const { return nId >= n; }
+ inline sal_Bool operator ==( sal_uInt16 n ) const { return nId == n; }
+ inline sal_Bool operator !=( sal_uInt16 n ) const { return nId != n; }
};
@@ -93,25 +93,25 @@ class TokenPool
// Ausgabe Id = 0 -> Fehlerfall
private:
String** ppP_Str; // Pool fuer Strings
- UINT16 nP_Str; // ...mit Groesse
- UINT16 nP_StrAkt; // ...und Schreibmarke
+ sal_uInt16 nP_Str; // ...mit Groesse
+ sal_uInt16 nP_StrAkt; // ...und Schreibmarke
double* pP_Dbl; // Pool fuer Doubles
- UINT16 nP_Dbl;
- UINT16 nP_DblAkt;
+ sal_uInt16 nP_Dbl;
+ sal_uInt16 nP_DblAkt;
- USHORT* pP_Err; // Pool for error codes
- UINT16 nP_Err;
- UINT16 nP_ErrAkt;
+ sal_uInt16* pP_Err; // Pool for error codes
+ sal_uInt16 nP_Err;
+ sal_uInt16 nP_ErrAkt;
ScSingleRefData** ppP_RefTr; // Pool fuer Referenzen
- UINT16 nP_RefTr;
- UINT16 nP_RefTrAkt;
+ sal_uInt16 nP_RefTr;
+ sal_uInt16 nP_RefTrAkt;
- UINT16* pP_Id; // Pool fuer Id-Folgen
- UINT16 nP_Id;
- UINT16 nP_IdAkt;
- UINT16 nP_IdLast; // letzter Folgen-Beginn
+ sal_uInt16* pP_Id; // Pool fuer Id-Folgen
+ sal_uInt16 nP_Id;
+ sal_uInt16 nP_IdAkt;
+ sal_uInt16 nP_IdLast; // letzter Folgen-Beginn
struct EXTCONT
{
@@ -121,8 +121,8 @@ class TokenPool
eId( e ), aText( r ){}
};
EXTCONT** ppP_Ext;
- UINT16 nP_Ext;
- UINT16 nP_ExtAkt;
+ sal_uInt16 nP_Ext;
+ sal_uInt16 nP_ExtAkt;
struct NLFCONT
{
@@ -130,12 +130,12 @@ class TokenPool
NLFCONT( const ScSingleRefData& r ) : aRef( r ) {}
};
NLFCONT** ppP_Nlf;
- UINT16 nP_Nlf;
- UINT16 nP_NlfAkt;
+ sal_uInt16 nP_Nlf;
+ sal_uInt16 nP_NlfAkt;
ScMatrix** ppP_Matrix; // Pool fuer Matricies
- UINT16 nP_Matrix;
- UINT16 nP_MatrixAkt;
+ sal_uInt16 nP_Matrix;
+ sal_uInt16 nP_MatrixAkt;
/** for storage of external names */
struct ExtName
@@ -163,15 +163,15 @@ class TokenPool
};
::std::vector<ExtAreaRef> maExtAreaRefs;
- UINT16* pElement; // Array mit Indizes fuer Elemente
+ sal_uInt16* pElement; // Array mit Indizes fuer Elemente
E_TYPE* pType; // ...mit Typ-Info
- UINT16* pSize; // ...mit Laengenangabe (Anz. UINT16)
- UINT16 nElement;
- UINT16 nElementAkt;
+ sal_uInt16* pSize; // ...mit Laengenangabe (Anz. sal_uInt16)
+ sal_uInt16 nElement;
+ sal_uInt16 nElementAkt;
- static const UINT16 nScTokenOff;// Offset fuer SC-Token
+ static const sal_uInt16 nScTokenOff;// Offset fuer SC-Token
#ifdef DBG_UTIL
- UINT16 nRek; // Rekursionszaehler
+ sal_uInt16 nRek; // Rekursionszaehler
#endif
ScTokenArray* pScToken; // Tokenbastler
@@ -183,8 +183,8 @@ class TokenPool
void GrowExt( void );
void GrowNlf( void );
void GrowMatrix( void );
- void GetElement( const UINT16 nId );
- void GetElementRek( const UINT16 nId );
+ void GetElement( const sal_uInt16 nId );
+ void GetElementRek( const sal_uInt16 nId );
public:
TokenPool( void );
~TokenPool();
@@ -197,8 +197,8 @@ class TokenPool
const TokenId Store( const double& rDouble );
// nur fuer Range-Names
- const TokenId Store( const UINT16 nIndex );
- inline const TokenId Store( const INT16 nWert );
+ const TokenId Store( const sal_uInt16 nIndex );
+ inline const TokenId Store( const sal_Int16 nWert );
const TokenId Store( const String& rString );
const TokenId Store( const ScSingleRefData& rTr );
const TokenId Store( const ScComplexRefData& rTr );
@@ -215,7 +215,7 @@ class TokenPool
inline const ScTokenArray* operator []( const TokenId nId );
void Reset( void );
inline E_TYPE GetType( const TokenId& nId ) const;
- BOOL IsSingleOp( const TokenId& nId, const DefTokenId eId ) const;
+ sal_Bool IsSingleOp( const TokenId& nId, const DefTokenId eId ) const;
const String* GetExternal( const TokenId& nId ) const;
ScMatrix* GetMatrix( unsigned int n ) const;
};
@@ -229,10 +229,10 @@ class TokenStack
{
private:
TokenId* pStack; // Stack als Array
- UINT16 nPos; // Schreibmarke
- UINT16 nSize; // Erster Index ausserhalb des Stacks
+ sal_uInt16 nPos; // Schreibmarke
+ sal_uInt16 nSize; // Erster Index ausserhalb des Stacks
public:
- TokenStack( UINT16 nNewSize = 1024 );
+ TokenStack( sal_uInt16 nNewSize = 1024 );
~TokenStack();
inline TokenStack& operator <<( const TokenId nNewId );
inline void operator >>( TokenId &rId );
@@ -302,14 +302,14 @@ inline TokenPool& TokenPool::operator <<( const TokenId nId )
{
// POST: nId's werden hintereinander im Pool unter einer neuen Id
// abgelegt. Vorgang wird mit >> oder Store() abgeschlossen
- // nId -> ( UINT16 ) nId - 1;
- DBG_ASSERT( ( UINT16 ) nId < nScTokenOff,
+ // nId -> ( sal_uInt16 ) nId - 1;
+ DBG_ASSERT( ( sal_uInt16 ) nId < nScTokenOff,
"-TokenPool::operator <<: TokenId im DefToken-Bereich!" );
if( nP_IdAkt >= nP_Id )
GrowId();
- pP_Id[ nP_IdAkt ] = ( ( UINT16 ) nId ) - 1;
+ pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) nId ) - 1;
nP_IdAkt++;
return *this;
@@ -318,13 +318,13 @@ inline TokenPool& TokenPool::operator <<( const TokenId nId )
inline TokenPool& TokenPool::operator <<( const DefTokenId eId )
{
- DBG_ASSERT( ( UINT32 ) eId + nScTokenOff < 0xFFFF,
+ DBG_ASSERT( ( sal_uInt32 ) eId + nScTokenOff < 0xFFFF,
"-TokenPool::operator<<: enmum zu gross!" );
if( nP_IdAkt >= nP_Id )
GrowId();
- pP_Id[ nP_IdAkt ] = ( ( UINT16 ) eId ) + nScTokenOff;
+ pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) eId ) + nScTokenOff;
nP_IdAkt++;
return *this;
@@ -336,7 +336,7 @@ inline TokenPool& TokenPool::operator <<( TokenStack& rStack )
if( nP_IdAkt >= nP_Id )
GrowId();
- pP_Id[ nP_IdAkt ] = ( ( UINT16 ) rStack.Get() ) - 1;
+ pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) rStack.Get() ) - 1;
nP_IdAkt++;
return *this;
@@ -359,7 +359,7 @@ inline const TokenId TokenPool::Store( void )
}
-inline const TokenId TokenPool::Store( const INT16 nWert )
+inline const TokenId TokenPool::Store( const sal_Int16 nWert )
{
return Store( ( double ) nWert );
}
@@ -380,7 +380,7 @@ const inline ScTokenArray* TokenPool::operator []( const TokenId nId )
#ifdef DBG_UTIL
nRek = 0;
#endif
- GetElement( ( UINT16 ) nId - 1 );
+ GetElement( ( sal_uInt16 ) nId - 1 );
}
return pScToken;
@@ -391,7 +391,7 @@ inline E_TYPE TokenPool::GetType( const TokenId& rId ) const
{
E_TYPE nRet;
- UINT16 nId = (UINT16) rId - 1;
+ sal_uInt16 nId = (sal_uInt16) rId - 1;
if( nId < nElementAkt )
nRet = pType[ nId ] ;
diff --git a/sc/source/filter/inc/tool.h b/sc/source/filter/inc/tool.h
index c0c936798fa3..8b0aac6a05d8 100644
--- a/sc/source/filter/inc/tool.h
+++ b/sc/source/filter/inc/tool.h
@@ -33,22 +33,22 @@
#include <document.hxx>
// Defaultwerte
-const BYTE nDezStd = 0; // Dezimalstellen fuer Standard-Zellen
-const BYTE nDezFloat = 2; // " " Float-Zellen
+const sal_uInt8 nDezStd = 0; // Dezimalstellen fuer Standard-Zellen
+const sal_uInt8 nDezFloat = 2; // " " Float-Zellen
void PutFormString( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char *pString );
-void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, BYTE nFormat, BYTE nSt );
+void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt );
void InitPage( void );
String DosToSystem( sal_Char *pSource );
-double SnumToDouble( INT16 nVal );
+double SnumToDouble( sal_Int16 nVal );
-double Snum32ToDouble( UINT32 nValue );
+double Snum32ToDouble( sal_uInt32 nValue );
-typedef UINT16 StampTyp;
+typedef sal_uInt16 StampTyp;
#define MAKE_STAMP(nF,nS) ((nS&0x0F)+((nF&0x7F)*16))
// Bit 0...3 = Bit 0...3 von Stellenzahl
@@ -66,24 +66,24 @@ public:
pAttr = NULL;
}
- FormIdent( BYTE nFormat, BYTE nSt, SfxUInt32Item& rAttr )
+ FormIdent( sal_uInt8 nFormat, sal_uInt8 nSt, SfxUInt32Item& rAttr )
{
nStamp = MAKE_STAMP( nFormat, nSt );
pAttr = &rAttr;
}
- FormIdent( BYTE nFormat, BYTE nSt )
+ FormIdent( sal_uInt8 nFormat, sal_uInt8 nSt )
{
nStamp = MAKE_STAMP( nFormat, nSt );
pAttr = NULL;
}
- BOOL operator ==( const FormIdent& rComp ) const
+ sal_Bool operator ==( const FormIdent& rComp ) const
{
return ( nStamp == rComp.nStamp );
}
- BOOL operator ==( const StampTyp& rStamp ) const
+ sal_Bool operator ==( const StampTyp& rStamp ) const
{
return ( nStamp == rStamp );
}
@@ -98,7 +98,7 @@ public:
return pAttr;
}
- void SetStamp( BYTE nFormat, BYTE nSt )
+ void SetStamp( sal_uInt8 nFormat, sal_uInt8 nSt )
{
nStamp = MAKE_STAMP( nFormat, nSt );
}
@@ -114,27 +114,27 @@ class FormCache
{
private:
FormIdent aIdents[ __nSize ]; //gepufferte Formate
- BOOL bValid[ __nSize ];
+ sal_Bool bValid[ __nSize ];
FormIdent aCompareIdent; // zum Vergleichen
- BYTE nDefaultFormat; // Defaultformat der Datei
+ sal_uInt8 nDefaultFormat; // Defaultformat der Datei
SvNumberFormatter* pFormTable; // Value-Format-Table-Anker
StampTyp nIndex;
LanguageType eLanguage; // Systemsprache
- SfxUInt32Item* NewAttr( BYTE nFormat, BYTE nSt );
+ SfxUInt32Item* NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt );
public:
- FormCache( ScDocument*, BYTE nNewDefaultFormat = 0xFF );
+ FormCache( ScDocument*, sal_uInt8 nNewDefaultFormat = 0xFF );
~FormCache();
- inline const SfxUInt32Item* GetAttr( BYTE nFormat, BYTE nSt );
- void SetDefaultFormat( BYTE nD = 0xFF )
+ inline const SfxUInt32Item* GetAttr( sal_uInt8 nFormat, sal_uInt8 nSt );
+ void SetDefaultFormat( sal_uInt8 nD = 0xFF )
{
nDefaultFormat = nD;
}
};
-inline const SfxUInt32Item* FormCache::GetAttr( BYTE nFormat, BYTE nSt )
+inline const SfxUInt32Item* FormCache::GetAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
{
// PREC: nFormat = Lotus-Format-Byte
// nSt = Stellenzahl
@@ -154,7 +154,7 @@ inline const SfxUInt32Item* FormCache::GetAttr( BYTE nFormat, BYTE nSt )
DBG_ASSERT( pAttr, "FormCache::GetAttr(): Nix Speicherus" );
aIdents[ nIndex ] = FormIdent( nFormat, nSt, *pAttr );
- bValid[ nIndex ] = TRUE;
+ bValid[ nIndex ] = sal_True;
pRet = pAttr;
}
diff --git a/sc/source/filter/inc/xcl97dum.hxx b/sc/source/filter/inc/xcl97dum.hxx
index 771a3edadfed..cc7acd23bd8a 100644
--- a/sc/source/filter/inc/xcl97dum.hxx
+++ b/sc/source/filter/inc/xcl97dum.hxx
@@ -36,55 +36,55 @@
class ExcDummy8_00a : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen() const;
- virtual const BYTE* GetData() const;
+ virtual const sal_uInt8* GetData() const;
};
class ExcDummy8_00b : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen() const;
- virtual const BYTE* GetData() const;
+ virtual const sal_uInt8* GetData() const;
};
class ExcDummy8_040 : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen() const;
- virtual const BYTE* GetData() const;
+ virtual const sal_uInt8* GetData() const;
};
class ExcDummy8_041 : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen() const;
- virtual const BYTE* GetData() const;
+ virtual const sal_uInt8* GetData() const;
};
class ExcDummy8_02 : public ExcDummyRec
{
private:
- static const BYTE pMyData[];
+ static const sal_uInt8 pMyData[];
static const sal_Size nMyLen;
public:
virtual sal_Size GetLen() const;
- virtual const BYTE* GetData() const;
+ virtual const sal_uInt8* GetData() const;
};
diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx
index d48933bdbb62..55f33b6033e4 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -114,7 +114,7 @@ public:
virtual EscherExHostAppData* StartShape(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& rxShape,
const Rectangle* pChildAnchor );
- virtual void EndShape( UINT16 nShapeType, UINT32 nShapeID );
+ virtual void EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID );
virtual EscherExHostAppData* EnterAdditionalTextGroup();
/// Flush and merge PicStream into EscherStream
@@ -152,7 +152,7 @@ private:
XclEscherHostAppData* pCurrAppData;
XclEscherClientData* pTheClientData; // always the same
XclEscherClientTextbox* pAdditionalText;
- USHORT nAdditionalText;
+ sal_uInt16 nAdditionalText;
sal_uInt32 mnNextKey;
bool mbIsRootDff;
};
@@ -162,13 +162,13 @@ private:
class XclEscherHostAppData : public EscherExHostAppData
{
private:
- BOOL bStackedGroup;
+ sal_Bool bStackedGroup;
public:
- XclEscherHostAppData() : bStackedGroup( FALSE )
+ XclEscherHostAppData() : bStackedGroup( false )
{}
- inline void SetStackedGroup( BOOL b ) { bStackedGroup = b; }
- inline BOOL IsStackedGroup() const { return bStackedGroup; }
+ inline void SetStackedGroup( sal_Bool b ) { bStackedGroup = b; }
+ inline sal_Bool IsStackedGroup() const { return bStackedGroup; }
};
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index f15ed6b635bb..b60e9ea4f178 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -50,7 +50,7 @@ public:
/// return: 1-based ObjId
///! count>=0xFFFF: Obj will be deleted, return 0
- UINT16 Add( XclObj* );
+ sal_uInt16 Add( XclObj* );
inline XclExpMsoDrawing* GetMsodrawingPerSheet() { return pMsodrawingPerSheet; }
@@ -88,7 +88,7 @@ protected:
UINT16 nObjId;
UINT16 nGrbit;
SCTAB mnScTab;
- BOOL bFirstOnSheet;
+ sal_Bool bFirstOnSheet;
bool mbOwnEscher; /// true = Escher part created on the fly.
@@ -114,17 +114,17 @@ public:
inline void SetTab( SCTAB nScTab ) { mnScTab = nScTab; }
inline SCTAB GetTab() const { return mnScTab; }
- inline void SetLocked( BOOL b )
+ inline void SetLocked( sal_Bool b )
{ b ? nGrbit |= 0x0001 : nGrbit &= ~0x0001; }
- inline void SetPrintable( BOOL b )
+ inline void SetPrintable( sal_Bool b )
{ b ? nGrbit |= 0x0010 : nGrbit &= ~0x0010; }
- inline void SetAutoFill( BOOL b )
+ inline void SetAutoFill( sal_Bool b )
{ b ? nGrbit |= 0x2000 : nGrbit &= ~0x2000; }
- inline void SetAutoLine( BOOL b )
+ inline void SetAutoLine( sal_Bool b )
{ b ? nGrbit |= 0x4000 : nGrbit &= ~0x4000; }
// set corresponding Excel object type in OBJ/ftCmo
- void SetEscherShapeType( UINT16 nType );
+ void SetEscherShapeType( sal_uInt16 nType );
inline void SetEscherShapeTypeGroup() { mnObjType = EXC_OBJTYPE_GROUP; }
/** If set to true, this object has created its own escher data.
@@ -177,13 +177,13 @@ public:
class XclObjDropDown : public XclObj
{
private:
- BOOL bIsFiltered;
+ sal_Bool bIsFiltered;
virtual void WriteSubRecs( XclExpStream& rStrm );
protected:
public:
- XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, BOOL bFilt );
+ XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, sal_Bool bFilt );
virtual ~XclObjDropDown();
};
@@ -204,7 +204,7 @@ public:
virtual void Save( XclExpStream& rStrm );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
private:
@@ -269,15 +269,15 @@ private:
class ExcBof8_Base : public ExcBof_Base
{
protected:
- UINT32 nFileHistory; // bfh
- UINT32 nLowestBiffVer; // sfo
+ sal_uInt32 nFileHistory; // bfh
+ sal_uInt32 nLowestBiffVer; // sfo
virtual void SaveCont( XclExpStream& rStrm );
public:
ExcBof8_Base();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -327,7 +327,7 @@ public:
class XclObproj : public ExcRecord
{
public:
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -342,7 +342,7 @@ private:
public:
XclCodename( const String& );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -355,13 +355,13 @@ public:
class ExcEScenarioCell
{
private:
- UINT16 nCol;
- UINT16 nRow;
+ sal_uInt16 nCol;
+ sal_uInt16 nRow;
XclExpString sText;
protected:
public:
- ExcEScenarioCell( UINT16 nC, UINT16 nR, const String& rTxt );
+ ExcEScenarioCell( sal_uInt16 nC, sal_uInt16 nR, const String& rTxt );
inline sal_Size GetStringBytes()
{ return sText.GetSize(); }
@@ -381,12 +381,12 @@ private:
XclExpString sName;
XclExpString sComment;
XclExpString sUserName;
- UINT8 nProtected;
+ sal_uInt8 nProtected;
inline ExcEScenarioCell* _First() { return (ExcEScenarioCell*) List::First(); }
inline ExcEScenarioCell* _Next() { return (ExcEScenarioCell*) List::Next(); }
- BOOL Append( UINT16 nCol, UINT16 nRow, const String& rTxt );
+ sal_Bool Append( sal_uInt16 nCol, sal_uInt16 nRow, const String& rTxt );
virtual void SaveCont( XclExpStream& rStrm );
@@ -395,7 +395,7 @@ public:
ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab );
virtual ~ExcEScenario();
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -406,7 +406,7 @@ public:
class ExcEScenarioManager : public ExcRecord, private List
{
private:
- UINT16 nActive;
+ sal_uInt16 nActive;
inline ExcEScenario* _First() { return (ExcEScenario*) List::First(); }
inline ExcEScenario* _Next() { return (ExcEScenario*) List::Next(); }
@@ -424,7 +424,7 @@ public:
virtual void Save( XclExpStream& rStrm );
virtual void SaveXml( XclExpXmlStream& rStrm );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
};
@@ -450,13 +450,13 @@ private:
class XclCalccount : public ExcRecord
{
private:
- UINT16 nCount;
+ sal_uInt16 nCount;
protected:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclCalccount( const ScDocument& );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -468,13 +468,13 @@ public:
class XclIteration : public ExcRecord
{
private:
- UINT16 nIter;
+ sal_uInt16 nIter;
protected:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclIteration( const ScDocument& );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -492,7 +492,7 @@ protected:
public:
XclDelta( const ScDocument& );
- virtual UINT16 GetNum() const;
+ virtual sal_uInt16 GetNum() const;
virtual sal_Size GetLen() const;
virtual void SaveXml( XclExpXmlStream& rStrm );
@@ -511,11 +511,11 @@ public:
// ============================================================================
-class XclExpFilePass : public XclExpRecord
+class XclExpFileEncryption : public XclExpRecord
{
public:
- explicit XclExpFilePass( const XclExpRoot& rRoot );
- virtual ~XclExpFilePass();
+ explicit XclExpFileEncryption( const XclExpRoot& rRoot );
+ virtual ~XclExpFileEncryption();
private:
virtual void WriteBody( XclExpStream& rStrm );
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index 1981ca7b990b..373181f6c321 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -50,6 +50,10 @@ namespace com { namespace sun { namespace star {
{
class XModel;
}
+ namespace chart
+ {
+ class XAxis;
+ }
namespace chart2
{
struct ScaleData;
@@ -376,6 +380,8 @@ public:
/** Converts frame formatting properties from the passed property set. */
void Convert( const ScfPropertySet& rPropSet );
+ /** Sets the specified automatic flags. */
+ void SetAutoFlags( bool bAutoPos, bool bAutoSize );
/** Returns true, if the frame object contains default formats. */
bool IsDefault() const;
@@ -1011,18 +1017,21 @@ public:
explicit XclExpChLabelRange( const XclExpChRoot& rRoot );
/** Converts category axis scaling settings. */
- void Convert( const ::com::sun::star::chart2::ScaleData& rScaleData, bool bMirrorOrient );
+ void Convert( const ::com::sun::star::chart2::ScaleData& rScaleData,
+ const ScfPropertySet& rChart1Axis, bool bMirrorOrient );
/** Converts position settings of a crossing axis at this axis. */
void ConvertAxisPosition( const ScfPropertySet& rPropSet );
/** Sets flag for tickmark position between categories or on categories. */
inline void SetTicksBetweenCateg( bool bTicksBetween )
- { ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_BETWEEN, bTicksBetween ); }
+ { ::set_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_BETWEEN, bTicksBetween ); }
private:
+ virtual void Save( XclExpStream& rStrm );
virtual void WriteBody( XclExpStream& rStrm );
private:
- XclChLabelRange maData; /// Contents of the CHLABELRANGE record.
+ XclChLabelRange maLabelData; /// Contents of the CHLABELRANGE record.
+ XclChDateRange maDateData; /// Contents of the CHDATERANGE record.
};
typedef boost::shared_ptr< XclExpChLabelRange > XclExpChLabelRangeRef;
@@ -1085,6 +1094,7 @@ class XclExpChAxis : public XclExpChGroupBase, public XclExpChFontBase
public:
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > XDiagramRef;
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > XAxisRef;
+ typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart::XAxis > XChart1AxisRef;
public:
explicit XclExpChAxis( const XclExpChRoot& rRoot, sal_uInt16 nAxisType );
@@ -1095,7 +1105,8 @@ public:
virtual void SetRotation( sal_uInt16 nRotation );
/** Converts formatting and scaling settings from the passed axis. */
- void Convert( XAxisRef xAxis, XAxisRef xCrossingAxis, const XclChExtTypeInfo& rTypeInfo );
+ void Convert( XAxisRef xAxis, XAxisRef xCrossingAxis,
+ XChart1AxisRef xChart1Axis, const XclChExtTypeInfo& rTypeInfo );
/** Converts and writes 3D wall/floor properties from the passed diagram. */
void ConvertWall( XDiagramRef xDiagram );
diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx
index 41ceb8410b02..1e1b9f39b4a1 100644
--- a/sc/source/filter/inc/xecontent.hxx
+++ b/sc/source/filter/inc/xecontent.hxx
@@ -247,11 +247,11 @@ class ScValidationData;
class XclExpDV : public XclExpRecord, protected XclExpRoot
{
public:
- explicit XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle );
+ explicit XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle );
virtual ~XclExpDV();
/** Returns the core handle of the validation data. */
- inline ULONG GetScHandle() const { return mnScHandle; }
+ inline sal_uLong GetScHandle() const { return mnScHandle; }
/** Inserts a new cell range into the cell range list. */
void InsertCellRange( const ScRange& rPos );
@@ -278,7 +278,7 @@ private:
XclTokenArrayRef mxTokArr2; /// Formula for second condition.
::rtl::OUString msFormula2; /// OOXML Formula for second condition.
sal_uInt32 mnFlags; /// Miscellaneous flags.
- ULONG mnScHandle; /// The core handle for quick list search.
+ sal_uLong mnScHandle; /// The core handle for quick list search.
};
// ----------------------------------------------------------------------------
@@ -291,7 +291,7 @@ public:
virtual ~XclExpDval();
/** Inserts the cell range into the range list of the DV record with the specified handle. */
- void InsertCellRange( const ScRange& rRange, ULONG nScHandle );
+ void InsertCellRange( const ScRange& rRange, sal_uLong nScHandle );
/** Writes the DVAL record and the DV record list. */
virtual void Save( XclExpStream& rStrm );
@@ -299,7 +299,7 @@ public:
private:
/** Searches for or creates a XclExpDV record object with the specified handle. */
- XclExpDV& SearchOrCreateDv( ULONG nScHandle );
+ XclExpDV& SearchOrCreateDv( sal_uLong nScHandle );
/** Writes the body of the DVAL record. */
virtual void WriteBody( XclExpStream& rStrm );
diff --git a/sc/source/filter/inc/xename.hxx b/sc/source/filter/inc/xename.hxx
index 24371e19b4dd..f896d4bf48a2 100644
--- a/sc/source/filter/inc/xename.hxx
+++ b/sc/source/filter/inc/xename.hxx
@@ -51,9 +51,9 @@ public:
void Initialize();
/** Inserts the Calc name with the passed index and returns the Excel NAME index. */
- sal_uInt16 InsertName( USHORT nScNameIdx );
+ sal_uInt16 InsertName( sal_uInt16 nScNameIdx );
/** Inserts the Calc database range with the passed index and returns the Excel NAME index. */
- sal_uInt16 InsertDBRange( USHORT nScDBRangeIdx );
+ sal_uInt16 InsertDBRange( sal_uInt16 nScDBRangeIdx );
/** Inserts a new built-in defined name, referring to the passed sheet range. */
sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, const ScRange& rRange );
diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx
index 17673e840d7b..4bfa6dbb0d0d 100644
--- a/sc/source/filter/inc/xerecord.hxx
+++ b/sc/source/filter/inc/xerecord.hxx
@@ -259,7 +259,7 @@ typedef XclExpValueRecord< double > XclExpDoubleRecord;
// ----------------------------------------------------------------------------
/** Record which contains a Boolean value.
- @descr The value is stored as 16-bit value: 0x0000 = FALSE, 0x0001 = TRUE. */
+ @descr The value is stored as 16-bit value: 0x0000 = sal_False, 0x0001 = TRUE. */
class XclExpBoolRecord : public XclExpRecord
{
public:
diff --git a/sc/source/filter/inc/xeroot.hxx b/sc/source/filter/inc/xeroot.hxx
index dc8652ecbfe6..f27546eb219e 100644
--- a/sc/source/filter/inc/xeroot.hxx
+++ b/sc/source/filter/inc/xeroot.hxx
@@ -29,6 +29,8 @@
#ifndef SC_XEROOT_HXX
#define SC_XEROOT_HXX
+#include <com/sun/star/beans/NamedValue.hpp>
+
#include "xlroot.hxx"
#include <boost/shared_ptr.hpp>
@@ -160,7 +162,9 @@ public:
bool IsDocumentEncrypted() const;
- String GetPassword() const;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > GenerateEncryptionData( const ::rtl::OUString& aPass ) const;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > GetEncryptionData() const;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > GenerateDefaultEncryptionData() const;
private:
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 8ae34b1f58a7..8e18bf6e3644 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -31,11 +31,14 @@
#ifndef SC_XESTREAM_HXX
#define SC_XESTREAM_HXX
+#include <com/sun/star/beans/NamedValue.hpp>
+
#include <map>
#include <stack>
#include <string>
#include <oox/core/xmlfilterbase.hxx>
+#include <oox/token/tokens.hxx>
#include <sax/fshelper.hxx>
#include "xlstream.hxx"
@@ -209,13 +212,14 @@ private:
class XclExpBiff8Encrypter
{
public:
- explicit XclExpBiff8Encrypter( const XclExpRoot& rRoot, const sal_uInt8 nDocId[16],
- const sal_uInt8 nSalt[16] );
+ explicit XclExpBiff8Encrypter( const XclExpRoot& rRoot );
~XclExpBiff8Encrypter();
bool IsValid() const;
- void GetSaltDigest( sal_uInt8 nSaltDigest[16] ) const;
+ void GetSaltDigest( sal_uInt8 pnSaltDigest[16] ) const;
+ void GetSalt( sal_uInt8 pnSalt[16] ) const;
+ void GetDocId( sal_uInt8 pnDocId[16] ) const;
void Encrypt( SvStream& rStrm, sal_uInt8 nData );
void Encrypt( SvStream& rStrm, sal_uInt16 nData );
@@ -231,17 +235,16 @@ public:
void EncryptBytes( SvStream& rStrm, ::std::vector<sal_uInt8>& aBytes );
private:
- void Init( const String& aPass, const sal_uInt8 nDocId[16],
- const sal_uInt8 nSalt[16] );
+ void Init( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData );
sal_uInt32 GetBlockPos( sal_Size nStrmPos ) const;
sal_uInt16 GetOffsetInBlock( sal_Size nStrmPos ) const;
private:
::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
- sal_uInt16 mnPassw[16]; /// Cached password data for copy construction.
- sal_uInt8 mnDocId[16]; /// Cached document ID for copy construction.
- sal_uInt8 mnSaltDigest[16];
+ sal_uInt8 mpnDocId[16];
+ sal_uInt8 mpnSalt[16];
+ sal_uInt8 mpnSaltDigest[16];
const XclExpRoot& mrRoot;
sal_Size mnOldPos; /// Last known stream position
@@ -340,6 +343,7 @@ public:
virtual oox::drawingml::chart::ChartConverter& getChartConverter();
private:
+ virtual ::oox::ole::VbaProject* implCreateVbaProject() const;
virtual ::rtl::OUString implGetImplementationName() const;
ScDocShell *getDocShell();
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 37ec6a866baa..8f38b6f13352 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -277,10 +277,10 @@ private:
/** Stores a core number format index with corresponding Excel format index. */
struct XclExpNumFmt
{
- ULONG mnScNumFmt; /// Core index of the number format.
+ sal_uLong mnScNumFmt; /// Core index of the number format.
sal_uInt16 mnXclNumFmt; /// Resulting Excel format index.
- inline explicit XclExpNumFmt( ULONG nScNumFmt, sal_uInt16 nXclNumFmt ) :
+ inline explicit XclExpNumFmt( sal_uLong nScNumFmt, sal_uInt16 nXclNumFmt ) :
mnScNumFmt( nScNumFmt ), mnXclNumFmt( nXclNumFmt ) {}
};
@@ -296,12 +296,12 @@ public:
virtual ~XclExpNumFmtBuffer();
/** Returns the core index of the current standard number format. */
- inline ULONG GetStandardFormat() const { return mnStdFmt; }
+ inline sal_uLong GetStandardFormat() const { return mnStdFmt; }
/** Inserts a number format into the format buffer.
@param nScNumFmt The core index of the number format.
@return The resulting Excel format index. */
- sal_uInt16 Insert( ULONG nScNumFmt );
+ sal_uInt16 Insert( sal_uLong nScNumFmt );
/** Writes all FORMAT records contained in this buffer. */
virtual void Save( XclExpStream& rStrm );
@@ -322,7 +322,7 @@ private:
SvNumberFormatterPtr mxFormatter; /// Special number formatter for conversion.
XclExpNumFmtVec maFormatMap; /// Maps core formats to Excel indexes.
NfKeywordTable* mpKeywordTable; /// Replacement table.
- ULONG mnStdFmt; /// Key for standard number format.
+ sal_uLong mnStdFmt; /// Key for standard number format.
sal_uInt16 mnXclOffset; /// Offset to first user defined format.
};
@@ -454,7 +454,7 @@ public:
const XclExpRoot& rRoot,
const ScPatternAttr& rPattern,
sal_Int16 nScript,
- ULONG nScForceNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND,
+ sal_uLong nScForceNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND,
sal_uInt16 nForceXclFont = EXC_FONT_NOTFOUND,
bool bForceLineBreak = false );
/** Constructs a style XF record from the passed cell style sheet. */
@@ -475,7 +475,7 @@ public:
@descr Searches for cell XFs only. */
bool Equals(
const ScPatternAttr& rPattern,
- ULONG nScForceNumFmt,
+ sal_uLong nScForceNumFmt,
sal_uInt16 nForceXclFont,
bool bForceLineBreak ) const;
@@ -504,7 +504,7 @@ protected: // access for XclExpDefaultXF
XclExpCellBorder maBorder; /// Border line style.
XclExpCellArea maArea; /// Background area style.
sal_uInt32 mnParentXFId; /// XF ID of parent XF record.
- ULONG mnScNumFmt; /// Calc number format index.
+ sal_uLong mnScNumFmt; /// Calc number format index.
sal_uInt16 mnXclFont; /// Excel font index.
sal_uInt16 mnXclNumFmt; /// Excel number format index.
sal_Int32 mnBorderId; /// OOXML Border Index
@@ -520,7 +520,7 @@ private:
void Init(
const SfxItemSet& rItemSet,
sal_Int16 nScript,
- ULONG nForceScNumFmt,
+ sal_uLong nForceScNumFmt,
sal_uInt16 nForceXclFont,
bool bForceLineBreak,
bool bDefStyle );
@@ -627,7 +627,7 @@ public:
@return A unique XF record ID. */
sal_uInt32 InsertWithNumFmt(
const ScPatternAttr* pPattern, sal_Int16 nScript,
- ULONG nForceScNumFmt,
+ sal_uLong nForceScNumFmt,
bool bForceLineBreak );
/** Inserts the passed cell style. Creates a style XF record and a STYLE record.
@return A unique XF record ID. */
@@ -660,7 +660,7 @@ private:
private:
/** Returns the XF ID of the cell XF containing the passed format. */
- sal_uInt32 FindXF( const ScPatternAttr& rPattern, ULONG nForceScNumFmt,
+ sal_uInt32 FindXF( const ScPatternAttr& rPattern, sal_uLong nForceScNumFmt,
sal_uInt16 nForceXclFont, bool bForceLineBreak ) const;
/** Returns the XF ID of the style XF containing the passed style. */
sal_uInt32 FindXF( const SfxStyleSheetBase& rStyleSheet ) const;
@@ -671,7 +671,7 @@ private:
/** Tries to find the XF record containing the passed format or inserts a new record.
@return The XF record ID. */
sal_uInt32 InsertCellXF( const ScPatternAttr* pPattern, sal_Int16 nScript,
- ULONG nForceScNumFmt,
+ sal_uLong nForceScNumFmt,
sal_uInt16 nForceXclFont, bool bForceLineBreak );
/** Inserts the passed cell style. Creates a style XF record and a STYLE record.
@return The XF record ID. */
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 8e426e86f210..a9440ee6d8ea 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -137,6 +137,11 @@ public:
/** Converts the passed rectangle from Excel chart units into 1/100 mm. */
::com::sun::star::awt::Rectangle CalcHmmFromChartRect( const XclChRectangle& rRect ) const;
+ /** Converts the passed horizontal coordinate from 1/100 mm into a relative position. */
+ double CalcRelativeFromHmmX( sal_Int32 nPosX ) const;
+ /** Converts the passed vertical coordinate from 1/100 mm into a relative position. */
+ double CalcRelativeFromHmmY( sal_Int32 nPosY ) const;
+
/** Converts the passed horizontal coordinate from Excel chart units into a relative position. */
double CalcRelativeFromChartX( sal_Int32 nPosX ) const;
/** Converts the passed vertical coordinate from Excel chart units into a relative position. */
@@ -1137,13 +1142,16 @@ public:
explicit XclImpChLabelRange( const XclImpChRoot& rRoot );
/** Reads the CHLABELRANGE record (category axis scaling properties). */
void ReadChLabelRange( XclImpStream& rStrm );
+ /** Reads the CHDATERANGE record (date axis scaling properties). */
+ void ReadChDateRange( XclImpStream& rStrm );
/** Converts category axis scaling settings. */
void Convert( ScfPropertySet& rPropSet, ScaleData& rScaleData, bool bMirrorOrient ) const;
/** Converts position settings of this axis at a crossing axis. */
void ConvertAxisPosition( ScfPropertySet& rPropSet, bool b3dChart ) const;
private:
- XclChLabelRange maData; /// Contents of the CHLABELRANGE record.
+ XclChLabelRange maLabelData; /// Contents of the CHLABELRANGE record.
+ XclChDateRange maDateData; /// Contents of the CHDATERANGE record.
};
typedef boost::shared_ptr< XclImpChLabelRange > XclImpChLabelRangeRef;
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 667ba6305a06..be6a48f317bc 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -977,7 +977,7 @@ public:
protected:
/** Returns a color from the Excel color palette. */
- virtual bool GetColorFromPalette( USHORT nIndex, Color& rColor ) const;
+ virtual bool GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const;
};
// ----------------------------------------------------------------------------
@@ -1038,7 +1038,7 @@ private:
Rectangle& rTextRect,
SdrObject* pOldSdrObj = 0 );
/** Returns the BLIP stream position, based on the passed DFF stream position. */
- virtual ULONG Calc_nBLIPPos( ULONG nOrgVal, ULONG nStreamPos ) const;
+ virtual sal_uLong Calc_nBLIPPos( sal_uLong nOrgVal, sal_uLong nStreamPos ) const;
// virtual functions of SvxMSConvertOCXControls
@@ -1049,7 +1049,7 @@ private:
const ::com::sun::star::awt::Size& rSize,
::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >* pxShape,
- BOOL bFloatingCtrl );
+ sal_Bool bFloatingCtrl );
private:
/** Data per registered drawing manager, will be stacked for recursive calls. */
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index 084a8461a844..90b9d8c88c50 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -313,7 +313,7 @@ public:
/** Returns the cached Calc error code, if this value has Error type, else 0. */
inline sal_uInt8 GetXclError() const { return (mnType == EXC_CACHEDVAL_ERROR) ? mnBoolErr : EXC_ERR_NA; }
/** Returns the cached Calc error code, if this value has Error type, else 0. */
- USHORT GetScError() const;
+ sal_uInt16 GetScError() const;
/** Returns the token array if this is a Boolean value or error value, else 0. */
inline const ScTokenArray* GetBoolErrFmla() const { return mxTokArr.get(); }
diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx
index 9333474fca83..238997e7a000 100644
--- a/sc/source/filter/inc/xistream.hxx
+++ b/sc/source/filter/inc/xistream.hxx
@@ -66,10 +66,9 @@ public:
/** Creates a (ref-counted) copy of this decrypter object. */
XclImpDecrypterRef Clone() const;
- /** Implementation of the ::comphelper::IDocPasswordVerifier interface,
- calls the new virtual function implVerify(). */
- virtual ::comphelper::DocPasswordVerifierResult
- verifyPassword( const ::rtl::OUString& rPassword );
+ /** Implementation of the ::comphelper::IDocPasswordVerifier interface */
+ virtual ::comphelper::DocPasswordVerifierResult verifyPassword( const ::rtl::OUString& rPassword, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& o_rEncryptionData );
+ virtual ::comphelper::DocPasswordVerifierResult verifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData );
/** Updates the decrypter on start of a new record or after seeking stream. */
void Update( SvStream& rStrm, sal_uInt16 nRecSize );
@@ -86,7 +85,10 @@ private:
virtual XclImpDecrypter* OnClone() const = 0;
/** Derived classes implement password verification and initialization of
the decoder. */
- virtual bool OnVerify( const ::rtl::OUString& rPassword ) = 0;
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >
+ OnVerifyPassword( const ::rtl::OUString& rPassword ) = 0;
+ virtual bool OnVerifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData ) = 0;
+
/** Implementation of updating the decrypter. */
virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize ) = 0;
/** Implementation of the decryption. */
@@ -113,7 +115,9 @@ private:
/** Implementation of cloning this object. */
virtual XclImpBiff5Decrypter* OnClone() const;
/** Implements password verification and initialization of the decoder. */
- virtual bool OnVerify( const ::rtl::OUString& rPassword );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >
+ OnVerifyPassword( const ::rtl::OUString& rPassword );
+ virtual bool OnVerifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData );
/** Implementation of updating the decrypter. */
virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize );
/** Implementation of the decryption. */
@@ -121,7 +125,7 @@ private:
private:
::msfilter::MSCodec_XorXLS95 maCodec; /// Crypto algorithm implementation.
- ::std::vector< sal_uInt8 > maPassword;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > maEncryptionData;
sal_uInt16 mnKey;
sal_uInt16 mnHash;
};
@@ -142,7 +146,9 @@ private:
/** Implementation of cloning this object. */
virtual XclImpBiff8Decrypter* OnClone() const;
/** Implements password verification and initialization of the decoder. */
- virtual bool OnVerify( const ::rtl::OUString& rPassword );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >
+ OnVerifyPassword( const ::rtl::OUString& rPassword );
+ virtual bool OnVerifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData );
/** Implementation of updating the decrypter. */
virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize );
/** Implementation of the decryption. */
@@ -155,7 +161,7 @@ private:
private:
::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
- ::std::vector< sal_uInt16 > maPassword;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > maEncryptionData;
::std::vector< sal_uInt8 > maSalt;
::std::vector< sal_uInt8 > maVerifier;
::std::vector< sal_uInt8 > maVerifierHash;
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index 399f0027b155..5c74d82ee295 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -69,6 +69,9 @@ public:
@return The color from current or default palette or COL_AUTO, if nothing else found. */
inline Color GetColor( sal_uInt16 nXclIndex ) const
{ return Color( GetColorData( nXclIndex ) ); }
+ /** Returns the palette colors as UNO sequence. */
+ ::com::sun::star::uno::Sequence< sal_Int32 >
+ CreateColorSequence() const;
/** Reads a PALETTE record. */
void ReadPalette( XclImpStream& rStrm );
@@ -232,7 +235,7 @@ public:
void CreateScFormats();
/** Returns the format key with the passed Excel index or NUMBERFORMAT_ENTRY_NOT_FOUND on error. */
- ULONG GetScFormat( sal_uInt16 nXclNumFmt ) const;
+ sal_uLong GetScFormat( sal_uInt16 nXclNumFmt ) const;
/** Fills an Excel number format to the passed item set.
@param rItemSet The destination item set.
@@ -246,11 +249,11 @@ public:
@param nScNumFmt The Calc number formatter index of the format.
@param bSkipPoolDefs true = Do not put items equal to pool default; false = Put all items. */
void FillScFmtToItemSet(
- SfxItemSet& rItemSet, ULONG nScNumFmt,
+ SfxItemSet& rItemSet, sal_uLong nScNumFmt,
bool bSkipPoolDefs = false ) const;
private:
- typedef ::std::map< sal_uInt16, ULONG > XclImpIndexMap;
+ typedef ::std::map< sal_uInt16, sal_uLong > XclImpIndexMap;
XclImpIndexMap maIndexMap; /// Maps Excel format indexes to Calc formats.
sal_uInt16 mnNextXclIdx; /// Index counter for BIFF2-BIFF4.
@@ -592,16 +595,16 @@ private:
void Find(
XclImpXFRange*& rpPrevRange,
XclImpXFRange*& rpNextRange,
- ULONG& rnNextIndex,
+ sal_uLong& rnNextIndex,
SCROW nScRow );
/** Tries to concatenate a range with its predecessor.
@descr The ranges must have the same XF index and must not have a gap.
The resulting range has the index nIndex-1. */
- void TryConcatPrev( ULONG nIndex );
+ void TryConcatPrev( sal_uLong nIndex );
/** Insert a range into the list at the specified index. */
- void Insert(XclImpXFRange* pXFRange, ULONG nIndex);
+ void Insert(XclImpXFRange* pXFRange, sal_uLong nIndex);
private:
IndexList maIndexList; /// The list of XF index range.
@@ -660,7 +663,7 @@ private:
@param nLine
BOX_LINE_RIGHT = copy most-right border of top row;
BOX_LINE_BOTTOM = copy most-bottom border of first column. */
- void SetBorderLine( const ScRange& rRange, SCTAB nScTab, USHORT nLine );
+ void SetBorderLine( const ScRange& rRange, SCTAB nScTab, sal_uInt16 nLine );
private:
typedef boost::shared_ptr< XclImpXFRangeColumn > XclImpXFRangeColumnRef;
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 6c4ced698745..51fe688a857e 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -103,6 +103,7 @@ class XclRoot;
#define EXC_CHPROP_ERRORBARX CREATE_OUSTRING( "ErrorBarX" )
#define EXC_CHPROP_ERRORBARY CREATE_OUSTRING( "ErrorBarY" )
#define EXC_CHPROP_EXPANSION CREATE_OUSTRING( "Expansion" )
+#define EXC_CHPROP_EXPTIMEINCREMENT CREATE_OUSTRING( "ExplicitTimeIncrement" )
#define EXC_CHPROP_FILLBITMAPMODE CREATE_OUSTRING( "FillBitmapMode" )
#define EXC_CHPROP_FILLSTYLE CREATE_OUSTRING( "FillStyle" )
#define EXC_CHPROP_GAPWIDTHSEQ CREATE_OUSTRING( "GapwidthSequence" )
@@ -127,6 +128,7 @@ class XclRoot;
#define EXC_CHPROP_PERSPECTIVE CREATE_OUSTRING( "Perspective" )
#define EXC_CHPROP_POSITIVEERROR CREATE_OUSTRING( "PositiveError" )
#define EXC_CHPROP_RELATIVEPOSITION CREATE_OUSTRING( "RelativePosition" )
+#define EXC_CHPROP_RELATIVESIZE CREATE_OUSTRING( "RelativeSize" )
#define EXC_CHPROP_RIGHTANGLEDAXES CREATE_OUSTRING( "RightAngledAxes" )
#define EXC_CHPROP_ROLE CREATE_OUSTRING( "Role" )
#define EXC_CHPROP_ROTATIONHORIZONTAL CREATE_OUSTRING( "RotationHorizontal" )
@@ -723,6 +725,23 @@ const sal_uInt8 EXC_CH3DDATAFORMAT_TRUNC = 2; /// Shart top, trunc
const sal_uInt16 EXC_ID_CHPIEEXT = 0x1061;
+// (0x1062) CHDATERANGE -------------------------------------------------------
+
+const sal_uInt16 EXC_ID_CHDATERANGE = 0x1062;
+
+const sal_uInt16 EXC_CHDATERANGE_AUTOMIN = 0x0001;
+const sal_uInt16 EXC_CHDATERANGE_AUTOMAX = 0x0002;
+const sal_uInt16 EXC_CHDATERANGE_AUTOMAJOR = 0x0004;
+const sal_uInt16 EXC_CHDATERANGE_AUTOMINOR = 0x0008;
+const sal_uInt16 EXC_CHDATERANGE_DATEAXIS = 0x0010;
+const sal_uInt16 EXC_CHDATERANGE_AUTOBASE = 0x0020;
+const sal_uInt16 EXC_CHDATERANGE_AUTOCROSS = 0x0040; /// Other axis crosses at own maximum.
+const sal_uInt16 EXC_CHDATERANGE_AUTODATE = 0x0080; /// Recognize date/text automatically.
+
+const sal_uInt16 EXC_CHDATERANGE_DAYS = 0;
+const sal_uInt16 EXC_CHDATERANGE_MONTHS = 1;
+const sal_uInt16 EXC_CHDATERANGE_YEARS = 2;
+
// (0x1066) CHESCHERFORMAT ----------------------------------------------------
const sal_uInt16 EXC_ID_CHESCHERFORMAT = 0x1066;
@@ -1056,6 +1075,23 @@ struct XclChLabelRange
// ----------------------------------------------------------------------------
+struct XclChDateRange
+{
+ sal_uInt16 mnMinDate; /// Minimum value on axis.
+ sal_uInt16 mnMaxDate; /// Maximum value on axis.
+ sal_uInt16 mnMajorStep; /// Distance for major grid lines.
+ sal_uInt16 mnMajorUnit; /// Time unit for major step.
+ sal_uInt16 mnMinorStep; /// Distance for minor grid lines.
+ sal_uInt16 mnMinorUnit; /// Time unit for minor step.
+ sal_uInt16 mnBaseUnit; /// Time unit for axis values.
+ sal_uInt16 mnCross; /// Crossing position of other axis.
+ sal_uInt16 mnFlags; /// Additional flags.
+
+ explicit XclChDateRange();
+};
+
+// ----------------------------------------------------------------------------
+
struct XclChValueRange
{
double mfMin; /// Minimum value on axis.
diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx
index 35e5ef5c948f..207d8cb392b8 100644
--- a/sc/source/filter/inc/xlconst.hxx
+++ b/sc/source/filter/inc/xlconst.hxx
@@ -140,6 +140,8 @@ const sal_Int32 EXC_RK_INT100 = EXC_RK_100FLAG | EXC_RK_INTFLAG;
const sal_Int32 EXC_POINTS_PER_INCH = 72;
const sal_Int32 EXC_TWIPS_PER_INCH = EXC_POINTS_PER_INCH * 20;
+const double EXC_POINTS_PER_HMM = static_cast< double >( EXC_POINTS_PER_INCH ) / 2540.0;
+
const sal_uInt8 EXC_ORIENT_NONE = 0; /// Text orientation: not rotated.
const sal_uInt8 EXC_ORIENT_STACKED = 1; /// Text orientation: vertically stacked.
const sal_uInt8 EXC_ORIENT_90CCW = 2; /// Text orientation: 90 deg counterclockwise.
diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx
index c81df26fa0c1..b0c41ff320ee 100644
--- a/sc/source/filter/inc/xlescher.hxx
+++ b/sc/source/filter/inc/xlescher.hxx
@@ -30,7 +30,7 @@
#define SC_XLESCHER_HXX
#include <tools/gen.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include "fapihelper.hxx"
#include "xladdress.hxx"
#include "xlstyle.hxx"
diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx
index 520af6f1d69b..1f9cf30909e9 100644
--- a/sc/source/filter/inc/xlformula.hxx
+++ b/sc/source/filter/inc/xlformula.hxx
@@ -113,8 +113,8 @@ const sal_uInt8 EXC_TOKID_AREAERR3D = 0x1D; /// Deleted 3D area refe
const sal_uInt16 EXC_TOK_STR_MAXLEN = 255; /// Maximum string length of a tStr token.
-const sal_uInt8 EXC_TOK_BOOL_FALSE = 0; /// FALSE value of a tBool token.
-const sal_uInt8 EXC_TOK_BOOL_TRUE = 1; /// TRUE value of a tBool token.
+const sal_uInt8 EXC_TOK_BOOL_FALSE = 0; /// sal_False value of a tBool token.
+const sal_uInt8 EXC_TOK_BOOL_TRUE = 1; /// sal_True value of a tBool token.
const sal_uInt8 EXC_TOK_ATTR_VOLATILE = 0x01; /// Volatile function.
const sal_uInt8 EXC_TOK_ATTR_IF = 0x02; /// Start of true condition in IF function.
diff --git a/sc/source/filter/inc/xlpage.hxx b/sc/source/filter/inc/xlpage.hxx
index f58f815edcbe..4c7412ab9171 100644
--- a/sc/source/filter/inc/xlpage.hxx
+++ b/sc/source/filter/inc/xlpage.hxx
@@ -153,7 +153,7 @@ struct XclPageData : private boost::noncopyable
/** Returns the real paper size (twips) from the paper size index and paper orientation. */
Size GetScPaperSize() const;
/** Sets the Excel paper size index and paper orientation from Calc paper size (twips). */
- void SetScPaperSize( const Size& rSize, bool bPortrait, bool bStrict = sal_False );
+ void SetScPaperSize( const Size& rSize, bool bPortrait, bool bStrict = false );
};
// ============================================================================
diff --git a/sc/source/filter/inc/xlpivot.hxx b/sc/source/filter/inc/xlpivot.hxx
index 59934ac83ab9..560e18a19a2b 100644
--- a/sc/source/filter/inc/xlpivot.hxx
+++ b/sc/source/filter/inc/xlpivot.hxx
@@ -599,7 +599,7 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclPTItemInfo& rInfo );
// General field settings =====================================================
-typedef ::std::vector< USHORT > XclPTSubtotalVec;
+typedef ::std::vector< sal_uInt16 > XclPTSubtotalVec;
/** Contains data for a pivot table field (SXVD record). */
struct XclPTFieldInfo : public XclPTVisNameInfo
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index 5ca44d0b7726..53d9535c87b7 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -29,6 +29,8 @@
#ifndef SC_XLROOT_HXX
#define SC_XLROOT_HXX
+#include <com/sun/star/beans/NamedValue.hpp>
+
#include <i18npool/lang.h>
#include <sot/storage.hxx>
#include "xlconst.hxx"
@@ -201,7 +203,8 @@ public:
/** Returns the default password used for stream encryption. */
inline const String& GetDefaultPassword() const { return mrData.maDefPassword; }
/** Requests and verifies a password from the medium or the user. */
- String RequestPassword( ::comphelper::IDocPasswordVerifier& rVerifier ) const;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >
+ RequestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ) const;
/** Returns the OLE2 root storage of the imported/exported file.
@return Pointer to root storage or 0, if the file is a simple stream. */
@@ -241,6 +244,8 @@ public:
SvNumberFormatter& GetFormatter() const;
/** Returns the null date of the current number formatter. */
DateTime GetNullDate() const;
+ /** Returns the base year depending on the current null date (1900 or 1904). */
+ sal_uInt16 GetBaseYear() const;
/** Converts a date/time value to a floating-point value. */
double GetDoubleFromDateTime( const DateTime& rDateTime ) const;
/** Converts a floating-point value to a date/time value. */
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index b9b1f1902b9e..793576339c2f 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -466,7 +466,7 @@ public:
explicit XclNumFmtBuffer( const XclRoot& rRoot );
/** Returns the core index of the current standard number format. */
- inline ULONG GetStdScNumFmt() const { return mnStdScNumFmt; }
+ inline sal_uLong GetStdScNumFmt() const { return mnStdScNumFmt; }
protected:
typedef ::std::map< sal_uInt16, XclNumFmt > XclNumFmtMap;
@@ -486,7 +486,7 @@ private:
XclNumFmtMap maFmtMap; /// Map containing all default and user-defined formats.
LanguageType meSysLang; /// Current system language.
- ULONG mnStdScNumFmt; /// Calc format key for standard number format.
+ sal_uLong mnStdScNumFmt; /// Calc format key for standard number format.
};
// Cell formatting data (XF) ==================================================
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index b34cd4c3b8cf..bfe284f198da 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -121,9 +121,9 @@ public:
static sal_uInt8 GetXclOrientFromRot( sal_uInt16 nXclRot );
/** Converts a Calc error code to an Excel error code. */
- static sal_uInt8 GetXclErrorCode( USHORT nScError );
+ static sal_uInt8 GetXclErrorCode( sal_uInt16 nScError );
/** Converts an Excel error code to a Calc error code. */
- static USHORT GetScErrorCode( sal_uInt8 nXclError );
+ static sal_uInt16 GetScErrorCode( sal_uInt8 nXclError );
/** Converts the passed BIFF error to a double containing the respective Calc error code. */
static double ErrorToDouble( sal_uInt8 nXclError );
@@ -150,10 +150,10 @@ public:
/** Returns the Calc column width (twips) for the passed Excel width.
@param nScCharWidth Width of the '0' character in Calc (twips). */
- static USHORT GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth );
+ static sal_uInt16 GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth );
/** Returns the Excel column width for the passed Calc width (twips).
@param nScCharWidth Width of the '0' character in Calc (twips). */
- static sal_uInt16 GetXclColumnWidth( USHORT nScWidth, long nScCharWidth );
+ static sal_uInt16 GetXclColumnWidth( sal_uInt16 nScWidth, long nScCharWidth );
/** Returns a correction value to convert column widths from/to default column widths.
@param nXclDefFontHeight Excel height of application default font. */
diff --git a/sc/source/filter/inc/xlview.hxx b/sc/source/filter/inc/xlview.hxx
index be84506a6fe8..f05a21594c45 100644
--- a/sc/source/filter/inc/xlview.hxx
+++ b/sc/source/filter/inc/xlview.hxx
@@ -154,7 +154,7 @@ struct XclTabViewData
bool mbShowZeros; /// true = Show zero value zells.
bool mbShowOutline; /// true = Show outlines.
Color maTabBgColor; /// Tab Color default = (COL_AUTO )
- bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? TRUE : FALSE; };
+ bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? sal_True : false; };
sal_uInt32 mnTabBgColorId; /// pallette color id
explicit XclTabViewData();
diff --git a/sc/source/filter/lotus/expop.cxx b/sc/source/filter/lotus/expop.cxx
index 33ecf7d87d07..e1bd599c29cd 100644
--- a/sc/source/filter/lotus/expop.cxx
+++ b/sc/source/filter/lotus/expop.cxx
@@ -42,10 +42,10 @@
#include "exp_op.hxx"
#if ENABLE_LOTUS123_EXPORT
-const USHORT ExportWK1::WK1MAXCOL = 255;
-const USHORT ExportWK1::WK1MAXROW = 8191;
+const sal_uInt16 ExportWK1::WK1MAXCOL = 255;
+const sal_uInt16 ExportWK1::WK1MAXROW = 8191;
-BYTE ExportWK1::GenFormByte( const ScPatternAttr& /*aAttr*/ )
+sal_uInt8 ExportWK1::GenFormByte( const ScPatternAttr& /*aAttr*/ )
{
return 0xFF;
}
@@ -53,41 +53,41 @@ BYTE ExportWK1::GenFormByte( const ScPatternAttr& /*aAttr*/ )
inline void ExportWK1::Bof()
{ // (0x00)
- aOut << ( USHORT ) 0x00 << ( USHORT ) 2 << ( USHORT ) 0x0406; // Version 1-2-3/2, Symhony/1.1
+ aOut << ( sal_uInt16 ) 0x00 << ( sal_uInt16 ) 2 << ( sal_uInt16 ) 0x0406; // Version 1-2-3/2, Symhony/1.1
}
inline void ExportWK1::Eof()
{ // (0x01)
- aOut << ( USHORT ) 0x01 << ( USHORT ) 0;
+ aOut << ( sal_uInt16 ) 0x01 << ( sal_uInt16 ) 0;
}
inline void ExportWK1::Calcmode()
{ // (0x02)
// Calculationmode = automatic
- aOut << ( USHORT ) 0x02 << ( USHORT ) 1 << ( BYTE ) 0xFF;
+ aOut << ( sal_uInt16 ) 0x02 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0xFF;
}
inline void ExportWK1::Calcorder()
{ // (0x03)
// order = natural
- aOut << ( USHORT ) 0x03 << ( USHORT ) 1 << ( BYTE ) 0x00;
+ aOut << ( sal_uInt16 ) 0x03 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00;
}
inline void ExportWK1::Split()
{ // (0x04)
// not split
- aOut << ( USHORT ) 0x04 << ( USHORT ) 1 << ( BYTE ) 0x00;
+ aOut << ( sal_uInt16 ) 0x04 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00;
}
inline void ExportWK1::Sync()
{ // (0x05)
// not synchronized
- aOut << ( USHORT ) 0x05 << ( USHORT ) 1 << ( BYTE ) 0x00;
+ aOut << ( sal_uInt16 ) 0x05 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00;
}
@@ -95,13 +95,13 @@ inline void ExportWK1::Dimensions()
{ // (0x06)
SCCOL nEndCol;
SCROW nEndRow;
- aOut << ( USHORT ) 0x06 << ( USHORT ) 8 << ( USHORT ) 0 << ( USHORT ) 0; // Starting Col/Row
+ aOut << ( sal_uInt16 ) 0x06 << ( sal_uInt16 ) 8 << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0; // Starting Col/Row
pD->GetPrintArea( 0, nEndCol, nEndRow );
#if SC_ROWLIMIT_MORE_THAN_64K
#error row limit 64k
#endif
- USHORT nCol = static_cast<USHORT>(nEndCol);
- USHORT nRow = static_cast<USHORT>(nEndRow);
+ sal_uInt16 nCol = static_cast<sal_uInt16>(nEndCol);
+ sal_uInt16 nRow = static_cast<sal_uInt16>(nEndRow);
DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Dimensions(): Col > WK1MAXCOL" );
DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Dimensions(): Row > WK1MAXROW" );
aOut << nCol << nRow; // Ending Col/Row
@@ -110,57 +110,57 @@ inline void ExportWK1::Dimensions()
inline void ExportWK1::Window1()
{ // (0x07)
- aOut << ( USHORT ) 0x07 << ( USHORT ) 32
- << ( USHORT ) 0 << ( USHORT ) 0 // Cursor Col/Row
- << ( BYTE ) 0xFF // Format: protected, special, default
- << ( BYTE ) 0 // Dummy
- << ( USHORT ) 9 // Default column width
- << ( USHORT ) 8 << ( USHORT ) 14// Number of cols/rows on screen
- << ( USHORT ) 0 << ( USHORT ) 0 // Left col / top row
+ aOut << ( sal_uInt16 ) 0x07 << ( sal_uInt16 ) 32
+ << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Cursor Col/Row
+ << ( sal_uInt8 ) 0xFF // Format: protected, special, default
+ << ( sal_uInt8 ) 0 // Dummy
+ << ( sal_uInt16 ) 9 // Default column width
+ << ( sal_uInt16 ) 8 << ( sal_uInt16 ) 14// Number of cols/rows on screen
+ << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Left col / top row
// Rest aus Doku-Beispiel
- << ( USHORT ) 0 << ( USHORT ) 0 // Number of title cols / rows
- << ( USHORT ) 0 << ( USHORT ) 0 // Left title col / top title row
- << ( USHORT ) 0x0004 << ( USHORT ) 0x0004// Top-left col / row
- << ( USHORT ) 0x0048 // Number of cols in window
- << ( USHORT ) 0x00; // Dummy
+ << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Number of title cols / rows
+ << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Left title col / top title row
+ << ( sal_uInt16 ) 0x0004 << ( sal_uInt16 ) 0x0004// Top-left col / row
+ << ( sal_uInt16 ) 0x0048 // Number of cols in window
+ << ( sal_uInt16 ) 0x00; // Dummy
}
inline void ExportWK1::Colw()
{ // (0x08)
// ACHTUNG: muss nach Window1 und vor hidden cols record kommen!
- USHORT nWidth;
- BYTE nWidthSpaces;
- for( USHORT nCol = 0 ; nCol < 256 ; nCol++ )
+ sal_uInt16 nWidth;
+ sal_uInt8 nWidthSpaces;
+ for( sal_uInt16 nCol = 0 ; nCol < 256 ; nCol++ )
{
nWidth = pD->GetColWidth( static_cast<SCCOL>(nCol), 0 );
- nWidthSpaces = ( BYTE ) ( nWidth / TWIPS_PER_CHAR );
- aOut << ( USHORT ) 0x08 << ( USHORT ) 3 << nCol << nWidthSpaces;
+ nWidthSpaces = ( sal_uInt8 ) ( nWidth / TWIPS_PER_CHAR );
+ aOut << ( sal_uInt16 ) 0x08 << ( sal_uInt16 ) 3 << nCol << nWidthSpaces;
}
}
-void ExportWK1::Blank( const USHORT nCol, const USHORT nRow, const ScPatternAttr& aAttr )
+void ExportWK1::Blank( const sal_uInt16 nCol, const sal_uInt16 nRow, const ScPatternAttr& aAttr )
{ // (0x0C)
// PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW
DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Blank(): Col > WK1MAXCOL" );
DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Blank(): Row > WK1MAXROW" );
- aOut << ( USHORT ) 0x0C << ( USHORT ) 5 << GenFormByte( aAttr ) << nCol << nRow;
+ aOut << ( sal_uInt16 ) 0x0C << ( sal_uInt16 ) 5 << GenFormByte( aAttr ) << nCol << nRow;
}
-void ExportWK1::Number( const USHORT nCol, const USHORT nRow, const double fWert, const ScPatternAttr &aAttr )
+void ExportWK1::Number( const sal_uInt16 nCol, const sal_uInt16 nRow, const double fWert, const ScPatternAttr &aAttr )
{ // (0x0E)
// PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW
DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Number(): Col > WK1MAXCOL" );
DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Number(): Row > WK1MAXROW" );
- aOut << ( USHORT ) 0x0E << ( USHORT ) 13 << GenFormByte( aAttr ) << nCol << nRow << fWert;
+ aOut << ( sal_uInt16 ) 0x0E << ( sal_uInt16 ) 13 << GenFormByte( aAttr ) << nCol << nRow << fWert;
}
-void ExportWK1::Label( const USHORT nCol, const USHORT nRow, const String& rStr, const ScPatternAttr& aAttr )
+void ExportWK1::Label( const sal_uInt16 nCol, const sal_uInt16 nRow, const String& rStr, const ScPatternAttr& aAttr )
{ // (0x0F)
// PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW
DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" );
@@ -168,7 +168,7 @@ void ExportWK1::Label( const USHORT nCol, const USHORT nRow, const String& rStr,
ByteString aStr( rStr, eZielChar );
- USHORT nLaenge = 7; // Anzahl Bytes vor String+Nullbyte am Ende + Alignment-Char
+ sal_uInt16 nLaenge = 7; // Anzahl Bytes vor String+Nullbyte am Ende + Alignment-Char
xub_StrLen nAnz = aStr.Len();
@@ -176,24 +176,24 @@ void ExportWK1::Label( const USHORT nCol, const USHORT nRow, const String& rStr,
if( nAnz > 240 ) // max. 240 Zeichen im String
nAnz = 240;
- nLaenge = nLaenge + ( USHORT ) nAnz; // + Stringlaenge
+ nLaenge = nLaenge + ( sal_uInt16 ) nAnz; // + Stringlaenge
- aOut << ( USHORT ) 0x0F << nLaenge << GenFormByte( aAttr ) << nCol << nRow << ( sal_Char ) '\'';
+ aOut << ( sal_uInt16 ) 0x0F << nLaenge << GenFormByte( aAttr ) << nCol << nRow << ( sal_Char ) '\'';
// ACHTUNG: ZUNAECHST NUR LEFT ALIGNMENT
aOut.Write( aStr.GetBuffer(), nAnz );
- aOut << ( BYTE ) 0x00; // ...und Nullterminator anhaengen
+ aOut << ( sal_uInt8 ) 0x00; // ...und Nullterminator anhaengen
}
-void ExportWK1::Formula( const USHORT nCol, const USHORT nRow, const ScFormulaCell* pFC, const ScPatternAttr& aAttr )
+void ExportWK1::Formula( const sal_uInt16 nCol, const sal_uInt16 nRow, const ScFormulaCell* pFC, const ScPatternAttr& aAttr )
{ // (0x10)
// PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW
DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Formula(): Col > WK1MAXCOL" );
DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Formula(): Row > WK1MAXROW" );
- USHORT nLaenge = 15; // Bytes bis Formel
+ sal_uInt16 nLaenge = 15; // Bytes bis Formel
double fErgebnis;
// zunaechst nur Dummy-Angaben (Formel := Ergebnis der Berechnung )
@@ -201,72 +201,72 @@ void ExportWK1::Formula( const USHORT nCol, const USHORT nRow, const ScFormulaCe
fErgebnis = ( ( ScFormulaCell* ) pFC )->GetValue();
- aOut << ( USHORT ) 0x10 << ( USHORT ) nLaenge
+ aOut << ( sal_uInt16 ) 0x10 << ( sal_uInt16 ) nLaenge
<< GenFormByte( aAttr ) << nCol << nRow
<< fErgebnis
- << ( USHORT ) 9+1 // Dummy-Formula-Size
- << ( BYTE ) 0x00 // constant, floating point
+ << ( sal_uInt16 ) 9+1 // Dummy-Formula-Size
+ << ( sal_uInt8 ) 0x00 // constant, floating point
<< fErgebnis
- << ( BYTE ) 0x03; // return
+ << ( sal_uInt8 ) 0x03; // return
}
inline void ExportWK1::Protect()
{ // (0x24)
//Global protection off
- aOut << ( USHORT ) 0x24 << ( USHORT ) 1 << ( BYTE ) 0x00;
+ aOut << ( sal_uInt16 ) 0x24 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00;
}
inline void ExportWK1::Footer()
{ // (0x25)
// zunaechst nur leerer C-String
- aOut << ( USHORT ) 0x25 << ( USHORT ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String
+ aOut << ( sal_uInt16 ) 0x25 << ( sal_uInt16 ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String
for( short nLauf = 0 ; nLauf < 241 ; nLauf++ )
- aOut << ( BYTE ) 0x00;
+ aOut << ( sal_uInt8 ) 0x00;
}
inline void ExportWK1::Header()
{ // (0x26)
// zunaechst nur leerer C-String
- aOut << ( USHORT ) 0x26 << ( USHORT ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String
+ aOut << ( sal_uInt16 ) 0x26 << ( sal_uInt16 ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String
for( short nLauf = 0 ; nLauf < 241 ; nLauf++ )
- aOut << ( BYTE ) 0x00;
+ aOut << ( sal_uInt8 ) 0x00;
}
inline void ExportWK1::Margins()
{ // (0x28)
- aOut << ( USHORT ) 0x28 << ( USHORT ) 10
- << ( USHORT ) 4 << ( USHORT ) 76 // Left/right margin
- << ( USHORT ) 66 // Page length
- << ( USHORT ) 2 << ( USHORT ) 2; // Top/Bottom margin
+ aOut << ( sal_uInt16 ) 0x28 << ( sal_uInt16 ) 10
+ << ( sal_uInt16 ) 4 << ( sal_uInt16 ) 76 // Left/right margin
+ << ( sal_uInt16 ) 66 // Page length
+ << ( sal_uInt16 ) 2 << ( sal_uInt16 ) 2; // Top/Bottom margin
}
inline void ExportWK1::Labelfmt()
{ // (0x29)
// Global label alignment = left
- aOut << ( USHORT ) 0x29 << ( USHORT ) 1 << ( BYTE ) 0x27;
+ aOut << ( sal_uInt16 ) 0x29 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x27;
}
inline void ExportWK1::Calccount()
{ // (0x2F)
// Iteration count = 16 (oder so aehnlich)
- aOut << ( USHORT ) 0x2F << ( USHORT ) 1 << ( BYTE ) 16;
+ aOut << ( sal_uInt16 ) 0x2F << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 16;
}
inline void ExportWK1::Cursorw12()
{ // (0x31)
// Cursor location in window 1
- aOut << ( USHORT ) 0x31 << ( USHORT ) 1 << ( BYTE ) 1;
+ aOut << ( sal_uInt16 ) 0x31 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 1;
}
-void ExportWK1::WKString( const USHORT /*nCol*/, const USHORT /*nRow*/, const ScFormulaCell* /*pFC*/, const ScPatternAttr& /*aAttr*/ )
+void ExportWK1::WKString( const sal_uInt16 /*nCol*/, const sal_uInt16 /*nRow*/, const ScFormulaCell* /*pFC*/, const ScPatternAttr& /*aAttr*/ )
{ // (0x33)
// PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW
/* DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" );
@@ -275,37 +275,37 @@ void ExportWK1::WKString( const USHORT /*nCol*/, const USHORT /*nRow*/, const Sc
String aStr;
( ( ScFormulaCell * ) pFC )->GetString( aStr ); // Formeltext zunaechst so belassen
- USHORT nLaenge = 6; // Anzahl Bytes vor String+Nullbyte am Ende
+ sal_uInt16 nLaenge = 6; // Anzahl Bytes vor String+Nullbyte am Ende
- USHORT nAnz = aStr.Len();
+ sal_uInt16 nAnz = aStr.Len();
if( nAnz > 240 ) // max. 240 Zeichen im String
nAnz = 240;
nLaenge += nAnz; // + Stringlaenge
- aOut << ( USHORT ) 0x33 << nLaenge
+ aOut << ( sal_uInt16 ) 0x33 << nLaenge
<< GenFormByte( aAttr ) << nCol << nRow;
// Zeichenweise String ausgeben
- for( USHORT nLauf = 0 ; nLauf < nAnz ; nLauf++ )
+ for( sal_uInt16 nLauf = 0 ; nLauf < nAnz ; nLauf++ )
aOut << aStr[ nLauf ];
- aOut << ( BYTE ) 0x00; // ...und Nullterminator anhaengen
+ aOut << ( sal_uInt8 ) 0x00; // ...und Nullterminator anhaengen
*/
}
inline void ExportWK1::Snrange()
{ // (0x47)
- //aOut << ( USHORT ) 0x47 << ( USHORT ) x
+ //aOut << ( sal_uInt16 ) 0x47 << ( sal_uInt16 ) x
/* ScRangeName *pRanges = pD->GetRangeName();
ScRangeData *pData;
String aName;
- USHORT nAnz = pRanges->GetCount();
+ sal_uInt16 nAnz = pRanges->GetCount();
- for( USHORT nLauf = 0 ; nLauf < nAnz ; nLauf++ )
+ for( sal_uInt16 nLauf = 0 ; nLauf < nAnz ; nLauf++ )
{
pData = pRanges[ nLauf ];
@@ -318,7 +318,7 @@ inline void ExportWK1::Hidcol()
{ // (0x64)
sal_uInt32 nHide = 0x00000000; // ...niemand ist versteckt
- aOut << ( USHORT ) 0x64 << ( USHORT ) 32;
+ aOut << ( sal_uInt16 ) 0x64 << ( sal_uInt16 ) 32;
for( int nLauf = 0 ; nLauf < 8 ; nLauf++ )
aOut << nHide; // 8 * 32 Bits = 256
@@ -327,7 +327,7 @@ inline void ExportWK1::Hidcol()
inline void ExportWK1::Cpi()
{ // (0x96)
- //aOut << ( USHORT ) 0x96 << ( USHORT ) x;
+ //aOut << ( sal_uInt16 ) 0x96 << ( sal_uInt16 ) x;
}
@@ -355,7 +355,7 @@ FltError ExportWK1::Write()
// Zellen-Bemachung
ScDocumentIterator aIter( pD, 0, 0 );
ScBaseCell* pCell;
- USHORT nCol, nRow;
+ sal_uInt16 nCol, nRow;
SCTAB nTab;
const ScPatternAttr* pPatAttr;
@@ -370,8 +370,8 @@ FltError ExportWK1::Write()
#if SC_ROWLIMIT_MORE_THAN_64K
#error row limit 64k
#endif
- nCol = static_cast<USHORT>(nScCol);
- nRow = static_cast<USHORT>(nScRow);
+ nCol = static_cast<sal_uInt16>(nScCol);
+ nRow = static_cast<sal_uInt16>(nScRow);
switch( pCell->GetCellType() )
{
@@ -399,7 +399,7 @@ FltError ExportWK1::Write()
case CELLTYPE_NONE:
break;
default:
- DBG_ASSERT( FALSE, "ExportWK1::Write(): unbekannter Celltype!" );
+ DBG_ASSERT( false, "ExportWK1::Write(): unbekannter Celltype!" );
}
}
while( aIter.GetNext() );
diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx
index d521aec97315..c3f53b5eb615 100644
--- a/sc/source/filter/lotus/filter.cxx
+++ b/sc/source/filter/lotus/filter.cxx
@@ -54,7 +54,7 @@
#include "op.h"
// Konstanten ------------------------------------------------------------
-const UINT16 nBOF = 0x0000;
+const sal_uInt16 nBOF = 0x0000;
@@ -62,8 +62,8 @@ const UINT16 nBOF = 0x0000;
extern WKTYP eTyp; // Typ der gerade in bearbeitung befindlichen Datei
WKTYP eTyp;
-extern BOOL bEOF; // zeigt Ende der Datei
-BOOL bEOF;
+extern sal_Bool bEOF; // zeigt Ende der Datei
+sal_Bool bEOF;
extern CharSet eCharNach; // Zeichenkonvertierung von->nach
CharSet eCharNach;
@@ -88,7 +88,7 @@ extern long nDateiLaenge; // -> datei.cpp, ...der gerade offenen Datei
LOTUS_ROOT* pLotusRoot = NULL;
-std::map<UINT16, ScPatternAttr> aLotusPatternPool;
+std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool;
static FltError
generate_Opcodes( SvStream& aStream, ScDocument& rDoc,
@@ -119,12 +119,12 @@ generate_Opcodes( SvStream& aStream, ScDocument& rDoc,
aStream.Seek( STREAM_SEEK_TO_BEGIN );
while( !bEOF && !aStream.IsEof() && (aStream.Tell() < nStrmSize) )
{
- UINT16 nOpcode, nLength;
+ sal_uInt16 nOpcode, nLength;
aStream >> nOpcode >> nLength;
aPrgrsBar.Progress();
if( nOpcode == LOTUS_EOF )
- bEOF = TRUE;
+ bEOF = sal_True;
else if( nOpcode == LOTUS_FILEPASSWD )
return eERR_FILEPASSWD;
@@ -168,7 +168,7 @@ WKTYP ScanVersion( SvStream& aStream )
{
// PREC: pWKDatei: Zeiger auf offene Datei
// POST: return: Typ der Datei
- UINT16 nOpcode, nVersNr, nRecLen;
+ sal_uInt16 nOpcode, nVersNr, nRecLen;
// erstes Byte muss wegen BOF zwingend 0 sein!
aStream >> nOpcode;
@@ -225,7 +225,7 @@ FltError ScImportLotus123old( SvStream& aStream, ScDocument* pDocument, CharSet
// Zeiger auf Dokument global machen
pDoc = pDocument;
- bEOF = FALSE;
+ bEOF = false;
eCharVon = eSrc;
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index bbb6e7b5131d..928b06fe0378 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -101,7 +101,7 @@ LotAttrCache::~LotAttrCache()
const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
{
- UINT32 nRefHash;
+ sal_uInt32 nRefHash;
MakeHash( rAttr, nRefHash );
boost::ptr_vector<ENTRY>::const_iterator iter = std::find_if(aEntries.begin(),aEntries.end(),
@@ -120,7 +120,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
pLotusRoot->pFontBuff->Fill( rAttr.nFont, rItemSet );
- UINT8 nLine = rAttr.nLineStyle;
+ sal_uInt8 nLine = rAttr.nLineStyle;
if( nLine )
{
SvxBoxItem aBox( ATTR_BORDER );
@@ -142,7 +142,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
rItemSet.Put( aBox );
}
- UINT8 nFontCol = rAttr.nFontCol & 0x07;
+ sal_uInt8 nFontCol = rAttr.nFontCol & 0x07;
if( nFontCol )
{
// nFontCol > 0
@@ -152,7 +152,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
rItemSet.Put( *pWhite );
}
- UINT8 nBack = rAttr.nBack & 0x1F;
+ sal_uInt8 nBack = rAttr.nBack & 0x1F;
if( nBack )
rItemSet.Put( SvxBrushItem( GetColor( nBack & 0x07 ), ATTR_BACKGROUND ) );
@@ -235,7 +235,7 @@ void LotAttrCol::SetAttr( const SCROW nRow, const ScPatternAttr& rAttr )
}
-void LotAttrCol::Apply( const SCCOL nColNum, const SCTAB nTabNum, const BOOL /*bClear*/ )
+void LotAttrCol::Apply( const SCCOL nColNum, const SCTAB nTabNum, const sal_Bool /*bClear*/ )
{
ScDocument* pDoc = pLotusRoot->pDoc;
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 2c060819fcbd..4284ac68b4c6 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -46,21 +46,21 @@
extern WKTYP eTyp;
-static const sal_Char* GetAddInName( const UINT8 nIndex );
+static const sal_Char* GetAddInName( const sal_uInt8 nIndex );
static DefTokenId lcl_KnownAddIn( const ByteString& sTest );
-//extern double decipher_Number123( UINT32 nValue );
+//extern double decipher_Number123( sal_uInt32 nValue );
-void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString )
+void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtString )
{
TokenId eParam[ 256 ];
- INT32 nLauf;
+ sal_Int32 nLauf;
TokenId nMerk0, nMerk1;
- BOOL bAddIn = FALSE;
- BOOL bNeg = FALSE;
+ sal_Bool bAddIn = false;
+ sal_Bool bNeg = false;
DBG_ASSERT( nAnz < 128, "-LotusToSc::DoFunc(): Neee! -so viel kann ich nicht!" );
@@ -89,7 +89,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString )
if( eOc == ocNoName )
{
- bAddIn = TRUE;
+ bAddIn = sal_True;
nMerk0 = aPool.Store( eOc, String( t, eSrcChar ) );
aPool << nMerk0;
@@ -168,7 +168,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString )
{
// ACHTUNG: 0 ist der letzte Parameter, nAnz-1 der erste
- INT16 nLast = nAnz - 1;
+ sal_Int16 nLast = nAnz - 1;
if( eOc == ocRMZ )
{ // Extrawurst ocRMZ letzter Parameter negiert!
@@ -223,12 +223,12 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString )
}
-void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD )
+void LotusToSc::LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow, ScSingleRefData& rSRD )
{
// Col-Bemachung
if( nCol & 0x8000 )
{
- rSRD.SetColRel( TRUE );
+ rSRD.SetColRel( sal_True );
if( nCol & 0x0080 )
nCol |= 0xFF00;
else
@@ -238,14 +238,14 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD
}
else
{
- rSRD.SetColRel( FALSE );
+ rSRD.SetColRel( false );
rSRD.nCol = static_cast< SCsCOL >( nCol & 0x00FF );
}
// Row-Bemachung
if( nRow & 0x8000 )
{
- rSRD.SetRowRel( TRUE );
+ rSRD.SetRowRel( sal_True );
// vorzeichenrichtige Erweiterung
switch( eTyp )
{
@@ -272,7 +272,7 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD
}
else
{
- rSRD.SetRowRel( FALSE );
+ rSRD.SetRowRel( false );
switch( eTyp )
{
// 5432 1098 7654 3210
@@ -302,16 +302,16 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD
}
-void LotusToSc::ReadSRD( ScSingleRefData& rSRD, BYTE nRelBit )
+void LotusToSc::ReadSRD( ScSingleRefData& rSRD, sal_uInt8 nRelBit )
{
- BYTE nTab, nCol;
- UINT16 nRow;
+ sal_uInt8 nTab, nCol;
+ sal_uInt16 nRow;
Read( nRow );
Read( nTab );
Read( nCol );
- BOOL b3D = ( static_cast< SCTAB >( nTab ) != aEingPos.Tab() );
+ sal_Bool b3D = ( static_cast< SCTAB >( nTab ) != aEingPos.Tab() );
rSRD.SetColRel( ( nRelBit & 0x01 ) != 0 );
rSRD.nCol = static_cast< SCsCOL >( nCol );
@@ -365,27 +365,27 @@ void LotusToSc::Reset( const ScAddress& rEingPos )
}
-LotusToSc::LotusToSc( SvStream &rStream, CharSet e, BOOL b ) :
+LotusToSc::LotusToSc( SvStream &rStream, CharSet e, sal_Bool b ) :
LotusConverterBase( rStream, 128 )
{
eSrcChar = e;
- bWK3 = FALSE;
+ bWK3 = false;
bWK123 = b;
}
-typedef FUNC_TYPE ( FuncType1 ) ( BYTE );
-typedef DefTokenId ( FuncType2 ) ( BYTE );
+typedef FUNC_TYPE ( FuncType1 ) ( sal_uInt8 );
+typedef DefTokenId ( FuncType2 ) ( sal_uInt8 );
-ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
+ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
const FORMULA_TYPE /*eFT*/ )
{
- BYTE nOc;
- BYTE nAnz;
- BYTE nRelBits;
- UINT16 nStrLen;
- UINT16 nRngIndex;
+ sal_uInt8 nOc;
+ sal_uInt8 nAnz;
+ sal_uInt8 nRelBits;
+ sal_uInt16 nStrLen;
+ sal_uInt16 nRngIndex;
FUNC_TYPE eType = FT_NOP;
TokenId nMerk0;
DefTokenId eOc;
@@ -419,10 +419,10 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
pIndexToType = IndexToType;
pIndexToToken = IndexToToken;
- rR.SetTabRel( TRUE );
+ rR.SetTabRel( sal_True );
rR.nTab = aEingPos.Tab();
rR.nRelTab = 0;
- rR.SetFlag3D( FALSE );
+ rR.SetFlag3D( false );
}
aCRD.Ref2 = rR;
@@ -480,7 +480,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
break;
case FT_Variable:
{
- UINT16 nCol, nRow;
+ sal_uInt16 nCol, nRow;
Read( nCol );
Read( nRow );
@@ -496,7 +496,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
// kein Range dazu
nNewId = aPool.Store( rR );
else
- nNewId = aPool.Store( ( UINT16 ) nId );
+ nNewId = aPool.Store( ( sal_uInt16 ) nId );
}
aStack << nNewId;
@@ -504,7 +504,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
break;
case FT_Range:
{
- UINT16 nColS, nRowS, nColE, nRowE;
+ sal_uInt16 nColS, nRowS, nColE, nRowE;
Read( nColS );
Read( nRowS );
Read( nColE );
@@ -524,7 +524,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
// kein Range dazu
nNewId = aPool.Store( aCRD );
else
- nNewId = aPool.Store( ( UINT16 ) nId );
+ nNewId = aPool.Store( ( sal_uInt16 ) nId );
}
aStack << nNewId;
@@ -536,7 +536,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
break;
case FT_ConstInt:
{
- INT16 nVal;
+ sal_Int16 nVal;
Read( nVal );
aStack << aPool.Store( ( double ) nVal );
}
@@ -634,7 +634,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
case FT_Snum:
if ( bWK123 )
{
- UINT32 nValue;
+ sal_uInt32 nValue;
Read( nValue );
double fValue = Snum32ToDouble( nValue );
@@ -642,7 +642,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
}
else
{
- INT16 nVal;
+ sal_Int16 nVal;
Read( nVal );
aStack << aPool.Store( SnumToDouble( nVal ) );
}
@@ -666,7 +666,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
}
-FUNC_TYPE LotusToSc::IndexToType( BYTE nIndex )
+FUNC_TYPE LotusToSc::IndexToType( sal_uInt8 nIndex )
{
static const FUNC_TYPE pType[ 256 ] =
{ // Code Bezeichnung
@@ -931,7 +931,7 @@ FUNC_TYPE LotusToSc::IndexToType( BYTE nIndex )
}
-DefTokenId LotusToSc::IndexToToken( BYTE nIndex )
+DefTokenId LotusToSc::IndexToToken( sal_uInt8 nIndex )
{
static const DefTokenId pToken[ 256 ] =
{ // Code Bezeichnung
@@ -1197,7 +1197,7 @@ DefTokenId LotusToSc::IndexToToken( BYTE nIndex )
}
-FUNC_TYPE LotusToSc::IndexToTypeWK123( BYTE nIndex )
+FUNC_TYPE LotusToSc::IndexToTypeWK123( sal_uInt8 nIndex )
{
static const FUNC_TYPE pType[ 256 ] =
{ // Code Bezeichnung
@@ -1462,7 +1462,7 @@ FUNC_TYPE LotusToSc::IndexToTypeWK123( BYTE nIndex )
}
-DefTokenId LotusToSc::IndexToTokenWK123( BYTE nIndex )
+DefTokenId LotusToSc::IndexToTokenWK123( sal_uInt8 nIndex )
{
static const DefTokenId pToken[ 256 ] =
{ // Code Bezeichnung
@@ -1730,7 +1730,7 @@ DefTokenId LotusToSc::IndexToTokenWK123( BYTE nIndex )
-const sal_Char* GetAddInName( const UINT8 n )
+const sal_Char* GetAddInName( const sal_uInt8 n )
{
static const sal_Char* pNames[ 256 ] =
{
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index d5aad61a6054..150fee171646 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -55,7 +55,7 @@ static osl::Mutex aLotImpSemaphore;
ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) :
ImportTyp( pDoc, eQ ),
pIn( &aStream ),
- aConv( *pIn, eQ, FALSE )
+ aConv( *pIn, eQ, false )
{
// good point to start locking of import lotus
aLotImpSemaphore.acquire();
@@ -92,8 +92,8 @@ ImportLotus::~ImportLotus()
void ImportLotus::Bof( void )
{
- UINT16 nFileCode, nFileSub, nSaveCnt;
- BYTE nMajorId, nMinorId, nFlags;
+ sal_uInt16 nFileCode, nFileSub, nSaveCnt;
+ sal_uInt8 nMajorId, nMinorId, nFlags;
Read( nFileCode );
Read( nFileSub );
@@ -118,9 +118,9 @@ void ImportLotus::Bof( void )
}
-BOOL ImportLotus::BofFm3( void )
+sal_Bool ImportLotus::BofFm3( void )
{
- UINT16 nFileCode, nFileSub;
+ sal_uInt16 nFileCode, nFileSub;
Read( nFileCode );
Read( nFileSub );
@@ -129,12 +129,12 @@ BOOL ImportLotus::BofFm3( void )
}
-void ImportLotus::Columnwidth( UINT16 nRecLen )
+void ImportLotus::Columnwidth( sal_uInt16 nRecLen )
{
DBG_ASSERT( nRecLen >= 4, "*ImportLotus::Columnwidth(): Record zu kurz!" );
- BYTE nLTab, nWindow2;
- UINT16 nCnt = ( nRecLen - 4 ) / 2;
+ sal_uInt8 nLTab, nWindow2;
+ sal_uInt16 nCnt = ( nRecLen - 4 ) / 2;
Read( nLTab );
Read( nWindow2 );
@@ -146,14 +146,14 @@ void ImportLotus::Columnwidth( UINT16 nRecLen )
{
Skip( 2 );
- BYTE nCol, nSpaces;
+ sal_uInt8 nCol, nSpaces;
while( nCnt )
{
Read( nCol );
Read( nSpaces );
// ACHTUNG: Korrekturfaktor nach 'Augenmass' ermittelt!
- pD->SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), ( UINT16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) );
+ pD->SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), ( sal_uInt16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) );
nCnt--;
}
@@ -161,12 +161,12 @@ void ImportLotus::Columnwidth( UINT16 nRecLen )
}
-void ImportLotus::Hiddencolumn( UINT16 nRecLen )
+void ImportLotus::Hiddencolumn( sal_uInt16 nRecLen )
{
DBG_ASSERT( nRecLen >= 4, "*ImportLotus::Hiddencolumn(): Record zu kurz!" );
- BYTE nLTab, nWindow2;
- UINT16 nCnt = ( nRecLen - 4 ) / 2;
+ sal_uInt8 nLTab, nWindow2;
+ sal_uInt16 nCnt = ( nRecLen - 4 ) / 2;
Read( nLTab );
Read( nWindow2 );
@@ -175,7 +175,7 @@ void ImportLotus::Hiddencolumn( UINT16 nRecLen )
{
Skip( 2 );
- BYTE nCol;
+ sal_uInt8 nCol;
while( nCnt )
{
@@ -190,7 +190,7 @@ void ImportLotus::Hiddencolumn( UINT16 nRecLen )
void ImportLotus::Userrange( void )
{
- UINT16 nRangeType;
+ sal_uInt16 nRangeType;
ScRange aScRange;
sal_Char* pBuffer = new sal_Char[ 32 ];
@@ -213,7 +213,7 @@ void ImportLotus::Errcell( void )
Read( aA );
- pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#ERR!" ) ), (BOOL)TRUE );
+ pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#ERR!" ) ), (sal_Bool)sal_True );
}
@@ -223,7 +223,7 @@ void ImportLotus::Nacell( void )
Read( aA );
- pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#NA!" ) ), (BOOL)TRUE );
+ pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#NA!" ) ), (sal_Bool)sal_True );
}
@@ -239,7 +239,7 @@ void ImportLotus::Labelcell( void )
// aLabel.Convert( pLotusRoot->eCharsetQ );
- pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( aLabel ), (BOOL)TRUE );
+ pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( aLabel ), (sal_Bool)sal_True );
}
@@ -252,24 +252,24 @@ void ImportLotus::Numbercell( void )
Read( fVal );
pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(),
- new ScValueCell( fVal ), (BOOL)TRUE );
+ new ScValueCell( fVal ), (sal_Bool)sal_True );
}
void ImportLotus::Smallnumcell( void )
{
ScAddress aAddr;
- INT16 nVal;
+ sal_Int16 nVal;
Read( aAddr );
Read( nVal );
pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(),
- new ScValueCell( SnumToDouble( nVal ) ), ( BOOL ) TRUE );
+ new ScValueCell( SnumToDouble( nVal ) ), ( sal_Bool ) sal_True );
}
-ScFormulaCell *ImportLotus::Formulacell( UINT16 n )
+ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n )
{
DBG_ASSERT( pIn, "-ImportLotus::Formulacell(): Null-Stream -> Rums!" );
@@ -281,7 +281,7 @@ ScFormulaCell *ImportLotus::Formulacell( UINT16 n )
n -= 14;
const ScTokenArray* pErg;
- INT32 nRest = n;
+ sal_Int32 nRest = n;
aConv.Reset( aAddr );
aConv.SetWK3();
@@ -291,7 +291,7 @@ ScFormulaCell *ImportLotus::Formulacell( UINT16 n )
pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE );
- pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), pZelle, (BOOL)TRUE );
+ pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), pZelle, (sal_Bool)sal_True );
return NULL;
}
@@ -303,13 +303,13 @@ void ImportLotus::Read( String &r )
}
-void ImportLotus::RowPresentation( UINT16 nRecLen )
+void ImportLotus::RowPresentation( sal_uInt16 nRecLen )
{
DBG_ASSERT( nRecLen > 4, "*ImportLotus::RowPresentation(): Record zu kurz!" );
- BYTE nLTab, nFlags;
- UINT16 nRow, nHeight;
- UINT16 nCnt = ( nRecLen - 4 ) / 8;
+ sal_uInt8 nLTab, nFlags;
+ sal_uInt16 nRow, nHeight;
+ sal_uInt16 nCnt = ( nRecLen - 4 ) / 8;
Read( nLTab );
Skip( 1 );
@@ -340,7 +340,7 @@ void ImportLotus::RowPresentation( UINT16 nRecLen )
void ImportLotus::NamedSheet( void )
{
- UINT16 nLTab;
+ sal_uInt16 nLTab;
String aName;
Read( nLTab );
@@ -355,7 +355,7 @@ void ImportLotus::NamedSheet( void )
void ImportLotus::Font_Face( void )
{
- BYTE nNum;
+ sal_uInt8 nNum;
String aName;
Read( nNum );
@@ -373,9 +373,9 @@ void ImportLotus::Font_Face( void )
void ImportLotus::Font_Type( void )
{
- static const UINT16 nAnz = 8;
- UINT16 nCnt;
- UINT16 nType;
+ static const sal_uInt16 nAnz = 8;
+ sal_uInt16 nCnt;
+ sal_uInt16 nType;
for( nCnt = 0 ; nCnt < nAnz ; nCnt++ )
{
@@ -387,9 +387,9 @@ void ImportLotus::Font_Type( void )
void ImportLotus::Font_Ysize( void )
{
- static const UINT16 nAnz = 8;
- UINT16 nCnt;
- UINT16 nSize;
+ static const sal_uInt16 nAnz = 8;
+ sal_uInt16 nCnt;
+ sal_uInt16 nSize;
for( nCnt = 0 ; nCnt < nAnz ; nCnt++ )
{
@@ -399,18 +399,18 @@ void ImportLotus::Font_Ysize( void )
}
-void ImportLotus::_Row( const UINT16 nRecLen )
+void ImportLotus::_Row( const sal_uInt16 nRecLen )
{
DBG_ASSERT( nExtTab >= 0, "*ImportLotus::_Row(): Kann hier nicht sein!" );
- UINT16 nRow;
- UINT16 nHeight;
- UINT16 nCntDwn = ( nRecLen - 4 ) / 5;
+ sal_uInt16 nRow;
+ sal_uInt16 nHeight;
+ sal_uInt16 nCntDwn = ( nRecLen - 4 ) / 5;
SCCOL nColCnt = 0;
- UINT8 nRepeats;
+ sal_uInt8 nRepeats;
LotAttrWK3 aAttr;
- BOOL bCenter = FALSE;
+ sal_Bool bCenter = false;
SCCOL nCenterStart = 0, nCenterEnd = 0;
Read( nRow );
@@ -446,7 +446,7 @@ void ImportLotus::_Row( const UINT16 nRecLen )
}
else
{// ganz neue Center
- bCenter = TRUE;
+ bCenter = sal_True;
nCenterStart = nColCnt;
}
nCenterEnd = nColCnt + static_cast<SCCOL>(nRepeats);
@@ -456,7 +456,7 @@ void ImportLotus::_Row( const UINT16 nRecLen )
if( bCenter )
{// evtl. alte Center bemachen
pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) );
- bCenter = FALSE;
+ bCenter = false;
}
}
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 2bc80630e9b5..84cb8df148ba 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -57,10 +57,10 @@ FltError ImportLotus::Read()
S_END // Import finished
};
- UINT16 nOp;
- UINT16 nSubType;
- UINT16 nRecLen;
- UINT32 nNextRec = 0UL;
+ sal_uInt16 nOp;
+ sal_uInt16 nSubType;
+ sal_uInt16 nRecLen;
+ sal_uInt32 nNextRec = 0UL;
FltError eRet = eERR_OK;
// ScFormulaCell *pLastFormCell;
@@ -246,10 +246,10 @@ FltError ImportLotus::Read( SvStream& rIn )
{
pIn = &rIn;
- BOOL bRead = TRUE;
- UINT16 nOp;
- UINT16 nRecLen;
- UINT32 nNextRec = 0UL;
+ sal_Bool bRead = sal_True;
+ sal_uInt16 nOp;
+ sal_uInt16 nRecLen;
+ sal_uInt32 nNextRec = 0UL;
FltError eRet = eERR_OK;
nTab = 0;
@@ -265,7 +265,7 @@ FltError ImportLotus::Read( SvStream& rIn )
*pIn >> nOp >> nRecLen;
if( pIn->IsEof() )
- bRead = FALSE;
+ bRead = false;
else
{
nNextRec += nRecLen + 4;
@@ -275,13 +275,13 @@ FltError ImportLotus::Read( SvStream& rIn )
case 0x0000: // BOF
if( nRecLen != 26 || !BofFm3() )
{
- bRead = FALSE;
+ bRead = false;
eRet = eERR_FORMAT;
}
break;
case 0x0001: // EOF
- bRead = FALSE;
+ bRead = false;
DBG_ASSERT( nTab == 0,
"-ImportLotus::Read( SvStream& ): Zweimal EOF nicht erlaubt" );
nTab++;
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index 8a9623057788..050ede83ff1f 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -46,7 +46,7 @@ extern FltError ScImportLotus123old( SvStream&, ScDocument*, CharSet eSrc );
FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, CharSet eSrc )
{
ScFilterOptions aFilterOpt;
- BOOL bWithWK3 = aFilterOpt.GetWK3Flag();
+ sal_Bool bWithWK3 = aFilterOpt.GetWK3Flag();
SvStream* pStream = rMedium.GetInStream();
@@ -87,7 +87,7 @@ FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocum
{// versuchen *.FM3-File zu laden
INetURLObject aURL( rMedium.GetURLObject() );
aURL.setExtension( CREATE_STRING( "FM3" ) );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ, sal_True );
pStream = aMedium.GetInStream();
if ( pStream )
{
diff --git a/sc/source/filter/lotus/memory.cxx b/sc/source/filter/lotus/memory.cxx
index 68b26befa1aa..439d2d010521 100644
--- a/sc/source/filter/lotus/memory.cxx
+++ b/sc/source/filter/lotus/memory.cxx
@@ -55,8 +55,8 @@ sal_Char* pPuffer; // -> flt_xxx.cxx
sal_Char* pDummy1; // -> flt_xxx.cxx, ScanVersion()
sal_Char* pDummy2; // -> tool.cxx, CreateTable()
-extern BYTE* pFormelBuffer; // -> tool.cxx, fuer OP_Formula()
-BYTE* pFormelBuffer;
+extern sal_uInt8* pFormelBuffer; // -> tool.cxx, fuer OP_Formula()
+sal_uInt8* pFormelBuffer;
extern FormCache* pValueFormCache; // -> tool.cxx
@@ -72,8 +72,8 @@ sal_Char* pAnsi;
#endif
sal_Char* pErgebnis; // -> op.cxx
-extern BOOL bFormInit; // -> tool.cxx, fuer GetFormHandle()
-BOOL bFormInit;
+extern sal_Bool bFormInit; // -> tool.cxx, fuer GetFormHandle()
+sal_Bool bFormInit;
extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter,
*pAttrRepeat, *pAttrStandard; // -> tool.cxx, fuer GetFormAttr()
@@ -81,7 +81,7 @@ extern ScProtectionAttr* pAttrUnprot; // -> tool.cxx, fuer PutFormString()
-BOOL MemNew( void )
+sal_Bool MemNew( void )
{
pPuffer = new sal_Char [ 32L*1024L ];
@@ -100,20 +100,20 @@ BOOL MemNew( void )
pPar = new sal_Char *[ nMaxPar ];
- pFormelBuffer = new BYTE[ 4096 ];
+ pFormelBuffer = new sal_uInt8[ 4096 ];
pValueFormCache = new FormCache( pDoc );
// fuer tool.cxx::PutFormString()
- pAttrUnprot = new ScProtectionAttr( TRUE );
+ pAttrUnprot = new ScProtectionAttr( sal_True );
pAttrRight = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY );
pAttrLeft = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY );
pAttrCenter = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY );
pAttrRepeat = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_REPEAT, ATTR_HOR_JUSTIFY );
pAttrStandard = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY );
- bFormInit = TRUE;
+ bFormInit = sal_True;
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 1a6603e5a30c..e5e780355eeb 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -74,64 +74,64 @@
#include <string.h>
#include <math.h>
#include <ctype.h>
-#if defined( MAC ) || defined( ICC )
+#if defined( ICC )
#include <stdlib.h>
#endif
extern sal_Char* pAnsi; // -> memory.cxx, Puffer zum Umwandeln von OEM->ANSI
extern sal_Char* pErgebnis; // -> memory.cxx, Ergebnispuffer
extern WKTYP eTyp; // -> filter.cxx, aktueller Dateityp
-extern BOOL bEOF; // -> filter.cxx, zeigt Dateiende an
+extern sal_Bool bEOF; // -> filter.cxx, zeigt Dateiende an
extern sal_Char* pPuffer0; // -> memory.cxx
extern sal_Char* pPuffer1;
-extern BYTE nDefaultFormat; // -> tool.cxx, Default-Zellenformat
+extern sal_uInt8 nDefaultFormat; // -> tool.cxx, Default-Zellenformat
extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff
-extern BYTE* pFormelBuffer; // -> memory.cxx, fuer
+extern sal_uInt8* pFormelBuffer; // -> memory.cxx, fuer
extern CharSet eCharVon; // -> filter.cxx, character set specified
-static UINT16 nDefWidth = ( UINT16 ) ( TWIPS_PER_CHAR * 10 );
+static sal_uInt16 nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * 10 );
-extern std::map<UINT16, ScPatternAttr> aLotusPatternPool;
+extern std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool;
-void NI( SvStream& r, UINT16 n )
+void NI( SvStream& r, sal_uInt16 n )
{
r.SeekRel( n );
}
-void OP_BOF( SvStream& r, UINT16 /*n*/ )
+void OP_BOF( SvStream& r, sal_uInt16 /*n*/ )
{
r.SeekRel( 2 ); // Versionsnummer ueberlesen
}
-void OP_EOF( SvStream& /*r*/, UINT16 /*n*/ )
+void OP_EOF( SvStream& /*r*/, sal_uInt16 /*n*/ )
{
- bEOF = TRUE;
+ bEOF = sal_True;
}
-void OP_Integer( SvStream& r, UINT16 /*n*/ )
+void OP_Integer( SvStream& r, sal_uInt16 /*n*/ )
{
- BYTE nFormat;
- UINT16 nCol, nRow;
+ sal_uInt8 nFormat;
+ sal_uInt16 nCol, nRow;
SCTAB nTab = 0;
- INT16 nValue;
+ sal_Int16 nValue;
r >> nFormat >> nCol >> nRow >> nValue;
ScValueCell* pZelle = new ScValueCell( ( double ) nValue );
- pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( BOOL ) TRUE );
+ pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True );
// 0 Stellen nach'm Komma!
SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, 0 );
}
-void OP_Number( SvStream& r, UINT16 /*n*/ )
+void OP_Number( SvStream& r, sal_uInt16 /*n*/ )
{
- BYTE nFormat;
- UINT16 nCol, nRow;
+ sal_uInt8 nFormat;
+ sal_uInt16 nCol, nRow;
SCTAB nTab = 0;
double fValue;
@@ -139,16 +139,16 @@ void OP_Number( SvStream& r, UINT16 /*n*/ )
fValue = ::rtl::math::round( fValue, 15 );
ScValueCell* pZelle = new ScValueCell( fValue );
- pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( BOOL ) TRUE );
+ pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True );
SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat );
}
-void OP_Label( SvStream& r, UINT16 n )
+void OP_Label( SvStream& r, sal_uInt16 n )
{
- BYTE nFormat;
- UINT16 nCol, nRow;
+ sal_uInt8 nFormat;
+ sal_uInt16 nCol, nRow;
SCTAB nTab = 0;
r >> nFormat >> nCol >> nRow;
@@ -170,8 +170,8 @@ void OP_Label( SvStream& r, UINT16 n )
void OP_Formula( SvStream& r, UINT16 /*n*/ )
{
- BYTE nFormat;
- UINT16 nCol, nRow, nFormulaSize;
+ sal_uInt8 nFormat;
+ sal_uInt16 nCol, nRow, nFormulaSize;
SCTAB nTab = 0;
r >> nFormat >> nCol >> nRow;
@@ -179,10 +179,10 @@ void OP_Formula( SvStream& r, UINT16 /*n*/ )
r >> nFormulaSize;
const ScTokenArray* pErg;
- INT32 nBytesLeft = nFormulaSize;
+ sal_Int32 nBytesLeft = nFormulaSize;
ScAddress aAddress( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab );
- LotusToSc aConv( r, pLotusRoot->eCharsetQ, FALSE );
+ LotusToSc aConv( r, pLotusRoot->eCharsetQ, false );
aConv.Reset( aAddress );
aConv.Convert( pErg, nBytesLeft );
@@ -190,24 +190,24 @@ void OP_Formula( SvStream& r, UINT16 /*n*/ )
pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE );
- pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( BOOL ) TRUE );
+ pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True );
// nFormat = Standard -> Nachkommastellen wie Float
SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat );
}
-void OP_ColumnWidth( SvStream& r, UINT16 /*n*/ )
+void OP_ColumnWidth( SvStream& r, sal_uInt16 /*n*/ )
{
- UINT16 nCol, nBreite;
- BYTE nWidthSpaces;
+ sal_uInt16 nCol, nBreite;
+ sal_uInt8 nWidthSpaces;
SCTAB nTab = 0;
r >> nCol >> nWidthSpaces;
if( nWidthSpaces )
// Annahme: 10cpi-Zeichensatz
- nBreite = ( UINT16 ) ( TWIPS_PER_CHAR * nWidthSpaces );
+ nBreite = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nWidthSpaces );
else
{
pDoc->SetColHidden(static_cast<SCCOL>(nCol), static_cast<SCCOL>(nCol), 0, true);
@@ -218,10 +218,10 @@ void OP_ColumnWidth( SvStream& r, UINT16 /*n*/ )
}
-void OP_NamedRange( SvStream& r, UINT16 /*n*/ )
+void OP_NamedRange( SvStream& r, sal_uInt16 /*n*/ )
{
// POST: waren Koordinaten ungueltig, wird nicht gespeichert
- UINT16 nColSt, nRowSt, nColEnd, nRowEnd;
+ sal_uInt16 nColSt, nRowSt, nColEnd, nRowEnd;
sal_Char cPuffer[ 32 ];
r.Read( cPuffer, 16 );
@@ -251,11 +251,11 @@ void OP_NamedRange( SvStream& r, UINT16 /*n*/ )
}
-void OP_SymphNamedRange( SvStream& r, UINT16 /*n*/ )
+void OP_SymphNamedRange( SvStream& r, sal_uInt16 /*n*/ )
{
// POST: waren Koordinaten ungueltig, wird nicht gespeichert
UINT16 nColSt, nRowSt, nColEnd, nRowEnd;
- BYTE nType;
+ sal_uInt8 nType;
sal_Char cPuffer[ 32 ];
r.Read( cPuffer, 16 );
@@ -285,29 +285,29 @@ void OP_SymphNamedRange( SvStream& r, UINT16 /*n*/ )
}
-void OP_Footer( SvStream& r, UINT16 n )
+void OP_Footer( SvStream& r, sal_uInt16 n )
{
r.SeekRel( n );
}
-void OP_Header( SvStream& r, UINT16 n )
+void OP_Header( SvStream& r, sal_uInt16 n )
{
r.SeekRel( n );
}
-void OP_Margins( SvStream& r, UINT16 n )
+void OP_Margins( SvStream& r, sal_uInt16 n )
{
r.SeekRel( n );
}
-void OP_HiddenCols( SvStream& r, UINT16 /*n*/ )
+void OP_HiddenCols( SvStream& r, sal_uInt16 /*n*/ )
{
- UINT16 nByte, nBit;
+ sal_uInt16 nByte, nBit;
SCCOL nCount;
- BYTE nAkt;
+ sal_uInt8 nAkt;
nCount = 0;
for( nByte = 0 ; nByte < 32 ; nByte++ ) // 32 Bytes mit ...
@@ -326,7 +326,7 @@ void OP_HiddenCols( SvStream& r, UINT16 /*n*/ )
}
-void OP_Window1( SvStream& r, UINT16 n )
+void OP_Window1( SvStream& r, sal_uInt16 n )
{
r.SeekRel( 4 ); // Cursor Pos ueberspringen
@@ -338,7 +338,7 @@ void OP_Window1( SvStream& r, UINT16 n )
r.SeekRel( n - 8 ); // und den Rest ueberspringen
- nDefWidth = ( UINT16 ) ( TWIPS_PER_CHAR * nDefWidth );
+ nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nDefWidth );
// statt Defaulteinstellung in SC alle Cols zu Fuss setzen
for( SCCOL nCol = 0 ; nCol <= MAXCOL ; nCol++ )
@@ -346,30 +346,30 @@ void OP_Window1( SvStream& r, UINT16 n )
}
-void OP_Blank( SvStream& r, UINT16 /*n*/ )
+void OP_Blank( SvStream& r, sal_uInt16 /*n*/ )
{
- UINT16 nCol, nRow;
- BYTE nFormat;
+ sal_uInt16 nCol, nRow;
+ sal_uInt8 nFormat;
r >> nFormat >> nCol >> nRow;
SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), 0, nFormat, nDezFloat );
}
-void OP_BOF123( SvStream& r, UINT16 /*n*/ )
+void OP_BOF123( SvStream& r, sal_uInt16 /*n*/ )
{
r.SeekRel( 26 );
}
-void OP_EOF123( SvStream& /*r*/, UINT16 /*n*/ )
+void OP_EOF123( SvStream& /*r*/, sal_uInt16 /*n*/ )
{
- bEOF = TRUE;
+ bEOF = sal_True;
}
-void OP_Label123( SvStream& r, UINT16 n )
+void OP_Label123( SvStream& r, sal_uInt16 n )
{
- BYTE nTab, nCol;
- UINT16 nRow;
+ sal_uInt8 nTab, nCol;
+ sal_uInt16 nRow;
r >> nRow >> nTab >> nCol;
n -= 4;
@@ -382,32 +382,32 @@ void OP_Label123( SvStream& r, UINT16 n )
delete []pText;
}
-void OP_Number123( SvStream& r, UINT16 /*n*/ )
+void OP_Number123( SvStream& r, sal_uInt16 /*n*/ )
{
- BYTE nCol,nTab;
- UINT16 nRow;
- UINT32 nValue;
+ sal_uInt8 nCol,nTab;
+ sal_uInt16 nRow;
+ sal_uInt32 nValue;
r >> nRow >> nTab >> nCol >> nValue;
double fValue = Snum32ToDouble( nValue );
ScValueCell *pCell = new ScValueCell( fValue );
- pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (BOOL) TRUE );
+ pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True );
}
-void OP_Formula123( SvStream& r, UINT16 n )
+void OP_Formula123( SvStream& r, sal_uInt16 n )
{
- BYTE nCol,nTab;
- UINT16 nRow;
+ sal_uInt8 nCol,nTab;
+ sal_uInt16 nRow;
r >> nRow >> nTab >> nCol;
r.SeekRel( 8 ); // Result- jump over
const ScTokenArray* pErg;
- INT32 nBytesLeft = n - 12;
+ sal_Int32 nBytesLeft = n - 12;
ScAddress aAddress( nCol, nRow, nTab );
- LotusToSc aConv( r, pLotusRoot->eCharsetQ, TRUE );
+ LotusToSc aConv( r, pLotusRoot->eCharsetQ, sal_True );
aConv.Reset( aAddress );
aConv.Convert( pErg, nBytesLeft );
@@ -415,25 +415,25 @@ void OP_Formula123( SvStream& r, UINT16 n )
pCell->AddRecalcMode( RECALCMODE_ONLOAD_ONCE );
- pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (BOOL) TRUE );
+ pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True );
}
-void OP_IEEENumber123( SvStream& r, UINT16 /*n*/ )
+void OP_IEEENumber123( SvStream& r, sal_uInt16 /*n*/ )
{
- BYTE nCol,nTab;
- UINT16 nRow;
+ sal_uInt8 nCol,nTab;
+ sal_uInt16 nRow;
double dValue;
r >> nRow >> nTab >> nCol >> dValue;
ScValueCell *pCell = new ScValueCell(dValue);
- pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (BOOL) TRUE );
+ pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True );
}
-void OP_Note123( SvStream& r, UINT16 n)
+void OP_Note123( SvStream& r, sal_uInt16 n)
{
- BYTE nTab, nCol;
- UINT16 nRow;
+ sal_uInt8 nTab, nCol;
+ sal_uInt16 nRow;
r >> nRow >> nTab >> nCol;
n -= 4;
@@ -448,7 +448,7 @@ void OP_Note123( SvStream& r, UINT16 n)
ScNoteUtil::CreateNoteFromString( *pDoc, aPos, aNoteText, false, false );
}
-void OP_HorAlign123( BYTE nAlignPattern, SfxItemSet& rPatternItemSet )
+void OP_HorAlign123( sal_uInt8 nAlignPattern, SfxItemSet& rPatternItemSet )
{
// pre: Pattern is stored in the last 3 bites of the 21st byte
// post: Appropriate Horizontal Alignement is set in rPattern according to the bit pattern.
@@ -481,7 +481,7 @@ void OP_HorAlign123( BYTE nAlignPattern, SfxItemSet& rPatternItemSet )
}
}
-void OP_VerAlign123( BYTE nAlignPattern,SfxItemSet& rPatternItemSet )
+void OP_VerAlign123( sal_uInt8 nAlignPattern,SfxItemSet& rPatternItemSet )
{
// pre: Pattern is stored in the last 3 bites of the 22nd byte
// post: Appropriate Verticle Alignement is set in rPattern according to the bit pattern.
@@ -510,9 +510,9 @@ void OP_VerAlign123( BYTE nAlignPattern,SfxItemSet& rPatternItemSet )
}
}
-void OP_CreatePattern123( SvStream& r, UINT16 n)
+void OP_CreatePattern123( SvStream& r, sal_uInt16 n)
{
- UINT16 nCode,nPatternId;
+ sal_uInt16 nCode,nPatternId;
ScPatternAttr aPattern(pDoc->GetPool());
SfxItemSet& rItemSet = aPattern.GetItemSet();
@@ -524,8 +524,8 @@ void OP_CreatePattern123( SvStream& r, UINT16 n)
{
r >> nPatternId;
- BYTE Hor_Align, Ver_Align, temp;
- BOOL bIsBold,bIsUnderLine,bIsItalics;
+ sal_uInt8 Hor_Align, Ver_Align, temp;
+ sal_Bool bIsBold,bIsUnderLine,bIsItalics;
r.SeekRel(12);
@@ -552,13 +552,13 @@ void OP_CreatePattern123( SvStream& r, UINT16 n)
r >> Ver_Align;
OP_VerAlign123( Ver_Align, rItemSet );
- aLotusPatternPool.insert( std::map<UINT16, ScPatternAttr>::value_type( nPatternId, aPattern ) );
+ aLotusPatternPool.insert( std::map<sal_uInt16, ScPatternAttr>::value_type( nPatternId, aPattern ) );
n = n - 20;
}
r.SeekRel(n);
}
-void OP_SheetName123( SvStream& rStream, USHORT nLength )
+void OP_SheetName123( SvStream& rStream, sal_uInt16 nLength )
{
if (nLength <= 4)
{
@@ -576,7 +576,7 @@ void OP_SheetName123( SvStream& rStream, USHORT nLength )
::std::vector<sal_Char> sSheetName;
sSheetName.reserve(nLength-4);
- for (USHORT i = 4; i < nLength; ++i)
+ for (sal_uInt16 i = 4; i < nLength; ++i)
{
sal_Char c;
rStream >> c;
@@ -592,8 +592,8 @@ void OP_SheetName123( SvStream& rStream, USHORT nLength )
void OP_ApplyPatternArea123( SvStream& rStream )
{
- UINT16 nOpcode, nLength;
- UINT16 nCol = 0, nColCount = 0, nRow = 0, nRowCount = 0, nTab = 0, nData, nTabCount = 0, nLevel = 0;
+ sal_uInt16 nOpcode, nLength;
+ sal_uInt16 nCol = 0, nColCount = 0, nRow = 0, nRowCount = 0, nTab = 0, nData, nTabCount = 0, nLevel = 0;
do
{
@@ -644,7 +644,7 @@ void OP_ApplyPatternArea123( SvStream& rStream )
rStream.SeekRel( nLength - 2 );
for( int i = 0; i < nTabCount; i++)
{
- std::map<UINT16, ScPatternAttr>::iterator loc = aLotusPatternPool.find( nData );
+ std::map<sal_uInt16, ScPatternAttr>::iterator loc = aLotusPatternPool.find( nData );
// apparently, files with invalid index occur in the wild -> don't crash then
DBG_ASSERT( loc != aLotusPatternPool.end(), "invalid format index" );
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index 565904437a87..3688066fcb6a 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -62,10 +62,10 @@ extern sal_Char* pDummy2; // -> memory.cxx
extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff
extern CharSet eCharNach; // -> filter.cxx, Zeichenkonvertierung von->nach
-extern BOOL bFormInit; // -> memory.cxx, fuer GetFormHandle()
+extern sal_Bool bFormInit; // -> memory.cxx, fuer GetFormHandle()
//--------------------------------------------------------- GLOBALE VARIABLEN -
-BYTE nDefaultFormat; // -> op.cpp, Standard-Zellenformat
+sal_uInt8 nDefaultFormat; // -> op.cpp, Standard-Zellenformat
extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard;
extern ScProtectionAttr* pAttrUnprot;
@@ -123,14 +123,14 @@ void PutFormString( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString )
{
pDoc->ApplyAttr( nCol, nRow, nTab, *pJustify );
ScStringCell* pZelle = new ScStringCell( String( pString, pLotusRoot->eCharsetQ ) );
- pDoc->PutCell( nCol, nRow, nTab, pZelle, ( BOOL ) TRUE );
+ pDoc->PutCell( nCol, nRow, nTab, pZelle, ( sal_Bool ) sal_True );
}
}
-void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, BYTE nFormat, BYTE nSt )
+void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt )
{
// PREC: nSt = Standard-Dezimalstellenanzahl
pDoc->ApplyAttr( nCol, nRow, nTab, *( pValueFormCache->GetAttr( nFormat, nSt ) ) );
@@ -148,7 +148,7 @@ void InitPage( void )
}
-double SnumToDouble( INT16 nVal )
+double SnumToDouble( sal_Int16 nVal )
{
const double pFacts[ 8 ] = {
5000.0,
@@ -165,15 +165,15 @@ double SnumToDouble( INT16 nVal )
if( nVal & 0x0001 )
{
fVal = pFacts[ ( nVal >> 1 ) & 0x0007 ];
- fVal *= ( INT16 ) ( nVal >> 4 );
+ fVal *= ( sal_Int16 ) ( nVal >> 4 );
}
else
- fVal = ( INT16 ) ( nVal >> 1 );
+ fVal = ( sal_Int16 ) ( nVal >> 1 );
return fVal;
}
-double Snum32ToDouble( UINT32 nValue )
+double Snum32ToDouble( sal_uInt32 nValue )
{
double fValue, temp;
@@ -193,36 +193,36 @@ double Snum32ToDouble( UINT32 nValue )
}
-FormCache::FormCache( ScDocument* pDoc1, BYTE nNewDefaultFormat )
+FormCache::FormCache( ScDocument* pDoc1, sal_uInt8 nNewDefaultFormat )
{ // Default-Format ist 'Default'
nDefaultFormat = nNewDefaultFormat;
pFormTable = pDoc1->GetFormatTable();
- for( UINT16 nC = 0 ; nC < __nSize ; nC++ )
- bValid[ nC ] = FALSE;
+ for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ )
+ bValid[ nC ] = false;
eLanguage = ScGlobal::eLnge;
}
FormCache::~FormCache()
{
- for( UINT16 nC = 0 ; nC < __nSize ; nC++ )
+ for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ )
delete aIdents[ nC ].GetAttr();
}
-SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
+SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
{
// neues Format erzeugen
- BYTE nL, nH; // Low-/High-Nibble
- BYTE nForm = nFormat;
+ sal_uInt8 nL, nH; // Low-/High-Nibble
+ sal_uInt8 nForm = nFormat;
String aFormString;
const sal_Char* pFormString = 0;
- INT16 eType = NUMBERFORMAT_ALL;
- UINT32 nIndex1;
- UINT32 nHandle;
- BOOL bDefault = FALSE;
+ sal_Int16 eType = NUMBERFORMAT_ALL;
+ sal_uInt32 nIndex1;
+ sal_uInt32 nHandle;
+ sal_Bool bDefault = false;
//void GenerateFormat( aFormString, eType, COUNTRY_SYSTEM, LANGUAGE_SYSTEM,
- // BOOL bThousand, BOOL IsRed, UINT16 nPrecision, UINT16 nAnzLeading );
+ // sal_Bool bThousand, sal_Bool IsRed, sal_uInt16 nPrecision, sal_uInt16 nAnzLeading );
if( nForm == 0xFF ) // Default-Format?
nForm = nDefaultFormat;
@@ -239,49 +239,49 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, false, false, nL, 1 );
break;
case 0x01: // Exponentdarstellung (scientific notation)
//fExponent;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_SCIENTIFIC, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, false, false, nL, 1 );
break;
case 0x02: // Waehrungsdarstellung (currency)
//fMoney;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_CURRENCY, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, false, false, nL, 1 );
break;
case 0x03: // Prozent
//fPercent;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_PERCENT, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, false, false, nL, 1 );
break;
case 0x04: // Komma
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, TRUE, FALSE, nL, 1 );
+ eLanguage, sal_True, false, nL, 1 );
break;
case 0x05: // frei
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, false, false, nL, 1 );
break;
case 0x06: // frei
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, false, false, nL, 1 );
nIndex1 = 0;
break;
case 0x07: // Spezialformat
@@ -292,14 +292,14 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, TRUE, nSt, 1 );
+ eLanguage, false, sal_True, nSt, 1 );
break;
case 0x01: // generelles Format
//fStandard;nSt;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nSt, 1 );
+ eLanguage, false, false, nSt, 1 );
break;
case 0x02: // Datum: Tag, Monat, Jahr
//fDate;dfDayMonthYearLong;
@@ -322,7 +322,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
pFormString = "@";
break;
case 0x06: // versteckt
- //wFlag |= paHideAll;bSetFormat = FALSE;
+ //wFlag |= paHideAll;bSetFormat = sal_False;
eType = NUMBERFORMAT_NUMBER;
pFormString = "";
break;
@@ -336,33 +336,33 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
eType = NUMBERFORMAT_TIME;
pFormString = "HH:MM";
break;
- case 0x09: // Date, intern INT32 1
+ case 0x09: // Date, intern sal_Int32 1
//fDate;dfDayMonthYearLong;
eType = NUMBERFORMAT_DATE;
pFormString = "TT.MM.JJJJ";
break;
- case 0x0A: // Date, intern INT32 2
+ case 0x0A: // Date, intern sal_Int32 2
//fDate;dfDayMonthYearLong;
eType = NUMBERFORMAT_DATE;
pFormString = "TT.MM.JJJJ";
break;
- case 0x0B: // Time, intern INT32 1
+ case 0x0B: // Time, intern sal_Int32 1
//fTime;tfHourMinSec24;
eType = NUMBERFORMAT_TIME;
pFormString = "HH:MM:SS";
break;
- case 0x0C: // Time, intern INT32 2
+ case 0x0C: // Time, intern sal_Int32 2
//fTime;tfHourMinSec24;
eType = NUMBERFORMAT_TIME;
pFormString = "HH:MM:SS";
break;
case 0x0F: // Standardeinstellung
//fStandard;nSt;
- bDefault = TRUE;
+ bDefault = sal_True;
break;
default:
//fStandard;nSt;
- bDefault = TRUE;
+ bDefault = sal_True;
break;
}
break;
@@ -371,7 +371,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, false, false, nL, 1 );
nIndex1 = 0;
break;
}
@@ -388,7 +388,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
pFormTable->PutEntry( aFormString, nDummy, eType, nHandle, eLanguage );
}
- return new SfxUInt32Item( ATTR_VALUE_FORMAT, ( UINT32 ) nHandle );
+ return new SfxUInt32Item( ATTR_VALUE_FORMAT, ( sal_uInt32 ) nHandle );
}
@@ -402,10 +402,10 @@ void LotusRange::MakeHash( void )
// ******** nColE
// **************** nRowS
// **************** nRowE
- nHash = static_cast<UINT32>(nColStart);
- nHash += static_cast<UINT32>(nColEnd) << 6;
- nHash += static_cast<UINT32>(nRowStart) << 12;
- nHash += static_cast<UINT32>(nRowEnd ) << 16;
+ nHash = static_cast<sal_uInt32>(nColStart);
+ nHash += static_cast<sal_uInt32>(nColEnd) << 6;
+ nHash += static_cast<sal_uInt32>(nRowStart) << 12;
+ nHash += static_cast<sal_uInt32>(nRowEnd ) << 16;
}
@@ -447,17 +447,17 @@ LotusRangeList::LotusRangeList( void )
pSingRef = &aComplRef.Ref1;
pSingRef->nTab = pSingRef->nRelTab = 0;
- pSingRef->SetColRel( FALSE );
- pSingRef->SetRowRel( FALSE );
- pSingRef->SetTabRel( TRUE );
- pSingRef->SetFlag3D( FALSE );
+ pSingRef->SetColRel( false );
+ pSingRef->SetRowRel( false );
+ pSingRef->SetTabRel( sal_True );
+ pSingRef->SetFlag3D( false );
pSingRef = &aComplRef.Ref2;
pSingRef->nTab = pSingRef->nRelTab = 0;
- pSingRef->SetColRel( FALSE );
- pSingRef->SetRowRel( FALSE );
- pSingRef->SetTabRel( TRUE );
- pSingRef->SetFlag3D( FALSE );
+ pSingRef->SetColRel( false );
+ pSingRef->SetRowRel( false );
+ pSingRef->SetTabRel( sal_True );
+ pSingRef->SetFlag3D( false );
}
@@ -561,12 +561,12 @@ void RangeNameBufferWK3::Add( const String& rOrgName, const ScComplexRefData& rC
if( rRef1.nCol == rRef2.nCol && rRef1.nRow == rRef2.nRow && rRef1.nTab == rRef2.nTab )
{
pScTokenArray->AddSingleReference( rCRD.Ref1 );
- pInsert->bSingleRef = TRUE;
+ pInsert->bSingleRef = sal_True;
}
else
{
pScTokenArray->AddDoubleReference( rCRD );
- pInsert->bSingleRef = FALSE;
+ pInsert->bSingleRef = false;
}
ScRangeData* pData = new ScRangeData( pLotusRoot->pDoc, aScName, *pScTokenArray );
@@ -579,7 +579,7 @@ void RangeNameBufferWK3::Add( const String& rOrgName, const ScComplexRefData& rC
}
-BOOL RangeNameBufferWK3::FindRel( const String& rRef, UINT16& rIndex )
+sal_Bool RangeNameBufferWK3::FindRel( const String& rRef, sal_uInt16& rIndex )
{
StringHashEntry aRef( rRef );
@@ -590,16 +590,16 @@ BOOL RangeNameBufferWK3::FindRel( const String& rRef, UINT16& rIndex )
if( aRef == pFind->aStrHashEntry )
{
rIndex = pFind->nRelInd;
- return TRUE;
+ return sal_True;
}
pFind = ( ENTRY* ) List::Next();
}
- return FALSE;
+ return false;
}
-BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
+sal_Bool RangeNameBufferWK3::FindAbs( const String& rRef, sal_uInt16& rIndex )
{
String aTmp( rRef );
StringHashEntry aRef( aTmp.Erase( 0, 1 ) ); // ohne '$' suchen!
@@ -618,18 +618,18 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
ScSingleRefData* pRef = &pFind->aScComplexRefDataRel.Ref1;
pScTokenArray->Clear();
- pRef->SetColRel( FALSE );
- pRef->SetRowRel( FALSE );
- pRef->SetTabRel( TRUE );
+ pRef->SetColRel( false );
+ pRef->SetRowRel( false );
+ pRef->SetTabRel( sal_True );
if( pFind->bSingleRef )
pScTokenArray->AddSingleReference( *pRef );
else
{
pRef = &pFind->aScComplexRefDataRel.Ref2;
- pRef->SetColRel( FALSE );
- pRef->SetRowRel( FALSE );
- pRef->SetTabRel( TRUE );
+ pRef->SetColRel( false );
+ pRef->SetRowRel( false );
+ pRef->SetTabRel( sal_True );
pScTokenArray->AddDoubleReference( pFind->aScComplexRefDataRel );
}
@@ -642,12 +642,12 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
pLotusRoot->pScRangeName->insert( pData );
}
- return TRUE;
+ return sal_True;
}
pFind = ( ENTRY* ) List::Next();
}
- return FALSE;
+ return false;
}
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 31dff03cda65..9f170d1bf7ec 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -69,7 +69,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt
readString( aLabel, getLength() - 7 );
nStyle = nStyle >> 3;
pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle );
- pDoc->PutCell( nCol, nRow, nTab, ScBaseCell::CreateTextCell( aLabel, pDoc ), (BOOL) TRUE );
+ pDoc->PutCell( nCol, nRow, nTab, ScBaseCell::CreateTextCell( aLabel, pDoc ), (sal_Bool) sal_True );
}
break;
@@ -89,7 +89,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt
ScValueCell* pInteger = new ScValueCell( ( double ) nValue );
nStyle = nStyle >> 3;
pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle );
- pDoc->PutCell(nCol ,nRow, nTab ,pInteger,(BOOL) TRUE);
+ pDoc->PutCell(nCol ,nRow, nTab ,pInteger,(sal_Bool) sal_True);
}
break;
@@ -99,7 +99,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt
ScValueCell* pFloat = new ScValueCell( nValue );
nStyle = nStyle >> 3;
pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle );
- pDoc->PutCell( nCol, nRow, nTab, pFloat, (BOOL) TRUE );
+ pDoc->PutCell( nCol, nRow, nTab, pFloat, (sal_Bool) sal_True );
}
break;
@@ -118,7 +118,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt
nStyle = nStyle >> 3;
pFormula->AddRecalcMode( RECALCMODE_ONLOAD_ONCE );
pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle );
- pDoc->PutCell( nCol, nRow, nTab, pFormula, ( BOOL ) TRUE );
+ pDoc->PutCell( nCol, nRow, nTab, pFormula, ( sal_Bool ) sal_True );
}
}
break;
@@ -146,7 +146,7 @@ FltError ScQProReader::import( ScDocument *pDoc )
sal_uInt16 nVersion;
sal_uInt16 i = 1, j = 1;
SCTAB nTab = 0;
- SetEof( FALSE );
+ SetEof( false );
if( !recordsLeft() )
return eERR_OPEN;
@@ -169,7 +169,7 @@ FltError ScQProReader::import( ScDocument *pDoc )
String aName;
aName.Append( sal_Unicode( 'A' + nTab ) );
if (!nTab)
- pDoc->RenameTab( nTab, aName, FALSE, FALSE);
+ pDoc->RenameTab( nTab, aName, false, false);
else
pDoc->InsertTab( nTab, aName );
}
@@ -179,7 +179,7 @@ FltError ScQProReader::import( ScDocument *pDoc )
break;
case 0x0001: // End of file
- SetEof( TRUE );
+ SetEof( sal_True );
break;
case 0x00ce:{ // Attribute cell
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 0e39d2c7a919..7495199fb704 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -41,44 +41,44 @@
void QProToSc::ReadSRD( ScSingleRefData& rSRD, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 nRelBit )
{
- UINT16 nTmp = nRelBit & 0x1fff;
+ sal_uInt16 nTmp = nRelBit & 0x1fff;
rSRD.InitAddress( ScAddress( nCol, (~nTmp + 1), 0 ) );
if( nRelBit & 0x4000 )
{
rSRD.nRelCol = nCol;
- rSRD.SetColRel( TRUE );
+ rSRD.SetColRel( sal_True );
}
else
{
rSRD.nCol = nCol;
- rSRD.SetColRel( FALSE );
+ rSRD.SetColRel( false );
}
if( nRelBit & 0x2000 )
{
rSRD.nRelRow = (~nTmp + 1);
- rSRD.nRelRow = (INT16)(nTmp << 3);
+ rSRD.nRelRow = (sal_Int16)(nTmp << 3);
rSRD.nRelRow /= 8;
- rSRD.SetRowRel( TRUE );
+ rSRD.SetRowRel( sal_True );
}
else
{
rSRD.nRow = nTmp;
- rSRD.SetRowRel( FALSE );
+ rSRD.SetRowRel( false );
}
if( nRelBit & 0x8000 )
{
rSRD.nRelTab = nPage;
- rSRD.SetTabRel( TRUE );
+ rSRD.SetTabRel( sal_True );
// absolute tab needed in caller for comparison in case of DoubleRef
rSRD.nTab = aEingPos.Tab() + nPage;
}
else
{
rSRD.nTab = nPage;
- rSRD.SetTabRel( FALSE );
+ rSRD.SetTabRel( false );
}
if (rSRD.nTab != aEingPos.Tab())
- rSRD.SetFlag3D( TRUE);
+ rSRD.SetFlag3D( sal_True);
}
QProToSc::QProToSc( SvStream& rStream, const ScAddress& rRefPos ) :
@@ -91,15 +91,15 @@ QProToSc::QProToSc( SvStream& rStream, const ScAddress& rRefPos ) :
void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtString )
{
TokenId eParam[ nBufSize ];
- INT32 nCount;
+ sal_Int32 nCount;
TokenId nPush, nPush1;
- BOOL bAddIn = FALSE;
- BOOL bNeg = FALSE;
+ sal_Bool bAddIn = false;
+ sal_Bool bNeg = false;
if( eOc == ocNoName )
{
- bAddIn = TRUE;
+ bAddIn = sal_True;
if( pExtString )
{
ByteString s;
@@ -327,7 +327,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con
// Sheet name of second corner is not displayed if identical
if (aCRD.Ref1.IsFlag3D() && aCRD.Ref1.nTab == aCRD.Ref2.nTab &&
aCRD.Ref1.IsTabRel() == aCRD.Ref2.IsTabRel())
- aCRD.Ref2.SetFlag3D( FALSE);
+ aCRD.Ref2.SetFlag3D( false);
aStack << aPool.Store( aCRD );
break;
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index 30625483cc54..364fabdb436c 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -139,13 +139,13 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow,
if( nTmp & 0x80 )
{
SfxBoolItem aWrapItem( ATTR_LINEBREAK );
- aWrapItem.SetValue( TRUE );
+ aWrapItem.SetValue( sal_True );
rItemSet.Put( aWrapItem );
}
// Font Attributes
sal_uInt16 nTmpFnt = maFontRecord[ maFont[ nStyle ] ];
- BOOL bIsBold, bIsItalic, bIsUnderLine;
+ sal_Bool bIsBold, bIsItalic, bIsUnderLine;
bIsBold = ( nTmpFnt & 0x0001 ) != 0;
bIsItalic = ( nTmpFnt & 0x0002 ) != 0;
@@ -160,7 +160,7 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow,
rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) );
if (maFontHeight[ maFont [ nStyle ] ])
- rItemSet.Put( SvxFontHeightItem( (ULONG) (20 * maFontHeight[ maFont[ nStyle ] ] ), 100, ATTR_FONT_HEIGHT ) );
+ rItemSet.Put( SvxFontHeightItem( (sal_uLong) (20 * maFontHeight[ maFont[ nStyle ] ] ), 100, ATTR_FONT_HEIGHT ) );
String fntName = maFontType[ maFont[ nStyle ] ];
rItemSet.Put( SvxFontItem( FAMILY_SYSTEM, fntName, EMPTY_STRING, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ) );
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 08502e94573d..ec01c82efce1 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -85,8 +85,8 @@ ScEEImport::ScEEImport( ScDocument* pDocP, const ScRange& rRange ) :
const ScPatternAttr* pPattern = mpDoc->GetPattern(
maRange.aStart.Col(), maRange.aStart.Row(), maRange.aStart.Tab() );
mpEngine = new ScTabEditEngine( *pPattern, mpDoc->GetEditPool() );
- mpEngine->SetUpdateMode( FALSE );
- mpEngine->EnableUndo( FALSE );
+ mpEngine->SetUpdateMode( false );
+ mpEngine->EnableUndo( false );
}
@@ -99,9 +99,9 @@ ScEEImport::~ScEEImport()
}
-ULONG ScEEImport::Read( SvStream& rStream, const String& rBaseURL )
+sal_uLong ScEEImport::Read( SvStream& rStream, const String& rBaseURL )
{
- ULONG nErr = mpParser->Read( rStream, rBaseURL );
+ sal_uLong nErr = mpParser->Read( rStream, rBaseURL );
SCCOL nEndCol;
SCROW nEndRow;
@@ -128,11 +128,11 @@ ULONG ScEEImport::Read( SvStream& rStream, const String& rBaseURL )
}
-void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate )
+void ScEEImport::WriteToDocument( sal_Bool bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate )
{
ScProgress* pProgress = new ScProgress( mpDoc->GetDocumentShell(),
ScGlobal::GetRscString( STR_LOAD_DOC ), mpParser->ListSize() );
- ULONG nProgress = 0;
+ sal_uLong nProgress = 0;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
@@ -147,7 +147,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu
nOverlapRowMax = 0;
nMergeColAdd = 0;
nLastMergedRow = SCROW_MAX;
- BOOL bHasGraphics = FALSE;
+ sal_Bool bHasGraphics = false;
ScEEParseEntry* pE;
if (!pFormatter)
pFormatter = mpDoc->GetFormatTable();
@@ -193,28 +193,28 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu
aSet.ClearItem( EE_PARA_JUST );
// Testen, ob einfacher String ohne gemischte Attribute
- BOOL bSimple = ( pE->aSel.nStartPara == pE->aSel.nEndPara );
- for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END && bSimple; nId++)
+ sal_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;
- SfxItemState eState = aSet.GetItemState( nId, TRUE, &pItem );
+ SfxItemState eState = aSet.GetItemState( nId, sal_True, &pItem );
if (eState == SFX_ITEM_DONTCARE)
- bSimple = FALSE;
+ bSimple = false;
else if (eState == SFX_ITEM_SET)
{
if ( nId == EE_CHAR_ESCAPEMENT ) // Hoch-/Tiefstellen immer ueber EE
{
if ( (SvxEscapement)((const SvxEscapementItem*)pItem)->GetEnumValue()
!= SVX_ESCAPEMENT_OFF )
- bSimple = FALSE;
+ bSimple = false;
}
}
}
if ( bSimple )
{ // Feldbefehle enthalten?
- SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
- bSimple = FALSE;
+ bSimple = false;
}
// HTML
@@ -244,43 +244,43 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu
if ( rESet.Count() )
{
const SfxPoolItem* pItem;
- if ( rESet.GetItemState( ATTR_BACKGROUND, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_BACKGROUND, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
- if ( rESet.GetItemState( ATTR_BORDER, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_BORDER, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
- if ( rESet.GetItemState( ATTR_SHADOW, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_SHADOW, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
// HTML
- if ( rESet.GetItemState( ATTR_HOR_JUSTIFY, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
- if ( rESet.GetItemState( ATTR_VER_JUSTIFY, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_VER_JUSTIFY, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
- if ( rESet.GetItemState( ATTR_LINEBREAK, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_LINEBREAK, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
- if ( rESet.GetItemState( ATTR_FONT_COLOR, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_FONT_COLOR, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
- if ( rESet.GetItemState( ATTR_FONT_UNDERLINE, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_FONT_UNDERLINE, false, &pItem) == SFX_ITEM_SET )
rSet.Put( *pItem );
// HTML LATIN/CJK/CTL script type dependent
const SfxPoolItem* pFont;
- if ( rESet.GetItemState( ATTR_FONT, FALSE, &pFont) != SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_FONT, false, &pFont) != SFX_ITEM_SET )
pFont = 0;
const SfxPoolItem* pHeight;
- if ( rESet.GetItemState( ATTR_FONT_HEIGHT, FALSE, &pHeight) != SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_FONT_HEIGHT, false, &pHeight) != SFX_ITEM_SET )
pHeight = 0;
const SfxPoolItem* pWeight;
- if ( rESet.GetItemState( ATTR_FONT_WEIGHT, FALSE, &pWeight) != SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_FONT_WEIGHT, false, &pWeight) != SFX_ITEM_SET )
pWeight = 0;
const SfxPoolItem* pPosture;
- if ( rESet.GetItemState( ATTR_FONT_POSTURE, FALSE, &pPosture) != SFX_ITEM_SET )
+ if ( rESet.GetItemState( ATTR_FONT_POSTURE, false, &pPosture) != SFX_ITEM_SET )
pPosture = 0;
if ( pFont || pHeight || pWeight || pPosture )
{
String aStr( mpEngine->GetText( pE->aSel ) );
- BYTE nScriptType = mpDoc->GetStringScriptType( aStr );
- const BYTE nScripts[3] = { SCRIPTTYPE_LATIN,
+ sal_uInt8 nScriptType = mpDoc->GetStringScriptType( aStr );
+ const sal_uInt8 nScripts[3] = { SCRIPTTYPE_LATIN,
SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX };
- for ( BYTE j=0; j<3; ++j )
+ for ( sal_uInt8 j=0; j<3; ++j )
{
if ( nScriptType & nScripts[j] )
{
@@ -327,7 +327,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu
const ScStyleSheet* pStyleSheet =
mpDoc->GetPattern( nCol, nRow, nTab )->GetStyleSheet();
aAttr.SetStyleSheet( (ScStyleSheet*)pStyleSheet );
- mpDoc->SetPattern( nCol, nRow, nTab, aAttr, TRUE );
+ mpDoc->SetPattern( nCol, nRow, nTab, aAttr, sal_True );
// Daten eintragen
if (bSimple)
@@ -424,7 +424,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu
pProgress->SetState( nProgress, nEndCol - nStartCol + 1 );
for ( SCCOL nCol = nStartCol; nCol <= nEndCol; nCol++ )
{
- USHORT nWidth = (USHORT)(ULONG) pColWidths->Get( nCol );
+ sal_uInt16 nWidth = (sal_uInt16)(sal_uLong) pColWidths->Get( nCol );
if ( nWidth )
mpDoc->SetColWidth( nCol, nTab, nWidth );
pProgress->SetState( ++nProgress );
@@ -438,13 +438,13 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu
double nPPTY = ScGlobal::nScreenPPTY * (double) aZoom;
VirtualDevice aVirtDev;
mpDoc->SetOptimalHeight( 0, nEndRow, 0,
- static_cast< USHORT >( ScGlobal::nLastRowHeightExtra ), &aVirtDev,
- nPPTX, nPPTY, aZoom, aZoom, FALSE );
+ static_cast< sal_uInt16 >( ScGlobal::nLastRowHeightExtra ), &aVirtDev,
+ nPPTX, nPPTY, aZoom, aZoom, false );
if ( mpRowHeights->Count() )
{
for ( SCROW nRow = nStartRow; nRow <= nEndRow; nRow++ )
{
- USHORT nHeight = (USHORT)(ULONG) mpRowHeights->Get( nRow );
+ sal_uInt16 nHeight = (sal_uInt16)(sal_uLong) mpRowHeights->Get( nRow );
if ( nHeight > mpDoc->GetRowHeight( nRow, nTab ) )
mpDoc->SetRowHeight( nRow, nTab, nHeight );
}
@@ -470,11 +470,11 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu
}
-BOOL ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE )
+sal_Bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE )
{
if ( !pE->maImageList.size() )
- return FALSE;
- BOOL bHasGraphics = FALSE;
+ return false;
+ sal_Bool bHasGraphics = false;
OutputDevice* pDefaultDev = Application::GetDefaultDevice();
long nWidth, nHeight;
nWidth = nHeight = 0;
@@ -483,7 +483,7 @@ BOOL ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseE
{
ScHTMLImage* pI = &pE->maImageList[ i ];
if ( pI->pGraphic )
- bHasGraphics = TRUE;
+ bHasGraphics = sal_True;
Size aSizePix = pI->aSize;
aSizePix.Width() += 2 * pI->aSpace.X();
aSizePix.Height() += 2 * pI->aSpace.Y();
diff --git a/sc/source/filter/rtf/expbase.cxx b/sc/source/filter/rtf/expbase.cxx
index 5b7dd6d9bb4c..ee90ff1b4ec7 100644
--- a/sc/source/filter/rtf/expbase.cxx
+++ b/sc/source/filter/rtf/expbase.cxx
@@ -64,16 +64,16 @@ ScExportBase::~ScExportBase()
}
-BOOL ScExportBase::GetDataArea( SCTAB nTab, SCCOL& nStartCol,
+sal_Bool ScExportBase::GetDataArea( SCTAB nTab, SCCOL& nStartCol,
SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const
{
pDoc->GetDataStart( nTab, nStartCol, nStartRow );
- pDoc->GetPrintArea( nTab, nEndCol, nEndRow, TRUE );
+ pDoc->GetPrintArea( nTab, nEndCol, nEndRow, sal_True );
return TrimDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow );
}
-BOOL ScExportBase::TrimDataArea( SCTAB nTab, SCCOL& nStartCol,
+sal_Bool ScExportBase::TrimDataArea( SCTAB nTab, SCCOL& nStartCol,
SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const
{
while ( nStartCol <= nEndCol && pDoc->ColHidden(nStartCol, nTab))
@@ -87,10 +87,10 @@ BOOL ScExportBase::TrimDataArea( SCTAB nTab, SCCOL& nStartCol,
}
-BOOL ScExportBase::IsEmptyTable( SCTAB nTab ) const
+sal_Bool ScExportBase::IsEmptyTable( SCTAB nTab ) const
{
if ( !pDoc->HasTable( nTab ) || !pDoc->IsVisible( nTab ) )
- return TRUE;
+ return sal_True;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
return !GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow );
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index f03a37ecdf5b..8a81b6c97660 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -70,7 +70,7 @@ FltError ScFormatFilterPluginImpl::ScExportRTF( SvStream& rStrm, ScDocument* pDo
ScRTFExport::ScRTFExport( SvStream& rStrmP, ScDocument* pDocP, const ScRange& rRangeP )
:
ScExportBase( rStrmP, pDocP, rRangeP ),
- pCellX( new ULONG[ MAXCOL+2 ] )
+ pCellX( new sal_uLong[ MAXCOL+2 ] )
{
}
@@ -81,7 +81,7 @@ ScRTFExport::~ScRTFExport()
}
-ULONG ScRTFExport::Write()
+sal_uLong ScRTFExport::Write()
{
rStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF;
rStrm << OOO_STRING_SVTOOLS_RTF_ANSI << sNewLine;
@@ -104,7 +104,7 @@ void ScRTFExport::WriteTab( SCTAB nTab )
rStrm << '{' << sNewLine;
if ( pDoc->HasTable( nTab ) )
{
- memset( &pCellX[0], 0, (MAXCOL+2) * sizeof(ULONG) );
+ memset( &pCellX[0], 0, (MAXCOL+2) * sizeof(sal_uLong) );
SCCOL nCol;
SCCOL nEndCol = aRange.aEnd.Col();
for ( nCol = aRange.aStart.Col(); nCol <= nEndCol; nCol++ )
@@ -162,7 +162,7 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow )
}
rStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << sNewLine;
- ULONG nStrmPos = rStrm.Tell();
+ sal_uLong nStrmPos = rStrm.Tell();
for ( nCol = aRange.aStart.Col(); nCol <= nEndCol; nCol++ )
{
WriteCell( nTab, nRow, nCol );
@@ -189,18 +189,18 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
ScBaseCell* pCell;
pDoc->GetCell( nCol, nRow, nTab, pCell );
- BOOL bValueData;
+ sal_Bool bValueData;
String aContent;
if ( pCell )
{
switch ( pCell->GetCellType() )
{
case CELLTYPE_NOTE :
- bValueData = FALSE;
+ bValueData = false;
break; // nix
case CELLTYPE_EDIT :
{
- bValueData = FALSE;
+ bValueData = false;
EditEngine& rEngine = GetEditEngine();
const EditTextObject* pObj;
((const ScEditCell*)pCell)->GetData( pObj );
@@ -214,17 +214,17 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
default:
{
bValueData = pCell->HasValueData();
- ULONG nFormat = pAttr->GetNumberFormat( pFormatter );
+ sal_uLong nFormat = pAttr->GetNumberFormat( pFormatter );
Color* pColor;
ScCellFormat::GetString( pCell, nFormat, aContent, &pColor, *pFormatter );
}
}
}
else
- bValueData = FALSE;
+ bValueData = false;
- BOOL bResetPar, bResetAttr;
- bResetPar = bResetAttr = FALSE;
+ sal_Bool bResetPar, bResetAttr;
+ bResetPar = bResetAttr = false;
const SvxHorJustifyItem& rHorJustifyItem = (const SvxHorJustifyItem&)pAttr->GetItem( ATTR_HOR_JUSTIFY );
const SvxWeightItem& rWeightItem = (const SvxWeightItem&) pAttr->GetItem( ATTR_FONT_WEIGHT );
@@ -249,17 +249,17 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
if ( rWeightItem.GetWeight() >= WEIGHT_BOLD )
{ // bold
- bResetAttr = TRUE;
+ bResetAttr = sal_True;
rStrm << OOO_STRING_SVTOOLS_RTF_B;
}
if ( rPostureItem.GetPosture() != ITALIC_NONE )
{ // italic
- bResetAttr = TRUE;
+ bResetAttr = sal_True;
rStrm << OOO_STRING_SVTOOLS_RTF_I;
}
if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE )
{ // underline
- bResetAttr = TRUE;
+ bResetAttr = sal_True;
rStrm << OOO_STRING_SVTOOLS_RTF_UL;
}
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index d3db0458bc6a..39044ba2b201 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -53,7 +53,7 @@
-SV_IMPL_VARARR_SORT( ScRTFColTwips, ULONG );
+SV_IMPL_VARARR_SORT( ScRTFColTwips, sal_uLong );
@@ -63,9 +63,9 @@ ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
pColTwips( new ScRTFColTwips ),
pActDefault( NULL ),
pDefMerge( NULL ),
- nStartAdjust( (ULONG)~0 ),
+ nStartAdjust( (sal_uLong)~0 ),
nLastWidth(0),
- bNewDef( FALSE )
+ bNewDef( false )
{
// RTF default FontSize 12Pt
long nMM = OutputDevice::LogicToLogic( 12, MAP_POINT, MAP_100TH_MM );
@@ -84,11 +84,11 @@ ScRTFParser::~ScRTFParser()
}
-ULONG ScRTFParser::Read( SvStream& rStream, const String& rBaseURL )
+sal_uLong ScRTFParser::Read( SvStream& rStream, const String& rBaseURL )
{
Link aOldLink = pEdit->GetImportHdl();
pEdit->SetImportHdl( LINK( this, ScRTFParser, RTFImportHdl ) );
- ULONG nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_RTF );
+ sal_uLong nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_RTF );
if ( nLastToken == RTF_PAR )
{
if ( !maList.empty() )
@@ -132,33 +132,33 @@ inline void ScRTFParser::NextRow()
}
-BOOL ScRTFParser::SeekTwips( USHORT nTwips, SCCOL* pCol )
+sal_Bool ScRTFParser::SeekTwips( sal_uInt16 nTwips, SCCOL* pCol )
{
- USHORT nPos;
- BOOL bFound = pColTwips->Seek_Entry( nTwips, &nPos );
+ sal_uInt16 nPos;
+ sal_Bool bFound = pColTwips->Seek_Entry( nTwips, &nPos );
*pCol = static_cast<SCCOL>(nPos);
if ( bFound )
- return TRUE;
- USHORT nCount = pColTwips->Count();
+ return sal_True;
+ sal_uInt16 nCount = pColTwips->Count();
if ( !nCount )
- return FALSE;
+ return false;
SCCOL nCol = *pCol;
// nCol ist Einfuegeposition, da liegt der Naechsthoehere (oder auch nicht)
if ( nCol < static_cast<SCCOL>(nCount) && (((*pColTwips)[nCol] - SC_RTFTWIPTOL) <= nTwips) )
- return TRUE;
+ return sal_True;
// nicht kleiner als alles andere? dann mit Naechstniedrigerem vergleichen
else if ( nCol != 0 && (((*pColTwips)[nCol-1] + SC_RTFTWIPTOL) >= nTwips) )
{
(*pCol)--;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScRTFParser::ColAdjust()
{
- if ( nStartAdjust != (ULONG)~0 )
+ if ( nStartAdjust != (sal_uLong)~0 )
{
SCCOL nCol = 0;
ScEEParseEntry* pE;
@@ -180,8 +180,8 @@ void ScRTFParser::ColAdjust()
if ( nCol > nColMax )
nColMax = nCol;
}
- nStartAdjust = (ULONG)~0;
- pColTwips->Remove( (USHORT)0, pColTwips->Count() );
+ nStartAdjust = (sal_uLong)~0;
+ pColTwips->Remove( (sal_uInt16)0, pColTwips->Count() );
}
}
@@ -237,7 +237,7 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
if ( bNewDef )
{
ScRTFCellDefault* pD;
- bNewDef = FALSE;
+ bNewDef = false;
// rechts nicht buendig? => neue Tabelle
if ( nLastWidth
&& ( (pD = &(pDefaultList->back())) != 0 )
@@ -328,7 +328,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
break;
case RTF_CELLX: // closes cell default
{
- bNewDef = TRUE;
+ bNewDef = sal_True;
pInsDefault->nCol = nColCnt;
pInsDefault->nTwips = pInfo->nTokenValue; // rechter Zellenrand
pDefaultList->push_back( pInsDefault );
@@ -367,7 +367,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
pActEntry->aItemSet.Set( pActDefault->aItemSet );
EntryEnd( pActEntry, pInfo->aSelection );
- if ( nStartAdjust == (ULONG)~0 )
+ if ( nStartAdjust == (sal_uLong)~0 )
nStartAdjust = maList.size();
maList.push_back( pActEntry );
NewActEntry( pActEntry ); // neuer freifliegender pActEntry
@@ -417,11 +417,11 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
{
case RTF_SHADINGDEF:
((SvxRTFParser*)pInfo->pParser)->ReadBackgroundAttr(
- pInfo->nToken, pInsDefault->aItemSet, TRUE );
+ pInfo->nToken, pInsDefault->aItemSet, sal_True );
break;
case RTF_BRDRDEF:
((SvxRTFParser*)pInfo->pParser)->ReadBorderAttr(
- pInfo->nToken, pInsDefault->aItemSet, TRUE );
+ pInfo->nToken, pInsDefault->aItemSet, sal_True );
break;
}
}
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 81e219a1575b..fbb81b220ae0 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -125,7 +125,7 @@ void lcl_ReadRGB(SvStream& rStream, Sc10Color& rColor)
void lcl_ReadPalette(SvStream& rStream, Sc10Color* pPalette)
{
- for (USHORT i = 0; i < 16; i++)
+ for (sal_uInt16 i = 0; i < 16; i++)
lcl_ReadRGB(rStream, pPalette[i]);
}
@@ -294,7 +294,7 @@ void lcl_ReadChartTypeData(SvStream& rStream, Sc10ChartTypeData& rTypeData)
rStream >> rTypeData.GraphStyle;
rStream.Read(&rTypeData.GraphTitle, sizeof(rTypeData.GraphTitle));
rStream.Read(&rTypeData.BottomTitle, sizeof(rTypeData.BottomTitle));
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < 256; i++)
rStream >> rTypeData.SymbolData[i];
for (i = 0; i < 256; i++)
@@ -348,7 +348,7 @@ double lcl_PascalToDouble(sal_Char* tp6)
}
-void lcl_ChangeColor( USHORT nIndex, Color& rColor )
+void lcl_ChangeColor( sal_uInt16 nIndex, Color& rColor )
{
ColorData aCol;
@@ -375,7 +375,7 @@ void lcl_ChangeColor( USHORT nIndex, Color& rColor )
rColor.SetColor( aCol );
}
-String lcl_MakeOldPageStyleFormatName( USHORT i )
+String lcl_MakeOldPageStyleFormatName( sal_uInt16 i )
{
String aName = ScGlobal::GetRscString( STR_PAGESTYLE );
aName.AppendAscii( " " );
@@ -393,7 +393,7 @@ Sc10FontData::Sc10FontData(SvStream& rStream)
rStream >> Height;
rStream >> CharSet;
rStream >> PitchAndFamily;
- USHORT nLen;
+ sal_uInt16 nLen;
rStream >> nLen;
rStream.Read(FaceName, nLen);
}
@@ -403,13 +403,13 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == FontID)
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10FontData(rStream));
nError = rStream.GetError();
@@ -428,7 +428,7 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) :
Sc10NameData::Sc10NameData(SvStream& rStream)
{
- BYTE nLen;
+ sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(Name, sizeof(Name) - 1);
Name[nLen] = 0;
@@ -444,13 +444,13 @@ Sc10NameCollection::Sc10NameCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == NameID)
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10NameData(rStream));
nError = rStream.GetError();
@@ -489,13 +489,13 @@ Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == PatternID)
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10PatternData(rStream));
nError = rStream.GetError();
@@ -552,14 +552,14 @@ Sc10DataBaseCollection::Sc10DataBaseCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == DataBaseID)
{
rStream.Read(ActName, sizeof(ActName));
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10DataBaseData(rStream));
nError = rStream.GetError();
@@ -646,9 +646,9 @@ int Sc10PageFormat::operator==( const Sc10PageFormat& rData ) const
}
-USHORT Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData )
+sal_uInt16 Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (At(i)->aPageFormat == rData)
return i;
@@ -658,15 +658,15 @@ USHORT Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData )
}
-static inline UINT8 GetMixedCol( const UINT8 nB, const UINT8 nF, const UINT16 nFak )
+static inline sal_uInt8 GetMixedCol( const sal_uInt8 nB, const sal_uInt8 nF, const sal_uInt16 nFak )
{
- INT32 nT = nB - nF;
- nT *= ( INT32 ) nFak;
+ sal_Int32 nT = nB - nF;
+ nT *= ( sal_Int32 ) nFak;
nT /= 0xFFFF;
nT += nF;
- return ( UINT8 ) nT;
+ return ( sal_uInt8 ) nT;
}
-static inline Color GetMixedColor( const Color& rFore, const Color& rBack, UINT16 nFact )
+static inline Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt16 nFact )
{
return Color( GetMixedCol( rBack.GetRed(), rFore.GetRed(), nFact ),
GetMixedCol( rBack.GetGreen(), rFore.GetGreen(), nFact ),
@@ -680,7 +680,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
EditEngine aEditEngine( pDoc->GetEnginePool() );
EditTextObject* pEmptyObject = aEditEngine.CreateTextObject();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
Sc10PageFormat* pPage = &At(i)->aPageFormat;
@@ -703,7 +703,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
SfxItemSet* pSet = &pSheet->GetItemSet();
- for (USHORT nHeadFoot=0; nHeadFoot<2; nHeadFoot++)
+ for (sal_uInt16 nHeadFoot=0; nHeadFoot<2; nHeadFoot++)
{
Sc10HeadFootLine* pHeadFootLine = nHeadFoot ? &pPage->FootLine : &pPage->HeadLine;
@@ -778,11 +778,11 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
nColor = pHeadFootLine->RasterColor;
Color aRColor( nColor.Red, nColor.Green, nColor.Blue );
- UINT16 nFact;
- BOOL bSwapCol = FALSE;
+ sal_uInt16 nFact;
+ sal_Bool bSwapCol = false;
switch (pHeadFootLine->Raster)
{
- case raNone: nFact = 0xffff; bSwapCol = TRUE; break;
+ case raNone: nFact = 0xffff; bSwapCol = sal_True; break;
case raGray12: nFact = (0xffff / 100) * 12; break;
case raGray25: nFact = (0xffff / 100) * 25; break;
case raGray50: nFact = (0xffff / 100) * 50; break;
@@ -796,14 +796,14 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
if (pHeadFootLine->Frame != 0)
{
- USHORT nLeft = 0;
- USHORT nTop = 0;
- USHORT nRight = 0;
- USHORT nBottom = 0;
- USHORT fLeft = (pHeadFootLine->Frame & 0x000F);
- USHORT fTop = (pHeadFootLine->Frame & 0x00F0) / 0x0010;
- USHORT fRight = (pHeadFootLine->Frame & 0x0F00) / 0x0100;
- USHORT fBottom = (pHeadFootLine->Frame & 0xF000) / 0x1000;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nTop = 0;
+ sal_uInt16 nRight = 0;
+ sal_uInt16 nBottom = 0;
+ sal_uInt16 fLeft = (pHeadFootLine->Frame & 0x000F);
+ sal_uInt16 fTop = (pHeadFootLine->Frame & 0x00F0) / 0x0010;
+ sal_uInt16 fRight = (pHeadFootLine->Frame & 0x0F00) / 0x0100;
+ sal_uInt16 fBottom = (pHeadFootLine->Frame & 0xF000) / 0x1000;
if (fLeft > 1)
nLeft = 50;
else if (fLeft > 0)
@@ -824,10 +824,10 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
Color ColorTop(COL_BLACK);
Color ColorRight(COL_BLACK);
Color ColorBottom(COL_BLACK);
- USHORT cLeft = (pHeadFootLine->FrameColor & 0x000F);
- USHORT cTop = (pHeadFootLine->FrameColor & 0x00F0) >> 4;
- USHORT cRight = (pHeadFootLine->FrameColor & 0x0F00) >> 8;
- USHORT cBottom = (pHeadFootLine->FrameColor & 0xF000) >> 12;
+ sal_uInt16 cLeft = (pHeadFootLine->FrameColor & 0x000F);
+ sal_uInt16 cTop = (pHeadFootLine->FrameColor & 0x00F0) >> 4;
+ sal_uInt16 cRight = (pHeadFootLine->FrameColor & 0x0F00) >> 8;
+ sal_uInt16 cBottom = (pHeadFootLine->FrameColor & 0xF000) >> 12;
lcl_ChangeColor(cLeft, ColorLeft);
lcl_ChangeColor(cTop, ColorTop);
lcl_ChangeColor(cRight, ColorRight);
@@ -857,9 +857,9 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
else
aSetItemItemSet.Put( SvxSizeItem( ATTR_PAGE_SIZE, Size( 0, pPage->Bottom - pPage->Foot ) ) );
- aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_ON, TRUE ));
- aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_DYNAMIC, FALSE ));
- aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_SHARED, TRUE ));
+ aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_ON, sal_True ));
+ aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_DYNAMIC, false ));
+ aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_SHARED, sal_True ));
pSet->Put( SvxSetItem( nHeadFoot ? ATTR_PAGE_FOOTERSET : ATTR_PAGE_HEADERSET,
aSetItemItemSet ) );
@@ -917,7 +917,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
pSet->Put( ScViewObjectModeItem( ATTR_PAGE_OBJECTS, VOBJ_MODE_SHOW ) );
pSet->Put( ScViewObjectModeItem( ATTR_PAGE_DRAWINGS, VOBJ_MODE_SHOW ) );
pSet->Put( SfxUInt16Item( ATTR_PAGE_SCALE,
- (UINT16)( lcl_PascalToDouble( pPage->PrnZoom ) * 100 ) ) );
+ (sal_uInt16)( lcl_PascalToDouble( pPage->PrnZoom ) * 100 ) ) );
pSet->Put( SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 1 ) );
pSet->Put( SvxSizeItem( ATTR_PAGE_SIZE, Size( pPage->Width, pPage->Height ) ) );
@@ -967,7 +967,7 @@ Sc10Import::~Sc10Import()
}
-ULONG Sc10Import::Import()
+sal_uLong Sc10Import::Import()
{
pPrgrsBar = new ScfStreamProgressBar( rStream, pDoc->GetDocumentShell() );
@@ -1066,10 +1066,10 @@ void Sc10Import::LoadProtect()
void Sc10Import::LoadViewColRowBar()
{
- BYTE ViewColRowBar;
+ sal_uInt8 ViewColRowBar;
rStream >> ViewColRowBar;
nError = rStream.GetError();
- aSc30ViewOpt.SetOption( VOPT_HEADER, (BOOL)ViewColRowBar );
+ aSc30ViewOpt.SetOption( VOPT_HEADER, (sal_Bool)ViewColRowBar );
}
@@ -1109,7 +1109,7 @@ void Sc10Import::ImportNameCollection()
{
ScRangeName* pRN = pDoc->GetRangeName();
- for (USHORT i = 0; i < pNameCollection->GetCount(); i++)
+ for (sal_uInt16 i = 0; i < pNameCollection->GetCount(); i++)
{
Sc10NameData* pName = pNameCollection->At( i );
pRN->insert(
@@ -1123,7 +1123,7 @@ void Sc10Import::LoadPatternCollection()
{
pPatternCollection = new Sc10PatternCollection( rStream );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- for( USHORT i = 0 ; i < pPatternCollection->GetCount() ; i++ )
+ for( sal_uInt16 i = 0 ; i < pPatternCollection->GetCount() ; i++ )
{
Sc10PatternData* pPattern = pPatternCollection->At( i );
String aName( pPattern->Name, DEFCHARSET );
@@ -1174,10 +1174,10 @@ void Sc10Import::LoadPatternCollection()
// Ausrichtung
if( ( pPattern->FormatFlags & pfJustify ) == pfJustify )
{
- USHORT HorJustify = ( pPattern->Justify & 0x000F );
- USHORT VerJustify = ( pPattern->Justify & 0x00F0 ) >> 4;
- USHORT OJustify = ( pPattern->Justify & 0x0F00 ) >> 8;
- USHORT EJustify = ( pPattern->Justify & 0xF000 ) >> 12;
+ sal_uInt16 HorJustify = ( pPattern->Justify & 0x000F );
+ sal_uInt16 VerJustify = ( pPattern->Justify & 0x00F0 ) >> 4;
+ sal_uInt16 OJustify = ( pPattern->Justify & 0x0F00 ) >> 8;
+ sal_uInt16 EJustify = ( pPattern->Justify & 0xF000 ) >> 12;
if( HorJustify != 0 )
switch( HorJustify )
{
@@ -1206,13 +1206,13 @@ void Sc10Import::LoadPatternCollection()
}
if( ( OJustify & ojWordBreak ) == ojWordBreak )
- rItemSet.Put( SfxBoolItem( TRUE ) );
+ rItemSet.Put( SfxBoolItem( sal_True ) );
if( ( OJustify & ojBottomTop ) == ojBottomTop )
rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
else if( ( OJustify & ojTopBottom ) == ojTopBottom )
rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
- INT16 Margin = Max( ( USHORT ) 20, ( USHORT ) ( EJustify * 20 ) );
+ INT16 Margin = Max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) );
if( ( ( OJustify & ojBottomTop ) == ojBottomTop ) )
rItemSet.Put( SvxMarginItem( 20, Margin, 20, Margin, ATTR_MARGIN ) );
else
@@ -1224,14 +1224,14 @@ void Sc10Import::LoadPatternCollection()
{
if( pPattern->Frame != 0 )
{
- USHORT nLeft = 0;
- USHORT nTop = 0;
- USHORT nRight = 0;
- USHORT nBottom = 0;
- USHORT fLeft = ( pPattern->Frame & 0x000F );
- USHORT fTop = ( pPattern->Frame & 0x00F0 ) / 0x0010;
- USHORT fRight = ( pPattern->Frame & 0x0F00 ) / 0x0100;
- USHORT fBottom = ( pPattern->Frame & 0xF000 ) / 0x1000;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nTop = 0;
+ sal_uInt16 nRight = 0;
+ sal_uInt16 nBottom = 0;
+ sal_uInt16 fLeft = ( pPattern->Frame & 0x000F );
+ sal_uInt16 fTop = ( pPattern->Frame & 0x00F0 ) / 0x0010;
+ sal_uInt16 fRight = ( pPattern->Frame & 0x0F00 ) / 0x0100;
+ sal_uInt16 fBottom = ( pPattern->Frame & 0xF000 ) / 0x1000;
if( fLeft > 1 )
nLeft = 50;
@@ -1258,10 +1258,10 @@ void Sc10Import::LoadPatternCollection()
Color ColorRight( COL_BLACK );
Color ColorBottom( COL_BLACK );
- USHORT cLeft = ( pPattern->FrameColor & 0x000F );
- USHORT cTop = ( pPattern->FrameColor & 0x00F0 ) >> 4;
- USHORT cRight = ( pPattern->FrameColor & 0x0F00 ) >> 8;
- USHORT cBottom = ( pPattern->FrameColor & 0xF000 ) >> 12;
+ sal_uInt16 cLeft = ( pPattern->FrameColor & 0x000F );
+ sal_uInt16 cTop = ( pPattern->FrameColor & 0x00F0 ) >> 4;
+ sal_uInt16 cRight = ( pPattern->FrameColor & 0x0F00 ) >> 8;
+ sal_uInt16 cBottom = ( pPattern->FrameColor & 0xF000 ) >> 12;
lcl_ChangeColor( cLeft, ColorLeft );
lcl_ChangeColor( cTop, ColorTop );
@@ -1291,8 +1291,8 @@ void Sc10Import::LoadPatternCollection()
{
if( pPattern->Raster != 0 )
{
- USHORT nBColor = ( pPattern->nColor & 0x00F0 ) >> 4;
- USHORT nRColor = ( pPattern->nColor & 0x0F00 ) >> 8;
+ sal_uInt16 nBColor = ( pPattern->nColor & 0x00F0 ) >> 4;
+ sal_uInt16 nRColor = ( pPattern->nColor & 0x0F00 ) >> 8;
Color aBColor( COL_BLACK );
lcl_ChangeColor( nBColor, aBColor );
@@ -1304,12 +1304,12 @@ void Sc10Import::LoadPatternCollection()
Color aRColor( COL_BLACK );
lcl_ChangeColor( nRColor, aRColor );
- UINT16 nFact;
- BOOL bSwapCol = FALSE;
- BOOL bSetItem = TRUE;
+ sal_uInt16 nFact;
+ sal_Bool bSwapCol = false;
+ sal_Bool bSetItem = sal_True;
switch (pPattern->Raster)
{
- case raNone: nFact = 0xffff; bSwapCol = TRUE; bSetItem = (nBColor > 0); break;
+ case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break;
case raGray12: nFact = (0xffff / 100) * 12; break;
case raGray25: nFact = (0xffff / 100) * 25; break;
case raGray50: nFact = (0xffff / 100) * 50; break;
@@ -1329,19 +1329,19 @@ void Sc10Import::LoadPatternCollection()
if( ( pPattern->ValueFormat.Format != 0 ) &&
( ( pPattern->FormatFlags & pfValue ) == pfValue ) )
{
- ULONG nKey = 0;
+ sal_uLong nKey = 0;
ChangeFormat( pPattern->ValueFormat.Format, pPattern->ValueFormat.Info, nKey );
- rItemSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, ( UINT32 ) nKey ) );
+ rItemSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, ( sal_uInt32 ) nKey ) );
}
// Zellattribute (Schutz, Versteckt...)
if( ( pPattern->Flags != 0 ) &&
( ( pPattern->FormatFlags & pfProtection ) == pfProtection ) )
{
- BOOL bProtect = ( ( pPattern->Flags & paProtect ) == paProtect );
- BOOL bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula );
- BOOL bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll );
- BOOL bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint );
+ sal_Bool bProtect = ( ( pPattern->Flags & paProtect ) == paProtect );
+ sal_Bool bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula );
+ sal_Bool bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll );
+ sal_Bool bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint );
rItemSet.Put( ScProtectionAttr( bProtect, bHFormula, bHCell, bHPrint ) );
}
} // if Style != 0
@@ -1352,7 +1352,7 @@ void Sc10Import::LoadPatternCollection()
void Sc10Import::LoadDataBaseCollection()
{
pDataBaseCollection = new Sc10DataBaseCollection(rStream);
- for( USHORT i = 0 ; i < pDataBaseCollection->GetCount() ; i++ )
+ for( sal_uInt16 i = 0 ; i < pDataBaseCollection->GetCount() ; i++ )
{
Sc10DataBaseData* pOldData = pDataBaseCollection->At(i);
ScDBData* pNewData = new ScDBData( SC10TOSTRING( pOldData->DataBaseRec.Name ),
@@ -1361,8 +1361,8 @@ void Sc10Import::LoadDataBaseCollection()
( SCROW ) pOldData->DataBaseRec.Block.y1,
( SCCOL ) pOldData->DataBaseRec.Block.x2,
( SCROW ) pOldData->DataBaseRec.Block.y2,
- TRUE,
- ( BOOL) pOldData->DataBaseRec.RowHeader );
+ sal_True,
+ ( sal_Bool) pOldData->DataBaseRec.RowHeader );
pDoc->GetDBCollection()->Insert( pNewData );
}
}
@@ -1372,30 +1372,30 @@ void Sc10Import::LoadTables()
{
Sc10PageCollection aPageCollection;
- INT16 nTabCount;
+ sal_Int16 nTabCount;
rStream >> nTabCount;
- for (INT16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++)
+ for (sal_Int16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++)
{
Sc10PageFormat PageFormat;
- INT16 DataBaseIndex;
+ sal_Int16 DataBaseIndex;
Sc10TableProtect TabProtect;
- INT16 TabNo;
+ sal_Int16 TabNo;
sal_Char TabName[128];
- USHORT Display;
- BYTE Visible;
- USHORT ID;
- USHORT DataCount;
- USHORT DataStart;
- USHORT DataEnd;
- USHORT DataValue;
- USHORT Count;
- USHORT i;
+ sal_uInt16 Display;
+ sal_uInt8 Visible;
+ sal_uInt16 ID;
+ sal_uInt16 DataCount;
+ sal_uInt16 DataStart;
+ sal_uInt16 DataEnd;
+ sal_uInt16 DataValue;
+ sal_uInt16 Count;
+ sal_uInt16 i;
String aStr; // Universal-Konvertierungs-String
lcl_ReadPageFormat(rStream, PageFormat);
- USHORT nAt = aPageCollection.InsertFormat(PageFormat);
+ sal_uInt16 nAt = aPageCollection.InsertFormat(PageFormat);
String aPageName = lcl_MakeOldPageStyleFormatName( nAt );
pPrgrsBar->Progress();
@@ -1411,7 +1411,7 @@ void Sc10Import::LoadTables()
rStream >> TabNo;
- BYTE nLen;
+ sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(TabName, sizeof(TabName) - 1);
TabName[nLen] = 0;
@@ -1419,7 +1419,7 @@ void Sc10Import::LoadTables()
//----------------------------------------------------------
rStream >> Display;
- if ( Tab == (INT16)nShowTab )
+ if ( Tab == (sal_Int16)nShowTab )
{
ScVObjMode eObjMode = VOBJ_MODE_SHOW;
@@ -1427,10 +1427,10 @@ void Sc10Import::LoadTables()
aSc30ViewOpt.SetOption( VOPT_NULLVALS, IS_SET(dfZerro,Display) );
aSc30ViewOpt.SetOption( VOPT_SYNTAX, IS_SET(dfSyntax,Display) );
aSc30ViewOpt.SetOption( VOPT_NOTES, IS_SET(dfNoteMark,Display) );
- aSc30ViewOpt.SetOption( VOPT_VSCROLL, TRUE );
- aSc30ViewOpt.SetOption( VOPT_HSCROLL, TRUE );
- aSc30ViewOpt.SetOption( VOPT_TABCONTROLS, TRUE );
- aSc30ViewOpt.SetOption( VOPT_OUTLINER, TRUE );
+ aSc30ViewOpt.SetOption( VOPT_VSCROLL, sal_True );
+ aSc30ViewOpt.SetOption( VOPT_HSCROLL, sal_True );
+ aSc30ViewOpt.SetOption( VOPT_TABCONTROLS, sal_True );
+ aSc30ViewOpt.SetOption( VOPT_OUTLINER, sal_True );
aSc30ViewOpt.SetOption( VOPT_GRID, IS_SET(dfGrid,Display) );
// VOPT_HEADER wird in LoadViewColRowBar() gesetzt
@@ -1454,13 +1454,13 @@ void Sc10Import::LoadTables()
if (nError != 0) return;
if (TabNo == 0)
- pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName ), FALSE);
+ pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName ), false);
else
pDoc->InsertTab(SC_TAB_APPEND, SC10TOSTRING( TabName ) );
pDoc->SetPageStyle( static_cast<SCTAB>(Tab), aPageName );
- if (Visible == 0) pDoc->SetVisible(static_cast<SCTAB> (TabNo), FALSE);
+ if (Visible == 0) pDoc->SetVisible(static_cast<SCTAB> (TabNo), false);
// ColWidth
rStream >> ID;
@@ -1588,13 +1588,13 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
{
LoadColAttr(Col, Tab);
- USHORT CellCount;
- BYTE CellType;
- USHORT Row;
+ sal_uInt16 CellCount;
+ sal_uInt8 CellType;
+ sal_uInt16 Row;
rStream >> CellCount;
SCROW nScCount = static_cast< SCROW >( CellCount );
if (nScCount > MAXROW) nError = errUnknownFormat;
- for (USHORT i = 0; (i < CellCount) && (nError == 0); i++)
+ for (sal_uInt16 i = 0; (i < CellCount) && (nError == 0); i++)
{
rStream >> CellType;
rStream >> Row;
@@ -1606,7 +1606,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
case ctValue :
{
const SfxPoolItem* pValueFormat = pDoc->GetAttr(Col, static_cast<SCROW> (Row), Tab, ATTR_VALUE_FORMAT);
- ULONG nFormat = ((SfxUInt32Item*)pValueFormat)->GetValue();
+ sal_uLong nFormat = ((SfxUInt32Item*)pValueFormat)->GetValue();
double Value = ScfTools::ReadLongDouble(rStream);
//rStream.Read(&Value, sizeof(Value));
@@ -1621,7 +1621,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
}
case ctString :
{
- BYTE Len;
+ sal_uInt8 Len;
sal_Char s[256];
rStream >> Len;
rStream.Read(s, Len);
@@ -1633,7 +1633,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
case ctFormula :
{
/*double Value =*/ ScfTools::ReadLongDouble(rStream);
- BYTE Len;
+ sal_uInt8 Len;
sal_Char s[256];
rStream >> Len;
rStream.Read(&s[1], Len);
@@ -1641,7 +1641,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
s[Len + 1] = 0;
ScFormulaCell* pCell = new ScFormulaCell( pDoc, ScAddress( Col, static_cast<SCROW> (Row), Tab ) );
pCell->SetHybridFormula( SC10TOSTRING( s ),formula::FormulaGrammar::GRAM_NATIVE );
- pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, (BOOL)TRUE );
+ pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, (sal_Bool)sal_True );
break;
}
case ctNote :
@@ -1650,7 +1650,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
nError = errUnknownFormat;
break;
}
- USHORT NoteLen;
+ sal_uInt16 NoteLen;
rStream >> NoteLen;
if (NoteLen != 0)
{
@@ -1696,9 +1696,9 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nStart;
SCROW nEnd;
- USHORT i;
- UINT16 nLimit;
- UINT16 nValue1;
+ sal_uInt16 i;
+ sal_uInt16 nLimit;
+ sal_uInt16 nValue1;
Sc10ColData *pColData;
// Font (Name, Groesse)
@@ -1788,10 +1788,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
if ((nStart <= nEnd) && (nValue1))
{
ScPatternAttr aScPattern(pDoc->GetPool());
- USHORT HorJustify = (nValue1 & 0x000F);
- USHORT VerJustify = (nValue1 & 0x00F0) >> 4;
- USHORT OJustify = (nValue1 & 0x0F00) >> 8;
- USHORT EJustify = (nValue1 & 0xF000) >> 12;
+ sal_uInt16 HorJustify = (nValue1 & 0x000F);
+ sal_uInt16 VerJustify = (nValue1 & 0x00F0) >> 4;
+ sal_uInt16 OJustify = (nValue1 & 0x0F00) >> 8;
+ sal_uInt16 EJustify = (nValue1 & 0xF000) >> 12;
switch (HorJustify)
{
@@ -1820,13 +1820,13 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
}
if (OJustify & ojWordBreak)
- aScPattern.GetItemSet().Put(SfxBoolItem(TRUE));
+ aScPattern.GetItemSet().Put(SfxBoolItem(sal_True));
if (OJustify & ojBottomTop)
aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,9000));
else if (OJustify & ojTopBottom)
aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,27000));
- INT16 Margin = Max((USHORT)20, (USHORT)(EJustify * 20));
+ sal_Int16 Margin = Max((sal_uInt16)20, (sal_uInt16)(EJustify * 20));
if (((OJustify & ojBottomTop) == ojBottomTop) || ((OJustify & ojBottomTop) == ojBottomTop))
aScPattern.GetItemSet().Put(SvxMarginItem(20, Margin, 20, Margin, ATTR_MARGIN));
else
@@ -1836,15 +1836,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nStart = nEnd + 1;
}
// Umrandung
- BOOL bEnd = FALSE;
- USHORT nColorIndex = 0;
- USHORT nFrameIndex = 0;
+ sal_Bool bEnd = false;
+ sal_uInt16 nColorIndex = 0;
+ sal_uInt16 nFrameIndex = 0;
// Special Fix...
- const UINT32 nHelpMeStart = 100;
- UINT32 nHelpMe = nHelpMeStart;
- USHORT nColorIndexOld = nColorIndex;
- USHORT nFrameIndexOld = nColorIndex;
+ const sal_uInt32 nHelpMeStart = 100;
+ sal_uInt32 nHelpMe = nHelpMeStart;
+ sal_uInt16 nColorIndexOld = nColorIndex;
+ sal_uInt16 nFrameIndexOld = nColorIndex;
nEnd = 0;
nStart = 0;
@@ -1852,15 +1852,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
pColData = &aFrame.pData[ nFrameIndex ];
- USHORT nValue = pColData->Value;
- USHORT nLeft = 0;
- USHORT nTop = 0;
- USHORT nRight = 0;
- USHORT nBottom = 0;
- USHORT fLeft = ( nValue & 0x000F );
- USHORT fTop = ( nValue & 0x00F0 ) >> 4;
- USHORT fRight = ( nValue & 0x0F00 ) >> 8;
- USHORT fBottom = ( nValue & 0xF000 ) >> 12;
+ sal_uInt16 nValue = pColData->Value;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nTop = 0;
+ sal_uInt16 nRight = 0;
+ sal_uInt16 nBottom = 0;
+ sal_uInt16 fLeft = ( nValue & 0x000F );
+ sal_uInt16 fTop = ( nValue & 0x00F0 ) >> 4;
+ sal_uInt16 fRight = ( nValue & 0x0F00 ) >> 8;
+ sal_uInt16 fBottom = ( nValue & 0xF000 ) >> 12;
if( fLeft > 1 )
nLeft = 50;
@@ -1886,12 +1886,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
Color ColorTop( COL_BLACK );
Color ColorRight( COL_BLACK );
Color ColorBottom( COL_BLACK );
- USHORT nFrmColVal = aFrameColor.pData[ nColorIndex ].Value;
+ sal_uInt16 nFrmColVal = aFrameColor.pData[ nColorIndex ].Value;
SCROW nFrmColRow = static_cast<SCROW>(aFrameColor.pData[ nColorIndex ].Row);
- USHORT cLeft = ( nFrmColVal & 0x000F );
- USHORT cTop = ( nFrmColVal & 0x00F0 ) >> 4;
- USHORT cRight = ( nFrmColVal & 0x0F00 ) >> 8;
- USHORT cBottom = ( nFrmColVal & 0xF000 ) >> 12;
+ sal_uInt16 cLeft = ( nFrmColVal & 0x000F );
+ sal_uInt16 cTop = ( nFrmColVal & 0x00F0 ) >> 4;
+ sal_uInt16 cRight = ( nFrmColVal & 0x0F00 ) >> 8;
+ sal_uInt16 cBottom = ( nFrmColVal & 0xF000 ) >> 12;
lcl_ChangeColor( cLeft, ColorLeft );
lcl_ChangeColor( cTop, ColorTop );
@@ -1962,20 +1962,20 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
// ACHTUNG: Code bis hier ueberarbeitet ... jetzt hab' ich keinen Bock mehr! (GT)
// Hintergrund (Farbe, Raster)
- USHORT nRasterIndex = 0;
- bEnd = FALSE;
+ sal_uInt16 nRasterIndex = 0;
+ bEnd = false;
nColorIndex = 0;
nEnd = 0;
nStart = 0;
// Special Fix...
nHelpMe = nHelpMeStart;
- USHORT nRasterIndexOld = nRasterIndex;
+ sal_uInt16 nRasterIndexOld = nRasterIndex;
while( !bEnd && nHelpMe )
{
- USHORT nBColor = ( aColor.pData[ nColorIndex ].Value & 0x00F0 ) >> 4;
- USHORT nRColor = ( aColor.pData[ nColorIndex ].Value & 0x0F00 ) >> 8;
+ sal_uInt16 nBColor = ( aColor.pData[ nColorIndex ].Value & 0x00F0 ) >> 4;
+ sal_uInt16 nRColor = ( aColor.pData[ nColorIndex ].Value & 0x0F00 ) >> 8;
Color aBColor( COL_BLACK );
lcl_ChangeColor( nBColor, aBColor );
@@ -1991,12 +1991,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
ScPatternAttr aScPattern( pDoc->GetPool() );
- UINT16 nFact;
- BOOL bSwapCol = FALSE;
- BOOL bSetItem = TRUE;
+ sal_uInt16 nFact;
+ sal_Bool bSwapCol = false;
+ sal_Bool bSetItem = sal_True;
switch ( aRaster.pData[ nRasterIndex ].Value )
{
- case raNone: nFact = 0xffff; bSwapCol = TRUE; bSetItem = (nBColor > 0); break;
+ case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break;
case raGray12: nFact = (0xffff / 100) * 12; break;
case raGray25: nFact = (0xffff / 100) * 25; break;
case raGray50: nFact = (0xffff / 100) * 50; break;
@@ -2060,12 +2060,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nValue1 = pColData->Value;
if ((nStart <= nEnd) && (nValue1))
{
- ULONG nKey = 0;
- USHORT nFormat = (nValue1 & 0x00FF);
- USHORT nInfo = (nValue1 & 0xFF00) >> 8;
+ sal_uLong nKey = 0;
+ sal_uInt16 nFormat = (nValue1 & 0x00FF);
+ sal_uInt16 nInfo = (nValue1 & 0xFF00) >> 8;
ChangeFormat(nFormat, nInfo, nKey);
ScPatternAttr aScPattern(pDoc->GetPool());
- aScPattern.GetItemSet().Put(SfxUInt32Item(ATTR_VALUE_FORMAT, (UINT32)nKey));
+ aScPattern.GetItemSet().Put(SfxUInt32Item(ATTR_VALUE_FORMAT, (sal_uInt32)nKey));
pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern);
}
nStart = nEnd + 1;
@@ -2079,10 +2079,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nEnd = static_cast<SCROW>(aFlag.pData[i].Row);
if ((nStart <= nEnd) && (aFlag.pData[i].Value != 0))
{
- BOOL bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect);
- BOOL bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula);
- BOOL bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll);
- BOOL bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint);
+ sal_Bool bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect);
+ sal_Bool bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula);
+ sal_Bool bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll);
+ sal_Bool bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint);
ScPatternAttr aScPattern(pDoc->GetPool());
aScPattern.GetItemSet().Put(ScProtectionAttr(bProtect, bHFormula, bHCell, bHPrint));
pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern);
@@ -2099,7 +2099,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nEnd = static_cast<SCROW>(aPattern.pData[i].Row);
if ((nStart <= nEnd) && (aPattern.pData[i].Value != 0))
{
- USHORT nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1;
+ sal_uInt16 nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1;
Sc10PatternData* pPattern = pPatternCollection->At(nPatternIndex);
if (pPattern != NULL)
{
@@ -2133,7 +2133,7 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr)
rAttr.pData = new Sc10ColData[rAttr.Count];
if (rAttr.pData != NULL)
{
- for (USHORT i = 0; i < rAttr.Count; i++)
+ for (sal_uInt16 i = 0; i < rAttr.Count; i++)
{
rStream >> rAttr.pData[i].Row;
rStream >> rAttr.pData[i].Value;
@@ -2145,7 +2145,7 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr)
}
-void Sc10Import::ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey)
+void Sc10Import::ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey)
{
// Achtung: Die Formate werden nur auf die StarCalc 3.0 internen Formate gemappt
// Korrekterweise muessten zum Teil neue Formate erzeugt werden (sollte Stephan sich ansehen)
@@ -2290,22 +2290,22 @@ void Sc10Import::ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey)
void Sc10Import::LoadObjects()
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (rStream.IsEof()) return;
if (ID == ObjectID)
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
sal_Char Reserved[32];
rStream.Read(Reserved, sizeof(Reserved));
nError = rStream.GetError();
if ((nAnz > 0) && (nError == 0))
{
- BYTE ObjectType;
+ sal_uInt8 ObjectType;
Sc10GraphHeader GraphHeader;
- BOOL IsOleObject = FALSE; // Achtung dies ist nur ein Notnagel
- for (USHORT i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++)
+ sal_Bool IsOleObject = false; // Achtung dies ist nur ein Notnagel
+ for (sal_uInt16 i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++)
{
rStream >> ObjectType;
lcl_ReadGraphHeader(rStream, GraphHeader);
@@ -2330,7 +2330,7 @@ void Sc10Import::LoadObjects()
{
case otOle :
// Achtung hier muss sowas wie OleLoadFromStream passieren
- IsOleObject = TRUE;
+ IsOleObject = sal_True;
break;
case otImage :
{
diff --git a/sc/source/filter/starcalc/scfobj.cxx b/sc/source/filter/starcalc/scfobj.cxx
index 536f0fd5b816..e1fc11a68719 100644
--- a/sc/source/filter/starcalc/scfobj.cxx
+++ b/sc/source/filter/starcalc/scfobj.cxx
@@ -60,7 +60,7 @@ using namespace com::sun::star;
//==================================================================
void Sc10InsertObject::InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect,
- SCTAB nSrcTab, USHORT nX1, USHORT nY1, USHORT nX2, USHORT nY2 )
+ SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 )
{
// wenn Chart nicht installiert ist, darf nicht auf SCH_MOD zugegriffen werden!
if ( !SvtModuleOptions().IsChart() )
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 24997279b088..7168e46dd995 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -96,7 +96,7 @@ void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rString, sal
inline void lcl_GenerateGUID( sal_uInt8* pGUID, sal_Bool& rValidGUID )
{
- rtl_createUuid( pGUID, rValidGUID ? pGUID : NULL, sal_False );
+ rtl_createUuid( pGUID, rValidGUID ? pGUID : NULL, false );
rValidGUID = sal_True;
}
@@ -133,7 +133,7 @@ void XclExpUserBView::SaveCont( XclExpStream& rStrm )
rStrm << sUsername;
}
-UINT16 XclExpUserBView::GetNum() const
+sal_uInt16 XclExpUserBView::GetNum() const
{
return 0x01A9;
}
@@ -148,9 +148,9 @@ sal_Size XclExpUserBView::GetLen() const
XclExpUserBViewList::XclExpUserBViewList( const ScChangeTrack& rChangeTrack )
{
sal_uInt8 aGUID[ 16 ];
- sal_Bool bValidGUID = sal_False;
+ sal_Bool bValidGUID = false;
const ScStrCollection& rStrColl = rChangeTrack.GetUserCollection();
- for( USHORT nIndex = 0; nIndex < rStrColl.GetCount(); nIndex++ )
+ for( sal_uInt16 nIndex = 0; nIndex < rStrColl.GetCount(); nIndex++ )
{
const StrData* pStrData = (const StrData*) rStrColl.At( nIndex );
lcl_GenerateGUID( aGUID, bValidGUID );
@@ -197,7 +197,7 @@ void XclExpUsersViewBegin::SaveCont( XclExpStream& rStrm )
<< (sal_Int16) -1;
}
-UINT16 XclExpUsersViewBegin::GetNum() const
+sal_uInt16 XclExpUsersViewBegin::GetNum() const
{
return 0x01AA;
}
@@ -214,7 +214,7 @@ void XclExpUsersViewEnd::SaveCont( XclExpStream& rStrm )
rStrm << (sal_uInt16) 0x0001;
}
-UINT16 XclExpUsersViewEnd::GetNum() const
+sal_uInt16 XclExpUsersViewEnd::GetNum() const
{
return 0x01AB;
}
@@ -231,7 +231,7 @@ void XclExpChTr0x0191::SaveCont( XclExpStream& rStrm )
rStrm << (sal_uInt16) 0x0000;
}
-UINT16 XclExpChTr0x0191::GetNum() const
+sal_uInt16 XclExpChTr0x0191::GetNum() const
{
return 0x0191;
}
@@ -249,7 +249,7 @@ void XclExpChTr0x0198::SaveCont( XclExpStream& rStrm )
<< (sal_uInt16) 0x0000;
}
-UINT16 XclExpChTr0x0198::GetNum() const
+sal_uInt16 XclExpChTr0x0198::GetNum() const
{
return 0x0198;
}
@@ -267,7 +267,7 @@ void XclExpChTr0x0192::SaveCont( XclExpStream& rStrm )
rStrm.WriteZeroBytes( 510 );
}
-UINT16 XclExpChTr0x0192::GetNum() const
+sal_uInt16 XclExpChTr0x0192::GetNum() const
{
return 0x0192;
}
@@ -284,7 +284,7 @@ void XclExpChTr0x0197::SaveCont( XclExpStream& rStrm )
rStrm << (sal_uInt16) 0x0000;
}
-UINT16 XclExpChTr0x0197::GetNum() const
+sal_uInt16 XclExpChTr0x0197::GetNum() const
{
return 0x0197;
}
@@ -300,7 +300,7 @@ XclExpChTrEmpty::~XclExpChTrEmpty()
{
}
-UINT16 XclExpChTrEmpty::GetNum() const
+sal_uInt16 XclExpChTrEmpty::GetNum() const
{
return nRecNum;
}
@@ -321,7 +321,7 @@ void XclExpChTr0x0195::SaveCont( XclExpStream& rStrm )
rStrm.WriteZeroBytes( 162 );
}
-UINT16 XclExpChTr0x0195::GetNum() const
+sal_uInt16 XclExpChTr0x0195::GetNum() const
{
return 0x0195;
}
@@ -345,7 +345,7 @@ void XclExpChTr0x0194::SaveCont( XclExpStream& rStrm )
lcl_WriteFixedString( rStrm, sUsername, 147 );
}
-UINT16 XclExpChTr0x0194::GetNum() const
+sal_uInt16 XclExpChTr0x0194::GetNum() const
{
return 0x0194;
}
@@ -374,7 +374,7 @@ void XclExpChTrHeader::SaveCont( XclExpStream& rStrm )
<< (sal_uInt16) 0x001E;
}
-UINT16 XclExpChTrHeader::GetNum() const
+sal_uInt16 XclExpChTrHeader::GetNum() const
{
return 0x0196;
}
@@ -424,7 +424,7 @@ void XclExpChTrInfo::SaveCont( XclExpStream& rStrm )
<< (sal_uInt16) 0x0002;
}
-UINT16 XclExpChTrInfo::GetNum() const
+sal_uInt16 XclExpChTrInfo::GetNum() const
{
return 0x0138;
}
@@ -575,7 +575,7 @@ void XclExpChTrTabId::SaveCont( XclExpStream& rStrm )
rStrm << nIndex;
}
-UINT16 XclExpChTrTabId::GetNum() const
+sal_uInt16 XclExpChTrTabId::GetNum() const
{
return 0x013D;
}
@@ -640,7 +640,7 @@ XclExpChTrAction::XclExpChTrAction(
rIdBuffer( rTabIdBuffer ),
nLength( 0 ),
nOpCode( nNewOpCode ),
- bForceInfo( sal_False )
+ bForceInfo( false )
{
aDateTime.SetSec( 0 );
aDateTime.Set100Sec( 0 );
@@ -930,7 +930,7 @@ void XclExpChTrCellContent::SaveActionData( XclExpStream& rStrm ) const
pNewData->Write( rStrm, rIdBuffer );
}
-UINT16 XclExpChTrCellContent::GetNum() const
+sal_uInt16 XclExpChTrCellContent::GetNum() const
{
return 0x013B;
}
@@ -1109,7 +1109,7 @@ void XclExpChTrInsert::CompleteSaveAction( XclExpStream& rStrm ) const
XclExpChTrEmpty( 0x0151 ).Save( rStrm );
}
-UINT16 XclExpChTrInsert::GetNum() const
+sal_uInt16 XclExpChTrInsert::GetNum() const
{
return 0x0137;
}
@@ -1181,7 +1181,7 @@ void XclExpChTrInsertTab::SaveActionData( XclExpStream& rStrm ) const
rStrm.WriteZeroBytes( 133 );
}
-UINT16 XclExpChTrInsertTab::GetNum() const
+sal_uInt16 XclExpChTrInsertTab::GetNum() const
{
return 0x014D;
}
@@ -1250,7 +1250,7 @@ void XclExpChTrMoveRange::CompleteSaveAction( XclExpStream& rStrm ) const
XclExpChTrEmpty( 0x014F ).Save( rStrm );
}
-UINT16 XclExpChTrMoveRange::GetNum() const
+sal_uInt16 XclExpChTrMoveRange::GetNum() const
{
return 0x0140;
}
@@ -1304,7 +1304,7 @@ void XclExpChTr0x014A::SaveActionData( XclExpStream& rStrm ) const
Write2DRange( rStrm, aRange );
}
-UINT16 XclExpChTr0x014A::GetNum() const
+sal_uInt16 XclExpChTr0x014A::GetNum() const
{
return 0x014A;
}
@@ -1469,7 +1469,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
pTempDoc( NULL ),
nNewAction( 1 ),
pHeader( NULL ),
- bValidGUID( sal_False )
+ bValidGUID( false )
{
DBG_ASSERT( GetOldRoot().pTabId, "XclExpChangeTrack::XclExpChangeTrack - root data incomplete" );
if( !GetOldRoot().pTabId )
@@ -1584,7 +1584,7 @@ ScChangeTrack* XclExpChangeTrack::CreateTempChangeTrack()
DBG_ASSERT( nOrigCount == pTempDoc->GetTableCount(),
"XclExpChangeTrack::CreateTempChangeTrack - table count mismatch" );
if( nOrigCount != pTempDoc->GetTableCount() )
- return sal_False;
+ return false;
return pOrigChangeTrack->Clone(pTempDoc);
}
@@ -1626,7 +1626,7 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
sal_Bool XclExpChangeTrack::WriteUserNamesStream()
{
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
SotStorageStreamRef xSvStrm = OpenStream( EXC_STREAM_USERNAMES );
DBG_ASSERT( xSvStrm.Is(), "XclExpChangeTrack::WriteUserNamesStream - no stream" );
if( xSvStrm.Is() )
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index cbadfd62b6f8..7cf584f317b0 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -50,7 +50,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
pChangeTrack( NULL ),
pStrm( NULL ),
nTabIdCount( 0 ),
- bGlobExit( sal_False ),
+ bGlobExit( false ),
eNestedMode( nmBase )
{
// Verify that the User Names stream exists before going any further. Excel adds both
@@ -64,7 +64,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
if( xInStrm.Is() )
{
xInStrm->Seek( STREAM_SEEK_TO_END );
- ULONG nStreamLen = xInStrm->Tell();
+ sal_uLong nStreamLen = xInStrm->Tell();
if( (xInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != STREAM_SEEK_TO_END) )
{
xInStrm->Seek( STREAM_SEEK_TO_BEGIN );
@@ -73,7 +73,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
pChangeTrack = new ScChangeTrack( GetDocPtr() );
sOldUsername = pChangeTrack->GetUser();
- pChangeTrack->SetUseFixDateTime( TRUE );
+ pChangeTrack->SetUseFixDateTime( sal_True );
ReadRecords();
}
@@ -115,7 +115,7 @@ void XclImpChangeTrack::DoInsertRange( const ScRange& rRange )
void XclImpChangeTrack::DoDeleteRange( const ScRange& rRange )
{
- ULONG nFirst, nLast;
+ sal_uLong nFirst, nLast;
pChangeTrack->AppendDeleteRange( rRange, NULL, nFirst, nLast );
DoAcceptRejectAction( nFirst, nLast );
}
@@ -147,7 +147,7 @@ sal_Bool XclImpChangeTrack::CheckRecord( sal_uInt16 nOpCode )
if( (nOpCode != EXC_CHTR_OP_UNKNOWN) && (aRecHeader.nOpCode != nOpCode) )
{
OSL_FAIL( "XclImpChangeTrack::CheckRecord - unknown action" );
- return sal_False;
+ return false;
}
return aRecHeader.nIndex != 0;
}
@@ -208,7 +208,7 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray*& rpTokenArray, const ScAddres
// read the formula, 3D tab refs from extended data
const ScTokenArray* pArray = NULL;
aFmlConv.Reset( rPosition );
- BOOL bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This
+ sal_Bool bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This
rpTokenArray = (bOK && pArray) ? new ScTokenArray( *pArray ) : NULL;
pStrm->Ignore( 1 );
}
@@ -295,7 +295,7 @@ void XclImpChangeTrack::ReadChTrInsert()
else
aRange.aEnd.SetCol( MAXCOL );
- BOOL bValid = pStrm->IsValid();
+ sal_Bool bValid = pStrm->IsValid();
if( FoundNestedMode() )
ReadNestedRecords();
@@ -397,7 +397,7 @@ void XclImpChangeTrack::ReadChTrMoveRange()
aSourceRange.aStart.SetTab( ReadTabNum() );
aSourceRange.aEnd.SetTab( aSourceRange.aStart.Tab() );
- BOOL bValid = pStrm->IsValid();
+ sal_Bool bValid = pStrm->IsValid();
if( FoundNestedMode() )
ReadNestedRecords();
@@ -450,7 +450,7 @@ sal_Bool XclImpChangeTrack::EndNestedMode()
void XclImpChangeTrack::ReadRecords()
{
- sal_Bool bExitLoop = sal_False;
+ sal_Bool bExitLoop = false;
while( !bExitLoop && !bGlobExit && pStrm->StartNextRecord() )
{
@@ -476,13 +476,13 @@ void XclImpChangeTrack::Apply()
if( pChangeTrack )
{
pChangeTrack->SetUser( sOldUsername );
- pChangeTrack->SetUseFixDateTime( FALSE );
+ pChangeTrack->SetUseFixDateTime( false );
GetDoc().SetChangeTrack( pChangeTrack );
pChangeTrack = NULL;
ScChangeViewSettings aSettings;
- aSettings.SetShowChanges( TRUE );
+ aSettings.SetShowChanges( sal_True );
GetDoc().SetChangeViewSettings( aSettings );
}
}
@@ -495,7 +495,7 @@ XclImpChTrFmlConverter::~XclImpChTrFmlConverter()
}
// virtual, called from ExcToSc8::Convert()
-bool XclImpChTrFmlConverter::Read3DTabReference( UINT16 /*nIxti*/, SCTAB& rFirstTab, SCTAB& rLastTab,
+bool XclImpChTrFmlConverter::Read3DTabReference( sal_uInt16 /*nIxti*/, SCTAB& rFirstTab, SCTAB& rLastTab,
ExternalTabInfo& rExtInfo )
{
return rChangeTrack.Read3DTabRefInfo( rFirstTab, rLastTab, rExtInfo );
diff --git a/sc/source/filter/xcl97/xcl97dum.cxx b/sc/source/filter/xcl97/xcl97dum.cxx
index 8340ce397ffa..1eafabf2fb73 100644
--- a/sc/source/filter/xcl97/xcl97dum.cxx
+++ b/sc/source/filter/xcl97/xcl97dum.cxx
@@ -39,7 +39,7 @@
// ... (8+) := neu in Biff8, ... (8*) := anders in Biff8
-const BYTE ExcDummy8_00a::pMyData[] = {
+const sal_uInt8 ExcDummy8_00a::pMyData[] = {
0xe1, 0x00, 0x02, 0x00, 0xb0, 0x04, // INTERFACEHDR
0xc1, 0x00, 0x02, 0x00, 0x00, 0x00, // MMS
0xe2, 0x00, 0x00, 0x00, // INTERFACEEND
@@ -65,13 +65,13 @@ const sal_Size ExcDummy8_00a::nMyLen = sizeof(ExcDummy8_00a::pMyData);
// TABID (8+): ExcTabid
-const BYTE ExcDummy8_00b::pMyData[] = {
+const sal_uInt8 ExcDummy8_00b::pMyData[] = {
0x9c, 0x00, 0x02, 0x00, 0x0e, 0x00 // FNGROUPCOUNT
};
const sal_Size ExcDummy8_00b::nMyLen = sizeof(ExcDummy8_00b::pMyData);
-const BYTE ExcDummy8_040::pMyData[] = {
+const sal_uInt8 ExcDummy8_040::pMyData[] = {
0xaf, 0x01, 0x02, 0x00, 0x00, 0x00, // PROT4REV (8+)
0xbc, 0x01, 0x02, 0x00, 0x00, 0x00, // PROT4REVPASS (8+)
// 0x3d, 0x00, 0x12, 0x00, 0xe0, 0x01, 0x5a, 0x00, 0xcf, // WINDOW1
@@ -83,7 +83,7 @@ const BYTE ExcDummy8_040::pMyData[] = {
const sal_Size ExcDummy8_040::nMyLen = sizeof(ExcDummy8_040::pMyData);
-const BYTE ExcDummy8_041::pMyData[] = {
+const sal_uInt8 ExcDummy8_041::pMyData[] = {
0xb7, 0x01, 0x02, 0x00, 0x00, 0x00, // REFRESHALL (8+)
0xda, 0x00, 0x02, 0x00, 0x00, 0x00 // BOOKBOOL
};
@@ -91,7 +91,7 @@ const sal_Size ExcDummy8_041::nMyLen = sizeof(ExcDummy8_041::pMyData);
-const BYTE ExcDummy8_02::pMyData[] = {
+const sal_uInt8 ExcDummy8_02::pMyData[] = {
0x5f, 0x00, 0x02, 0x00, 0x01, 0x00 // SAVERECALC
};
const sal_Size ExcDummy8_02::nMyLen = sizeof(ExcDummy8_02::pMyData);
@@ -105,7 +105,7 @@ sal_Size ExcDummy8_00a::GetLen() const
}
-const BYTE* ExcDummy8_00a::GetData() const
+const sal_uInt8* ExcDummy8_00a::GetData() const
{
return pMyData;
}
@@ -118,7 +118,7 @@ sal_Size ExcDummy8_00b::GetLen() const
}
-const BYTE* ExcDummy8_00b::GetData() const
+const sal_uInt8* ExcDummy8_00b::GetData() const
{
return pMyData;
}
@@ -131,7 +131,7 @@ sal_Size ExcDummy8_040::GetLen() const
}
-const BYTE* ExcDummy8_040::GetData() const
+const sal_uInt8* ExcDummy8_040::GetData() const
{
return pMyData;
}
@@ -144,7 +144,7 @@ sal_Size ExcDummy8_041::GetLen() const
}
-const BYTE* ExcDummy8_041::GetData() const
+const sal_uInt8* ExcDummy8_041::GetData() const
{
return pMyData;
}
@@ -157,7 +157,7 @@ sal_Size ExcDummy8_02::GetLen() const
}
-const BYTE* ExcDummy8_02::GetData() const
+const sal_uInt8* ExcDummy8_02::GetData() const
{
return pMyData;
}
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index cfd84edeec86..75bb0335f9d6 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -200,12 +200,12 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
{
if ( nAdditionalText )
nAdditionalText++;
- BOOL bInGroup = ( pCurrXclObj != NULL );
+ sal_Bool bInGroup = ( pCurrXclObj != NULL );
if ( bInGroup )
{ // stacked recursive group object
if ( !pCurrAppData->IsStackedGroup() )
{ //! UpdateDffFragmentEnd only once
- pCurrAppData->SetStackedGroup( TRUE );
+ pCurrAppData->SetStackedGroup( sal_True );
UpdateDffFragmentEnd();
}
}
@@ -312,12 +312,12 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
}
}
if ( !pCurrXclObj )
- pCurrAppData->SetDontWriteShape( TRUE );
+ pCurrAppData->SetDontWriteShape( sal_True );
return pCurrAppData;
}
-void XclEscherEx::EndShape( UINT16 nShapeType, UINT32 nShapeID )
+void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID )
{
// own escher data created? -> never delete such objects
bool bOwnEscher = pCurrXclObj && pCurrXclObj->IsOwnEscher();
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index a94e0e1fb91a..69ae4eadbaa9 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -123,13 +123,13 @@ XclExpObjList::~XclExpObjList()
delete pSolverContainer;
}
-UINT16 XclExpObjList::Add( XclObj* pObj )
+sal_uInt16 XclExpObjList::Add( XclObj* pObj )
{
DBG_ASSERT( Count() < 0xFFFF, "XclExpObjList::Add: too much for Xcl" );
if ( Count() < 0xFFFF )
{
Insert( pObj, LIST_APPEND );
- UINT16 nCnt = (UINT16) Count();
+ sal_uInt16 nCnt = (sal_uInt16) Count();
pObj->SetId( nCnt );
pObj->SetTab( mnScTab );
return nCnt;
@@ -326,7 +326,7 @@ void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdr
}
}
-void XclObj::SetEscherShapeType( UINT16 nType )
+void XclObj::SetEscherShapeType( sal_uInt16 nType )
{
//2do: what about the other defined ot... types?
switch ( nType )
@@ -459,7 +459,7 @@ static void lcl_FillProps( EscherPropertyContainer& rPropOpt, SdrObject* pCaptio
// If the Colour is the same as the 'ToolTip' System colour then
// use the default rather than the explicit colour value. This will
// be incorrect where user has chosen to use this colour explicity.
- Color aColor = Color( (BYTE)nValue, (BYTE)( nValue >> 8 ), (BYTE)( nValue >> 16 ) );
+ Color aColor = Color( (sal_uInt8)nValue, (sal_uInt8)( nValue >> 8 ), (sal_uInt8)( nValue >> 16 ) );
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
if( aColor == rSett.GetHelpColor().GetColor() )
{
@@ -599,14 +599,14 @@ void XclObjComment::SaveXml( XclExpXmlStream& rStrm )
// --- class XclObjDropDown ------------------------------------------
-XclObjDropDown::XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, BOOL bFilt ) :
+XclObjDropDown::XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, sal_Bool bFilt ) :
XclObj( rObjMgr, EXC_OBJTYPE_DROPDOWN, true ),
bIsFiltered( bFilt )
{
- SetLocked( TRUE );
- SetPrintable( FALSE );
- SetAutoFill( TRUE );
- SetAutoLine( FALSE );
+ SetLocked( sal_True );
+ SetPrintable( false );
+ SetAutoFill( sal_True );
+ SetAutoLine( false );
nGrbit |= 0x0100; // undocumented
mrEscherEx.OpenContainer( ESCHER_SpContainer );
mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_HAVESPT );
@@ -644,7 +644,7 @@ void XclObjDropDown::WriteSubRecs( XclExpStream& rStrm )
::insert_value( nDropDownFlags, EXC_OBJ_DROPDOWN_SIMPLE, 0, 2 );
::set_flag( nDropDownFlags, EXC_OBJ_DROPDOWN_FILTERED, bIsFiltered );
rStrm.StartRecord( EXC_ID_OBJLBSDATA, 16 );
- rStrm << (UINT32)0 << (UINT16)0 << (UINT16)0x0301 << (UINT16)0
+ rStrm << (sal_uInt32)0 << (sal_uInt16)0 << (sal_uInt16)0x0301 << (sal_uInt16)0
<< nDropDownFlags << sal_uInt16( 20 ) << sal_uInt16( 130 );
rStrm.EndRecord();
}
@@ -735,7 +735,7 @@ XclTxo::XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObje
{
SfxItemSet aSet( rEditObj.GetParaAttribs( 0));
const SfxPoolItem* pItem = NULL;
- if( aSet.GetItemState( EE_PARA_JUST, TRUE, &pItem ) == SFX_ITEM_SET )
+ if( aSet.GetItemState( EE_PARA_JUST, sal_True, &pItem ) == SFX_ITEM_SET )
{
SvxAdjust eEEAlign = static_cast< const SvxAdjustItem& >( *pItem ).GetAdjust();
pCaption->SetMergedItem( SvxAdjustItem( eEEAlign, EE_PARA_JUST ) );
@@ -795,7 +795,7 @@ void XclTxo::Save( XclExpStream& rStrm )
}
}
-UINT16 XclTxo::GetNum() const
+sal_uInt16 XclTxo::GetNum() const
{
return EXC_ID_TXO;
}
@@ -822,9 +822,9 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
{
// write only as embedded, not linked
String aStorageName( RTL_CONSTASCII_USTRINGPARAM( "MBD" ) );
- sal_Char aBuf[ sizeof(UINT32) * 2 + 1 ];
+ sal_Char aBuf[ sizeof(sal_uInt32) * 2 + 1 ];
// FIXME Eeek! Is this just a way to get a unique id?
- UINT32 nPictureId = UINT32(sal_uIntPtr(this) >> 2);
+ sal_uInt32 nPictureId = sal_uInt32(sal_uIntPtr(this) >> 2);
sprintf( aBuf, "%08X", static_cast< unsigned int >( nPictureId ) );
aStorageName.AppendAscii( aBuf );
SotStorageRef xOleStg = pRootStorage->OpenSotStorage( aStorageName,
@@ -836,7 +836,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
{
// set version to "old" version, because it must be
// saved in MS notation.
- UINT32 nFl = 0;
+ sal_uInt32 nFl = 0;
SvtFilterOptions* pFltOpts = SvtFilterOptions::Get();
if( pFltOpts )
{
@@ -858,7 +858,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
// OBJCF subrecord, undocumented as usual
rStrm.StartRecord( EXC_ID_OBJCF, 2 );
- rStrm << UINT16(0x0002);
+ rStrm << sal_uInt16(0x0002);
rStrm.EndRecord();
// OBJFLAGS subrecord, undocumented as usual
@@ -870,9 +870,9 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
// OBJPICTFMLA subrecord, undocumented as usual
XclExpString aName( xOleStg->GetUserName() );
- UINT16 nPadLen = (UINT16)(aName.GetSize() & 0x01);
- UINT16 nFmlaLen = static_cast< sal_uInt16 >( 12 + aName.GetSize() + nPadLen );
- UINT16 nSubRecLen = nFmlaLen + 6;
+ sal_uInt16 nPadLen = (sal_uInt16)(aName.GetSize() & 0x01);
+ sal_uInt16 nFmlaLen = static_cast< sal_uInt16 >( 12 + aName.GetSize() + nPadLen );
+ sal_uInt16 nSubRecLen = nFmlaLen + 6;
rStrm.StartRecord( EXC_ID_OBJPICTFMLA, nSubRecLen );
rStrm << nFmlaLen
@@ -909,7 +909,7 @@ void XclObjAny::WriteSubRecs( XclExpStream& rStrm )
{
if( mnObjType == EXC_OBJTYPE_GROUP )
// ftGmo subrecord
- rStrm << EXC_ID_OBJGMO << UINT16(2) << UINT16(0);
+ rStrm << EXC_ID_OBJGMO << sal_uInt16(2) << sal_uInt16(0);
}
void XclObjAny::Save( XclExpStream& rStrm )
@@ -1024,7 +1024,7 @@ void ExcBof8_Base::SaveCont( XclExpStream& rStrm )
}
-UINT16 ExcBof8_Base::GetNum() const
+sal_uInt16 ExcBof8_Base::GetNum() const
{
return 0x0809;
}
@@ -1114,7 +1114,7 @@ void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm )
// --- class XclObproj -----------------------------------------------
-UINT16 XclObproj::GetNum() const
+sal_uInt16 XclObproj::GetNum() const
{
return 0x00D3;
}
@@ -1139,7 +1139,7 @@ void XclCodename::SaveCont( XclExpStream& rStrm )
}
-UINT16 XclCodename::GetNum() const
+sal_uInt16 XclCodename::GetNum() const
{
return 0x01BA;
}
@@ -1154,7 +1154,7 @@ sal_Size XclCodename::GetLen() const
// ---- Scenarios ----------------------------------------------------
-ExcEScenarioCell::ExcEScenarioCell( UINT16 nC, UINT16 nR, const String& rTxt ) :
+ExcEScenarioCell::ExcEScenarioCell( sal_uInt16 nC, sal_uInt16 nR, const String& rTxt ) :
nCol( nC ),
nRow( nR ),
sText( rTxt, EXC_STR_DEFAULT, 255 )
@@ -1190,7 +1190,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
String sTmpName;
String sTmpComm;
Color aDummyCol;
- USHORT nFlags;
+ sal_uInt16 nFlags;
ScDocument& rDoc = rRoot.GetDoc();
rDoc.GetName( nTab, sTmpName );
@@ -1210,7 +1210,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
if( !pRList )
return;
- BOOL bContLoop = TRUE;
+ sal_Bool bContLoop = sal_True;
SCROW nRow;
SCCOL nCol;
String sText;
@@ -1229,7 +1229,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
rtl_math_StringFormat_Automatic,
rtl_math_DecimalPlaces_Max,
ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0),
- TRUE );
+ sal_True );
}
else
rDoc.GetString( nCol, nRow, nTab, sText );
@@ -1245,25 +1245,25 @@ ExcEScenario::~ExcEScenario()
delete pCell;
}
-BOOL ExcEScenario::Append( UINT16 nCol, UINT16 nRow, const String& rTxt )
+sal_Bool ExcEScenario::Append( sal_uInt16 nCol, sal_uInt16 nRow, const String& rTxt )
{
if( List::Count() == EXC_SCEN_MAXCELL )
- return FALSE;
+ return false;
ExcEScenarioCell* pCell = new ExcEScenarioCell( nCol, nRow, rTxt );
List::Insert( pCell, LIST_APPEND );
nRecLen += 6 + pCell->GetStringBytes(); // 4 bytes address, 2 bytes ifmt
- return TRUE;
+ return sal_True;
}
void ExcEScenario::SaveCont( XclExpStream& rStrm )
{
- rStrm << (UINT16) List::Count() // number of cells
+ rStrm << (sal_uInt16) List::Count() // number of cells
<< nProtected // fProtection
- << (UINT8) 0 // fHidden
- << (UINT8) sName.Len() // length of scen name
- << (UINT8) sComment.Len() // length of comment
- << (UINT8) sUserName.Len(); // length of user name
+ << (sal_uInt8) 0 // fHidden
+ << (sal_uInt8) sName.Len() // length of scen name
+ << (sal_uInt8) sComment.Len() // length of comment
+ << (sal_uInt8) sUserName.Len(); // length of user name
sName.WriteFlagField( rStrm );
sName.WriteBuffer( rStrm );
@@ -1281,7 +1281,7 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm )
rStrm.WriteZeroBytes( 2 * List::Count() ); // date format
}
-UINT16 ExcEScenario::GetNum() const
+sal_uInt16 ExcEScenario::GetNum() const
{
return 0x00AF;
}
@@ -1340,10 +1340,10 @@ ExcEScenarioManager::~ExcEScenarioManager()
void ExcEScenarioManager::SaveCont( XclExpStream& rStrm )
{
- rStrm << (UINT16) List::Count() // number of scenarios
+ rStrm << (sal_uInt16) List::Count() // number of scenarios
<< nActive // active scen
<< nActive // last displayed
- << (UINT16) 0; // reference areas
+ << (sal_uInt16) 0; // reference areas
}
void ExcEScenarioManager::Save( XclExpStream& rStrm )
@@ -1373,7 +1373,7 @@ void ExcEScenarioManager::SaveXml( XclExpXmlStream& rStrm )
rWorkbook->endElement( XML_scenarios );
}
-UINT16 ExcEScenarioManager::GetNum() const
+sal_uInt16 ExcEScenarioManager::GetNum() const
{
return 0x00AE;
}
@@ -1466,7 +1466,7 @@ XclCalccount::XclCalccount( const ScDocument& rDoc )
}
-UINT16 XclCalccount::GetNum() const
+sal_uInt16 XclCalccount::GetNum() const
{
return 0x000C;
}
@@ -1500,7 +1500,7 @@ XclIteration::XclIteration( const ScDocument& rDoc )
}
-UINT16 XclIteration::GetNum() const
+sal_uInt16 XclIteration::GetNum() const
{
return 0x0011;
}
@@ -1535,7 +1535,7 @@ XclDelta::XclDelta( const ScDocument& rDoc )
}
-UINT16 XclDelta::GetNum() const
+sal_uInt16 XclDelta::GetNum() const
{
return 0x0010;
}
@@ -1556,27 +1556,18 @@ void XclDelta::SaveXml( XclExpXmlStream& rStrm )
// ============================================================================
-XclExpFilePass::XclExpFilePass( const XclExpRoot& rRoot ) :
+XclExpFileEncryption::XclExpFileEncryption( const XclExpRoot& rRoot ) :
XclExpRecord(0x002F, 54),
mrRoot(rRoot)
{
}
-XclExpFilePass::~XclExpFilePass()
+XclExpFileEncryption::~XclExpFileEncryption()
{
}
-void XclExpFilePass::WriteBody( XclExpStream& rStrm )
+void XclExpFileEncryption::WriteBody( XclExpStream& rStrm )
{
- static const sal_uInt8 nDocId[] = {
- 0x17, 0xf7, 0x01, 0x08, 0xea, 0xad, 0x30, 0x5c,
- 0x1a, 0x95, 0xa5, 0x75, 0xd6, 0x79, 0xcd, 0x8d };
-
-
- static const sal_uInt8 nSalt[] = {
- 0xa4, 0x5b, 0xf7, 0xe9, 0x9f, 0x55, 0x21, 0xc5,
- 0xc5, 0x56, 0xa8, 0x0d, 0x39, 0x05, 0x3a, 0xb4 };
-
// 0x0000 - neither standard nor strong encryption
// 0x0001 - standard or strong encryption
rStrm << static_cast<sal_uInt16>(0x0001);
@@ -1586,13 +1577,17 @@ void XclExpFilePass::WriteBody( XclExpStream& rStrm )
sal_uInt16 nStdEnc = 0x0001;
rStrm << nStdEnc << nStdEnc;
- sal_uInt8 nSaltHash[16];
- XclExpEncrypterRef xEnc( new XclExpBiff8Encrypter(mrRoot, nDocId, nSalt) );
- xEnc->GetSaltDigest(nSaltHash);
-
- rStrm.Write(nDocId, 16);
- rStrm.Write(nSalt, 16);
- rStrm.Write(nSaltHash, 16);
+ sal_uInt8 pnDocId[16];
+ sal_uInt8 pnSalt[16];
+ sal_uInt8 pnSaltHash[16];
+ XclExpEncrypterRef xEnc( new XclExpBiff8Encrypter(mrRoot) );
+ xEnc->GetDocId(pnDocId);
+ xEnc->GetSalt(pnSalt);
+ xEnc->GetSaltDigest(pnSaltHash);
+
+ rStrm.Write(pnDocId, 16);
+ rStrm.Write(pnSalt, 16);
+ rStrm.Write(pnSaltHash, 16);
rStrm.SetEncrypter(xEnc);
}
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
index cd4875a9079a..ac636249cf68 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
@@ -50,7 +50,7 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList) :
@@ -58,9 +58,9 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r
fIterationEpsilon(0.001),
nIterationCount(100),
nYear2000(1930),
- bIsIterationEnabled(sal_False),
- bCalcAsShown(sal_False),
- bIgnoreCase(sal_False),
+ bIsIterationEnabled(false),
+ bCalcAsShown(false),
+ bIgnoreCase(false),
bLookUpLabels(sal_True),
bMatchWholeCell(sal_True),
bUseRegularExpressions(sal_True)
@@ -92,12 +92,12 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r
else if (IsXMLToken(aLocalName, XML_SEARCH_CRITERIA_MUST_APPLY_TO_WHOLE_CELL))
{
if (IsXMLToken(sValue, XML_FALSE))
- bMatchWholeCell = sal_False;
+ bMatchWholeCell = false;
}
else if (IsXMLToken(aLocalName, XML_AUTOMATIC_FIND_LABELS))
{
if (IsXMLToken(sValue, XML_FALSE))
- bLookUpLabels = sal_False;
+ bLookUpLabels = false;
}
else if (IsXMLToken(aLocalName, XML_NULL_YEAR))
{
@@ -108,7 +108,7 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r
else if (IsXMLToken(aLocalName, XML_USE_REGULAR_EXPRESSIONS))
{
if (IsXMLToken(sValue, XML_FALSE))
- bUseRegularExpressions = sal_False;
+ bUseRegularExpressions = false;
}
}
}
@@ -118,7 +118,7 @@ ScXMLCalculationSettingsContext::~ScXMLCalculationSettingsContext()
{
}
-SvXMLImportContext *ScXMLCalculationSettingsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLCalculationSettingsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -167,7 +167,7 @@ void ScXMLCalculationSettingsContext::EndElement()
}
ScXMLNullDateContext::ScXMLNullDateContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -200,7 +200,7 @@ ScXMLNullDateContext::~ScXMLNullDateContext()
{
}
-SvXMLImportContext *ScXMLNullDateContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLNullDateContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -215,7 +215,7 @@ void ScXMLNullDateContext::EndElement()
}
ScXMLIterationContext::ScXMLIterationContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -258,7 +258,7 @@ ScXMLIterationContext::~ScXMLIterationContext()
{
}
-SvXMLImportContext *ScXMLIterationContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLIterationContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
index 867c01a5d923..fb023bc0c740 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
@@ -50,14 +50,14 @@ class ScXMLCalculationSettingsContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLCalculationSettingsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLCalculationSettingsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLCalculationSettingsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -74,14 +74,14 @@ class ScXMLNullDateContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLNullDateContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLNullDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
virtual ~ScXMLNullDateContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -94,14 +94,14 @@ class ScXMLIterationContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLIterationContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLIterationContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
virtual ~ScXMLIterationContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
index 6b9bed748fb6..b7a05b59053e 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
@@ -55,7 +55,7 @@ ScMyImpCellRangeSource::ScMyImpCellRangeSource() :
ScXMLCellRangeSourceContext::ScXMLCellRangeSourceContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
ScMyImpCellRangeSource* pCellRangeSource ) :
@@ -71,7 +71,7 @@ ScXMLCellRangeSourceContext::ScXMLCellRangeSourceContext(
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( nIndex ));
const OUString& sValue(xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
switch( rAttrTokenMap.Get( nPrefix, aLocalName ) )
{
@@ -121,7 +121,7 @@ ScXMLCellRangeSourceContext::~ScXMLCellRangeSourceContext()
}
SvXMLImportContext *ScXMLCellRangeSourceContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ )
{
diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
index 711e83c7ea55..58b9c7d10e95 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
@@ -61,7 +61,7 @@ private:
public:
ScXMLCellRangeSourceContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
ScMyImpCellRangeSource* pCellRangeSource
@@ -69,7 +69,7 @@ public:
virtual ~ScXMLCellRangeSourceContext();
virtual SvXMLImportContext* CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList
);
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 7c271ef9b0a5..7db33e2c51fa 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -128,7 +128,7 @@ void ScChangeTrackingExportHelper::WriteChangeInfo(const ScChangeAction* pAction
{
SvXMLElementExport aCreatorElem( rExport, XML_NAMESPACE_DC,
XML_CREATOR, sal_True,
- sal_False );
+ false );
rtl::OUString sAuthor(pAction->GetUser());
rExport.Characters(sAuthor);
}
@@ -138,14 +138,14 @@ void ScChangeTrackingExportHelper::WriteChangeInfo(const ScChangeAction* pAction
ScXMLConverter::ConvertDateTimeToString(pAction->GetDateTimeUTC(), sDate);
SvXMLElementExport aDateElem( rExport, XML_NAMESPACE_DC,
XML_DATE, sal_True,
- sal_False );
+ false );
rExport.Characters(sDate.makeStringAndClear());
}
rtl::OUString sComment(pAction->GetComment());
if (sComment.getLength())
{
- SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false);
sal_Bool bPrevCharWasSpace(sal_True);
rExport.GetTextParagraphExport()->exportText(sComment, bPrevCharWasSpace);
}
@@ -238,7 +238,7 @@ void ScChangeTrackingExportHelper::WriteEmptyCell()
void ScChangeTrackingExportHelper::SetValueAttributes(const double& fValue, const String& sValue)
{
- sal_Bool bSetAttributes(sal_False);
+ sal_Bool bSetAttributes(false);
if (sValue.Len())
{
sal_uInt32 nIndex;
@@ -308,7 +308,7 @@ void ScChangeTrackingExportHelper::WriteStringCell(const ScBaseCell* pCell)
SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, sal_True, sal_True);
if (sOUString.getLength())
{
- SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false);
sal_Bool bPrevCharWasSpace(sal_True);
rExport.GetTextParagraphExport()->exportText(sOUString, bPrevCharWasSpace);
}
@@ -333,7 +333,7 @@ void ScChangeTrackingExportHelper::WriteEditCell(const ScBaseCell* pCell)
}
pEditTextObj->SetText(*(pEditCell->GetData()));
if (xText.is())
- rExport.GetTextParagraphExport()->exportText(xText, sal_False, sal_False);
+ rExport.GetTextParagraphExport()->exportText(xText, false, false);
}
}
}
@@ -373,12 +373,12 @@ void ScChangeTrackingExportHelper::WriteFormulaCell(const ScBaseCell* pCell, con
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MATRIX_COVERED, XML_TRUE);
}
rtl::OUString sMatrixFormula = sOUFormula.copy(1, sOUFormula.getLength() - 2);
- rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sMatrixFormula, sal_False );
+ rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sMatrixFormula, false );
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FORMULA, sQValue);
}
else
{
- rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sFormula, sal_False );
+ rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sFormula, false );
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FORMULA, sQValue);
}
if (pFormulaCell->IsValue())
@@ -395,7 +395,7 @@ void ScChangeTrackingExportHelper::WriteFormulaCell(const ScBaseCell* pCell, con
SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, sal_True, sal_True);
if (sOUValue.getLength())
{
- SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false);
sal_Bool bPrevCharWasSpace(sal_True);
rExport.GetTextParagraphExport()->exportText(sOUValue, bPrevCharWasSpace);
}
@@ -570,7 +570,7 @@ void ScChangeTrackingExportHelper::AddDeletionAttributes(const ScChangeActionDel
if (pDelAction->IsMultiDelete() && !pDelAction->GetDx() && !pDelAction->GetDy())
{
const ScChangeAction* p = pDelAction->GetNext();
- sal_Bool bAll(sal_False);
+ sal_Bool bAll(false);
sal_Int32 nSlavesCount (1);
while (!bAll && p)
{
@@ -673,7 +673,7 @@ void ScChangeTrackingExportHelper::CollectCellAutoStyles(const ScBaseCell* pBase
}
pEditTextObj->SetText(*(pEditCell->GetData()));
if (xText.is())
- rExport.GetTextParagraphExport()->collectTextAutoStyles(xText, sal_False, sal_False);
+ rExport.GetTextParagraphExport()->collectTextAutoStyles(xText, false, false);
}
}
}
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index d83e6d001d77..246e3eed3f20 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -212,7 +212,7 @@ ScXMLChangeTrackingImportHelper::ScXMLChangeTrackingImportHelper()
sIDPrefix(RTL_CONSTASCII_USTRINGPARAM(SC_CHANGE_ID_PREFIX)),
nMultiSpanned(0),
nMultiSpannedSlaveCount(0),
- bChangeTrack(sal_False)
+ bChangeTrack(false)
{
nPrefixLength = sIDPrefix.getLength();
}
@@ -465,10 +465,10 @@ void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, S
// old files didn't store 100th seconds, enable again
if ( aInfo.aDateTime.HundredthSeconds )
- pTrack->SetTime100thSeconds( TRUE );
+ pTrack->SetTime100thSeconds( sal_True );
StrData aStrData( aInfo.sUser );
- USHORT nPos;
+ sal_uInt16 nPos;
if ( pTrack->GetUserCollection().Search( &aStrData, nPos ) )
{
const StrData* pUser = static_cast<const StrData*>( pTrack->GetUserCollection().At( nPos ) );
@@ -836,7 +836,7 @@ void ScXMLChangeTrackingImportHelper::CreateChangeTrack(ScDocument* pTempDoc)
{
pTrack = new ScChangeTrack(pDoc, aUsers);
// old files didn't store 100th seconds, disable until encountered
- pTrack->SetTime100thSeconds( FALSE );
+ pTrack->SetTime100thSeconds( false );
ScMyActions::iterator aItr(aActions.begin());
ScMyActions::iterator aEndItr(aActions.end());
diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx
index 454c71e549fe..0a0a825ceb31 100644
--- a/sc/source/filter/xml/XMLCodeNameProvider.cxx
+++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx
@@ -42,7 +42,7 @@ sal_Bool XMLCodeNameProvider::_getCodeName( const uno::Any& aAny, String& rCodeN
{
uno::Sequence<beans::PropertyValue> aProps;
if( !(aAny >>= aProps) )
- return sal_False;
+ return false;
OUString sCodeNameProp( RTL_CONSTASCII_USTRINGPARAM("CodeName") );
sal_Int32 nPropCount = aProps.getLength();
@@ -59,7 +59,7 @@ sal_Bool XMLCodeNameProvider::_getCodeName( const uno::Any& aAny, String& rCodeN
}
}
- return sal_False;
+ return false;
}
@@ -92,7 +92,7 @@ XMLCodeNameProvider::~XMLCodeNameProvider()
}
}
- return sal_False;
+ return false;
}
uno::Any SAL_CALL XMLCodeNameProvider::getByName( const OUString& aName )
@@ -176,7 +176,7 @@ uno::Type SAL_CALL XMLCodeNameProvider::getElementType( )
return sal_True;
}
- return sal_False;
+ return false;
}
void XMLCodeNameProvider::set( const uno::Reference< container::XNameAccess>& xNameAccess, ScDocument *pDoc )
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
index 9d5004221ec2..858adcffeb6f 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
@@ -54,7 +54,7 @@ sal_Bool ScMyColumnRowGroup::operator<(const ScMyColumnRowGroup& rGroup) const
if (rGroup.nField == nField && rGroup.nLevel > nLevel)
return sal_True;
else
- return sal_False;
+ return false;
}
ScMyOpenCloseColumnRowGroup::ScMyOpenCloseColumnRowGroup(ScXMLExport& rTempExport, sal_uInt32 nToken)
@@ -83,7 +83,7 @@ void ScMyOpenCloseColumnRowGroup::AddGroup(const ScMyColumnRowGroup& aGroup, con
sal_Bool ScMyOpenCloseColumnRowGroup::IsGroupStart(const sal_Int32 nField)
{
- sal_Bool bGroupStart(sal_False);
+ sal_Bool bGroupStart(false);
if (!aTableStart.empty())
{
ScMyColumnRowGroupVec::iterator aItr(aTableStart.begin());
@@ -120,7 +120,7 @@ void ScMyOpenCloseColumnRowGroup::OpenGroups(const sal_Int32 nField)
{
ScMyColumnRowGroupVec::iterator aItr(aTableStart.begin());
ScMyColumnRowGroupVec::iterator aEndItr(aTableStart.end());
- sal_Bool bReady(sal_False);
+ sal_Bool bReady(false);
while(!bReady && aItr != aEndItr)
{
if (aItr->nField == nField)
@@ -135,7 +135,7 @@ void ScMyOpenCloseColumnRowGroup::OpenGroups(const sal_Int32 nField)
sal_Bool ScMyOpenCloseColumnRowGroup::IsGroupEnd(const sal_Int32 nField)
{
- sal_Bool bGroupEnd(sal_False);
+ sal_Bool bGroupEnd(false);
if (!aTableEnd.empty())
{
if (*(aTableEnd.begin()) == nField)
@@ -153,7 +153,7 @@ void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField)
{
ScMyFieldGroupVec::iterator aItr(aTableEnd.begin());
ScMyFieldGroupVec::iterator aEndItr(aTableEnd.end());
- sal_Bool bReady(sal_False);
+ sal_Bool bReady(false);
while(!bReady && aItr != aEndItr)
{
if (*aItr == nField)
diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx
index d28d8032e9bf..5f96bad52719 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.cxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.cxx
@@ -49,13 +49,13 @@ using namespace xmloff::token;
ScXMLConsolidationContext::ScXMLConsolidationContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
eFunction( SUBTOTAL_FUNC_NONE ),
- bLinkToSource( sal_False ),
- bTargetAddr(sal_False)
+ bLinkToSource( false ),
+ bTargetAddr(false)
{
ScXMLImport::MutexGuard aGuard(GetScImport());
if( !xAttrList.is() ) return;
@@ -68,7 +68,7 @@ ScXMLConsolidationContext::ScXMLConsolidationContext(
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
switch( rAttrTokenMap.Get( nPrefix, aLocalName ) )
{
@@ -100,7 +100,7 @@ ScXMLConsolidationContext::~ScXMLConsolidationContext()
}
SvXMLImportContext *ScXMLConsolidationContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ )
{
@@ -117,12 +117,12 @@ void ScXMLConsolidationContext::EndElement()
aConsParam.nTab = aTargetAddr.Tab();
aConsParam.eFunction = eFunction;
- USHORT nCount = (USHORT) Min( ScRangeStringConverter::GetTokenCount( sSourceList ), (sal_Int32)0xFFFF );
+ sal_uInt16 nCount = (sal_uInt16) Min( ScRangeStringConverter::GetTokenCount( sSourceList ), (sal_Int32)0xFFFF );
ScArea** ppAreas = nCount ? new ScArea*[ nCount ] : NULL;
if( ppAreas )
{
sal_Int32 nOffset = 0;
- USHORT nIndex;
+ sal_uInt16 nIndex;
for( nIndex = 0; nIndex < nCount; ++nIndex )
{
ppAreas[ nIndex ] = new ScArea;
@@ -141,13 +141,13 @@ void ScXMLConsolidationContext::EndElement()
delete[] ppAreas;
}
- aConsParam.bByCol = aConsParam.bByRow = FALSE;
+ aConsParam.bByCol = aConsParam.bByRow = false;
if( IsXMLToken(sUseLabel, XML_COLUMN ) )
- aConsParam.bByCol = TRUE;
+ aConsParam.bByCol = sal_True;
else if( IsXMLToken( sUseLabel, XML_ROW ) )
- aConsParam.bByRow = TRUE;
+ aConsParam.bByRow = sal_True;
else if( IsXMLToken( sUseLabel, XML_BOTH ) )
- aConsParam.bByCol = aConsParam.bByRow = TRUE;
+ aConsParam.bByCol = aConsParam.bByRow = sal_True;
aConsParam.bReferenceData = bLinkToSource;
diff --git a/sc/source/filter/xml/XMLConsolidationContext.hxx b/sc/source/filter/xml/XMLConsolidationContext.hxx
index a059c1309f04..eabf35031dbf 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.hxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.hxx
@@ -55,14 +55,14 @@ protected:
public:
ScXMLConsolidationContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList
);
virtual ~ScXMLConsolidationContext();
virtual SvXMLImportContext* CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList
);
diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx
index f18c26d3b188..5fafe505398a 100644
--- a/sc/source/filter/xml/XMLConverter.cxx
+++ b/sc/source/filter/xml/XMLConverter.cxx
@@ -251,7 +251,7 @@ sal_Bool ScXMLConverter::GetDetOpTypeFromString( ScDetOpType& rDetOpType, const
else if( IsXMLToken(rString, XML_REMOVE_PRECEDENTS ) )
rDetOpType = SCDETOP_DELPRED;
else
- return sal_False;
+ return false;
return sal_True;
}
@@ -316,8 +316,8 @@ void ScXMLConverter::GetStringFromDetOpType(
void ScXMLConverter::ParseFormula(OUString& sFormula, const sal_Bool bIsFormula)
{
OUStringBuffer sBuffer(sFormula.getLength());
- sal_Bool bInQuotationMarks(sal_False);
- sal_Bool bInDoubleQuotationMarks(sal_False);
+ sal_Bool bInQuotationMarks(false);
+ sal_Bool bInDoubleQuotationMarks(false);
sal_Int16 nCountBraces(0);
sal_Unicode chPrevious('=');
for (sal_Int32 i = 0; i < sFormula.getLength(); ++i)
diff --git a/sc/source/filter/xml/XMLConverter.hxx b/sc/source/filter/xml/XMLConverter.hxx
index f8d6f40ef6d0..a661bc532d01 100644
--- a/sc/source/filter/xml/XMLConverter.hxx
+++ b/sc/source/filter/xml/XMLConverter.hxx
@@ -68,11 +68,11 @@ public:
static void GetStringFromFunction(
::rtl::OUString& rString,
const ::com::sun::star::sheet::GeneralFunction eFunction,
- sal_Bool bAppendStr = sal_False );
+ sal_Bool bAppendStr = false );
static void GetStringFromFunction(
::rtl::OUString& rString,
const ScSubTotalFunc eFunction,
- sal_Bool bAppendStr = sal_False );
+ sal_Bool bAppendStr = false );
// IMPORT: DataPilotFieldOrientation
static ::com::sun::star::sheet::DataPilotFieldOrientation
@@ -83,7 +83,7 @@ public:
static void GetStringFromOrientation(
::rtl::OUString& rString,
const ::com::sun::star::sheet::DataPilotFieldOrientation eOrientation,
- sal_Bool bAppendStr = sal_False );
+ sal_Bool bAppendStr = false );
// IMPORT: Detective
static ScDetectiveObjType
@@ -97,11 +97,11 @@ public:
static void GetStringFromDetObjType(
::rtl::OUString& rString,
const ScDetectiveObjType eObjType,
- sal_Bool bAppendStr = sal_False );
+ sal_Bool bAppendStr = false );
static void GetStringFromDetOpType(
::rtl::OUString& rString,
const ScDetOpType eOpType,
- sal_Bool bAppendStr = sal_False );
+ sal_Bool bAppendStr = false );
// IMPORT: Formulas
static void ParseFormula(
diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx
index 1ebfab3a212c..94cf98d39849 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.cxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.cxx
@@ -51,7 +51,7 @@ using rtl::OUString;
//------------------------------------------------------------------
ScXMLDDELinksContext::ScXMLDDELinksContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) :
@@ -66,7 +66,7 @@ ScXMLDDELinksContext::~ScXMLDDELinksContext()
GetScImport().UnlockSolarMutex();
}
-SvXMLImportContext *ScXMLDDELinksContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDDELinksContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -87,7 +87,7 @@ void ScXMLDDELinksContext::EndElement()
}
ScXMLDDELinkContext::ScXMLDDELinkContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) :
@@ -109,7 +109,7 @@ ScXMLDDELinkContext::~ScXMLDDELinkContext()
{
}
-SvXMLImportContext *ScXMLDDELinkContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDDELinkContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -205,12 +205,12 @@ void ScXMLDDELinkContext::EndElement()
++aItr;
}
- GetScImport().GetDocument()->SetDdeLinkResultMatrix( static_cast< USHORT >( nPosition ), pMatrix );
+ GetScImport().GetDocument()->SetDdeLinkResultMatrix( static_cast< sal_uInt16 >( nPosition ), pMatrix );
}
}
ScXMLDDESourceContext::ScXMLDDESourceContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -227,7 +227,7 @@ ScXMLDDESourceContext::ScXMLDDESourceContext( ScXMLImport& rImport,
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if (nPrefix == XML_NAMESPACE_OFFICE)
{
@@ -254,7 +254,7 @@ ScXMLDDESourceContext::~ScXMLDDESourceContext()
{
}
-SvXMLImportContext *ScXMLDDESourceContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDDESourceContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -270,7 +270,7 @@ void ScXMLDDESourceContext::EndElement()
}
ScXMLDDETableContext::ScXMLDDETableContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -285,7 +285,7 @@ ScXMLDDETableContext::~ScXMLDDETableContext()
{
}
-SvXMLImportContext *ScXMLDDETableContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDDETableContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -311,7 +311,7 @@ void ScXMLDDETableContext::EndElement()
}
ScXMLDDEColumnContext::ScXMLDDEColumnContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -329,7 +329,7 @@ ScXMLDDEColumnContext::ScXMLDDEColumnContext( ScXMLImport& rImport,
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if (nPrefix == XML_NAMESPACE_TABLE)
if (IsXMLToken(aLocalName, XML_NUMBER_COLUMNS_REPEATED))
@@ -342,7 +342,7 @@ ScXMLDDEColumnContext::~ScXMLDDEColumnContext()
{
}
-SvXMLImportContext *ScXMLDDEColumnContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDDEColumnContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -357,7 +357,7 @@ void ScXMLDDEColumnContext::EndElement()
}
ScXMLDDERowContext::ScXMLDDERowContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -375,7 +375,7 @@ ScXMLDDERowContext::ScXMLDDERowContext( ScXMLImport& rImport,
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if (nPrefix == XML_NAMESPACE_TABLE)
if (IsXMLToken(aLocalName, XML_NUMBER_ROWS_REPEATED))
@@ -388,7 +388,7 @@ ScXMLDDERowContext::~ScXMLDDERowContext()
{
}
-SvXMLImportContext *ScXMLDDERowContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDDERowContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -411,7 +411,7 @@ void ScXMLDDERowContext::EndElement()
}
ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -434,7 +434,7 @@ ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport,
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sTempValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if (nPrefix == XML_NAMESPACE_OFFICE)
{
@@ -443,19 +443,19 @@ ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport,
if (IsXMLToken(sTempValue, XML_STRING))
bString = sal_True;
else
- bString = sal_False;
+ bString = false;
}
else if (IsXMLToken(aLocalName, XML_STRING_VALUE))
{
sValue = sTempValue;
- bEmpty = sal_False;
+ bEmpty = false;
bString2 = sal_True;
}
else if (IsXMLToken(aLocalName, XML_VALUE))
{
GetScImport().GetMM100UnitConverter().convertDouble(fValue, sTempValue);
- bEmpty = sal_False;
- bString2 = sal_False;
+ bEmpty = false;
+ bString2 = false;
}
}
else if (nPrefix == XML_NAMESPACE_TABLE)
@@ -470,7 +470,7 @@ ScXMLDDECellContext::~ScXMLDDECellContext()
{
}
-SvXMLImportContext *ScXMLDDECellContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDDECellContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/XMLDDELinksContext.hxx b/sc/source/filter/xml/XMLDDELinksContext.hxx
index d296df83be2c..2af8015d6476 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.hxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.hxx
@@ -40,14 +40,14 @@ class ScXMLDDELinksContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDDELinksContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDDELinksContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLDDELinksContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -80,14 +80,14 @@ class ScXMLDDELinkContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDDELinkContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDDELinkContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLDDELinkContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -112,7 +112,7 @@ class ScXMLDDESourceContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDDESourceContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDDESourceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -120,7 +120,7 @@ public:
virtual ~ScXMLDDESourceContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -135,7 +135,7 @@ class ScXMLDDETableContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDDETableContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDDETableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -143,7 +143,7 @@ public:
virtual ~ScXMLDDETableContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -158,7 +158,7 @@ class ScXMLDDEColumnContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDDEColumnContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDDEColumnContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -166,7 +166,7 @@ public:
virtual ~ScXMLDDEColumnContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -182,7 +182,7 @@ class ScXMLDDERowContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDDERowContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDDERowContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -190,7 +190,7 @@ public:
virtual ~ScXMLDDERowContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -212,7 +212,7 @@ class ScXMLDDECellContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDDECellContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDDECellContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -220,7 +220,7 @@ public:
virtual ~ScXMLDDECellContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx
index 3c52f96b558a..812b66b345f5 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.cxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.cxx
@@ -53,7 +53,7 @@ using namespace xmloff::token;
ScMyImpDetectiveObj::ScMyImpDetectiveObj() :
aSourceRange(),
eObjType( SC_DETOBJ_NONE ),
- bHasError( sal_False )
+ bHasError( false )
{
}
@@ -72,7 +72,7 @@ void ScMyImpDetectiveOpArray::Sort()
sal_Bool ScMyImpDetectiveOpArray::GetFirstOp( ScMyImpDetectiveOp& rDetOp )
{
if( aDetectiveOpList.empty() )
- return sal_False;
+ return false;
ScMyImpDetectiveOpList::iterator aItr = aDetectiveOpList.begin();
rDetOp = *aItr;
aDetectiveOpList.erase( aItr );
@@ -84,7 +84,7 @@ sal_Bool ScMyImpDetectiveOpArray::GetFirstOp( ScMyImpDetectiveOp& rDetOp )
ScXMLDetectiveContext::ScXMLDetectiveContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
ScMyImpDetectiveObjVec* pNewDetectiveObjVec ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
@@ -97,7 +97,7 @@ ScXMLDetectiveContext::~ScXMLDetectiveContext()
}
SvXMLImportContext *ScXMLDetectiveContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& xAttrList )
{
@@ -128,14 +128,14 @@ void ScXMLDetectiveContext::EndElement()
ScXMLDetectiveHighlightedContext::ScXMLDetectiveHighlightedContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
ScMyImpDetectiveObjVec* pNewDetectiveObjVec ):
SvXMLImportContext( rImport, nPrfx, rLName ),
pDetectiveObjVec( pNewDetectiveObjVec ),
aDetectiveObj(),
- bValid( sal_False )
+ bValid( false )
{
if( !xAttrList.is() ) return;
@@ -147,7 +147,7 @@ ScXMLDetectiveHighlightedContext::ScXMLDetectiveHighlightedContext(
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
switch( rAttrTokenMap.Get( nPrefix, aLocalName ) )
{
@@ -179,7 +179,7 @@ ScXMLDetectiveHighlightedContext::~ScXMLDetectiveHighlightedContext()
}
SvXMLImportContext *ScXMLDetectiveHighlightedContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ )
{
@@ -198,7 +198,7 @@ void ScXMLDetectiveHighlightedContext::EndElement()
bValid = sal_True;
break;
default:
- bValid = sal_False;
+ bValid = false;
}
if( bValid )
pDetectiveObjVec->push_back( aDetectiveObj );
@@ -209,12 +209,12 @@ void ScXMLDetectiveHighlightedContext::EndElement()
ScXMLDetectiveOperationContext::ScXMLDetectiveOperationContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
aDetectiveOp(),
- bHasType( sal_False )
+ bHasType( false )
{
if( !xAttrList.is() ) return;
@@ -226,7 +226,7 @@ ScXMLDetectiveOperationContext::ScXMLDetectiveOperationContext(
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
switch( rAttrTokenMap.Get( nPrefix, aLocalName ) )
{
@@ -250,7 +250,7 @@ ScXMLDetectiveOperationContext::~ScXMLDetectiveOperationContext()
}
SvXMLImportContext *ScXMLDetectiveOperationContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ )
{
diff --git a/sc/source/filter/xml/XMLDetectiveContext.hxx b/sc/source/filter/xml/XMLDetectiveContext.hxx
index 4e2d6b402574..0e7c8c5a957f 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.hxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.hxx
@@ -97,14 +97,14 @@ private:
public:
ScXMLDetectiveContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
ScMyImpDetectiveObjVec* pNewDetectiveObjVec
);
virtual ~ScXMLDetectiveContext();
virtual SvXMLImportContext* CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList
);
@@ -127,7 +127,7 @@ private:
public:
ScXMLDetectiveHighlightedContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
ScMyImpDetectiveObjVec* pNewDetectiveObjVec
@@ -135,7 +135,7 @@ public:
virtual ~ScXMLDetectiveHighlightedContext();
virtual SvXMLImportContext* CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList
);
@@ -157,14 +157,14 @@ private:
public:
ScXMLDetectiveOperationContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList
);
virtual ~ScXMLDetectiveOperationContext();
virtual SvXMLImportContext* CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList
);
diff --git a/sc/source/filter/xml/XMLEmptyContext.cxx b/sc/source/filter/xml/XMLEmptyContext.cxx
index 20bec1f097b2..0c38adc344d6 100644
--- a/sc/source/filter/xml/XMLEmptyContext.cxx
+++ b/sc/source/filter/xml/XMLEmptyContext.cxx
@@ -39,7 +39,7 @@
//------------------------------------------------------------------
ScXMLEmptyContext::ScXMLEmptyContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName) :
SvXMLImportContext( rImport, nPrfx, rLName )
{
@@ -49,7 +49,7 @@ ScXMLEmptyContext::~ScXMLEmptyContext()
{
}
-SvXMLImportContext *ScXMLEmptyContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLEmptyContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/XMLEmptyContext.hxx b/sc/source/filter/xml/XMLEmptyContext.hxx
index 1b090c719281..8c836d0aec96 100644
--- a/sc/source/filter/xml/XMLEmptyContext.hxx
+++ b/sc/source/filter/xml/XMLEmptyContext.hxx
@@ -42,12 +42,12 @@ class ScXMLEmptyContext : public SvXMLImportContext
public:
- ScXMLEmptyContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLEmptyContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName);
virtual ~ScXMLEmptyContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx b/sc/source/filter/xml/XMLExportDDELinks.cxx
index 810edc372ba3..70e83b284008 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.cxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.cxx
@@ -68,9 +68,9 @@ sal_Bool ScXMLExportDDELinks::CellsEqual(const sal_Bool bPrevEmpty, const sal_Bo
else
return (fPrevValue == fValue);
else
- return sal_False;
+ return false;
else
- return sal_False;
+ return false;
}
void ScXMLExportDDELinks::WriteCell(const ScMatrixValue& aVal, sal_Int32 nRepeat)
@@ -109,7 +109,7 @@ void ScXMLExportDDELinks::WriteTable(const sal_Int32 nPos)
if (!pDoc)
return;
- const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix(static_cast<USHORT>(nPos));
+ const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix(static_cast<sal_uInt16>(nPos));
if (!pMatrix)
return;
@@ -171,7 +171,7 @@ void ScXMLExportDDELinks::WriteDDELinks(uno::Reference<sheet::XSpreadsheetDocume
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_DDE_TOPIC, xDDELink->getTopic());
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_DDE_ITEM, xDDELink->getItem());
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_AUTOMATIC_UPDATE, XML_TRUE);
- BYTE nMode;
+ sal_uInt8 nMode;
if (rExport.GetDocument() &&
rExport.GetDocument()->GetDdeLinkMode(nDDELink, nMode))
{
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 6ecdcfcf1549..968c37f0e1b5 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -152,8 +152,8 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam)
SCSIZE nQueryEntryCount = aQueryParam.GetEntryCount();
if (nQueryEntryCount > 0)
{
- sal_Bool bAnd(sal_False);
- sal_Bool bOr(sal_False);
+ sal_Bool bAnd(false);
+ sal_Bool bOr(false);
sal_Bool bHasEntries(sal_True);
SCSIZE nEntries(0);
SCSIZE j;
@@ -173,7 +173,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam)
++nEntries;
}
else
- bHasEntries = sal_False;
+ bHasEntries = false;
}
nQueryEntryCount = nEntries;
if (nQueryEntryCount)
@@ -225,7 +225,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam)
bOpenAndElement = sal_True;
}
else
- bOpenAndElement = sal_False;
+ bOpenAndElement = false;
for (j = 1; j < nQueryEntryCount; ++j)
{
if (aConnection != aQueryParam.GetEntry(j).eConnect)
@@ -241,7 +241,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam)
{
WriteDPCondition(aPrevFilterField, aQueryParam.bCaseSens, aQueryParam.bRegExp);
rExport.EndElement(aName, sal_True);
- bOpenAndElement = sal_False;
+ bOpenAndElement = false;
}
}
else
@@ -251,7 +251,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam)
if (bOpenAndElement)
{
rExport.EndElement(aName, sal_True);
- bOpenAndElement = sal_False;
+ bOpenAndElement = false;
}
if (j == nQueryEntryCount - 1)
{
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 6c9abb9372fb..3e0ca1857bff 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -130,7 +130,7 @@ void ScXMLExportDatabaseRanges::WriteImportDescriptor(const uno::Sequence <beans
rtl::OUString sConRes;
rtl::OUString sSourceObject;
sheet::DataImportMode nSourceType = sheet::DataImportMode_NONE;
- sal_Bool bNative = sal_False;
+ sal_Bool bNative = false;
for (sal_Int16 i = 0; i < nProperties; ++i)
{
if (aImportDescriptor[i].Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_DBNAME)))
@@ -311,8 +311,8 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee
rExport.CheckAttrList();
sal_Bool bIsCaseSensitive = ::cppu::any2bool(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ISCASE))));
sal_Bool bUseRegularExpressions = ::cppu::any2bool(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_USEREGEX))));
- sal_Bool bAnd = sal_False;
- sal_Bool bOr = sal_False;
+ sal_Bool bAnd = false;
+ sal_Bool bOr = false;
for (sal_Int32 i = 1; i < nTableFilterFields; ++i)
{
if (aTableFilterFields[i].Connection == sheet::FilterConnection_AND)
@@ -353,7 +353,7 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee
bOpenAndElement = sal_True;
}
else
- bOpenAndElement = sal_False;
+ bOpenAndElement = false;
for (sal_Int32 i = 1; i < nTableFilterFields; ++i)
{
if (aConnection != aTableFilterFields[i].Connection)
@@ -369,7 +369,7 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee
{
WriteCondition(aPrevFilterField, bIsCaseSensitive, bUseRegularExpressions);
rExport.EndElement(aName, sal_True);
- bOpenAndElement = sal_False;
+ bOpenAndElement = false;
}
}
else
@@ -379,7 +379,7 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee
if (bOpenAndElement)
{
rExport.EndElement(aName, sal_True);
- bOpenAndElement = sal_False;
+ bOpenAndElement = false;
}
if (i == nTableFilterFields - 1)
{
@@ -406,8 +406,8 @@ void ScXMLExportDatabaseRanges::WriteSortDescriptor(const uno::Sequence <beans::
{
uno::Sequence <table::TableSortField> aSortFields;
sal_Bool bBindFormatsToContent (sal_True);
- sal_Bool bCopyOutputData (sal_False);
- sal_Bool bIsUserListEnabled (sal_False);
+ sal_Bool bCopyOutputData (false);
+ sal_Bool bIsUserListEnabled (false);
table::CellAddress aOutputPosition;
sal_Int32 nUserListIndex = 0;
sal_Int32 nProperties = aSortProperties.getLength();
@@ -627,7 +627,7 @@ void ScXMLExportDatabaseRanges::WriteDatabaseRanges(const com::sun::star::uno::R
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CONTAINS_HEADER, XML_FALSE);
sal_Bool bSortColumns(sal_True);
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
sal_Int32 nProperty(0);
while (!bFound && (nProperty < aSortProperties.getLength()))
{
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index 0edf54a7e71d..d990bf035038 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -109,7 +109,7 @@ sal_Bool ScMyShapesContainer::GetFirstAddress( table::CellAddress& rCellAddress
ScUnoConversion::FillApiAddress( rCellAddress, aShapeList.begin()->aAddress );
return (nTable == rCellAddress.Sheet);
}
- return sal_False;
+ return false;
}
void ScMyShapesContainer::SetCellData( ScMyCell& rMyCell )
@@ -172,7 +172,7 @@ sal_Bool ScMyNoteShapesContainer::GetFirstAddress( table::CellAddress& rCellAddr
ScUnoConversion::FillApiAddress( rCellAddress, aNoteShapeList.begin()->aPos );
return (nTable == rCellAddress.Sheet);
}
- return sal_False;
+ return false;
}
void ScMyNoteShapesContainer::SetCellData( ScMyCell& rMyCell )
@@ -235,7 +235,7 @@ void ScMyMergedRangesContainer::AddRange(const table::CellRangeAddress aMergedRa
aRange.nRows = nEndRow - nStartRow + 1;
aRangeList.push_back( aRange );
- aRange.bIsFirst = sal_False;
+ aRange.bIsFirst = false;
aRange.nRows = 0;
for( sal_Int32 nRow = nStartRow + 1; nRow <= nEndRow; ++nRow )
{
@@ -252,12 +252,12 @@ sal_Bool ScMyMergedRangesContainer::GetFirstAddress( table::CellAddress& rCellAd
ScUnoConversion::FillApiStartAddress( rCellAddress, aRangeList.begin()->aCellRange );
return (nTable == rCellAddress.Sheet);
}
- return sal_False;
+ return false;
}
void ScMyMergedRangesContainer::SetCellData( ScMyCell& rMyCell )
{
- rMyCell.bIsMergedBase = rMyCell.bIsCovered = sal_False;
+ rMyCell.bIsMergedBase = rMyCell.bIsCovered = false;
ScMyMergedRangeList::iterator aItr(aRangeList.begin());
if( aItr != aRangeList.end() )
{
@@ -273,7 +273,7 @@ void ScMyMergedRangesContainer::SetCellData( ScMyCell& rMyCell )
if( aItr->aCellRange.StartColumn < aItr->aCellRange.EndColumn )
{
++(aItr->aCellRange.StartColumn);
- aItr->bIsFirst = sal_False;
+ aItr->bIsFirst = false;
}
else
aRangeList.erase(aItr);
@@ -331,12 +331,12 @@ sal_Bool ScMyAreaLinksContainer::GetFirstAddress( table::CellAddress& rCellAddre
ScUnoConversion::FillApiStartAddress( rCellAddress, aAreaLinkList.begin()->aDestRange );
return (nTable == rCellAddress.Sheet);
}
- return sal_False;
+ return false;
}
void ScMyAreaLinksContainer::SetCellData( ScMyCell& rMyCell )
{
- rMyCell.bHasAreaLink = sal_False;
+ rMyCell.bHasAreaLink = false;
ScMyAreaLinkList::iterator aItr(aAreaLinkList.begin());
if( aItr != aAreaLinkList.end() )
{
@@ -357,7 +357,7 @@ void ScMyAreaLinksContainer::SetCellData( ScMyCell& rMyCell )
aItr = aAreaLinkList.erase( aItr );
}
else
- bFound = sal_False;
+ bFound = false;
}
}
}
@@ -421,12 +421,12 @@ sal_Bool ScMyEmptyDatabaseRangesContainer::GetFirstAddress( table::CellAddress&
ScUnoConversion::FillApiStartAddress( rCellAddress, *(aDatabaseList.begin()) );
return (nTable == rCellAddress.Sheet);
}
- return sal_False;
+ return false;
}
void ScMyEmptyDatabaseRangesContainer::SetCellData( ScMyCell& rMyCell )
{
- rMyCell.bHasEmptyDatabase = sal_False;
+ rMyCell.bHasEmptyDatabase = false;
ScMyEmptyDatabaseRangeList::iterator aItr(aDatabaseList.begin());
if( aItr != aDatabaseList.end() )
{
@@ -515,7 +515,7 @@ sal_Bool ScMyDetectiveObjContainer::GetFirstAddress( table::CellAddress& rCellAd
rCellAddress = aDetectiveObjList.begin()->aPosition;
return (nTable == rCellAddress.Sheet);
}
- return sal_False;
+ return false;
}
void ScMyDetectiveObjContainer::SetCellData( ScMyCell& rMyCell )
@@ -581,7 +581,7 @@ sal_Bool ScMyDetectiveOpContainer::GetFirstAddress( table::CellAddress& rCellAdd
rCellAddress = aDetectiveOpList.begin()->aPosition;
return (nTable == rCellAddress.Sheet);
}
- return sal_False;
+ return false;
}
void ScMyDetectiveOpContainer::SetCellData( ScMyCell& rMyCell )
@@ -617,22 +617,22 @@ ScMyCell::ScMyCell() :
fValue(0.0),
nValidationIndex(-1),
pBaseCell(NULL),
- bIsAutoStyle( sal_False ),
- bHasShape( sal_False ),
- bIsMergedBase( sal_False ),
- bIsCovered( sal_False ),
- bHasAreaLink( sal_False ),
- bHasEmptyDatabase( sal_False ),
- bHasDetectiveObj( sal_False ),
- bHasDetectiveOp( sal_False ),
- bIsEditCell( sal_False ),
- bKnowWhetherIsEditCell( sal_False ),
- bHasStringValue( sal_False ),
- bHasDoubleValue( sal_False ),
- bHasXText( sal_False ),
- bIsMatrixBase( sal_False ),
- bIsMatrixCovered( sal_False ),
- bHasAnnotation( sal_False )
+ bIsAutoStyle( false ),
+ bHasShape( false ),
+ bIsMergedBase( false ),
+ bIsCovered( false ),
+ bHasAreaLink( false ),
+ bHasEmptyDatabase( false ),
+ bHasDetectiveObj( false ),
+ bHasDetectiveOp( false ),
+ bIsEditCell( false ),
+ bKnowWhetherIsEditCell( false ),
+ bHasStringValue( false ),
+ bHasDoubleValue( false ),
+ bHasXText( false ),
+ bIsMatrixBase( false ),
+ bIsMatrixCovered( false ),
+ bHasAnnotation( false )
{
}
@@ -702,21 +702,21 @@ void ScMyNotEmptyCellsIterator::UpdateAddress( table::CellAddress& rAddress )
void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& rMyCell, table::CellAddress& rAddress )
{
rMyCell.aCellAddress = rAddress;
- rMyCell.bHasStringValue = sal_False;
- rMyCell.bHasDoubleValue = sal_False;
- rMyCell.bHasXText = sal_False;
- rMyCell.bKnowWhetherIsEditCell = sal_False;
- rMyCell.bIsEditCell = sal_False;
+ rMyCell.bHasStringValue = false;
+ rMyCell.bHasDoubleValue = false;
+ rMyCell.bHasXText = false;
+ rMyCell.bKnowWhetherIsEditCell = false;
+ rMyCell.bIsEditCell = false;
if( (nCellCol == rAddress.Column) && (nCellRow == rAddress.Row) )
pCellItr->GetNext( nCellCol, nCellRow );
}
void ScMyNotEmptyCellsIterator::SetMatrixCellData( ScMyCell& rMyCell )
{
- rMyCell.bIsMatrixCovered = sal_False;
- rMyCell.bIsMatrixBase = sal_False;
+ rMyCell.bIsMatrixCovered = false;
+ rMyCell.bIsMatrixBase = false;
- sal_Bool bIsMatrixBase(sal_False);
+ sal_Bool bIsMatrixBase(false);
ScAddress aScAddress;
ScUnoConversion::FillScAddress( aScAddress, rMyCell.aCellAddress );
@@ -747,7 +747,7 @@ void ScMyNotEmptyCellsIterator::SetMatrixCellData( ScMyCell& rMyCell )
void ScMyNotEmptyCellsIterator::HasAnnotation(ScMyCell& aCell)
{
- aCell.bHasAnnotation = sal_False;
+ aCell.bHasAnnotation = false;
if (!aAnnotations.empty())
{
ScMyExportAnnotationList::iterator aItr(aAnnotations.begin());
diff --git a/sc/source/filter/xml/XMLExportSharedData.cxx b/sc/source/filter/xml/XMLExportSharedData.cxx
index 1e7b3e506cc5..7849b64efe9c 100644
--- a/sc/source/filter/xml/XMLExportSharedData.cxx
+++ b/sc/source/filter/xml/XMLExportSharedData.cxx
@@ -109,7 +109,7 @@ uno::Reference<drawing::XDrawPage> ScMySharedData::GetDrawPage(const sal_Int32 n
sal_Bool ScMySharedData::HasForm(const sal_Int32 nTable, uno::Reference<drawing::XDrawPage>& xDrawPage)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (pDrawPages)
{
if ((*pDrawPages)[nTable].bHasForms)
diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx
index e12a7111fd9e..3c131f5925fe 100644
--- a/sc/source/filter/xml/XMLExportSharedData.hxx
+++ b/sc/source/filter/xml/XMLExportSharedData.hxx
@@ -40,7 +40,7 @@ struct ScMyDrawPage
com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> xDrawPage;
sal_Bool bHasForms;
- ScMyDrawPage() : bHasForms(sal_False) {}
+ ScMyDrawPage() : bHasForms(false) {}
};
typedef std::list< com::sun::star::uno::Reference<com::sun::star::drawing::XShape> > ScMyTableXShapes;
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 8e37136af94b..c3685941c736 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -63,9 +63,9 @@ ScMyValidation::ScMyValidation()
sImputTitle(),
sFormula1(),
sFormula2(),
- bShowErrorMessage(sal_False),
- bShowImputMessage(sal_False),
- bIgnoreBlanks(sal_False)
+ bShowErrorMessage(false),
+ bShowImputMessage(false),
+ bIgnoreBlanks(false)
{
}
@@ -92,7 +92,7 @@ sal_Bool ScMyValidation::IsEqual(const ScMyValidation& aVal) const
aVal.sFormula2 == sFormula2)
return sal_True;
else
- return sal_False;
+ return false;
}
ScMyValidationsContainer::ScMyValidationsContainer()
@@ -124,7 +124,7 @@ ScMyValidationsContainer::~ScMyValidationsContainer()
sal_Bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
sal_Int32& nValidationIndex)
{
- sal_Bool bAdded(sal_False);
+ sal_Bool bAdded(false);
uno::Reference<beans::XPropertySet> xPropertySet(aTempAny, uno::UNO_QUERY);
if (xPropertySet.is())
{
@@ -163,7 +163,7 @@ sal_Bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
aValidation.aBaseCell = xCondition->getSourcePosition();
}
//ScMyValidationRange aValidationRange;
- sal_Bool bEqualFound(sal_False);
+ sal_Bool bEqualFound(false);
sal_Int32 i(0);
sal_Int32 nCount(aValidationVec.size());
while (i < nCount && !bEqualFound)
@@ -299,7 +299,7 @@ rtl::OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const
{
const formula::FormulaGrammar::Grammar eGrammar = rExport.GetDocument()->GetStorageGrammar();
sal_uInt16 nNamespacePrefix = (eGrammar == formula::FormulaGrammar::GRAM_ODFF ? XML_NAMESPACE_OF : XML_NAMESPACE_OOOC);
- sCondition = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sCondition, sal_False );
+ sCondition = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sCondition, false );
}
return sCondition;
@@ -338,7 +338,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
{
if ((sText[i] == '\n'))
{
- SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false);
rExport.GetTextParagraphExport()->exportText(sTemp.makeStringAndClear(), bPrevCharWasSpace);
}
else
@@ -347,7 +347,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
}
if (sTemp.getLength())
{
- SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false);
rExport.GetTextParagraphExport()->exportText(sTemp.makeStringAndClear(), bPrevCharWasSpace);
}
}
@@ -404,19 +404,19 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
case sheet::ValidationAlertStyle_INFO :
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MESSAGE_TYPE, XML_INFORMATION);
- WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, sal_False);
+ WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, false);
}
break;
case sheet::ValidationAlertStyle_WARNING :
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MESSAGE_TYPE, XML_WARNING);
- WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, sal_False);
+ WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, false);
}
break;
case sheet::ValidationAlertStyle_STOP :
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MESSAGE_TYPE, XML_STOP);
- WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, sal_False);
+ WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, false);
}
break;
case sheet::ValidationAlertStyle_MACRO :
@@ -501,7 +501,7 @@ void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable,
pDefaults = pColDefaults;
nLast = nLastCol;
}
- sal_Bool bPrevAutoStyle(sal_False);
+ sal_Bool bPrevAutoStyle(false);
sal_Bool bIsAutoStyle;
sal_Bool bResult;
sal_Int32 nPrevIndex(0);
@@ -584,7 +584,7 @@ void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable,
if (pColDefaults)
delete pColDefaults;
pColDefaults = new ScMyDefaultStyleList(nLastCol + 1);
- FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, sal_False);
+ FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, false);
}
ScMyDefaultStyles::~ScMyDefaultStyles()
@@ -644,7 +644,7 @@ void ScRowFormatRanges::AddRange(const sal_Int32 nPrevStartCol, const sal_Int32
(bPrevAutoStyle != rFormatRange.bIsAutoStyle))
nIndex = rFormatRange.nIndex;
- sal_Bool bInserted(sal_False);
+ sal_Bool bInserted(false);
if (!aRowFormatRanges.empty())
{
ScMyRowFormatRange* pRange(&aRowFormatRanges.back());
@@ -685,7 +685,7 @@ void ScRowFormatRanges::AddRange(ScMyRowFormatRange& rFormatRange,
sal_Int32 nPrevIndex((*pRowDefaults)[nRow].nIndex);
sal_Bool bPrevAutoStyle((*pRowDefaults)[nRow].bIsAutoStyle);
sal_uInt32 i(nRow + 1);
- sal_Bool bReady(sal_False);
+ sal_Bool bReady(false);
while ((i < nEnd) && !bReady && (i < pRowDefaults->size()))
{
if ((nPrevIndex != (*pRowDefaults)[i].nIndex) ||
@@ -743,7 +743,7 @@ sal_Bool ScRowFormatRanges::GetNext(ScMyRowFormatRange& aFormatRange)
--nSize;
return sal_True;
}
- return sal_False;
+ return false;
}
sal_Int32 ScRowFormatRanges::GetMaxRows() const
@@ -793,7 +793,7 @@ sal_Bool ScMyFormatRange::operator<(const ScMyFormatRange& rRange) const
if (aRangeAddress.StartRow == rRange.aRangeAddress.StartRow)
return (aRangeAddress.StartColumn < rRange.aRangeAddress.StartColumn);
else
- return sal_False;
+ return false;
}
ScFormatRangeStyles::ScFormatRangeStyles()
@@ -850,7 +850,7 @@ sal_Bool ScFormatRangeStyles::AddStyleName(rtl::OUString* rpString, sal_Int32& r
else
{
sal_Int32 nCount(aStyleNames.size());
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
sal_Int32 i(nCount - 1);
while ((i >= 0) && (!bFound))
{
@@ -862,7 +862,7 @@ sal_Bool ScFormatRangeStyles::AddStyleName(rtl::OUString* rpString, sal_Int32& r
if (bFound)
{
rIndex = i;
- return sal_False;
+ return false;
}
else
{
@@ -886,7 +886,7 @@ sal_Int32 ScFormatRangeStyles::GetIndexOfStyleName(const rtl::OUString& rString,
else
{
sal_Int32 i(0);
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && static_cast<size_t>(i) < aStyleNames.size())
{
if (aStyleNames[i]->equals(rString))
@@ -896,7 +896,7 @@ sal_Int32 ScFormatRangeStyles::GetIndexOfStyleName(const rtl::OUString& rString,
}
if (bFound)
{
- bIsAutoStyle = sal_False;
+ bIsAutoStyle = false;
return i;
}
else
@@ -1116,7 +1116,7 @@ sal_Int32 ScColumnRowStylesBase::GetIndexOfStyleName(const rtl::OUString& rStrin
else
{
sal_Int32 i(0);
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && static_cast<size_t>(i) < aStyleNames.size())
{
if (aStyleNames.at(i)->equals(rString))
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 14b5e3c001bd..1087a6840e8d 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -476,7 +476,7 @@ void ScMyStylesImportHelper::AddRange(const ScRange& rRange)
{
if (!bPrevRangeAdded)
{
- sal_Bool bAddRange(sal_False);
+ sal_Bool bAddRange(false);
if (nCellType == nPrevCellType &&
IsEqual(pStyleName, pPrevStyleName) &&
IsEqual(pCurrency, pPrevCurrency))
@@ -515,7 +515,7 @@ void ScMyStylesImportHelper::AddRange(const ScRange& rRange)
{
aPrevRange = rRange;
ResetAttributes();
- bPrevRangeAdded = sal_False;
+ bPrevRangeAdded = false;
}
}
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
index 07c983e90180..7e21651685e1 100644
--- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
+++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
@@ -64,9 +64,9 @@ XMLTableHeaderFooterContext::XMLTableHeaderFooterContext( SvXMLImport& rImport,
bDisplay( sal_True ),
bInsertContent( sal_True ),
bLeft( bLft ),
- bContainsLeft(sal_False),
- bContainsRight(sal_False),
- bContainsCenter(sal_False)
+ bContainsLeft(false),
+ bContainsRight(false),
+ bContainsCenter(false)
{
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
for( sal_Int16 i=0; i < nAttrCount; ++i )
@@ -91,7 +91,7 @@ XMLTableHeaderFooterContext::XMLTableHeaderFooterContext( SvXMLImport& rImport,
{
if( ::cppu::any2bool(xPropSet->getPropertyValue( sShareContent )) )
// Don't share headers any longer
- xPropSet->setPropertyValue( sShareContent, uno::makeAny(sal_False) );
+ xPropSet->setPropertyValue( sShareContent, uno::makeAny(false) );
}
else
{
diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.cxx b/sc/source/filter/xml/XMLTableMasterPageExport.cxx
index aeb0444ae2a5..4b145b9df1d3 100644
--- a/sc/source/filter/xml/XMLTableMasterPageExport.cxx
+++ b/sc/source/filter/xml/XMLTableMasterPageExport.cxx
@@ -63,11 +63,11 @@ void XMLTableMasterPageExport::exportHeaderFooterContent(
if( bAutoStyles )
GetExport().GetTextParagraphExport()
- ->collectTextAutoStyles( rText, bProgress, sal_False );
+ ->collectTextAutoStyles( rText, bProgress, false );
else
{
GetExport().GetTextParagraphExport()->exportTextDeclarations( rText );
- GetExport().GetTextParagraphExport()->exportText( rText, bProgress, sal_False );
+ GetExport().GetTextParagraphExport()->exportText( rText, bProgress, false );
}
}
@@ -92,26 +92,26 @@ void XMLTableMasterPageExport::exportHeaderFooter(const com::sun::star::uno::Ref
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
aName, sal_True, sal_True );
if (sCenter.getLength() && !sLeft.getLength() && !sRight.getLength())
- exportHeaderFooterContent( xCenter, sal_False, sal_False );
+ exportHeaderFooterContent( xCenter, false, false );
else
{
if (sLeft.getLength())
{
SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE,
XML_REGION_LEFT, sal_True, sal_True );
- exportHeaderFooterContent( xLeft, sal_False, sal_False );
+ exportHeaderFooterContent( xLeft, false, false );
}
if (sCenter.getLength())
{
SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE,
XML_REGION_CENTER, sal_True, sal_True );
- exportHeaderFooterContent( xCenter, sal_False, sal_False );
+ exportHeaderFooterContent( xCenter, false, false );
}
if (sRight.getLength())
{
SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE,
XML_REGION_RIGHT, sal_True, sal_True );
- exportHeaderFooterContent( xRight, sal_False, sal_False );
+ exportHeaderFooterContent( xRight, false, false );
}
}
}
@@ -134,27 +134,27 @@ void XMLTableMasterPageExport::exportMasterPageContent(
{
if( xHeader.is() )
{
- exportHeaderFooterContent( xHeader->getCenterText(), sal_True, sal_False );
- exportHeaderFooterContent( xHeader->getLeftText(), sal_True, sal_False );
- exportHeaderFooterContent( xHeader->getRightText(), sal_True, sal_False );
+ exportHeaderFooterContent( xHeader->getCenterText(), sal_True, false );
+ exportHeaderFooterContent( xHeader->getLeftText(), sal_True, false );
+ exportHeaderFooterContent( xHeader->getRightText(), sal_True, false );
}
if( xHeaderLeft.is())
{
- exportHeaderFooterContent( xHeaderLeft->getCenterText(), sal_True, sal_False );
- exportHeaderFooterContent( xHeaderLeft->getLeftText(), sal_True, sal_False );
- exportHeaderFooterContent( xHeaderLeft->getRightText(), sal_True, sal_False );
+ exportHeaderFooterContent( xHeaderLeft->getCenterText(), sal_True, false );
+ exportHeaderFooterContent( xHeaderLeft->getLeftText(), sal_True, false );
+ exportHeaderFooterContent( xHeaderLeft->getRightText(), sal_True, false );
}
if( xFooter.is() )
{
- exportHeaderFooterContent( xFooter->getCenterText(), sal_True, sal_False );
- exportHeaderFooterContent( xFooter->getLeftText(), sal_True, sal_False );
- exportHeaderFooterContent( xFooter->getRightText(), sal_True, sal_False );
+ exportHeaderFooterContent( xFooter->getCenterText(), sal_True, false );
+ exportHeaderFooterContent( xFooter->getLeftText(), sal_True, false );
+ exportHeaderFooterContent( xFooter->getRightText(), sal_True, false );
}
if( xFooterLeft.is())
{
- exportHeaderFooterContent( xFooterLeft->getCenterText(), sal_True, sal_False );
- exportHeaderFooterContent( xFooterLeft->getLeftText(), sal_True, sal_False );
- exportHeaderFooterContent( xFooterLeft->getRightText(), sal_True, sal_False );
+ exportHeaderFooterContent( xFooterLeft->getCenterText(), sal_True, false );
+ exportHeaderFooterContent( xFooterLeft->getLeftText(), sal_True, false );
+ exportHeaderFooterContent( xFooterLeft->getRightText(), sal_True, false );
}
}
else
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 519e5e66ef2a..27c9cb701a27 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -58,7 +58,7 @@ XMLTableShapeImportHelper::XMLTableShapeImportHelper(
ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper ) :
XMLShapeImportHelper(rImp, rImp.GetModel(), pImpMapper ),
pAnnotationContext(NULL),
- bOnTable(sal_False)
+ bOnTable(false)
{
}
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 8851e6434638..e5281f43cb88 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -103,7 +103,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc,
//if we have the flat filter we need to set the dirty flag thus the visible charts get repainted
//otherwise the charts keep their first visual representation which was created at a moment where the calc itself was not loaded completly and is incorect therefor
if( (rImport.getImportFlags() & IMPORT_ALL) == IMPORT_ALL )
- pCL->SetDirty( TRUE );
+ pCL->SetDirty( sal_True );
else
{
// #i104899# If a formula cell is already dirty, further changes aren't propagated.
diff --git a/sc/source/filter/xml/XMLTableShapesContext.cxx b/sc/source/filter/xml/XMLTableShapesContext.cxx
index 2421bb785870..6a995fe9f052 100644
--- a/sc/source/filter/xml/XMLTableShapesContext.cxx
+++ b/sc/source/filter/xml/XMLTableShapesContext.cxx
@@ -43,7 +43,7 @@ using namespace com::sun::star;
//------------------------------------------------------------------
ScXMLTableShapesContext::ScXMLTableShapesContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) :
@@ -56,7 +56,7 @@ ScXMLTableShapesContext::~ScXMLTableShapesContext()
{
}
-SvXMLImportContext *ScXMLTableShapesContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableShapesContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
diff --git a/sc/source/filter/xml/XMLTableShapesContext.hxx b/sc/source/filter/xml/XMLTableShapesContext.hxx
index 168e7538ed0f..ba92335aae26 100644
--- a/sc/source/filter/xml/XMLTableShapesContext.hxx
+++ b/sc/source/filter/xml/XMLTableShapesContext.hxx
@@ -38,14 +38,14 @@ class ScXMLTableShapesContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLTableShapesContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableShapesContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLTableShapesContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx
index d3607a2ab279..303b4eb684c2 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.cxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.cxx
@@ -49,7 +49,7 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLTableSourceContext::ScXMLTableSourceContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList) :
@@ -101,7 +101,7 @@ ScXMLTableSourceContext::~ScXMLTableSourceContext()
{
}
-SvXMLImportContext *ScXMLTableSourceContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableSourceContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -119,7 +119,7 @@ void ScXMLTableSourceContext::EndElement()
{
ScXMLImport::MutexGuard aGuard(GetScImport());
if (pDoc->RenameTab( static_cast<SCTAB>(GetScImport().GetTables().GetCurrentSheet()),
- GetScImport().GetTables().GetCurrentSheetName(), sal_False, sal_True))
+ GetScImport().GetTables().GetCurrentSheetName(), false, sal_True))
{
String aFileString(sLink);
String aFilterString(sFilterName);
@@ -128,9 +128,9 @@ void ScXMLTableSourceContext::EndElement()
aFileString = ScGlobal::GetAbsDocName( aFileString, pDoc->GetDocumentShell() );
if ( !aFilterString.Len() )
- ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, FALSE, FALSE );
+ ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, false, false );
- BYTE nLinkMode = SC_LINK_NONE;
+ sal_uInt8 nLinkMode = SC_LINK_NONE;
if ( nMode == sheet::SheetLinkMode_NORMAL )
nLinkMode = SC_LINK_NORMAL;
else if ( nMode == sheet::SheetLinkMode_VALUE )
diff --git a/sc/source/filter/xml/XMLTableSourceContext.hxx b/sc/source/filter/xml/XMLTableSourceContext.hxx
index 00985a721bb1..8edc8551b121 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.hxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.hxx
@@ -46,14 +46,14 @@ class ScXMLTableSourceContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLTableSourceContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableSourceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLTableSourceContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/XMLTextPContext.cxx b/sc/source/filter/xml/XMLTextPContext.cxx
index 724a87a65626..8251da5dfa0b 100644
--- a/sc/source/filter/xml/XMLTextPContext.cxx
+++ b/sc/source/filter/xml/XMLTextPContext.cxx
@@ -49,7 +49,7 @@ class ScXMLTextTContext : public SvXMLImportContext
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLTextTContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTextTContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -60,7 +60,7 @@ public:
ScXMLTextTContext::ScXMLTextTContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -92,7 +92,7 @@ ScXMLTextTContext::~ScXMLTextTContext()
//------------------------------------------------------------------
ScXMLTextPContext::ScXMLTextPContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xTempAttrList,
@@ -129,7 +129,7 @@ void ScXMLTextPContext::AddSpaces(sal_Int32 nSpaceCount)
pContentBuffer->appendAscii(pChars, nSpaceCount);
}
-SvXMLImportContext *ScXMLTextPContext::CreateChildContext( USHORT nTempPrefix,
+SvXMLImportContext *ScXMLTextPContext::CreateChildContext( sal_uInt16 nTempPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xTempAttrList )
diff --git a/sc/source/filter/xml/XMLTextPContext.hxx b/sc/source/filter/xml/XMLTextPContext.hxx
index e2f3e9446b2e..20dda85322c3 100644
--- a/sc/source/filter/xml/XMLTextPContext.hxx
+++ b/sc/source/filter/xml/XMLTextPContext.hxx
@@ -43,14 +43,14 @@ class ScXMLTextPContext : public SvXMLImportContext
rtl::OUString sLName;
rtl::OUString sSimpleContent; // copy of the first Character call's argument
rtl::OUStringBuffer* pContentBuffer; // used if there's more than one string
- USHORT nPrefix;
+ sal_uInt16 nPrefix;
sal_Bool bIsOwn;
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLTextPContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTextPContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -58,7 +58,7 @@ public:
virtual ~ScXMLTextPContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 60184f7281a1..be365f4b1041 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -65,13 +65,13 @@ class ScXMLChangeInfoContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLChangeInfoContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLChangeInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLChangeInfoContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -89,13 +89,13 @@ class ScXMLBigRangeContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLBigRangeContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLBigRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScBigRange& rBigRange);
virtual ~ScXMLBigRangeContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -128,13 +128,13 @@ class ScXMLCellContentDeletionContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLCellContentDeletionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLCellContentDeletionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLCellContentDeletionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -152,13 +152,13 @@ class ScXMLDependenceContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDependenceContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLDependenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLDependenceContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -176,13 +176,13 @@ class ScXMLDependingsContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDependingsContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLDependingsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLDependingsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -200,13 +200,13 @@ class ScXMLChangeDeletionContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLChangeDeletionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLChangeDeletionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLChangeDeletionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -224,13 +224,13 @@ class ScXMLDeletionsContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDeletionsContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLDeletionsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLDeletionsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -249,14 +249,14 @@ class ScXMLChangeTextPContext : public SvXMLImportContext
rtl::OUStringBuffer sText;
ScXMLChangeCellContext* pChangeCellContext;
SvXMLImportContext* pTextPContext;
- USHORT nPrefix;
+ sal_uInt16 nPrefix;
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLChangeTextPContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLChangeTextPContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -264,7 +264,7 @@ public:
virtual ~ScXMLChangeTextPContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -294,7 +294,7 @@ class ScXMLChangeCellContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLChangeCellContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLChangeCellContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScBaseCell*& rOldCell, rtl::OUString& sAddress,
@@ -304,7 +304,7 @@ public:
sal_uInt8& nMatrixFlag, sal_Int32& nMatrixCols, sal_Int32& nMatrixRows);
virtual ~ScXMLChangeCellContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -338,13 +338,13 @@ class ScXMLPreviousContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLPreviousContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLPreviousContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLPreviousContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -363,13 +363,13 @@ class ScXMLContentChangeContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLContentChangeContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLContentChangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLContentChangeContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -386,13 +386,13 @@ class ScXMLInsertionContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLInsertionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLInsertionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLInsertionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -409,13 +409,13 @@ class ScXMLInsertionCutOffContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLInsertionCutOffContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLInsertionCutOffContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLInsertionCutOffContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -432,13 +432,13 @@ class ScXMLMovementCutOffContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLMovementCutOffContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLMovementCutOffContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLMovementCutOffContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -455,13 +455,13 @@ class ScXMLCutOffsContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLCutOffsContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLCutOffsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLCutOffsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -478,13 +478,13 @@ class ScXMLDeletionContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLDeletionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLDeletionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLDeletionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -503,13 +503,13 @@ class ScXMLMovementContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLMovementContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLMovementContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLMovementContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -526,13 +526,13 @@ class ScXMLRejectionContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLRejectionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLRejectionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLRejectionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -542,7 +542,7 @@ public:
//------------------------------------------------------------------
ScXMLTrackedChangesContext::ScXMLTrackedChangesContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -580,7 +580,7 @@ ScXMLTrackedChangesContext::~ScXMLTrackedChangesContext()
GetScImport().UnlockSolarMutex();
}
-SvXMLImportContext *ScXMLTrackedChangesContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTrackedChangesContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -622,7 +622,7 @@ void ScXMLTrackedChangesContext::EndElement()
}
ScXMLChangeInfoContext::ScXMLChangeInfoContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -636,7 +636,7 @@ ScXMLChangeInfoContext::ScXMLChangeInfoContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -658,7 +658,7 @@ ScXMLChangeInfoContext::~ScXMLChangeInfoContext()
{
}
-SvXMLImportContext *ScXMLChangeInfoContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLChangeInfoContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -697,16 +697,16 @@ void ScXMLChangeInfoContext::EndElement()
}
ScXMLBigRangeContext::ScXMLBigRangeContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScBigRange& rTempBigRange ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
rBigRange(rTempBigRange)
{
- sal_Bool bColumn(sal_False);
- sal_Bool bRow(sal_False);
- sal_Bool bTable(sal_False);
+ sal_Bool bColumn(false);
+ sal_Bool bRow(false);
+ sal_Bool bTable(false);
sal_Int32 nColumn(0);
sal_Int32 nRow(0);
sal_Int32 nTable(0);
@@ -721,7 +721,7 @@ ScXMLBigRangeContext::ScXMLBigRangeContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -770,7 +770,7 @@ ScXMLBigRangeContext::~ScXMLBigRangeContext()
{
}
-SvXMLImportContext *ScXMLBigRangeContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLBigRangeContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -783,7 +783,7 @@ void ScXMLBigRangeContext::EndElement()
}
ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper) :
@@ -795,15 +795,15 @@ ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext( ScXMLImport&
nMatrixRows(0),
nType(NUMBERFORMAT_ALL),
nMatrixFlag(MM_NONE),
- bBigRange(sal_False),
- bContainsCell(sal_False)
+ bBigRange(false),
+ bContainsCell(false)
{
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
for( sal_Int16 i=0; i < nAttrCount; ++i )
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -819,7 +819,7 @@ ScXMLCellContentDeletionContext::~ScXMLCellContentDeletionContext()
{
}
-SvXMLImportContext *ScXMLCellContentDeletionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLCellContentDeletionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -859,7 +859,7 @@ void ScXMLCellContentDeletionContext::EndElement()
}
ScXMLDependenceContext::ScXMLDependenceContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -872,7 +872,7 @@ ScXMLDependenceContext::ScXMLDependenceContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -889,7 +889,7 @@ ScXMLDependenceContext::~ScXMLDependenceContext()
{
}
-SvXMLImportContext *ScXMLDependenceContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDependenceContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -902,7 +902,7 @@ void ScXMLDependenceContext::EndElement()
}
ScXMLDependingsContext::ScXMLDependingsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -916,7 +916,7 @@ ScXMLDependingsContext::~ScXMLDependingsContext()
{
}
-SvXMLImportContext *ScXMLDependingsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDependingsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -941,7 +941,7 @@ void ScXMLDependingsContext::EndElement()
}
ScXMLChangeDeletionContext::ScXMLChangeDeletionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -954,7 +954,7 @@ ScXMLChangeDeletionContext::ScXMLChangeDeletionContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -971,7 +971,7 @@ ScXMLChangeDeletionContext::~ScXMLChangeDeletionContext()
{
}
-SvXMLImportContext *ScXMLChangeDeletionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLChangeDeletionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -984,7 +984,7 @@ void ScXMLChangeDeletionContext::EndElement()
}
ScXMLDeletionsContext::ScXMLDeletionsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -998,7 +998,7 @@ ScXMLDeletionsContext::~ScXMLDeletionsContext()
{
}
-SvXMLImportContext *ScXMLDeletionsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDeletionsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1024,7 +1024,7 @@ void ScXMLDeletionsContext::EndElement()
}
ScXMLChangeTextPContext::ScXMLChangeTextPContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xTempAttrList,
@@ -1046,7 +1046,7 @@ ScXMLChangeTextPContext::~ScXMLChangeTextPContext()
delete pTextPContext;
}
-SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( USHORT nTempPrefix,
+SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTempPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xTempAttrList )
@@ -1062,7 +1062,7 @@ SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( USHORT nTempPre
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrfx(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrfx(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
if ((nPrfx == XML_NAMESPACE_TEXT) && (IsXMLToken(aLocalName, XML_C)))
nRepeat = sValue.toInt32();
@@ -1076,11 +1076,11 @@ SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( USHORT nTempPre
else
{
if (!pChangeCellContext->IsEditCell())
- pChangeCellContext->CreateTextPContext(sal_False);
+ pChangeCellContext->CreateTextPContext(false);
sal_Bool bWasContext (sal_True);
if (!pTextPContext)
{
- bWasContext = sal_False;
+ bWasContext = false;
pTextPContext = GetScImport().GetTextImport()->CreateTextChildContext(
GetScImport(), nPrefix, sLName, xAttrList);
}
@@ -1113,7 +1113,7 @@ void ScXMLChangeTextPContext::EndElement()
}
ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScBaseCell*& rTempOldCell, rtl::OUString& rAddress,
@@ -1130,16 +1130,16 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
bEmpty(sal_True),
bFirstParagraph(sal_True),
bString(sal_True),
- bFormula(sal_False)
+ bFormula(false)
{
- sal_Bool bIsMatrix(sal_False);
- sal_Bool bIsCoveredMatrix(sal_False);
+ sal_Bool bIsMatrix(false);
+ sal_Bool bIsCoveredMatrix(false);
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
for( sal_Int16 i=0; i < nAttrCount; ++i )
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1147,7 +1147,7 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
{
if (IsXMLToken(aLocalName, XML_FORMULA))
{
- bEmpty = sal_False;
+ bEmpty = false;
GetScImport().ExtractFormulaNamespaceGrammar( rFormula, rFormulaNmsp, rGrammar, sValue );
bFormula = sal_True;
}
@@ -1175,33 +1175,33 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
if (IsXMLToken(aLocalName, XML_VALUE_TYPE))
{
if (IsXMLToken(sValue, XML_FLOAT))
- bString = sal_False;
+ bString = false;
else if (IsXMLToken(sValue, XML_DATE))
{
rType = NUMBERFORMAT_DATE;
- bString = sal_False;
+ bString = false;
}
else if (IsXMLToken(sValue, XML_TIME))
{
rType = NUMBERFORMAT_TIME;
- bString = sal_False;
+ bString = false;
}
}
else if (IsXMLToken(aLocalName, XML_VALUE))
{
SvXMLUnitConverter::convertDouble(fValue, sValue);
- bEmpty = sal_False;
+ bEmpty = false;
}
else if (IsXMLToken(aLocalName, XML_DATE_VALUE))
{
- bEmpty = sal_False;
+ bEmpty = false;
if (GetScImport().GetMM100UnitConverter().setNullDate(GetScImport().GetModel()))
GetScImport().GetMM100UnitConverter().convertDateTime(rDateTimeValue, sValue);
fValue = rDateTimeValue;
}
else if (IsXMLToken(aLocalName, XML_TIME_VALUE))
{
- bEmpty = sal_False;
+ bEmpty = false;
GetScImport().GetMM100UnitConverter().convertTime(rDateTimeValue, sValue);
fValue = rDateTimeValue;
}
@@ -1217,7 +1217,7 @@ ScXMLChangeCellContext::~ScXMLChangeCellContext()
{
}
-SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1226,11 +1226,11 @@ SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( USHORT nPrefix,
if ((nPrefix == XML_NAMESPACE_TEXT) && (IsXMLToken(rLocalName, XML_P)))
{
- bEmpty = sal_False;
+ bEmpty = false;
if (bFirstParagraph)
{
pContext = new ScXMLChangeTextPContext(GetScImport(), nPrefix, rLocalName, xAttrList, this);
- bFirstParagraph = sal_False;
+ bFirstParagraph = false;
}
else
{
@@ -1261,10 +1261,10 @@ void ScXMLChangeCellContext::CreateTextPContext(sal_Bool bIsNewParagraph)
if (bIsNewParagraph)
{
xText->setString(sText);
- xTextCursor->gotoEnd(sal_False);
+ xTextCursor->gotoEnd(false);
uno::Reference < text::XTextRange > xTextRange (xTextCursor, uno::UNO_QUERY);
if (xTextRange.is())
- xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, sal_False);
+ xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, false);
}
GetScImport().GetTextImport()->SetCursor(xTextCursor);
}
@@ -1311,7 +1311,7 @@ void ScXMLChangeCellContext::EndElement()
}
ScXMLPreviousContext::ScXMLPreviousContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1330,7 +1330,7 @@ ScXMLPreviousContext::ScXMLPreviousContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1346,7 +1346,7 @@ ScXMLPreviousContext::~ScXMLPreviousContext()
{
}
-SvXMLImportContext *ScXMLPreviousContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLPreviousContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1370,7 +1370,7 @@ void ScXMLPreviousContext::EndElement()
}
ScXMLContentChangeContext::ScXMLContentChangeContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1386,7 +1386,7 @@ ScXMLContentChangeContext::ScXMLContentChangeContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1420,7 +1420,7 @@ ScXMLContentChangeContext::~ScXMLContentChangeContext()
{
}
-SvXMLImportContext *ScXMLContentChangeContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLContentChangeContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1462,7 +1462,7 @@ void ScXMLContentChangeContext::EndElement()
}
ScXMLInsertionContext::ScXMLInsertionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1482,7 +1482,7 @@ ScXMLInsertionContext::ScXMLInsertionContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1536,7 +1536,7 @@ ScXMLInsertionContext::~ScXMLInsertionContext()
{
}
-SvXMLImportContext *ScXMLInsertionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLInsertionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1567,7 +1567,7 @@ void ScXMLInsertionContext::EndElement()
}
ScXMLInsertionCutOffContext::ScXMLInsertionCutOffContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1581,7 +1581,7 @@ ScXMLInsertionCutOffContext::ScXMLInsertionCutOffContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1604,7 +1604,7 @@ ScXMLInsertionCutOffContext::~ScXMLInsertionCutOffContext()
{
}
-SvXMLImportContext *ScXMLInsertionCutOffContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLInsertionCutOffContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -1617,7 +1617,7 @@ void ScXMLInsertionCutOffContext::EndElement()
}
ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1628,13 +1628,13 @@ ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport,
sal_Int32 nPosition(0);
sal_Int32 nStartPosition(0);
sal_Int32 nEndPosition(0);
- sal_Bool bPosition(sal_False);
+ sal_Bool bPosition(false);
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
for( sal_Int16 i=0; i < nAttrCount; ++i )
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1668,7 +1668,7 @@ ScXMLMovementCutOffContext::~ScXMLMovementCutOffContext()
{
}
-SvXMLImportContext *ScXMLMovementCutOffContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLMovementCutOffContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -1681,7 +1681,7 @@ void ScXMLMovementCutOffContext::EndElement()
}
ScXMLCutOffsContext::ScXMLCutOffsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1695,7 +1695,7 @@ ScXMLCutOffsContext::~ScXMLCutOffsContext()
{
}
-SvXMLImportContext *ScXMLCutOffsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLCutOffsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1721,7 +1721,7 @@ void ScXMLCutOffsContext::EndElement()
}
ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1741,7 +1741,7 @@ ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1800,7 +1800,7 @@ ScXMLDeletionContext::~ScXMLDeletionContext()
{
}
-SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1837,7 +1837,7 @@ void ScXMLDeletionContext::EndElement()
}
ScXMLMovementContext::ScXMLMovementContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1853,7 +1853,7 @@ ScXMLMovementContext::ScXMLMovementContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1887,7 +1887,7 @@ ScXMLMovementContext::~ScXMLMovementContext()
{
}
-SvXMLImportContext *ScXMLMovementContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLMovementContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1923,7 +1923,7 @@ void ScXMLMovementContext::EndElement()
}
ScXMLRejectionContext::ScXMLRejectionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
@@ -1939,7 +1939,7 @@ ScXMLRejectionContext::ScXMLRejectionContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1973,7 +1973,7 @@ ScXMLRejectionContext::~ScXMLRejectionContext()
{
}
-SvXMLImportContext *ScXMLRejectionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLRejectionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.hxx b/sc/source/filter/xml/XMLTrackedChangesContext.hxx
index 82753f25e5c0..853f7a1484c6 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.hxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.hxx
@@ -46,13 +46,13 @@ class ScXMLTrackedChangesContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLTrackedChangesContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLTrackedChangesContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
virtual ~ScXMLTrackedChangesContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx
index 43e5d8b021fa..f38f442ef8bb 100644
--- a/sc/source/filter/xml/xmlannoi.cxx
+++ b/sc/source/filter/xml/xmlannoi.cxx
@@ -59,7 +59,7 @@ ScXMLAnnotationData::~ScXMLAnnotationData()
//------------------------------------------------------------------
ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLAnnotationData& rAnnotationData,
@@ -67,7 +67,7 @@ ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport,
SvXMLImportContext( rImport, nPrfx, rLName ),
mrAnnotationData( rAnnotationData ),
nParagraphCount(0),
- bHasTextP(sal_False),
+ bHasTextP(false),
pCellContext(pTempCellContext),
pShapeContext(NULL)
{
@@ -87,7 +87,7 @@ ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -137,7 +137,7 @@ void ScXMLAnnotationContext::StartElement(const com::sun::star::uno::Reference<
pShapeContext->StartElement(xAttrList);
}
-SvXMLImportContext *ScXMLAnnotationContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLAnnotationContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
diff --git a/sc/source/filter/xml/xmlannoi.hxx b/sc/source/filter/xml/xmlannoi.hxx
index de0f61e9820e..d343a715955c 100644
--- a/sc/source/filter/xml/xmlannoi.hxx
+++ b/sc/source/filter/xml/xmlannoi.hxx
@@ -76,7 +76,7 @@ class ScXMLAnnotationContext : public SvXMLImportContext
{
public:
- ScXMLAnnotationContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLAnnotationContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -85,7 +85,7 @@ public:
virtual ~ScXMLAnnotationContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index 3f8539d9b37c..a24b232fb1f9 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -73,15 +73,15 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
sPassword(),
meHash1(PASSHASH_SHA1),
meHash2(PASSHASH_UNSPECIFIED),
- bProtected(sal_False),
- bHadCalculationSettings(sal_False),
+ bProtected(false),
+ bHadCalculationSettings(false),
pChangeTrackingImportHelper(NULL)
{
ScDocument* pDoc = GetScImport().GetDocument();
@@ -115,7 +115,7 @@ ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -137,7 +137,7 @@ ScXMLBodyContext::~ScXMLBodyContext()
{
}
-SvXMLImportContext *ScXMLBodyContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLBodyContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -158,13 +158,13 @@ SvXMLImportContext *ScXMLBodyContext::CreateChildContext( USHORT nPrefix,
switch( rTokenMap.Get( nPrefix, rLocalName ) )
{
// case XML_TOK_TEXT_H:
-// bHeading = TRUE;
+// bHeading = sal_True;
// case XML_TOK_TEXT_P:
// pContext = new SwXMLParaContext( GetSwImport(),nPrefix, rLocalName,
// xAttrList, bHeading );
// break;
// case XML_TOK_TEXT_ORDERED_LIST:
-// bOrdered = TRUE;
+// bOrdered = sal_True;
// case XML_TOK_TEXT_UNORDERED_LIST:
// pContext = new SwXMLListBlockContext( GetSwImport(),nPrefix, rLocalName,
// xAttrList, bOrdered );
diff --git a/sc/source/filter/xml/xmlbodyi.hxx b/sc/source/filter/xml/xmlbodyi.hxx
index 7e643221b934..61db1ae58924 100644
--- a/sc/source/filter/xml/xmlbodyi.hxx
+++ b/sc/source/filter/xml/xmlbodyi.hxx
@@ -50,11 +50,11 @@ class ScXMLBodyContext : public SvXMLImportContext
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
public:
- ScXMLBodyContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName,
+ ScXMLBodyContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList );
virtual ~ScXMLBodyContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 47416acaf6ca..06214774a91e 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -102,7 +102,7 @@ using rtl::OUString;
//------------------------------------------------------------------
ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -120,17 +120,17 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
rXMLImport((ScXMLImport&)rImport),
eGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT),
nCellType(util::NumberFormat::TEXT),
- bIsMerged(sal_False),
- bIsMatrix(sal_False),
- bHasSubTable(sal_False),
+ bIsMerged(false),
+ bIsMatrix(false),
+ bHasSubTable(false),
bIsCovered(bTempIsCovered),
bIsEmpty(sal_True),
- bHasTextImport(sal_False),
- bIsFirstTextImport(sal_False),
- bSolarMutexLocked(sal_False),
- bFormulaTextResult(sal_False)
+ bHasTextImport(false),
+ bIsFirstTextImport(false),
+ bSolarMutexLocked(false),
+ bFormulaTextResult(false)
{
- rXMLImport.SetRemoveLastChar(sal_False);
+ rXMLImport.SetRemoveLastChar(false);
rXMLImport.GetTables().AddColumn(bTempIsCovered);
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
rtl::OUString aLocalName;
@@ -174,14 +174,14 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_VALUE_TYPE:
nCellType = GetScImport().GetCellType(sValue);
- bIsEmpty = sal_False;
+ bIsEmpty = false;
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_VALUE:
{
if (sValue.getLength())
{
rXMLImport.GetMM100UnitConverter().convertDouble(fValue, sValue);
- bIsEmpty = sal_False;
+ bIsEmpty = false;
}
}
break;
@@ -190,7 +190,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
if (sValue.getLength() && rXMLImport.SetNullDateOnUnitConverter())
{
rXMLImport.GetMM100UnitConverter().convertDateTime(fValue, sValue);
- bIsEmpty = sal_False;
+ bIsEmpty = false;
}
}
break;
@@ -199,7 +199,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
if (sValue.getLength())
{
rXMLImport.GetMM100UnitConverter().convertTime(fValue, sValue);
- bIsEmpty = sal_False;
+ bIsEmpty = false;
}
}
break;
@@ -209,7 +209,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
{
DBG_ASSERT(!pOUTextValue, "here should be only one string value");
pOUTextValue.reset(sValue);
- bIsEmpty = sal_False;
+ bIsEmpty = false;
}
}
break;
@@ -223,7 +223,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
fValue = 0.0;
else
rXMLImport.GetMM100UnitConverter().convertDouble(fValue, sValue);
- bIsEmpty = sal_False;
+ bIsEmpty = false;
}
}
break;
@@ -278,7 +278,7 @@ void ScXMLTableRowCellContext::UnlockSolarMutex()
if (bSolarMutexLocked)
{
GetScImport().UnlockSolarMutex();
- bSolarMutexLocked = sal_False;
+ bSolarMutexLocked = false;
}
}
@@ -303,7 +303,7 @@ void ScXMLTableRowCellContext::SetCursorOnTextImport(const rtl::OUString& rOUTem
if (xTextCursor.is())
{
xTextCursor->setString(rOUTempText);
- xTextCursor->gotoEnd(sal_False);
+ xTextCursor->gotoEnd(false);
rXMLImport.GetTextImport()->SetCursor(xTextCursor);
}
}
@@ -316,7 +316,7 @@ void ScXMLTableRowCellContext::SetCursorOnTextImport(const rtl::OUString& rOUTem
}
}
-SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -324,12 +324,12 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix
SvXMLImportContext *pContext = 0;
const SvXMLTokenMap& rTokenMap = rXMLImport.GetTableRowCellElemTokenMap();
- sal_Bool bTextP(sal_False);
+ sal_Bool bTextP(false);
switch( rTokenMap.Get( nPrefix, rLName ) )
{
case XML_TOK_TABLE_ROW_CELL_P:
{
- bIsEmpty = sal_False;
+ bIsEmpty = false;
bTextP = sal_True;
com::sun::star::table::CellAddress aCellPos = rXMLImport.GetTables().GetRealCellPos();
if (((nCellType == util::NumberFormat::TEXT) || bFormulaTextResult) &&
@@ -362,12 +362,12 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix
uno::Reference < text::XText > xText (xTextCursor->getText());
uno::Reference < text::XTextRange > xTextRange (xTextCursor, uno::UNO_QUERY);
if (xText.is() && xTextRange.is())
- xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, sal_False);
+ xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, false);
}
}
pContext = rXMLImport.GetTextImport()->CreateTextChildContext(
rXMLImport, nPrefix, rLName, xAttrList);
- bIsFirstTextImport = sal_False;
+ bIsFirstTextImport = false;
}
}
}
@@ -392,12 +392,12 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix
rLName, xAttrList,
sal_True, nMergedCols);
nMergedCols = 1;
- bIsMerged = sal_False;
+ bIsMerged = false;
}
break;
case XML_TOK_TABLE_ROW_CELL_ANNOTATION:
{
- bIsEmpty = sal_False;
+ bIsEmpty = false;
DBG_ASSERT( !mxAnnotationData.get(), "ScXMLTableRowCellContext::CreateChildContext - multiple annotations in one cell" );
mxAnnotationData.reset( new ScXMLAnnotationData );
pContext = new ScXMLAnnotationContext( rXMLImport, nPrefix, rLName,
@@ -406,7 +406,7 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix
break;
case XML_TOK_TABLE_ROW_CELL_DETECTIVE:
{
- bIsEmpty = sal_False;
+ bIsEmpty = false;
if (!pDetectiveObjVec)
pDetectiveObjVec = new ScMyImpDetectiveObjVec();
pContext = new ScXMLDetectiveContext(
@@ -415,7 +415,7 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix
break;
case XML_TOK_TABLE_ROW_CELL_CELL_RANGE_SOURCE:
{
- bIsEmpty = sal_False;
+ bIsEmpty = false;
if (!pCellRangeSource)
pCellRangeSource = new ScMyImpCellRangeSource();
pContext = new ScXMLCellRangeSourceContext(
@@ -435,14 +435,14 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix
if (aCellPos.Row > MAXROW)
aCellPos.Row = MAXROW;
XMLTableShapeImportHelper* pTableShapeImport = (XMLTableShapeImportHelper*)rXMLImport.GetShapeImport().get();
- pTableShapeImport->SetOnTable(sal_False);
+ pTableShapeImport->SetOnTable(false);
pTableShapeImport->SetCell(aCellPos);
pContext = rXMLImport.GetShapeImport()->CreateGroupChildContext(
rXMLImport, nPrefix, rLName, xAttrList, xShapes);
if (pContext)
{
- bIsEmpty = sal_False;
- rXMLImport.ProgressBarIncrement(sal_False);
+ bIsEmpty = false;
+ rXMLImport.ProgressBarIncrement(false);
}
}
}
@@ -473,13 +473,13 @@ sal_Bool ScXMLTableRowCellContext::IsMerged (const uno::Reference <table::XCellR
aCellAddress = xMergeCellAddress->getRangeAddress();
if (aCellAddress.StartColumn == nCol && aCellAddress.EndColumn == nCol &&
aCellAddress.StartRow == nRow && aCellAddress.EndRow == nRow)
- return sal_False;
+ return false;
else
return sal_True;
}
}
}
- return sal_False;
+ return false;
}
void ScXMLTableRowCellContext::DoMerge(const com::sun::star::table::CellAddress& aCellPos,
@@ -502,7 +502,7 @@ void ScXMLTableRowCellContext::DoMerge(const com::sun::star::table::CellAddress&
uno::Reference <util::XMergeable> xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY);
if (xMergeable.is())
- xMergeable->merge(sal_False);
+ xMergeable->merge(false);
}
//merge
@@ -831,14 +831,14 @@ void ScXMLTableRowCellContext::EndElement()
table::CellAddress aCurrentPos( aCellPos );
if ((pContentValidationName && pContentValidationName->getLength()) ||
mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource)
- bIsEmpty = sal_False;
+ bIsEmpty = false;
ScMyTables& rTables = rXMLImport.GetTables();
for (sal_Int32 i = 0; i < nCellsRepeated; ++i)
{
aCurrentPos.Column = aCellPos.Column + i;
if (i > 0)
- rTables.AddColumn(sal_False);
+ rTables.AddColumn(false);
if (!bIsEmpty)
{
for (sal_Int32 j = 0; j < nRepeatedRows; ++j)
@@ -847,7 +847,7 @@ void ScXMLTableRowCellContext::EndElement()
if ((aCurrentPos.Column == 0) && (j > 0))
{
rTables.AddRow();
- rTables.AddColumn(sal_False);
+ rTables.AddColumn(false);
}
if (CellExists(aCurrentPos))
{
@@ -909,7 +909,7 @@ void ScXMLTableRowCellContext::EndElement()
else if ( i > 0 && pOUText && pOUText->getLength() )
pFCell->SetHybridString( *pOUText );
else
- bDoIncrement = sal_False;
+ bDoIncrement = false;
}
}
else
@@ -950,9 +950,9 @@ void ScXMLTableRowCellContext::EndElement()
// #i56027# This is about setting simple text, not edit cells,
// so ProgressBarIncrement must be called with bEditCell = FALSE.
// Formatted text that is put into the cell by the child context
- // is handled below (bIsEmpty is TRUE then).
+ // is handled below (bIsEmpty is sal_True then).
if (bDoIncrement || bHasTextImport)
- rXMLImport.ProgressBarIncrement(sal_False);
+ rXMLImport.ProgressBarIncrement(false);
}
break;
case util::NumberFormat::NUMBER:
@@ -995,7 +995,7 @@ void ScXMLTableRowCellContext::EndElement()
sal::static_int_cast<SCTAB>( aCurrentPos.Sheet ),
pNewCell );
}
- rXMLImport.ProgressBarIncrement(sal_False);
+ rXMLImport.ProgressBarIncrement(false);
}
break;
default:
@@ -1025,7 +1025,7 @@ void ScXMLTableRowCellContext::EndElement()
else
{
// #i56027# If the child context put formatted text into the cell,
- // bIsEmpty is TRUE and ProgressBarIncrement has to be called
+ // bIsEmpty is sal_True and ProgressBarIncrement has to be called
// with bEditCell = TRUE.
if (bHasTextImport)
rXMLImport.ProgressBarIncrement(sal_True);
@@ -1033,7 +1033,7 @@ void ScXMLTableRowCellContext::EndElement()
for (sal_Int32 j = 1; j < nRepeatedRows; ++j)
{
rTables.AddRow();
- rTables.AddColumn(sal_False);
+ rTables.AddColumn(false);
}
}
}
@@ -1107,7 +1107,7 @@ void ScXMLTableRowCellContext::EndElement()
SetAnnotation( aCellPos );
SetDetectiveObj( aCellPos );
SetCellRangeSource( aCellPos );
- rXMLImport.ProgressBarIncrement(sal_False);
+ rXMLImport.ProgressBarIncrement(false);
}
}
else
@@ -1122,8 +1122,8 @@ void ScXMLTableRowCellContext::EndElement()
}
UnlockSolarMutex();
}
- bIsMerged = sal_False;
- bHasSubTable = sal_False;
+ bIsMerged = false;
+ bHasSubTable = false;
nMergedCols = 1;
nMergedRows = 1;
nCellsRepeated = 1;
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index 7bfe5c932796..53387ebc5c14 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -104,7 +104,7 @@ class ScXMLTableRowCellContext : public SvXMLImportContext
public:
- ScXMLTableRowCellContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableRowCellContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -112,7 +112,7 @@ public:
virtual ~ScXMLTableRowCellContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index 3abfd93c4ce9..9029d5a63a0d 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -56,7 +56,7 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList ) :
@@ -105,7 +105,7 @@ ScXMLTableColContext::~ScXMLTableColContext()
{
}
-SvXMLImportContext *ScXMLTableColContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableColContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -160,7 +160,7 @@ void ScXMLTableColContext::EndElement()
rtl::OUString sVisible(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLVIS));
sal_Bool bValue(sal_True);
if (!IsXMLToken(sVisibility, XML_VISIBLE))
- bValue = sal_False;
+ bValue = false;
xColumnProperties->setPropertyValue(sVisible, uno::makeAny(bValue));
}
}
@@ -176,7 +176,7 @@ void ScXMLTableColContext::EndElement()
}
ScXMLTableColsContext::ScXMLTableColsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -208,7 +208,7 @@ ScXMLTableColsContext::ScXMLTableColsContext( ScXMLImport& rImport,
if (nPrefix == XML_NAMESPACE_TABLE && IsXMLToken(aLocalName, XML_DISPLAY))
{
if (IsXMLToken(sValue, XML_FALSE))
- bGroupDisplay = sal_False;
+ bGroupDisplay = false;
}
}
}
@@ -218,7 +218,7 @@ ScXMLTableColsContext::~ScXMLTableColsContext()
{
}
-SvXMLImportContext *ScXMLTableColsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableColsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -231,17 +231,17 @@ SvXMLImportContext *ScXMLTableColsContext::CreateChildContext( USHORT nPrefix,
case XML_TOK_TABLE_COLS_COL_GROUP:
pContext = new ScXMLTableColsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_True );
+ false, sal_True );
break;
case XML_TOK_TABLE_COLS_HEADER_COLS:
pContext = new ScXMLTableColsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_True, sal_False );
+ sal_True, false );
break;
case XML_TOK_TABLE_COLS_COLS:
pContext = new ScXMLTableColsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_False );
+ false, false );
break;
case XML_TOK_TABLE_COLS_COL:
pContext = new ScXMLTableColContext( GetScImport(), nPrefix,
diff --git a/sc/source/filter/xml/xmlcoli.hxx b/sc/source/filter/xml/xmlcoli.hxx
index 295f1ba41278..6c958bc673bd 100644
--- a/sc/source/filter/xml/xmlcoli.hxx
+++ b/sc/source/filter/xml/xmlcoli.hxx
@@ -45,14 +45,14 @@ class ScXMLTableColContext : public SvXMLImportContext
public:
- ScXMLTableColContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableColContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
virtual ~ScXMLTableColContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -75,7 +75,7 @@ class ScXMLTableColsContext : public SvXMLImportContext
public:
- ScXMLTableColsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableColsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -83,7 +83,7 @@ public:
virtual ~ScXMLTableColsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx
index dfb34beab24c..2b752f7aec83 100644
--- a/sc/source/filter/xml/xmlconti.cxx
+++ b/sc/source/filter/xml/xmlconti.cxx
@@ -48,7 +48,7 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLContentContext::ScXMLContentContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -63,7 +63,7 @@ ScXMLContentContext::~ScXMLContentContext()
{
}
-SvXMLImportContext *ScXMLContentContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLContentContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -79,7 +79,7 @@ SvXMLImportContext *ScXMLContentContext::CreateChildContext( USHORT nPrefix,
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
const rtl::OUString& sAttrValue(xAttrList->getValueByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrfx = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrfx = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
if ((nPrfx == XML_NAMESPACE_TEXT) && IsXMLToken(aLocalName, XML_C))
nRepeat = sAttrValue.toInt32();
diff --git a/sc/source/filter/xml/xmlconti.hxx b/sc/source/filter/xml/xmlconti.hxx
index ffde3d98e51a..d350f0f2f89e 100644
--- a/sc/source/filter/xml/xmlconti.hxx
+++ b/sc/source/filter/xml/xmlconti.hxx
@@ -43,7 +43,7 @@ class ScXMLContentContext : public SvXMLImportContext
public:
- ScXMLContentContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLContentContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -51,7 +51,7 @@ public:
virtual ~ScXMLContentContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index 978b8e840569..25d16d999fb0 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -79,14 +79,14 @@ class ScXMLContentValidationContext : public SvXMLImportContext
public:
- ScXMLContentValidationContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLContentValidationContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLContentValidationContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -112,7 +112,7 @@ class ScXMLHelpMessageContext : public SvXMLImportContext
public:
- ScXMLHelpMessageContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLHelpMessageContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -120,7 +120,7 @@ public:
virtual ~ScXMLHelpMessageContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -143,7 +143,7 @@ class ScXMLErrorMessageContext : public SvXMLImportContext
public:
- ScXMLErrorMessageContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLErrorMessageContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -151,7 +151,7 @@ public:
virtual ~ScXMLErrorMessageContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -171,7 +171,7 @@ class ScXMLErrorMacroContext : public SvXMLImportContext
public:
- ScXMLErrorMacroContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLErrorMacroContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -179,7 +179,7 @@ public:
virtual ~ScXMLErrorMacroContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -189,7 +189,7 @@ public:
//------------------------------------------------------------------
ScXMLContentValidationsContext::ScXMLContentValidationsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) :
@@ -202,7 +202,7 @@ ScXMLContentValidationsContext::~ScXMLContentValidationsContext()
{
}
-SvXMLImportContext *ScXMLContentValidationsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLContentValidationsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -228,15 +228,15 @@ void ScXMLContentValidationsContext::EndElement()
}
ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList) :
SvXMLImportContext( rImport, nPrfx, rLName ),
nShowList(sheet::TableValidationVisibility::UNSORTED),
bAllowEmptyCell(sal_True),
- bDisplayHelp(sal_False),
- bDisplayError(sal_False)
+ bDisplayHelp(false),
+ bDisplayError(false)
{
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetContentValidationAttrTokenMap();
@@ -244,7 +244,7 @@ ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImpo
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -261,7 +261,7 @@ ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImpo
break;
case XML_TOK_CONTENT_VALIDATION_ALLOW_EMPTY_CELL:
if (IsXMLToken(sValue, XML_FALSE))
- bAllowEmptyCell = sal_False;
+ bAllowEmptyCell = false;
break;
case XML_TOK_CONTENT_VALIDATION_DISPLAY_LIST:
{
@@ -287,7 +287,7 @@ ScXMLContentValidationContext::~ScXMLContentValidationContext()
{
}
-SvXMLImportContext *ScXMLContentValidationContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLContentValidationContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -494,7 +494,7 @@ void ScXMLContentValidationContext::SetErrorMacro(const sal_Bool bExecute)
}
ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -503,7 +503,7 @@ ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport,
sTitle(),
sMessage(),
nParagraphCount(0),
- bDisplay(sal_False)
+ bDisplay(false)
{
pValidationContext = pTempValidationContext;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -512,7 +512,7 @@ ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -532,7 +532,7 @@ ScXMLHelpMessageContext::~ScXMLHelpMessageContext()
{
}
-SvXMLImportContext *ScXMLHelpMessageContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLHelpMessageContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -564,7 +564,7 @@ void ScXMLHelpMessageContext::EndElement()
}
ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -574,7 +574,7 @@ ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport,
sMessage(),
sMessageType(),
nParagraphCount(0),
- bDisplay(sal_False)
+ bDisplay(false)
{
pValidationContext = pTempValidationContext;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -583,7 +583,7 @@ ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -606,7 +606,7 @@ ScXMLErrorMessageContext::~ScXMLErrorMessageContext()
{
}
-SvXMLImportContext *ScXMLErrorMessageContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLErrorMessageContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -638,14 +638,14 @@ void ScXMLErrorMessageContext::EndElement()
}
ScXMLErrorMacroContext::ScXMLErrorMacroContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLContentValidationContext* pTempValidationContext) :
SvXMLImportContext( rImport, nPrfx, rLName ),
sName(),
- bExecute(sal_False)
+ bExecute(false)
{
pValidationContext = pTempValidationContext;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -654,7 +654,7 @@ ScXMLErrorMacroContext::ScXMLErrorMacroContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -674,7 +674,7 @@ ScXMLErrorMacroContext::~ScXMLErrorMacroContext()
{
}
-SvXMLImportContext *ScXMLErrorMacroContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLErrorMacroContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/xmlcvali.hxx b/sc/source/filter/xml/xmlcvali.hxx
index 2328a0ff7844..b2c433c4696e 100644
--- a/sc/source/filter/xml/xmlcvali.hxx
+++ b/sc/source/filter/xml/xmlcvali.hxx
@@ -44,14 +44,14 @@ class ScXMLContentValidationsContext : public SvXMLImportContext
public:
- ScXMLContentValidationsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLContentValidationsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLContentValidationsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 244e0cddc36f..210a6f5dc7ee 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -71,7 +71,7 @@ using rtl::OUString;
//------------------------------------------------------------------
ScXMLDataPilotTablesContext::ScXMLDataPilotTablesContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) :
@@ -86,7 +86,7 @@ ScXMLDataPilotTablesContext::~ScXMLDataPilotTablesContext()
GetScImport().UnlockSolarMutex();
}
-SvXMLImportContext *ScXMLDataPilotTablesContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotTablesContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -118,7 +118,7 @@ ScXMLDataPilotTableContext::GrandTotalItem::GrandTotalItem() :
mbVisible(true) {}
ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList) :
@@ -135,13 +135,13 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
mnPageFieldCount(0),
mnDataFieldCount(0),
bIsNative(sal_True),
- bIgnoreEmptyRows(sal_False),
- bIdentifyCategories(sal_False),
- bTargetRangeAddress(sal_False),
- bSourceCellRange(sal_False),
+ bIgnoreEmptyRows(false),
+ bIdentifyCategories(false),
+ bTargetRangeAddress(false),
+ bSourceCellRange(false),
bShowFilter(sal_True),
bDrillDown(sal_True),
- bHeaderGridLayout(sal_False)
+ bHeaderGridLayout(false)
{
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotTableAttrTokenMap();
@@ -149,7 +149,7 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -238,7 +238,7 @@ ScXMLDataPilotTableContext::~ScXMLDataPilotTableContext()
delete pDPDimSaveData;
}
-SvXMLImportContext *ScXMLDataPilotTableContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotTableContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -344,7 +344,7 @@ void ScXMLDataPilotTableContext::AddDimension(ScDPSaveDimension* pDim, bool bHas
// mark the new one as duplicate
if ( !pDim->IsDataLayout() &&
pDPSave->GetExistingDimensionByName(pDim->GetName()) )
- pDim->SetDupFlag( TRUE );
+ pDim->SetDupFlag( sal_True );
if (!pDim->IsDataLayout())
{
@@ -513,7 +513,7 @@ void ScXMLDataPilotTableContext::SetGrandTotal(
}
ScXMLDPSourceSQLContext::ScXMLDPSourceSQLContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -527,7 +527,7 @@ ScXMLDPSourceSQLContext::ScXMLDPSourceSQLContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -556,7 +556,7 @@ ScXMLDPSourceSQLContext::~ScXMLDPSourceSQLContext()
{
}
-SvXMLImportContext *ScXMLDPSourceSQLContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDPSourceSQLContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -574,7 +574,7 @@ void ScXMLDPSourceSQLContext::EndElement()
}
ScXMLDPSourceTableContext::ScXMLDPSourceTableContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -588,7 +588,7 @@ ScXMLDPSourceTableContext::ScXMLDPSourceTableContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -612,7 +612,7 @@ ScXMLDPSourceTableContext::~ScXMLDPSourceTableContext()
{
}
-SvXMLImportContext *ScXMLDPSourceTableContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDPSourceTableContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -630,7 +630,7 @@ void ScXMLDPSourceTableContext::EndElement()
}
ScXMLDPSourceQueryContext::ScXMLDPSourceQueryContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -644,7 +644,7 @@ ScXMLDPSourceQueryContext::ScXMLDPSourceQueryContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -668,7 +668,7 @@ ScXMLDPSourceQueryContext::~ScXMLDPSourceQueryContext()
{
}
-SvXMLImportContext *ScXMLDPSourceQueryContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDPSourceQueryContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -686,7 +686,7 @@ void ScXMLDPSourceQueryContext::EndElement()
}
ScXMLSourceServiceContext::ScXMLSourceServiceContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -700,7 +700,7 @@ ScXMLSourceServiceContext::ScXMLSourceServiceContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -739,7 +739,7 @@ ScXMLSourceServiceContext::~ScXMLSourceServiceContext()
{
}
-SvXMLImportContext *ScXMLSourceServiceContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSourceServiceContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -762,7 +762,7 @@ ScXMLImport& ScXMLDataPilotGrandTotalContext::GetScImport()
}
ScXMLDataPilotGrandTotalContext::ScXMLDataPilotGrandTotalContext(
- ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList,
ScXMLDataPilotTableContext* pTableContext ) :
SvXMLImportContext( rImport, nPrefix, rLName ),
mpTableContext(pTableContext),
@@ -777,7 +777,7 @@ ScXMLDataPilotGrandTotalContext::ScXMLDataPilotGrandTotalContext(
const OUString& rAttrValue = xAttrList->getValueByIndex(i);
OUString aLocalName;
- USHORT nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(rAttrName, &aLocalName);
+ sal_uInt16 nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(rAttrName, &aLocalName);
switch (rAttrTokenMap.Get(nLocalPrefix, aLocalName))
{
case XML_TOK_DATA_PILOT_GRAND_TOTAL_ATTR_DISPLAY:
@@ -806,7 +806,7 @@ ScXMLDataPilotGrandTotalContext::~ScXMLDataPilotGrandTotalContext()
}
SvXMLImportContext* ScXMLDataPilotGrandTotalContext::CreateChildContext(
- USHORT /*nPrefix*/, const ::rtl::OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ )
+ sal_uInt16 /*nPrefix*/, const ::rtl::OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ )
{
return NULL;
}
@@ -832,7 +832,7 @@ void ScXMLDataPilotGrandTotalContext::EndElement()
}
ScXMLSourceCellRangeContext::ScXMLSourceCellRangeContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -846,7 +846,7 @@ ScXMLSourceCellRangeContext::ScXMLSourceCellRangeContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -871,7 +871,7 @@ ScXMLSourceCellRangeContext::~ScXMLSourceCellRangeContext()
{
}
-SvXMLImportContext *ScXMLSourceCellRangeContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSourceCellRangeContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -897,7 +897,7 @@ void ScXMLSourceCellRangeContext::EndElement()
}
ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -910,15 +910,15 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
fStep(0.0),
nUsedHierarchy(1),
nGroupPart(0),
- bSelectedPage(sal_False),
- bIsGroupField(sal_False),
- bDateValue(sal_False),
- bAutoStart(sal_False),
- bAutoEnd(sal_False),
+ bSelectedPage(false),
+ bIsGroupField(false),
+ bDateValue(false),
+ bAutoStart(false),
+ bAutoEnd(false),
mbHasHiddenMember(false)
{
- sal_Bool bHasName(sal_False);
- sal_Bool bDataLayout(sal_False);
+ sal_Bool bHasName(false);
+ sal_Bool bDataLayout(false);
OUString aDisplayName;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotFieldAttrTokenMap();
@@ -926,7 +926,7 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -984,7 +984,7 @@ ScXMLDataPilotFieldContext::~ScXMLDataPilotFieldContext()
{
}
-SvXMLImportContext *ScXMLDataPilotFieldContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotFieldContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1093,7 +1093,7 @@ void ScXMLDataPilotFieldContext::EndElement()
}
}
-ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, USHORT nPrfx,
+ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
ScXMLDataPilotFieldContext* pDataPilotField) :
@@ -1106,7 +1106,7 @@ ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLI
{
rtl::OUString sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue(xAttrList->getValueByIndex( i ));
@@ -1160,7 +1160,7 @@ ScXMLDataPilotFieldReferenceContext::~ScXMLDataPilotFieldReferenceContext()
}
ScXMLDataPilotLevelContext::ScXMLDataPilotLevelContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1174,7 +1174,7 @@ ScXMLDataPilotLevelContext::ScXMLDataPilotLevelContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1193,7 +1193,7 @@ ScXMLDataPilotLevelContext::~ScXMLDataPilotLevelContext()
{
}
-SvXMLImportContext *ScXMLDataPilotLevelContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotLevelContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1230,7 +1230,7 @@ void ScXMLDataPilotLevelContext::EndElement()
{
}
-ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, USHORT nPrfx,
+ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1244,7 +1244,7 @@ ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport&
{
rtl::OUString sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue(xAttrList->getValueByIndex( i ));
@@ -1255,7 +1255,7 @@ ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport&
if (IsXMLToken(sValue, XML_TRUE))
aInfo.IsEnabled = sal_True;
else
- aInfo.IsEnabled = sal_False;
+ aInfo.IsEnabled = false;
}
else if (IsXMLToken(aLocalName, XML_DISPLAY_MEMBER_MODE))
{
@@ -1281,7 +1281,7 @@ ScXMLDataPilotDisplayInfoContext::~ScXMLDataPilotDisplayInfoContext()
{
}
-ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, USHORT nPrfx,
+ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1295,7 +1295,7 @@ ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImpo
{
rtl::OUString sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue(xAttrList->getValueByIndex( i ));
@@ -1306,7 +1306,7 @@ ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImpo
if (IsXMLToken(sValue, XML_ASCENDING))
aInfo.IsAscending = sal_True;
else if (IsXMLToken(sValue, XML_DESCENDING))
- aInfo.IsAscending = sal_False;
+ aInfo.IsAscending = false;
}
else if (IsXMLToken(aLocalName, XML_SORT_MODE))
{
@@ -1330,7 +1330,7 @@ ScXMLDataPilotSortInfoContext::~ScXMLDataPilotSortInfoContext()
{
}
-ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, USHORT nPrfx,
+ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1344,7 +1344,7 @@ ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& r
{
rtl::OUString sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue(xAttrList->getValueByIndex( i ));
@@ -1355,7 +1355,7 @@ ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& r
if (IsXMLToken(sValue, XML_TRUE))
aInfo.AddEmptyLines = sal_True;
else
- aInfo.AddEmptyLines = sal_False;
+ aInfo.AddEmptyLines = false;
}
else if (IsXMLToken(aLocalName, XML_LAYOUT_MODE))
{
@@ -1375,7 +1375,7 @@ ScXMLDataPilotLayoutInfoContext::~ScXMLDataPilotLayoutInfoContext()
}
ScXMLDataPilotSubTotalsContext::ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -1393,7 +1393,7 @@ ScXMLDataPilotSubTotalsContext::~ScXMLDataPilotSubTotalsContext()
{
}
-SvXMLImportContext *ScXMLDataPilotSubTotalsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotSubTotalsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1447,7 +1447,7 @@ void ScXMLDataPilotSubTotalsContext::SetDisplayName(const OUString& rName)
}
ScXMLDataPilotSubTotalContext::ScXMLDataPilotSubTotalContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1461,7 +1461,7 @@ ScXMLDataPilotSubTotalContext::ScXMLDataPilotSubTotalContext( ScXMLImport& rImpo
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1485,7 +1485,7 @@ ScXMLDataPilotSubTotalContext::~ScXMLDataPilotSubTotalContext()
{
}
-SvXMLImportContext *ScXMLDataPilotSubTotalContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotSubTotalContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -1503,7 +1503,7 @@ void ScXMLDataPilotSubTotalContext::EndElement()
}
ScXMLDataPilotMembersContext::ScXMLDataPilotMembersContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -1518,7 +1518,7 @@ ScXMLDataPilotMembersContext::~ScXMLDataPilotMembersContext()
{
}
-SvXMLImportContext *ScXMLDataPilotMembersContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotMembersContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1544,7 +1544,7 @@ void ScXMLDataPilotMembersContext::EndElement()
}
ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1553,7 +1553,7 @@ ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport,
pDataPilotField(pTempDataPilotField),
bDisplay( sal_True ),
bDisplayDetails( sal_True ),
- bHasName( sal_False )
+ bHasName( false )
{
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotMemberAttrTokenMap();
@@ -1561,7 +1561,7 @@ ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -1596,7 +1596,7 @@ ScXMLDataPilotMemberContext::~ScXMLDataPilotMemberContext()
{
}
-SvXMLImportContext *ScXMLDataPilotMemberContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotMemberContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -1623,7 +1623,7 @@ void ScXMLDataPilotMemberContext::EndElement()
}
ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1636,7 +1636,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
double fEnd(0.0);
double fStep(0.0);
sal_Int32 nGroupPart(0);
- sal_Bool bDateValue(sal_False);
+ sal_Bool bDateValue(false);
sal_Bool bAutoStart(sal_True);
sal_Bool bAutoEnd(sal_True);
@@ -1645,7 +1645,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
{
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue = xAttrList->getValueByIndex( i );
@@ -1661,7 +1661,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
else
{
GetScImport().GetMM100UnitConverter().convertDateTime(fStart, sValue);
- bAutoStart = sal_False;
+ bAutoStart = false;
}
}
else if (IsXMLToken(aLocalName, XML_DATE_END))
@@ -1672,7 +1672,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
else
{
GetScImport().GetMM100UnitConverter().convertDateTime(fEnd, sValue);
- bAutoEnd = sal_False;
+ bAutoEnd = false;
}
}
else if (IsXMLToken(aLocalName, XML_START))
@@ -1682,7 +1682,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
else
{
GetScImport().GetMM100UnitConverter().convertDouble(fStart, sValue);
- bAutoStart = sal_False;
+ bAutoStart = false;
}
}
else if (IsXMLToken(aLocalName, XML_END))
@@ -1692,7 +1692,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
else
{
GetScImport().GetMM100UnitConverter().convertDouble(fEnd, sValue);
- bAutoEnd = sal_False;
+ bAutoEnd = false;
}
}
else if (IsXMLToken(aLocalName, XML_STEP))
@@ -1722,7 +1722,7 @@ ScXMLDataPilotGroupsContext::~ScXMLDataPilotGroupsContext()
{
}
-SvXMLImportContext *ScXMLDataPilotGroupsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotGroupsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1746,7 +1746,7 @@ void ScXMLDataPilotGroupsContext::EndElement()
}
ScXMLDataPilotGroupContext::ScXMLDataPilotGroupContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1759,7 +1759,7 @@ ScXMLDataPilotGroupContext::ScXMLDataPilotGroupContext( ScXMLImport& rImport,
{
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue = xAttrList->getValueByIndex( i );
@@ -1775,7 +1775,7 @@ ScXMLDataPilotGroupContext::~ScXMLDataPilotGroupContext()
{
}
-SvXMLImportContext *ScXMLDataPilotGroupContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotGroupContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -1800,7 +1800,7 @@ void ScXMLDataPilotGroupContext::EndElement()
}
ScXMLDataPilotGroupMemberContext::ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -1813,7 +1813,7 @@ ScXMLDataPilotGroupMemberContext::ScXMLDataPilotGroupMemberContext( ScXMLImport&
{
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue = xAttrList->getValueByIndex( i );
@@ -1829,7 +1829,7 @@ ScXMLDataPilotGroupMemberContext::~ScXMLDataPilotGroupMemberContext()
{
}
-SvXMLImportContext *ScXMLDataPilotGroupMemberContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDataPilotGroupMemberContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx
index 97308926c66c..3ea89be0b68c 100644
--- a/sc/source/filter/xml/xmldpimp.hxx
+++ b/sc/source/filter/xml/xmldpimp.hxx
@@ -63,14 +63,14 @@ class ScXMLDataPilotTablesContext : public SvXMLImportContext
public:
- ScXMLDataPilotTablesContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotTablesContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLDataPilotTablesContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -135,14 +135,14 @@ class ScXMLDataPilotTableContext : public SvXMLImportContext
public:
- ScXMLDataPilotTableContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLDataPilotTableContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -182,7 +182,7 @@ class ScXMLDPSourceSQLContext : public SvXMLImportContext
public:
- ScXMLDPSourceSQLContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDPSourceSQLContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -190,7 +190,7 @@ public:
virtual ~ScXMLDPSourceSQLContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -207,7 +207,7 @@ class ScXMLDPSourceTableContext : public SvXMLImportContext
public:
- ScXMLDPSourceTableContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDPSourceTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -215,7 +215,7 @@ public:
virtual ~ScXMLDPSourceTableContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -232,7 +232,7 @@ class ScXMLDPSourceQueryContext : public SvXMLImportContext
public:
- ScXMLDPSourceQueryContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDPSourceQueryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -240,7 +240,7 @@ public:
virtual ~ScXMLDPSourceQueryContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -257,7 +257,7 @@ class ScXMLSourceServiceContext : public SvXMLImportContext
public:
- ScXMLSourceServiceContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSourceServiceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -265,7 +265,7 @@ public:
virtual ~ScXMLSourceServiceContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -286,14 +286,14 @@ class ScXMLDataPilotGrandTotalContext : public SvXMLImportContext
public:
ScXMLDataPilotGrandTotalContext(
- ScXMLImport& rImport, USHORT nPrefix, const ::rtl::OUString& rLName,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLDataPilotTableContext* pTableContext );
virtual ~ScXMLDataPilotGrandTotalContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -310,7 +310,7 @@ class ScXMLSourceCellRangeContext : public SvXMLImportContext
public:
- ScXMLSourceCellRangeContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSourceCellRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -318,7 +318,7 @@ public:
virtual ~ScXMLSourceCellRangeContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -361,7 +361,7 @@ class ScXMLDataPilotFieldContext : public SvXMLImportContext
public:
- ScXMLDataPilotFieldContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotFieldContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -369,7 +369,7 @@ public:
virtual ~ScXMLDataPilotFieldContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -409,7 +409,7 @@ class ScXMLDataPilotFieldReferenceContext : public SvXMLImportContext
public:
- ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -427,7 +427,7 @@ class ScXMLDataPilotLevelContext : public SvXMLImportContext
public:
- ScXMLDataPilotLevelContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotLevelContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -435,7 +435,7 @@ public:
virtual ~ScXMLDataPilotLevelContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -452,7 +452,7 @@ class ScXMLDataPilotDisplayInfoContext : public SvXMLImportContext
public:
- ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -470,7 +470,7 @@ class ScXMLDataPilotSortInfoContext : public SvXMLImportContext
public:
- ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -488,7 +488,7 @@ class ScXMLDataPilotLayoutInfoContext : public SvXMLImportContext
public:
- ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -512,7 +512,7 @@ public:
ScXMLDataPilotFieldContext* GetDataPilotField() { return pDataPilotField; }
- ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -520,7 +520,7 @@ public:
virtual ~ScXMLDataPilotSubTotalsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -539,7 +539,7 @@ class ScXMLDataPilotSubTotalContext : public SvXMLImportContext
public:
- ScXMLDataPilotSubTotalContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotSubTotalContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -547,7 +547,7 @@ public:
virtual ~ScXMLDataPilotSubTotalContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -564,7 +564,7 @@ class ScXMLDataPilotMembersContext : public SvXMLImportContext
public:
- ScXMLDataPilotMembersContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotMembersContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -572,7 +572,7 @@ public:
virtual ~ScXMLDataPilotMembersContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -595,7 +595,7 @@ class ScXMLDataPilotMemberContext : public SvXMLImportContext
public:
- ScXMLDataPilotMemberContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -603,7 +603,7 @@ public:
virtual ~ScXMLDataPilotMemberContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -620,7 +620,7 @@ class ScXMLDataPilotGroupsContext : public SvXMLImportContext
public:
- ScXMLDataPilotGroupsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotGroupsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -628,7 +628,7 @@ public:
virtual ~ScXMLDataPilotGroupsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -648,7 +648,7 @@ class ScXMLDataPilotGroupContext : public SvXMLImportContext
public:
- ScXMLDataPilotGroupContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotGroupContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -656,7 +656,7 @@ public:
virtual ~ScXMLDataPilotGroupContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -677,7 +677,7 @@ class ScXMLDataPilotGroupMemberContext : public SvXMLImportContext
public:
- ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -685,7 +685,7 @@ public:
virtual ~ScXMLDataPilotGroupMemberContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 33c19be9a824..1a791879d0c6 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -72,7 +72,7 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLDatabaseRangesContext::ScXMLDatabaseRangesContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) :
@@ -87,7 +87,7 @@ ScXMLDatabaseRangesContext::~ScXMLDatabaseRangesContext()
GetScImport().UnlockSolarMutex();
}
-SvXMLImportContext *ScXMLDatabaseRangesContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDatabaseRangesContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -116,7 +116,7 @@ void ScXMLDatabaseRangesContext::EndElement()
}
ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList) :
@@ -126,26 +126,26 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
eOrientation(table::TableOrientation_ROWS),
nRefresh(0),
nSubTotalsUserListIndex(0),
- bContainsSort(sal_False),
- bContainsSubTotal(sal_False),
+ bContainsSort(false),
+ bContainsSubTotal(false),
bNative(sal_True),
- bIsSelection(sal_False),
- bKeepFormats(sal_False),
- bMoveCells(sal_False),
- bStripData(sal_False),
+ bIsSelection(false),
+ bKeepFormats(false),
+ bMoveCells(false),
+ bStripData(false),
bContainsHeader(sal_True),
- bAutoFilter(sal_False),
- bSubTotalsBindFormatsToContent(sal_False),
- bSubTotalsIsCaseSensitive(sal_False),
- bSubTotalsInsertPageBreaks(sal_False),
- bSubTotalsSortGroups(sal_False),
- bSubTotalsEnabledUserList(sal_False),
+ bAutoFilter(false),
+ bSubTotalsBindFormatsToContent(false),
+ bSubTotalsIsCaseSensitive(false),
+ bSubTotalsInsertPageBreaks(false),
+ bSubTotalsSortGroups(false),
+ bSubTotalsEnabledUserList(false),
bSubTotalsAscending(sal_True),
- bFilterCopyOutputData(sal_False),
- bFilterIsCaseSensitive(sal_False),
- bFilterSkipDuplicates(sal_False),
- bFilterUseRegularExpressions(sal_False),
- bFilterConditionSourceRange(sal_False)
+ bFilterCopyOutputData(false),
+ bFilterIsCaseSensitive(false),
+ bFilterSkipDuplicates(false),
+ bFilterUseRegularExpressions(false),
+ bFilterConditionSourceRange(false)
{
nSourceType = sheet::DataImportMode_NONE;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -154,7 +154,7 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -221,7 +221,7 @@ ScXMLDatabaseRangeContext::~ScXMLDatabaseRangeContext()
{
}
-SvXMLImportContext *ScXMLDatabaseRangeContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDatabaseRangeContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -299,7 +299,7 @@ void ScXMLDatabaseRangeContext::EndElement()
}
catch ( uno::RuntimeException& rRuntimeException )
{
- bInsert = sal_False;
+ bInsert = false;
rtl::OUString sErrorMessage(RTL_CONSTASCII_USTRINGPARAM("DatabaseRange "));
sErrorMessage += sDatabaseRangeName;
sErrorMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" could not be created with the range "));
@@ -446,7 +446,7 @@ void ScXMLDatabaseRangeContext::EndElement()
}
ScXMLSourceSQLContext::ScXMLSourceSQLContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -460,7 +460,7 @@ ScXMLSourceSQLContext::ScXMLSourceSQLContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -490,7 +490,7 @@ ScXMLSourceSQLContext::~ScXMLSourceSQLContext()
{
}
-SvXMLImportContext *ScXMLSourceSQLContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSourceSQLContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -519,7 +519,7 @@ void ScXMLSourceSQLContext::EndElement()
}
ScXMLSourceTableContext::ScXMLSourceTableContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -533,7 +533,7 @@ ScXMLSourceTableContext::ScXMLSourceTableContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -558,7 +558,7 @@ ScXMLSourceTableContext::~ScXMLSourceTableContext()
{
}
-SvXMLImportContext *ScXMLSourceTableContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSourceTableContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -587,7 +587,7 @@ void ScXMLSourceTableContext::EndElement()
}
ScXMLSourceQueryContext::ScXMLSourceQueryContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -601,7 +601,7 @@ ScXMLSourceQueryContext::ScXMLSourceQueryContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -626,7 +626,7 @@ ScXMLSourceQueryContext::~ScXMLSourceQueryContext()
{
}
-SvXMLImportContext *ScXMLSourceQueryContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSourceQueryContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -655,7 +655,7 @@ void ScXMLSourceQueryContext::EndElement()
}
ScXMLConResContext::ScXMLConResContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -669,7 +669,7 @@ ScXMLConResContext::ScXMLConResContext( ScXMLImport& rImport,
{
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
rtl::OUString sValue = xAttrList->getValueByIndex( i );
@@ -687,7 +687,7 @@ ScXMLConResContext::~ScXMLConResContext()
{
}
-SvXMLImportContext *ScXMLConResContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLConResContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -705,7 +705,7 @@ void ScXMLConResContext::EndElement()
}
ScXMLSubTotalRulesContext::ScXMLSubTotalRulesContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -719,7 +719,7 @@ ScXMLSubTotalRulesContext::ScXMLSubTotalRulesContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -748,7 +748,7 @@ ScXMLSubTotalRulesContext::~ScXMLSubTotalRulesContext()
{
}
-SvXMLImportContext *ScXMLSubTotalRulesContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSubTotalRulesContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -783,7 +783,7 @@ void ScXMLSubTotalRulesContext::EndElement()
}
ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -798,7 +798,7 @@ ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -838,7 +838,7 @@ ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport,
if (IsXMLToken(sValue, XML_ASCENDING))
pDatabaseRangeContext->SetSubTotalsAscending(sal_True);
else
- pDatabaseRangeContext->SetSubTotalsAscending(sal_False);
+ pDatabaseRangeContext->SetSubTotalsAscending(false);
}
break;
}
@@ -849,7 +849,7 @@ ScXMLSortGroupsContext::~ScXMLSortGroupsContext()
{
}
-SvXMLImportContext *ScXMLSortGroupsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSortGroupsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -867,7 +867,7 @@ void ScXMLSortGroupsContext::EndElement()
}
ScXMLSubTotalRuleContext::ScXMLSubTotalRuleContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -881,7 +881,7 @@ ScXMLSubTotalRuleContext::ScXMLSubTotalRuleContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -900,7 +900,7 @@ ScXMLSubTotalRuleContext::~ScXMLSubTotalRuleContext()
{
}
-SvXMLImportContext *ScXMLSubTotalRuleContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSubTotalRuleContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -931,7 +931,7 @@ void ScXMLSubTotalRuleContext::EndElement()
}
ScXMLSubTotalFieldContext::ScXMLSubTotalFieldContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -945,7 +945,7 @@ ScXMLSubTotalFieldContext::ScXMLSubTotalFieldContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -969,7 +969,7 @@ ScXMLSubTotalFieldContext::~ScXMLSubTotalFieldContext()
{
}
-SvXMLImportContext *ScXMLSubTotalFieldContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSubTotalFieldContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/xmldrani.hxx b/sc/source/filter/xml/xmldrani.hxx
index 7d2d5b2292eb..07268e2aa5dc 100644
--- a/sc/source/filter/xml/xmldrani.hxx
+++ b/sc/source/filter/xml/xmldrani.hxx
@@ -48,14 +48,14 @@ class ScXMLDatabaseRangesContext : public SvXMLImportContext
public:
- ScXMLDatabaseRangesContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDatabaseRangesContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLDatabaseRangesContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -112,14 +112,14 @@ class ScXMLDatabaseRangeContext : public SvXMLImportContext
public:
- ScXMLDatabaseRangeContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDatabaseRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLDatabaseRangeContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -160,7 +160,7 @@ class ScXMLSourceSQLContext : public SvXMLImportContext
public:
- ScXMLSourceSQLContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSourceSQLContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -168,7 +168,7 @@ public:
virtual ~ScXMLSourceSQLContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -186,7 +186,7 @@ class ScXMLSourceTableContext : public SvXMLImportContext
public:
- ScXMLSourceTableContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSourceTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -194,7 +194,7 @@ public:
virtual ~ScXMLSourceTableContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -212,7 +212,7 @@ class ScXMLSourceQueryContext : public SvXMLImportContext
public:
- ScXMLSourceQueryContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSourceQueryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -220,7 +220,7 @@ public:
virtual ~ScXMLSourceQueryContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -237,7 +237,7 @@ class ScXMLConResContext : public SvXMLImportContext
public:
- ScXMLConResContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLConResContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -245,7 +245,7 @@ public:
virtual ~ScXMLConResContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -262,7 +262,7 @@ class ScXMLSubTotalRulesContext : public SvXMLImportContext
public:
- ScXMLSubTotalRulesContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSubTotalRulesContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -270,7 +270,7 @@ public:
virtual ~ScXMLSubTotalRulesContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -287,7 +287,7 @@ class ScXMLSortGroupsContext : public SvXMLImportContext
public:
- ScXMLSortGroupsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSortGroupsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -295,7 +295,7 @@ public:
virtual ~ScXMLSortGroupsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -313,7 +313,7 @@ class ScXMLSubTotalRuleContext : public SvXMLImportContext
public:
- ScXMLSubTotalRuleContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSubTotalRuleContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -321,7 +321,7 @@ public:
virtual ~ScXMLSubTotalRuleContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -344,7 +344,7 @@ class ScXMLSubTotalFieldContext : public SvXMLImportContext
public:
- ScXMLSubTotalFieldContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSubTotalFieldContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -352,7 +352,7 @@ public:
virtual ~ScXMLSubTotalFieldContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 77e3907fa8a0..4cb9915ac186 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -475,9 +475,9 @@ ScXMLExport::ScXMLExport(
nOpenRow(-1),
nProgressCount(0),
nCurrentTable(0),
- bHasRowHeader(sal_False),
- bRowHeaderOpen(sal_False),
- mbShowProgress( sal_False )
+ bHasRowHeader(false),
+ bRowHeaderOpen(false),
+ mbShowProgress( false )
{
if (getExportFlags() & EXPORT_CONTENT)
{
@@ -649,7 +649,7 @@ void ScXMLExport::CollectSharedData(sal_Int32& nTableCount, sal_Int32& nShapesCo
{
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage());
ScMyDrawPage aDrawPage;
- aDrawPage.bHasForms = sal_False;
+ aDrawPage.bHasForms = false;
aDrawPage.xDrawPage.set(xDrawPage);
pSharedData->AddDrawPage(aDrawPage, nTable);
uno::Reference<container::XIndexAccess> xShapesIndex (xDrawPage, uno::UNO_QUERY);
@@ -750,7 +750,7 @@ void ScXMLExport::CollectShapesAutoStyles(const sal_Int32 nTableCount)
while (aItr != aEndItr)
{
GetShapeExport()->collectShapeAutoStyles(*aItr);
- IncrementProgressBar(sal_False);
+ IncrementProgressBar(false);
++aItr;
}
}
@@ -760,7 +760,7 @@ void ScXMLExport::CollectShapesAutoStyles(const sal_Int32 nTableCount)
while (aShapeItr != aEndItr && (static_cast<sal_Int32>(aShapeItr->aAddress.Tab()) == nTable))
{
GetShapeExport()->collectShapeAutoStyles(aShapeItr->xShape);
- IncrementProgressBar(sal_False);
+ IncrementProgressBar(false);
++aShapeItr;
}
}
@@ -889,7 +889,7 @@ void ScXMLExport::GetDetectiveOpList( ScMyDetectiveOpContainer& rDetOp )
sal_uInt32 nCount(pOpList->Count());
for( sal_uInt32 nIndex = 0; nIndex < nCount; ++nIndex )
{
- ScDetOpData* pDetData(pOpList->GetObject( static_cast<USHORT>(nIndex) ));
+ ScDetOpData* pDetData(pOpList->GetObject( static_cast<sal_uInt16>(nIndex) ));
if( pDetData )
{
const ScAddress& rDetPos = pDetData->GetPos();
@@ -965,8 +965,8 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd
sal_Int32 nIndex;
sal_Int32 nPrevColumn(0);
sal_Bool bPrevIsVisible (sal_True);
- sal_Bool bWasHeader (sal_False);
- sal_Bool bIsHeader (sal_False);
+ sal_Bool bWasHeader (false);
+ sal_Bool bIsHeader (false);
sal_Bool bIsClosed (sal_True);
sal_Int32 nPrevIndex (-1);
sal_Int32 nColumn;
@@ -995,7 +995,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd
pGroupColumns->OpenGroups(nColumn);
OpenHeaderColumn();
bWasHeader = sal_True;
- bIsClosed = sal_False;
+ bIsClosed = false;
}
else
{
@@ -1009,7 +1009,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd
nPrevIndex = nIndex;
nPrevColumn = nColumn;
nColsRepeated = 1;
- bWasHeader = sal_False;
+ bWasHeader = false;
bIsClosed = sal_True;
}
}
@@ -1129,7 +1129,7 @@ void ScXMLExport::WriteRowContent()
nPrevValidationIndex = aRange.nValidationIndex;
bIsAutoStyle = aRange.bIsAutoStyle;
nCols = aRange.nRepeatColumns;
- bIsFirst = sal_False;
+ bIsFirst = false;
#ifdef DBG_UTIL
nPrevCol = aRange.nStartColumn;
#endif
@@ -1349,7 +1349,7 @@ void ScXMLExport::CloseRow(const sal_Int32 nRow)
if (bHasRowHeader && nRow == aRowHeaderRange.EndRow)
{
CloseHeaderRows();
- bRowHeaderOpen = sal_False;
+ bRowHeaderOpen = false;
}
if (pGroupRows->IsGroupEnd(nRow))
{
@@ -1465,11 +1465,11 @@ void ScXMLExport::FillFieldGroup(ScOutlineArray* pFields, ScMyOpenCloseColumnRow
sal_Int32 nDepth(pFields->GetDepth());
for(sal_Int32 i = 0; i < nDepth; ++i)
{
- sal_Int32 nFields = pFields->GetCount(static_cast<USHORT>(i));
+ sal_Int32 nFields = pFields->GetCount(static_cast<sal_uInt16>(i));
for (sal_Int32 j = 0; j < nFields; ++j)
{
ScMyColumnRowGroup aGroup;
- ScOutlineEntry* pEntry(pFields->GetEntry(static_cast<USHORT>(i), static_cast<USHORT>(j)));
+ ScOutlineEntry* pEntry(pFields->GetEntry(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j)));
aGroup.nField = pEntry->GetStart();
aGroup.nLevel = static_cast<sal_Int16>(i);
aGroup.bDisplay = !(pEntry->IsHidden());
@@ -1484,7 +1484,7 @@ void ScXMLExport::FillColumnRowGroups()
{
if (pDoc)
{
- ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable( static_cast<SCTAB>(nCurrentTable), sal_False );
+ ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable( static_cast<SCTAB>(nCurrentTable), false );
if(pOutlineTable)
{
ScOutlineArray* pCols(pOutlineTable->GetColArray());
@@ -1834,7 +1834,7 @@ void ScXMLExport::_ExportContent()
FillColumnRowGroups();
if (bHasColumnHeader)
pSharedData->SetLastColumn(nTable, aColumnHeaderRange.EndColumn);
- bRowHeaderOpen = sal_False;
+ bRowHeaderOpen = false;
if (bHasRowHeader)
pSharedData->SetLastRow(nTable, aRowHeaderRange.EndRow);
pDefaults->FillDefaultStyles(nTable, pSharedData->GetLastRow(nTable),
@@ -1854,7 +1854,7 @@ void ScXMLExport::_ExportContent()
{
ExportFormatRanges(0, 0, aCell.aCellAddress.Column - 1, aCell.aCellAddress.Row, nTable);
aPrevCell = aCell;
- bIsFirst = sal_False;
+ bIsFirst = false;
}
else
{
@@ -1896,7 +1896,7 @@ void ScXMLExport::_ExportContent()
}
}
}
- IncrementProgressBar(sal_False);
+ IncrementProgressBar(false);
}
}
WriteExternalRefCaches();
@@ -1962,7 +1962,7 @@ void ScXMLExport::_ExportStyles( sal_Bool bUsed )
exportDataStyles();
aStylesExp.exportStyleFamily(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellStyles")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME)), xCellStylesExportPropertySetMapper, FALSE, XML_STYLE_FAMILY_TABLE_CELL);
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME)), xCellStylesExportPropertySetMapper, false, XML_STYLE_FAMILY_TABLE_CELL);
SvXMLExport::_ExportStyles(bUsed);
}
@@ -2081,7 +2081,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
{
rtl::OUString* pTemp(new rtl::OUString(EncodeStyleName(sStyleName)));
sal_Int32 nIndex(0);
- if (!pCellStyles->AddStyleName(pTemp, nIndex, sal_False))
+ if (!pCellStyles->AddStyleName(pTemp, nIndex, false))
{
delete pTemp;
pTemp = NULL;
@@ -2095,7 +2095,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
{
if (bGetMerge)
bGetMerge = GetMerged(pAddresses, xTable);
- pCellStyles->AddRangeStyleName(*pAddresses, nIndex, sal_False, nValidationIndex, nNumberFormat);
+ pCellStyles->AddRangeStyleName(*pAddresses, nIndex, false, nValidationIndex, nNumberFormat);
if (!sStyleName.equalsAsciiL("Default", 7) || nValidationIndex != -1)
{
pSharedData->SetLastColumn(nTable, pAddresses->EndColumn);
@@ -2496,7 +2496,7 @@ void ScXMLExport::_ExportAutoStyles()
sal_Int32 nTableCount(xIndex->getCount());
pCellStyles->AddNewTable(nTableCount - 1);
CollectShapesAutoStyles(nTableCount);
- for (sal_Int32 nTable = 0; nTable < nTableCount; ++nTable, IncrementProgressBar(sal_False))
+ for (sal_Int32 nTable = 0; nTable < nTableCount; ++nTable, IncrementProgressBar(false))
{
bool bUseStream = pSheetData && pDoc && pDoc->IsStreamValid((SCTAB)nTable) &&
pSheetData->HasStreamPos(nTable) && xSourceStream.is();
@@ -2540,7 +2540,7 @@ void ScXMLExport::_ExportAutoStyles()
if (xProperties.is())
{
AddStyleFromCells(xProperties, xTable, nTable, NULL);
- IncrementProgressBar(sal_False);
+ IncrementProgressBar(false);
}
}
}
@@ -2645,9 +2645,9 @@ void ScXMLExport::_ExportAutoStyles()
{
Reference<text::XText> xText(xCells->nextElement(), uno::UNO_QUERY);
if (xText.is())
- GetTextParagraphExport()->collectTextAutoStyles(xText, sal_False, sal_False);
+ GetTextParagraphExport()->collectTextAutoStyles(xText, false, false);
++nCount2;
- IncrementProgressBar(sal_False);
+ IncrementProgressBar(false);
}
if(nCount2 > nCount)
GetProgressBarHelper()->SetReference(GetProgressBarHelper()->GetReference() + nCount2 - nCount);
@@ -2741,7 +2741,7 @@ void ScXMLExport::CollectInternalShape( uno::Reference< drawing::XShape > xShape
sal_Bool ScXMLExport::GetMerged (const table::CellRangeAddress* pCellAddress,
const uno::Reference <sheet::XSpreadsheet>& xTable)
{
- sal_Bool bReady(sal_False);
+ sal_Bool bReady(false);
sal_Int32 nRow(pCellAddress->StartRow);
sal_Int32 nCol(pCellAddress->StartColumn);
sal_Int32 nEndRow(pCellAddress->EndRow);
@@ -2786,7 +2786,7 @@ sal_Bool ScXMLExport::GetMerged (const table::CellRangeAddress* pCellAddress,
sal_Bool ScXMLExport::IsMatrix (const ScAddress& aCell,
table::CellRangeAddress& aCellAddress, sal_Bool& bIsFirst) const
{
- bIsFirst = sal_False;
+ bIsFirst = false;
ScRange aMatrixRange;
@@ -2809,7 +2809,7 @@ sal_Bool ScXMLExport::IsMatrix (const ScAddress& aCell,
}
}
- return sal_False;
+ return false;
}
sal_Bool ScXMLExport::GetCellText (ScMyCell& rMyCell, const ScAddress& aPos) const
@@ -2845,7 +2845,7 @@ void ScXMLExport::WriteCell (ScMyCell& aCell)
AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_MATRIX_COLUMNS_SPANNED, sColumns.makeStringAndClear());
AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_MATRIX_ROWS_SPANNED, sRows.makeStringAndClear());
}
- sal_Bool bIsEmpty(sal_False);
+ sal_Bool bIsEmpty(false);
switch (aCell.nType)
{
case table::CellContentType_EMPTY :
@@ -2889,11 +2889,11 @@ void ScXMLExport::WriteCell (ScMyCell& aCell)
rtl::OUString sOUFormula(sFormula.makeStringAndClear());
if (!bIsMatrix)
{
- AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula, sal_False ));
+ AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula, false ));
}
else
{
- AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula.copy(1, sOUFormula.getLength() - 2), sal_False ));
+ AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula.copy(1, sOUFormula.getLength() - 2), false ));
}
}
if (pFormulaCell->IsValue())
@@ -2957,7 +2957,7 @@ void ScXMLExport::WriteCell (ScMyCell& aCell)
WriteAnnotation(aCell);
WriteDetective(aCell);
- sal_Bool bEditCell = sal_False;
+ sal_Bool bEditCell = false;
if (!bIsEmpty)
{
@@ -2967,11 +2967,11 @@ void ScXMLExport::WriteCell (ScMyCell& aCell)
bEditCell = sal_True;
uno::Reference<text::XText> xText(xCurrentTableCellRange->getCellByPosition(aCell.aCellAddress.Column, aCell.aCellAddress.Row), uno::UNO_QUERY);
if ( xText.is())
- GetTextParagraphExport()->exportText(xText, sal_False, sal_False);
+ GetTextParagraphExport()->exportText(xText, false, false);
}
else
{
- SvXMLElementExport aElemP(*this, sElemP, sal_True, sal_False);
+ SvXMLElementExport aElemP(*this, sElemP, sal_True, false);
sal_Bool bPrevCharWasSpace(sal_True);
if (GetCellText(aCell, aCellPos))
GetTextParagraphExport()->exportText(aCell.sStringValue, bPrevCharWasSpace);
@@ -3014,7 +3014,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
xShapeProps->getPropertyValue( sPersistName ) >>= aChartName;
ScRange aEmptyRange;
ScChartListener aSearcher( aChartName, pDoc, aEmptyRange );
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection();
if ( pCollection && pCollection->Search( &aSearcher, nIndex ) )
{
@@ -3098,14 +3098,14 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
// Add Hlink
AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sHlink);
- pDrawA.reset( new SvXMLElementExport( *this, XML_NAMESPACE_DRAW, XML_A, sal_False, sal_False ) );
+ pDrawA.reset( new SvXMLElementExport( *this, XML_NAMESPACE_DRAW, XML_A, false, false ) );
// Attribute list has been cleared by previous operation
// re-add pre-loaded attributes
AddAttributeList( xSaveAttribs );
}
GetShapeExport()->exportShape(xShape, SEF_DEFAULT, pPoint);
}
- IncrementProgressBar(sal_False);
+ IncrementProgressBar(false);
}
void ScXMLExport::WriteShapes(const ScMyCell& rMyCell)
@@ -3115,7 +3115,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell)
awt::Point aPoint;
Rectangle aRec = pDoc->GetMMRect(static_cast<SCCOL>(rMyCell.aCellAddress.Column), static_cast<SCROW>(rMyCell.aCellAddress.Row),
static_cast<SCCOL>(rMyCell.aCellAddress.Column), static_cast<SCROW>(rMyCell.aCellAddress.Row), static_cast<SCTAB>(rMyCell.aCellAddress.Sheet));
- BOOL bNegativePage(pDoc->IsNegativePage(rMyCell.aCellAddress.Sheet));
+ sal_Bool bNegativePage(pDoc->IsNegativePage(rMyCell.aCellAddress.Sheet));
if (bNegativePage)
aPoint.X = aRec.Right();
else
@@ -3155,7 +3155,7 @@ void ScXMLExport::WriteTableShapes()
if (pTableShapes && !(*pTableShapes)[nCurrentTable].empty())
{
DBG_ASSERT(pTableShapes->size() > static_cast<size_t>(nCurrentTable), "wrong Table");
- SvXMLElementExport aShapesElem(*this, XML_NAMESPACE_TABLE, XML_SHAPES, sal_True, sal_False);
+ SvXMLElementExport aShapesElem(*this, XML_NAMESPACE_TABLE, XML_SHAPES, sal_True, false);
ScMyTableXShapes::iterator aItr((*pTableShapes)[nCurrentTable].begin());
ScMyTableXShapes::iterator aEndItr((*pTableShapes)[nCurrentTable].end());
while (aItr != aEndItr)
@@ -3212,7 +3212,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape >
{
SvXMLElementExport aCreatorElem( *this, XML_NAMESPACE_DC,
XML_CREATOR, sal_True,
- sal_False );
+ false );
Characters(sAuthor);
}
@@ -3228,14 +3228,14 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape >
GetMM100UnitConverter().convertDateTime(sBuf, fDate,sal_True);
SvXMLElementExport aDateElem( *this, XML_NAMESPACE_DC,
XML_DATE, sal_True,
- sal_False );
+ false );
Characters(sBuf.makeStringAndClear());
}
else
{
SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META,
XML_DATE_STRING, sal_True,
- sal_False );
+ false );
Characters(rtl::OUString(aDate));
}
}
@@ -3243,7 +3243,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape >
{
SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META,
XML_DATE_STRING, sal_True,
- sal_False );
+ false );
Characters(rtl::OUString(aDate));
}
}
@@ -3325,7 +3325,7 @@ void ScXMLExport::SetRepeatAttribute (const sal_Int32 nEqualCellCount)
sal_Int32 nTemp(nEqualCellCount + 1);
OUString sOUEqualCellCount(OUString::valueOf(nTemp));
AddAttribute(sAttrColumnsRepeated, sOUEqualCellCount);
- IncrementProgressBar(sal_False, nEqualCellCount);
+ IncrementProgressBar(false, nEqualCellCount);
}
}
@@ -3345,7 +3345,7 @@ sal_Bool ScXMLExport::IsEditCell(const com::sun::star::table::CellAddress& aAddr
if (pBaseCell)
return (pBaseCell->GetCellType() == CELLTYPE_EDIT);
- return sal_False;
+ return false;
}
sal_Bool ScXMLExport::IsEditCell(ScMyCell& rCell) const
@@ -3390,7 +3390,7 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
ScUnoConversion::FillScAddress( aCellPos1, aCell1.aCellAddress );
ScAddress aCellPos2;
ScUnoConversion::FillScAddress( aCellPos2, aCell2.aCellAddress );
- sal_Bool bIsEqual = sal_False;
+ sal_Bool bIsEqual = false;
if( !aCell1.bIsMergedBase && !aCell2.bIsMergedBase &&
aCell1.bIsCovered == aCell2.bIsCovered &&
!aCell1.bIsMatrixBase && !aCell2.bIsMatrixBase &&
@@ -3406,7 +3406,7 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
aCell1.aAreaLink.Compare( aCell2.aAreaLink ) ) ||
!aCell1.bHasAreaLink )
{
- if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && sal_False/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable
+ if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && false/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable
{
if ((((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle)) ||
((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1))) &&
@@ -3441,7 +3441,7 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
case table::CellContentType_TEXT :
{
if (IsEditCell(aCell1) || IsEditCell(aCell2))
- bIsEqual = sal_False;
+ bIsEqual = false;
else
{
if (GetCellText(aCell1, aCellPos1) && GetCellText(aCell2, aCellPos2))
@@ -3450,18 +3450,18 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
(lcl_GetRawString(pDoc, aCellPos1) == lcl_GetRawString(pDoc, aCellPos2));
}
else
- bIsEqual = sal_False;
+ bIsEqual = false;
}
}
break;
case table::CellContentType_FORMULA :
{
- bIsEqual = sal_False;
+ bIsEqual = false;
}
break;
default :
{
- bIsEqual = sal_False;
+ bIsEqual = false;
}
break;
}
@@ -3559,7 +3559,7 @@ void ScXMLExport::WriteTableSource()
sal_Int32 nCount(xIndex->getCount());
if (nCount)
{
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
uno::Reference <beans::XPropertySet> xLinkProps;
for (sal_Int32 i = 0; (i < nCount) && !bFound; ++i)
{
@@ -3660,7 +3660,7 @@ void ScXMLExport::WriteTheLabelRanges( const uno::Reference< sheet::XSpreadsheet
{
SvXMLElementExport aElem( *this, XML_NAMESPACE_TABLE, XML_LABEL_RANGES, sal_True, sal_True );
WriteLabelRanges( xColRangesIAccess, sal_True );
- WriteLabelRanges( xRowRangesIAccess, sal_False );
+ WriteLabelRanges( xRowRangesIAccess, false );
}
}
@@ -3720,7 +3720,7 @@ void ScXMLExport::WriteNamedExpressions(const com::sun::star::uno::Reference <co
OUString sOUBaseCellAddress;
ScRangeStringConverter::GetStringFromAddress( sOUBaseCellAddress,
- xNamedRange->getReferencePosition(), pDoc, FormulaGrammar::CONV_OOO, ' ', sal_False, SCA_ABS_3D );
+ xNamedRange->getReferencePosition(), pDoc, FormulaGrammar::CONV_OOO, ' ', false, SCA_ABS_3D );
AddAttribute(XML_NAMESPACE_TABLE, XML_BASE_CELL_ADDRESS, sOUBaseCellAddress);
const ScRangeData* pNamedRange = pNamedRanges->findByName(sOUName);
@@ -3971,7 +3971,7 @@ void ScXMLExport::WriteExternalRefCaches()
}
}
SvXMLElementExport aElemCell(*this, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True);
- SvXMLElementExport aElemText(*this, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ SvXMLElementExport aElemText(*this, XML_NAMESPACE_TEXT, XML_P, sal_True, false);
Characters(aStrVal);
nLastCol = nCol;
@@ -4137,15 +4137,20 @@ void ScXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&
++nPropsToAdd;
}
+ bool bVBACompat = false;
uno::Reference <container::XNameAccess> xCodeNameAccess;
DBG_ASSERT( pDoc, "ScXMLExport::GetConfigurationSettings - no ScDocument!" );
if( pDoc && pDoc->IsInVBAMode() )
{
+ // VBA compatibility mode
+ bVBACompat = true;
+ ++nPropsToAdd;
+ // code names
xCodeNameAccess = new XMLCodeNameProvider( pDoc );
- if( xCodeNameAccess.is() && xCodeNameAccess->hasElements() )
+ if( xCodeNameAccess->hasElements() )
++nPropsToAdd;
else
- xCodeNameAccess = 0;
+ xCodeNameAccess.clear();
}
if( nPropsToAdd > 0 )
@@ -4158,10 +4163,17 @@ void ScXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&
rProps[nCount].Value <<= aTrackedChangesKey.makeStringAndClear();
++nCount;
}
+ if( bVBACompat )
+ {
+ rProps[nCount].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBACompatibilityMode"));
+ rProps[nCount].Value <<= bVBACompat;
+ ++nCount;
+ }
if( xCodeNameAccess.is() )
{
rProps[nCount].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScriptConfiguration"));
rProps[nCount].Value <<= xCodeNameAccess;
+ ++nCount;
}
}
}
@@ -4188,10 +4200,10 @@ XMLNumberFormatAttributesExportHelper* ScXMLExport::GetNumberFormatAttributesExp
void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uInt16 nAttrib)
{
const SfxPoolItem* pItem;
- sal_uInt16 nItems(pPool->GetItemCount( nAttrib ));
- for( sal_uInt16 i = 0; i < nItems; ++i )
+ sal_uInt32 nItems(pPool->GetItemCount2( nAttrib ));
+ for( sal_uInt32 i = 0; i < nItems; ++i )
{
- if( 0 != (pItem = pPool->GetItem( nAttrib, i ) ) )
+ if( 0 != (pItem = pPool->GetItem2( nAttrib, i ) ) )
{
const SvXMLAttrContainerItem *pUnknown((const SvXMLAttrContainerItem *)pItem);
if( (pUnknown->GetAttrCount() > 0) )
@@ -4306,10 +4318,10 @@ sal_Bool SAL_CALL ScXMLExport::filter( const ::com::sun::star::uno::Sequence< ::
{
SolarMutexGuard aGuard;
if (pDoc)
- pDoc->DisableIdle(TRUE);
+ pDoc->DisableIdle(sal_True);
sal_Bool bReturn(SvXMLExport::filter(aDescriptor));
if (pDoc)
- pDoc->DisableIdle(FALSE);
+ pDoc->DisableIdle(false);
return bReturn;
}
@@ -4318,7 +4330,7 @@ void SAL_CALL ScXMLExport::cancel()
{
SolarMutexGuard aGuard;
if (pDoc)
- pDoc->DisableIdle(FALSE);
+ pDoc->DisableIdle(false);
SvXMLExport::cancel();
}
diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx
index 73c00cdc136b..1e2277465c2a 100644
--- a/sc/source/filter/xml/xmlexternaltabi.cxx
+++ b/sc/source/filter/xml/xmlexternaltabi.cxx
@@ -56,7 +56,7 @@ using ::com::sun::star::xml::sax::XAttributeList;
// ============================================================================
ScXMLExternalRefTabSourceContext::ScXMLExternalRefTabSourceContext(
- ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName,
const Reference<XAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) :
SvXMLImportContext( rImport, nPrefix, rLName ),
mrScImport(rImport),
@@ -93,7 +93,7 @@ ScXMLExternalRefTabSourceContext::~ScXMLExternalRefTabSourceContext()
}
SvXMLImportContext* ScXMLExternalRefTabSourceContext::CreateChildContext(
- USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ )
+ sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ )
{
return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
}
@@ -139,7 +139,7 @@ void ScXMLExternalRefTabSourceContext::EndElement()
// ============================================================================
ScXMLExternalRefRowsContext::ScXMLExternalRefRowsContext(
- ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName,
const Reference<XAttributeList>& /* xAttrList */, ScXMLExternalTabData& rRefInfo ) :
SvXMLImportContext( rImport, nPrefix, rLName ),
mrScImport(rImport),
@@ -152,7 +152,7 @@ ScXMLExternalRefRowsContext::~ScXMLExternalRefRowsContext()
}
SvXMLImportContext* ScXMLExternalRefRowsContext::CreateChildContext(
- USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList )
+ sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList )
{
// #i101319# row elements inside group, rows or header-rows
// are treated like row elements directly in the table element
@@ -182,7 +182,7 @@ void ScXMLExternalRefRowsContext::EndElement()
// ============================================================================
ScXMLExternalRefRowContext::ScXMLExternalRefRowContext(
- ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName,
const Reference<XAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) :
SvXMLImportContext( rImport, nPrefix, rLName ),
mrScImport(rImport),
@@ -216,7 +216,7 @@ ScXMLExternalRefRowContext::~ScXMLExternalRefRowContext()
}
SvXMLImportContext* ScXMLExternalRefRowContext::CreateChildContext(
- USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList )
+ sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList )
{
const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowElemTokenMap();
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName);
@@ -259,7 +259,7 @@ void ScXMLExternalRefRowContext::EndElement()
// ============================================================================
ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
- ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName,
const Reference<XAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) :
SvXMLImportContext( rImport, nPrefix, rLName ),
mrScImport(rImport),
@@ -366,7 +366,7 @@ ScXMLExternalRefCellContext::~ScXMLExternalRefCellContext()
}
SvXMLImportContext* ScXMLExternalRefCellContext::CreateChildContext(
- USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList )
+ sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList )
{
const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowCellElemTokenMap();
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName);
@@ -408,7 +408,7 @@ void ScXMLExternalRefCellContext::SetCellString(const OUString& rStr)
// ============================================================================
ScXMLExternalRefCellTextContext::ScXMLExternalRefCellTextContext(
- ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName,
const Reference<XAttributeList>& /*xAttrList*/,
ScXMLExternalRefCellContext& rParent ) :
SvXMLImportContext( rImport, nPrefix, rLName ),
@@ -422,7 +422,7 @@ ScXMLExternalRefCellTextContext::~ScXMLExternalRefCellTextContext()
}
SvXMLImportContext* ScXMLExternalRefCellTextContext::CreateChildContext(
- USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ )
+ sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ )
{
return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
}
diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx b/sc/source/filter/xml/xmlexternaltabi.hxx
index 065933ce8108..1d3d1c836fe7 100644
--- a/sc/source/filter/xml/xmlexternaltabi.hxx
+++ b/sc/source/filter/xml/xmlexternaltabi.hxx
@@ -38,7 +38,7 @@ struct ScXMLExternalTabData;
class ScXMLExternalRefTabSourceContext : public SvXMLImportContext
{
public:
- ScXMLExternalRefTabSourceContext( ScXMLImport& rImport, USHORT nPrefix,
+ ScXMLExternalRefTabSourceContext( ScXMLImport& rImport, sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -46,7 +46,7 @@ public:
virtual ~ScXMLExternalRefTabSourceContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -67,7 +67,7 @@ private:
class ScXMLExternalRefRowsContext : public SvXMLImportContext
{
public:
- ScXMLExternalRefRowsContext( ScXMLImport& rImport, USHORT nPrefix,
+ ScXMLExternalRefRowsContext( ScXMLImport& rImport, sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -75,7 +75,7 @@ public:
virtual ~ScXMLExternalRefRowsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -91,7 +91,7 @@ private:
class ScXMLExternalRefRowContext : public SvXMLImportContext
{
public:
- ScXMLExternalRefRowContext( ScXMLImport& rImport, USHORT nPrefix,
+ ScXMLExternalRefRowContext( ScXMLImport& rImport, sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -99,7 +99,7 @@ public:
virtual ~ScXMLExternalRefRowContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -116,7 +116,7 @@ private:
class ScXMLExternalRefCellContext : public SvXMLImportContext
{
public:
- ScXMLExternalRefCellContext( ScXMLImport& rImport, USHORT nPrefix,
+ ScXMLExternalRefCellContext( ScXMLImport& rImport, sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -124,7 +124,7 @@ public:
virtual ~ScXMLExternalRefCellContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -150,7 +150,7 @@ private:
class ScXMLExternalRefCellTextContext : public SvXMLImportContext
{
public:
- ScXMLExternalRefCellTextContext( ScXMLImport& rImport, USHORT nPrefix,
+ ScXMLExternalRefCellTextContext( ScXMLImport& rImport, sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -158,7 +158,7 @@ public:
virtual ~ScXMLExternalRefCellTextContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index f30c4a87c5e7..c350916ad898 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -49,7 +49,7 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -57,12 +57,12 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
SvXMLImportContext( rImport, nPrfx, rLName ),
pDatabaseRangeContext(pTempDatabaseRangeContext),
aFilterFields(),
- bSkipDuplicates(sal_False),
- bCopyOutputData(sal_False),
- bUseRegularExpressions(sal_False),
+ bSkipDuplicates(false),
+ bCopyOutputData(false),
+ bUseRegularExpressions(false),
bConnectionOr(sal_True),
bNextConnectionOr(sal_True),
- bConditionSourceRange(sal_False)
+ bConditionSourceRange(false)
{
ScDocument* pDoc(GetScImport().GetDocument());
@@ -72,7 +72,7 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -114,7 +114,7 @@ ScXMLFilterContext::~ScXMLFilterContext()
{
}
-SvXMLImportContext *ScXMLFilterContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLFilterContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -159,7 +159,7 @@ void ScXMLFilterContext::EndElement()
pDatabaseRangeContext->SetFilterCopyOutputData(bCopyOutputData);
}
else
- pDatabaseRangeContext->SetFilterCopyOutputData(sal_False);
+ pDatabaseRangeContext->SetFilterCopyOutputData(false);
pDatabaseRangeContext->SetFilterIsCaseSensitive(bIsCaseSensitive);
pDatabaseRangeContext->SetFilterSkipDuplicates(bSkipDuplicates);
pDatabaseRangeContext->SetFilterFields(aFilterFields);
@@ -168,7 +168,7 @@ void ScXMLFilterContext::EndElement()
}
ScXMLAndContext::ScXMLAndContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -176,14 +176,14 @@ ScXMLAndContext::ScXMLAndContext( ScXMLImport& rImport,
SvXMLImportContext( rImport, nPrfx, rLName ),
pFilterContext(pTempFilterContext)
{
- pFilterContext->OpenConnection(sal_False);
+ pFilterContext->OpenConnection(false);
}
ScXMLAndContext::~ScXMLAndContext()
{
}
-SvXMLImportContext *ScXMLAndContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLAndContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -218,7 +218,7 @@ void ScXMLAndContext::EndElement()
}
ScXMLOrContext::ScXMLOrContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -233,7 +233,7 @@ ScXMLOrContext::~ScXMLOrContext()
{
}
-SvXMLImportContext *ScXMLOrContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLOrContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -269,14 +269,14 @@ void ScXMLOrContext::EndElement()
}
ScXMLConditionContext::ScXMLConditionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
ScXMLFilterContext* pTempFilterContext) :
SvXMLImportContext( rImport, nPrfx, rLName ),
pFilterContext(pTempFilterContext),
- bIsCaseSensitive(sal_False)
+ bIsCaseSensitive(false)
{
sDataType = GetXMLToken(XML_TEXT);
@@ -286,7 +286,7 @@ ScXMLConditionContext::ScXMLConditionContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -325,7 +325,7 @@ ScXMLConditionContext::~ScXMLConditionContext()
{
}
-SvXMLImportContext *ScXMLConditionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLConditionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -335,7 +335,7 @@ SvXMLImportContext *ScXMLConditionContext::CreateChildContext( USHORT nPrefix,
void ScXMLConditionContext::getOperatorXML(const rtl::OUString sTempOperator, sal_Int32& aFilterOperator, sal_Bool& bUseRegularExpressions) const
{
- bUseRegularExpressions = sal_False;
+ bUseRegularExpressions = false;
if (IsXMLToken(sTempOperator, XML_MATCH))
{
bUseRegularExpressions = sal_True;
@@ -404,7 +404,7 @@ void ScXMLConditionContext::EndElement()
else
{
aFilterField.StringValue = sConditionValue;
- aFilterField.IsNumeric = sal_False;
+ aFilterField.IsNumeric = false;
}
pFilterContext->AddFilterField(aFilterField);
}
@@ -412,7 +412,7 @@ void ScXMLConditionContext::EndElement()
//==========================================================================
ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -421,12 +421,12 @@ ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport,
pDataPilotTable(pTempDataPilotTableContext),
aFilterFields(),
nFilterFieldCount(0),
- bSkipDuplicates(sal_False),
- bCopyOutputData(sal_False),
- bUseRegularExpressions(sal_False),
+ bSkipDuplicates(false),
+ bCopyOutputData(false),
+ bUseRegularExpressions(false),
bConnectionOr(sal_True),
bNextConnectionOr(sal_True),
- bConditionSourceRange(sal_False)
+ bConditionSourceRange(false)
{
ScDocument* pDoc(GetScImport().GetDocument());
@@ -436,7 +436,7 @@ ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -478,7 +478,7 @@ ScXMLDPFilterContext::~ScXMLDPFilterContext()
{
}
-SvXMLImportContext *ScXMLDPFilterContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDPFilterContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -526,7 +526,7 @@ void ScXMLDPFilterContext::EndElement()
pDataPilotTable->SetFilterCopyOutputData(bCopyOutputData);
}
else
- pDataPilotTable->SetFilterCopyOutputData(sal_False);
+ pDataPilotTable->SetFilterCopyOutputData(false);
// pDataPilotTable->SetFilterIsCaseSensitive(bIsCaseSensitive);
// pDataPilotTable->SetFilterSkipDuplicates(bSkipDuplicates);
pDataPilotTable->SetSourceQueryParam(aFilterFields);
@@ -544,7 +544,7 @@ void ScXMLDPFilterContext::AddFilterField (const ScQueryEntry& aFilterField)
}
ScXMLDPAndContext::ScXMLDPAndContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -552,14 +552,14 @@ ScXMLDPAndContext::ScXMLDPAndContext( ScXMLImport& rImport,
SvXMLImportContext( rImport, nPrfx, rLName )
{
pFilterContext = pTempFilterContext;
- pFilterContext->OpenConnection(sal_False);
+ pFilterContext->OpenConnection(false);
}
ScXMLDPAndContext::~ScXMLDPAndContext()
{
}
-SvXMLImportContext *ScXMLDPAndContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDPAndContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -594,7 +594,7 @@ void ScXMLDPAndContext::EndElement()
}
ScXMLDPOrContext::ScXMLDPOrContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */,
@@ -609,7 +609,7 @@ ScXMLDPOrContext::~ScXMLDPOrContext()
{
}
-SvXMLImportContext *ScXMLDPOrContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDPOrContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -645,7 +645,7 @@ void ScXMLDPOrContext::EndElement()
}
ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -653,7 +653,7 @@ ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport,
SvXMLImportContext( rImport, nPrfx, rLName ),
pFilterContext(pTempFilterContext),
sDataType(GetXMLToken(XML_TEXT)),
- bIsCaseSensitive(sal_False)
+ bIsCaseSensitive(false)
{
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
@@ -662,7 +662,7 @@ ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -701,7 +701,7 @@ ScXMLDPConditionContext::~ScXMLDPConditionContext()
{
}
-SvXMLImportContext *ScXMLDPConditionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDPConditionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -712,7 +712,7 @@ SvXMLImportContext *ScXMLDPConditionContext::CreateChildContext( USHORT nPrefix,
void ScXMLDPConditionContext::getOperatorXML(const rtl::OUString sTempOperator, ScQueryOp& aFilterOperator, sal_Bool& bUseRegularExpressions,
double& dVal) const
{
- bUseRegularExpressions = sal_False;
+ bUseRegularExpressions = false;
if (IsXMLToken(sTempOperator, XML_MATCH))
{
bUseRegularExpressions = sal_True;
@@ -766,7 +766,7 @@ void ScXMLDPConditionContext::EndElement()
{
aFilterField.nVal = sConditionValue.toDouble();
*aFilterField.pStr = sConditionValue;
- aFilterField.bQueryByString = sal_False;
+ aFilterField.bQueryByString = false;
if (dVal != 0.0)
{
aFilterField.nVal = dVal;
diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx
index 7bd5c1f331d3..4d0495ba341f 100644
--- a/sc/source/filter/xml/xmlfilti.hxx
+++ b/sc/source/filter/xml/xmlfilti.hxx
@@ -66,7 +66,7 @@ class ScXMLFilterContext : public SvXMLImportContext
public:
- ScXMLFilterContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLFilterContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -74,7 +74,7 @@ public:
virtual ~ScXMLFilterContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -101,7 +101,7 @@ class ScXMLAndContext : public SvXMLImportContext
public:
- ScXMLAndContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLAndContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -109,7 +109,7 @@ public:
virtual ~ScXMLAndContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -126,7 +126,7 @@ class ScXMLOrContext : public SvXMLImportContext
public:
- ScXMLOrContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLOrContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -134,7 +134,7 @@ public:
virtual ~ScXMLOrContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -157,7 +157,7 @@ class ScXMLConditionContext : public SvXMLImportContext
public:
- ScXMLConditionContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLConditionContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -165,7 +165,7 @@ public:
virtual ~ScXMLConditionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -200,7 +200,7 @@ class ScXMLDPFilterContext : public SvXMLImportContext
public:
- ScXMLDPFilterContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDPFilterContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -208,7 +208,7 @@ public:
virtual ~ScXMLDPFilterContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -234,7 +234,7 @@ class ScXMLDPAndContext : public SvXMLImportContext
public:
- ScXMLDPAndContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDPAndContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -242,7 +242,7 @@ public:
virtual ~ScXMLDPAndContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -259,7 +259,7 @@ class ScXMLDPOrContext : public SvXMLImportContext
public:
- ScXMLDPOrContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDPOrContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -267,7 +267,7 @@ public:
virtual ~ScXMLDPOrContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -290,7 +290,7 @@ class ScXMLDPConditionContext : public SvXMLImportContext
public:
- ScXMLDPConditionContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLDPConditionContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -298,7 +298,7 @@ public:
virtual ~ScXMLDPConditionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index ec9715c7131a..388952a75701 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -71,10 +71,10 @@ void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8
sal::static_int_cast<sal_Int16>(pFont->GetPitch()),
pFont->GetCharSet() );
}
- sal_uInt16 nItems(pItemPool->GetItemCount( nWhichId ));
- for( sal_uInt16 j = 0; j < nItems; ++j )
+ sal_uInt32 nItems(pItemPool->GetItemCount2( nWhichId ));
+ for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = pItemPool->GetItem( nWhichId, j ) ) )
+ if( 0 != (pItem = pItemPool->GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont((const SvxFontItem *)pItem);
Add( pFont->GetFamilyName(), pFont->GetStyleName(),
@@ -100,7 +100,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(
const SfxItemPool* pItemPool(rExportP.GetDocument() ? rExportP.GetDocument()->GetPool() : NULL);
AddFontItems(aWhichIds, 3, pItemPool, sal_True);
const SfxItemPool* pEditPool(rExportP.GetDocument()->GetEditPool());
- AddFontItems(aEditWhichIds, 3, pEditPool, sal_False);
+ AddFontItems(aEditWhichIds, 3, pEditPool, false);
SfxStyleSheetIterator* pItr(rExportP.GetDocument() ? rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SFX_STYLE_FAMILY_PAGE, 0xFFFF) : NULL);
if(pItr)
@@ -114,29 +114,29 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(
for (sal_uInt8 j = 0; j < 4; ++j)
{
sal_uInt16 nPageWhichId(aPageWhichIds[j]);
- sal_uInt16 nPageHFItems(rPagePool.GetItemCount(nPageWhichId));
+ sal_uInt32 nPageHFItems(rPagePool.GetItemCount2(nPageWhichId));
const ScPageHFItem* pPageItem;
- for (sal_uInt16 k = 0; k < nPageHFItems; ++k)
+ for (sal_uInt32 k = 0; k < nPageHFItems; ++k)
{
- if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem(nPageWhichId, k))))
+ if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem2(nPageWhichId, k))))
{
const EditTextObject* pLeftArea(pPageItem->GetLeftArea());
if (pLeftArea)
{
aEditEngine.SetText(*pLeftArea);
- AddFontItems(aEditWhichIds, 3, pPageEditPool, sal_False);
+ AddFontItems(aEditWhichIds, 3, pPageEditPool, false);
}
const EditTextObject* pCenterArea(pPageItem->GetCenterArea());
if (pCenterArea)
{
aEditEngine.SetText(*pCenterArea);
- AddFontItems(aEditWhichIds, 3, pPageEditPool, sal_False);
+ AddFontItems(aEditWhichIds, 3, pPageEditPool, false);
}
const EditTextObject* pRightArea(pPageItem->GetRightArea());
if (pRightArea)
{
aEditEngine.SetText(*pRightArea);
- AddFontItems(aEditWhichIds, 3, pPageEditPool, sal_False);
+ AddFontItems(aEditWhichIds, 3, pPageEditPool, false);
}
}
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 6bb16ba75892..929b4acd83a0 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -267,17 +267,17 @@ protected:
public:
ScXMLDocContext_Impl( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList );
virtual ~ScXMLDocContext_Impl();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const rtl::OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList );
};
-ScXMLDocContext_Impl::ScXMLDocContext_Impl( ScXMLImport& rImport, USHORT nPrfx,
+ScXMLDocContext_Impl::ScXMLDocContext_Impl( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */ ) :
SvXMLImportContext( rImport, nPrfx, rLName )
@@ -295,7 +295,7 @@ class ScXMLFlatDocContext_Impl
{
public:
ScXMLFlatDocContext_Impl( ScXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder);
@@ -303,12 +303,12 @@ public:
virtual ~ScXMLFlatDocContext_Impl();
virtual SvXMLImportContext *CreateChildContext(
- USHORT i_nPrefix, const OUString& i_rLocalName,
+ sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
};
ScXMLFlatDocContext_Impl::ScXMLFlatDocContext_Impl( ScXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) :
@@ -323,7 +323,7 @@ ScXMLFlatDocContext_Impl::~ScXMLFlatDocContext_Impl() { }
SvXMLImportContext *ScXMLFlatDocContext_Impl::CreateChildContext(
- USHORT i_nPrefix, const OUString& i_rLocalName,
+ sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList)
{
// behave like meta base class iff we encounter office:meta
@@ -374,7 +374,7 @@ SvXMLImportContext *ScXMLBodyContext_Impl::CreateChildContext(
return GetScImport().CreateBodyContext( rLocalName, xAttrList );
}
-SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix,
const rtl::OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList )
{
@@ -389,7 +389,7 @@ SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( USHORT nPrefix,
break;
case XML_TOK_DOC_STYLES:
if (GetScImport().getImportFlags() & IMPORT_STYLES)
- pContext = GetScImport().CreateStylesContext( rLocalName, xAttrList, sal_False);
+ pContext = GetScImport().CreateStylesContext( rLocalName, xAttrList, false);
break;
case XML_TOK_DOC_AUTOSTYLES:
if (GetScImport().getImportFlags() & IMPORT_AUTOSTYLES)
@@ -1625,7 +1625,7 @@ const SvXMLTokenMap& ScXMLImport::GetConsolidationAttrTokenMap()
}
-SvXMLImportContext *ScXMLImport::CreateContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList )
{
@@ -1756,11 +1756,11 @@ ScXMLImport::ScXMLImport(
nStyleFamilyMask( 0 ),
nPrevCellType(0),
bLoadDoc( sal_True ),
- bRemoveLastChar(sal_False),
- bNullDateSetted(sal_False),
- bSelfImportingXMLSet(sal_False),
- bLatinDefaultStyle(sal_False),
- bFromWrapper(sal_False)
+ bRemoveLastChar(false),
+ bNullDateSetted(false),
+ bSelfImportingXMLSet(false),
+ bLatinDefaultStyle(false),
+ bFromWrapper(false)
{
pStylesImportHelper = new ScMyStylesImportHelper(*this);
@@ -1892,7 +1892,7 @@ ScXMLImport::~ScXMLImport() throw()
// ---------------------------------------------------------------------
-SvXMLImportContext *ScXMLImport::CreateFontDeclsContext(const USHORT nPrefix, const ::rtl::OUString& rLocalName,
+SvXMLImportContext *ScXMLImport::CreateFontDeclsContext(const sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList)
{
XMLFontStylesContext *pFSContext = new XMLFontStylesContext(
@@ -2013,7 +2013,7 @@ sal_Bool ScXMLImport::GetValidation(const rtl::OUString& sName, ScMyImportValida
{
if (pValidations)
{
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
ScMyImportValidations::iterator aItr(pValidations->begin());
ScMyImportValidations::iterator aEndItr(pValidations->end());
while(aItr != aEndItr && !bFound)
@@ -2032,7 +2032,7 @@ sal_Bool ScXMLImport::GetValidation(const rtl::OUString& sName, ScMyImportValida
aValidation = *aItr;
return bFound;
}
- return sal_False;
+ return false;
}
ScXMLChangeTrackingImportHelper* ScXMLImport::GetChangeTrackingImportHelper()
@@ -2080,7 +2080,7 @@ void ScXMLImport::ExamineDefaultStyle()
aDecSep = aLocaleData.getNumDecimalSep();
}
- BYTE nScript = pDoc->GetStringScriptType( aDecSep );
+ sal_uInt8 nScript = pDoc->GetStringScriptType( aDecSep );
if ( nScript == 0 || nScript == SCRIPTTYPE_LATIN )
bLatinDefaultStyle = sal_True;
}
@@ -2231,6 +2231,7 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa
{
sal_Int32 nCount(aConfigProps.getLength());
rtl::OUString sCTName(RTL_CONSTASCII_USTRINGPARAM("TrackedChangesProtectionKey"));
+ rtl::OUString sVBName(RTL_CONSTASCII_USTRINGPARAM("VBACompatibilityMode"));
rtl::OUString sSCName(RTL_CONSTASCII_USTRINGPARAM("ScriptConfiguration"));
for (sal_Int32 i = nCount - 1; i >= 0; --i)
{
@@ -2255,26 +2256,15 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa
}
}
}
- else if (aConfigProps[i].Name == sSCName)
+ // store the following items for later use (after document is loaded)
+ else if ((aConfigProps[i].Name == sVBName) || (aConfigProps[i].Name == sSCName))
{
- uno::Type aType = aConfigProps[i].Value.getValueType();
- uno::Reference<beans::XPropertySet> xImportInfo =
- getImportInfo();
-
- if (xImportInfo.is() &&
- (aType.equals(getCppuType(
- (uno::Reference<container::XNameContainer> *)0 ) ) ||
- aType.equals(getCppuType(
- (uno::Reference<container::XNameAccess> *)0 ) ) ) )
+ uno::Reference< beans::XPropertySet > xImportInfo = getImportInfo();
+ if (xImportInfo.is())
{
- uno::Reference< beans::XPropertySetInfo > xPropertySetInfo =
- xImportInfo->getPropertySetInfo();
- if (xPropertySetInfo.is() &&
- xPropertySetInfo->hasPropertyByName(sSCName) )
- {
- xImportInfo->setPropertyValue(sSCName,
- aConfigProps[i].Value );
- }
+ uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = xImportInfo->getPropertySetInfo();
+ if (xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName(aConfigProps[i].Name))
+ xImportInfo->setPropertyValue( aConfigProps[i].Name, aConfigProps[i].Value );
}
}
}
@@ -2379,7 +2369,7 @@ sal_Bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const rtl:
}
}
}
- return sal_False;
+ return false;
}
void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties,
@@ -2462,7 +2452,7 @@ void ScXMLImport::AddStyleRange(const table::CellRangeAddress& rCellRange)
DBG_ASSERT(xSheetCellRanges.is(), "didn't get SheetCellRanges");
}
- xSheetCellRanges->addRangeAddress(rCellRange, sal_False);
+ xSheetCellRanges->addRangeAddress(rCellRange, false);
}
void ScXMLImport::SetStyleToRanges()
@@ -2740,7 +2730,7 @@ public:
mxPropSet(xPropSet), maPropName(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_MODIFY_BROADCAST))
{
uno::Any any;
- any <<= sal_False;
+ any <<= false;
mxPropSet->setPropertyValue(maPropName, any);
}
@@ -2915,7 +2905,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; ++nTab)
if (!pSheetData->IsSheetBlocked( nTab ))
- pDoc->SetStreamValid( nTab, TRUE );
+ pDoc->SetStreamValid( nTab, sal_True );
}
aTables.UpdateRowHeights();
@@ -3059,7 +3049,7 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar(
{
// parse the attribute value, extract namespace ID, literal namespace, and formula string
rFormulaNmsp = OUString();
- sal_uInt16 nNsId = GetNamespaceMap()._GetKeyByAttrName( rAttrValue, 0, &rFormula, &rFormulaNmsp, sal_False );
+ sal_uInt16 nNsId = GetNamespaceMap()._GetKeyByAttrName( rAttrValue, 0, &rFormula, &rFormulaNmsp, false );
// check if we have an ODF formula namespace
if( !bRestrictToExternalNmsp ) switch( nNsId )
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 0793a2adb841..5198f72c8b36 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -793,7 +793,7 @@ protected:
// This method is called after the namespace map has been updated, but
// before a context for the current element has been pushed.
- virtual SvXMLImportContext *CreateContext(USHORT nPrefix,
+ virtual SvXMLImportContext *CreateContext(sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -812,7 +812,7 @@ public:
// the root element (i.e. office:document-meta)
SvXMLImportContext *CreateMetaContext(
const ::rtl::OUString& rLocalName );
- SvXMLImportContext *CreateFontDeclsContext(const USHORT nPrefix, const ::rtl::OUString& rLocalName,
+ SvXMLImportContext *CreateFontDeclsContext(const sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
SvXMLImportContext *CreateScriptContext(
const ::rtl::OUString& rLocalName );
@@ -1030,7 +1030,7 @@ public:
The value of the processed formula attribute.
@param bRestrictToExternalNmsp
- If set to TRUE, only namespaces of external formula grammars will
+ If set to sal_True, only namespaces of external formula grammars will
be recognized. Internal namespace prefixes (e.g. 'oooc:' or 'of:'
will be considered to be part of the formula, e.g. an expression
with range operator.
diff --git a/sc/source/filter/xml/xmllabri.cxx b/sc/source/filter/xml/xmllabri.cxx
index 8ba63c32d308..e0aadfc9a384 100644
--- a/sc/source/filter/xml/xmllabri.cxx
+++ b/sc/source/filter/xml/xmllabri.cxx
@@ -45,7 +45,7 @@ using namespace xmloff::token;
ScXMLLabelRangesContext::ScXMLLabelRangesContext(
ScXMLImport& rImport,
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& /* xAttrList */ ):
SvXMLImportContext( rImport, nPrefix, rLName )
@@ -59,7 +59,7 @@ ScXMLLabelRangesContext::~ScXMLLabelRangesContext()
}
SvXMLImportContext* ScXMLLabelRangesContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
@@ -87,11 +87,11 @@ void ScXMLLabelRangesContext::EndElement()
ScXMLLabelRangeContext::ScXMLLabelRangeContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
- bColumnOrientation( sal_False )
+ bColumnOrientation( false )
{
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
const SvXMLTokenMap& rAttrTokenMap(GetScImport().GetLabelRangeAttrTokenMap());
@@ -101,7 +101,7 @@ ScXMLLabelRangeContext::ScXMLLabelRangeContext(
const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex ));
const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex ));
OUString aLocalName;
- USHORT nPrefix (GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ));
+ sal_uInt16 nPrefix (GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ));
switch( rAttrTokenMap.Get( nPrefix, aLocalName ) )
{
@@ -123,7 +123,7 @@ ScXMLLabelRangeContext::~ScXMLLabelRangeContext()
}
SvXMLImportContext* ScXMLLabelRangeContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& /* xAttrList */ )
{
diff --git a/sc/source/filter/xml/xmllabri.hxx b/sc/source/filter/xml/xmllabri.hxx
index 2876da98b871..7e325b93eb3c 100644
--- a/sc/source/filter/xml/xmllabri.hxx
+++ b/sc/source/filter/xml/xmllabri.hxx
@@ -44,14 +44,14 @@ private:
public:
ScXMLLabelRangesContext(
ScXMLImport& rImport,
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList
);
virtual ~ScXMLLabelRangesContext();
virtual SvXMLImportContext* CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList
);
@@ -74,14 +74,14 @@ private:
public:
ScXMLLabelRangeContext(
ScXMLImport& rImport,
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList
);
virtual ~ScXMLLabelRangeContext();
virtual SvXMLImportContext* CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList
);
diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx
index 9748058e4be1..d3b2f5ace852 100644
--- a/sc/source/filter/xml/xmlnexpi.cxx
+++ b/sc/source/filter/xml/xmlnexpi.cxx
@@ -48,7 +48,7 @@ using namespace com::sun::star;
//------------------------------------------------------------------
ScXMLNamedExpressionsContext::ScXMLNamedExpressionsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) :
@@ -62,7 +62,7 @@ ScXMLNamedExpressionsContext::~ScXMLNamedExpressionsContext()
GetScImport().UnlockSolarMutex();
}
-SvXMLImportContext *ScXMLNamedExpressionsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLNamedExpressionsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -99,7 +99,7 @@ void ScXMLNamedExpressionsContext::EndElement()
}
ScXMLNamedRangeContext::ScXMLNamedRangeContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList) :
@@ -117,7 +117,7 @@ ScXMLNamedRangeContext::ScXMLNamedRangeContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -145,7 +145,7 @@ ScXMLNamedRangeContext::ScXMLNamedRangeContext( ScXMLImport& rImport,
break;
}
}
- pNamedExpression->bIsExpression = sal_False;
+ pNamedExpression->bIsExpression = false;
GetScImport().AddNamedExpression(pNamedExpression);
}
@@ -153,7 +153,7 @@ ScXMLNamedRangeContext::~ScXMLNamedRangeContext()
{
}
-SvXMLImportContext *ScXMLNamedRangeContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLNamedRangeContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
@@ -166,7 +166,7 @@ void ScXMLNamedRangeContext::EndElement()
}
ScXMLNamedExpressionContext::ScXMLNamedExpressionContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList) :
@@ -179,7 +179,7 @@ ScXMLNamedExpressionContext::ScXMLNamedExpressionContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -212,7 +212,7 @@ ScXMLNamedExpressionContext::~ScXMLNamedExpressionContext()
{
}
-SvXMLImportContext *ScXMLNamedExpressionContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLNamedExpressionContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx
index 2e66030d44c5..4f0a68e321e1 100644
--- a/sc/source/filter/xml/xmlnexpi.hxx
+++ b/sc/source/filter/xml/xmlnexpi.hxx
@@ -40,14 +40,14 @@ class ScXMLNamedExpressionsContext : public SvXMLImportContext
public:
- ScXMLNamedExpressionsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLNamedExpressionsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLNamedExpressionsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -62,14 +62,14 @@ class ScXMLNamedRangeContext : public SvXMLImportContext
public:
- ScXMLNamedRangeContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLNamedRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLNamedRangeContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -84,14 +84,14 @@ class ScXMLNamedExpressionContext : public SvXMLImportContext
public:
- ScXMLNamedExpressionContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLNamedExpressionContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList);
virtual ~ScXMLNamedExpressionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index aa0e0e367326..b36b2f812d46 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -65,14 +65,14 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
sVisibility(GetXMLToken(XML_VISIBLE)),
nRepeatedRows(1),
- bHasCell(sal_False)
+ bHasCell(false)
{
rtl::OUString sCellStyleName;
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
@@ -122,7 +122,7 @@ ScXMLTableRowContext::~ScXMLTableRowContext()
{
}
-SvXMLImportContext *ScXMLTableRowContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableRowContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -137,7 +137,7 @@ SvXMLImportContext *ScXMLTableRowContext::CreateChildContext( USHORT nPrefix,
{
bHasCell = sal_True;
pContext = new ScXMLTableRowCellContext( GetScImport(), nPrefix,
- rLName, xAttrList, sal_False, nRepeatedRows
+ rLName, xAttrList, false, nRepeatedRows
//this
);
}
@@ -209,14 +209,14 @@ void ScXMLTableRowContext::EndElement()
}
}
sal_Bool bVisible (sal_True);
- sal_Bool bFiltered (sal_False);
+ sal_Bool bFiltered (false);
if (IsXMLToken(sVisibility, XML_COLLAPSE))
{
- bVisible = sal_False;
+ bVisible = false;
}
else if (IsXMLToken(sVisibility, XML_FILTER))
{
- bVisible = sal_False;
+ bVisible = false;
bFiltered = sal_True;
}
if (!bVisible)
@@ -230,7 +230,7 @@ void ScXMLTableRowContext::EndElement()
}
ScXMLTableRowsContext::ScXMLTableRowsContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -273,7 +273,7 @@ ScXMLTableRowsContext::~ScXMLTableRowsContext()
{
}
-SvXMLImportContext *ScXMLTableRowsContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableRowsContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -286,17 +286,17 @@ SvXMLImportContext *ScXMLTableRowsContext::CreateChildContext( USHORT nPrefix,
case XML_TOK_TABLE_ROWS_ROW_GROUP:
pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_True );
+ false, sal_True );
break;
case XML_TOK_TABLE_ROWS_HEADER_ROWS:
pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_True, sal_False );
+ sal_True, false );
break;
case XML_TOK_TABLE_ROWS_ROWS:
pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_False );
+ false, false );
break;
case XML_TOK_TABLE_ROWS_ROW:
pContext = new ScXMLTableRowContext( GetScImport(), nPrefix,
diff --git a/sc/source/filter/xml/xmlrowi.hxx b/sc/source/filter/xml/xmlrowi.hxx
index f72618d0e9ef..c41644bcf041 100644
--- a/sc/source/filter/xml/xmlrowi.hxx
+++ b/sc/source/filter/xml/xmlrowi.hxx
@@ -45,14 +45,14 @@ class ScXMLTableRowContext : public SvXMLImportContext
public:
- ScXMLTableRowContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableRowContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
virtual ~ScXMLTableRowContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -75,7 +75,7 @@ class ScXMLTableRowsContext : public SvXMLImportContext
public:
- ScXMLTableRowsContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableRowsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -83,7 +83,7 @@ public:
virtual ~ScXMLTableRowsContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx
index f8ae7c9d64fb..b20d60bc74f5 100644
--- a/sc/source/filter/xml/xmlsceni.cxx
+++ b/sc/source/filter/xml/xmlsceni.cxx
@@ -56,7 +56,7 @@ using rtl::OUString;
ScXMLTableScenarioContext::ScXMLTableScenarioContext(
ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList ):
SvXMLImportContext( rImport, nPrfx, rLName ),
@@ -65,8 +65,8 @@ ScXMLTableScenarioContext::ScXMLTableScenarioContext(
bCopyBack( sal_True ),
bCopyStyles( sal_True ),
bCopyFormulas( sal_True ),
- bIsActive( sal_False ),
- bProtected( sal_False )
+ bIsActive( false ),
+ bProtected( false )
{
rImport.LockSolarMutex();
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
@@ -75,7 +75,7 @@ ScXMLTableScenarioContext::ScXMLTableScenarioContext(
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -137,7 +137,7 @@ ScXMLTableScenarioContext::~ScXMLTableScenarioContext()
}
SvXMLImportContext *ScXMLTableScenarioContext::CreateChildContext(
- USHORT nPrefix,
+ sal_uInt16 nPrefix,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& /* xAttrList */ )
{
@@ -150,8 +150,8 @@ void ScXMLTableScenarioContext::EndElement()
ScDocument* pDoc(GetScImport().GetDocument());
if (pDoc)
{
- pDoc->SetScenario( nCurrTable, TRUE );
- USHORT nFlags( 0 );
+ pDoc->SetScenario( nCurrTable, sal_True );
+ sal_uInt16 nFlags( 0 );
if( bDisplayBorder )
nFlags |= SC_SCENARIO_SHOWFRAME;
if( bCopyBack )
diff --git a/sc/source/filter/xml/xmlsceni.hxx b/sc/source/filter/xml/xmlsceni.hxx
index bec95988d72d..f6dd8d74b09b 100644
--- a/sc/source/filter/xml/xmlsceni.hxx
+++ b/sc/source/filter/xml/xmlsceni.hxx
@@ -53,14 +53,14 @@ private:
public:
- ScXMLTableScenarioContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableScenarioContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
virtual ~ScXMLTableScenarioContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index c71e4c38c40c..0826b58313b1 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -54,7 +54,7 @@ using namespace xmloff::token;
//------------------------------------------------------------------
ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -65,10 +65,10 @@ ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport,
sLanguage(),
sAlgorithm(),
nUserListIndex(0),
- bCopyOutputData(sal_False),
+ bCopyOutputData(false),
bBindFormatsToContent(sal_True),
- bIsCaseSensitive(sal_False),
- bEnabledUserList(sal_False)
+ bIsCaseSensitive(false),
+ bEnabledUserList(false)
{
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
const SvXMLTokenMap& rAttrTokenMap(GetScImport().GetSortAttrTokenMap());
@@ -76,7 +76,7 @@ ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -120,7 +120,7 @@ ScXMLSortContext::~ScXMLSortContext()
{
}
-SvXMLImportContext *ScXMLSortContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSortContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -192,7 +192,7 @@ void ScXMLSortContext::AddSortField(const rtl::OUString& sFieldNumber, const rtl
if (IsXMLToken(sOrder, XML_ASCENDING))
aSortField.SortAscending = sal_True;
else
- aSortField.SortAscending = sal_False;
+ aSortField.SortAscending = false;
if (sDataType.getLength() > 8)
{
rtl::OUString sTemp = sDataType.copy(0, 8);
@@ -220,7 +220,7 @@ void ScXMLSortContext::AddSortField(const rtl::OUString& sFieldNumber, const rtl
}
ScXMLSortByContext::ScXMLSortByContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -236,7 +236,7 @@ ScXMLSortByContext::ScXMLSortByContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -265,7 +265,7 @@ ScXMLSortByContext::~ScXMLSortByContext()
{
}
-SvXMLImportContext *ScXMLSortByContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLSortByContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ )
diff --git a/sc/source/filter/xml/xmlsorti.hxx b/sc/source/filter/xml/xmlsorti.hxx
index 27ec77c89226..7ccc82053905 100644
--- a/sc/source/filter/xml/xmlsorti.hxx
+++ b/sc/source/filter/xml/xmlsorti.hxx
@@ -57,7 +57,7 @@ class ScXMLSortContext : public SvXMLImportContext
public:
- ScXMLSortContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSortContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -65,7 +65,7 @@ public:
virtual ~ScXMLSortContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -88,7 +88,7 @@ class ScXMLSortByContext : public SvXMLImportContext
public:
- ScXMLSortByContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLSortByContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -96,7 +96,7 @@ public:
virtual ~ScXMLSortByContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index cb6c4f88c63d..57ab9747228a 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -942,7 +942,7 @@ bool XmlScPropHdl_CellProtection::equals(
(aCellProtection1.IsLocked == aCellProtection2.IsLocked) &&
(aCellProtection1.IsFormulaHidden == aCellProtection2.IsFormulaHidden));
}
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_CellProtection::importXML(
@@ -950,16 +950,16 @@ sal_Bool XmlScPropHdl_CellProtection::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
util::CellProtection aCellProtection;
- sal_Bool bDefault(sal_False);
+ sal_Bool bDefault(false);
if (!rValue.hasValue())
{
- aCellProtection.IsHidden = sal_False;
+ aCellProtection.IsHidden = false;
aCellProtection.IsLocked = sal_True;
- aCellProtection.IsFormulaHidden = sal_False;
- aCellProtection.IsPrintHidden = sal_False;
+ aCellProtection.IsFormulaHidden = false;
+ aCellProtection.IsPrintHidden = false;
bDefault = sal_True;
}
if ((rValue >>= aCellProtection) || bDefault)
@@ -977,9 +977,9 @@ sal_Bool XmlScPropHdl_CellProtection::importXML(
++i;
rtl::OUString sFirst(rStrImpValue.copy(0, i));
rtl::OUString sSecond(rStrImpValue.copy(i + 1));
- aCellProtection.IsFormulaHidden = sal_False;
- aCellProtection.IsHidden = sal_False;
- aCellProtection.IsLocked = sal_False;
+ aCellProtection.IsFormulaHidden = false;
+ aCellProtection.IsHidden = false;
+ aCellProtection.IsLocked = false;
if ((IsXMLToken(sFirst, XML_PROTECTED)) || (IsXMLToken(sSecond, XML_PROTECTED)))
aCellProtection.IsLocked = sal_True;
if ((IsXMLToken(sFirst, XML_FORMULA_HIDDEN)) || (IsXMLToken(sSecond, XML_FORMULA_HIDDEN)))
@@ -990,16 +990,16 @@ sal_Bool XmlScPropHdl_CellProtection::importXML(
else
{
aCellProtection.IsFormulaHidden = sal_True;
- aCellProtection.IsHidden = sal_False;
- aCellProtection.IsLocked = sal_False;
+ aCellProtection.IsHidden = false;
+ aCellProtection.IsLocked = false;
rValue <<= aCellProtection;
bRetval = sal_True;
}
}
else
{
- aCellProtection.IsFormulaHidden = sal_False;
- aCellProtection.IsHidden = sal_False;
+ aCellProtection.IsFormulaHidden = false;
+ aCellProtection.IsHidden = false;
aCellProtection.IsLocked = sal_True;
rValue <<= aCellProtection;
bRetval = sal_True;
@@ -1016,9 +1016,9 @@ sal_Bool XmlScPropHdl_CellProtection::importXML(
}
else
{
- aCellProtection.IsFormulaHidden = sal_False;
- aCellProtection.IsHidden = sal_False;
- aCellProtection.IsLocked = sal_False;
+ aCellProtection.IsFormulaHidden = false;
+ aCellProtection.IsHidden = false;
+ aCellProtection.IsLocked = false;
rValue <<= aCellProtection;
bRetval = sal_True;
}
@@ -1032,7 +1032,7 @@ sal_Bool XmlScPropHdl_CellProtection::exportXML(
const ::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
util::CellProtection aCellProtection;
if(rValue >>= aCellProtection)
@@ -1085,7 +1085,7 @@ bool XmlScPropHdl_PrintContent::equals(
{
return (aCellProtection1.IsPrintHidden == aCellProtection2.IsPrintHidden);
}
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_PrintContent::importXML(
@@ -1093,15 +1093,15 @@ sal_Bool XmlScPropHdl_PrintContent::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
util::CellProtection aCellProtection;
- sal_Bool bDefault(sal_False);
+ sal_Bool bDefault(false);
if (!rValue.hasValue())
{
- aCellProtection.IsHidden = sal_False;
+ aCellProtection.IsHidden = false;
aCellProtection.IsLocked = sal_True;
- aCellProtection.IsFormulaHidden = sal_False;
- aCellProtection.IsPrintHidden = sal_False;
+ aCellProtection.IsFormulaHidden = false;
+ aCellProtection.IsPrintHidden = false;
bDefault = sal_True;
}
if ((rValue >>= aCellProtection) || bDefault)
@@ -1123,7 +1123,7 @@ sal_Bool XmlScPropHdl_PrintContent::exportXML(
const ::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
util::CellProtection aCellProtection;
if(rValue >>= aCellProtection)
@@ -1150,7 +1150,7 @@ bool XmlScPropHdl_JustifyMethod::equals(
if((r1 >>= nVal1) && (r2 >>= nVal2))
return (nVal1 == nVal2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_JustifyMethod::importXML(
@@ -1224,7 +1224,7 @@ bool XmlScPropHdl_HoriJustify::equals(
if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
return (aHoriJustify1 == aHoriJustify2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_HoriJustify::importXML(
@@ -1232,7 +1232,7 @@ sal_Bool XmlScPropHdl_HoriJustify::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
table::CellHoriJustify nValue = table::CellHoriJustify_LEFT;
rValue >>= nValue;
@@ -1275,7 +1275,7 @@ sal_Bool XmlScPropHdl_HoriJustify::exportXML(
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
table::CellHoriJustify nVal;
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(rValue >>= nVal)
{
@@ -1328,7 +1328,7 @@ bool XmlScPropHdl_HoriJustifySource::equals(
if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
return (aHoriJustify1 == aHoriJustify2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_HoriJustifySource::importXML(
@@ -1336,7 +1336,7 @@ sal_Bool XmlScPropHdl_HoriJustifySource::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if (IsXMLToken(rStrImpValue, XML_FIX))
{
@@ -1358,7 +1358,7 @@ sal_Bool XmlScPropHdl_HoriJustifySource::exportXML(
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
table::CellHoriJustify nVal;
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(rValue >>= nVal)
{
@@ -1389,7 +1389,7 @@ bool XmlScPropHdl_HoriJustifyRepeat::equals(
if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2))
return (aHoriJustify1 == aHoriJustify2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_HoriJustifyRepeat::importXML(
@@ -1397,7 +1397,7 @@ sal_Bool XmlScPropHdl_HoriJustifyRepeat::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if (IsXMLToken(rStrImpValue, XML_FALSE))
{
@@ -1419,7 +1419,7 @@ sal_Bool XmlScPropHdl_HoriJustifyRepeat::exportXML(
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
table::CellHoriJustify nVal;
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(rValue >>= nVal)
{
@@ -1450,7 +1450,7 @@ bool XmlScPropHdl_Orientation::equals(
if((r1 >>= aOrientation1) && (r2 >>= aOrientation2))
return (aOrientation1 == aOrientation2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_Orientation::importXML(
@@ -1458,7 +1458,7 @@ sal_Bool XmlScPropHdl_Orientation::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
table::CellOrientation nValue;
if (IsXMLToken(rStrImpValue, XML_LTR))
@@ -1483,7 +1483,7 @@ sal_Bool XmlScPropHdl_Orientation::exportXML(
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
table::CellOrientation nVal;
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(rValue >>= nVal)
{
@@ -1519,7 +1519,7 @@ bool XmlScPropHdl_RotateAngle::equals(
if((r1 >>= aAngle1) && (r2 >>= aAngle2))
return (aAngle1 == aAngle2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_RotateAngle::importXML(
@@ -1527,7 +1527,7 @@ sal_Bool XmlScPropHdl_RotateAngle::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
sal_Int32 nValue;
if (SvXMLUnitConverter::convertNumber(nValue, rStrImpValue))
@@ -1546,7 +1546,7 @@ sal_Bool XmlScPropHdl_RotateAngle::exportXML(
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
sal_Int32 nVal = 0;
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(rValue >>= nVal)
{
@@ -1571,7 +1571,7 @@ bool XmlScPropHdl_RotateReference::equals(
if((r1 >>= aReference1) && (r2 >>= aReference2))
return (aReference1 == aReference2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_RotateReference::importXML(
@@ -1579,7 +1579,7 @@ sal_Bool XmlScPropHdl_RotateReference::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
sal_Int32 nValue;
if (IsXMLToken(rStrImpValue, XML_NONE))
@@ -1616,7 +1616,7 @@ sal_Bool XmlScPropHdl_RotateReference::exportXML(
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
sal_Int32 nVal(0);
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(rValue >>= nVal)
{
@@ -1668,7 +1668,7 @@ bool XmlScPropHdl_VertJustify::equals(
if((r1 >>= aReference1) && (r2 >>= aReference2))
return (aReference1 == aReference2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_VertJustify::importXML(
@@ -1676,7 +1676,7 @@ sal_Bool XmlScPropHdl_VertJustify::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
sal_Int32 nValue;
if (IsXMLToken(rStrImpValue, XML_AUTOMATIC))
@@ -1719,7 +1719,7 @@ sal_Bool XmlScPropHdl_VertJustify::exportXML(
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
sal_Int32 nVal(0);
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(rValue >>= nVal)
{
@@ -1777,7 +1777,7 @@ bool XmlScPropHdl_BreakBefore::equals(
if((r1 >>= aBreak1) && (r2 >>= aBreak2))
return (aBreak1 == aBreak2);
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_BreakBefore::importXML(
@@ -1785,12 +1785,12 @@ sal_Bool XmlScPropHdl_BreakBefore::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
sal_Bool bValue;
if (IsXMLToken(rStrImpValue, XML_AUTO))
{
- bValue = sal_False;
+ bValue = false;
rValue = ::cppu::bool2any(bValue);
bRetval = sal_True;
}
@@ -1809,7 +1809,7 @@ sal_Bool XmlScPropHdl_BreakBefore::exportXML(
const ::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if(::cppu::any2bool(rValue))
{
@@ -1841,7 +1841,7 @@ sal_Bool XmlScPropHdl_IsTextWrapped::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if (IsXMLToken(rStrImpValue, XML_WRAP))
{
@@ -1850,7 +1850,7 @@ sal_Bool XmlScPropHdl_IsTextWrapped::importXML(
}
else if (IsXMLToken(rStrImpValue, XML_NO_WRAP))
{
- rValue = ::cppu::bool2any(sal_False);
+ rValue = ::cppu::bool2any(false);
bRetval = sal_True;
}
@@ -1862,7 +1862,7 @@ sal_Bool XmlScPropHdl_IsTextWrapped::exportXML(
const ::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if (::cppu::any2bool(rValue))
{
@@ -1883,7 +1883,7 @@ sal_Bool XmlScPropHdl_IsEqual::importXML( const ::rtl::OUString& /* rStrImpValue
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
OSL_FAIL("should never be called");
- return sal_False;
+ return false;
}
sal_Bool XmlScPropHdl_IsEqual::exportXML( ::rtl::OUString& /* rStrExpValue */,
@@ -1891,7 +1891,7 @@ sal_Bool XmlScPropHdl_IsEqual::exportXML( ::rtl::OUString& /* rStrExpValue */,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
OSL_FAIL("should never be called");
- return sal_False;
+ return false;
}
XmlScPropHdl_Vertical::~XmlScPropHdl_Vertical()
@@ -1910,7 +1910,7 @@ sal_Bool XmlScPropHdl_Vertical::importXML(
::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if (IsXMLToken(rStrImpValue, XML_AUTO))
{
@@ -1919,7 +1919,7 @@ sal_Bool XmlScPropHdl_Vertical::importXML(
}
else if (IsXMLToken(rStrImpValue, XML_0))
{
- rValue = ::cppu::bool2any(sal_False);
+ rValue = ::cppu::bool2any(false);
bRetval = sal_True;
}
@@ -1931,7 +1931,7 @@ sal_Bool XmlScPropHdl_Vertical::exportXML(
const ::com::sun::star::uno::Any& rValue,
const SvXMLUnitConverter& /* rUnitConverter */ ) const
{
- sal_Bool bRetval(sal_False);
+ sal_Bool bRetval(false);
if (::cppu::any2bool(rValue))
{
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 796e63f9688d..2c7b753afc15 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -276,7 +276,7 @@ void ScXMLRowImportPropertyMapper::finished(::std::vector< XMLPropertyState >& r
}
else if (pHeight)
{
- rProperties.push_back(XMLPropertyState(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), ::cppu::bool2any( sal_False )));
+ rProperties.push_back(XMLPropertyState(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), ::cppu::bool2any( false )));
}
// don't access pointers to rProperties elements after push_back!
}
@@ -477,8 +477,8 @@ XMLTableStyleContext::XMLTableStyleContext( ScXMLImport& rImport,
pStyles(&rStyles),
nNumberFormat(-1),
nLastSheet(-1),
- bConditionalFormatCreated(sal_False),
- bParentSet(sal_False)
+ bConditionalFormatCreated(false),
+ bParentSet(false)
{
}
@@ -969,8 +969,8 @@ ScMasterPageContext::ScMasterPageContext( SvXMLImport& rImport,
const uno::Reference< XAttributeList > & xAttrList,
sal_Bool bOverwrite ) :
XMLTextMasterPageContext( rImport, nPrfx, rLName, xAttrList, bOverwrite ),
- bContainsRightHeader(sal_False),
- bContainsRightFooter(sal_False)
+ bContainsRightHeader(false),
+ bContainsRightFooter(false)
{
}
diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx
index f483e7734f25..9f69acca9d51 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -142,7 +142,7 @@ public:
XMLTableStyleContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
- SvXMLStylesContext& rStyles, sal_uInt16 nFamily, sal_Bool bDefaultStyle = sal_False );
+ SvXMLStylesContext& rStyles, sal_uInt16 nFamily, sal_Bool bDefaultStyle = false );
virtual ~XMLTableStyleContext();
virtual SvXMLImportContext *CreateChildContext(
@@ -316,7 +316,7 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList > & xAttrList,
SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
- sal_Bool bDefaultStyle = sal_False );
+ sal_Bool bDefaultStyle = false );
virtual ~ScCellTextStyleContext();
// overload FillPropertySet to store style information
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index 4e06948ece4f..0e7f7b221152 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -293,13 +293,13 @@ sal_Bool ScMyTables::IsMerged (const uno::Reference <table::XCellRange>& xCellRa
aCellAddress = xMergeCellAddress->getRangeAddress();
if (aCellAddress.StartColumn == nCol && aCellAddress.EndColumn == nCol &&
aCellAddress.StartRow == nRow && aCellAddress.EndRow == nRow)
- return sal_False;
+ return false;
else
return sal_True;
}
}
}
- return sal_False;
+ return false;
}
void ScMyTables::UnMerge()
@@ -313,7 +313,7 @@ void ScMyTables::UnMerge()
uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY);
if (xMergeable.is())
- xMergeable->merge(sal_False);
+ xMergeable->merge(false);
}
}
}
@@ -329,7 +329,7 @@ void ScMyTables::DoMerge(sal_Int32 nCount)
uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY);
if (xMergeable.is())
- xMergeable->merge(sal_False);
+ xMergeable->merge(false);
}
//merge
@@ -371,7 +371,7 @@ void ScMyTables::InsertRow()
uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY);
if (xMergeable.is())
- xMergeable->merge(sal_False);
+ xMergeable->merge(false);
}
//merge
@@ -445,7 +445,7 @@ void ScMyTables::InsertColumn()
uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY);
if (xMergeable.is())
- xMergeable->merge(sal_False);
+ xMergeable->merge(false);
aTempCellAddress = aCellAddress;
aTempCellAddress.StartColumn = aTempCellAddress.EndColumn + 1;
aTempCellAddress.EndColumn = aTempCellAddress.StartColumn;
@@ -615,9 +615,9 @@ void ScMyTables::UpdateRowHeights()
{
const SdrPage* pPage = pDrawLayer ? pDrawLayer->GetPage(nTab) : NULL;
if ( nTab == nVisible || ( pPage && pPage->GetObjCount() != 0 ) )
- aUpdateSheets.SelectTable( nTab, TRUE );
+ aUpdateSheets.SelectTable( nTab, sal_True );
else
- pDoc->SetPendingRowHeights( nTab, TRUE );
+ pDoc->SetPendingRowHeights( nTab, sal_True );
}
if (aUpdateSheets.GetSelectCount())
@@ -680,7 +680,7 @@ void ScMyTables::DeleteTable()
if (sCurrentName != sCurrentSheetName && rImport.GetDocument())
{
rImport.GetDocument()->RenameTab( static_cast<SCTAB>(nCurrentSheet),
- sCurrentSheetName, sal_False, sal_True);
+ sCurrentSheetName, false, sal_True);
}
}
}
@@ -776,12 +776,12 @@ void ScMyTables::AddMatrixRange(
sal_Bool ScMyTables::IsPartOfMatrix(sal_Int32 nColumn, sal_Int32 nRow)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (!aMatrixRangeList.empty())
{
ScMyMatrixRangeList::iterator aItr(aMatrixRangeList.begin());
ScMyMatrixRangeList::iterator aEndItr(aMatrixRangeList.end());
- sal_Bool bReady(sal_False);
+ sal_Bool bReady(false);
while(!bReady && aItr != aEndItr)
{
if (nCurrentSheet > aItr->aRange.Sheet)
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index a80093e5a0e0..cd78b8733d36 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -150,7 +150,7 @@ ScXMLExternalTabData::ScXMLExternalTabData() :
//------------------------------------------------------------------
ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
- USHORT nPrfx,
+ sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
@@ -159,7 +159,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
SvXMLImportContext( rImport, nPrfx, rLName ),
pExternalRefInfo(NULL),
nStartOffset(-1),
- bStartFormPage(sal_False),
+ bStartFormPage(false),
bPrintEntireSheet(sal_True)
{
// get start offset in file (if available)
@@ -176,7 +176,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
{
const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i ));
rtl::OUString aLocalName;
- USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName ));
const rtl::OUString& sValue(xAttrList->getValueByIndex( i ));
@@ -206,7 +206,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
case XML_TOK_TABLE_PRINT:
{
if (IsXMLToken(sValue, XML_FALSE))
- bPrintEntireSheet = sal_False;
+ bPrintEntireSheet = false;
}
break;
}
@@ -243,7 +243,7 @@ ScXMLTableContext::~ScXMLTableContext()
{
}
-SvXMLImportContext *ScXMLTableContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
@@ -282,17 +282,17 @@ SvXMLImportContext *ScXMLTableContext::CreateChildContext( USHORT nPrefix,
case XML_TOK_TABLE_COL_GROUP:
pContext = new ScXMLTableColsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_True );
+ false, sal_True );
break;
case XML_TOK_TABLE_HEADER_COLS:
pContext = new ScXMLTableColsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_True, sal_False );
+ sal_True, false );
break;
case XML_TOK_TABLE_COLS:
pContext = new ScXMLTableColsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_False );
+ false, false );
break;
case XML_TOK_TABLE_COL:
pContext = new ScXMLTableColContext( GetScImport(), nPrefix,
@@ -304,17 +304,17 @@ SvXMLImportContext *ScXMLTableContext::CreateChildContext( USHORT nPrefix,
case XML_TOK_TABLE_ROW_GROUP:
pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_True );
+ false, sal_True );
break;
case XML_TOK_TABLE_HEADER_ROWS:
pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_True, sal_False );
+ sal_True, false );
break;
case XML_TOK_TABLE_ROWS:
pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
rLName, xAttrList,
- sal_False, sal_False );
+ false, false );
break;
case XML_TOK_TABLE_ROW:
pContext = new ScXMLTableRowContext( GetScImport(), nPrefix,
@@ -381,7 +381,7 @@ void ScXMLTableContext::EndElement()
// Sheet has "print entire sheet" option by default. Remove it.
pDoc->ClearPrintRanges(nCurTab);
- ScOutlineTable* pOutlineTable(pDoc->GetOutlineTable(nCurTab, sal_False));
+ ScOutlineTable* pOutlineTable(pDoc->GetOutlineTable(nCurTab, false));
if (pOutlineTable)
{
ScOutlineArray* pColArray(pOutlineTable->GetColArray());
@@ -389,24 +389,24 @@ void ScXMLTableContext::EndElement()
sal_Int32 i;
for (i = 0; i < nDepth; ++i)
{
- sal_Int32 nCount(pColArray->GetCount(static_cast<USHORT>(i)));
+ sal_Int32 nCount(pColArray->GetCount(static_cast<sal_uInt16>(i)));
for (sal_Int32 j = 0; j < nCount; ++j)
{
- ScOutlineEntry* pEntry(pColArray->GetEntry(static_cast<USHORT>(i), static_cast<USHORT>(j)));
+ ScOutlineEntry* pEntry(pColArray->GetEntry(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j)));
if (pEntry->IsHidden())
- pColArray->SetVisibleBelow(static_cast<USHORT>(i), static_cast<USHORT>(j), sal_False);
+ pColArray->SetVisibleBelow(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j), false);
}
}
ScOutlineArray* pRowArray(pOutlineTable->GetRowArray());
nDepth = pRowArray->GetDepth();
for (i = 0; i < nDepth; ++i)
{
- sal_Int32 nCount(pRowArray->GetCount(static_cast<USHORT>(i)));
+ sal_Int32 nCount(pRowArray->GetCount(static_cast<sal_uInt16>(i)));
for (sal_Int32 j = 0; j < nCount; ++j)
{
- ScOutlineEntry* pEntry(pRowArray->GetEntry(static_cast<USHORT>(i), static_cast<USHORT>(j)));
+ ScOutlineEntry* pEntry(pRowArray->GetEntry(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j)));
if (pEntry->IsHidden())
- pRowArray->SetVisibleBelow(static_cast<USHORT>(i), static_cast<USHORT>(j), sal_False);
+ pRowArray->SetVisibleBelow(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j), false);
}
}
}
@@ -423,7 +423,7 @@ void ScXMLTableContext::EndElement()
}
GetScImport().GetTables().DeleteTable();
- GetScImport().ProgressBarIncrement(sal_False);
+ GetScImport().ProgressBarIncrement(false);
// store stream positions
if (!pExternalRefInfo.get() && nStartOffset >= 0 /* && nEndOffset >= 0 */)
@@ -443,7 +443,7 @@ ScXMLImport& ScXMLTableProtectionContext::GetScImport()
}
ScXMLTableProtectionContext::ScXMLTableProtectionContext(
- ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName,
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName,
const Reference<XAttributeList>& xAttrList ) :
SvXMLImportContext( rImport, nPrefix, rLName )
{
@@ -459,7 +459,7 @@ ScXMLTableProtectionContext::ScXMLTableProtectionContext(
const OUString aValue = xAttrList->getValueByIndex(i);
OUString aLocalName;
- USHORT nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ sal_uInt16 nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
aAttrName, &aLocalName);
switch (rAttrTokenMap.Get(nLocalPrefix, aLocalName))
@@ -485,7 +485,7 @@ ScXMLTableProtectionContext::~ScXMLTableProtectionContext()
}
SvXMLImportContext* ScXMLTableProtectionContext::CreateChildContext(
- USHORT /*nPrefix*/, const OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ )
+ sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ )
{
return NULL;
}
diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx
index db60f90c0c33..d3d7303d3203 100644
--- a/sc/source/filter/xml/xmltabi.hxx
+++ b/sc/source/filter/xml/xmltabi.hxx
@@ -59,16 +59,16 @@ class ScXMLTableContext : public SvXMLImportContext
public:
- ScXMLTableContext( ScXMLImport& rImport, USHORT nPrfx,
+ ScXMLTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList,
- const sal_Bool bTempIsSubTable = sal_False,
+ const sal_Bool bTempIsSubTable = false,
const sal_Int32 nSpannedCols = 0);
virtual ~ScXMLTableContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
@@ -83,14 +83,14 @@ class ScXMLTableProtectionContext : public SvXMLImportContext
ScXMLImport& GetScImport();
public:
- ScXMLTableProtectionContext( ScXMLImport& rImport, USHORT nPrefix,
+ ScXMLTableProtectionContext( ScXMLImport& rImport, sal_uInt16 nPrefix,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
virtual ~ScXMLTableProtectionContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index b3c052d9c05f..2bed48ed5d81 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -62,6 +62,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <svx/xmleohlp.hxx>
#include <rtl/logfile.hxx>
@@ -123,7 +124,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
if ( !xStorage.is() && pMedium )
xStorage = pMedium->GetStorage();
- sal_Bool bEncrypted = sal_False;
+ sal_Bool bEncrypted = false;
rtl::OUString sStream(sDocName);
if( xStorage.is() )
{
@@ -138,7 +139,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
sStream = sOldDocName;
}
else
- return sal_False;
+ return false;
aParserInput.aInputStream = xDocStream->getInputStream();
uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
@@ -207,7 +208,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
if ( aSaxEx.WrappedException >>= aTmp )
aSaxEx = aTmp;
else
- bTryChild = sal_False;
+ bTryChild = false;
}
packages::zip::ZipIOException aBrokenPackage;
@@ -321,7 +322,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
comphelper::getProcessServiceFactory();
DBG_ASSERT( xServiceFactory.is(), "got no service manager" );
if( !xServiceFactory.is() )
- return sal_False;
+ return false;
xml::sax::InputSource aParserInput;
if (pMedium)
@@ -336,7 +337,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" )) ));
DBG_ASSERT( xXMLParser.is(), "com.sun.star.xml.sax.Parser service missing" );
if( !xXMLParser.is() )
- return sal_False;
+ return false;
// get filter
SfxObjectShell* pObjSh = rDoc.GetDocumentShell();
@@ -357,6 +358,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
{ MAP_LEN( "StreamRelPath" ), 0, &::getCppuType( (rtl::OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
{ MAP_LEN( "StreamName" ), 0, &::getCppuType( (rtl::OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
{ MAP_LEN( "BuildId" ), 0, &::getCppuType( (OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
+ { MAP_LEN( "VBACompatibilityMode" ), 0, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
{ MAP_LEN( "ScriptConfiguration" ), 0, &::getCppuType((uno::Reference<container::XNameAccess> *)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
{ NULL, 0, 0, NULL, 0, 0 }
@@ -433,7 +435,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
: rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLMetaImporter")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("meta.xml")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Meta.xml")), aMetaArgs,
- sal_False);
+ false);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "meta import end" );
}
@@ -451,7 +453,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
if( pObjSh )
{
- pObjectHelper = SvXMLEmbeddedObjectHelper::Create(xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_READ, sal_False );
+ pObjectHelper = SvXMLEmbeddedObjectHelper::Create(xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_READ, false );
xObjectResolver = pObjectHelper;
}
}
@@ -478,7 +480,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
bOasis ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisSettingsImporter"))
: rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLSettingsImporter")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("settings.xml")),
- sEmpty, aSettingsArgs, sal_False);
+ sEmpty, aSettingsArgs, false);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "settings import end" );
}
@@ -526,7 +528,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
if (xStatusIndicator.is())
xStatusIndicator->end();
- sal_Bool bRet(sal_False);
+ sal_Bool bRet(false);
if (bStylesOnly)
{
if (nStylesRetval)
@@ -574,12 +576,30 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
uno::Reference <container::XNameAccess> xCodeNameAccess;
if( aAny >>= xCodeNameAccess )
XMLCodeNameProvider::set( xCodeNameAccess, &rDoc );
+
+ // VBA compatibility
+ bool bVBACompat = false;
+ if ( (xInfoSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("VBACompatibilityMode"))) >>= bVBACompat) && bVBACompat )
+ {
+ /* Set library container to VBA compatibility mode, this
+ forces loading the Basic project, which in turn creates the
+ VBA Globals object and does all related initialization. */
+ if ( xModelSet.is() ) try
+ {
+ uno::Reference< script::vba::XVBACompatibility > xVBACompat( xModelSet->getPropertyValue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicLibraries" ) ) ), uno::UNO_QUERY_THROW );
+ xVBACompat->setVBACompatibilityMode( sal_True );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
}
// Don't test bStylesRetval and bMetaRetval, because it could be an older file which not contain such streams
return bRet;//!bStylesOnly ? bDocRetval : bStylesRetval;
}
- return sal_False;
+ return false;
}
bool lcl_HasValidStream(ScDocument& rDoc)
@@ -607,7 +627,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
const rtl::OUString& sMediaType, const rtl::OUString& sComponentName,
const sal_Bool bPlainText, uno::Sequence<uno::Any>& aArgs, ScMySharedData*& pSharedData)
{
- sal_Bool bRet(sal_False);
+ sal_Bool bRet(false);
uno::Reference<io::XOutputStream> xOut;
uno::Reference<io::XStream> xStream;
@@ -627,7 +647,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
xSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny(sMediaType));
OUString aUseCommonPassPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") );
if (bPlainText)
- xSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), uno::makeAny(sal_False));
+ xSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), uno::makeAny(false));
// even plain stream should be encrypted in encrypted documents
xSet->setPropertyValue( aUseCommonPassPropName, uno::makeAny(sal_True) );
@@ -706,7 +726,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, FALSE);
+ rDoc.SetStreamValid(nTab, false);
}
}
else
@@ -725,13 +745,13 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
uno::Reference<lang::XMultiServiceFactory> xServiceFactory(comphelper::getProcessServiceFactory());
DBG_ASSERT( xServiceFactory.is(), "got no service manager" );
if( !xServiceFactory.is() )
- return sal_False;
+ return false;
uno::Reference<uno::XInterface> xWriter(xServiceFactory->createInstance(
OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ));
DBG_ASSERT( xWriter.is(), "com.sun.star.xml.sax.Writer service missing" );
if(!xWriter.is())
- return sal_False;
+ return false;
if ( !xStorage.is() && pMedium )
xStorage = pMedium->GetOutputStorage();
@@ -809,9 +829,9 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
}
sal_Bool bMetaRet(pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
- sal_Bool bStylesRet (sal_False);
- sal_Bool bDocRet(sal_False);
- sal_Bool bSettingsRet(sal_False);
+ sal_Bool bStylesRet (false);
+ sal_Bool bDocRet(false);
+ sal_Bool bSettingsRet(false);
ScMySharedData* pSharedData = NULL;
sal_Bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );
@@ -845,13 +865,13 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
if( xStorage.is() )
{
- pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, GRAPHICHELPER_MODE_WRITE, FALSE );
+ pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, GRAPHICHELPER_MODE_WRITE, false );
xGrfContainer = pGraphicHelper;
}
if( pObjSh )
{
- pObjectHelper = SvXMLEmbeddedObjectHelper::Create( xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_WRITE, sal_False );
+ pObjectHelper = SvXMLEmbeddedObjectHelper::Create( xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_WRITE, false );
xObjectResolver = pObjectHelper;
}
@@ -873,7 +893,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
sTextMediaType,
bOasis ? rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisStylesExporter"))
: rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLStylesExporter")),
- sal_False, aStylesArgs, pSharedData);
+ false, aStylesArgs, pSharedData);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "styles export end" );
}
@@ -897,7 +917,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
sTextMediaType,
bOasis ? rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisContentExporter"))
: rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLContentExporter")),
- sal_False, aDocArgs, pSharedData);
+ false, aDocArgs, pSharedData);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "content export end" );
}
@@ -925,7 +945,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
sTextMediaType,
bOasis ? rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisSettingsExporter"))
: rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLSettingsExporter")),
- sal_False, aSettingsArgs, pSharedData);
+ false, aSettingsArgs, pSharedData);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "settings export end" );
}
@@ -940,7 +960,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
// later: give string descriptor as parameter for doc type
- return sal_False;
+ return false;
}
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 23b41060e20c..e3ee6d51b165 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -174,7 +174,7 @@ Rectangle ScAccessibleCell::GetBoundingBox(void) const
mpViewShell->GetViewData()->GetMergeSizePixel(
maCellAddress.Col(), maCellAddress.Row(), nSizeX, nSizeY);
aCellRect.SetSize(Size(nSizeX, nSizeY));
- aCellRect.SetPos(mpViewShell->GetViewData()->GetScrPos(maCellAddress.Col(), maCellAddress.Row(), meSplitPos, TRUE));
+ aCellRect.SetPos(mpViewShell->GetViewData()->GetScrPos(maCellAddress.Col(), maCellAddress.Row(), meSplitPos, sal_True));
Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos);
if (pWindow)
@@ -343,7 +343,7 @@ sal_Bool ScAccessibleCell::IsOpaque(
sal_Bool ScAccessibleCell::IsSelected()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell && mpViewShell->GetViewData())
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -379,7 +379,7 @@ void ScAccessibleCell::FillDependends(utl::AccessibleRelationSetHelper* pRelatio
{
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
while ( !bFound && aIter.GetNextRef( aRef ) )
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 5e59d9b09eee..1428756f1ff4 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -93,7 +93,7 @@ sal_Bool SAL_CALL ScAccessibleCellBase::isVisible( )
bool bRowFiltered = mpDoc->RowFiltered(maCellAddress.Row(), maCellAddress.Tab());
if (bColHidden || bColFiltered || bRowHidden || bRowFiltered)
- bVisible = sal_False;
+ bVisible = false;
}
return bVisible;
}
@@ -260,7 +260,7 @@ sal_Bool SAL_CALL
SolarMutexGuard aGuard;
IsObjectValid();
double fValue = 0;
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if((aNumber >>= fValue) && mpDoc && mpDoc->GetDocumentShell())
{
uno::Reference<XAccessibleStateSet> xParentStates;
@@ -273,7 +273,7 @@ sal_Bool SAL_CALL
{
ScDocShell* pDocShell = (ScDocShell*) mpDoc->GetDocumentShell();
ScDocFunc aFunc(*pDocShell);
- bResult = aFunc.PutCell( maCellAddress, new ScValueCell(fValue), TRUE );
+ bResult = aFunc.PutCell( maCellAddress, new ScValueCell(fValue), sal_True );
}
}
return bResult;
@@ -333,7 +333,7 @@ uno::Sequence<sal_Int8> SAL_CALL
sal_Bool ScAccessibleCellBase::IsEditable(
const uno::Reference<XAccessibleStateSet>& rxParentStates)
{
- sal_Bool bEditable(sal_False);
+ sal_Bool bEditable(false);
if (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::EDITABLE))
bEditable = sal_True;
return bEditable;
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index d3233a2bea05..314fddb334c7 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -223,7 +223,7 @@ sal_Bool SAL_CALL ScAccessibleContextBase::isShowing( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- sal_Bool bShowing(sal_False);
+ sal_Bool bShowing(false);
if (mxParent.is())
{
uno::Reference<XAccessibleComponent> xParentComponent (mxParent->getAccessibleContext(), uno::UNO_QUERY);
@@ -497,7 +497,7 @@ sal_Bool SAL_CALL
for (int i=0; i<nLength; ++i, ++pServiceNames)
if (sServiceName == *pServiceNames)
return sal_True;
- return sal_False;
+ return false;
}
uno::Sequence< ::rtl::OUString> SAL_CALL
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 1ca0cfce5da1..b85aca92fa41 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -549,7 +549,7 @@ sal_Bool SAL_CALL ScAccessibleCsvRuler::setSelection( sal_Int32 /* nStartIndex *
throw( IndexOutOfBoundsException, RuntimeException )
{
ensureAlive();
- return sal_False;
+ return false;
}
OUString SAL_CALL ScAccessibleCsvRuler::getText() throw( RuntimeException )
@@ -744,7 +744,7 @@ sal_Bool SAL_CALL ScAccessibleCsvRuler::copyText( sal_Int32 /* nStartIndex */, s
throw( IndexOutOfBoundsException, RuntimeException )
{
ensureAlive();
- return sal_False;
+ return false;
}
@@ -1112,7 +1112,7 @@ sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleRowSelected( sal_Int32 /* nRo
throw( IndexOutOfBoundsException, RuntimeException )
{
ensureAlive();
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleColumnSelected( sal_Int32 nColumn )
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index f4915eee443d..36db896458c9 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -156,10 +156,10 @@ ScAccessibleDataPilotControl::ScAccessibleDataPilotControl(
ScDPFieldControlBase* pDPFieldWindow)
:
ScAccessibleContextBase(rxParent, AccessibleRole::GROUP_BOX),
- mpDPFieldWindow(pDPFieldWindow)
+ mpFieldWindow(pFieldWindow)
{
- if (mpDPFieldWindow)
- maChildren.resize(mpDPFieldWindow->GetFieldCount());
+ if (mpFieldWindow)
+ maChildren.resize(mpFieldWindow->GetFieldCount());
}
ScAccessibleDataPilotControl::~ScAccessibleDataPilotControl(void)
@@ -187,13 +187,13 @@ void SAL_CALL ScAccessibleDataPilotControl::disposing()
void ScAccessibleDataPilotControl::AddField(sal_Int32 nNewIndex)
{
- sal_Bool bAdded(sal_False);
- if (static_cast<sal_uInt32>(nNewIndex) == maChildren.size())
+ sal_Bool bAdded(false);
+ if (static_cast<size_t>(nNewIndex) == maChildren.size())
{
maChildren.push_back(AccessibleWeak());
bAdded = sal_True;
}
- else if (static_cast<sal_uInt32>(nNewIndex) < maChildren.size())
+ else if (static_cast<size_t>(nNewIndex) < maChildren.size())
{
::std::vector < AccessibleWeak >::iterator aItr = maChildren.begin() + nNewIndex;
maChildren.insert(aItr, AccessibleWeak());
@@ -230,10 +230,10 @@ void ScAccessibleDataPilotControl::AddField(sal_Int32 nNewIndex)
void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
{
- sal_Bool bRemoved(sal_False);
+ sal_Bool bRemoved(false);
uno::Reference< XAccessible > xTempAcc;
ScAccessibleDataPilotButton* pField = NULL;
- if (static_cast<sal_uInt32>(nOldIndex) < maChildren.size())
+ if (static_cast<size_t>(nOldIndex) < maChildren.size())
{
xTempAcc = getAccessibleChild(nOldIndex);
pField = maChildren[nOldIndex].pAcc;
@@ -274,8 +274,8 @@ void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
void ScAccessibleDataPilotControl::FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex)
{
- DBG_ASSERT(static_cast<sal_uInt32>(nOldIndex) < maChildren.size() &&
- static_cast<sal_uInt32>(nNewIndex) < maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(static_cast<size_t>(nOldIndex) < maChildren.size() &&
+ static_cast<size_t>(nNewIndex) < maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nOldIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nOldIndex].pAcc)
@@ -288,7 +288,7 @@ void ScAccessibleDataPilotControl::FieldFocusChange(sal_Int32 nOldIndex, sal_Int
void ScAccessibleDataPilotControl::FieldNameChange(sal_Int32 nIndex)
{
- DBG_ASSERT(static_cast<sal_uInt32>(nIndex) < maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(static_cast<size_t>(nIndex) < maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
@@ -297,11 +297,11 @@ void ScAccessibleDataPilotControl::FieldNameChange(sal_Int32 nIndex)
void ScAccessibleDataPilotControl::GotFocus()
{
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
- sal_Int32 nIndex(mpDPFieldWindow->GetSelectedField());
+ sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
maChildren[nIndex].pAcc->SetFocused();
@@ -310,11 +310,11 @@ void ScAccessibleDataPilotControl::GotFocus()
void ScAccessibleDataPilotControl::LostFocus()
{
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
- sal_Int32 nIndex(mpDPFieldWindow->GetSelectedField());
+ sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
maChildren[nIndex].pAcc->ResetFocused();
@@ -332,13 +332,13 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDataPilotControl::getAccessib
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
Point aAbsPoint(VCLPoint(rPoint));
Point aControlEdge(GetBoundingBoxOnScreen().TopLeft());
Point aRelPoint(aAbsPoint - aControlEdge);
- size_t nChildIndex(0);
- if (mpDPFieldWindow->GetFieldIndex(aRelPoint, nChildIndex))
+ size_t nChildIndex = mpFieldWindow->GetFieldIndex( aRelPoint );
+ if( nChildIndex != PIVOTFIELD_INVALID )
xAcc = getAccessibleChild(static_cast< long >( nChildIndex ));
}
}
@@ -356,8 +356,8 @@ void SAL_CALL ScAccessibleDataPilotControl::grabFocus( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- mpDPFieldWindow->GrabFocus();
+ if (mpFieldWindow)
+ mpFieldWindow->GrabFocus();
}
sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getForeground( )
@@ -366,9 +366,9 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getForeground( )
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- nColor = mpDPFieldWindow->GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+ nColor = mpFieldWindow->GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
}
return nColor;
}
@@ -379,7 +379,7 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getBackground( )
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
if (mpDPFieldWindow->GetFieldType() == TYPE_SELECT)
{
@@ -400,8 +400,8 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getAccessibleChildCount(void)
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetFieldCount();
+ if (mpFieldWindow)
+ return mpFieldWindow->GetFieldCount();
else
return 0;
}
@@ -412,17 +412,17 @@ uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotControl::getAccessibl
SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference<XAccessible> xAcc;
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- if (nIndex < 0 || static_cast< size_t >( nIndex ) >= mpDPFieldWindow->GetFieldCount())
+ if (nIndex < 0 || static_cast< size_t >( nIndex ) >= mpFieldWindow->GetFieldCount())
throw lang::IndexOutOfBoundsException();
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (!xTempAcc.is())
{
- maChildren[nIndex].pAcc = new ScAccessibleDataPilotButton(this, mpDPFieldWindow, nIndex);
+ maChildren[nIndex].pAcc = new ScAccessibleDataPilotButton(this, mpFieldWindow, nIndex);
xTempAcc = maChildren[nIndex].pAcc;
maChildren[nIndex].xWeakAcc = xTempAcc;
}
@@ -486,8 +486,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetDescription();
+ if (mpFieldWindow)
+ return mpFieldWindow->GetDescription();
return rtl::OUString();
}
@@ -497,8 +497,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetName();
+ if (mpFieldWindow)
+ return mpFieldWindow->GetName();
return rtl::OUString();
}
@@ -506,8 +506,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
Rectangle ScAccessibleDataPilotControl::GetBoundingBoxOnScreen(void) const
throw (uno::RuntimeException)
{
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetWindowExtentsRelative(NULL);
+ if (mpFieldWindow)
+ return mpFieldWindow->GetWindowExtentsRelative(NULL);
else
return Rectangle();
}
@@ -515,8 +515,8 @@ Rectangle ScAccessibleDataPilotControl::GetBoundingBoxOnScreen(void) const
Rectangle ScAccessibleDataPilotControl::GetBoundingBox(void) const
throw (uno::RuntimeException)
{
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetWindowExtentsRelative(mpDPFieldWindow->GetAccessibleParentWindow());
+ if (mpFieldWindow)
+ return mpFieldWindow->GetWindowExtentsRelative(mpFieldWindow->GetAccessibleParentWindow());
else
return Rectangle();
}
@@ -530,7 +530,7 @@ ScAccessibleDataPilotButton::ScAccessibleDataPilotButton(
ScDPFieldControlBase* pDPFieldWindow,
sal_Int32 nIndex)
: ScAccessibleContextBase(rxParent, AccessibleRole::PUSH_BUTTON),
- mpDPFieldWindow(pDPFieldWindow),
+ mpFieldWindow(pFieldWindow),
mnIndex(nIndex)
{
}
@@ -588,9 +588,9 @@ void SAL_CALL ScAccessibleDataPilotButton::grabFocus( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- mpDPFieldWindow->GrabFocusWithSel(getAccessibleIndexInParent());
+ mpFieldWindow->GrabFocusAndSelect(getAccessibleIndexInParent());
}
}
@@ -600,9 +600,9 @@ throw (uno::RuntimeException)
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- nColor = mpDPFieldWindow->GetSettings().GetStyleSettings().GetButtonTextColor().GetColor();
+ nColor = mpFieldWindow->GetSettings().GetStyleSettings().GetButtonTextColor().GetColor();
}
return nColor;
}
@@ -613,9 +613,9 @@ throw (uno::RuntimeException)
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- nColor = mpDPFieldWindow->GetSettings().GetStyleSettings().GetFaceColor().GetColor();
+ nColor = mpFieldWindow->GetSettings().GetStyleSettings().GetFaceColor().GetColor();
}
return nColor;
}
@@ -658,7 +658,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAcc
pStateSet->AddState(AccessibleStateType::ENABLED);
pStateSet->AddState(AccessibleStateType::OPAQUE);
pStateSet->AddState(AccessibleStateType::FOCUSABLE);
- if (mpDPFieldWindow && (sal::static_int_cast<sal_Int32>(mpDPFieldWindow->GetSelectedField()) == mnIndex))
+ if (mpFieldWindow && (sal::static_int_cast<sal_Int32>(mpFieldWindow->GetSelectedIndex()) == mnIndex))
pStateSet->AddState(AccessibleStateType::FOCUSED);
if (isShowing())
pStateSet->AddState(AccessibleStateType::SHOWING);
@@ -704,8 +704,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationI
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetFieldText(getAccessibleIndexInParent());
+ if (mpFieldWindow)
+ return mpFieldWindow->GetFieldText(getAccessibleIndexInParent());
return rtl::OUString();
}
@@ -715,9 +715,9 @@ Rectangle ScAccessibleDataPilotButton::GetBoundingBoxOnScreen(void) const
{
Rectangle aRect(GetBoundingBox());
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- Point aParentPos(mpDPFieldWindow->GetWindowExtentsRelative(NULL).TopLeft());
+ Point aParentPos(mpFieldWindow->GetWindowExtentsRelative(NULL).TopLeft());
aRect.Move(aParentPos.getX(), aParentPos.getY());
}
@@ -727,8 +727,8 @@ Rectangle ScAccessibleDataPilotButton::GetBoundingBoxOnScreen(void) const
Rectangle ScAccessibleDataPilotButton::GetBoundingBox(void) const
throw (::com::sun::star::uno::RuntimeException)
{
- if (mpDPFieldWindow)
- return Rectangle (mpDPFieldWindow->GetFieldPosition(const_cast<ScAccessibleDataPilotButton*> (this)->getAccessibleIndexInParent()), mpDPFieldWindow->GetFieldSize());
+ if (mpFieldWindow)
+ return Rectangle (mpFieldWindow->GetFieldPosition(const_cast<ScAccessibleDataPilotButton*> (this)->getAccessibleIndexInParent()), mpFieldWindow->GetFieldSize());
else
return Rectangle();
}
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index af8190078614..fe8ef7b9decf 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -79,7 +79,7 @@ using ::std::for_each;
struct ScAccessibleShapeData
{
- ScAccessibleShapeData() : pAccShape(NULL), pRelationCell(NULL), bSelected(sal_False), bSelectable(sal_True) {}
+ ScAccessibleShapeData() : pAccShape(NULL), pRelationCell(NULL), bSelected(false), bSelectable(sal_True) {}
~ScAccessibleShapeData();
mutable ::accessibility::AccessibleShape* pAccShape;
mutable ScAddress* pRelationCell; // if it is NULL this shape is anchored on the table
@@ -126,7 +126,7 @@ struct ScShapeDataLess
}
sal_Bool LessThanSheet(const ScAccessibleShapeData* pData) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
uno::Reference< beans::XPropertySet> xProps(pData->xShape, uno::UNO_QUERY);
if (xProps.is())
{
@@ -142,7 +142,7 @@ struct ScShapeDataLess
}
sal_Bool operator()(const ScAccessibleShapeData* pData1, const ScAccessibleShapeData* pData2) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (pData1 && pData2)
{
uno::Reference< beans::XPropertySet> xProps1(pData1->xShape, uno::UNO_QUERY);
@@ -178,7 +178,7 @@ struct ScShapeDataLess
else if (!pData1 && pData2)
bResult = !LessThanSheet(pData2);
else
- bResult = sal_False;
+ bResult = false;
return bResult;
}
};
@@ -189,7 +189,7 @@ struct DeselectShape
{
if (pAccShapeData)
{
- pAccShapeData->bSelected = sal_False;
+ pAccShapeData->bSelected = false;
if (pAccShapeData->pAccShape)
pAccShapeData->pAccShape->ResetState(AccessibleStateType::SELECTED);
}
@@ -319,7 +319,7 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
uno::Reference<drawing::XShapes> xShapes(xSelectionSupplier->getSelection(), uno::UNO_QUERY);
if (xShapes.is())
- FindSelectedShapesChanges(xShapes, sal_False);
+ FindSelectedShapesChanges(xShapes, false);
}
if (pViewShell)
{
@@ -355,7 +355,7 @@ void ScChildrenShapes::SetDrawBroadcaster()
SfxBroadcaster* pDrawBC = mpViewShell->GetViewData()->GetDocument()->GetDrawBroadcaster();
if (pDrawBC)
{
- StartListening(*pDrawBC, TRUE);
+ StartListening(*pDrawBC, sal_True);
maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(mpViewShell->GetViewData()->GetDocument()->GetDrawLayer()) );
maShapeTreeInfo.SetSdrView(mpViewShell->GetViewData()->GetScDrawView());
@@ -429,7 +429,7 @@ sal_Bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurr
if ( pReplacement )
pReplacement->Init();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (pCurrentChild && pReplacement)
{
DBG_ASSERT(pCurrentChild->GetXShape().get() == pReplacement->GetXShape().get(), "XShape changes and should be inserted sorted");
@@ -475,7 +475,7 @@ sal_Int32 ScChildrenShapes::GetCount() const
if (pObj/* && (pObj->GetLayer() != SC_LAYER_INTERN)*/)
{
uno::Reference< drawing::XShape > xShape (pObj->getUnoShape(), uno::UNO_QUERY);
- AddShape(xShape, sal_False); //inserts in the correct order
+ AddShape(xShape, false); //inserts in the correct order
}
}
}
@@ -524,7 +524,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint)
if(mpViewShell)
{
sal_Int32 i(maZOrderedShapes.size() - 1);
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && i >= 0)
{
ScAccessibleShapeData* pShape = maZOrderedShapes[i];
@@ -560,7 +560,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint)
sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
uno::Reference<drawing::XShape>& rShape) const
{
- sal_Bool bResult (sal_False);
+ sal_Bool bResult (false);
if (maZOrderedShapes.size() <= 1)
GetCount(); // fill list with filtered shapes (no internal shapes)
@@ -568,14 +568,14 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
throw uno::RuntimeException();
if (!maZOrderedShapes[nIndex])
- return sal_False;
+ return false;
bResult = maZOrderedShapes[nIndex]->bSelected;
rShape = maZOrderedShapes[nIndex]->xShape;
#ifdef DBG_UTIL // test whether it is truly selected by a slower method
uno::Reference< drawing::XShape > xReturnShape;
- sal_Bool bDebugResult(sal_False);
+ sal_Bool bDebugResult(false);
uno::Reference<container::XIndexAccess> xIndexAccess;
xSelectionSupplier->getSelection() >>= xIndexAccess;
@@ -608,7 +608,7 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
sal_Bool ScChildrenShapes::SelectionChanged()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (!xSelectionSupplier.is())
throw uno::RuntimeException();
@@ -667,7 +667,7 @@ void ScChildrenShapes::DeselectAll()
catch (lang::IllegalArgumentException&)
{
DBG_ERRORFILE("nothing selected before");
- bSomethingSelected = sal_False;
+ bSomethingSelected = false;
}
if (bSomethingSelected)
@@ -748,7 +748,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC
{
SortedShapes::iterator aItr = maZOrderedShapes.begin();
SortedShapes::iterator aEndItr = maZOrderedShapes.end();
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while(!bFound && aItr != aEndItr)
{
if (*aItr)
@@ -799,7 +799,7 @@ void ScChildrenShapes::Deselect(sal_Int32 nChildIndex)
DBG_ERRORFILE("something not selectable");
}
- maZOrderedShapes[nChildIndex]->bSelected = sal_False;
+ maZOrderedShapes[nChildIndex]->bSelected = false;
if (maZOrderedShapes[nChildIndex]->pAccShape)
maZOrderedShapes[nChildIndex]->pAccShape->ResetState(AccessibleStateType::SELECTED);
}
@@ -864,7 +864,7 @@ utl::AccessibleRelationSetHelper* ScChildrenShapes::GetRelationSet(const ScAddre
sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::XShapes>& xShapes, sal_Bool /* bCommitChange */) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
SortedShapes aShapesList;
uno::Reference<container::XIndexAccess> xIndexAcc(xShapes, uno::UNO_QUERY);
if (xIndexAcc.is())
@@ -921,7 +921,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
{
if ((*aDataItr)->bSelected)
{
- (*aDataItr)->bSelected = sal_False;
+ (*aDataItr)->bSelected = false;
if ((*aDataItr)->pAccShape)
{
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::SELECTED);
@@ -1054,7 +1054,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s
if( aPropAny >>= nLayerID )
{
if( (nLayerID == SC_LAYER_INTERN) || (nLayerID == SC_LAYER_HIDDEN) )
- pShape->bSelectable = sal_False;
+ pShape->bSelectable = false;
else
pShape->bSelectable = sal_True;
}
@@ -1071,7 +1071,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s
if (xEnum.is())
{
uno::Reference<drawing::XShape> xSelectedShape;
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && xEnum->hasMoreElements())
{
xEnum->nextElement() >>= xSelectedShape;
@@ -1132,7 +1132,7 @@ void ScChildrenShapes::RemoveShape(const uno::Reference<drawing::XShape>& xShape
sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xShape, ScChildrenShapes::SortedShapes::iterator& rItr) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
ScAccessibleShapeData aShape;
aShape.xShape = xShape;
ScShapeDataLess aLess;
@@ -1143,7 +1143,7 @@ sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xSha
#ifdef DBG_UTIL // test whether it finds truly the correct shape (perhaps it is not really sorted)
SortedShapes::iterator aDebugItr = maZOrderedShapes.begin();
SortedShapes::iterator aEndItr = maZOrderedShapes.end();
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && aDebugItr != aEndItr)
{
if (*aDebugItr && ((*aDebugItr)->xShape.get() == xShape.get()))
@@ -1205,7 +1205,7 @@ ScAccessibleDocument::ScAccessibleDocument(
mpAccessibleSpreadsheet(NULL),
mpChildrenShapes(NULL),
mpTempAccEdit(NULL),
- mbCompleteSheetSelected(sal_False)
+ mbCompleteSheetSelected(false)
{
if (pViewShell)
{
@@ -1214,13 +1214,13 @@ ScAccessibleDocument::ScAccessibleDocument(
if( pWin )
{
pWin->AddChildEventListener( LINK( this, ScAccessibleDocument, WindowChildEventListener ));
- USHORT nCount = pWin->GetChildCount();
+ sal_uInt16 nCount = pWin->GetChildCount();
for( sal_uInt16 i=0; i < nCount; ++i )
{
Window *pChildWin = pWin->GetChild( i );
if( pChildWin &&
AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- AddChild( pChildWin->GetAccessible(), sal_False );
+ AddChild( pChildWin->GetAccessible(), false );
}
}
if (pViewShell->GetViewData()->HasEditView( eSplitPos ))
@@ -1228,7 +1228,7 @@ ScAccessibleDocument::ScAccessibleDocument(
uno::Reference<XAccessible> xAcc = new ScAccessibleEditObject(this, pViewShell->GetViewData()->GetEditView(eSplitPos),
pViewShell->GetWindowByPos(eSplitPos), GetCurrentCellName(), GetCurrentCellDescription(),
CellInEditMode);
- AddChild(xAcc, sal_False);
+ AddChild(xAcc, false);
}
}
maVisArea = GetVisibleArea_Impl();
@@ -1433,7 +1433,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& /* aEvent */ )
throw (uno::RuntimeException)
{
- sal_Bool bSelectionChanged(sal_False);
+ sal_Bool bSelectionChanged(false);
if (mpAccessibleSpreadsheet)
{
sal_Bool bOldSelected(mbCompleteSheetSelected);
@@ -1656,7 +1656,7 @@ sal_Bool SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpChildrenShapes)
{
@@ -2007,7 +2007,7 @@ void ScAccessibleDocument::FreeAccessibleSpreadsheet()
sal_Bool ScAccessibleDocument::IsTableSelected() const
{
- sal_Bool bResult (sal_False);
+ sal_Bool bResult (false);
if(mpViewShell)
{
SCTAB nTab(getVisibleTable());
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 33f06e3707d9..9535e84e0da3 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -212,7 +212,7 @@ void ScNotesChilds::Init(const Rectangle& rVisRect, sal_Int32 nOffset)
mnOffset = nOffset;
const ScPreviewLocationData& rData = mpViewShell->GetLocationData();
- mnParagraphs = AddNotes(rData, rVisRect, sal_False, maMarks);
+ mnParagraphs = AddNotes(rData, rVisRect, false, maMarks);
mnParagraphs += AddNotes(rData, rVisRect, sal_True, maNotes);
}
}
@@ -228,7 +228,7 @@ struct ScParaFound
ScParaFound(sal_Int32 nIndex) : mnIndex(nIndex) {}
sal_Bool operator() (const ScAccNote& rNote)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (rNote.mnParaCount > mnIndex)
bResult = sal_True;
else
@@ -285,7 +285,7 @@ struct ScPointFound
ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {}
sal_Bool operator() (const ScAccNote& rNote)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (maPoint.IsInside(rNote.maRect))
bResult = sal_True;
else
@@ -356,7 +356,7 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
aNote.mnParaCount = 1;
ScAccNotes::iterator aItr = rOldNotes.begin();
ScAccNotes::iterator aEndItr = rOldNotes.end();
- sal_Bool bAddNote(sal_False);
+ sal_Bool bAddNote(false);
for (sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex)
{
if (rData.GetNoteInRange(rVisRect, nIndex, bMark, aNote.maNoteCell, aNote.maRect))
@@ -428,7 +428,7 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
{
nParagraphs += aNote.mnParaCount;
rNewNotes.push_back(aNote);
- bAddNote = sal_False;
+ bAddNote = false;
}
}
}
@@ -482,7 +482,7 @@ void ScNotesChilds::DataChanged(const Rectangle& rVisRect)
mnParagraphs = CheckChanges(mpViewShell->GetLocationData(), rVisRect, sal_True, maMarks, aNewMarks, aOldParas, aNewParas);
maMarks = aNewMarks;
ScAccNotes aNewNotes;
- mnParagraphs += CheckChanges(mpViewShell->GetLocationData(), rVisRect, sal_False, maNotes, aNewNotes, aOldParas, aNewParas);
+ mnParagraphs += CheckChanges(mpViewShell->GetLocationData(), rVisRect, false, maNotes, aNewNotes, aOldParas, aNewParas);
maNotes = aNewNotes;
std::for_each(aOldParas.begin(), aOldParas.end(), ScChildGone(mpAccDoc));
@@ -535,7 +535,7 @@ private:
};
ScIAccessibleViewForwarder::ScIAccessibleViewForwarder()
- : mbValid(sal_False)
+ : mbValid(false)
{
}
@@ -657,7 +657,7 @@ struct ScShapeChildLess
{
sal_Bool operator()(const ScShapeChild& rChild1, const ScShapeChild& rChild2) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (rChild1.mxShape.is() && rChild2.mxShape.is())
bResult = (rChild1.mxShape.get() < rChild2.mxShape.get());
return bResult;
@@ -761,7 +761,7 @@ void ScShapeChilds::SetDrawBroadcaster()
{
SfxBroadcaster* pDrawBC = mpViewShell->GetDocument()->GetDrawBroadcaster();
if (pDrawBC)
- StartListening(*pDrawBC, TRUE);
+ StartListening(*pDrawBC, sal_True);
}
}
@@ -903,7 +903,7 @@ sal_Bool ScShapeChilds::ReplaceChild (::accessibility::AccessibleShape* /* pCurr
throw (uno::RuntimeException)
{
DBG_ERRORFILE("should not be called in the page preview");
- return sal_False;
+ return false;
}
///===== Internal ========================================================
@@ -1021,7 +1021,7 @@ struct ScShapePointFound
ScShapePointFound(const awt::Point& rPoint) : maPoint(VCLPoint(rPoint)) {}
sal_Bool operator() (const ScShapeChild& rShape)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if ((VCLRectangle(rShape.mpAccShape->getBounds())).IsInside(maPoint))
bResult = sal_True;
return bResult;
@@ -1107,9 +1107,9 @@ void ScShapeChilds::FillShapes(const Rectangle& aPixelPaintRect, const MapMode&
Window* pWin = mpViewShell->GetWindow();
if (pPage && pWin)
{
- sal_Bool bForeAdded(sal_False);
- sal_Bool bBackAdded(sal_False);
- sal_Bool bControlAdded(sal_False);
+ sal_Bool bForeAdded(false);
+ sal_Bool bBackAdded(false);
+ sal_Bool bControlAdded(false);
Rectangle aClippedPixelPaintRect(aPixelPaintRect);
if (mpAccDoc)
{
@@ -1454,7 +1454,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
}
if (!mpFooter)
{
- mpFooter = new ScAccessiblePageHeader( this, mpViewShell, sal_False, aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters - 1 );
+ mpFooter = new ScAccessiblePageHeader( this, mpViewShell, false, aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters - 1 );
mpFooter->acquire();
}
}
@@ -1550,7 +1550,7 @@ uno::Reference<XAccessible> SAL_CALL ScAccessibleDocumentPagePreview::getAccessi
{
if ( !mpFooter )
{
- mpFooter = new ScAccessiblePageHeader( this, mpViewShell, sal_False, nIndex );
+ mpFooter = new ScAccessiblePageHeader( this, mpViewShell, false, nIndex );
mpFooter->acquire();
}
xAccessible = mpFooter;
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 6df608748c3a..d30cd246857e 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -62,7 +62,7 @@ ScAccessibleEditObject::ScAccessibleEditObject(
mpEditView(pEditView),
mpWindow(pWin),
meObjectType(eObjectType),
- mbHasFocus(sal_False)
+ mbHasFocus(false)
{
CreateTextHelper();
SetName(rName);
@@ -91,9 +91,9 @@ void SAL_CALL ScAccessibleEditObject::disposing()
void ScAccessibleEditObject::LostFocus()
{
- mbHasFocus = sal_False;
+ mbHasFocus = false;
if (mpTextHelper)
- mpTextHelper->SetFocus(sal_False);
+ mpTextHelper->SetFocus(false);
CommitFocusLost();
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 2cc571f5e89e..e1c2d5ea6544 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -277,7 +277,7 @@ sal_Bool ScAccessiblePreviewCell::IsDefunc(
sal_Bool ScAccessiblePreviewCell::IsEditable(
const uno::Reference<XAccessibleStateSet>& /* rxParentStates */)
{
- return sal_False;
+ return false;
}
sal_Bool ScAccessiblePreviewCell::IsOpaque(
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index d55fcdd3aac3..465566216edf 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -103,7 +103,7 @@ void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint&
if (rHint.ISA( SfxSimpleHint ))
{
const SfxSimpleHint& rRef = (const SfxSimpleHint&)rHint;
- ULONG nId = rRef.GetId();
+ sal_uLong nId = rRef.GetId();
if (nId == SC_HINT_ACC_VISAREACHANGED)
{
if (mpTextHelper)
@@ -163,7 +163,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewHeaderCell::setCurrentValue( const uno::Any
throw (uno::RuntimeException)
{
// it is not possible to set a value
- return sal_False;
+ return false;
}
uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMaximumValue() throw (uno::RuntimeException)
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 342c7f68d91f..12b64837dc00 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -101,7 +101,7 @@ void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if (rHint.ISA( SfxSimpleHint ))
{
const SfxSimpleHint& rRef = (const SfxSimpleHint&)rHint;
- ULONG nId = rRef.GetId();
+ sal_uLong nId = rRef.GetId();
if ( nId == SFX_HINT_DATACHANGED )
{
// column / row layout may change with any document change,
@@ -293,7 +293,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleRowSelected( sal_Int32 n
if ( nRow < 0 || (mpTableInfo && nRow >= mpTableInfo->GetRows()) )
throw lang::IndexOutOfBoundsException();
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleColumnSelected( sal_Int32 nColumn )
@@ -306,7 +306,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleColumnSelected( sal_Int3
if ( nColumn < 0 || (mpTableInfo && nColumn >= mpTableInfo->GetCols()) )
throw lang::IndexOutOfBoundsException();
- return sal_False;
+ return false;
}
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
@@ -376,7 +376,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleSelected( sal_Int32 nRow
else
throw lang::IndexOutOfBoundsException();
- return sal_False;
+ return false;
}
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 7402311b93c1..94f051df2d59 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -73,7 +73,7 @@ ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
ScAccessibleSpreadsheet& rParent, const ScRange& rRange ) :
ScAccessibleTableBase( rParent.mpAccDoc, rParent.mpDoc, rRange),
- mbIsSpreadsheet( sal_False )
+ mbIsSpreadsheet( false )
{
ConstructScAccessibleSpreadsheet( rParent.mpAccDoc, rParent.mpViewShell, rParent.mnTab, rParent.meSplitPos );
}
@@ -101,9 +101,9 @@ void ScAccessibleSpreadsheet::ConstructScAccessibleSpreadsheet(
mpAccCell = 0;
meSplitPos = eSplitPos;
mnTab = nTab;
- mbHasSelection = sal_False;
- mbDelIns = sal_False;
- mbIsFocusSend = sal_False;
+ mbHasSelection = false;
+ mbDelIns = false;
+ mbIsFocusSend = false;
maVisCells = GetVisCells(GetVisArea(mpViewShell, meSplitPos));
if (mpViewShell)
{
@@ -268,7 +268,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if (!mbDelIns)
CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);
else
- mbDelIns = sal_False;
+ mbDelIns = false;
}
// commented out, because to use a ModelChangeEvent is not the right way
// at the moment there is no way, but the Java/Gnome Api should be extended sometime
@@ -457,7 +457,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleRowSelected( sal_Int32 nR
if ((nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0))
throw lang::IndexOutOfBoundsException();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell && mpViewShell->GetViewData())
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -475,7 +475,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0))
throw lang::IndexOutOfBoundsException();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell && mpViewShell->GetViewData())
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -527,7 +527,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleSelected( sal_Int32 nRow,
(nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0))
throw lang::IndexOutOfBoundsException();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell)
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -648,7 +648,7 @@ void SAL_CALL
sal_Int32 nCol(getAccessibleColumn(nChildIndex));
sal_Int32 nRow(getAccessibleRow(nChildIndex));
- SelectCell(nRow, nCol, sal_False);
+ SelectCell(nRow, nCol, false);
}
}
@@ -690,7 +690,7 @@ sal_Int32 SAL_CALL
mpMarkedRanges = new ScRangeList();
ScMarkData aMarkData(mpViewShell->GetViewData()->GetMarkData());
aMarkData.MarkToMulti();
- aMarkData.FillRangeListWithMarks(mpMarkedRanges, sal_False);
+ aMarkData.FillRangeListWithMarks(mpMarkedRanges, false);
}
// is possible, because there shouldn't be overlapped ranges in it
if (mpMarkedRanges)
@@ -711,7 +711,7 @@ uno::Reference<XAccessible > SAL_CALL
if (!mpMarkedRanges)
{
mpMarkedRanges = new ScRangeList();
- mpViewShell->GetViewData()->GetMarkData().FillRangeListWithMarks(mpMarkedRanges, sal_False);
+ mpViewShell->GetViewData()->GetMarkData().FillRangeListWithMarks(mpMarkedRanges, false);
}
if (mpMarkedRanges)
{
@@ -755,7 +755,7 @@ void ScAccessibleSpreadsheet::SelectCell(sal_Int32 nRow, sal_Int32 nCol, sal_Boo
mpViewShell->SetTabNo( maRange.aStart.Tab() );
mpViewShell->DoneBlockMode( sal_True ); // continue selecting
- mpViewShell->InitBlockMode( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), maRange.aStart.Tab(), bDeselect, sal_False, sal_False );
+ mpViewShell->InitBlockMode( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), maRange.aStart.Tab(), bDeselect, false, false );
mpViewShell->SelectionChanged();
}
@@ -905,7 +905,7 @@ sal_Bool ScAccessibleSpreadsheet::IsDefunc(
sal_Bool ScAccessibleSpreadsheet::IsEditable(
const uno::Reference<XAccessibleStateSet>& /* rxParentStates */)
{
- sal_Bool bProtected(sal_False);
+ sal_Bool bProtected(false);
if (mpDoc && mpDoc->IsTabProtected(maRange.aStart.Tab()))
bProtected = sal_True;
return !bProtected;
@@ -913,7 +913,7 @@ sal_Bool ScAccessibleSpreadsheet::IsEditable(
sal_Bool ScAccessibleSpreadsheet::IsFocused()
{
- sal_Bool bFocused(sal_False);
+ sal_Bool bFocused(false);
if (mpViewShell)
{
if (mpViewShell->GetViewData()->GetActivePart() == meSplitPos)
@@ -924,7 +924,7 @@ sal_Bool ScAccessibleSpreadsheet::IsFocused()
sal_Bool ScAccessibleSpreadsheet::IsCompleteSheetSelected()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if(mpViewShell)
{
//#103800#; use a copy of MarkData
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index a4a595972238..26b188e065ab 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -234,14 +234,14 @@ sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleRowSelected( sal_Int32 /* n
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
OSL_FAIL("not implemented yet");
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleColumnSelected( sal_Int32 /* nColumn */ )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
OSL_FAIL("not implemented yet");
- return sal_False;
+ return false;
}
uno::Reference< XAccessible > SAL_CALL ScAccessibleTableBase::getAccessibleCellAt( sal_Int32 /* nRow */, sal_Int32 /* nColumn */ )
@@ -272,7 +272,7 @@ sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleSelected( sal_Int32 /* nRow
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
OSL_FAIL("not implemented yet");
- return sal_False;
+ return false;
}
//===== XAccessibleExtendedTable ========================================
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 4abf771296f2..2dbbd15c2f12 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -67,7 +67,7 @@ public:
ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos, const ScAddress& rCell);
virtual ~ScViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -87,7 +87,7 @@ ScViewForwarder::~ScViewForwarder()
{
}
-BOOL ScViewForwarder::IsValid() const
+sal_Bool ScViewForwarder::IsValid() const
{
return mpViewShell != NULL;
}
@@ -167,7 +167,7 @@ public:
const EditView* _pEditView);
virtual ~ScEditObjectViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -187,7 +187,7 @@ ScEditObjectViewForwarder::~ScEditObjectViewForwarder()
{
}
-BOOL ScEditObjectViewForwarder::IsValid() const
+sal_Bool ScEditObjectViewForwarder::IsValid() const
{
return (mpWindow != NULL);
}
@@ -266,7 +266,7 @@ public:
ScPreviewViewForwarder(ScPreviewShell* pViewShell);
virtual ~ScPreviewViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -291,7 +291,7 @@ ScPreviewViewForwarder::~ScPreviewViewForwarder()
delete mpTableInfo;
}
-BOOL ScPreviewViewForwarder::IsValid() const
+sal_Bool ScPreviewViewForwarder::IsValid() const
{
return mpViewShell != NULL;
}
@@ -569,7 +569,7 @@ public:
ScEditViewForwarder(EditView* pEditView, Window* pWin);
virtual ~ScEditViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -595,9 +595,9 @@ ScEditViewForwarder::~ScEditViewForwarder()
{
}
-BOOL ScEditViewForwarder::IsValid() const
+sal_Bool ScEditViewForwarder::IsValid() const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpWindow && mpEditView)
{
bResult = sal_True;
@@ -645,7 +645,7 @@ Point ScEditViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMa
sal_Bool ScEditViewForwarder::GetSelection( ESelection& rSelection ) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
rSelection = mpEditView->GetSelection();
@@ -660,7 +660,7 @@ sal_Bool ScEditViewForwarder::GetSelection( ESelection& rSelection ) const
sal_Bool ScEditViewForwarder::SetSelection( const ESelection& rSelection )
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->SetSelection(rSelection);
@@ -675,7 +675,7 @@ sal_Bool ScEditViewForwarder::SetSelection( const ESelection& rSelection )
sal_Bool ScEditViewForwarder::Copy()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->Copy();
@@ -690,7 +690,7 @@ sal_Bool ScEditViewForwarder::Copy()
sal_Bool ScEditViewForwarder::Cut()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->Cut();
@@ -705,7 +705,7 @@ sal_Bool ScEditViewForwarder::Cut()
sal_Bool ScEditViewForwarder::Paste()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->Paste();
@@ -737,7 +737,7 @@ ScAccessibleCellTextData::ScAccessibleCellTextData(ScTabViewShell* pViewShell,
mpEditViewForwarder(NULL),
mpViewShell(pViewShell),
meSplitPos(eSplitPos),
- mbViewEditEngine(sal_False),
+ mbViewEditEngine(false),
mpAccessibleCell( pAccCell )
{
}
@@ -756,7 +756,7 @@ void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL; // invalid now
@@ -1017,7 +1017,7 @@ void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint&
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpWindow = NULL;
@@ -1094,7 +1094,7 @@ IMPL_LINK(ScAccessibleEditObjectTextData, NotifyHdl, EENotify*, aNotify)
ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView, Window* pWin)
:
ScAccessibleEditObjectTextData(pEditView, pWin),
- mbEditEngineCreated(sal_False)
+ mbEditEngineCreated(false)
{
ScTextWnd* pTxtWnd = (ScTextWnd*)pWin;
@@ -1150,7 +1150,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
{
if (mbEditEngineCreated && mpEditEngine)
ResetEditMode();
- mbEditEngineCreated = sal_False;
+ mbEditEngineCreated = false;
mpEditView = pTxtWnd->GetEditView();
ScAccessibleEditObjectTextData::GetTextForwarder(); // fill the mpForwarder
@@ -1164,9 +1164,9 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
mbEditEngineCreated = sal_True;
- mpEditEngine->EnableUndo( FALSE );
+ mpEditEngine->EnableUndo( false );
mpEditEngine->SetRefMapMode( MAP_100TH_MM );
mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
@@ -1220,7 +1220,7 @@ void ScAccessibleEditLineTextData::ResetEditMode()
DELETEZ(mpForwarder);
DELETEZ(mpEditViewForwarder);
DELETEZ(mpViewForwarder);
- mbEditEngineCreated = sal_False;
+ mbEditEngineCreated = false;
}
void ScAccessibleEditLineTextData::TextChanged()
@@ -1277,7 +1277,7 @@ void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL; // invalid now
@@ -1355,7 +1355,7 @@ void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const S
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL; // invalid now
@@ -1384,9 +1384,9 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
}
- pEditEngine->EnableUndo( FALSE );
+ pEditEngine->EnableUndo( false );
if (pDocShell)
pEditEngine->SetRefDevice(pDocShell->GetRefDevice());
else
@@ -1416,7 +1416,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
pEditEngine->SetText( maText );
}
- bDataValid = TRUE;
+ bDataValid = sal_True;
if (pEditEngine)
pEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) );
@@ -1449,7 +1449,7 @@ ScAccessibleHeaderTextData::ScAccessibleHeaderTextData(ScPreviewShell* pViewShel
mpDocSh(NULL),
mpEditObj(pEditObj),
mbHeader(bHeader),
- mbDataValid(sal_False),
+ mbDataValid(false),
meAdjust(eAdjust)
{
if (pViewShell && pViewShell->GetDocument())
@@ -1479,7 +1479,7 @@ void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL;// invalid now
@@ -1496,9 +1496,9 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, TRUE );
+ ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, sal_True );
- pHdrEngine->EnableUndo( FALSE );
+ pHdrEngine->EnableUndo( false );
pHdrEngine->SetRefMapMode( MAP_TWIP );
// default font must be set, independently of document
@@ -1564,7 +1564,7 @@ ScAccessibleNoteTextData::ScAccessibleNoteTextData(ScPreviewShell* pViewShell,
msText(sText),
maCellPos(aCellPos),
mbMarkNote(bMarkNote),
- mbDataValid(sal_False)
+ mbDataValid(false)
{
if (pViewShell && pViewShell->GetDocument())
mpDocSh = (ScDocShell*) pViewShell->GetDocument()->GetDocumentShell();
@@ -1593,7 +1593,7 @@ void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL;// invalid now
@@ -1617,9 +1617,9 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
}
- mpEditEngine->EnableUndo( FALSE );
+ mpEditEngine->EnableUndo( false );
if (mpDocSh)
mpEditEngine->SetRefDevice(mpDocSh->GetRefDevice());
else
@@ -1649,7 +1649,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
mpEditEngine->SetText( msText );
}
- mbDataValid = TRUE;
+ mbDataValid = sal_True;
if (mpEditEngine)
mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) );
@@ -1675,7 +1675,7 @@ class ScCsvViewForwarder : public SvxViewForwarder
public:
explicit ScCsvViewForwarder( Window* pWindow, const Rectangle& rBoundBox );
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -1689,7 +1689,7 @@ ScCsvViewForwarder::ScCsvViewForwarder( Window* pWindow, const Rectangle& rBound
{
}
-BOOL ScCsvViewForwarder::IsValid() const
+sal_Bool ScCsvViewForwarder::IsValid() const
{
return mpWindow != NULL;
}
@@ -1735,7 +1735,7 @@ void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if( nId == SFX_HINT_DYING )
{
mpWindow = NULL;
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 34102618a9bd..bd7eeaf37aa0 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -73,8 +73,8 @@ SdrOle2Obj* ScClient::GetDrawObj()
SdrOle2Obj* pOle2Obj = NULL;
String aName = GetViewShell()->GetObjectShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj );
- USHORT nPages = pModel->GetPageCount();
- for (USHORT nPNr=0; nPNr<nPages && !pOle2Obj; nPNr++)
+ sal_uInt16 nPages = pModel->GetPageCount();
+ for (sal_uInt16 nPNr=0; nPNr<nPages && !pOle2Obj; nPNr++)
{
SdrPage* pPage = pModel->GetPage(nPNr);
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -114,7 +114,7 @@ void ScClient::RequestNewObjectArea( Rectangle& aLogicRect )
aLogicRect.SetPos( aOldRect.TopLeft() );
}
- USHORT nTab = pViewSh->GetViewData()->GetTabNo();
+ sal_uInt16 nTab = pViewSh->GetViewData()->GetTabNo();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
if ( pPage && aLogicRect != aOldRect )
{
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 0ad71d1c8236..dbfe52654470 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -69,6 +69,9 @@
#include "drawview.hxx"
#include "viewdata.hxx"
#include "scmod.hxx"
+#include "chartlis.hxx"
+#include "rangeutl.hxx"
+#include "formula/grammar.hxx"
// #108584#
#include "scitems.hxx"
@@ -80,6 +83,7 @@
#include <editeng/fhgtitem.hxx>
#include <vcl/svapp.hxx>
+
using namespace com::sun::star;
// -----------------------------------------------------------------------
@@ -97,12 +101,12 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
pModel( pClipModel ),
aObjDesc( rDesc ),
pBookmark( NULL ),
- bGraphic( FALSE ),
- bGrIsBit( FALSE ),
- bOleObj( FALSE ),
+ bGraphic( false ),
+ bGrIsBit( false ),
+ bOleObj( false ),
pDragSourceView( NULL ),
nDragSourceFlags( 0 ),
- bDragWasInternal( FALSE ),
+ bDragWasInternal( false ),
nSourceDocID( 0 )
{
//
@@ -120,7 +124,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
// OLE object
//
- UINT16 nSdrObjKind = pObject->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObject->GetObjIdentifier();
if (nSdrObjKind == OBJ_OLE2)
{
// if object has no persistence it must be copied as a part of document
@@ -128,7 +132,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
{
uno::Reference< embed::XEmbedPersist > xPersObj( ((SdrOle2Obj*)pObject)->GetObjRef(), uno::UNO_QUERY );
if ( xPersObj.is() && xPersObj->hasEntry() )
- bOleObj = TRUE;
+ bOleObj = sal_True;
}
catch( uno::Exception& )
{}
@@ -141,9 +145,9 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
if (nSdrObjKind == OBJ_GRAF)
{
- bGraphic = TRUE;
+ bGraphic = sal_True;
if ( ((SdrGrafObj*)pObject)->GetGraphic().GetType() == GRAPHIC_BITMAP )
- bGrIsBit = TRUE;
+ bGrIsBit = sal_True;
}
//
@@ -236,9 +240,15 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
//
if ( pContainerShell )
{
- const ScDocument* pDoc = pContainerShell->GetDocument();
+ ScDocument* pDoc = pContainerShell->GetDocument();
if ( pDoc )
+ {
nSourceDocID = pDoc->GetDocumentID();
+ if ( pPage )
+ {
+ ScChartHelper::FillProtectedChartRangesVector( m_aProtectedChartRangesVector, pDoc, pPage );
+ }
+ }
}
}
@@ -274,9 +284,9 @@ ScDrawTransferObj* ScDrawTransferObj::GetOwnClipboard( Window* )
return pObj;
}
-BOOL lcl_HasOnlyControls( SdrModel* pModel )
+sal_Bool lcl_HasOnlyControls( SdrModel* pModel )
{
- BOOL bOnlyControls = FALSE; // default if there are no objects
+ sal_Bool bOnlyControls = false; // default if there are no objects
if ( pModel )
{
@@ -287,12 +297,12 @@ BOOL lcl_HasOnlyControls( SdrModel* pModel )
SdrObject* pObj = aIter.Next();
if ( pObj )
{
- bOnlyControls = TRUE; // only set if there are any objects at all
+ bOnlyControls = sal_True; // only set if there are any objects at all
while ( pObj )
{
if (!pObj->ISA(SdrUnoObj))
{
- bOnlyControls = FALSE;
+ bOnlyControls = false;
break;
}
pObj = aIter.Next();
@@ -377,7 +387,7 @@ void ScDrawTransferObj::AddSupportedFormats()
sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
if ( bOleObj && nFormat != SOT_FORMAT_GDIMETAFILE )
@@ -391,7 +401,7 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF
if( aOleData.GetTransferable().is() && aOleData.HasFormat( rFlavor ) )
{
- ULONG nOldSwapMode = 0;
+ sal_uLong nOldSwapMode = 0;
if( pModel )
{
@@ -427,9 +437,9 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF
DBG_ASSERT( pPv, "pPv not there..." );
aView.MarkAllObj( pPv );
if ( nFormat == SOT_FORMAT_GDIMETAFILE )
- bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( TRUE ), rFlavor );
+ bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( sal_True ), rFlavor );
else
- bOK = SetBitmap( aView.GetAllMarkedBitmap( TRUE ), rFlavor );
+ bOK = SetBitmap( aView.GetAllMarkedBitmap( sal_True ), rFlavor );
}
else if ( nFormat == SOT_FORMATSTR_ID_SVXB )
{
@@ -479,7 +489,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
{
// called from SetObject, put data into stream
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
switch (nUserObjectId)
{
case SCDRAWTRANS_TYPE_DRAWMODEL:
@@ -580,11 +590,11 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), embed::ElementModes::READWRITE );
// write document storage
- pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
+ pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false );
// mba: no relative ULRs for clipboard!
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, false );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -599,7 +609,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
xWorkStore->dispose();
xWorkStore = uno::Reference < embed::XStorage >();
@@ -658,8 +668,8 @@ void lcl_InitMarks( SdrMarkView& rDest, const SdrMarkView& rSource, SCTAB nTab )
DBG_ASSERT(pDestPV,"PageView ?");
const SdrMarkList& rMarkList = rSource.GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rMarkList.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrMark* pMark = rMarkList.GetMark(i);
SdrObject* pObj = pMark->GetMarkedSdrObj();
@@ -688,14 +698,14 @@ void ScDrawTransferObj::SetDragSourceObj( SdrObject* pObj, SCTAB nTab )
//! add as listener with document, delete pDragSourceView if document gone
}
-void ScDrawTransferObj::SetDragSourceFlags( USHORT nFlags )
+void ScDrawTransferObj::SetDragSourceFlags( sal_uInt16 nFlags )
{
nDragSourceFlags = nFlags;
}
void ScDrawTransferObj::SetDragWasInternal()
{
- bDragWasInternal = TRUE;
+ bDragWasInternal = sal_True;
}
SdrOle2Obj* ScDrawTransferObj::GetSingleObject()
@@ -761,7 +771,7 @@ void ScDrawTransferObj::InitDocShell()
pDocSh->SetVisArea( aDestArea );
ScViewOptions aViewOpt( pDestDoc->GetViewOptions() );
- aViewOpt.SetOption( VOPT_GRID, FALSE );
+ aViewOpt.SetOption( VOPT_GRID, false );
pDestDoc->SetViewOptions( aViewOpt );
ScViewData aViewData( pDocSh, NULL );
@@ -769,7 +779,7 @@ void ScDrawTransferObj::InitDocShell()
aViewData.SetScreen( aDestArea );
aViewData.SetCurX( 0 );
aViewData.SetCurY( 0 );
- pDocSh->UpdateOle(&aViewData, TRUE);
+ pDocSh->UpdateOle(&aViewData, sal_True);
}
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 060afa19040e..e821dc0b773b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -99,8 +99,8 @@ using namespace formula;
// STATIC DATA -----------------------------------------------------------
-BOOL ScInputHandler::bOptLoaded = FALSE; // App-Optionen ausgewertet
-BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt
+sal_Bool ScInputHandler::bOptLoaded = false; // App-Optionen ausgewertet
+sal_Bool ScInputHandler::bAutoComplete = false; // wird in KeyInput gesetzt
// delimiters (in addition to ScEditUtil) needed for range finder:
// only characters that are allowed in formulas next to references
@@ -108,7 +108,7 @@ BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt
static const sal_Char pMinDelimiters[] = " !\"";
-extern USHORT nEditAdjust; //! Member an ViewData
+extern sal_uInt16 nEditAdjust; //! Member an ViewData
//==================================================================
@@ -143,7 +143,7 @@ void ScInputHandler::InitRangeFinder( const String& rFormula )
xub_StrLen nLen = rFormula.Len();
xub_StrLen nPos = 0;
xub_StrLen nStart = 0;
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
ScRange aRange;
while ( nPos < nLen && nCount < RANGEFIND_MAX )
{
@@ -181,7 +181,7 @@ handle_r1c1:
{
String aTest = rFormula.Copy( nStart, nPos-nStart );
const ScAddress::Details aAddrDetails( pDoc, aCursorPos );
- USHORT nFlags = aRange.ParseAny( aTest, pDoc, aAddrDetails );
+ sal_uInt16 nFlags = aRange.ParseAny( aTest, pDoc, aAddrDetails );
if ( nFlags & SCA_VALID )
{
// Tabelle setzen, wenn nicht angegeben
@@ -194,13 +194,13 @@ handle_r1c1:
{
// #i73766# if a single ref was parsed, set the same "abs" flags for ref2,
// so Format doesn't output a double ref because of different flags.
- USHORT nAbsFlags = nFlags & ( SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE );
+ sal_uInt16 nAbsFlags = nFlags & ( SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE );
nFlags |= nAbsFlags << 4;
}
if (!nCount)
{
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
pRangeFindList = new ScRangeFindList( pDocSh->GetTitle() );
}
@@ -221,7 +221,7 @@ handle_r1c1:
if (nCount)
{
- pEngine->SetUpdateMode( TRUE );
+ pEngine->SetUpdateMode( sal_True );
pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) );
}
@@ -241,7 +241,7 @@ void lcl_Replace( EditView* pView, const String& rNewStr, const ESelection& rOld
// Dummy-InsertText fuer Update und Paint
// dafuer muss oben die Selektion aufgehoben werden (vor QuickInsertText)
- pView->InsertText( EMPTY_STRING, FALSE );
+ pView->InsertText( EMPTY_STRING, false );
xub_StrLen nLen = pEngine->GetTextLen(0);
ESelection aSel( 0, nLen, 0, nLen );
@@ -249,7 +249,7 @@ void lcl_Replace( EditView* pView, const String& rNewStr, const ESelection& rOld
}
}
-void ScInputHandler::UpdateRange( USHORT nIndex, const ScRange& rNew )
+void ScInputHandler::UpdateRange( sal_uInt16 nIndex, const ScRange& rNew )
{
ScTabViewShell* pDocView = pRefViewSh ? pRefViewSh : pActiveViewSh;
if ( pDocView && pRangeFindList && nIndex < pRangeFindList->Count() )
@@ -271,17 +271,17 @@ void ScInputHandler::UpdateRange( USHORT nIndex, const ScRange& rNew )
lcl_Replace( pTopView, aNewStr, aOldSel );
lcl_Replace( pTableView, aNewStr, aOldSel );
- bInRangeUpdate = TRUE;
+ bInRangeUpdate = sal_True;
DataChanged();
- bInRangeUpdate = FALSE;
+ bInRangeUpdate = false;
long nDiff = aNewStr.Len() - (long)(nOldEnd-nOldStart);
pData->aRef = rNew;
pData->nSelEnd = (xub_StrLen)(pData->nSelEnd + nDiff);
- USHORT nCount = (USHORT) pRangeFindList->Count();
- for (USHORT i=nIndex+1; i<nCount; i++)
+ sal_uInt16 nCount = (sal_uInt16) pRangeFindList->Count();
+ for (sal_uInt16 i=nIndex+1; i<nCount; i++)
{
ScRangeFindData* pNext = pRangeFindList->GetObject( i );
pNext->nSelStart = (xub_StrLen)(pNext->nSelStart + nDiff);
@@ -300,7 +300,7 @@ void ScInputHandler::DeleteRangeFinder()
if ( pRangeFindList && pPaintView )
{
ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
- pRangeFindList->SetHidden(TRUE);
+ pRangeFindList->SetHidden(sal_True);
pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); // wegnehmen
DELETEZ(pRangeFindList);
}
@@ -376,7 +376,7 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos )
const sal_Unicode* p0 = rStr.GetBuffer();
register const sal_Unicode* p;
const sal_Unicode* p1;
- USHORT nQuotes = 0;
+ sal_uInt16 nQuotes = 0;
if ( nPos < nLen / 2 )
{
p = p0;
@@ -393,11 +393,11 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos )
nQuotes++;
}
// Odd number of quotes that we find ourselves in a string
- BOOL bLookInString = ((nQuotes % 2) != 0);
- BOOL bInString = bLookInString;
+ sal_Bool bLookInString = ((nQuotes % 2) != 0);
+ sal_Bool bInString = bLookInString;
p = p0 + nPos;
p1 = (nDir < 0 ? p0 : p0 + nLen) ;
- USHORT nLevel = 1;
+ sal_uInt16 nLevel = 1;
while ( p != p1 && nLevel )
{
p += nDir;
@@ -435,23 +435,23 @@ ScInputHandler::ScInputHandler()
pTipVisibleSecParent( NULL ),
nTipVisibleSec( 0 ),
nAutoPos( SCPOS_INVALID ),
- bUseTab( FALSE ),
- bTextValid( TRUE ),
+ bUseTab( false ),
+ bTextValid( sal_True ),
nFormSelStart( 0 ),
nFormSelEnd( 0 ),
nAutoPar( 0 ),
eMode( SC_INPUT_NONE ),
- bModified( FALSE ),
- bSelIsRef( FALSE ),
- bFormulaMode( FALSE ),
- bInRangeUpdate( FALSE ),
- bParenthesisShown( FALSE ),
- bCreatingFuncView( FALSE ),
- bInEnterHandler( FALSE ),
- bCommandErrorShown( FALSE ),
- bInOwnChange( FALSE ),
- bProtected( FALSE ),
- bCellHasPercentFormat( FALSE ),
+ bModified( false ),
+ bSelIsRef( false ),
+ bFormulaMode( false ),
+ bInRangeUpdate( false ),
+ bParenthesisShown( false ),
+ bCreatingFuncView( false ),
+ bInEnterHandler( false ),
+ bCommandErrorShown( false ),
+ bInOwnChange( false ),
+ bProtected( false ),
+ bCellHasPercentFormat( false ),
nValidation( 0 ),
eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ),
aScaleX( 1,1 ),
@@ -459,7 +459,7 @@ ScInputHandler::ScInputHandler()
pRefViewSh( NULL ),
pLastPattern( NULL ),
pEditDefaults( NULL ),
- bLastIsSymbol( FALSE ),
+ bLastIsSymbol( false ),
pLastState( NULL ),
pDelayTimer( NULL ),
pRangeFindList( NULL )
@@ -514,7 +514,7 @@ void ScInputHandler::UpdateRefDevice()
if (!pEngine)
return;
- BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
if ( bTextWysiwyg && pActiveViewSh )
pEngine->SetRefDevice( pActiveViewSh->GetViewData()->GetDocument()->GetPrinter() );
else
@@ -541,7 +541,7 @@ void ScInputHandler::ImplCreateEditEngine()
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() );
}
else
- pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE );
+ pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True );
pEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEngine->GetWordDelimiters() ) );
UpdateRefDevice(); // also sets MapMode
pEngine->SetPaperSize( Size( 1000000, 1000000 ) );
@@ -554,12 +554,12 @@ void ScInputHandler::ImplCreateEditEngine()
void ScInputHandler::UpdateAutoCorrFlag()
{
- ULONG nCntrl = pEngine->GetControlWord();
- ULONG nOld = nCntrl;
+ sal_uLong nCntrl = pEngine->GetControlWord();
+ sal_uLong nOld = nCntrl;
// don't use pLastPattern here (may be invalid because of AutoStyle)
- BOOL bDisable = bLastIsSymbol || bFormulaMode;
+ sal_Bool bDisable = bLastIsSymbol || bFormulaMode;
if ( bDisable )
nCntrl &= ~EE_CNTRL_AUTOCORRECT;
else
@@ -569,12 +569,12 @@ void ScInputHandler::UpdateAutoCorrFlag()
pEngine->SetControlWord(nCntrl);
}
-void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
+void ScInputHandler::UpdateSpellSettings( sal_Bool bFromStartTab )
{
if ( pActiveViewSh )
{
ScViewData* pViewData = pActiveViewSh->GetViewData();
- BOOL bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell();
+ sal_Bool bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell();
// SetDefaultLanguage is independent of the language attributes,
// ScGlobal::GetEditDefaultLanguage is always used.
@@ -587,8 +587,8 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
if ( bFromStartTab || eMode != SC_INPUT_NONE )
{
- ULONG nCntrl = pEngine->GetControlWord();
- ULONG nOld = nCntrl;
+ sal_uLong nCntrl = pEngine->GetControlWord();
+ sal_uLong nOld = nCntrl;
if( bOnlineSpell )
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
@@ -607,7 +607,7 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
pEngine->SetKernAsianPunctuation( pDoc->GetAsianKerning() );
pEngine->SetDefaultHorizontalTextDirection(
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( pViewData->GetTabNo() ) );
- pEngine->SetFirstWordCapitalization( FALSE );
+ pEngine->SetFirstWordCapitalization( false );
}
// language is set separately, so the speller is needed only if online
@@ -618,7 +618,7 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
pEngine->SetSpeller( xXSpellChecker1 );
}
- BOOL bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
+ sal_Bool bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
if ( bHyphen ) {
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
@@ -653,16 +653,16 @@ void ScInputHandler::GetFormulaData()
// wie in ScPosWnd::FillFunctions (inputwin.cxx)
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
- USHORT nMRUCount = rOpt.GetLRUFuncListCount();
- const USHORT* pMRUList = rOpt.GetLRUFuncList();
+ sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount();
+ const sal_uInt16* pMRUList = rOpt.GetLRUFuncList();
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
- ULONG nListCount = pFuncList->GetCount();
+ sal_uLong nListCount = pFuncList->GetCount();
if (pMRUList)
{
- for (USHORT i=0; i<nMRUCount; i++)
+ for (sal_uInt16 i=0; i<nMRUCount; i++)
{
- USHORT nId = pMRUList[i];
- for (ULONG j=0; j<nListCount; j++)
+ sal_uInt16 nId = pMRUList[i];
+ for (sal_uLong j=0; j<nListCount; j++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction( j );
if ( pDesc->nFIndex == nId && pDesc->pFuncName )
@@ -677,7 +677,7 @@ void ScInputHandler::GetFormulaData()
}
}
}
- for(ULONG i=0;i<nListCount;i++)
+ for(sal_uLong i=0;i<nListCount;i++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction( i );
if ( pDesc->pFuncName )
@@ -744,7 +744,7 @@ void ScInputHandler::ShowTipCursor()
if ( bFormulaMode && pActiveView && pFormulaDataPara && pEngine->GetParagraphCount() == 1 )
{
- String aFormula = pEngine->GetText( (USHORT) 0 );
+ String aFormula = pEngine->GetText( (sal_uInt16) 0 );
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
if( aSel.nEndPos )
@@ -758,8 +758,8 @@ void ScInputHandler::ShowTipCursor()
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< ::rtl::OUString> aArgs;
- USHORT nArgs;
- BOOL bFound = FALSE;
+ sal_uInt16 nArgs;
+ sal_Bool bFound = false;
FormulaHelper aHelper(ScGlobal::GetStarCalcFunctionMgr());
while( !bFound )
@@ -771,40 +771,40 @@ void ScInputHandler::ShowTipCursor()
sal_Unicode c = ( nLeftParentPos > 0 ) ? aSelText.GetChar( nLeftParentPos-1 ) : 0;
if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z' )) )
continue;
- nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, TRUE);
- if( aHelper.GetNextFunc( aSelText, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
+ nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, sal_True);
+ if( aHelper.GetNextFunc( aSelText, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
{
if( ppFDesc->getFunctionName().getLength() )
{
nArgPos = aHelper.GetArgStart( aSelText, nNextFStart, 0 );
- nArgs = static_cast<USHORT>(ppFDesc->getParameterCount());
+ nArgs = static_cast<sal_uInt16>(ppFDesc->getParameterCount());
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = false;
String aNew;
- USHORT nParAutoPos = SCPOS_INVALID;
- if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, FALSE ) )
+ sal_uInt16 nParAutoPos = SCPOS_INVALID;
+ if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, false ) )
{
- USHORT nActive = 0;
- for( USHORT i=0; i < nArgs; i++ )
+ sal_uInt16 nActive = 0;
+ for( sal_uInt16 i=0; i < nArgs; i++ )
{
xub_StrLen nLength = static_cast<xub_StrLen>(aArgs[i].getLength());
if( nArgPos <= aSelText.Len()-1 )
{
nActive = i+1;
- bFlag = TRUE;
+ bFlag = sal_True;
}
nArgPos+=nLength+1;
}
if( bFlag )
{
- USHORT nCountSemicolon = aNew.GetTokenCount(cSep)-1;
- USHORT nCountDot = aNew.GetTokenCount(cSheetSep)-1;
- USHORT nStartPosition = 0;
- USHORT nEndPosition = 0;
+ sal_uInt16 nCountSemicolon = aNew.GetTokenCount(cSep)-1;
+ sal_uInt16 nCountDot = aNew.GetTokenCount(cSheetSep)-1;
+ sal_uInt16 nStartPosition = 0;
+ sal_uInt16 nEndPosition = 0;
if( !nCountSemicolon )
{
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -815,8 +815,8 @@ void ScInputHandler::ShowTipCursor()
}
else if( !nCountDot )
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -837,8 +837,8 @@ void ScInputHandler::ShowTipCursor()
}
else
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -866,13 +866,13 @@ void ScInputHandler::ShowTipCursor()
{
aNew.Insert( 0x25BA, nStartPosition );
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
{
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -880,21 +880,21 @@ void ScInputHandler::ShowTipCursor()
}
else
{
- USHORT nPosition = 0;
+ sal_uInt16 nPosition = 0;
String aText = pEngine->GetWord( 0, aSel.nEndPos-1 );
if( aText.GetChar( aSel.nEndPos-1 ) == '=' )
{
break;
}
String aNew;
- USHORT nParAutoPos = SCPOS_INVALID;
+ sal_uInt16 nParAutoPos = SCPOS_INVALID;
nPosition = aText.Len()+1;
- if( pFormulaDataPara->FindText( aText, aNew, nParAutoPos, FALSE ) )
+ if( pFormulaDataPara->FindText( aText, aNew, nParAutoPos, false ) )
{
if( aFormula.GetChar( nPosition ) =='(' )
{
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
else
break;
@@ -925,7 +925,7 @@ void ScInputHandler::ShowTip( const String& rText )
aPos = pTipVisibleParent->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
+ sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
nTipVisible = Help::ShowTip(pTipVisibleParent, aRect, rText, nAlign);
pTipVisibleParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
}
@@ -949,7 +949,7 @@ void ScInputHandler::ShowTipBelow( const String& rText )
}
aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER;
+ sal_uInt16 nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER;
nTipVisibleSec = Help::ShowTip(pTipVisibleSecParent, aRect, rText, nAlign);
pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
}
@@ -965,7 +965,7 @@ void ScInputHandler::UseFormulaData()
// Formeln duerfen nur 1 Absatz haben
if ( pActiveView && pFormulaData && pEngine->GetParagraphCount() == 1 )
{
- String aTotal = pEngine->GetText( (USHORT) 0 );
+ String aTotal = pEngine->GetText( (sal_uInt16) 0 );
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
@@ -988,15 +988,15 @@ void ScInputHandler::UseFormulaData()
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< ::rtl::OUString> aArgs;
- USHORT nArgs;
- BOOL bFound = FALSE;
+ sal_uInt16 nArgs;
+ sal_Bool bFound = false;
String aText = pEngine->GetWord( 0, aSel.nEndPos-1 );
if ( aText.Len() )
{
String aNew;
nAutoPos = SCPOS_INVALID;
- if ( pFormulaData->FindText( aText, aNew, nAutoPos, FALSE ) )
+ if ( pFormulaData->FindText( aText, aNew, nAutoPos, false ) )
{
ShowTip( aNew );
aAutoSearch = aText;
@@ -1015,40 +1015,40 @@ void ScInputHandler::UseFormulaData()
sal_Unicode c = ( nLeftParentPos > 0 ) ? aFormula.GetChar( nLeftParentPos-1 ) : 0;
if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z') ) )
continue;
- nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, TRUE);
- if( aHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
+ nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, sal_True);
+ if( aHelper.GetNextFunc( aFormula, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
{
if( ppFDesc->getFunctionName().getLength() )
{
nArgPos = aHelper.GetArgStart( aFormula, nNextFStart, 0 );
- nArgs = static_cast<USHORT>(ppFDesc->getParameterCount());
+ nArgs = static_cast<sal_uInt16>(ppFDesc->getParameterCount());
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = false;
String aNew;
- USHORT nParAutoPos = SCPOS_INVALID;
- if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, FALSE ) )
+ sal_uInt16 nParAutoPos = SCPOS_INVALID;
+ if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, false ) )
{
- USHORT nActive = 0;
- for( USHORT i=0; i < nArgs; i++ )
+ sal_uInt16 nActive = 0;
+ for( sal_uInt16 i=0; i < nArgs; i++ )
{
xub_StrLen nLength = static_cast<xub_StrLen>(aArgs[i].getLength());
if( nArgPos <= aFormula.Len()-1 )
{
nActive = i+1;
- bFlag = TRUE;
+ bFlag = sal_True;
}
nArgPos+=nLength+1;
}
if( bFlag )
{
- USHORT nCountSemicolon = aNew.GetTokenCount(cSep)-1;
- USHORT nCountDot = aNew.GetTokenCount(cSheetSep)-1;
- USHORT nStartPosition = 0;
- USHORT nEndPosition = 0;
+ sal_uInt16 nCountSemicolon = aNew.GetTokenCount(cSep)-1;
+ sal_uInt16 nCountDot = aNew.GetTokenCount(cSheetSep)-1;
+ sal_uInt16 nStartPosition = 0;
+ sal_uInt16 nEndPosition = 0;
if( !nCountSemicolon )
{
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -1059,8 +1059,8 @@ void ScInputHandler::UseFormulaData()
}
else if( !nCountDot )
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -1081,8 +1081,8 @@ void ScInputHandler::UseFormulaData()
}
else
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -1110,13 +1110,13 @@ void ScInputHandler::UseFormulaData()
{
aNew.Insert( 0x25BA, nStartPosition );
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
{
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1126,7 +1126,7 @@ void ScInputHandler::UseFormulaData()
}
}
-void ScInputHandler::NextFormulaEntry( BOOL bBack )
+void ScInputHandler::NextFormulaEntry( sal_Bool bBack )
{
EditView* pActiveView = pTopView ? pTopView : pTableView;
if ( pActiveView && pFormulaData )
@@ -1142,7 +1142,7 @@ void ScInputHandler::NextFormulaEntry( BOOL bBack )
pActiveView->ShowCursor();
}
-void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParInserted )
+void lcl_CompleteFunction( EditView* pView, const String& rInsert, sal_Bool& rParInserted )
{
if (pView)
{
@@ -1154,7 +1154,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
String aInsStr = rInsert;
xub_StrLen nInsLen = aInsStr.Len();
- BOOL bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '('
+ sal_Bool bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '('
&& aInsStr.GetChar(nInsLen-1) == ')' );
if ( bDoParen )
{
@@ -1162,16 +1162,16 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
// schon eine Klammer steht (z.B. wenn der Funktionsname geaendert wurde).
ESelection aWordSel = pView->GetSelection();
- String aOld = pView->GetEditEngine()->GetText((USHORT)0);
+ String aOld = pView->GetEditEngine()->GetText((sal_uInt16)0);
sal_Unicode cNext = aOld.GetChar(aWordSel.nEndPos);
if ( cNext == '(' )
{
- bDoParen = FALSE;
+ bDoParen = false;
aInsStr.Erase( nInsLen - 2 ); // Klammern weglassen
}
}
- pView->InsertText( aInsStr, FALSE );
+ pView->InsertText( aInsStr, false );
if ( bDoParen ) // Cursor zwischen die Klammern setzen
{
@@ -1180,7 +1180,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
--aSel.nEndPos;
pView->SetSelection(aSel);
- rParInserted = TRUE;
+ rParInserted = sal_True;
}
}
}
@@ -1193,7 +1193,7 @@ void ScInputHandler::PasteFunctionData()
if (pData)
{
String aInsert = pData->GetString();
- BOOL bParInserted = FALSE;
+ sal_Bool bParInserted = false;
DataChanging(); // kann nicht neu sein
lcl_CompleteFunction( pTopView, aInsert, bParInserted );
@@ -1232,7 +1232,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
// wenn ein Name eigentlich als Bereich in die Gesamt-Formel
// eingefuegt wird, bei der Einzeldarstellung aber als
// single-Zellbezug interpretiert wird
- BOOL bColRowName = pCell->HasColRowName();
+ sal_Bool bColRowName = pCell->HasColRowName();
if ( bColRowName )
{
// ColRowName im RPN-Code?
@@ -1246,10 +1246,10 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
pCell = new ScFormulaCell( pDoc, rPos, aBraced );
}
else
- bColRowName = FALSE;
+ bColRowName = false;
}
- USHORT nErrCode = pCell->GetErrCode();
+ sal_uInt16 nErrCode = pCell->GetErrCode();
if ( nErrCode == 0 )
{
SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable());
@@ -1257,7 +1257,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
if ( pCell->IsValue() )
{
double n = pCell->GetValue();
- ULONG nFormat = aFormatter.GetStandardFormat( n, 0,
+ sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0,
pCell->GetFormatType(), ScGlobal::eLnge );
aFormatter.GetInputLineString( n, nFormat, aValue );
//! display OutputString but insert InputLineString
@@ -1267,7 +1267,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
String aStr;
pCell->GetString( aStr );
- ULONG nFormat = aFormatter.GetStandardFormat(
+ sal_uLong nFormat = aFormatter.GetStandardFormat(
pCell->GetFormatType(), ScGlobal::eLnge);
aFormatter.GetOutputString( aStr, nFormat,
aValue, &pColor );
@@ -1297,7 +1297,7 @@ void ScInputHandler::FormulaPreview()
{
String aPart = pActiveView->GetSelected();
if (!aPart.Len())
- aPart = pEngine->GetText((USHORT)0);
+ aPart = pEngine->GetText((sal_uInt16)0);
ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument();
aValue = lcl_Calculate( aPart, pDoc, aCursorPos );
}
@@ -1360,9 +1360,9 @@ void ScInputHandler::PasteManualTip()
}
}
if ( pTopView )
- pTopView->InsertText( aInsert, TRUE );
+ pTopView->InsertText( aInsert, sal_True );
if ( pTableView )
- pTableView->InsertText( aInsert, TRUE );
+ pTableView->InsertText( aInsert, sal_True );
DataChanged();
}
@@ -1380,7 +1380,7 @@ void ScInputHandler::AutoParAdded()
++nAutoPar; // closing parenthesis can be overwritten
}
-BOOL ScInputHandler::CursorAtClosingPar()
+sal_Bool ScInputHandler::CursorAtClosingPar()
{
// test if the cursor is before a closing parenthesis
@@ -1390,11 +1390,11 @@ BOOL ScInputHandler::CursorAtClosingPar()
{
ESelection aSel = pActiveView->GetSelection();
xub_StrLen nPos = aSel.nStartPos;
- String aFormula = pEngine->GetText((USHORT)0);
+ String aFormula = pEngine->GetText((sal_uInt16)0);
if ( nPos < aFormula.Len() && aFormula.GetChar(nPos) == ')' )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScInputHandler::SkipClosingPar()
@@ -1437,11 +1437,11 @@ void ScInputHandler::GetColData()
else
{
pColumnData = new TypedScStrCollection;
- pColumnData->SetCaseSensitive( TRUE ); // equal strings are handled in FindText
+ pColumnData->SetCaseSensitive( sal_True ); // equal strings are handled in FindText
}
pDoc->GetDataEntries( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- *pColumnData, TRUE );
+ *pColumnData, sal_True );
}
}
@@ -1455,7 +1455,7 @@ void ScInputHandler::UseColData() // beim Tippen
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( aSel.nEndPara+1 == nParCnt )
{
xub_StrLen nParLen = pEngine->GetTextLen( aSel.nEndPara );
@@ -1466,7 +1466,7 @@ void ScInputHandler::UseColData() // beim Tippen
{
String aNew;
nAutoPos = SCPOS_INVALID; // nix
- if ( pColumnData->FindText( aText, aNew, nAutoPos, FALSE ) )
+ if ( pColumnData->FindText( aText, aNew, nAutoPos, false ) )
{
// durch dBase Import etc. koennen Umbrueche im String sein,
// das wuerde hier mehrere Absaetze ergeben -> nicht gut
@@ -1477,7 +1477,7 @@ void ScInputHandler::UseColData() // beim Tippen
//! genaue Ersetzung im EnterHandler !!!
// ein Space zwischen Absaetzen:
- ULONG nEdLen = pEngine->GetTextLen() + nParCnt - 1;
+ sal_uLong nEdLen = pEngine->GetTextLen() + nParCnt - 1;
String aIns = aNew.Copy( (xub_StrLen)nEdLen );
// selection must be "backwards", so the cursor stays behind the last
@@ -1488,12 +1488,12 @@ void ScInputHandler::UseColData() // beim Tippen
// when editing in input line, apply to both edit views
if ( pTableView )
{
- pTableView->InsertText( aIns, FALSE );
+ pTableView->InsertText( aIns, false );
pTableView->SetSelection( aSelection );
}
if ( pTopView )
{
- pTopView->InsertText( aIns, FALSE );
+ pTopView->InsertText( aIns, false );
pTopView->SetSelection( aSelection );
}
@@ -1505,11 +1505,11 @@ void ScInputHandler::UseColData() // beim Tippen
// verschlucken, wenn noch etwas kommt
String aDummy;
- USHORT nNextPos = nAutoPos;
- bUseTab = pColumnData->FindText( aText, aDummy, nNextPos, FALSE );
+ sal_uInt16 nNextPos = nAutoPos;
+ bUseTab = pColumnData->FindText( aText, aDummy, nNextPos, false );
}
else
- bUseTab = TRUE;
+ bUseTab = sal_True;
}
}
}
@@ -1517,7 +1517,7 @@ void ScInputHandler::UseColData() // beim Tippen
}
}
-void ScInputHandler::NextAutoEntry( BOOL bBack )
+void ScInputHandler::NextAutoEntry( sal_Bool bBack )
{
EditView* pActiveView = pTopView ? pTopView : pTableView;
if ( pActiveView && pColumnData )
@@ -1528,7 +1528,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( aSel.nEndPara+1 == nParCnt && aSel.nStartPara == aSel.nEndPara )
{
String aText = GetEditText(pEngine);
@@ -1539,7 +1539,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
String aNew;
if ( pColumnData->FindText( aAutoSearch, aNew, nAutoPos, bBack ) )
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
lcl_RemoveLineEnd( aNew );
String aIns = aNew.Copy( aAutoSearch.Len() );
@@ -1548,7 +1548,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
if ( pTableView )
{
pTableView->DeleteSelected();
- pTableView->InsertText( aIns, FALSE );
+ pTableView->InsertText( aIns, false );
pTableView->SetSelection( ESelection(
aSel.nEndPara, aSel.nStartPos + aIns.Len(),
aSel.nEndPara, aSel.nStartPos ) );
@@ -1556,13 +1556,13 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
if ( pTopView )
{
pTopView->DeleteSelected();
- pTopView->InsertText( aIns, FALSE );
+ pTopView->InsertText( aIns, false );
pTopView->SetSelection( ESelection(
aSel.nEndPara, aSel.nStartPos + aIns.Len(),
aSel.nEndPara, aSel.nStartPos ) );
}
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
else
{
@@ -1591,7 +1591,7 @@ void ScInputHandler::UpdateParenthesis()
//! Klammer-Hervorhebung einzeln abschaltbar ????
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( bFormulaMode && eMode != SC_INPUT_TOP )
{
if ( pTableView && !pTableView->HasSelection() ) // Selektion ist immer unten
@@ -1602,7 +1602,7 @@ void ScInputHandler::UpdateParenthesis()
// Das Zeichen links vom Cursor wird angeschaut
xub_StrLen nPos = aSel.nStartPos - 1;
- String aFormula = pEngine->GetText((USHORT)0);
+ String aFormula = pEngine->GetText((sal_uInt16)0);
sal_Unicode c = aFormula.GetChar(nPos);
if ( c == '(' || c == ')' )
{
@@ -1616,8 +1616,8 @@ void ScInputHandler::UpdateParenthesis()
if (bParenthesisShown)
{
// alte Hervorhebung wegnehmen
- USHORT nCount = pEngine->GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pEngine->GetParagraphCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
pEngine->QuickRemoveCharAttribs( i, EE_CHAR_WEIGHT );
}
@@ -1627,9 +1627,9 @@ void ScInputHandler::UpdateParenthesis()
pEngine->QuickSetAttribs( aSet, aSelOther );
// Dummy-InsertText fuer Update und Paint (Selektion ist leer)
- pTableView->InsertText( EMPTY_STRING, FALSE );
+ pTableView->InsertText( EMPTY_STRING, false );
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1643,8 +1643,8 @@ void ScInputHandler::UpdateParenthesis()
if ( bParenthesisShown && !bFound && pTableView )
{
- USHORT nCount = pEngine->GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pEngine->GetParagraphCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
pTableView->RemoveCharAttribs( i, EE_CHAR_WEIGHT );
}
@@ -1666,12 +1666,12 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron
// Trotzdem wird immerhin der Editmodus beendet
EnterHandler();
- bFormulaMode = FALSE;
+ bFormulaMode = false;
pRefViewSh = NULL;
SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
@@ -1700,11 +1700,11 @@ void ScInputHandler::UpdateActiveView()
pActiveViewSh->GetWindowByPos( pActiveViewSh->GetViewData()->GetEditActivePart() ) :
NULL;
- USHORT nCount = pEngine->GetViewCount();
+ sal_uInt16 nCount = pEngine->GetViewCount();
if (nCount > 0)
{
pTableView = pEngine->GetView(0);
- for (USHORT i=1; i<nCount; i++)
+ for (sal_uInt16 i=1; i<nCount; i++)
{
EditView* pThis = pEngine->GetView(i);
Window* pWin = pThis->GetWindow();
@@ -1721,7 +1721,7 @@ void ScInputHandler::UpdateActiveView()
pTopView = NULL;
}
-void ScInputHandler::StopInputWinEngine( BOOL bAll )
+void ScInputHandler::StopInputWinEngine( sal_Bool bAll )
{
if (pInputWin)
pInputWin->StopEditEngine( bAll );
@@ -1739,9 +1739,9 @@ void ScInputHandler::ForgetLastPattern()
{
pLastPattern = NULL;
if ( !pLastState && pActiveViewSh )
- pActiveViewSh->UpdateInputHandler( TRUE ); // Status neu holen
+ pActiveViewSh->UpdateInputHandler( sal_True ); // Status neu holen
else
- NotifyChange( pLastState, TRUE );
+ NotifyChange( pLastState, sal_True );
}
void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
@@ -1751,7 +1751,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
{
case SVX_HOR_JUSTIFY_STANDARD:
{
- BOOL bNumber = FALSE;
+ sal_Bool bNumber = false;
if (cTyped) // neu angefangen
bNumber = (cTyped>='0' && cTyped<='9'); // nur Ziffern sind Zahlen
else if ( pActiveViewSh )
@@ -1776,7 +1776,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
break;
}
- BOOL bAsianVertical = pLastPattern &&
+ sal_Bool bAsianVertical = pLastPattern &&
((const SfxBoolItem&)pLastPattern->GetItem( ATTR_STACKED )).GetValue() &&
((const SfxBoolItem&)pLastPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
if ( bAsianVertical )
@@ -1788,7 +1788,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
pEditDefaults->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
pEngine->SetDefaults( *pEditDefaults );
- nEditAdjust = sal::static_int_cast<USHORT>(eSvxAdjust); //! set at ViewData or with PostEditView
+ nEditAdjust = sal::static_int_cast<sal_uInt16>(eSvxAdjust); //! set at ViewData or with PostEditView
pEngine->SetVertical( bAsianVertical );
}
@@ -1797,16 +1797,16 @@ void ScInputHandler::RemoveAdjust()
{
// harte Ausrichtungs-Attribute loeschen
- BOOL bUndo = pEngine->IsUndoEnabled();
+ sal_Bool bUndo = pEngine->IsUndoEnabled();
if ( bUndo )
- pEngine->EnableUndo( FALSE );
+ pEngine->EnableUndo( false );
// non-default paragraph attributes (e.g. from clipboard)
// must be turned into character attributes
pEngine->RemoveParaAttribs();
if ( bUndo )
- pEngine->EnableUndo( TRUE );
+ pEngine->EnableUndo( sal_True );
}
@@ -1814,14 +1814,14 @@ void ScInputHandler::RemoveRangeFinder()
{
// pRangeFindList und Farben loeschen
- pEngine->SetUpdateMode(FALSE);
- USHORT nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein
- for (USHORT i=0; i<nCount; i++)
+ pEngine->SetUpdateMode(false);
+ sal_uInt16 nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein
+ for (sal_uInt16 i=0; i<nCount; i++)
pEngine->QuickRemoveCharAttribs( i, EE_CHAR_COLOR );
- pEngine->SetUpdateMode(TRUE);
+ pEngine->SetUpdateMode(sal_True);
EditView* pActiveView = pTopView ? pTopView : pTableView;
- pActiveView->ShowCursor( FALSE, TRUE );
+ pActiveView->ShowCursor( false, sal_True );
DeleteRangeFinder(); // loescht die Liste und die Markierungen auf der Tabelle
}
@@ -1853,7 +1853,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if (!aTester.IsEditable())
{
- bProtected = TRUE;
+ bProtected = true;
// We allow read-only input mode activation when explicit cell
// activation is requested (double-click or F2) and if it's not
// part of an array.
@@ -1861,7 +1861,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if (bShowError)
{
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( true );
UpdateFormulaMode();
if ( pActiveViewSh && ( !bFromCommand || !bCommandErrorShown ) )
{
@@ -1870,7 +1870,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
// Set the flag before showing the error message because the command handler
// for the next IME command may be called when showing the dialog.
if ( bFromCommand )
- bCommandErrorShown = TRUE;
+ bCommandErrorShown = true;
pActiveViewSh->GetActiveWin()->GrabFocus();
pActiveViewSh->ErrorMessage(aTester.GetMessageId());
@@ -1882,7 +1882,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if (bStartInputMode)
{
// UpdateMode is enabled again in ScViewData::SetEditEngine (and not needed otherwise)
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
// Attribute in EditEngine uebernehmen
@@ -1896,18 +1896,18 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
const SfxItemSet& rAttrSet = pPattern->GetItemSet();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) )
{
- ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT ==
pDoc->GetFormatTable()->GetType( nFormat ) );
}
else
- bCellHasPercentFormat = FALSE; // Default: kein Prozent
+ bCellHasPercentFormat = false; // Default: kein Prozent
// Gueltigkeit angegeben?
- if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, true, &pItem ) )
nValidation = ((const SfxUInt32Item*)pItem)->GetValue();
else
nValidation = 0;
@@ -1954,7 +1954,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
// UpdateSpellSettings enables online spelling if needed
// -> also call if attributes are unchanged
- UpdateSpellSettings( TRUE ); // uses pLastPattern
+ UpdateSpellSettings( true ); // uses pLastPattern
// Edit-Engine fuellen
@@ -1963,7 +1963,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
{
pEngine->SetText(aCurrentText);
aStr = aCurrentText;
- bTextValid = FALSE;
+ bTextValid = false;
aCurrentText.Erase();
}
else
@@ -2005,7 +2005,7 @@ void lcl_SetTopSelection( EditView* pEditView, ESelection& rSel )
DBG_ASSERT( rSel.nStartPara==0 && rSel.nEndPara==0, "SetTopSelection: Para != 0" );
EditEngine* pEngine = pEditView->GetEditEngine();
- USHORT nCount = pEngine->GetParagraphCount();
+ sal_uInt16 nCount = pEngine->GetParagraphCount();
if (nCount > 1)
{
xub_StrLen nParLen = pEngine->GetTextLen(rSel.nStartPara);
@@ -2064,18 +2064,18 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG )
return 0;
}
-BOOL ScInputHandler::DataChanging( sal_Unicode cTyped, BOOL bFromCommand ) // return TRUE = new view created
+sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand ) // return sal_True = new view created
{
pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
- bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged)
+ bInOwnChange = true; // disable ModifyHdl (reset in DataChanged)
if ( eMode == SC_INPUT_NONE )
return StartTable( cTyped, bFromCommand, false );
else
- return FALSE;
+ return false;
}
-void ScInputHandler::DataChanged( BOOL bFromTopNotify )
+void ScInputHandler::DataChanged( sal_Bool bFromTopNotify )
{
ImplCreateEditEngine();
@@ -2086,7 +2086,7 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
{
// table EditEngine is formatted below, input line needs formatting after paste
// #i20282# not when called from the input line's modify handler
- pTopView->GetEditEngine()->QuickFormatDoc( TRUE );
+ pTopView->GetEditEngine()->QuickFormatDoc( sal_True );
// #i23720# QuickFormatDoc hides the cursor, but can't show it again because it
// can't safely access the EditEngine's current view, so the cursor has to be
@@ -2094,8 +2094,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
pTopView->ShowCursor();
}
- bModified = TRUE;
- bSelIsRef = FALSE;
+ bModified = sal_True;
+ bSelIsRef = false;
if ( pRangeFindList && !bInRangeUpdate )
RemoveRangeFinder(); // Attribute und Markierung loeschen
@@ -2124,7 +2124,7 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
{
ScViewData* pViewData = pActiveViewSh->GetViewData();
- BOOL bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer
+ sal_Bool bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer
if (!bNeedGrow)
{
// Cursor vor dem Ende?
@@ -2145,8 +2145,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
}
UpdateFormulaMode();
- bTextValid = FALSE; // Aenderungen sind nur in der Edit-Engine
- bInOwnChange = FALSE;
+ bTextValid = false; // Aenderungen sind nur in der Edit-Engine
+ bInOwnChange = false;
}
void ScInputHandler::UpdateFormulaMode()
@@ -2154,19 +2154,19 @@ void ScInputHandler::UpdateFormulaMode()
SfxApplication* pSfxApp = SFX_APP();
if ( pEngine->GetParagraphCount() == 1 &&
- ( pEngine->GetText((USHORT)0).GetChar(0) == '=' ||
- pEngine->GetText((USHORT)0).GetChar(0) == '+' ||
- pEngine->GetText((USHORT)0).GetChar(0) == '-' ) &&
+ ( pEngine->GetText((sal_uInt16)0).GetChar(0) == '=' ||
+ pEngine->GetText((sal_uInt16)0).GetChar(0) == '+' ||
+ pEngine->GetText((sal_uInt16)0).GetChar(0) == '-' ) &&
!bProtected )
{
if (!bFormulaMode)
{
- bFormulaMode = TRUE;
+ bFormulaMode = sal_True;
pRefViewSh = pActiveViewSh;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(this);
if (pInputWin)
- pInputWin->SetFormulaMode(TRUE);
+ pInputWin->SetFormulaMode(sal_True);
if ( bAutoComplete )
GetFormulaData();
@@ -2180,12 +2180,12 @@ void ScInputHandler::UpdateFormulaMode()
if (bFormulaMode)
{
ShowRefFrame();
- bFormulaMode = FALSE;
+ bFormulaMode = false;
pRefViewSh = NULL;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
}
@@ -2199,13 +2199,13 @@ void ScInputHandler::ShowRefFrame()
ScTabViewShell* pVisibleSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
if ( pRefViewSh && pRefViewSh != pVisibleSh )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SfxViewFrame* pRefFrame = pRefViewSh->GetViewFrame();
SfxViewFrame* pOneFrame = SfxViewFrame::GetFirst();
while ( pOneFrame && !bFound )
{
if ( pOneFrame == pRefFrame )
- bFound = TRUE;
+ bFound = sal_True;
pOneFrame = SfxViewFrame::GetNext( *pOneFrame );
}
@@ -2277,7 +2277,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
if (bProtected)
{
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( sal_True );
if (pActiveViewSh)
pActiveViewSh->GetActiveWin()->GrabFocus();
return;
@@ -2287,12 +2287,12 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
// Disable paste mode when edit mode starts.
pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = true; // disable ModifyHdl (reset below)
ScInputMode eOldMode = eMode;
eMode = eNewMode;
if (eOldMode == SC_INPUT_TOP && eNewMode != eOldMode)
- StopInputWinEngine( FALSE );
+ StopInputWinEngine( false );
if (eMode==SC_INPUT_TOP || eMode==SC_INPUT_TABLE)
{
@@ -2305,11 +2305,11 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
}
}
- USHORT nPara = pEngine->GetParagraphCount()-1;
+ sal_uInt16 nPara = pEngine->GetParagraphCount()-1;
xub_StrLen nLen = pEngine->GetText(nPara).Len();
- USHORT nCount = pEngine->GetViewCount();
+ sal_uInt16 nCount = pEngine->GetViewCount();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if ( eMode == SC_INPUT_TABLE && eOldMode == SC_INPUT_TOP )
{
@@ -2320,7 +2320,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
pEngine->GetView(i)->
SetSelection( ESelection( nPara, nLen, nPara, nLen ) );
}
- pEngine->GetView(i)->ShowCursor(FALSE);
+ pEngine->GetView(i)->ShowCursor(false);
}
}
@@ -2328,34 +2328,34 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
if (eMode==SC_INPUT_TABLE || eMode==SC_INPUT_TYPE)
{
if (pTableView)
- pTableView->SetEditEngineUpdateMode(TRUE);
+ pTableView->SetEditEngineUpdateMode(sal_True);
}
else
{
if (pTopView)
- pTopView->SetEditEngineUpdateMode(TRUE);
+ pTopView->SetEditEngineUpdateMode(sal_True);
}
if (eNewMode != eOldMode)
UpdateFormulaMode();
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
//----------------------------------------------------------------------------------------
-// lcl_IsNumber - TRUE, wenn nur Ziffern (dann keine Autokorrektur)
+// lcl_IsNumber - sal_True, wenn nur Ziffern (dann keine Autokorrektur)
-BOOL lcl_IsNumber(const String& rString)
+sal_Bool lcl_IsNumber(const String& rString)
{
xub_StrLen nLen = rString.Len();
for (xub_StrLen i=0; i<nLen; i++)
{
sal_Unicode c = rString.GetChar(i);
if ( c < '0' || c > '9' )
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void lcl_SelectionToEnd( EditView* pView )
@@ -2363,7 +2363,7 @@ void lcl_SelectionToEnd( EditView* pView )
if ( pView )
{
EditEngine* pEngine = pView->GetEditEngine();
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( nParCnt == 0 )
nParCnt = 1;
ESelection aSel( nParCnt-1, pEngine->GetTextLen(nParCnt-1) ); // empty selection, cursor at the end
@@ -2371,24 +2371,24 @@ void lcl_SelectionToEnd( EditView* pView )
}
}
-void ScInputHandler::EnterHandler( BYTE nBlockMode )
+void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
{
// Bei Makro-Aufrufen fuer Gueltigkeit kann Tod und Teufel passieren,
// darum dafuer sorgen, dass EnterHandler nicht verschachtelt gerufen wird:
if (bInEnterHandler) return;
- bInEnterHandler = TRUE;
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInEnterHandler = sal_True;
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
ImplCreateEditEngine();
- BOOL bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
+ sal_Bool bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
SfxApplication* pSfxApp = SFX_APP();
EditTextObject* pObject = NULL;
ScPatternAttr* pCellAttrs = NULL;
- BOOL bAttrib = FALSE; // Formatierung vorhanden ?
- BOOL bForget = FALSE; // wegen Gueltigkeit streichen ?
+ sal_Bool bAttrib = false; // Formatierung vorhanden ?
+ sal_Bool bForget = false; // wegen Gueltigkeit streichen ?
String aString = GetEditText(pEngine);
EditView* pActiveView = pTopView ? pTopView : pTableView;
@@ -2423,7 +2423,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
{
// #i67990# don't use pLastPattern in EnterHandler
const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab() );
- BOOL bOk = pData->IsDataValid( aString, *pPattern, aCursorPos );
+ sal_Bool bOk = pData->IsDataValid( aString, *pPattern, aCursorPos );
if (!bOk)
{
@@ -2435,7 +2435,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
Window* pParent = Application::GetDefDialogParent();
if ( pData->DoError( pParent, aString, aCursorPos ) )
- bForget = TRUE; // Eingabe nicht uebernehmen
+ bForget = sal_True; // Eingabe nicht uebernehmen
}
}
}
@@ -2452,12 +2452,12 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
// or an invalid action - normal cell input is always aborted
pActiveViewSh->DataPilotInput( aCursorPos, aString );
- bForget = TRUE;
+ bForget = sal_True;
}
}
pEngine->CompleteOnlineSpelling();
- BOOL bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors();
+ sal_Bool bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors();
if ( bSpellErrors )
{
// #i3820# If the spell checker flags numerical input as error,
@@ -2474,7 +2474,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
double nVal;
if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) )
{
- bSpellErrors = FALSE; // ignore the spelling errors
+ bSpellErrors = false; // ignore the spelling errors
}
}
}
@@ -2482,17 +2482,17 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
// After RemoveAdjust, the EditView must not be repainted (has wrong font size etc).
// SetUpdateMode must come after CompleteOnlineSpelling.
// The view is hidden in any case below (Broadcast).
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
if ( bModified && !bForget ) // was wird eingeben (Text/Objekt) ?
{
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( nParCnt == 0 )
nParCnt = 1;
bool bUniformAttribs = true;
SfxItemSet aPara1Attribs = pEngine->GetAttribs(0, 0, pEngine->GetTextLen(0));
- for (USHORT nPara = 1; nPara < nParCnt; ++nPara)
+ for (sal_uInt16 nPara = 1; nPara < nParCnt; ++nPara)
{
SfxItemSet aPara2Attribs = pEngine->GetAttribs(nPara, 0, pEngine->GetTextLen(nPara));
if (!(aPara1Attribs == aPara2Attribs))
@@ -2512,9 +2512,9 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if ( pActiveViewSh && bUniformAttribs )
{
SfxItemSet* pCommonAttrs = NULL;
- for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++)
+ for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++)
{
- SfxItemState eState = aOldAttribs.GetItemState( nId, FALSE, &pItem );
+ SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem );
if ( eState == SFX_ITEM_SET &&
nId != EE_CHAR_ESCAPEMENT && nId != EE_CHAR_PAIRKERNING &&
nId != EE_CHAR_KERNING && nId != EE_CHAR_XMLATTRIBS &&
@@ -2542,14 +2542,14 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
// check if EditObject is needed
if ( bSpellErrors || nParCnt > 1 )
- bAttrib = TRUE;
+ bAttrib = sal_True;
else
{
- for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++)
+ for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++)
{
- SfxItemState eState = aOldAttribs.GetItemState( nId, FALSE, &pItem );
+ SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem );
if (eState == SFX_ITEM_DONTCARE)
- bAttrib = TRUE;
+ bAttrib = sal_True;
else if (eState == SFX_ITEM_SET)
{
// keep same items in EditEngine as in ScEditAttrTester
@@ -2557,34 +2557,34 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
nId == EE_CHAR_KERNING || nId == EE_CHAR_XMLATTRIBS )
{
if ( *pItem != pEditDefaults->Get(nId) )
- bAttrib = TRUE;
+ bAttrib = sal_True;
}
}
}
// Feldbefehle enthalten?
- SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, false );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
- bAttrib = TRUE;
+ bAttrib = sal_True;
// not converted characters?
- SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, FALSE );
+ SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, false );
if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET )
- bAttrib = TRUE;
+ bAttrib = sal_True;
// Formeln immer als Formeln erkennen (#38309#)
// (der Test vorher ist trotzdem noetig wegen Zell-Attributen)
}
if (bMatrix)
- bAttrib = FALSE;
+ bAttrib = false;
if (bAttrib)
{
- ULONG nCtrl = pEngine->GetControlWord();
- ULONG nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0;
+ sal_uLong nCtrl = pEngine->GetControlWord();
+ sal_uLong nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0;
if ( ( nCtrl & EE_CNTRL_ALLOWBIGOBJS ) != nWantBig )
pEngine->SetControlWord( (nCtrl & ~EE_CNTRL_ALLOWBIGOBJS) | nWantBig );
pObject = pEngine->CreateTextObject();
@@ -2612,23 +2612,23 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
pExecuteSh->ActiveGrabFocus();
}
- bFormulaMode = FALSE;
+ bFormulaMode = false;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
DeleteRangeFinder();
ResetAutoPar();
- BOOL bOldMod = bModified;
+ sal_Bool bOldMod = bModified;
- bModified = FALSE;
- bSelIsRef = FALSE;
+ bModified = false;
+ bSelIsRef = false;
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( sal_True );
// Text input (through number formats) or ApplySelectionPattern modify
// the cell's attributes, so pLastPattern is no longer valid
@@ -2675,7 +2675,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
{
SfxBindings& rBindings = pExecuteSh->GetViewFrame()->GetBindings();
- USHORT nId = FID_INPUTLINE_ENTER;
+ sal_uInt16 nId = FID_INPUTLINE_ENTER;
if ( nBlockMode == SC_ENTER_BLOCK )
nId = FID_INPUTLINE_BLOCK;
else if ( nBlockMode == SC_ENTER_MATRIX )
@@ -2699,7 +2699,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
// mit Eingabe zusammenfassen ?
- pExecuteSh->ApplySelectionPattern( *pCellAttrs, TRUE, TRUE );
+ pExecuteSh->ApplySelectionPattern( *pCellAttrs, sal_True, sal_True );
pExecuteSh->AdjustBlockHeight();
}
@@ -2712,17 +2712,17 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
nFormSelStart = nFormSelEnd = 0;
aFormText.Erase();
- bInOwnChange = FALSE;
- bInEnterHandler = FALSE;
+ bInOwnChange = false;
+ bInEnterHandler = false;
}
void ScInputHandler::CancelHandler()
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
ImplCreateEditEngine();
- bModified = FALSE;
+ bModified = false;
// don't rely on ShowRefFrame switching the active view synchronously
// execute the function directly on the correct view's bindings instead
@@ -2737,11 +2737,11 @@ void ScInputHandler::CancelHandler()
pExecuteSh->SetTabNo(aCursorPos.Tab());
pExecuteSh->ActiveGrabFocus();
}
- bFormulaMode = FALSE;
+ bFormulaMode = false;
SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
@@ -2749,7 +2749,7 @@ void ScInputHandler::CancelHandler()
ResetAutoPar();
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( sal_True );
if (pExecuteSh)
pExecuteSh->StopEditShell();
@@ -2757,17 +2757,17 @@ void ScInputHandler::CancelHandler()
pEngine->SetText(String());
if ( !pLastState && pExecuteSh )
- pExecuteSh->UpdateInputHandler( TRUE ); // Status neu holen
+ pExecuteSh->UpdateInputHandler( sal_True ); // Status neu holen
else
- NotifyChange( pLastState, TRUE );
+ NotifyChange( pLastState, sal_True );
nFormSelStart = nFormSelEnd = 0;
aFormText.Erase();
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
-BOOL ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
+sal_Bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
{
// Referenzen auf unbenanntes Dokument gehen nicht
@@ -2787,9 +2787,9 @@ void ScInputHandler::AddRefEntry()
RemoveSelection();
if (pTableView)
- pTableView->InsertText( cSep, FALSE );
+ pTableView->InsertText( cSep, false );
if (pTopView)
- pTopView->InsertText( cSep, FALSE );
+ pTopView->InsertText( cSep, false );
DataChanged();
}
@@ -2798,7 +2798,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
{
HideTip();
- BOOL bOtherDoc = ( pRefViewSh &&
+ sal_Bool bOtherDoc = ( pRefViewSh &&
pRefViewSh->GetViewData()->GetDocument() != pDoc );
if (bOtherDoc)
if (!pDoc->GetDocumentShell()->HasName())
@@ -2877,17 +2877,17 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
if (pTableView || pTopView)
{
if (pTableView)
- pTableView->InsertText( aRefStr, TRUE );
+ pTableView->InsertText( aRefStr, sal_True );
if (pTopView)
- pTopView->InsertText( aRefStr, TRUE );
+ pTopView->InsertText( aRefStr, sal_True );
DataChanged();
}
- bSelIsRef = TRUE;
+ bSelIsRef = sal_True;
}
-void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar )
+void ScInputHandler::InsertFunction( const String& rFuncName, sal_Bool bAddPar )
{
if ( eMode == SC_INPUT_NONE )
{
@@ -2907,7 +2907,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar )
if (pTableView)
{
- pTableView->InsertText( aText, FALSE );
+ pTableView->InsertText( aText, false );
if (bAddPar)
{
ESelection aSel = pTableView->GetSelection();
@@ -2918,7 +2918,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar )
}
if (pTopView)
{
- pTopView->InsertText( aText, FALSE );
+ pTopView->InsertText( aText, false );
if (bAddPar)
{
ESelection aSel = pTopView->GetSelection();
@@ -2963,20 +2963,20 @@ void ScInputHandler::ClearText()
DataChanged();
}
-BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE */ )
+sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /* = sal_False */ )
{
if (!bOptLoaded)
{
bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
- bOptLoaded = TRUE;
+ bOptLoaded = sal_True;
}
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nModi = aCode.GetModifier();
- BOOL bShift = aCode.IsShift();
- BOOL bControl = aCode.IsMod1();
- BOOL bAlt = aCode.IsMod2();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nModi = aCode.GetModifier();
+ sal_Bool bShift = aCode.IsShift();
+ sal_Bool bControl = aCode.IsMod1();
+ sal_Bool bAlt = aCode.IsMod2();
+ sal_uInt16 nCode = aCode.GetCode();
sal_Unicode nChar = rKEvt.GetCharCode();
if (bAlt && !bControl && nCode != KEY_RETURN)
@@ -2993,30 +2993,30 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
return true;
}
- BOOL bInputLine = ( eMode==SC_INPUT_TOP );
+ sal_Bool bInputLine = ( eMode==SC_INPUT_TOP );
- BOOL bUsed = FALSE;
- BOOL bSkip = FALSE;
- BOOL bDoEnter = FALSE;
+ sal_Bool bUsed = false;
+ sal_Bool bSkip = false;
+ sal_Bool bDoEnter = false;
switch ( nCode )
{
case KEY_RETURN:
if (bControl && !bShift && !bInputLine)
- bDoEnter = TRUE;
+ bDoEnter = sal_True;
else if ( nModi == 0 && nTipVisible && pFormulaData && nAutoPos != SCPOS_INVALID )
{
PasteFunctionData();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if ( nModi == 0 && nTipVisible && aManualTip.Len() )
{
PasteManualTip();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else
{
- BYTE nMode = SC_ENTER_NORMAL;
+ sal_uInt8 nMode = SC_ENTER_NORMAL;
if ( bShift && bControl )
nMode = SC_ENTER_MATRIX;
else if ( bAlt )
@@ -3026,7 +3026,7 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
if (pActiveViewSh)
pActiveViewSh->MoveCursorEnter( bShift && !bControl );
- bUsed = TRUE;
+ bUsed = sal_True;
}
break;
case KEY_TAB:
@@ -3052,26 +3052,26 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
if ( nTipVisible )
{
HideTip();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if( nTipVisibleSec )
{
HideTipBelow();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if (eMode != SC_INPUT_NONE)
{
CancelHandler();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else
- bSkip = TRUE;
+ bSkip = sal_True;
break;
case KEY_F2:
if ( !bShift && !bControl && !bAlt && eMode == SC_INPUT_TABLE )
{
eMode = SC_INPUT_TYPE;
- bUsed = TRUE;
+ bUsed = sal_True;
}
break;
}
@@ -3079,8 +3079,8 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
// Cursortasten nur ausfuehren, wenn schon im Edit-Modus
// z.B. wegen Shift-Ctrl-PageDn (ist nicht als Accelerator definiert)
- BOOL bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt);
- BOOL bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln
+ sal_Bool bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt);
+ sal_Bool bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln
if ( !bUsed && !bSkip && ( bDoEnter || EditEngine::DoesKeyChangeText(rKEvt) ||
( eMode != SC_INPUT_NONE && ( bCursorKey || bInsKey ) ) ) )
{
@@ -3090,14 +3090,14 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
if (bSelIsRef)
{
RemoveSelection();
- bSelIsRef = FALSE;
+ bSelIsRef = false;
}
UpdateActiveView();
- BOOL bNewView = DataChanging( nChar );
+ sal_Bool bNewView = DataChanging( nChar );
if (bProtected) // Zelle geschuetzt?
- bUsed = TRUE; // Key-Event nicht weiterleiten
+ bUsed = sal_True; // Key-Event nicht weiterleiten
else // Aenderungen erlaubt
{
if (bNewView ) // neu anlegen
@@ -3138,15 +3138,15 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
if (pTableView)
if( pTableView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) )
- bUsed = TRUE;
+ bUsed = sal_True;
if (pTopView)
if( pTopView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) )
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if ( nAutoPar && nChar == ')' && CursorAtClosingPar() )
{
SkipClosingPar();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else
{
@@ -3154,18 +3154,18 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : NULL;
if ( pTableView->PostKeyEvent( rKEvt, pFrameWin ) )
- bUsed = TRUE;
+ bUsed = true;
}
if (pTopView)
if ( pTopView->PostKeyEvent( rKEvt ) )
- bUsed = TRUE;
+ bUsed = sal_True;
}
// Auto-Eingabe:
if ( bUsed && bAutoComplete )
{
- bUseTab = FALSE;
+ bUseTab = false;
nAutoPos = SCPOS_INVALID; // do not search further
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
@@ -3207,9 +3207,9 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
return bUsed;
}
-BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
+sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForce )
{
- BOOL bUsed = FALSE;
+ sal_Bool bUsed = false;
if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
{
@@ -3224,7 +3224,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
pTableView->Command( rCEvt );
else if (pTopView) // call only once
pTopView->Command( rCEvt );
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
}
@@ -3235,7 +3235,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if (!bOptLoaded)
{
bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
- bOptLoaded = TRUE;
+ bOptLoaded = sal_True;
}
HideTip();
@@ -3244,14 +3244,14 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if ( bSelIsRef )
{
RemoveSelection();
- bSelIsRef = FALSE;
+ bSelIsRef = false;
}
UpdateActiveView();
- BOOL bNewView = DataChanging( 0, TRUE );
+ sal_Bool bNewView = DataChanging( 0, sal_True );
if (bProtected) // cell protected
- bUsed = TRUE; // event is used
+ bUsed = sal_True; // event is used
else // changes allowed
{
if (bNewView) // create new edit view
@@ -3284,7 +3284,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if (pTopView)
pTopView->Command( rCEvt );
- bUsed = TRUE;
+ bUsed = sal_True;
if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
{
@@ -3311,26 +3311,26 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
}
void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
- BOOL bForce, ScTabViewShell* pSourceSh,
- BOOL bStopEditing)
+ sal_Bool bForce, ScTabViewShell* pSourceSh,
+ sal_Bool bStopEditing)
{
// Wenn der Aufruf aus einem Makro-Aufruf im EnterHandler kommt,
// gleich abbrechen und nicht den Status durcheinander bringen
if (bInEnterHandler)
return;
- BOOL bRepeat = (pState == pLastState);
+ sal_Bool bRepeat = (pState == pLastState);
if (!bRepeat && pState && pLastState)
- bRepeat = sal::static_int_cast<BOOL>(*pState == *pLastState);
+ bRepeat = sal::static_int_cast<sal_Bool>(*pState == *pLastState);
if (bRepeat && !bForce)
return;
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
if ( pState && !pLastState ) // wieder enablen
- bForce = TRUE;
+ bForce = sal_True;
- BOOL bHadObject = pLastState && pLastState->GetEditData();
+ sal_Bool bHadObject = pLastState && pLastState->GetEditData();
//! Before EditEngine gets eventually created (so it gets the right pools)
if ( pSourceSh )
@@ -3352,7 +3352,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if ( pState )
{
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = false;
// hier auch fremde Referenzeingabe beruecksichtigen (z.B. Funktions-AP),
// FormEditData falls gerade von der Hilfe auf Calc umgeschaltet wird:
@@ -3367,7 +3367,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
EnterHandler();
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
if ( !bIgnore )
@@ -3376,16 +3376,16 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
const ScAddress& rEPos = pState->GetEndPos();
const EditTextObject* pData = pState->GetEditData();
String aString = pState->GetString();
- BOOL bTxtMod = FALSE;
+ sal_Bool bTxtMod = false;
ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
aCursorPos = pState->GetPos();
if ( pData )
- bTxtMod = TRUE;
+ bTxtMod = true;
else if ( bHadObject )
- bTxtMod = TRUE;
+ bTxtMod = sal_True;
else if ( bTextValid )
bTxtMod = ( aString != aCurrentText );
else
@@ -3398,13 +3398,13 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
pEngine->SetText( *pData );
aString = GetEditText(pEngine);
lcl_RemoveTabs(aString);
- bTextValid = FALSE;
+ bTextValid = false;
aCurrentText.Erase();
}
else
{
aCurrentText = aString;
- bTextValid = TRUE; //! erst nur als String merken
+ bTextValid = sal_True; //! erst nur als String merken
}
if ( pInputWin )
@@ -3425,7 +3425,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if ( !aPosStr.Len() ) // kein Name -> formatieren
{
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if( aAddrDetails.eConv == formula::FormulaGrammar::CONV_XL_R1C1 )
nFlags |= SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE;
if ( rSPos != rEPos )
@@ -3437,8 +3437,13 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
else
aCursorPos.Format( aPosStr, SCA_VALID | nFlags, pDoc, aAddrDetails );
}
-
+ //IAccessibility2 Implementation 2009-----
+ // Disable the accessible VALUE_CHANGE event
+ sal_Bool bIsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(false);
+ pInputWin->SetAccessibilityEventsSuppressed(sal_True);
pInputWin->SetPosString(aPosStr);
+ pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed);
+ //-----IAccessibility2 Implementation 2009
pInputWin->SetSumAssignMode();
}
@@ -3449,14 +3454,14 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
// Online spelling is turned back on in StartTable, after setting
// the right language from cell attributes.
- ULONG nCntrl = pEngine->GetControlWord();
+ sal_uLong nCntrl = pEngine->GetControlWord();
if ( nCntrl & EE_CNTRL_ONLINESPELLING )
pEngine->SetControlWord( nCntrl & ~EE_CNTRL_ONLINESPELLING );
- bModified = FALSE;
- bSelIsRef = FALSE;
- bProtected = FALSE;
- bCommandErrorShown = FALSE;
+ bModified = false;
+ bSelIsRef = false;
+ bProtected = false;
+ bCommandErrorShown = false;
}
}
}
@@ -3499,7 +3504,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
HideTip();
HideTipBelow();
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
void ScInputHandler::UpdateCellAdjust( SvxCellHorJustify eJust )
@@ -3536,13 +3541,13 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer )
{
if ( pInputWin)
{
- pInputWin->EnableButtons( FALSE );
+ pInputWin->EnableButtons( false );
pInputWin->Disable();
}
}
else if ( !bFormulaMode ) // Formel auch z.B. bei Hilfe behalten
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
pActiveViewSh = NULL;
pEngine->SetText( EMPTY_STRING );
@@ -3553,7 +3558,7 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer )
pInputWin->Disable();
}
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
}
}
@@ -3570,20 +3575,20 @@ void ScInputHandler::InputSelection( EditView* pView )
ResetAutoPar();
}
-void ScInputHandler::InputChanged( EditView* pView, BOOL bFromNotify )
+void ScInputHandler::InputChanged( EditView* pView, sal_Bool bFromNotify )
{
ESelection aSelection = pView->GetSelection();
UpdateActiveView();
// #i20282# DataChanged needs to know if this is from the input line's modify handler
- BOOL bFromTopNotify = ( bFromNotify && pView == pTopView );
+ sal_Bool bFromTopNotify = ( bFromNotify && pView == pTopView );
- BOOL bNewView = DataChanging(); //! kann das hier ueberhaupt sein?
+ sal_Bool bNewView = DataChanging(); //! kann das hier ueberhaupt sein?
aCurrentText = pView->GetEditEngine()->GetText(); // auch den String merken
pEngine->SetText( aCurrentText );
DataChanged( bFromTopNotify );
- bTextValid = TRUE; // wird in DataChanged auf FALSE gesetzt
+ bTextValid = sal_True; // wird in DataChanged auf sal_False gesetzt
if ( pActiveViewSh )
{
@@ -3603,7 +3608,7 @@ const String& ScInputHandler::GetEditString()
if (pEngine)
{
aCurrentText = pEngine->GetText(); // immer neu aus Engine
- bTextValid = TRUE;
+ bTextValid = sal_True;
}
return aCurrentText;
@@ -3618,16 +3623,16 @@ Size ScInputHandler::GetTextSize()
return aSize;
}
-BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
+sal_Bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if (pEngine)
{
// Feldbefehle enthalten?
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
SfxItemSet aSet = pEngine->GetAttribs( ESelection(0,0,nParCnt,0) );
- SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
{
// Inhalt kopieren
@@ -3638,20 +3643,20 @@ BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
// Attribute loeschen
- for (USHORT i=0; i<nParCnt; i++)
+ for (sal_uInt16 i=0; i<nParCnt; i++)
rDestEngine.QuickRemoveCharAttribs( i );
// Absaetze zusammenfassen
while ( nParCnt > 1 )
{
- xub_StrLen nLen = rDestEngine.GetTextLen( (USHORT)0 );
+ xub_StrLen nLen = rDestEngine.GetTextLen( (sal_uInt16)0 );
ESelection aSel( 0,nLen, 1,0 );
rDestEngine.QuickInsertText( ' ', aSel ); // Umbruch durch Space ersetzen
--nParCnt;
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -3684,9 +3689,9 @@ EditView* ScInputHandler::GetFuncEditView()
{
if ( eMode != SC_INPUT_TABLE )
{
- bCreatingFuncView = TRUE; // RangeFinder nicht anzeigen
+ bCreatingFuncView = sal_True; // RangeFinder nicht anzeigen
SetMode( SC_INPUT_TABLE );
- bCreatingFuncView = FALSE;
+ bCreatingFuncView = false;
if ( pTableView )
pTableView->GetEditEngine()->SetText( EMPTY_STRING );
}
@@ -3715,7 +3720,7 @@ void ScInputHandler::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd )
if (pView)
pView->SetSelection( ESelection(0,nStart, 0,nEnd) );
- bModified = TRUE;
+ bModified = sal_True;
}
//------------------------------------------------------------------------
@@ -3738,12 +3743,12 @@ void ScInputHandler::InputReplaceSelection( const String& rStr )
EditView* pView = GetFuncEditView();
if (pView)
{
- pView->SetEditEngineUpdateMode( FALSE );
+ pView->SetEditEngineUpdateMode( false );
pView->GetEditEngine()->SetText( aFormText );
pView->SetSelection( ESelection(0,nFormSelStart, 0,nFormSelEnd) );
- pView->SetEditEngineUpdateMode( TRUE );
+ pView->SetEditEngineUpdateMode( sal_True );
}
- bModified = TRUE;
+ bModified = sal_True;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index eaf5544d41e5..6a93fc130e02 100644..100755
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -101,7 +101,7 @@ enum ScNameInputType
SFX_IMPL_CHILDWINDOW(ScInputWindowWrapper,FID_INPUTLINE_STATUS)
ScInputWindowWrapper::ScInputWindowWrapper( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* /* pInfo */ )
: SfxChildWindow( pParentP, nId )
@@ -149,7 +149,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ),
aTextSum ( ScResId( SCSTR_QHELP_BTNSUM ) ),
aTextEqual ( ScResId( SCSTR_QHELP_BTNEQUAL ) ),
- bIsOkCancelMode ( FALSE )
+ bIsOkCancelMode ( false )
{
ScModule* pScMod = SC_MOD();
SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod );
@@ -196,7 +196,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
aWndPos .Show();
aTextWindow .Show();
- pInputHdl = SC_MOD()->GetInputHdl( pViewSh, FALSE ); // use own handler even if ref-handler is set
+ pInputHdl = SC_MOD()->GetInputHdl( pViewSh, false ); // use own handler even if ref-handler is set
if (pInputHdl)
pInputHdl->SetInputWindow( this );
@@ -219,14 +219,15 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus kommt eh nach unten
}
else if ( pViewSh )
- pViewSh->UpdateInputHandler( TRUE ); // unbedingtes Update
+ pViewSh->UpdateInputHandler( sal_True ); // unbedingtes Update
pImgMgr->RegisterToolBox( this );
+ SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA));
}
ScInputWindow::~ScInputWindow()
{
- BOOL bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear?
+ sal_Bool bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear?
// if any view's input handler has a pointer to this input window, reset it
// (may be several ones, #74522#)
@@ -242,7 +243,7 @@ ScInputWindow::~ScInputWindow()
if ( pHdl && pHdl->GetInputWindow() == this )
{
pHdl->SetInputWindow( NULL );
- pHdl->StopInputWinEngine( FALSE ); // reset pTopView pointer
+ pHdl->StopInputWinEngine( false ); // reset pTopView pointer
}
pSh = SfxViewShell::GetNext( *pSh, &aScType );
}
@@ -268,7 +269,7 @@ void ScInputWindow::SetInputHandler( ScInputHandler* pNew )
sal_Bool ScInputWindow::UseSubTotal(ScRangeList* pRangeList) const
{
- sal_Bool bSubTotal(sal_False);
+ sal_Bool bSubTotal(false);
ScTabViewShell* pViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
if ( pViewSh )
{
@@ -370,7 +371,7 @@ void ScInputWindow::Select()
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
{
ScRangeList aMarkRangeList;
- rMark.FillRangeListWithMarks( &aMarkRangeList, FALSE );
+ rMark.FillRangeListWithMarks( &aMarkRangeList, false );
ScDocument* pDoc = pViewSh->GetViewData()->GetDocument();
// check if one of the marked ranges is empty
@@ -391,7 +392,7 @@ void ScInputWindow::Select()
if ( bEmpty )
{
ScRangeList aRangeList;
- const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList );
+ const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList );
if ( bDataFound )
{
ScAddress aAddr = aRangeList.back()->aEnd;
@@ -410,7 +411,7 @@ void ScInputWindow::Select()
const bool bContinue = ( i != 0 ? true : false );
if ( !pViewSh->AutoSum( aRange, bSubTotal, bSetCursor, bContinue ) )
{
- pViewSh->MarkRange( aRange, FALSE, FALSE );
+ pViewSh->MarkRange( aRange, false, false );
pViewSh->SetCursor( aRange.aEnd.Col(), aRange.aEnd.Row() );
const ScRangeList aRangeList;
ScAddress aAddr = aRange.aEnd;
@@ -426,7 +427,7 @@ void ScInputWindow::Select()
else // nur in Eingabezeile einfuegen
{
ScRangeList aRangeList;
- const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList );
+ const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList );
const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) );
ScAddress aAddr = pViewSh->GetViewData()->GetCurPos();
const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal, aAddr );
@@ -477,7 +478,7 @@ void ScInputWindow::Select()
pView->SetSelection( ESelection(0,1, 0,1) );
pScMod->InputChanged(pView);
SetOkCancelMode();
- pView->SetEditEngineUpdateMode(TRUE);
+ pView->SetEditEngineUpdateMode(sal_True);
}
}
break;
@@ -498,7 +499,7 @@ void ScInputWindow::Resize()
aTextWindow.Invalidate();
}
-void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit )
+void ScInputWindow::SetFuncString( const String& rString, sal_Bool bDoEdit )
{
//! new method at ScModule to query if function autopilot is open
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
@@ -526,7 +527,7 @@ void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit )
if ( bDoEdit )
SetOkCancelMode(); // nicht, wenn gleich hinterher Enter/Cancel
- pView->SetEditEngineUpdateMode(TRUE);
+ pView->SetEditEngineUpdateMode(sal_True);
}
}
}
@@ -566,7 +567,7 @@ void ScInputWindow::SetOkCancelMode()
SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL );
SetItemText ( SID_INPUT_OK, aTextOk );
SetHelpId ( SID_INPUT_OK, HID_INSWIN_OK );
- bIsOkCancelMode = TRUE;
+ bIsOkCancelMode = sal_True;
}
}
@@ -589,13 +590,13 @@ void ScInputWindow::SetSumAssignMode()
SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME );
SetItemText ( SID_INPUT_EQUAL, aTextEqual );
SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC );
- bIsOkCancelMode = FALSE;
+ bIsOkCancelMode = false;
- SetFormulaMode(FALSE); // kein editieren -> keine Formel
+ SetFormulaMode(false); // kein editieren -> keine Formel
}
}
-void ScInputWindow::SetFormulaMode( BOOL bSet )
+void ScInputWindow::SetFormulaMode( sal_Bool bSet )
{
aWndPos.SetFormulaMode(bSet);
aTextWindow.SetFormulaMode(bSet);
@@ -611,7 +612,7 @@ String ScInputWindow::GetText() const
return ToolBox::GetText();
}
-BOOL ScInputWindow::IsInputActive()
+sal_Bool ScInputWindow::IsInputActive()
{
return aTextWindow.IsInputActive();
}
@@ -626,7 +627,7 @@ void ScInputWindow::MakeDialogEditView()
aTextWindow.MakeDialogEditView();
}
-void ScInputWindow::StopEditEngine( BOOL bAll )
+void ScInputWindow::StopEditEngine( sal_Bool bAll )
{
aTextWindow.StopEditEngine( bAll );
}
@@ -664,7 +665,7 @@ void ScInputWindow::PosGrabFocus()
aWndPos.GrabFocus();
}
-void ScInputWindow::EnableButtons( BOOL bEnable )
+void ScInputWindow::EnableButtons( sal_Bool bEnable )
{
// when enabling buttons, always also enable the input window itself
if ( bEnable && !IsEnabled() )
@@ -717,11 +718,11 @@ ScTextWnd::ScTextWnd( Window* pParent )
DragSourceHelper( this ),
pEditEngine ( NULL ),
pEditView ( NULL ),
- bIsInsertMode( TRUE ),
- bFormulaMode ( FALSE ),
- bInputMode ( FALSE )
+ bIsInsertMode( sal_True ),
+ bFormulaMode ( false ),
+ bInputMode ( false )
{
- EnableRTL( FALSE ); // EditEngine can't be used with VCL EnableRTL
+ EnableRTL( false ); // EditEngine can't be used with VCL EnableRTL
bIsRTL = GetSettings().GetLayoutRTL();
@@ -735,13 +736,17 @@ ScTextWnd::ScTextWnd( Window* pParent )
Color aBgColor= rStyleSettings.GetWindowColor();
Color aTxtColor= rStyleSettings.GetWindowTextColor();
- aTextFont.SetTransparent ( TRUE );
+ aTextFont.SetTransparent ( sal_True );
aTextFont.SetFillColor ( aBgColor );
//aTextFont.SetColor ( COL_FIELDTEXT );
aTextFont.SetColor (aTxtColor);
aTextFont.SetWeight ( WEIGHT_NORMAL );
- SetSizePixel ( Size(1,TBX_WINDOW_HEIGHT) );
+ Size aSize(1,TBX_WINDOW_HEIGHT);
+ Size aMinEditSize( Edit::GetMinimumEditSize() );
+ if( aMinEditSize.Height() > aSize.Height() )
+ aSize.Height() = aMinEditSize.Height();
+ SetSizePixel ( aSize );
SetBackground ( aBgColor );
SetLineColor ( COL_BLACK );
SetMapMode ( MAP_TWIP );
@@ -816,7 +821,7 @@ void ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt )
if (pEditView)
{
- pEditView->SetEditEngineUpdateMode( TRUE );
+ pEditView->SetEditEngineUpdateMode( sal_True );
pEditView->MouseButtonDown( rMEvt );
}
}
@@ -839,8 +844,8 @@ void ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt )
void ScTextWnd::Command( const CommandEvent& rCEvt )
{
- bInputMode = TRUE;
- USHORT nCommand = rCEvt.GetCommand();
+ bInputMode = sal_True;
+ sal_uInt16 nCommand = rCEvt.GetCommand();
if ( pEditView /* && ( nCommand == COMMAND_STARTDRAG || nCommand == COMMAND_VOICE ) */ )
{
ScModule* pScMod = SC_MOD();
@@ -850,9 +855,9 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
// already set in StartEditEngine when the EditEngine is created
// verhindern, dass die EditView beim View-Umschalten wegkommt
- pScMod->SetInEditCommand( TRUE );
+ pScMod->SetInEditCommand( true );
pEditView->Command( rCEvt );
- pScMod->SetInEditCommand( FALSE );
+ pScMod->SetInEditCommand( false );
// COMMAND_STARTDRAG heiss noch lange nicht, dass der Inhalt geaendert wurde
// darum in dem Fall kein InputChanged
@@ -896,14 +901,14 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
else
Window::Command(rCEvt); // sonst soll sich die Basisklasse drum kuemmern...
- bInputMode = FALSE;
+ bInputMode = false;
}
void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
{
if ( pEditView )
{
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
pEditView->Command( aDragEvent );
// handling of d&d to different view (CancelHandler) can't be done here,
@@ -913,24 +918,24 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
void ScTextWnd::KeyInput(const KeyEvent& rKEvt)
{
- bInputMode = TRUE;
+ bInputMode = sal_True;
if (!SC_MOD()->InputKeyEvent( rKEvt ))
{
- BOOL bUsed = FALSE;
+ sal_Bool bUsed = false;
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh )
bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe
if (!bUsed)
Window::KeyInput( rKEvt );
}
- bInputMode = FALSE;
+ bInputMode = false;
}
void ScTextWnd::GetFocus()
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh )
- pViewSh->SetFormShellAtTop( FALSE ); // focus in input line -> FormShell no longer on top
+ pViewSh->SetFormShellAtTop( false ); // focus in input line -> FormShell no longer on top
}
void ScTextWnd::LoseFocus()
@@ -947,7 +952,7 @@ String ScTextWnd::GetText() const
return GetTextString();
}
-void ScTextWnd::SetFormulaMode( BOOL bSet )
+void ScTextWnd::SetFormulaMode( sal_Bool bSet )
{
if ( bSet != bFormulaMode )
{
@@ -960,8 +965,8 @@ void ScTextWnd::UpdateAutoCorrFlag()
{
if ( pEditEngine )
{
- ULONG nControl = pEditEngine->GetControlWord();
- ULONG nOld = nControl;
+ sal_uLong nControl = pEditEngine->GetControlWord();
+ sal_uLong nOld = nControl;
if ( bFormulaMode )
nControl &= ~EE_CNTRL_AUTOCORRECT; // keine Autokorrektur in Formeln
else
@@ -998,7 +1003,7 @@ void lcl_ModifyRTLDefaults( SfxItemSet& rSet )
//rSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
// PaperSize width is limited to USHRT_MAX in RTL mode (because of EditEngine's
- // USHORT values in EditLine), so the text may be wrapped and line spacing must be
+ // sal_uInt16 values in EditLine), so the text may be wrapped and line spacing must be
// increased to not see the beginning of the next line.
SvxLineSpacingItem aItem( SVX_LINESPACE_TWO_LINES, EE_PARA_SBL );
aItem.SetPropLineSpace( 200 );
@@ -1032,11 +1037,11 @@ void ScTextWnd::StartEditEngine()
pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() );
}
else
- pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE );
- pNew->SetExecuteURL( FALSE );
+ pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True );
+ pNew->SetExecuteURL( false );
pEditEngine = pNew;
- pEditEngine->SetUpdateMode( FALSE );
+ pEditEngine->SetUpdateMode( false );
pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) );
pEditEngine->SetWordDelimiters(
ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) );
@@ -1048,7 +1053,7 @@ void ScTextWnd::StartEditEngine()
pEditEngine->SetFontInfoInItemSet( *pSet, aTextFont );
lcl_ExtendEditFontAttribs( *pSet );
// turn off script spacing to match DrawText output
- pSet->Put( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) );
+ pSet->Put( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
if ( bIsRTL )
lcl_ModifyRTLDefaults( *pSet );
pEditEngine->SetDefaults( pSet );
@@ -1057,12 +1062,12 @@ void ScTextWnd::StartEditEngine()
// Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in
// die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen.
- BOOL bFilled = FALSE;
+ sal_Bool bFilled = false;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl();
if ( pHdl ) //! Testen, ob's der richtige InputHdl ist?
bFilled = pHdl->GetTextAndFields( *pEditEngine );
- pEditEngine->SetUpdateMode( TRUE );
+ pEditEngine->SetUpdateMode( sal_True );
// aString ist die Wahrheit...
if ( bFilled && pEditEngine->GetText() == aString )
@@ -1074,7 +1079,7 @@ void ScTextWnd::StartEditEngine()
pEditView->SetInsertMode(bIsInsertMode);
// Text aus Clipboard wird als ASCII einzeilig uebernommen
- ULONG n = pEditView->GetControlWord();
+ sal_uLong n = pEditView->GetControlWord();
pEditView->SetControlWord( n | EV_CNTRL_SINGLELINEPASTE );
pEditEngine->InsertView( pEditView, EE_APPEND );
@@ -1095,7 +1100,7 @@ void ScTextWnd::StartEditEngine()
if ( pObjSh && pObjSh->ISA(ScDocShell) )
{
ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document
- BYTE nScript = pDoc->GetStringScriptType( aString );
+ sal_uInt8 nScript = pDoc->GetStringScriptType( aString );
if ( nScript & SCRIPTTYPE_COMPLEX )
Invalidate();
}
@@ -1118,13 +1123,13 @@ IMPL_LINK(ScTextWnd, NotifyHdl, EENotify*, EMPTYARG)
// while an InputHandler method is modifying the EditEngine content
if ( pHdl && !pHdl->IsInOwnChange() )
- pHdl->InputChanged( pEditView, TRUE ); // #i20282# InputChanged must know if called from modify handler
+ pHdl->InputChanged( pEditView, sal_True ); // #i20282# InputChanged must know if called from modify handler
}
return 0;
}
-void ScTextWnd::StopEditEngine( BOOL bAll )
+void ScTextWnd::StopEditEngine( sal_Bool bAll )
{
if (pEditView)
{
@@ -1137,7 +1142,7 @@ void ScTextWnd::StopEditEngine( BOOL bAll )
pScMod->InputSelection( pEditView );
aString = pEditEngine->GetText();
bIsInsertMode = pEditView->IsInsertMode();
- BOOL bSelection = pEditView->HasSelection();
+ sal_Bool bSelection = pEditView->HasSelection();
pEditEngine->SetModifyHdl(Link());
DELETEZ(pEditView);
DELETEZ(pEditEngine);
@@ -1158,20 +1163,20 @@ void ScTextWnd::SetTextString( const String& rNewString )
{
if ( rNewString != aString )
{
- bInputMode = TRUE;
+ bInputMode = sal_True;
// Position der Aenderung suchen, nur Rest painten
if (!pEditEngine)
{
- BOOL bPaintAll;
+ sal_Bool bPaintAll;
if ( bIsRTL )
- bPaintAll = TRUE;
+ bPaintAll = sal_True;
else
{
// test if CTL script type is involved
- BYTE nOldScript = 0;
- BYTE nNewScript = 0;
+ sal_uInt8 nOldScript = 0;
+ sal_uInt8 nNewScript = 0;
SfxObjectShell* pObjSh = SfxObjectShell::Current();
if ( pObjSh && pObjSh->ISA(ScDocShell) )
{
@@ -1214,7 +1219,7 @@ void ScTextWnd::SetTextString( const String& rNewString )
if (nDifPos)
nInvPos += GetTextWidth(aString,0,nDifPos);
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( nDifPos == aString.Len() ) // only new characters appended
nFlags = INVALIDATE_NOERASE; // then background is already clear
@@ -1233,7 +1238,7 @@ void ScTextWnd::SetTextString( const String& rNewString )
if (!maAccTextDatas.empty())
maAccTextDatas.back()->TextChanged();
- bInputMode = FALSE;
+ bInputMode = false;
}
}
@@ -1242,7 +1247,7 @@ const String& ScTextWnd::GetTextString() const
return aString;
}
-BOOL ScTextWnd::IsInputActive()
+sal_Bool ScTextWnd::IsInputActive()
{
return HasFocus();
}
@@ -1264,11 +1269,11 @@ void ScTextWnd::MakeDialogEditView()
pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() );
}
else
- pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE );
- pNew->SetExecuteURL( FALSE );
+ pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True );
+ pNew->SetExecuteURL( false );
pEditEngine = pNew;
- pEditEngine->SetUpdateMode( FALSE );
+ pEditEngine->SetUpdateMode( false );
pEditEngine->SetWordDelimiters( pEditEngine->GetWordDelimiters() += '=' );
pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) );
@@ -1278,7 +1283,7 @@ void ScTextWnd::MakeDialogEditView()
if ( bIsRTL )
lcl_ModifyRTLDefaults( *pSet );
pEditEngine->SetDefaults( pSet );
- pEditEngine->SetUpdateMode( TRUE );
+ pEditEngine->SetUpdateMode( sal_True );
pEditView = new EditView( pEditEngine, this );
pEditEngine->InsertView( pEditView, EE_APPEND );
@@ -1353,7 +1358,7 @@ ScPosWnd::ScPosWnd( Window* pParent ) :
ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ),
pAccel ( NULL ),
nTipVisible ( 0 ),
- bFormulaMode( FALSE )
+ bFormulaMode( false )
{
Size aSize( GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("GW99999:GW99999")) ),
GetTextHeight() );
@@ -1375,7 +1380,7 @@ ScPosWnd::~ScPosWnd()
delete pAccel;
}
-void ScPosWnd::SetFormulaMode( BOOL bSet )
+void ScPosWnd::SetFormulaMode( sal_Bool bSet )
{
if ( bSet != bFormulaMode )
{
@@ -1446,16 +1451,16 @@ void ScPosWnd::FillFunctions()
String aFirstName;
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
- USHORT nMRUCount = rOpt.GetLRUFuncListCount();
- const USHORT* pMRUList = rOpt.GetLRUFuncList();
+ sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount();
+ const sal_uInt16* pMRUList = rOpt.GetLRUFuncList();
if (pMRUList)
{
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
- ULONG nListCount = pFuncList->GetCount();
- for (USHORT i=0; i<nMRUCount; i++)
+ sal_uLong nListCount = pFuncList->GetCount();
+ for (sal_uInt16 i=0; i<nMRUCount; i++)
{
- USHORT nId = pMRUList[i];
- for (ULONG j=0; j<nListCount; j++)
+ sal_uInt16 nId = pMRUList[i];
+ for (sal_uLong j=0; j<nListCount; j++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction( j );
if ( pDesc->nFIndex == nId && pDesc->pFuncName )
@@ -1485,13 +1490,13 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( rHint.ISA(SfxSimpleHint) )
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId();
if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL)
FillRangeNames();
}
else if ( rHint.ISA(SfxEventHint) )
{
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
if ( nEventId == SFX_EVENT_ACTIVATEDOC )
FillRangeNames();
}
@@ -1565,7 +1570,7 @@ void ScPosWnd::Modify()
// determine the action that would be taken for the current input
ScNameInputType eType = lcl_GetInputType( GetText() ); // uses current view
- USHORT nStrId = 0;
+ sal_uInt16 nStrId = 0;
switch ( eType )
{
case SC_NAME_INPUT_CELL:
@@ -1607,7 +1612,7 @@ void ScPosWnd::Modify()
Rectangle aRect( aPos, aPos );
String aText = ScGlobal::GetRscString( nStrId );
- USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
+ sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
nTipVisible = Help::ShowTip(pWin, aRect, aText, nAlign);
}
}
@@ -1660,7 +1665,7 @@ void ScPosWnd::DoEnter()
ScNameInputType eType = lcl_GetInputType( aText );
if ( eType == SC_NAME_INPUT_BAD_NAME || eType == SC_NAME_INPUT_BAD_SELECTION )
{
- USHORT nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION;
+ sal_uInt16 nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION;
pViewSh->ErrorMessage( nId );
}
else if ( eType == SC_NAME_INPUT_DEFINE )
@@ -1682,7 +1687,7 @@ void ScPosWnd::DoEnter()
{
ScDocFunc aFunc(*pDocShell);
aFunc.ModifyRangeNames( aNewRanges );
- pViewSh->UpdateInputHandler(TRUE);
+ pViewSh->UpdateInputHandler(true);
}
else
delete pNew; // shouldn't happen
@@ -1693,7 +1698,7 @@ void ScPosWnd::DoEnter()
// for all selection types, excecute the SID_CURRENTCELL slot
SfxStringItem aPosItem( SID_CURRENTCELL, aText );
- SfxBoolItem aUnmarkItem( FN_PARAM_1, TRUE ); // remove existing selection
+ SfxBoolItem aUnmarkItem( FN_PARAM_1, sal_True ); // remove existing selection
pViewSh->GetViewData()->GetDispatcher().Execute( SID_CURRENTCELL,
SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD,
diff --git a/sc/source/ui/app/lnktrans.cxx b/sc/source/ui/app/lnktrans.cxx
index 055f8da1a828..d410d6b10099 100644
--- a/sc/source/ui/app/lnktrans.cxx
+++ b/sc/source/ui/app/lnktrans.cxx
@@ -73,7 +73,7 @@ void ScLinkTransferObj::AddSupportedFormats()
sal_Bool ScLinkTransferObj::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
if ( aLinkURL.Len() )
{
INetBookmark aBmk( aLinkURL, aLinkText );
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index 31c31734612d..535b97ef9381 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -67,11 +67,11 @@ ScMessagePool::ScMessagePool()
aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ),
aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, NULL, NULL ) ),
aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, NULL ) ),
- aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, FALSE ) ),
+ aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, false ) ),
aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ),
aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ),
//
- aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, FALSE ) )
+ aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, false ) )
{
ppPoolDefaults = new SfxPoolItem*[MSGPOOL_END - MSGPOOL_START + 1];
@@ -99,7 +99,7 @@ ScMessagePool::~ScMessagePool()
Delete();
SetSecondaryPool( NULL ); // before deleting defaults (accesses defaults)
- for ( USHORT i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ )
+ for ( sal_uInt16 i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ )
SetRefCount( *ppPoolDefaults[i], 0 );
delete[] ppPoolDefaults;
@@ -108,7 +108,7 @@ ScMessagePool::~ScMessagePool()
}
-SfxMapUnit ScMessagePool::GetMetric( USHORT nWhich ) const
+SfxMapUnit ScMessagePool::GetMetric( sal_uInt16 nWhich ) const
{
// eigene Attribute: Twips, alles andere 1/100 mm
diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx
index c82bc7d79512..d64a15b2bf09 100644
--- a/sc/source/ui/app/rfindlst.cxx
+++ b/sc/source/ui/app/rfindlst.cxx
@@ -45,7 +45,7 @@ static ColorData aColNames[SC_RANGECOLORS] =
ScRangeFindList::ScRangeFindList(const String& rName) :
aDocName( rName ),
- bHidden( FALSE )
+ bHidden( false )
{
}
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 961176c3f892..d1c56ec1ae77 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -131,7 +131,7 @@
//------------------------------------------------------------------
-ScResId::ScResId( USHORT nId ) :
+ScResId::ScResId( sal_uInt16 nId ) :
ResId( nId, *SC_MOD()->GetResMgr() )
{
}
@@ -236,7 +236,7 @@ void ScDLL::Init()
::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
// common SFX controller
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( false, pMod );
// Svx-StatusBar-Controller
SvxInsertStatusBarControl ::RegisterControl(SID_ATTR_INSERT, pMod);
@@ -262,36 +262,36 @@ void ScDLL::Init()
ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
ScNavigatorDialogWrapper ::RegisterChildWindowContext(
sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
- ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScOptSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPivotLayoutWrapper ::RegisterChildWindow(FALSE, pMod);
- ScTabOpDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSpecialFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScDbNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScConsolidateDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPrintAreasDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScCondFormatDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScColRowNameRangesDlgWrapper::RegisterChildWindow(FALSE, pMod);
- ScFormulaDlgWrapper ::RegisterChildWindow(FALSE, pMod);
+ ScSolverDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScOptSolverDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScNameDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScPivotLayoutWrapper ::RegisterChildWindow(false, pMod);
+ ScTabOpDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScFilterDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScSpecialFilterDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScDbNameDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScConsolidateDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScPrintAreasDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScCondFormatDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScColRowNameRangesDlgWrapper::RegisterChildWindow(false, pMod);
+ ScFormulaDlgWrapper ::RegisterChildWindow(false, pMod);
// First docking Window for Calc
- ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod);
+ ScFunctionChildWindow ::RegisterChildWindow(false, pMod);
// Redlining- Window
- ScAcceptChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSimpleRefDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
- ScHighlightChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
+ ScAcceptChgDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScSimpleRefDlgWrapper ::RegisterChildWindow(false, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
+ ScHighlightChgDlgWrapper ::RegisterChildWindow(false, pMod);
- SvxSearchDialogWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxHlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxFontWorkChildWindow ::RegisterChildWindow(FALSE, pMod);
- SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod);
- GalleryChildWindow ::RegisterChildWindow(FALSE, pMod);
- ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod);
+ SvxSearchDialogWrapper ::RegisterChildWindow(false, pMod);
+ SvxHlinkDlgWrapper ::RegisterChildWindow(false, pMod);
+ SvxFontWorkChildWindow ::RegisterChildWindow(false, pMod);
+ SvxIMapDlgChildWindow ::RegisterChildWindow(false, pMod);
+ GalleryChildWindow ::RegisterChildWindow(false, pMod);
+ ScSpellDialogChildWindow ::RegisterChildWindow(false, pMod);
- ScValidityRefChildWin::RegisterChildWindow(FALSE, pMod);
+ ScValidityRefChildWin::RegisterChildWindow(false, pMod);
// Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init
@@ -308,7 +308,7 @@ void ScDLL::Init()
// ::com::sun::star::form::component::Form-Objekt-Factory eintragen
FmFormObjFactory();
- pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<UINT16>(pMod->GetAppOptions().GetAppMetric()) ) );
+ pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<sal_uInt16>(pMod->GetAppOptions().GetAppMetric()) ) );
// StarOne Services are now handled in the registry
}
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index ba9634af5464..41ba2db31cbe 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -58,7 +58,6 @@
#include <vcl/status.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/printer.hxx>
#include <editeng/langitem.hxx>
#include <svtools/colorcfg.hxx>
@@ -118,7 +117,7 @@
#define SC_IDLE_STEP 75
#define SC_IDLE_COUNT 50
-static USHORT nIdleCount = 0;
+static sal_uInt16 nIdleCount = 0;
//------------------------------------------------------------------
@@ -132,7 +131,7 @@ SFX_IMPL_INTERFACE( ScModule, SfxShell, ScResId(RID_APPTITLE) )
//------------------------------------------------------------------
ScModule::ScModule( SfxObjectFactory* pFact ) :
- SfxModule( SfxApplication::CreateResManager( "sc" ), FALSE, pFact, NULL ),
+ SfxModule( SfxApplication::CreateResManager( "sc" ), false, pFact, NULL ),
pSelTransfer( NULL ),
pMessagePool( NULL ),
pRefInputHandler( NULL ),
@@ -151,9 +150,9 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
pSvxErrorHdl( NULL ),
pFormEditData( NULL ),
nCurRefDlgId( 0 ),
- bIsWaterCan( FALSE ),
- bIsInEditCommand( FALSE ),
- bIsInExecuteDrop( FALSE ),
+ bIsWaterCan( false ),
+ bIsInEditCommand( false ),
+ bIsInExecuteDrop( false ),
mbIsInSharedDocLoading( false ),
mbIsInSharedDocSaving( false )
{
@@ -216,10 +215,10 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
if ( ScDetectiveFunc::IsColorsInitialized() )
{
const svtools::ColorConfig& rColors = GetColorConfig();
- BOOL bArrows =
+ sal_Bool bArrows =
( ScDetectiveFunc::GetArrowColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVE).nColor ||
ScDetectiveFunc::GetErrorColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVEERROR).nColor );
- BOOL bComments =
+ sal_Bool bComments =
( ScDetectiveFunc::GetCommentColor() != (ColorData)rColors.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor );
if ( bArrows || bComments )
{
@@ -324,7 +323,7 @@ void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA(SfxSimpleHint) )
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId();
if ( nHintId == SFX_HINT_DEINITIALIZING )
{
// ConfigItems must be removed before ConfigManager
@@ -367,68 +366,6 @@ void ScModule::DeleteCfg()
}
//------------------------------------------------------------------
-
-#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s))
-
-void ScModule::FillStatusBar(StatusBar& rStatusBar)
-{
- // Dokumentposition (Tabelle x / y)
- rStatusBar.InsertItem( SID_STATUS_DOCPOS,
- TEXT_WIDTH( String().Fill( 10, 'X' ) ),
- SIB_LEFT|SIB_AUTOSIZE );
- rStatusBar.SetHelpId( SID_STATUS_DOCPOS, SID_STATUS_DOCPOS );
-
- // Seitenvorlage
- rStatusBar.InsertItem( SID_STATUS_PAGESTYLE,
- TEXT_WIDTH( String().Fill( 15, 'X' ) ),
- SIB_LEFT|SIB_AUTOSIZE );
- rStatusBar.SetHelpId( SID_STATUS_PAGESTYLE, SID_STATUS_PAGESTYLE );
-
- // Einfuege-/Ueberschreibmodus
- rStatusBar.InsertItem( SID_ATTR_INSERT,
- SvxInsertStatusBarControl::GetDefItemWidth(rStatusBar),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_ATTR_INSERT, SID_ATTR_INSERT );
-
- // Selektionsmodus
- rStatusBar.InsertItem( SID_STATUS_SELMODE,
- SvxSelectionModeControl::GetDefItemWidth(rStatusBar),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_STATUS_SELMODE, SID_STATUS_SELMODE );
-
- // Dokument geaendert
- rStatusBar.InsertItem( SID_DOC_MODIFIED,
- SvxModifyControl::GetDefItemWidth(rStatusBar));
-
- // signatures
- rStatusBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rStatusBar ), SIB_USERDRAW );
- rStatusBar.SetHelpId(SID_SIGNATURE, SID_SIGNATURE);
-
-
- rStatusBar.SetHelpId( SID_DOC_MODIFIED, SID_DOC_MODIFIED );
-
- // den aktuellen Kontext anzeigen Uhrzeit / FramePos / TabellenInfo / Errors
- rStatusBar.InsertItem( SID_ATTR_SIZE,
- SvxPosSizeStatusBarControl::GetDefItemWidth(rStatusBar),
- SIB_AUTOSIZE|SIB_LEFT|SIB_USERDRAW);
- rStatusBar.SetHelpId( SID_ATTR_SIZE, SID_ATTR_SIZE );
-
- // Ma"sstab
- rStatusBar.InsertItem( SID_ATTR_ZOOM,
- SvxZoomStatusBarControl::GetDefItemWidth(rStatusBar),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_ATTR_ZOOM, SID_ATTR_ZOOM );
-
- // ZoomSlider
- rStatusBar.InsertItem( SID_ATTR_ZOOMSLIDER,
- TEXT_WIDTH( String().Fill( 15, 'X' ) ),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_ATTR_ZOOMSLIDER, SID_ATTR_ZOOMSLIDER );
-}
-
-#undef TEXT_WIDTH
-
-//------------------------------------------------------------------
//
// von der Applikation verschoben:
//
@@ -440,7 +377,7 @@ void ScModule::Execute( SfxRequest& rReq )
SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : NULL;
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -448,27 +385,21 @@ void ScModule::Execute( SfxRequest& rReq )
{
String aMacroName =
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Template.Samples.ShowStyles"));
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
- pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() );
- pApp->LeaveBasicCall();
+ SfxApplication::CallAppBasic( aMacroName );
}
break;
case SID_EURO_CONVERTER:
{
String aMacroName =
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Euro.ConvertRun.Main"));
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
- pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() );
- pApp->LeaveBasicCall();
+ SfxApplication::CallAppBasic( aMacroName );
}
break;
case SID_AUTOSPELL_CHECK:
{
- BOOL bSet;
+ sal_Bool bSet;
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
else
{ // Toggle
@@ -489,7 +420,7 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_ATTR_METRIC:
{
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) )
{
FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue();
switch( eUnit )
@@ -519,7 +450,7 @@ void ScModule::Execute( SfxRequest& rReq )
case FID_AUTOCOMPLETE:
{
ScAppOptions aNewOpts( GetAppOptions() );
- BOOL bNew = !aNewOpts.GetAutoComplete();
+ sal_Bool bNew = !aNewOpts.GetAutoComplete();
aNewOpts.SetAutoComplete( bNew );
SetAppOptions( aNewOpts );
ScInputHandler::SetAutoComplete( bNew );
@@ -532,8 +463,8 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_DETECTIVE_AUTO:
{
ScAppOptions aNewOpts( GetAppOptions() );
- BOOL bNew = !aNewOpts.GetDetectiveAuto();
- SFX_REQUEST_ARG( rReq, pAuto, SfxBoolItem, SID_DETECTIVE_AUTO, sal_False );
+ sal_Bool bNew = !aNewOpts.GetDetectiveAuto();
+ SFX_REQUEST_ARG( rReq, pAuto, SfxBoolItem, SID_DETECTIVE_AUTO, false );
if ( pAuto )
bNew = pAuto->GetValue();
@@ -573,7 +504,7 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_ATTR_CHAR_CTL_LANGUAGE:
{
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), sal_True, &pItem ) )
{
ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL;
@@ -647,7 +578,7 @@ void ScModule::Execute( SfxRequest& rReq )
void ScModule::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -662,17 +593,17 @@ void ScModule::GetState( SfxItemSet& rSet )
rSet.Put( SfxUInt16Item( nWhich, GetAppOptions().GetStatusFunc() ) );
break;
case SID_ATTR_METRIC:
- rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast<UINT16>(GetAppOptions().GetAppMetric()) ) );
+ rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast<sal_uInt16>(GetAppOptions().GetAppMetric()) ) );
break;
case SID_AUTOSPELL_CHECK:
{
- BOOL bAuto;
+ sal_Bool bAuto;
ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
if ( pDocSh )
bAuto = pDocSh->GetDocument()->GetDocOptions().IsAutoSpell();
else
{
- USHORT nDummyLang, nDummyCjk, nDummyCtl;
+ sal_uInt16 nDummyLang, nDummyCjk, nDummyCtl;
GetSpellSettings( nDummyLang, nDummyCjk, nDummyCtl, bAuto );
}
rSet.Put( SfxBoolItem( nWhich, bAuto ) );
@@ -707,7 +638,7 @@ void ScModule::HideDisabledSlots( SfxItemSet& rSet )
{
SfxBindings& rBindings = pViewFrm->GetBindings();
SfxWhichIter aIter( rSet );
- for( USHORT nWhich = aIter.FirstWhich(); nWhich != 0; nWhich = aIter.NextWhich() )
+ for( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich != 0; nWhich = aIter.NextWhich() )
{
ScViewUtil::HideDisabledSlot( rSet, rBindings, nWhich );
// always disable the slots
@@ -835,22 +766,22 @@ const ScDocOptions& ScModule::GetDocOptions()
#define LRU_MAX 10
#endif
-void ScModule::InsertEntryToLRUList(USHORT nFIndex)
+void ScModule::InsertEntryToLRUList(sal_uInt16 nFIndex)
{
if(nFIndex != 0)
{
const ScAppOptions& rAppOpt = GetAppOptions();
- USHORT nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (USHORT)LRU_MAX );
- USHORT* pLRUListIds = rAppOpt.GetLRUFuncList();
+ sal_uInt16 nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX );
+ sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList();
- USHORT aIdxList[LRU_MAX];
- USHORT n = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 aIdxList[LRU_MAX];
+ sal_uInt16 n = 0;
+ sal_Bool bFound = false;
while ((n < LRU_MAX) && n<nLRUFuncCount) // alte Liste abklappern
{
if (!bFound && (pLRUListIds[n]== nFIndex))
- bFound = TRUE; // erster! Treffer
+ bFound = sal_True; // erster! Treffer
else if (bFound)
aIdxList[n ] = pLRUListIds[n]; // hinter Treffer kopieren
else if ((n+1) < LRU_MAX)
@@ -872,7 +803,7 @@ void ScModule::InsertEntryToLRUList(USHORT nFIndex)
void ScModule::RecentFunctionsChanged()
{
// update function list window
- USHORT nFuncListID = ScFunctionChildWindow::GetChildWindowId();
+ sal_uInt16 nFuncListID = ScFunctionChildWindow::GetChildWindowId();
//! notify all views
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
@@ -997,7 +928,7 @@ SvtUserOptions& ScModule::GetUserOptions()
return *pUserOptions;
}
-USHORT ScModule::GetOptDigitLanguage()
+sal_uInt16 ScModule::GetOptDigitLanguage()
{
SvtCTLOptions::TextNumerals eNumerals = GetCTLOptions().GetCTLTextNumerals();
return ( eNumerals == SvtCTLOptions::NUMERALS_ARABIC ) ? LANGUAGE_ENGLISH_US :
@@ -1016,12 +947,12 @@ USHORT ScModule::GetOptDigitLanguage()
// und SID_AUTOSPELL_CHECK
//
-#define IS_AVAILABLE(w,item) (SFX_ITEM_SET==rOptSet.GetItemState((w),TRUE,&item))
+#define IS_AVAILABLE(w,item) (SFX_ITEM_SET==rOptSet.GetItemState((w),sal_True,&item))
void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
{
- USHORT nOldSpellLang, nOldCjkLang, nOldCtlLang;
- BOOL bOldAutoSpell;
+ sal_uInt16 nOldSpellLang, nOldCjkLang, nOldCtlLang;
+ sal_Bool bOldAutoSpell;
GetSpellSettings( nOldSpellLang, nOldCjkLang, nOldCtlLang, bOldAutoSpell );
if (!pAppCfg)
@@ -1041,12 +972,12 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL;
const SfxPoolItem* pItem = NULL;
- BOOL bRepaint = FALSE;
- BOOL bUpdateMarks = FALSE;
- BOOL bUpdateRefDev = FALSE;
- BOOL bCalcAll = FALSE;
- BOOL bSaveAppOptions = FALSE;
- BOOL bSaveInputOptions = FALSE;
+ sal_Bool bRepaint = false;
+ sal_Bool bUpdateMarks = false;
+ sal_Bool bUpdateRefDev = false;
+ sal_Bool bCalcAll = false;
+ sal_Bool bSaveAppOptions = false;
+ sal_Bool bSaveInputOptions = false;
//--------------------------------------------------------------------------
@@ -1058,19 +989,19 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
{
PutItem( *pItem );
pAppCfg->SetAppMetric( (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue() );
- bSaveAppOptions = TRUE;
+ bSaveAppOptions = sal_True;
}
if ( IS_AVAILABLE(SCITEM_USERLIST,pItem) )
{
ScGlobal::SetUserList( ((const ScUserListItem*)pItem)->GetUserList() );
- bSaveAppOptions = TRUE;
+ bSaveAppOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_OPT_SYNCZOOM,pItem) )
{
pAppCfg->SetSynchronizeZoom( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
- bSaveAppOptions = TRUE;
+ bSaveAppOptions = sal_True;
}
//============================================
@@ -1086,7 +1017,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
ScViewData* pViewData = pViewSh->GetViewData();
const ScViewOptions& rOldOpt = pViewData->GetOptions();
- BOOL bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) !=
+ sal_Bool bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) !=
rNewOpt.GetOption( VOPT_ANCHOR ) );
if ( rOldOpt != rNewOpt )
@@ -1094,7 +1025,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
pViewData->SetOptions( rNewOpt ); // veraendert rOldOpt
pViewData->GetDocument()->SetViewOptions( rNewOpt );
pDocSh->SetDocumentModified();
- bRepaint = TRUE;
+ bRepaint = sal_True;
}
if ( bAnchorList )
pViewSh->UpdateAnchorHandles();
@@ -1125,7 +1056,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
pViewData->SetOptions( aNewViewOpt );
pViewData->GetDocument()->SetViewOptions( aNewViewOpt );
pDocSh->SetDocumentModified();
- bRepaint = TRUE;
+ bRepaint = sal_True;
}
}
ScViewOptions aNewViewOpt ( GetViewOptions() );
@@ -1177,7 +1108,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// nach den eigentlichen DocOptions auch noch die TabDistance setzen
if ( IS_AVAILABLE(SID_ATTR_DEFTABSTOP,pItem) )
{
- USHORT nTabDist = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTabDist = ((SfxUInt16Item*)pItem)->GetValue();
ScDocOptions aOpt(GetDocOptions());
aOpt.SetTabDistance(nTabDist);
SetDocOptions( aOpt );
@@ -1197,7 +1128,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if ( IS_AVAILABLE(SID_AUTOSPELL_CHECK,pItem) ) // an Doc-Options
{
- BOOL bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue();
if (pDoc)
{
@@ -1218,7 +1149,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
//#92038#; don't set document modified, because this flag is no longer saved
// pDocSh->SetDocumentModified();
- bRepaint = TRUE; // weil HideAutoSpell evtl. ungueltig
+ bRepaint = sal_True; // weil HideAutoSpell evtl. ungueltig
//! alle Views painten ???
}
}
@@ -1244,53 +1175,53 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if ( IS_AVAILABLE(SID_SC_INPUT_SELECTIONPOS,pItem) )
{
pInputCfg->SetMoveDir( ((const SfxUInt16Item*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_SELECTION,pItem) )
{
pInputCfg->SetMoveSelection( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_EDITMODE,pItem) )
{
pInputCfg->SetEnterEdit( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_FMT_EXPAND,pItem) )
{
pInputCfg->SetExtendFormat( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_RANGEFINDER,pItem) )
{
pInputCfg->SetRangeFinder( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_REF_EXPAND,pItem) )
{
pInputCfg->SetExpandRefs( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_MARK_HEADER,pItem) )
{
pInputCfg->SetMarkHeader( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
- bUpdateMarks = TRUE;
+ bSaveInputOptions = sal_True;
+ bUpdateMarks = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_TEXTWYSIWYG,pItem) )
{
- BOOL bNew = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bNew = ((const SfxBoolItem*)pItem)->GetValue();
if ( bNew != pInputCfg->GetTextWysiwyg() )
{
pInputCfg->SetTextWysiwyg( bNew );
- bSaveInputOptions = TRUE;
- bUpdateRefDev = TRUE;
+ bSaveInputOptions = sal_True;
+ bUpdateRefDev = sal_True;
}
}
if( IS_AVAILABLE( SID_SC_INPUT_REPLCELLSWARN, pItem ) )
{
pInputCfg->SetReplaceCellsWarn( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
//============================================
@@ -1321,9 +1252,9 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
WaitObject aWait( pDocSh->GetActiveDialogParent() );
pDoc->CalcAll();
if ( pViewSh )
- pViewSh->UpdateCharts( TRUE );
+ pViewSh->UpdateCharts( sal_True );
else
- ScDBFunc::DoUpdateCharts( ScAddress(), pDoc, TRUE );
+ ScDBFunc::DoUpdateCharts( ScAddress(), pDoc, sal_True );
if (pBindings)
pBindings->Invalidate( SID_ATTR_SIZE ); //SvxPosSize-StatusControl-Update
}
@@ -1381,7 +1312,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// update view scale
ScViewData* pViewData = pOneViewSh->GetViewData();
- pOneViewSh->SetZoom( pViewData->GetZoomX(), pViewData->GetZoomY(), FALSE );
+ pOneViewSh->SetZoom( pViewData->GetZoomX(), pViewData->GetZoomY(), false );
// repaint
pOneViewSh->PaintGrid();
@@ -1401,7 +1332,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
//
//------------------------------------------------------------------
-ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, BOOL bUseRef )
+ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, sal_Bool bUseRef )
{
if ( pRefInputHandler && bUseRef )
return pRefInputHandler;
@@ -1440,25 +1371,25 @@ void ScModule::SetInputMode( ScInputMode eMode )
pHdl->SetMode( eMode );
}
-BOOL ScModule::IsEditMode()
+sal_Bool ScModule::IsEditMode()
{
ScInputHandler* pHdl = GetInputHdl();
return pHdl && pHdl->IsEditMode();
}
-BOOL ScModule::IsInputMode()
+sal_Bool ScModule::IsInputMode()
{
ScInputHandler* pHdl = GetInputHdl();
return pHdl && pHdl->IsInputMode();
}
-BOOL ScModule::InputKeyEvent( const KeyEvent& rKEvt, BOOL bStartEdit )
+sal_Bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, sal_Bool bStartEdit )
{
ScInputHandler* pHdl = GetInputHdl();
- return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : FALSE );
+ return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : false );
}
-void ScModule::InputEnterHandler( BYTE nBlockMode )
+void ScModule::InputEnterHandler( sal_uInt8 nBlockMode )
{
if ( !SFX_APP()->IsDowning() ) // nicht beim Programmende
{
@@ -1539,7 +1470,7 @@ String ScModule::InputGetFormulaStr()
return aStr;
}
-void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
+void ScModule::ActivateInputWindow( const String* pStrFormula, sal_Bool bMatrix )
{
ScInputHandler* pHdl = GetInputHdl();
if ( pHdl )
@@ -1550,10 +1481,10 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
// Formel uebernehmen
if ( pWin )
{
- pWin->SetFuncString( *pStrFormula, FALSE );
- // SetSumAssignMode wegen FALSE nicht noetig
+ pWin->SetFuncString( *pStrFormula, false );
+ // SetSumAssignMode wegen sal_False nicht noetig
}
- BYTE nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL;
+ sal_uInt8 nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL;
pHdl->EnterHandler( nMode );
// ohne Invalidate bleibt die Selektion stehen, wenn die Formel unveraendert ist
@@ -1565,8 +1496,8 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
// Abbrechen
if ( pWin )
{
- pWin->SetFuncString( EMPTY_STRING, FALSE );
- // SetSumAssignMode wegen FALSE nicht noetig
+ pWin->SetFuncString( EMPTY_STRING, false );
+ // SetSumAssignMode wegen sal_False nicht noetig
}
pHdl->CancelHandler();
}
@@ -1579,7 +1510,7 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
//
//------------------------------------------------------------------
-void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm )
+void ScModule::SetRefDialog( sal_uInt16 nId, sal_Bool bVis, SfxViewFrame* pViewFrm )
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
@@ -1605,7 +1536,7 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm )
else
{
// no ScTabViewShell - possible for example from a Basic macro
- bVis = FALSE;
+ bVis = false;
nCurRefDlgId = 0; // don't set nCurRefDlgId if no dialog is created
}
@@ -1617,7 +1548,7 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm )
}
}
-SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId )
+SfxChildWindow* lcl_GetChildWinFromAnyView( sal_uInt16 nId )
{
// first try the current view
@@ -1643,12 +1574,12 @@ SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId )
return NULL; // none found
}
-BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh)
+sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bIsModal = FALSE;
+ sal_Bool bIsModal = false;
if ( nCurRefDlgId )
{
@@ -1664,7 +1595,7 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh)
// in 592 and above, the dialog isn't visible in other views
// if the dialog is open but can't be accessed, disable input
- bIsModal = TRUE;
+ bIsModal = sal_True;
}
// pChildWnd kann 0 sein, wenn der Dialog nach dem Umschalten
@@ -1680,12 +1611,12 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh)
return bIsModal;
}
-BOOL ScModule::IsTableLocked()
+sal_Bool ScModule::IsTableLocked()
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bLocked = FALSE;
+ sal_Bool bLocked = false;
// bisher nur bei ScAnyRefDlg
@@ -1695,18 +1626,18 @@ BOOL ScModule::IsTableLocked()
if ( pChildWnd )
bLocked = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow())->IsTableLocked();
else
- bLocked = TRUE; // for other views, see IsModalMode
+ bLocked = sal_True; // for other views, see IsModalMode
}
return bLocked;
}
-BOOL ScModule::IsRefDialogOpen()
+sal_Bool ScModule::IsRefDialogOpen()
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bIsOpen = FALSE;
+ sal_Bool bIsOpen = false;
if ( nCurRefDlgId )
{
@@ -1714,18 +1645,18 @@ BOOL ScModule::IsRefDialogOpen()
if ( pChildWnd )
bIsOpen = pChildWnd->IsVisible();
else
- bIsOpen = TRUE; // for other views, see IsModalMode
+ bIsOpen = sal_True; // for other views, see IsModalMode
}
return bIsOpen;
}
-BOOL ScModule::IsFormulaMode()
+sal_Bool ScModule::IsFormulaMode()
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bIsFormula = FALSE;
+ sal_Bool bIsFormula = false;
if ( nCurRefDlgId )
{
@@ -1744,7 +1675,7 @@ BOOL ScModule::IsFormulaMode()
}
if (bIsInEditCommand)
- bIsFormula = TRUE;
+ bIsFormula = sal_True;
return bIsFormula;
}
@@ -1753,14 +1684,14 @@ void lcl_MarkedTabs( const ScMarkData& rMark, SCTAB& rStartTab, SCTAB& rEndTab )
{
if (rMark.GetSelectCount() > 1)
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for (SCTAB i=0; i<=MAXTAB; i++)
if (rMark.GetTableSelect(i))
{
if (bFirst)
rStartTab = i;
rEndTab = i;
- bFirst = FALSE;
+ bFirst = false;
}
}
}
@@ -1795,8 +1726,8 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc,
IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow());
// hide the (color) selection now instead of later from LoseFocus,
- // don't abort the ref input that causes this call (bDoneRefMode = FALSE)
- pRefDlg->HideReference( FALSE );
+ // don't abort the ref input that causes this call (bDoneRefMode = sal_False)
+ pRefDlg->HideReference( false );
pRefDlg->SetReference( aNew, pDoc );
}
}
@@ -1864,7 +1795,7 @@ void ScModule::EndReference()
void ScModule::AnythingChanged()
{
- ULONG nOldTime = aIdleTimer.GetTimeout();
+ sal_uLong nOldTime = aIdleTimer.GetTimeout();
if ( nOldTime != SC_IDLE_MIN )
aIdleTimer.SetTimeout( SC_IDLE_MIN );
@@ -1892,15 +1823,15 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
return 0;
}
- BOOL bMore = FALSE;
+ sal_Bool bMore = false;
ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bLinks = pDoc->IdleCheckLinks();
- BOOL bWidth = pDoc->IdleCalcTextWidth();
- BOOL bSpell = pDoc->ContinueOnlineSpelling();
+ sal_Bool bLinks = pDoc->IdleCheckLinks();
+ sal_Bool bWidth = pDoc->IdleCalcTextWidth();
+ sal_Bool bSpell = pDoc->ContinueOnlineSpelling();
if ( bSpell )
aSpellTimer.Start(); // da ist noch was
@@ -1912,8 +1843,8 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
lcl_CheckNeedsRepaint( pDocSh );
}
- ULONG nOldTime = aIdleTimer.GetTimeout();
- ULONG nNewTime = nOldTime;
+ sal_uLong nOldTime = aIdleTimer.GetTimeout();
+ sal_uLong nNewTime = nOldTime;
if ( bMore )
{
nNewTime = SC_IDLE_MIN;
@@ -1958,7 +1889,7 @@ IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG )
}
//virtuelle Methoden fuer den Optionendialog
-SfxItemSet* ScModule::CreateItemSet( USHORT nId )
+SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
{
SfxItemSet* pRet = 0;
if(SID_SC_EDITOPTIONS == nId)
@@ -2002,7 +1933,7 @@ SfxItemSet* ScModule::CreateItemSet( USHORT nId )
// SFX_APP()->GetOptions( aSet );
pRet->Put( SfxUInt16Item( SID_ATTR_METRIC,
- sal::static_int_cast<UINT16>(GetAppOptions().GetAppMetric()) ) );
+ sal::static_int_cast<sal_uInt16>(GetAppOptions().GetAppMetric()) ) );
// TP_CALC
pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP,
@@ -2051,7 +1982,7 @@ SfxItemSet* ScModule::CreateItemSet( USHORT nId )
return pRet;
}
-void ScModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void ScModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if(SID_SC_EDITOPTIONS == nId)
{
@@ -2059,7 +1990,7 @@ void ScModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
}
-SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -2190,59 +2121,59 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
return 0;
}
-BOOL ScModule::RegisterRefWindow( USHORT nSlotId, Window *pWnd )
+sal_Bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd )
{
std::list<Window*> & rlRefWindow = m_mapRefWindow[nSlotId];
if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() )
{
rlRefWindow.push_back( pWnd );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScModule::UnregisterRefWindow( USHORT nSlotId, Window *pWnd )
+sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd )
{
- std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
- return FALSE;
+ return false;
std::list<Window*> & rlRefWindow = iSlot->second;
std::list<Window*>::iterator i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
if( i == rlRefWindow.end() )
- return FALSE;
+ return false;
rlRefWindow.erase( i );
if( !rlRefWindow.size() )
m_mapRefWindow.erase( nSlotId );
- return TRUE;
+ return sal_True;
}
-BOOL ScModule::IsAliveRefDlg( USHORT nSlotId, Window *pWnd )
+sal_Bool ScModule::IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd )
{
- std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
- return FALSE;
+ return false;
std::list<Window*> & rlRefWindow = iSlot->second;
return rlRefWindow.end() != std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
}
-Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor )
+Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, Window *pWndAncestor )
{
if (!pWndAncestor)
return NULL;
- std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
return NULL;
@@ -2265,7 +2196,7 @@ Window * ScModule::Find1RefWindow( Window *pWndAncestor )
while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent;
- for( std::map<USHORT, std::list<Window*> >::iterator i = m_mapRefWindow.begin();
+ for( std::map<sal_uInt16, std::list<Window*> >::iterator i = m_mapRefWindow.begin();
i!=m_mapRefWindow.end(); ++i )
for( std::list<Window*>::iterator j = i->second.begin(); j!=i->second.end(); ++j )
if ( pWndAncestor->IsWindowOrChild( *j, (*j)->IsSystemWindow() ) )
diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx
index f5441715f270..eaa2aa9aa237 100644
--- a/sc/source/ui/app/scmod2.cxx
+++ b/sc/source/ui/app/scmod2.cxx
@@ -50,8 +50,8 @@ using namespace com::sun::star;
//------------------------------------------------------------------
-void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang,
- BOOL& rAutoSpell )
+void ScModule::GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang,
+ sal_Bool& rAutoSpell )
{
// use SvtLinguConfig instead of service LinguProperties to avoid
// loading the linguistic component
@@ -66,7 +66,7 @@ void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCt
rAutoSpell = aOptions.bIsSpellAuto;
}
-void ScModule::SetAutoSpellProperty( BOOL bSet )
+void ScModule::SetAutoSpellProperty( sal_Bool bSet )
{
// use SvtLinguConfig instead of service LinguProperties to avoid
// loading the linguistic component
@@ -79,15 +79,15 @@ void ScModule::SetAutoSpellProperty( BOOL bSet )
-BOOL ScModule::HasThesaurusLanguage( USHORT nLang )
+sal_Bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang )
{
if ( nLang == LANGUAGE_NONE )
- return FALSE;
+ return false;
lang::Locale aLocale;
SvxLanguageToLocale( aLocale, nLang );
- BOOL bHasLang = FALSE;
+ sal_Bool bHasLang = false;
try
{
uno::Reference< linguistic2::XThesaurus > xThes(LinguMgr::GetThesaurus());
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index f229e885d0d5..7e9cbd9621a2 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -56,9 +56,9 @@ using namespace com::sun::star;
// -----------------------------------------------------------------------
-BOOL lcl_IsURLButton( SdrObject* pObject )
+sal_Bool lcl_IsURLButton( SdrObject* pObject )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObject);
if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
@@ -76,7 +76,7 @@ BOOL lcl_IsURLButton( SdrObject* pObject )
uno::Any aAny = xPropSet->getPropertyValue( sPropButtonType );
form::FormButtonType eTmp;
if ( (aAny >>= eTmp) && eTmp == form::FormButtonType_URL )
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -98,13 +98,13 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView
{
// handle selection on drawing layer
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount )
{
if ( nMarkCount == 1 )
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if ( nSdrObjKind == OBJ_GRAF )
{
@@ -176,11 +176,11 @@ ScSelectionTransferObj::~ScSelectionTransferObj()
DBG_ASSERT( !pView, "ScSelectionTransferObj dtor: ForgetView not called" );
}
-BOOL ScSelectionTransferObj::StillValid()
+sal_Bool ScSelectionTransferObj::StillValid()
{
//! check if view still has same cell selection
- //! (but return FALSE if data has changed inbetween)
- return FALSE;
+ //! (but return sal_False if data has changed inbetween)
+ return false;
}
void ScSelectionTransferObj::ForgetView()
@@ -296,10 +296,10 @@ void ScSelectionTransferObj::CreateCellData()
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
- // bApi = TRUE -> no error mesages
- // #i18364# bStopEdit = FALSE -> don't end edit mode
+ // bApi = sal_True -> no error mesages
+ // #i18364# bStopEdit = sal_False -> don't end edit mode
// (this may be called from pasting into the edit line)
- BOOL bCopied = pViewData->GetView()->CopyToClip( pClipDoc, FALSE, TRUE, TRUE, FALSE );
+ sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, sal_True, sal_True, false );
ScDrawLayer::SetGlobalDrawPersist(NULL);
@@ -332,7 +332,7 @@ void ScSelectionTransferObj::CreateCellData()
}
//! make static member of ScDrawView
-extern void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle );
+extern void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_Bool& rOneOle );
void ScSelectionTransferObj::CreateDrawData()
{
@@ -344,7 +344,7 @@ void ScSelectionTransferObj::CreateDrawData()
ScDrawView* pDrawView = pView->GetScDrawView();
if ( pDrawView )
{
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -401,7 +401,7 @@ ScDrawTransferObj* ScSelectionTransferObj::GetDrawData()
sal_Bool ScSelectionTransferObj::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
uno::Reference<datatransfer::XTransferable> xSource;
switch (eMode)
diff --git a/sc/source/ui/app/template.cxx b/sc/source/ui/app/template.cxx
index b9bddee4fe1d..c613bf9cd41a 100644
--- a/sc/source/ui/app/template.cxx
+++ b/sc/source/ui/app/template.cxx
@@ -35,7 +35,7 @@
//------------------------------------------------------------------------
-ScTemplateDlg::ScTemplateDlg(Window * pParent, USHORT nAppResource) :
+ScTemplateDlg::ScTemplateDlg(Window * pParent, sal_uInt16 nAppResource) :
// SfxTemplateDlg( pParent, nAppResource )
SfxTemplateDialog( pParent )
{
@@ -49,9 +49,9 @@ ScTemplateDlg::~ScTemplateDlg()
//------------------------------------------------------------------------
-BOOL ScTemplateDlg::New(String &rNewName)
+sal_Bool ScTemplateDlg::New(String &rNewName)
{
- return TRUE;
+ return sal_True;
}
@@ -60,9 +60,9 @@ void ScTemplateDlg::Edit(const String &)
}
-BOOL ScTemplateDlg::Delete(const String &)
+sal_Bool ScTemplateDlg::Delete(const String &)
{
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index ad855bfbbc59..b584c7e86f7c 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -107,7 +107,7 @@ void ScTransferObj::GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCR
}
void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor,
- const ScRange& rBlock, BOOL bMetaFile )
+ const ScRange& rBlock, sal_Bool bMetaFile )
{
if (!pDoc)
return;
@@ -133,8 +133,9 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc
nDragHandleX( 0 ),
nDragHandleY( 0 ),
nDragSourceFlags( 0 ),
- bDragWasInternal( FALSE ),
- bUsedForLink( FALSE )
+ bDragWasInternal( false ),
+ bUsedForLink( false ),
+ bUseInApi( false )
{
DBG_ASSERT(pDoc->IsClipboard(), "wrong document");
@@ -147,25 +148,25 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc
SCCOL nCol2;
SCROW nRow2;
pDoc->GetClipStart( nCol1, nRow1 );
- pDoc->GetClipArea( nCol2, nRow2, TRUE ); // real source area - include filtered rows
+ pDoc->GetClipArea( nCol2, nRow2, sal_True ); // real source area - include filtered rows
nCol2 = sal::static_int_cast<SCCOL>( nCol2 + nCol1 );
nRow2 = sal::static_int_cast<SCROW>( nRow2 + nRow1 );
SCCOL nDummy;
- pDoc->GetClipArea( nDummy, nNonFiltered, FALSE );
+ pDoc->GetClipArea( nDummy, nNonFiltered, false );
bHasFiltered = (nNonFiltered < (nRow2 - nRow1));
++nNonFiltered; // to get count instead of diff
SCTAB nTab1=0;
SCTAB nTab2=0;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for (SCTAB i=0; i<=MAXTAB; i++)
if (pDoc->HasTable(i))
{
if (bFirst)
nTab1 = i;
nTab2 = i;
- bFirst = FALSE;
+ bFirst = false;
}
DBG_ASSERT(!bFirst, "no sheet selected");
@@ -257,7 +258,7 @@ void ScTransferObj::AddSupportedFormats()
sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
{
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
if( HasFormat( nFormat ) )
{
@@ -303,9 +304,9 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
// if this transfer object was used to create a DDE link, filtered rows
// have to be included for subsequent calls (to be consistent with link data)
if ( nFormat == SOT_FORMATSTR_ID_LINK )
- bUsedForLink = TRUE;
+ bUsedForLink = sal_True;
- BOOL bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink;
+ sal_Bool bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink;
ScImportExport aObj( pDoc, aBlock );
ScExportTextOptions aTextOptions(ScExportTextOptions::None, 0, true);
@@ -346,7 +347,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
VirtualDevice aVirtDev;
aVirtDev.SetOutputSizePixel( aVirtDev.LogicToPixel( aMMRect.GetSize(), MAP_100TH_MM ) );
- PaintToDev( &aVirtDev, pDoc, 1.0, aBlock, FALSE );
+ PaintToDev( &aVirtDev, pDoc, 1.0, aBlock, false );
aVirtDev.SetMapMode( MapMode( MAP_PIXEL ) );
Bitmap aBmp = aVirtDev.GetBitmap( Point(), aVirtDev.GetOutputSize() );
@@ -364,7 +365,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
MapMode aMapMode( pEmbObj->GetMapUnit() );
Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) );
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( false );
aVDev.SetMapMode( aMapMode );
aMtf.SetPrefSize( aVisArea.GetSize() );
aMtf.SetPrefMapMode( aMapMode );
@@ -394,7 +395,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
{
// called from SetObject, put data into stream
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
switch (nUserObjectId)
{
case SCTRANS_TYPE_IMPEX:
@@ -423,7 +424,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
// write old format without support for unicode characters.
// Get the data from the EditEngine's transferable instead.
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( nParCnt == 0 )
nParCnt = 1;
ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) );
@@ -446,11 +447,11 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), embed::ElementModes::READWRITE );
// write document storage
- pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
+ pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false );
// mba: no relative ULRs for clipboard!
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, false );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -465,7 +466,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
xWorkStore->dispose();
xWorkStore = uno::Reference < embed::XStorage >();
@@ -499,7 +500,7 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction )
ScMarkData aMarkData = GetSourceMarkData();
// external drag&drop doesn't copy objects, so they also aren't deleted:
// bApi=TRUE, don't show error messages from drag&drop
- pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, TRUE, TRUE );
+ pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, true, true );
}
}
@@ -531,18 +532,23 @@ void ScTransferObj::SetDrawPersist( const SfxObjectShellRef& rRef )
void ScTransferObj::SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark )
{
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
xDragSourceRanges = new ScCellRangesObj( pSourceShell, aRanges );
}
-void ScTransferObj::SetDragSourceFlags( USHORT nFlags )
+void ScTransferObj::SetDragSourceFlags( sal_uInt16 nFlags )
{
nDragSourceFlags = nFlags;
}
void ScTransferObj::SetDragWasInternal()
{
- bDragWasInternal = TRUE;
+ bDragWasInternal = sal_True;
+}
+
+void ScTransferObj::SetUseInApi( bool bSet )
+{
+ bUseInApi = bSet;
}
ScDocument* ScTransferObj::GetSourceDocument()
@@ -569,7 +575,7 @@ ScMarkData ScTransferObj::GetSourceMarkData()
if (pRangesObj)
{
const ScRangeList& rRanges = pRangesObj->GetRangeList();
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
}
return aMarkData;
}
@@ -589,13 +595,13 @@ void ScTransferObj::InitDocShell()
ScDocument* pDestDoc = pDocSh->GetDocument();
ScMarkData aDestMark;
- aDestMark.SelectTable( 0, TRUE );
+ aDestMark.SelectTable( 0, sal_True );
pDestDoc->SetDocOptions( pDoc->GetDocOptions() ); // #i42666#
String aTabName;
pDoc->GetName( aBlock.aStart.Tab(), aTabName );
- pDestDoc->RenameTab( 0, aTabName, FALSE ); // no UpdateRef (empty)
+ pDestDoc->RenameTab( 0, aTabName, false ); // no UpdateRef (empty)
pDestDoc->CopyStdStylesFrom( pDoc );
@@ -612,18 +618,18 @@ void ScTransferObj::InitDocShell()
pDestDoc->SetLayoutRTL(0, pDoc->IsLayoutRTL(nSrcTab));
for (nCol=nStartX; nCol<=nEndX; nCol++)
if ( pDoc->ColHidden(nCol, nSrcTab) )
- pDestDoc->ShowCol( nCol, 0, FALSE );
+ pDestDoc->ShowCol( nCol, 0, false );
else
pDestDoc->SetColWidth( nCol, 0, pDoc->GetColWidth( nCol, nSrcTab ) );
- ScBitMaskCompressedArray< SCROW, BYTE> & rDestRowFlags =
+ ScBitMaskCompressedArray< SCROW, sal_uInt8> & rDestRowFlags =
pDestDoc->GetRowFlagsArrayModifiable(0);
for (SCROW nRow = nStartY; nRow <= nEndY; ++nRow)
{
- BYTE nSourceFlags = pDoc->GetRowFlags(nRow, nSrcTab);
+ sal_uInt8 nSourceFlags = pDoc->GetRowFlags(nRow, nSrcTab);
if ( pDoc->RowHidden(nRow, nSrcTab) )
- pDestDoc->ShowRow( nRow, 0, FALSE );
+ pDestDoc->ShowRow( nRow, 0, false );
else
{
pDestDoc->SetRowHeight( nRow, 0, pDoc->GetOriginalHeight( nRow, nSrcTab ) );
@@ -642,16 +648,16 @@ void ScTransferObj::InitDocShell()
// pDoc is always a Clipboard-document
ScRange aDestRange( nStartX,nStartY,0, nEndX,nEndY,0 );
- BOOL bWasCut = pDoc->IsCutMode();
+ sal_Bool bWasCut = pDoc->IsCutMode();
if (!bWasCut)
- pDoc->SetClipArea( aDestRange, TRUE ); // Cut
- pDestDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, FALSE );
+ pDoc->SetClipArea( aDestRange, sal_True ); // Cut
+ pDestDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, false );
pDoc->SetClipArea( aDestRange, bWasCut );
StripRefs( pDoc, nStartX,nStartY, nEndX,nEndY, pDestDoc, 0,0 );
ScRange aMergeRange = aDestRange;
- pDestDoc->ExtendMerge( aMergeRange, TRUE );
+ pDestDoc->ExtendMerge( aMergeRange, sal_True );
pDoc->CopyDdeLinks( pDestDoc ); // copy values of DDE Links
@@ -720,7 +726,7 @@ void ScTransferObj::InitDocShell()
//pDocSh->SvInPlaceObject::SetVisArea( aNewArea );
pDocSh->SetVisArea( aNewArea );
- pDocSh->UpdateOle(&aViewData, TRUE);
+ pDocSh->UpdateOle(&aViewData, sal_True);
//! SetDocumentModified?
if ( pDestDoc->IsChartListenerCollectionNeedsUpdate() )
@@ -728,7 +734,7 @@ void ScTransferObj::InitDocShell()
}
}
-SfxObjectShell* ScTransferObj::SetDrawClipDoc( BOOL bAnyOle )
+SfxObjectShell* ScTransferObj::SetDrawClipDoc( sal_Bool bAnyOle )
{
// update ScGlobal::pDrawClipDocShellRef
@@ -782,14 +788,14 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*) pCell;
- BOOL bOut = FALSE;
+ sal_Bool bOut = false;
ScDetectiveRefIter aRefIter( pFCell );
while ( !bOut && aRefIter.GetNextRef( aRef ) )
{
if ( aRef.aStart.Tab() != nSrcTab || aRef.aEnd.Tab() != nSrcTab ||
aRef.aStart.Col() < nStartX || aRef.aEnd.Col() > nEndX ||
aRef.aStart.Row() < nStartY || aRef.aEnd.Row() > nEndY )
- bOut = TRUE;
+ bOut = sal_True;
}
if (bOut)
{
@@ -797,7 +803,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
SCROW nRow = aIter.GetRow() - nSubY;
ScBaseCell* pNew = 0;
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
if (nErrCode)
{
pNew = new ScStringCell( ScGlobal::GetErrorString(nErrCode) );
@@ -825,11 +831,11 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
// number formats
- ULONG nOldFormat = ((const SfxUInt32Item*)
+ sal_uLong nOldFormat = ((const SfxUInt32Item*)
pDestDoc->GetAttr(nCol,nRow,nDestTab, ATTR_VALUE_FORMAT))->GetValue();
if ( (nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
{
- ULONG nNewFormat = pFCell->GetStandardFormat( *pFormatter,
+ sal_uLong nNewFormat = pFCell->GetStandardFormat( *pFormatter,
nOldFormat );
pDestDoc->ApplyAttr( nCol,nRow,nDestTab,
SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat) );
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 1d6be7abdfc3..d01efc5ee730 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -58,7 +58,7 @@ TYPEINIT1(ScIndexHint, SfxHint);
// ScInputStatusItem - Status-Update fuer Eingabezeile
// -----------------------------------------------------------------------
-ScInputStatusItem::ScInputStatusItem( USHORT nWhichP,
+ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP,
const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
@@ -117,7 +117,7 @@ SfxPoolItem* ScInputStatusItem::Clone( SfxItemPool * ) const
// ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht
// -----------------------------------------------------------------------
-ScTablesHint::ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2) :
+ScTablesHint::ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2) :
nId( nNewId ),
nTab1( nTable1 ),
nTab2( nTable2 )
@@ -133,7 +133,7 @@ ScTablesHint::~ScTablesHint()
// ScIndexHint
// -----------------------------------------------------------------------
-ScIndexHint::ScIndexHint(USHORT nNewId, USHORT nIdx) :
+ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) :
nId( nNewId ),
nIndex( nIdx )
{
@@ -162,7 +162,7 @@ ScEditViewHint::~ScEditViewHint()
// ScSortItem - Daten fuer den Sortierdialog
// -----------------------------------------------------------------------
-ScSortItem::ScSortItem( USHORT nWhichP,
+ScSortItem::ScSortItem( sal_uInt16 nWhichP,
ScViewData* ptrViewData,
const ScSortParam* pSortData ) :
SfxPoolItem ( nWhichP ),
@@ -173,7 +173,7 @@ ScSortItem::ScSortItem( USHORT nWhichP,
//------------------------------------------------------------------------
-ScSortItem::ScSortItem( USHORT nWhichP,
+ScSortItem::ScSortItem( sal_uInt16 nWhichP,
const ScSortParam* pSortData ) :
SfxPoolItem ( nWhichP ),
pViewData ( NULL )
@@ -222,7 +222,7 @@ SfxPoolItem* ScSortItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
+bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
{
// Return empty value as there is no useful conversion
rVal = com::sun::star::uno::Any();
@@ -233,23 +233,23 @@ bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd *
// ScQueryItem - Daten fuer den Filterdialog
// -----------------------------------------------------------------------
-ScQueryItem::ScQueryItem( USHORT nWhichP,
+ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
ScViewData* ptrViewData,
const ScQueryParam* pQueryData ) :
SfxPoolItem ( nWhichP ),
pViewData ( ptrViewData ),
- bIsAdvanced ( FALSE )
+ bIsAdvanced ( false )
{
if ( pQueryData ) theQueryData = *pQueryData;
}
//------------------------------------------------------------------------
-ScQueryItem::ScQueryItem( USHORT nWhichP,
+ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
const ScQueryParam* pQueryData ) :
SfxPoolItem ( nWhichP ),
pViewData ( NULL ),
- bIsAdvanced ( FALSE )
+ bIsAdvanced ( false )
{
if ( pQueryData ) theQueryData = *pQueryData;
}
@@ -276,13 +276,13 @@ void ScQueryItem::SetAdvancedQuerySource(const ScRange* pSource)
if (pSource)
{
aAdvSource = *pSource;
- bIsAdvanced = TRUE;
+ bIsAdvanced = sal_True;
}
else
- bIsAdvanced = FALSE;
+ bIsAdvanced = false;
}
-BOOL ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const
+sal_Bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const
{
rSource = aAdvSource;
return bIsAdvanced;
@@ -320,7 +320,7 @@ SfxPoolItem* ScQueryItem::Clone( SfxItemPool * ) const
// ScSubTotalItem - Daten fuer den Zwischenergebnisdialog
// -----------------------------------------------------------------------
-ScSubTotalItem::ScSubTotalItem( USHORT nWhichP,
+ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
ScViewData* ptrViewData,
const ScSubTotalParam* pSubTotalData ) :
SfxPoolItem ( nWhichP ),
@@ -331,7 +331,7 @@ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP,
//------------------------------------------------------------------------
-ScSubTotalItem::ScSubTotalItem( USHORT nWhichP,
+ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
const ScSubTotalParam* pSubTotalData ) :
SfxPoolItem ( nWhichP ),
pViewData ( NULL )
@@ -380,7 +380,7 @@ SfxPoolItem* ScSubTotalItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
+bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
{
// Return empty value as there is no useful conversion
rVal = com::sun::star::uno::Any();
@@ -391,7 +391,7 @@ bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMember
// ScUserListItem - Transporter fuer den Benutzerlisten-TabPage
// -----------------------------------------------------------------------
-ScUserListItem::ScUserListItem( USHORT nWhichP )
+ScUserListItem::ScUserListItem( sal_uInt16 nWhichP )
: SfxPoolItem ( nWhichP ),
pUserList ( NULL )
{
@@ -427,7 +427,7 @@ int ScUserListItem::operator==( const SfxPoolItem& rItem ) const
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScUserListItem& r = (const ScUserListItem&)rItem;
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = false;
if ( !pUserList || !(r.pUserList) )
bEqual = ( !pUserList && !(r.pUserList) );
@@ -458,7 +458,7 @@ void ScUserListItem::SetUserList( const ScUserList& rUserList )
// -----------------------------------------------------------------------
ScConsolidateItem::ScConsolidateItem(
- USHORT nWhichP,
+ sal_uInt16 nWhichP,
const ScConsolidateParam* pConsolidateData ) :
SfxPoolItem ( nWhichP )
{
@@ -509,8 +509,8 @@ SfxPoolItem* ScConsolidateItem::Clone( SfxItemPool * ) const
// ScPivotItem - Daten fuer den Pivot-Dialog
// -----------------------------------------------------------------------
-ScPivotItem::ScPivotItem( USHORT nWhichP, const ScDPSaveData* pData,
- const ScRange* pRange, BOOL bNew ) :
+ScPivotItem::ScPivotItem( sal_uInt16 nWhichP, const ScDPSaveData* pData,
+ const ScRange* pRange, sal_Bool bNew ) :
SfxPoolItem ( nWhichP )
{
// pSaveData must always exist
@@ -572,7 +572,7 @@ SfxPoolItem* ScPivotItem::Clone( SfxItemPool * ) const
// ScSolveItem - Daten fuer den Solver-Dialog
// -----------------------------------------------------------------------
-ScSolveItem::ScSolveItem( USHORT nWhichP,
+ScSolveItem::ScSolveItem( sal_uInt16 nWhichP,
const ScSolveParam* pSolveData )
: SfxPoolItem ( nWhichP )
{
@@ -622,7 +622,7 @@ SfxPoolItem* ScSolveItem::Clone( SfxItemPool * ) const
// ScTabOpItem - Daten fuer den TabOp-Dialog
// -----------------------------------------------------------------------
-ScTabOpItem::ScTabOpItem( USHORT nWhichP,
+ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP,
const ScTabOpParam* pTabOpData )
: SfxPoolItem ( nWhichP )
{
@@ -673,7 +673,7 @@ SfxPoolItem* ScTabOpItem::Clone( SfxItemPool * ) const
// ScCondFrmtItem - Daten fuer den Dialog bedingte Formatierung
// -----------------------------------------------------------------------
-ScCondFrmtItem::ScCondFrmtItem( USHORT nWhichP,
+ScCondFrmtItem::ScCondFrmtItem( sal_uInt16 nWhichP,
//! const ScConditionalFormat* pCondFrmt )
const ScConditionalFormat& rCondFrmt )
: SfxPoolItem ( nWhichP ),
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 1f2e11e49985..7095de34ce2f 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -73,7 +73,7 @@ ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP,
AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 );
#else
String number(RTL_CONSTASCII_USTRINGPARAM("Numbers"));
- AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, FALSE, TAB_APPEND);
+ AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, false, TAB_APPEND);
#endif
DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
@@ -105,7 +105,7 @@ ScAttrDlg::~ScAttrDlg()
// -----------------------------------------------------------------------
-void ScAttrDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage )
+void ScAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx
index a36edf55fd33..9afdd62faf18 100644
--- a/sc/source/ui/attrdlg/condfrmt.cxx
+++ b/sc/source/ui/attrdlg/condfrmt.cxx
@@ -72,7 +72,6 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aFtCond1Template ( this, ScResId( FT_COND1_TEMPLATE ) ),
aLbCond1Template ( this, ScResId( LB_COND1_TEMPLATE ) ),
aBtnNew1 ( this, ScResId( BTN_COND1_NEW ) ),
- aFlSep1 ( this, ScResId( FL_SEP1 ) ),
aCbxCond2 ( this, ScResId( CBX_COND2 ) ),
aLbCond21 ( this, ScResId( LB_COND2_1 ) ),
@@ -85,7 +84,6 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aFtCond2Template ( this, ScResId( FT_COND2_TEMPLATE ) ),
aLbCond2Template ( this, ScResId( LB_COND2_TEMPLATE ) ),
aBtnNew2 ( this, ScResId( BTN_COND2_NEW ) ),
- aFlSep2 ( this, ScResId( FL_SEP2 ) ),
aCbxCond3 ( this, ScResId( CBX_COND3 ) ),
aLbCond31 ( this, ScResId( LB_COND3_1 ) ),
@@ -102,8 +100,10 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
+ aFlSep2 ( this, ScResId( FL_SEP2 ) ),
+ aFlSep1 ( this, ScResId( FL_SEP1 ) ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
pDoc ( pCurDoc )
{
@@ -188,7 +188,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aCond2Size2 = Size( aPos.X() - aCond2Pos2.X(), aCond2Size3.Height() );
aCond2Size1 = Size( aPos.X() - aCond2Pos1.X(), aCond2Size3.Height() );
- aCbxCond2.Check( FALSE );
+ aCbxCond2.Check( false );
aLbCond21.SelectEntryPos( 0 );
aLbCond22.SelectEntryPos( 0 );
@@ -203,7 +203,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aCond3Size2 = Size( aPos.X() - aCond3Pos2.X(), aCond3Size3.Height() );
aCond3Size1 = Size( aPos.X() - aCond3Pos1.X(), aCond3Size3.Height() );
- aCbxCond3.Check( FALSE );
+ aCbxCond3.Check( false );
aLbCond31.SelectEntryPos( 0 );
aLbCond32.SelectEntryPos( 0 );
@@ -256,7 +256,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
;
else // via Werte
{
- aLbCond12.SelectEntryPos( sal::static_int_cast<USHORT>( eMode ) );
+ aLbCond12.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eMode ) );
if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) )
aEdtCond12.SetText( pEntry->GetExpression( aCurPos, 1 ) );
}
@@ -264,7 +264,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
if ( pCurrentFormat->Count() > 1 )
{
- aCbxCond2.Check( TRUE );
+ aCbxCond2.Check( sal_True );
pEntry= pCurrentFormat->GetEntry( 1 );
aEdtCond21.SetText( pEntry->GetExpression( aCurPos, 0 ) );
aLbCond2Template.SelectEntry( pEntry->GetStyle() );
@@ -279,7 +279,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
;
else // via Werte
{
- aLbCond22.SelectEntryPos( sal::static_int_cast<USHORT>( eMode ) );
+ aLbCond22.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eMode ) );
if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) )
aEdtCond22.SetText( pEntry->GetExpression( aCurPos, 1 ) );
}
@@ -287,7 +287,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
if ( pCurrentFormat->Count() > 2 )
{
- aCbxCond3.Check( TRUE );
+ aCbxCond3.Check( sal_True );
pEntry= pCurrentFormat->GetEntry( 2 );
aEdtCond31.SetText( pEntry->GetExpression( aCurPos, 0 ) );
aLbCond3Template.SelectEntry( pEntry->GetStyle() );
@@ -302,7 +302,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
;
else // via Werte
{
- aLbCond32.SelectEntryPos( sal::static_int_cast<USHORT>( eMode ) );
+ aLbCond32.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eMode ) );
if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) )
aEdtCond32.SetText( pEntry->GetExpression( aCurPos, 1 ) );
}
@@ -322,6 +322,32 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
//SFX_APPWINDOW->Enable(); // Ref-Feld hat Focus
// SFX_APPWINDOW->Disable();
+
+ aLbCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+ aLbCond12.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+ aEdtCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+ aRbCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+
+ aLbCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+ aLbCond22.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+ aEdtCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+ aRbCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+
+ aLbCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aLbCond32.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aEdtCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aRbCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aLbCond11.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) );
+ aLbCond12.SetAccessibleName( ScResId(LABEL_CONDITIONS) );
+ aEdtCond11.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) );
+
+ aLbCond21.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) );
+ aLbCond22.SetAccessibleName( ScResId(LABEL_CONDITIONS) );
+ aEdtCond21.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) );
+
+ aLbCond31.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) );
+ aLbCond32.SetAccessibleName( ScResId(LABEL_CONDITIONS) );
+ aEdtCond31.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) );
}
//----------------------------------------------------------------------------
@@ -372,7 +398,7 @@ void ScConditionalFormatDlg::AddRefEntry()
//----------------------------------------------------------------------------
-BOOL ScConditionalFormatDlg::IsRefInputMode() const
+sal_Bool ScConditionalFormatDlg::IsRefInputMode() const
{
return (pEdActive != NULL);
}
@@ -383,7 +409,7 @@ void ScConditionalFormatDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -457,7 +483,7 @@ void ScConditionalFormatDlg::GetConditionalFormat( ScConditionalFormat& rCndFmt
//----------------------------------------------------------------------------
// Zerstoert den Dialog
-BOOL ScConditionalFormatDlg::Close()
+sal_Bool ScConditionalFormatDlg::Close()
{
return DoClose( ScCondFormatDlgWrapper::GetChildWindowId() );
}
@@ -470,7 +496,7 @@ BOOL ScConditionalFormatDlg::Close()
IMPL_LINK( ScConditionalFormatDlg, ClickCond1Hdl, void *, EMPTYARG )
{
- BOOL bChecked = aCbxCond1.IsChecked();
+ sal_Bool bChecked = aCbxCond1.IsChecked();
aLbCond11.Enable( bChecked );
aLbCond12.Enable( bChecked );
@@ -491,7 +517,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond1Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ChangeCond11Hdl, void *, EMPTYARG )
{
- USHORT nPos = aLbCond11.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond11.GetSelectEntryPos();
if( nPos == 0 ) // Zellwert
{
@@ -520,7 +546,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond12Hdl, void *, EMPTYARG )
{
if( aLbCond12.IsVisible() )
{
- USHORT nPos = aLbCond12.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond12.GetSelectEntryPos();
aEdtCond11.Show();
aRbCond11.Show();
@@ -558,7 +584,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond12Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ClickCond2Hdl, void *, EMPTYARG )
{
- BOOL bChecked = aCbxCond2.IsChecked();
+ sal_Bool bChecked = aCbxCond2.IsChecked();
aLbCond21.Enable( bChecked );
aLbCond22.Enable( bChecked );
@@ -579,7 +605,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond2Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ChangeCond21Hdl, void *, EMPTYARG )
{
- USHORT nPos = aLbCond21.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond21.GetSelectEntryPos();
if( nPos == 0 ) // Zellwert
{
@@ -608,7 +634,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond22Hdl, void *, EMPTYARG )
{
if( aLbCond22.IsVisible() )
{
- USHORT nPos = aLbCond22.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond22.GetSelectEntryPos();
aEdtCond21.Show();
aRbCond21.Show();
@@ -646,7 +672,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond22Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ClickCond3Hdl, void *, EMPTYARG )
{
- BOOL bChecked = aCbxCond3.IsChecked();
+ sal_Bool bChecked = aCbxCond3.IsChecked();
aLbCond31.Enable( bChecked );
aLbCond32.Enable( bChecked );
@@ -667,7 +693,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond3Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ChangeCond31Hdl, void *, EMPTYARG )
{
- USHORT nPos = aLbCond31.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond31.GetSelectEntryPos();
if( nPos == 0 ) // Zellwert
{
@@ -696,7 +722,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond32Hdl, void *, EMPTYARG )
{
if( aLbCond32.IsVisible() )
{
- USHORT nPos = aLbCond32.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond32.GetSelectEntryPos();
aEdtCond31.Show();
aRbCond31.Show();
@@ -773,7 +799,7 @@ IMPL_LINK( ScConditionalFormatDlg, BtnHdl, PushButton*, pBtn )
GetConditionalFormat( aCondFrmt );
ScCondFrmtItem aOutItem( FID_CONDITIONAL_FORMAT, aCondFrmt );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( FID_CONDITIONAL_FORMAT,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -796,9 +822,9 @@ IMPL_LINK( ScConditionalFormatDlg, NewBtnHdl, PushButton*, pBtn )
// unlock the dispatcher so SID_STYLE_NEW can be executed
// (SetDispatcherLock would affect all Calc documents)
SfxDispatcher* pDisp = GetBindings().GetDispatcher();
- BOOL bLocked = pDisp->IsLocked();
+ sal_Bool bLocked = pDisp->IsLocked();
if (bLocked)
- pDisp->Lock(sal_False);
+ pDisp->Lock(false);
// Execute the "new style" slot, complete with undo and all necessary updates.
// The return value (SfxUInt16Item) is ignored, look for new styles instead.
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 2c3bd0e5f5de..cbf62f945e36 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -125,7 +125,7 @@ IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
// AbstractTabDialog_Impl begin
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -135,7 +135,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -160,7 +160,7 @@ namespace layout
IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
// AbstractTabDialog_Impl begin
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -170,7 +170,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -211,7 +211,7 @@ void AbstractScImportAsciiDlg_Impl::SaveParameters()
// AbstractScImportAsciiDlg_Impl end
//AbstractScAutoFormatDlg_Impl begin
-USHORT AbstractScAutoFormatDlg_Impl::GetIndex() const
+sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const
{
return pDlg->GetIndex();
}
@@ -226,11 +226,11 @@ String AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
//AbstractScColRowLabelDlg_Impl begin
-BOOL AbstractScColRowLabelDlg_Impl::IsCol()
+sal_Bool AbstractScColRowLabelDlg_Impl::IsCol()
{
return pDlg->IsCol();
}
-BOOL AbstractScColRowLabelDlg_Impl::IsRow()
+sal_Bool AbstractScColRowLabelDlg_Impl::IsRow()
{
return pDlg->IsRow();
}
@@ -315,7 +315,7 @@ void AbstractScDeleteContentsDlg_Impl::DisableObjects()
{
pDlg->DisableObjects();
}
-USHORT AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
+sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
{
return pDlg->GetDelContentsCmdBits();
}
@@ -353,14 +353,14 @@ String AbstractScFillSeriesDlg_Impl::GetStartStr() const
{
return pDlg->GetStartStr();
}
-void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(BOOL bFlag)
+void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(sal_Bool bFlag)
{
pDlg->SetEdStartValEnabled(bFlag);
}
-BOOL AbstractScGroupDlg_Impl::GetColsChecked() const
+sal_Bool AbstractScGroupDlg_Impl::GetColsChecked() const
{
return pDlg->GetColsChecked();
}
@@ -377,39 +377,39 @@ InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
-USHORT AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
+sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
{
return pDlg->GetInsContentsCmdBits();
}
-USHORT AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
+sal_uInt16 AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
{
return pDlg->GetFormulaCmdBits();
}
-BOOL AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
+sal_Bool AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
{
return pDlg->IsSkipEmptyCells();
}
-BOOL AbstractScInsertContentsDlg_Impl::IsLink() const
+sal_Bool AbstractScInsertContentsDlg_Impl::IsLink() const
{
return pDlg->IsLink();
}
-void AbstractScInsertContentsDlg_Impl::SetFillMode( BOOL bSet )
+void AbstractScInsertContentsDlg_Impl::SetFillMode( sal_Bool bSet )
{
pDlg->SetFillMode( bSet );
}
-void AbstractScInsertContentsDlg_Impl::SetOtherDoc( BOOL bSet )
+void AbstractScInsertContentsDlg_Impl::SetOtherDoc( sal_Bool bSet )
{
pDlg->SetOtherDoc( bSet );
}
-BOOL AbstractScInsertContentsDlg_Impl::IsTranspose() const
+sal_Bool AbstractScInsertContentsDlg_Impl::IsTranspose() const
{
return pDlg->IsTranspose();
}
-void AbstractScInsertContentsDlg_Impl::SetChangeTrack( BOOL bSet )
+void AbstractScInsertContentsDlg_Impl::SetChangeTrack( sal_Bool bSet )
{
pDlg->SetChangeTrack( bSet );
}
@@ -426,16 +426,16 @@ InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode()
-BOOL AbstractScInsertTableDlg_Impl::GetTablesFromFile()
+sal_Bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
{
return pDlg->GetTablesFromFile();
}
-BOOL AbstractScInsertTableDlg_Impl::GetTablesAsLink()
+sal_Bool AbstractScInsertTableDlg_Impl::GetTablesAsLink()
{
return pDlg->GetTablesAsLink();
}
-const String* AbstractScInsertTableDlg_Impl::GetFirstTable( USHORT* pN )
+const String* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
{
return pDlg->GetFirstTable( pN );
}
@@ -443,15 +443,15 @@ ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables()
{
return pDlg->GetDocShellTables();
}
-BOOL AbstractScInsertTableDlg_Impl::IsTableBefore()
+sal_Bool AbstractScInsertTableDlg_Impl::IsTableBefore()
{
return pDlg->IsTableBefore();
}
-USHORT AbstractScInsertTableDlg_Impl::GetTableCount()
+sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount()
{
return pDlg->GetTableCount();
}
-const String* AbstractScInsertTableDlg_Impl::GetNextTable( USHORT* pN )
+const String* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
{
return pDlg->GetNextTable( pN );
}
@@ -467,7 +467,7 @@ String AbstractScSelEntryDlg_Impl::GetSelectEntry() const
void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh )
+ sal_uLong nRefresh )
{
pDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefresh);
}
@@ -488,7 +488,7 @@ String AbstractScLinkedAreaDlg_Impl::GetSource()
{
return pDlg->GetSource();
}
-ULONG AbstractScLinkedAreaDlg_Impl::GetRefresh()
+sal_uLong AbstractScLinkedAreaDlg_Impl::GetRefresh()
{
return pDlg->GetRefresh();
}
@@ -504,12 +504,12 @@ long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const
-USHORT AbstractScMoveTableDlg_Impl::GetSelectedDocument() const
+sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const
{
return pDlg->GetSelectedDocument();
}
-USHORT AbstractScMoveTableDlg_Impl::GetSelectedTable() const
+sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const
{
return pDlg->GetSelectedTable();
}
@@ -529,11 +529,11 @@ void AbstractScMoveTableDlg_Impl::SetForceCopyTable()
{
return pDlg->SetForceCopyTable();
}
-void AbstractScMoveTableDlg_Impl::EnableCopyTable(BOOL bFlag)
+void AbstractScMoveTableDlg_Impl::EnableCopyTable(sal_Bool bFlag)
{
return pDlg->EnableCopyTable( bFlag);
}
-void AbstractScMoveTableDlg_Impl::EnableRenameTable(BOOL bFlag)
+void AbstractScMoveTableDlg_Impl::EnableRenameTable(sal_Bool bFlag)
{
return pDlg->EnableRenameTable( bFlag);
}
@@ -541,7 +541,7 @@ void AbstractScMoveTableDlg_Impl::EnableRenameTable(BOOL bFlag)
-USHORT AbstractScNameCreateDlg_Impl::GetFlags() const
+sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const
{
return pDlg->GetFlags();
}
@@ -563,7 +563,7 @@ const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem()
-USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const
+sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const
{
return pDlg->GetFuncMask();
}
@@ -574,7 +574,7 @@ USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const
-USHORT AbstractScDPSubtotalDlg_Impl::GetFuncMask() const
+sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const
{
return pDlg->GetFuncMask();
}
@@ -608,13 +608,13 @@ String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
pDlg->SetScenarioData(rName,rComment, rColor,nFlags);
}
void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const
+ Color& rColor, sal_uInt16& rFlags ) const
{
pDlg->GetScenarioData( rName,rComment,rColor,rFlags);
}
@@ -622,26 +622,26 @@ void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rCom
-void AbstractScShowTabDlg_Impl::Insert( const String& rString, BOOL bSelected )
+void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected )
{
pDlg->Insert( rString, bSelected);
}
-USHORT AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
+sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
{
return pDlg->GetSelectEntryCount();
}
void AbstractScShowTabDlg_Impl::SetDescription(
const String& rTitle, const String& rFixedText,
- ULONG nDlgHelpId, ULONG nLbHelpId )
+ const rtl::OString& sDlgHelpId, const rtl::OString& sLbHelpId )
{
- pDlg->SetDescription( rTitle, rFixedText,nDlgHelpId, nLbHelpId );
+ pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId );
}
-USHORT AbstractScShowTabDlg_Impl::GetSelectEntryPos(USHORT nPos) const
+sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_uInt16 nPos) const
{
return pDlg->GetSelectEntryPos( nPos);
}
-String AbstractScShowTabDlg_Impl::GetSelectEntry(USHORT nPos) const
+String AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const
{
return pDlg->GetSelectEntry(nPos);
}
@@ -747,8 +747,8 @@ AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( W
AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent,
int nId,
- BOOL bCol ,
- BOOL bRow)
+ sal_Bool bCol ,
+ sal_Bool bRow)
{
ScColRowLabelDlg* pDlg=NULL;
switch ( nId )
@@ -773,7 +773,7 @@ VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window*
const String& rStrTitle,
const String& rStrLabel,
int nId,
- BOOL bColDefault)
+ sal_Bool bColDefault)
{
Dialog * pDlg=NULL;
switch ( nId )
@@ -833,7 +833,7 @@ AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilo
AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( Window* pParent,
- BOOL bEnableExternal,
+ sal_Bool bEnableExternal,
int nId )
{
ScDataPilotSourceTypeDlg * pDlg=NULL;
@@ -878,7 +878,7 @@ AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSe
AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Window* pParent, int nId,
- BOOL bDisallowCellMove )
+ sal_Bool bDisallowCellMove )
{
ScDeleteCellDlg * pDlg=NULL;
switch ( nId )
@@ -919,7 +919,7 @@ AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg( Window
AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId,
- USHORT nCheckDefaults )
+ sal_uInt16 nCheckDefaults )
{
ScDeleteContentsDlg * pDlg=NULL;
switch ( nId )
@@ -947,7 +947,7 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir,
+ sal_uInt16 nPossDir,
int nId)
{
ScFillSeriesDlg * pDlg=NULL;
@@ -969,10 +969,10 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi
AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
int nId,
- BOOL bUnGroup ,
- BOOL bRows )
+ sal_Bool bUnGroup ,
+ sal_Bool bRows )
{
ScGroupDlg * pDlg=NULL;
switch ( nId )
@@ -996,7 +996,7 @@ AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Wind
AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window* pParent,
int nId,
- BOOL bDisallowCellMove )
+ sal_Bool bDisallowCellMove )
{
ScInsertCellDlg * pDlg=NULL;
switch ( nId )
@@ -1018,7 +1018,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
int nId,
- USHORT nCheckDefaults,
+ sal_uInt16 nCheckDefaults,
const String* pStrTitle )
{
ScInsertContentsDlg * pDlg=NULL;
@@ -1059,7 +1059,7 @@ AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg
// add for ScSelEntryDlg begin
AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList,
@@ -1103,12 +1103,12 @@ AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg (
AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg ( Window* pParent,
- USHORT nResId, // Ableitung fuer jeden Dialog!
+ sal_uInt16 nResId, // Ableitung fuer jeden Dialog!
long nCurrent,
long nDefault,
int nId ,
FieldUnit eFUnit,
- USHORT nDecimals,
+ sal_uInt16 nDecimals,
long nMaximum ,
long nMinimum,
long nFirst,
@@ -1158,7 +1158,7 @@ AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Wi
-AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId )
+AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId )
{
ScNameCreateDlg * pDlg=NULL;
switch ( nId )
@@ -1179,7 +1179,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg (
AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList,
- int nId , BOOL bInsList )
+ int nId , sal_Bool bInsList )
{
ScNamePasteDlg * pDlg=NULL;
switch ( nId )
@@ -1199,7 +1199,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg (
AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg ( Window* pParent,
- const SfxItemSet& rArgSet, USHORT nSourceTab , int nId )
+ const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId )
{
ScPivotFilterDlg * pDlg=NULL;
switch ( nId )
@@ -1221,9 +1221,9 @@ AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg
AbstractScDPFunctionDlg * ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg ( Window* pParent,
int nId,
- const ScDPLabelDataVec& rLabelVec,
+ const ScDPLabelDataVector& rLabelVec,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData )
+ const ScPivotFuncData& rFuncData )
{
ScDPFunctionDlg * pDlg=NULL;
switch ( nId )
@@ -1246,7 +1246,7 @@ AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg (
int nId,
ScDPObject& rDPObj,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData,
+ const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields,
bool bEnableLayout )
{
@@ -1285,7 +1285,7 @@ AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
- Window* pParent, int nId, ScDPObject& rDPObj, USHORT nOrient )
+ Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient )
{
if( nId == RID_SCDLG_DPSHOWDETAIL )
return new AbstractScDPShowDetailDlg_Impl( new ScDPShowDetailDlg( pParent, rDPObj, nOrient ) );
@@ -1296,7 +1296,7 @@ AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDl
AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg ( Window* pParent, const String& rName,
int nId,
- BOOL bEdit , BOOL bSheetProtected )
+ sal_Bool bEdit , sal_Bool bSheetProtected )
{
ScNewScenarioDlg * pDlg=NULL;
switch ( nId )
@@ -1340,14 +1340,14 @@ AbstractScShowTabDlg * ScAbstractDialogFactory_Impl::CreateScShowTabDlg ( Window
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId ,
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId,
int nId )
{
ScStringInputDlg * pDlg=NULL;
switch ( nId )
{
case RID_SCDLG_STRINPUT :
- pDlg = new ScStringInputDlg( pParent, rTitle, rEditTitle,rDefault, nHelpId );
+ pDlg = new ScStringInputDlg( pParent, rTitle, rEditTitle, rDefault, sHelpId, sEditHelpId );
break;
default:
break;
@@ -1365,14 +1365,14 @@ AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg (
const String& rTitle,
const String& rTabBgColorNoColorText,
const Color& rDefaultColor,
- ULONG nHelpId ,
+ const rtl::OString& sHelpId ,
int nId )
{
ScTabBgColorDlg * pDlg=NULL;
switch ( nId )
{
case RID_SCDLG_TAB_BG_COLOR :
- pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, nHelpId );
+ pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId );
break;
default:
break;
@@ -1387,12 +1387,12 @@ return 0;
AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window* pParent,
int nId,
- BOOL bAscii,
+ sal_Bool bAscii,
const ScImportOptions* pOptions,
const String* pStrTitle,
- BOOL bMultiByte,
- BOOL bOnlyDbtoolsEncodings,
- BOOL bImport )
+ sal_Bool bMultiByte,
+ sal_Bool bOnlyDbtoolsEncodings,
+ sal_Bool bImport )
{
ScImportOptionsDlg * pDlg=NULL;
switch ( nId )
@@ -1445,7 +1445,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF
const SfxItemSet& rCoreSet,
const String& rPageStyle,
int nId,
- USHORT nResId )
+ sal_uInt16 nResId )
{
SfxTabDialog* pDlg=NULL;
switch ( nId )
@@ -1466,7 +1466,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF
SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window* pParent,
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId,
+ sal_uInt16 nRscId,
int nId)
{
SfxTabDialog* pDlg=NULL;
@@ -1594,7 +1594,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window*
//------------------ Factories for TabPages--------------------
-CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
+CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1631,7 +1631,7 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
return 0;
}
-GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId )
+GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
{
switch ( nId )
{
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 7b6295482f42..d1eaf2edbab0 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -125,15 +125,15 @@ class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg //add for
class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg //add for ScAutoFormatDlg
{
DECL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl, ScAutoFormatDlg)
- virtual USHORT GetIndex() const;
+ virtual sal_uInt16 GetIndex() const;
virtual String GetCurrFormatName();
};
class AbstractScColRowLabelDlg_Impl : public AbstractScColRowLabelDlg //add for ScColRowLabelDlg
{
DECL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl,ScColRowLabelDlg)
- virtual BOOL IsCol();
- virtual BOOL IsRow();
+ virtual sal_Bool IsCol();
+ virtual sal_Bool IsRow();
};
class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDlg //add for ScDataPilotDatabaseDlg
@@ -178,7 +178,7 @@ class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg //a
{
DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg)
virtual void DisableObjects();
- virtual USHORT GetDelContentsCmdBits() const;
+ virtual sal_uInt16 GetDelContentsCmdBits() const;
};
class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg //add for ScFillSeriesDlg
@@ -191,13 +191,13 @@ class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg //add for ScF
virtual double GetStep() const;
virtual double GetMax() const;
virtual String GetStartStr() const;
- virtual void SetEdStartValEnabled(BOOL bFlag=FALSE);
+ virtual void SetEdStartValEnabled(sal_Bool bFlag=false);
};
class AbstractScGroupDlg_Impl : public AbstractScGroupDlg //add for ScGroupDlg
{
DECL_ABSTDLG_BASE( AbstractScGroupDlg_Impl, ScGroupDlg)
- virtual BOOL GetColsChecked() const;
+ virtual sal_Bool GetColsChecked() const;
};
class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg //add for ScInsertCellDlg
@@ -209,14 +209,14 @@ class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg //add for S
class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg //add for ScInsertContentsDlg
{
DECL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl, ScInsertContentsDlg)
- virtual USHORT GetInsContentsCmdBits() const;
- virtual USHORT GetFormulaCmdBits() const;
- virtual BOOL IsSkipEmptyCells() const;
- virtual BOOL IsLink() const;
- virtual void SetFillMode( BOOL bSet );
- virtual void SetOtherDoc( BOOL bSet );
- virtual BOOL IsTranspose() const;
- virtual void SetChangeTrack( BOOL bSet );
+ virtual sal_uInt16 GetInsContentsCmdBits() const;
+ virtual sal_uInt16 GetFormulaCmdBits() const;
+ virtual sal_Bool IsSkipEmptyCells() const;
+ virtual sal_Bool IsLink() const;
+ virtual void SetFillMode( sal_Bool bSet );
+ virtual void SetOtherDoc( sal_Bool bSet );
+ virtual sal_Bool IsTranspose() const;
+ virtual void SetChangeTrack( sal_Bool bSet );
virtual void SetCellShiftDisabled( int nDisable );
virtual InsCellCmd GetMoveMode();
};
@@ -224,13 +224,13 @@ class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg //a
class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg //add for ScInsertTableDlg
{
DECL_ABSTDLG_BASE( AbstractScInsertTableDlg_Impl, ScInsertTableDlg)
- virtual BOOL GetTablesFromFile();
- virtual BOOL GetTablesAsLink();
- virtual const String* GetFirstTable( USHORT* pN = NULL );
+ virtual sal_Bool GetTablesFromFile();
+ virtual sal_Bool GetTablesAsLink();
+ virtual const String* GetFirstTable( sal_uInt16* pN = NULL );
virtual ScDocShell* GetDocShellTables();
- virtual BOOL IsTableBefore();
- virtual USHORT GetTableCount();
- virtual const String* GetNextTable( USHORT* pN = NULL );
+ virtual sal_Bool IsTableBefore();
+ virtual sal_uInt16 GetTableCount();
+ virtual const String* GetNextTable( sal_uInt16* pN = NULL );
};
@@ -246,12 +246,12 @@ class AbstractScLinkedAreaDlg_Impl : public AbstractScLinkedAreaDlg //add for S
virtual void InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh );
+ sal_uLong nRefresh );
virtual String GetURL();
virtual String GetFilter(); // may be empty
virtual String GetOptions(); // filter options
virtual String GetSource(); // separated by ";"
- virtual ULONG GetRefresh(); // 0 if disabled
+ virtual sal_uLong GetRefresh(); // 0 if disabled
};
class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg //add for ScMetricInputDlg
@@ -263,20 +263,20 @@ class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg //add for
class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg //add for ScMoveTableDlg
{
DECL_ABSTDLG_BASE( AbstractScMoveTableDlg_Impl, ScMoveTableDlg)
- virtual USHORT GetSelectedDocument () const;
- virtual USHORT GetSelectedTable () const;
+ virtual sal_uInt16 GetSelectedDocument () const;
+ virtual sal_uInt16 GetSelectedTable () const;
virtual bool GetCopyTable () const;
virtual bool GetRenameTable () const;
virtual void GetTabNameString( String& rString ) const;
virtual void SetForceCopyTable ();
- virtual void EnableCopyTable (BOOL bFlag=TRUE);
- virtual void EnableRenameTable (BOOL bFlag=TRUE);
+ virtual void EnableCopyTable (sal_Bool bFlag=true);
+ virtual void EnableRenameTable (sal_Bool bFlag=true);
};
class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg //add for ScNameCreateDlg
{
DECL_ABSTDLG_BASE( AbstractScNameCreateDlg_Impl, ScNameCreateDlg)
- virtual USHORT GetFlags() const;
+ virtual sal_uInt16 GetFlags() const;
};
class AbstractScNamePasteDlg_Impl : public AbstractScNamePasteDlg //add for ScNamePasteDlg
@@ -294,14 +294,14 @@ class AbstractScPivotFilterDlg_Impl : public AbstractScPivotFilterDlg //add for
class AbstractScDPFunctionDlg_Impl : public AbstractScDPFunctionDlg //add for ScDPFunctionDlg
{
DECL_ABSTDLG_BASE( AbstractScDPFunctionDlg_Impl, ScDPFunctionDlg)
- virtual USHORT GetFuncMask() const;
+ virtual sal_uInt16 GetFuncMask() const;
virtual ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const;
};
class AbstractScDPSubtotalDlg_Impl : public AbstractScDPSubtotalDlg //add for ScDPSubtotalDlg
{
DECL_ABSTDLG_BASE( AbstractScDPSubtotalDlg_Impl, ScDPSubtotalDlg)
- virtual USHORT GetFuncMask() const;
+ virtual sal_uInt16 GetFuncMask() const;
virtual void FillLabelData( ScDPLabelData& rLabelData ) const;
};
@@ -328,20 +328,20 @@ class AbstractScNewScenarioDlg_Impl : public AbstractScNewScenarioDlg //add for
{
DECL_ABSTDLG_BASE( AbstractScNewScenarioDlg_Impl, ScNewScenarioDlg )
virtual void SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
+ const Color& rColor, sal_uInt16 nFlags );
virtual void GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const;
+ Color& rColor, sal_uInt16& rFlags ) const;
};
class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg //add for ScShowTabDlg
{
DECL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl,ScShowTabDlg)
- virtual void Insert( const String& rString, BOOL bSelected );
- virtual USHORT GetSelectEntryCount() const;
- virtual void SetDescription(const String& rTitle, const String& rFixedText,ULONG nDlgHelpId, ULONG nLbHelpId );
- virtual String GetSelectEntry(USHORT nPos) const;
- virtual USHORT GetSelectEntryPos(USHORT nPos) const;
+ virtual void Insert( const String& rString, sal_Bool bSelected );
+ virtual sal_uInt16 GetSelectEntryCount() const;
+ virtual void SetDescription(const String& rTitle, const String& rFixedText, const rtl::OString& sDlgHelpId, const rtl::OString& sLbHelpId );
+ virtual String GetSelectEntry(sal_uInt16 nPos) const;
+ virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const;
};
class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg //add for ScStringInputDlg
@@ -373,9 +373,9 @@ class AbstractScTextImportOptionsDlg_Impl : public AbstractScTextImportOptionsDl
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -388,9 +388,9 @@ namespace layout
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -417,32 +417,32 @@ public:
int nId);
virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, //add for ScColRowLabelDlg
int nId,
- BOOL bCol = FALSE,
- BOOL bRow = FALSE);
+ sal_Bool bCol = false,
+ sal_Bool bRow = false);
virtual VclAbstractDialog * CreateScColOrRowDlg( Window* pParent, //add for ScColOrRowDlg
const String& rStrTitle,
const String& rStrLabel,
int nId,
- BOOL bColDefault = TRUE );
+ sal_Bool bColDefault = sal_True );
virtual VclAbstractDialog * CreateScSortWarningDlg( Window* pParent, const String& rExtendText, const String& rCurrentText, int nId );
virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ); //add for ScDataPilotDatabaseDlg
- virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, BOOL bEnableExternal, int nId ) ; //add for ScDataPilotSourceTypeDlg
+ virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, sal_Bool bEnableExternal, int nId ) ; //add for ScDataPilotSourceTypeDlg
virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( Window* pParent, //add for ScDataPilotServiceDlg
const com::sun::star::uno::Sequence<rtl::OUString>& rServices,
int nId );
virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId,
- BOOL bDisallowCellMove = FALSE ); //add for ScDeleteCellDlg
+ sal_Bool bDisallowCellMove = false ); //add for ScDeleteCellDlg
//for dataform
virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell); //add for ScDeleteCellDlg
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
- USHORT nCheckDefaults = 0 );
+ sal_uInt16 nCheckDefaults = 0 );
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg
ScDocument& rDocument,
@@ -452,28 +452,28 @@ public:
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir,
+ sal_uInt16 nPossDir,
int nId);
virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
- USHORT nResId,
+ sal_uInt16 nResId,
int nId,
- BOOL bUnGroup = FALSE,
- BOOL bRows = TRUE );
+ sal_Bool bUnGroup = false,
+ sal_Bool bRows = sal_True );
virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg
int nId,
- BOOL bDisallowCellMove = FALSE );
+ sal_Bool bDisallowCellMove = false );
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
int nId,
- USHORT nCheckDefaults = 0,
+ sal_uInt16 nCheckDefaults = 0,
const String* pStrTitle = NULL );
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg ( Window* pParent, ScViewData& rViewData, //add for ScInsertTableDlg
SCTAB nTabCount, bool bFromFile, int nId);
virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList,
@@ -483,12 +483,12 @@ public:
int nId);
virtual AbstractScMetricInputDlg * CreateScMetricInputDlg ( Window* pParent, //add for ScMetricInputDlg
- USHORT nResId, // Ableitung fuer jeden Dialog!
+ sal_uInt16 nResId, // Ableitung fuer jeden Dialog!
long nCurrent,
long nDefault,
int nId ,
FieldUnit eFUnit = FUNIT_MM,
- USHORT nDecimals = 2,
+ sal_uInt16 nDecimals = 2,
long nMaximum = 1000,
long nMinimum = 0,
long nFirst = 1,
@@ -498,23 +498,23 @@ public:
const String& rDefault,
int nId );
- virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId ); //add for ScNameCreateDlg
+ virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ); //add for ScNameCreateDlg
virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, //add for ScNamePasteDlg
- int nId , BOOL bInsList=TRUE );
+ int nId , sal_Bool bInsList=sal_True );
virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent, //add for ScPivotFilterDlg
- const SfxItemSet& rArgSet, USHORT nSourceTab , int nId );
+ const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId );
virtual AbstractScDPFunctionDlg * CreateScDPFunctionDlg( Window* pParent, int nId,
- const ScDPLabelDataVec& rLabelVec,
+ const ScDPLabelDataVector& rLabelVec,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData );
+ const ScPivotFuncData& rFuncData );
virtual AbstractScDPSubtotalDlg * CreateScDPSubtotalDlg( Window* pParent, int nId,
ScDPObject& rDPObj,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData,
+ const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields,
bool bEnableLayout );
@@ -530,35 +530,35 @@ public:
virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( Window* pParent, int nId,
ScDPObject& rDPObj,
- USHORT nOrient );
+ sal_uInt16 nOrient );
virtual AbstractScNewScenarioDlg * CreateScNewScenarioDlg ( Window* pParent, const String& rName, //add for ScNewScenarioDlg
int nId,
- BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE );
+ sal_Bool bEdit = false, sal_Bool bSheetProtected = false );
virtual AbstractScShowTabDlg * CreateScShowTabDlg ( Window* pParent, int nId ); //add for ScShowTabDlg
virtual AbstractScStringInputDlg * CreateScStringInputDlg ( Window* pParent, //add for ScStringInputDlg
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId ,
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId,
int nId );
virtual AbstractScTabBgColorDlg * CreateScTabBgColorDlg ( Window* pParent, //add for ScStringInputDlg
const String& rTitle, //Dialog Title
const String& rTabBgColorNoColorText, //Label for no tab color
const Color& rDefaultColor, //Currently selected Color
- ULONG nHelpId ,
+ const rtl::OString& sHelpId ,
int nId );
virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent, //add for ScImportOptionsDlg
int nId,
- BOOL bAscii = TRUE,
+ sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const String* pStrTitle = NULL,
- BOOL bMultiByte = FALSE,
- BOOL bOnlyDbtoolsEncodings = FALSE,
- BOOL bImport = TRUE );
+ sal_Bool bMultiByte = false,
+ sal_Bool bOnlyDbtoolsEncodings = false,
+ sal_Bool bImport = sal_True );
virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame* pFrame, //add for ScAttrDlg
Window* pParent,
const SfxItemSet* pCellAttrs,
@@ -569,11 +569,11 @@ public:
const SfxItemSet& rCoreSet,
const String& rPageStyle,
int nId,
- USHORT nResId = RID_SCDLG_HFEDIT );
+ sal_uInt16 nResId = RID_SCDLG_HFEDIT );
virtual SfxAbstractTabDialog * CreateScStyleDlg( Window* pParent,//add for ScStyleDlg
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId,
+ sal_uInt16 nRscId,
int nId);
virtual SfxAbstractTabDialog * CreateScSubTotalDlg( Window* pParent, //add for ScSubTotalDlg
@@ -591,9 +591,9 @@ public:
virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg
const SfxItemSet* pArgSet,int nId );
// For TabPage
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId );
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId );
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId );
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId );
};
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 7d9ec8b40682..41f8a7939a47 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -44,7 +44,7 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pProtectionRanges[] =
+static sal_uInt16 pProtectionRanges[] =
{
SID_SCATTR_PROTECTION,
SID_SCATTR_PROTECTION,
@@ -74,7 +74,7 @@ ScTabPageProtection::ScTabPageProtection( Window* pParent,
SetExchangeSupport();
// States werden in Reset gesetzt
- bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = FALSE;
+ bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = false;
aBtnProtect.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) );
aBtnHideCell.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) );
@@ -92,7 +92,7 @@ ScTabPageProtection::~ScTabPageProtection()
//------------------------------------------------------------------------
-USHORT* ScTabPageProtection::GetRanges()
+sal_uInt16* ScTabPageProtection::GetRanges()
{
return pProtectionRanges;
}
@@ -111,9 +111,9 @@ void ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs )
{
// Variablen initialisieren
- USHORT nWhich = GetWhich( SID_SCATTR_PROTECTION );
+ sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION );
const ScProtectionAttr* pProtAttr = NULL;
- SfxItemState eItemState = rCoreAttrs.GetItemState( nWhich, FALSE,
+ SfxItemState eItemState = rCoreAttrs.GetItemState( nWhich, false,
(const SfxPoolItem**)&pProtAttr );
// handelt es sich um ein Default-Item?
@@ -128,8 +128,8 @@ void ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs )
// Defaults, die erscheinen wenn ein TriState weggeklickt wird:
// (weil alles zusammen ein Attribut ist, kann auch nur alles zusammen
// auf DontCare stehen - #38543#)
- bProtect = TRUE;
- bHideForm = bHideCell = bHidePrint = FALSE;
+ bProtect = sal_True;
+ bHideForm = bHideCell = bHidePrint = false;
}
else
{
@@ -151,13 +151,13 @@ void ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs )
// -----------------------------------------------------------------------
-BOOL ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs )
{
- BOOL bAttrsChanged = FALSE;
- USHORT nWhich = GetWhich( SID_SCATTR_PROTECTION );
+ sal_Bool bAttrsChanged = false;
+ sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION );
const SfxPoolItem* pOldItem = GetOldItem( rCoreAttrs, SID_SCATTR_PROTECTION );
const SfxItemSet& rOldSet = GetItemSet();
- SfxItemState eItemState = rOldSet.GetItemState( nWhich, FALSE );
+ SfxItemState eItemState = rOldSet.GetItemState( nWhich, false );
ScProtectionAttr aProtAttr;
if ( !bDontCare )
@@ -168,7 +168,7 @@ BOOL ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs )
aProtAttr.SetHidePrint( bHidePrint );
if ( bTriEnabled )
- bAttrsChanged = TRUE; // DontCare -> richtiger Wert
+ bAttrsChanged = sal_True; // DontCare -> richtiger Wert
else
bAttrsChanged = !pOldItem || !( aProtAttr == *(const ScProtectionAttr*)pOldItem );
}
@@ -199,11 +199,11 @@ IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox )
{
TriState eState = pBox->GetState();
if ( eState == STATE_DONTKNOW )
- bDontCare = TRUE; // alles zusammen auf DontCare
+ bDontCare = sal_True; // alles zusammen auf DontCare
else
{
- bDontCare = FALSE; // DontCare ueberall aus
- BOOL bOn = ( eState == STATE_CHECK ); // ausgewaehlter Wert
+ bDontCare = false; // DontCare ueberall aus
+ sal_Bool bOn = ( eState == STATE_CHECK ); // ausgewaehlter Wert
if ( pBox == &aBtnProtect )
bProtect = bOn;
@@ -243,7 +243,7 @@ void ScTabPageProtection::UpdateButtons()
aBtnHidePrint.SetState( bHidePrint ? STATE_CHECK : STATE_NOCHECK );
}
- BOOL bEnable = ( aBtnHideCell.GetState() != STATE_CHECK );
+ sal_Bool bEnable = ( aBtnHideCell.GetState() != STATE_CHECK );
{
aBtnProtect.Enable( bEnable );
aBtnHideFormula.Enable( bEnable );
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx
index 34698c7b9104..823aec21d053 100644
--- a/sc/source/ui/cctrl/cbuttonw.cxx
+++ b/sc/source/ui/cctrl/cbuttonw.cxx
@@ -71,28 +71,28 @@ void ScDDComboBoxButton::SetOptSizePixel()
void ScDDComboBoxButton::Draw( const Point& rAt,
const Size& rSize,
- BOOL bState,
- BOOL bBtnIn /* = FALSE */ )
+ sal_Bool bState,
+ sal_Bool bBtnIn /* = sal_False */ )
{
if ( rSize.Width() == 0 || rSize.Height() == 0 )
return; // #i43092# rectangle with size 0 would have RECT_EMPTY as end position
// save old state
- BOOL bHadFill = pOut->IsFillColor();
+ sal_Bool bHadFill = pOut->IsFillColor();
Color aOldFill = pOut->GetFillColor();
- BOOL bHadLine = pOut->IsLineColor();
+ sal_Bool bHadLine = pOut->IsLineColor();
Color aOldLine = pOut->GetLineColor();
- BOOL bOldEnable = pOut->IsMapModeEnabled();
+ sal_Bool bOldEnable = pOut->IsMapModeEnabled();
Size aLogPix( 1, 1 );
Rectangle aBtnRect( rAt, rSize );
Rectangle aInnerRect = aBtnRect;
- pOut->EnableMapMode( FALSE );
+ pOut->EnableMapMode( false );
DecorationView aDecoView( pOut);
- USHORT nButtonStyle = BUTTON_DRAW_DEFAULT;
+ sal_uInt16 nButtonStyle = BUTTON_DRAW_DEFAULT;
if( bBtnIn ) // gedrueckt?
{
nButtonStyle = BUTTON_DRAW_PRESSED;
@@ -130,7 +130,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
//------------------------------------------------------------------------
void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect,
- BOOL bState )
+ sal_Bool bState )
{
// no need to save old line and fill color here (is restored after the call)
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 7bd9f501edab..2a5d415410dc 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -36,7 +36,7 @@
#include <vcl/outdev.hxx>
#include <vcl/settings.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/decoview.hxx>
#include "strload.hxx"
#include "global.hxx"
@@ -307,7 +307,7 @@ IMPL_LINK( ScMenuFloatingWindow::SubMenuItemData, TimeoutHdl, void*, EMPTYARG )
size_t ScMenuFloatingWindow::MENU_NOT_SELECTED = 999;
-ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel) :
+ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel) :
PopupMenuFloatingWindow(pParent),
maOpenTimer(this),
maCloseTimer(this),
@@ -1160,7 +1160,7 @@ void ScDPFieldPopupWindow::setAllMemberState(bool bSet)
{
size_t n = maMembers.size();
for (size_t i = 0; i < n; ++i)
- maChecks.CheckEntryPos(static_cast< USHORT >( i ), bSet);
+ maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), bSet);
}
void ScDPFieldPopupWindow::selectCurrentMemberOnly(bool bSet)
@@ -1356,7 +1356,7 @@ void ScDPFieldPopupWindow::initMembers()
for (size_t i = 0; i < n; ++i)
{
maChecks.InsertEntry(maMembers[i].maName);
- maChecks.CheckEntryPos(static_cast< USHORT >( i ), maMembers[i].mbVisible);
+ maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), maMembers[i].mbVisible);
if (maMembers[i].mbVisible)
++nVisMemCount;
}
@@ -1391,7 +1391,7 @@ void ScDPFieldPopupWindow::getResult(boost::unordered_map<OUString, bool, OUStri
size_t n = maMembers.size();
for (size_t i = 0; i < n; ++i)
{
- bool bState = maChecks.IsChecked(static_cast< USHORT >( i ));
+ bool bState = maChecks.IsChecked(static_cast< sal_uInt16 >( i ));
aResult.insert(ResultMap::value_type(maMembers[i].maName, bState));
}
rResult.swap(aResult);
diff --git a/sc/source/ui/cctrl/popmenu.cxx b/sc/source/ui/cctrl/popmenu.cxx
index 03414b4e25ec..0f0e135e08b4 100644
--- a/sc/source/ui/cctrl/popmenu.cxx
+++ b/sc/source/ui/cctrl/popmenu.cxx
@@ -42,7 +42,7 @@
void ScPopupMenu::Select()
{
nSel = GetCurItemId();
- bHit = TRUE;
+ bHit = sal_True;
}
diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx
index a0a66f7e8ab8..191adb337664 100644
--- a/sc/source/ui/cctrl/tbinsert.cxx
+++ b/sc/source/ui/cctrl/tbinsert.cxx
@@ -62,7 +62,7 @@ SFX_IMPL_TOOLBOX_CONTROL( ScTbxInsertCtrl, SfxUInt16Item);
//
//------------------------------------------------------------------
-ScTbxInsertCtrl::ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+ScTbxInsertCtrl::ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nLastSlotId(0)
{
@@ -73,7 +73,7 @@ ScTbxInsertCtrl::~ScTbxInsertCtrl()
{
}
-void ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState,
+void ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState,
const SfxPoolItem* pState )
{
GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) );
@@ -85,7 +85,7 @@ void ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState,
if(pItem)
{
nLastSlotId = pItem->GetValue();
- USHORT nImageId = nLastSlotId ? nLastSlotId : GetSlotId();
+ sal_uInt16 nImageId = nLastSlotId ? nLastSlotId : GetSlotId();
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nImageId ));
Image aImage = GetImage( m_xFrame,
@@ -99,7 +99,7 @@ void ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState,
SfxPopupWindow* ScTbxInsertCtrl::CreatePopupWindow()
{
- USHORT nSlotId = GetSlotId();
+ sal_uInt16 nSlotId = GetSlotId();
if (nSlotId == SID_TBXCTL_INSERT)
{
rtl::OUString aInsertBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertbar" ));
@@ -123,7 +123,7 @@ SfxPopupWindowType ScTbxInsertCtrl::GetPopupWindowType() const
return nLastSlotId ? SFX_POPUPWINDOW_ONTIMEOUT : SFX_POPUPWINDOW_ONCLICK;
}
-void ScTbxInsertCtrl::Select( BOOL /* bMod1 */ )
+void ScTbxInsertCtrl::Select( sal_Bool /* bMod1 */ )
{
SfxViewShell* pCurSh( SfxViewShell::Current() );
SfxDispatcher* pDispatch( 0 );
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 1b6cb14279b2..575269c5a0ec 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -54,8 +54,8 @@ SFX_IMPL_TOOLBOX_CONTROL( ScZoomSliderControl, SvxZoomSliderItem );
// -----------------------------------------------------------------------
ScZoomSliderControl::ScZoomSliderControl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx )
:SfxToolBoxControl( nSlotId, nId, rTbx )
{
@@ -71,10 +71,10 @@ ScZoomSliderControl::~ScZoomSliderControl()
// -----------------------------------------------------------------------
-void ScZoomSliderControl::StateChanged( USHORT /*nSID*/, SfxItemState eState,
+void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId ));
DBG_ASSERT( pBox ,"Control not found!" );
@@ -113,19 +113,19 @@ Window* ScZoomSliderControl::CreateItemWindow( Window *pParent )
struct ScZoomSliderWnd::ScZoomSliderWnd_Impl
{
- USHORT mnCurrentZoom;
- USHORT mnMinZoom;
- USHORT mnMaxZoom;
- USHORT mnSliderCenter;
+ sal_uInt16 mnCurrentZoom;
+ sal_uInt16 mnMinZoom;
+ sal_uInt16 mnMaxZoom;
+ sal_uInt16 mnSliderCenter;
std::vector< long > maSnappingPointOffsets;
- std::vector< USHORT > maSnappingPointZooms;
+ std::vector< sal_uInt16 > maSnappingPointZooms;
Image maSliderButton;
Image maIncreaseButton;
Image maDecreaseButton;
bool mbValuesSet;
bool mbOmitPaint;
- ScZoomSliderWnd_Impl( USHORT nCurrentZoom ) :
+ ScZoomSliderWnd_Impl( sal_uInt16 nCurrentZoom ) :
mnCurrentZoom( nCurrentZoom ),
mnMinZoom( 10 ),
mnMaxZoom( 400 ),
@@ -158,11 +158,11 @@ const long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance of two
// -----------------------------------------------------------------------
-USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
+sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
{
Size aSliderWindowSize = GetOutputSizePixel();
const long nControlWidth = aSliderWindowSize.Width();
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if( nOffset < nSliderXOffset )
return mpImpl->mnMinZoom;
@@ -170,7 +170,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
return mpImpl->mnMaxZoom;
// check for snapping points:
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
std::vector< long >::iterator aSnappingPointIter;
for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin();
aSnappingPointIter != mpImpl->maSnappingPointOffsets.end();
@@ -195,7 +195,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth;
const long nOffsetToSliderLeft = nOffset - nSliderXOffset;
- nRet = mpImpl->mnMinZoom + USHORT( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 );
+ nRet = mpImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 );
}
else
{
@@ -204,7 +204,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth;
const long nOffsetToSliderCenter = nOffset - nControlWidth/2;
- nRet = mpImpl->mnSliderCenter + USHORT( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 );
+ nRet = mpImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 );
}
}
@@ -219,7 +219,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
// -----------------------------------------------------------------------
-long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const
+long ScZoomSliderWnd::Zoom2Offset( sal_uInt16 nCurrentZoom ) const
{
Size aSliderWindowSize = GetOutputSizePixel();
const long nControlWidth = aSliderWindowSize.Width();
@@ -249,7 +249,7 @@ long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const
ScZoomSliderWnd::ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom ):
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom ):
Window( pParent ),
mpImpl( new ScZoomSliderWnd_Impl( nCurrentZoom ) ),
aLogicalSize( 115, 40 ),
@@ -390,20 +390,20 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem )
mpImpl->maSnappingPointZooms.clear();
// get all snapping points:
- std::set< USHORT > aTmpSnappingPoints;
- for ( USHORT j = 0; j < rSnappingPoints.getLength(); ++j )
+ std::set< sal_uInt16 > aTmpSnappingPoints;
+ for ( sal_uInt16 j = 0; j < rSnappingPoints.getLength(); ++j )
{
const sal_Int32 nSnappingPoint = rSnappingPoints[j];
- aTmpSnappingPoints.insert( (USHORT)nSnappingPoint );
+ aTmpSnappingPoints.insert( (sal_uInt16)nSnappingPoint );
}
// remove snapping points that are to close to each other:
- std::set< USHORT >::iterator aSnappingPointIter;
+ std::set< sal_uInt16 >::iterator aSnappingPointIter;
long nLastOffset = 0;
for ( aSnappingPointIter = aTmpSnappingPoints.begin(); aSnappingPointIter != aTmpSnappingPoints.end(); ++aSnappingPointIter )
{
- const USHORT nCurrent = *aSnappingPointIter;
+ const sal_uInt16 nCurrent = *aSnappingPointIter;
const long nCurrentOffset = Zoom2Offset( nCurrent );
if ( nCurrentOffset - nLastOffset >= nSnappingPointsMinDist )
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 73826a06c9d9..c0b9305ba3ee 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -51,15 +51,15 @@ static const sal_Char pStrMrg[] = "MRG";
// ============================================================================
ScAsciiOptions::ScAsciiOptions() :
- bFixedLen ( FALSE ),
+ bFixedLen ( false ),
aFieldSeps ( ';' ),
- bMergeFieldSeps ( FALSE ),
+ bMergeFieldSeps ( false ),
bQuotedFieldAsText(false),
bDetectSpecialNumber(false),
cTextSep ( cDefaultTextSep ),
eCharSet ( gsl_getSystemTextEncoding() ),
eLang ( LANGUAGE_SYSTEM ),
- bCharSetSystem ( FALSE ),
+ bCharSetSystem ( false ),
nStartRow ( 1 ),
nInfoCount ( 0 ),
pColStart ( NULL ),
@@ -84,8 +84,8 @@ ScAsciiOptions::ScAsciiOptions(const ScAsciiOptions& rOpt) :
if (nInfoCount)
{
pColStart = new xub_StrLen[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (USHORT i=0; i<nInfoCount; i++)
+ pColFormat = new sal_uInt8[nInfoCount];
+ for (sal_uInt16 i=0; i<nInfoCount; i++)
{
pColStart[i] = rOpt.pColStart[i];
pColFormat[i] = rOpt.pColFormat[i];
@@ -106,7 +106,7 @@ ScAsciiOptions::~ScAsciiOptions()
}
-void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat )
+void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat )
{
delete[] pColStart;
delete[] pColFormat;
@@ -116,8 +116,8 @@ void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const
if (nInfoCount)
{
pColStart = new xub_StrLen[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (USHORT i=0; i<nInfoCount; i++)
+ pColFormat = new sal_uInt8[nInfoCount];
+ for (sal_uInt16 i=0; i<nInfoCount; i++)
{
pColStart[i] = pStart[i];
pColFormat[i] = pFormat[i];
@@ -169,7 +169,7 @@ ScAsciiOptions& ScAsciiOptions::operator=( const ScAsciiOptions& rCpy )
}
-BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const
+sal_Bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const
{
if ( bFixedLen == rCmp.bFixedLen &&
aFieldSeps == rCmp.aFieldSeps &&
@@ -183,14 +183,14 @@ BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const
{
DBG_ASSERT( !nInfoCount || (pColStart && pColFormat && rCmp.pColStart && rCmp.pColFormat),
"0-Zeiger in ScAsciiOptions" );
- for (USHORT i=0; i<nInfoCount; i++)
+ for (sal_uInt16 i=0; i<nInfoCount; i++)
if ( pColStart[i] != rCmp.pColStart[i] ||
pColFormat[i] != rCmp.pColFormat[i] )
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//
@@ -212,18 +212,18 @@ void ScAsciiOptions::ReadFromString( const String& rString )
if ( nCount >= 1 )
{
- bFixedLen = bMergeFieldSeps = FALSE;
+ bFixedLen = bMergeFieldSeps = false;
aFieldSeps.Erase();
aToken = rString.GetToken(0,',');
if ( aToken.EqualsAscii(pStrFix) )
- bFixedLen = TRUE;
+ bFixedLen = sal_True;
nSub = aToken.GetTokenCount('/');
for ( i=0; i<nSub; i++ )
{
String aCode = aToken.GetToken( i, '/' );
if ( aCode.EqualsAscii(pStrMrg) )
- bMergeFieldSeps = TRUE;
+ bMergeFieldSeps = sal_True;
else
{
sal_Int32 nVal = aCode.ToInt32();
@@ -279,11 +279,11 @@ void ScAsciiOptions::ReadFromString( const String& rString )
if (nInfoCount)
{
pColStart = new xub_StrLen[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++)
+ pColFormat = new sal_uInt8[nInfoCount];
+ for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++)
{
pColStart[nInfo] = (xub_StrLen) aToken.GetToken( 2*nInfo, '/' ).ToInt32();
- pColFormat[nInfo] = (BYTE) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32();
+ pColFormat[nInfo] = (sal_uInt8) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32();
}
}
else
@@ -313,6 +313,10 @@ void ScAsciiOptions::ReadFromString( const String& rString )
aToken = rString.GetToken(7, ',');
bDetectSpecialNumber = aToken.EqualsAscii("true") ? true : false;
}
+ else
+ bDetectSpecialNumber = sal_True; // default of versions that didn't add the parameter
+
+ // 9th token is used for "Save as shown" in export options
}
@@ -375,7 +379,7 @@ String ScAsciiOptions::WriteToString() const
//
DBG_ASSERT( !nInfoCount || (pColStart && pColFormat), "0-Zeiger in ScAsciiOptions" );
- for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++)
+ for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++)
{
if (nInfo)
aOutStr += '/';
@@ -400,6 +404,8 @@ String ScAsciiOptions::WriteToString() const
// Detect special nubmers.
aOutStr += String::CreateFromAscii(bDetectSpecialNumber ? "true" : "false");
+ // 9th token is used for "Save as shown" in export options
+
return aOutStr;
}
diff --git a/sc/source/ui/dbgui/asciiopt.src b/sc/source/ui/dbgui/asciiopt.src
index 9396b862d2f3..94008212c263 100644
--- a/sc/source/ui/dbgui/asciiopt.src
+++ b/sc/source/ui/dbgui/asciiopt.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_ASCII
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_ASCII";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 320 , 305 ) ;
@@ -71,6 +72,7 @@ ModalDialog RID_SCDLG_ASCII
ListBox LB_CHARSET
{
+ HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CHARSET";
Pos = MAP_APPFONT ( 76 , 14 ) ;
Size = MAP_APPFONT ( 130 , 61 ) ;
TabStop = TRUE ;
@@ -87,6 +89,7 @@ ModalDialog RID_SCDLG_ASCII
ListBox LB_CUSTOMLANG
{
+ HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CUSTOMLANG";
Pos = MAP_APPFONT ( 76 , 30 ) ;
Size = MAP_APPFONT ( 130 , 61 ) ;
TabStop = TRUE ;
@@ -103,6 +106,7 @@ ModalDialog RID_SCDLG_ASCII
NumericField NF_AT_ROW
{
+ HelpID = "sc:NumericField:RID_SCDLG_ASCII:NF_AT_ROW";
Border = TRUE ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 76 , 46 ) ;
@@ -121,6 +125,7 @@ ModalDialog RID_SCDLG_ASCII
};
RadioButton RB_FIXED
{
+ HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_FIXED";
Pos = MAP_APPFONT ( 12 , 75 ) ;
Size = MAP_APPFONT ( 243 , 10 ) ;
Text [ en-US ] = "~Fixed width" ;
@@ -128,6 +133,7 @@ ModalDialog RID_SCDLG_ASCII
};
RadioButton RB_SEPARATED
{
+ HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_SEPARATED";
Pos = MAP_APPFONT ( 12 , 89 ) ;
Size = MAP_APPFONT ( 243 , 10 ) ;
Text [ en-US ] = "~Separated by" ;
@@ -137,6 +143,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CKB_TAB
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_TAB";
Pos = MAP_APPFONT ( 20 , 102 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -144,6 +151,7 @@ ModalDialog RID_SCDLG_ASCII
};
CheckBox CKB_COMMA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_COMMA";
Pos = MAP_APPFONT ( 92 , 102 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -151,6 +159,7 @@ ModalDialog RID_SCDLG_ASCII
};
CheckBox CKB_OTHER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_OTHER";
Pos = MAP_APPFONT ( 164 , 102 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -158,6 +167,7 @@ ModalDialog RID_SCDLG_ASCII
};
Edit ED_OTHER
{
+ HelpID = "sc:Edit:RID_SCDLG_ASCII:ED_OTHER";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 100 ) ;
Size = MAP_APPFONT ( 37 , 12 ) ;
@@ -167,6 +177,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CKB_SEMICOLON
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SEMICOLON";
Pos = MAP_APPFONT ( 20 , 115 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -174,6 +185,7 @@ ModalDialog RID_SCDLG_ASCII
};
CheckBox CKB_SPACE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SPACE";
Pos = MAP_APPFONT ( 92 , 115 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -182,6 +194,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CB_ASONCE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_ASONCE";
Pos = MAP_APPFONT ( 20 , 130 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
TabStop = TRUE ;
@@ -190,6 +203,7 @@ ModalDialog RID_SCDLG_ASCII
ComboBox CB_TEXTSEP
{
+ HelpID = "sc:ComboBox:RID_SCDLG_ASCII:CB_TEXTSEP";
Pos = MAP_APPFONT ( 218 , 128 ) ;
Size = MAP_APPFONT ( 37 , 94 ) ;
TabStop = TRUE ;
@@ -211,6 +225,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CB_QUOTED_AS_TEXT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_QUOTED_AS_TEXT";
Pos = MAP_APPFONT ( 12 , 158 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
TabStop = TRUE ;
@@ -219,6 +234,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CB_DETECT_SPECIAL_NUMBER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_DETECT_SPECIAL_NUMBER";
Pos = MAP_APPFONT ( 12 , 171 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
TabStop = TRUE ;
@@ -239,6 +255,7 @@ ModalDialog RID_SCDLG_ASCII
};
ListBox LB_TYPE1
{
+ HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_TYPE1";
Pos = MAP_APPFONT ( 76 , 198 ) ;
Size = MAP_APPFONT ( 60 , 68 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index b6d7f2430091..3ac55d55cc12 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -65,7 +65,7 @@ public:
ScAreaData() {}
~ScAreaData() {}
- void Set( const String& rName, const String& rArea, BOOL bDb )
+ void Set( const String& rName, const String& rArea, sal_Bool bDb )
{
aStrName = rName;
aStrArea = rArea;
@@ -74,7 +74,7 @@ public:
String aStrName;
String aStrArea;
- BOOL bIsDbArea;
+ sal_Bool bIsDbArea;
};
@@ -156,7 +156,7 @@ void ScConsolidateDlg::Init()
DBG_ASSERT( pViewData && pDoc && pRangeUtil, "Error in Ctor" );
String aStr;
- USHORT i=0;
+ sal_uInt16 i=0;
aEdDataArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
aEdDestArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
@@ -222,8 +222,8 @@ void ScConsolidateDlg::Init()
ScRangeName* pRangeNames = pDoc->GetRangeName();
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- const USHORT nRangeCount = pRangeNames ? pRangeNames->size() : 0;
- const USHORT nDbCount = pDbNames ? pDbNames ->GetCount() : 0;
+ const sal_uInt16 nRangeCount = pRangeNames ? pRangeNames->size() : 0;
+ const sal_uInt16 nDbCount = pDbNames ? pDbNames ->GetCount() : 0;
nAreaDataCount = nRangeCount+nDbCount;
pAreaData = NULL;
@@ -234,7 +234,7 @@ void ScConsolidateDlg::Init()
String aStrName;
String aStrArea;
- USHORT nAt = 0;
+ sal_uInt16 nAt = 0;
ScRange aRange;
ScAreaNameIterator aIter( pDoc );
while ( aIter.Next( aStrName, aRange ) )
@@ -269,7 +269,7 @@ void ScConsolidateDlg::FillAreaLists()
{
String aString;
- for ( USHORT i=0;
+ for ( sal_uInt16 i=0;
(i<nAreaDataCount) && (pAreaData[i].aStrName.Len()>0);
i++ )
{
@@ -295,7 +295,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
RefInputStart( pRefInputEdit );
String aStr;
- USHORT nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch
+ sal_uInt16 nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch
const formula::FormulaGrammar::AddressConvention eConv = pDocP->GetAddressConvention();
if ( rRef.aStart.Tab() != rRef.aEnd.Tab() )
@@ -315,7 +315,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScConsolidateDlg::Close()
+sal_Bool ScConsolidateDlg::Close()
{
return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() );
}
@@ -327,7 +327,7 @@ void ScConsolidateDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if ( pRefInputEdit )
{
@@ -346,20 +346,20 @@ void ScConsolidateDlg::SetActive()
void ScConsolidateDlg::Deactivate()
{
- bDlgLostFocus = TRUE;
+ bDlgLostFocus = sal_True;
}
//----------------------------------------------------------------------------
-BOOL ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
+sal_Bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
{
if ( !pRangeUtil || !pDoc || !pViewData ||
((pEd != &aEdDataArea) && (pEd != &aEdDestArea)) )
- return FALSE;
+ return false;
SCTAB nTab = pViewData->GetTabNo();
- BOOL bEditOk = FALSE;
+ sal_Bool bEditOk = false;
String theCompleteStr;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -411,7 +411,7 @@ IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr )
IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG )
{
- USHORT nDataAreaCount = aLbConsAreas.GetEntryCount();
+ sal_uInt16 nDataAreaCount = aLbConsAreas.GetEntryCount();
if ( nDataAreaCount > 0 )
{
@@ -425,7 +425,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG )
ScConsolidateParam theOutParam( theConsData );
ScArea** ppDataAreas = new ScArea*[nDataAreaCount];
ScArea* pArea;
- USHORT i=0;
+ sal_uInt16 i=0;
for ( i=0; i<nDataAreaCount; i++ )
{
@@ -450,7 +450,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG )
ScConsolidateItem aOutItem( nWhichCons, &theOutParam );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_CONSOLIDATE,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -481,16 +481,16 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn )
{
String aNewEntry( aEdDataArea.GetText() );
ScArea** ppAreas = NULL;
- USHORT nAreaCount = 0;
+ sal_uInt16 nAreaCount = 0;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, TRUE, eConv ) )
+ if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, sal_True, eConv ) )
{
// IsAbsTabArea() legt ein Array von ScArea-Zeigern an,
// welche ebenfalls dynamisch erzeugt wurden.
// Diese Objekte muessen hier abgeraeumt werden.
- for ( USHORT i=0; i<nAreaCount; i++ )
+ for ( sal_uInt16 i=0; i<nAreaCount; i++ )
{
String aNewArea;
@@ -551,7 +551,7 @@ IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb )
else if ( (pLb == &aLbDataArea) || (pLb == &aLbDestArea) )
{
Edit* pEd = (pLb == &aLbDataArea) ? &aEdDataArea : &aEdDestArea;
- USHORT nSelPos = pLb->GetSelectEntryPos();
+ sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
if ( pRangeUtil
&& (nSelPos > 0)
@@ -610,7 +610,7 @@ IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::RefEdit*, pEd )
// auch noch in tpsubt bzw. ueberall, wo StarCalc-Funktionen
// auswaehlbar sind.
-ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos )
+ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_uInt16 nPos )
{
switch ( nPos )
{
@@ -633,7 +633,7 @@ ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos )
//----------------------------------------------------------------------------
-USHORT ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
+sal_uInt16 ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
{
switch ( eFunc )
{
diff --git a/sc/source/ui/dbgui/consdlg.src b/sc/source/ui/dbgui/consdlg.src
index 9716b190c886..394dd80ac9b4 100644
--- a/sc/source/ui/dbgui/consdlg.src
+++ b/sc/source/ui/dbgui/consdlg.src
@@ -28,7 +28,7 @@
ModelessDialog RID_SCDLG_CONSOLIDATE
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_CONSOLIDATE ;
+ HelpId = CMD_SID_OPENDLG_CONSOLIDATE ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 280 , 154 ) ;
@@ -37,6 +37,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
Closeable = FALSE ;
ListBox LB_FUNC
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 212 , 90 ) ;
@@ -59,6 +60,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
Edit ED_DATA_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_CONSOLIDATE:ED_DATA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 106 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
@@ -66,6 +68,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
Edit ED_DEST_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_CONSOLIDATE:ED_DEST_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 135 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
@@ -73,6 +76,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ImageButton RB_DATA_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONSOLIDATE:RB_DATA_AREA";
Pos = MAP_APPFONT ( 206 , 105 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -80,6 +84,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ImageButton RB_DEST_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONSOLIDATE:RB_DEST_AREA";
Pos = MAP_APPFONT ( 206 , 134 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -87,6 +92,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ListBox LB_DATA_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_DATA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 106 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -95,6 +101,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ListBox LB_DEST_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_DEST_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 135 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -103,6 +110,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
MultiListBox LB_CONSAREAS
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_CONSOLIDATE:LB_CONSAREAS";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 46 ) ;
@@ -135,6 +143,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
CheckBox BTN_BYROW
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_BYROW";
Pos = MAP_APPFONT ( 12 , 165 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
Text [ en-US ] = "~Row labels" ;
@@ -142,6 +151,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
CheckBox BTN_BYCOL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_BYCOL";
Pos = MAP_APPFONT ( 12 , 179 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
TabStop = TRUE ;
@@ -167,6 +177,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
CheckBox BTN_REFS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_REFS";
Pos = MAP_APPFONT ( 121 , 165 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
Text [ en-US ] = "~Link to source data" ;
@@ -193,6 +204,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_CONSOLIDATE:BTN_MORE";
Pos = MAP_APPFONT ( 224 , 134 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -201,6 +213,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONSOLIDATE:BTN_REMOVE";
Pos = MAP_APPFONT ( 224 , 114 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -208,6 +221,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONSOLIDATE:BTN_ADD";
Pos = MAP_APPFONT ( 224 , 96 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index f399c6b2488a..15a0eb4e10cd 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -82,7 +82,7 @@ struct Func_Select
ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) :
ScCsvControl( rParent ),
mpColorConfig( 0 ),
- mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE ) ),
+ mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), true ) ),
maHeaderFont( GetFont() ),
maColStates( 1 ),
maTypeNames( 1 ),
@@ -252,7 +252,7 @@ void ScCsvGrid::InitFonts()
aDefSet.Put( aComplexItem );
// set Asian/Complex font size to height of character in Latin font
- ULONG nFontHt = static_cast< ULONG >( maMonoFont.GetSize().Height() );
+ sal_uLong nFontHt = static_cast< sal_uLong >( maMonoFont.GetSize().Height() );
aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CJK ) );
aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CTL ) );
@@ -903,8 +903,8 @@ void ScCsvGrid::KeyInput( const KeyEvent& rKEvt )
{
const KeyCode& rKCode = rKEvt.GetKeyCode();
sal_uInt16 nCode = rKCode.GetCode();
- bool bShift = rKCode.IsShift() == TRUE;
- bool bMod1 = rKCode.IsMod1() == TRUE;
+ bool bShift = rKCode.IsShift() == sal_True;
+ bool bMod1 = rKCode.IsMod1() == sal_True;
if( !rKCode.IsMod2() )
{
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 6f6a499b81cd..dbc21d51afb2 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -129,7 +129,7 @@ ScCsvRuler::~ScCsvRuler()
// common ruler handling ------------------------------------------------------
void ScCsvRuler::SetPosSizePixel(
- long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+ long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( nFlags & WINDOW_POSSIZE_HEIGHT )
nHeight = GetTextHeight() + mnSplitSize + 2;
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 2b7b56b116a9..63d11e1141ae 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -125,7 +125,7 @@ ScDataPilotDatabaseDlg::~ScDataPilotDatabaseDlg()
void ScDataPilotDatabaseDlg::GetValues( ScImportSourceDesc& rDesc )
{
- USHORT nSelect = aLbType.GetSelectEntryPos();
+ sal_uInt16 nSelect = aLbType.GetSelectEntryPos();
rDesc.aDBName = aLbDatabase.GetSelectEntry();
rDesc.aObject = aCbObject.GetText();
@@ -156,7 +156,7 @@ void ScDataPilotDatabaseDlg::FillObjects()
if (!aDatabaseName.Len())
return;
- USHORT nSelect = aLbType.GetSelectEntryPos();
+ sal_uInt16 nSelect = aLbType.GetSelectEntryPos();
if ( nSelect > DP_TYPELIST_QUERY )
return; // only tables and queries
diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx
index 507df18c5829..086d4778fba8 100644
--- a/sc/source/ui/dbgui/dapitype.cxx
+++ b/sc/source/ui/dbgui/dapitype.cxx
@@ -45,7 +45,7 @@ using ::rtl::OUString;
//-------------------------------------------------------------------------
-ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal ) :
+ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DAPITYPE ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
@@ -96,7 +96,7 @@ bool ScDataPilotSourceTypeDlg::IsNamedRange() const
OUString ScDataPilotSourceTypeDlg::GetSelectedNamedRange() const
{
- USHORT nPos = aLbNamedRange.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbNamedRange.GetSelectEntryPos();
return aLbNamedRange.GetEntry(nPos);
}
diff --git a/sc/source/ui/dbgui/dapitype.src b/sc/source/ui/dbgui/dapitype.src
index fa49dfbb6bcf..283106c15e84 100644
--- a/sc/source/ui/dbgui/dapitype.src
+++ b/sc/source/ui/dbgui/dapitype.src
@@ -140,6 +140,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
ListBox LB_SERVICE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DAPISERVICE:LB_SERVICE";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 12 ) ;
Size = MAP_APPFONT ( 120 , 80 ) ;
@@ -154,6 +155,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_SOURCE
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_SOURCE";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 28 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -167,6 +169,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_NAME
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 44 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -180,6 +183,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_USER
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_USER";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 60 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -193,6 +197,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_PASSWD
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_PASSWD";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 76 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -248,6 +253,7 @@ ModalDialog RID_SCDLG_DAPIDATA
};
ListBox LB_DATABASE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DAPIDATA:LB_DATABASE";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 12 ) ;
Size = MAP_APPFONT ( 110 , 80 ) ;
@@ -263,6 +269,7 @@ ModalDialog RID_SCDLG_DAPIDATA
};
ComboBox CB_OBJECT
{
+ HelpID = "sc:ComboBox:RID_SCDLG_DAPIDATA:CB_OBJECT";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 28 ) ;
Size = MAP_APPFONT ( 110 , 80 ) ;
@@ -278,6 +285,7 @@ ModalDialog RID_SCDLG_DAPIDATA
};
ListBox LB_OBJTYPE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DAPIDATA:LB_OBJTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 44 ) ;
Size = MAP_APPFONT ( 110 , 80 ) ;
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 69672f9802d3..fcf29c814933 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -78,7 +78,7 @@ public:
: rEdAssign(rEd),
rBtnHeader(rHdr), rBtnSize(rSize), rBtnFormat(rFmt), rBtnStrip(rStrip),
rCurArea(rArea),
- bHeader(FALSE), bSize(FALSE), bFormat(FALSE), bDirty(FALSE) {}
+ bHeader(false), bSize(false), bFormat(false), bDirty(false) {}
void Save();
void Restore();
@@ -91,11 +91,11 @@ private:
ScRange& rCurArea;
String aStr;
ScRange aArea;
- BOOL bHeader:1;
- BOOL bSize:1;
- BOOL bFormat:1;
- BOOL bStrip:1;
- BOOL bDirty:1;
+ sal_Bool bHeader:1;
+ sal_Bool bSize:1;
+ sal_Bool bFormat:1;
+ sal_Bool bStrip:1;
+ sal_Bool bDirty:1;
};
@@ -110,7 +110,7 @@ void DBSaveData::Save()
bSize = rBtnSize.IsChecked();
bFormat = rBtnFormat.IsChecked();
bStrip = rBtnStrip.IsChecked();
- bDirty = TRUE;
+ bDirty = sal_True;
}
@@ -126,7 +126,7 @@ void DBSaveData::Restore()
rBtnSize.Check ( bSize );
rBtnFormat.Check ( bFormat );
rBtnStrip.Check ( bStrip );
- bDirty = FALSE;
+ bDirty = false;
}
}
@@ -170,7 +170,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
//
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
- bRefInputMode ( FALSE ),
+ bRefInputMode ( false ),
aAddrDetails ( pDoc->GetAddressConvention(), 0, 0 ),
aLocalDbCol ( *(pDoc->GetDBCollection()) )
{
@@ -186,6 +186,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aBtnDoSize, aBtnKeepFmt, aBtnStripData, theCurArea );
Init();
FreeResource();
+ aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign);
}
@@ -209,7 +210,7 @@ ScDbNameDlg::~ScDbNameDlg()
void ScDbNameDlg::Init()
{
- aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen
+ aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
aBtnMore.AddWindow( &aFlOptions );
aBtnMore.AddWindow( &aBtnHeader );
@@ -252,7 +253,7 @@ void ScDbNameDlg::Init()
if ( pDBColl )
{
// Feststellen, ob definierter DB-Bereich markiert wurde:
- pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, TRUE );
+ pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, sal_True );
if ( pDBData )
{
String theDbName;
@@ -287,7 +288,7 @@ void ScDbNameDlg::Init()
aEdAssign.SetText( theAreaStr );
aEdName.GrabFocus();
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
NameModifyHdl( 0 );
}
@@ -335,7 +336,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
aFTSource.Enable();
aFTOperations.Enable();
aBtnAdd.Enable();
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
}
}
@@ -343,7 +344,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScDbNameDlg::Close()
+sal_Bool ScDbNameDlg::Close()
{
return DoClose( ScDbNameDlgWrapper::GetChildWindowId() );
}
@@ -365,9 +366,9 @@ void ScDbNameDlg::SetActive()
void ScDbNameDlg::UpdateNames()
{
- USHORT nNameCount = aLocalDbCol.GetCount();
+ sal_uInt16 nNameCount = aLocalDbCol.GetCount();
- aEdName.SetUpdateMode( FALSE );
+ aEdName.SetUpdateMode( false );
//-----------------------------------------------------------
aEdName.Clear();
aEdAssign.SetText( EMPTY_STRING );
@@ -377,7 +378,7 @@ void ScDbNameDlg::UpdateNames()
ScDBData* pDbData = NULL;
String aString;
- for ( USHORT i=0; i<nNameCount; i++ )
+ for ( sal_uInt16 i=0; i<nNameCount; i++ )
{
pDbData = (ScDBData*)(aLocalDbCol.At( i ));
if ( pDbData )
@@ -395,7 +396,7 @@ void ScDbNameDlg::UpdateNames()
aBtnRemove.Disable();
}
//-----------------------------------------------------------
- aEdName.SetUpdateMode( TRUE );
+ aEdName.SetUpdateMode( sal_True );
aEdName.Invalidate();
}
@@ -404,7 +405,7 @@ void ScDbNameDlg::UpdateNames()
void ScDbNameDlg::UpdateDBData( const String& rStrName )
{
String theArea;
- USHORT nAt;
+ sal_uInt16 nAt;
ScDBData* pData;
aLocalDbCol.SearchName( rStrName, nAt );
@@ -445,7 +446,7 @@ void ScDbNameDlg::UpdateDBData( const String& rStrName )
//------------------------------------------------------------------------
-BOOL ScDbNameDlg::IsRefInputMode() const
+sal_Bool ScDbNameDlg::IsRefInputMode() const
{
return bRefInputMode;
}
@@ -502,7 +503,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
ScAddress aEnd = theCurArea.aEnd;
ScDBData* pOldEntry = NULL;
- USHORT nFoundAt = 0;
+ sal_uInt16 nFoundAt = 0;
if ( aLocalDbCol.SearchName( aNewName, nFoundAt ) )
pOldEntry = aLocalDbCol[nFoundAt];
if (pOldEntry)
@@ -511,7 +512,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
pOldEntry->MoveTo( aStart.Tab(), aStart.Col(), aStart.Row(),
aEnd.Col(), aEnd.Row() );
- pOldEntry->SetByRow( TRUE );
+ pOldEntry->SetByRow( sal_True );
pOldEntry->SetHeader( aBtnHeader.IsChecked() );
pOldEntry->SetDoSize( aBtnDoSize.IsChecked() );
pOldEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
@@ -524,7 +525,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
ScDBData* pNewEntry = new ScDBData( aNewName, aStart.Tab(),
aStart.Col(), aStart.Row(),
aEnd.Col(), aEnd.Row(),
- TRUE, aBtnHeader.IsChecked() );
+ sal_True, aBtnHeader.IsChecked() );
pNewEntry->SetDoSize( aBtnDoSize.IsChecked() );
pNewEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
pNewEntry->SetStripData( aBtnStripData.IsChecked() );
@@ -541,13 +542,13 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
aBtnAdd.Disable();
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
- aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen
- aBtnDoSize.Check( FALSE );
- aBtnKeepFmt.Check( FALSE );
- aBtnStripData.Check( FALSE );
+ aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
+ aBtnDoSize.Check( false );
+ aBtnKeepFmt.Check( false );
+ aBtnStripData.Check( false );
SetInfoStrings( NULL ); // leer
theCurArea = ScRange();
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
NameModifyHdl( 0 );
}
@@ -572,7 +573,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG )
{
- USHORT nRemoveAt = 0;
+ sal_uInt16 nRemoveAt = 0;
const String aStrEntry = aEdName.GetText();
if ( aLocalDbCol.SearchName( aStrEntry, nRemoveAt ) )
@@ -608,12 +609,12 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG )
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
theCurArea = ScRange();
- aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen
- aBtnDoSize.Check( FALSE );
- aBtnKeepFmt.Check( FALSE );
- aBtnStripData.Check( FALSE );
+ aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
+ aBtnDoSize.Check( false );
+ aBtnKeepFmt.Check( false );
+ aBtnStripData.Check( false );
SetInfoStrings( NULL ); // leer
- bSaved=FALSE;
+ bSaved=false;
pSaveObj->Restore();
NameModifyHdl( 0 );
}
@@ -626,7 +627,7 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
{
String theName = aEdName.GetText();
- BOOL bNameFound = (COMBOBOX_ENTRY_NOTFOUND
+ sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND
!= aEdName.GetEntryPos( theName ));
if ( theName.Len() == 0 )
@@ -644,11 +645,11 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
aFTOperations.Disable();
aEdAssign .Disable();
aRbAssign .Disable();
- //bSaved=FALSE;
+ //bSaved=sal_False;
//pSaveObj->Restore();
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
- bRefInputMode = FALSE;
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
+ bRefInputMode = false;
}
else
{
@@ -659,7 +660,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
if(!bSaved)
{
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
}
UpdateDBData( theName );
@@ -669,7 +670,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
if ( aBtnAdd.GetText() != aStrAdd )
aBtnAdd.SetText( aStrAdd );
- bSaved=FALSE;
+ bSaved=false;
pSaveObj->Restore();
if ( aEdAssign.GetText().Len() > 0 )
@@ -701,7 +702,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
//SFX_APPWINDOW->Enable();
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
return 0;
}
diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx
index e665b215c0e9..82ccb987599e 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.cxx
+++ b/sc/source/ui/dbgui/dpgroupdlg.cxx
@@ -197,7 +197,7 @@ ScDPNumGroupInfo ScDPNumGroupDlg::GetGroupInfo() const
{
ScDPNumGroupInfo aInfo;
aInfo.Enable = sal_True;
- aInfo.DateValues = sal_False;
+ aInfo.DateValues = false;
aInfo.AutoStart = maStartHelper.IsAuto();
aInfo.AutoEnd = maEndHelper.IsAuto();
@@ -239,21 +239,21 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( Window* pParent,
{
maLbUnits.SetHelpId( HID_SC_DPDATEGROUP_LB );
ResStringArray aArr( ScResId( STR_UNITS ) );
- for( USHORT nIdx = 0, nCount = sal::static_int_cast<USHORT>(aArr.Count()); nIdx < nCount; ++nIdx )
+ for( sal_uInt16 nIdx = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIdx < nCount; ++nIdx )
maLbUnits.InsertEntry( aArr.GetString( nIdx ) );
FreeResource();
- maEdStart.SetShowDateCentury( TRUE );
- maEdEnd.SetShowDateCentury( TRUE );
+ maEdStart.SetShowDateCentury( sal_True );
+ maEdEnd.SetShowDateCentury( sal_True );
maStartHelper.SetValue( rInfo.AutoStart, rInfo.Start );
maEndHelper.SetValue( rInfo.AutoEnd, rInfo.End );
if( nDatePart == 0 )
nDatePart = com::sun::star::sheet::DataPilotFieldGroupBy::MONTHS;
- for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
- maLbUnits.CheckEntryPos( static_cast< USHORT >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 );
+ for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
+ maLbUnits.CheckEntryPos( static_cast< sal_uInt16 >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 );
if( rInfo.DateValues )
{
@@ -317,8 +317,8 @@ sal_Int32 ScDPDateGroupDlg::GetDatePart() const
// return listbox contents for "units" mode
sal_Int32 nDatePart = 0;
- for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
- if( maLbUnits.IsChecked( static_cast< USHORT >( nIdx ) ) )
+ for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
+ if( maLbUnits.IsChecked( static_cast< sal_uInt16 >( nIdx ) ) )
nDatePart |= spnDateParts[ nIdx ];
return nDatePart;
}
diff --git a/sc/source/ui/dbgui/dpgroupdlg.src b/sc/source/ui/dbgui/dpgroupdlg.src
index 6e6ba170f1b1..4e73cfc185da 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.src
+++ b/sc/source/ui/dbgui/dpgroupdlg.src
@@ -46,6 +46,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_AUTOSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOSTART";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -53,6 +54,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_MANSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANSTART";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -60,6 +62,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
Edit ED_START
{
+ HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_START";
Pos = MAP_APPFONT ( 94 , 26 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -73,6 +76,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_AUTOEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOEND";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -80,6 +84,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_MANEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANEND";
Pos = MAP_APPFONT ( 12 , 67 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -87,6 +92,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
Edit ED_END
{
+ HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_END";
Pos = MAP_APPFONT ( 94 , 65 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -100,6 +106,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
Edit ED_BY
{
+ HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_BY";
Pos = MAP_APPFONT ( 94 , 92 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -146,6 +153,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_AUTOSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_AUTOSTART";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -153,6 +161,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_MANSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_MANSTART";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -160,6 +169,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
DateField ED_START
{
+ HelpID = "sc:DateField:RID_SCDLG_DPDATEGROUP:ED_START";
Pos = MAP_APPFONT ( 94 , 26 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -173,6 +183,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_AUTOEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_AUTOEND";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -180,6 +191,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_MANEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_MANEND";
Pos = MAP_APPFONT ( 12 , 67 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -187,6 +199,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
DateField ED_END
{
+ HelpID = "sc:DateField:RID_SCDLG_DPDATEGROUP:ED_END";
Pos = MAP_APPFONT ( 94 , 65 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -200,6 +213,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_NUMDAYS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_NUMDAYS";
Pos = MAP_APPFONT ( 12 , 94 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -207,6 +221,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_UNITS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_UNITS";
Pos = MAP_APPFONT ( 12 , 110 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -214,6 +229,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
NumericField ED_NUMDAYS
{
+ HelpID = "sc:NumericField:RID_SCDLG_DPDATEGROUP:ED_NUMDAYS";
Pos = MAP_APPFONT ( 94, 92 ) ;
Size = MAP_APPFONT ( 35, 12 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 874308467850..7bd85a348dc9 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -29,14 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <vcl/virdev.hxx>
+#include "fieldwnd.hxx"
+
+#include <tools/debug.hxx>
#include <vcl/decoview.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/mnemonic.hxx>
#include <vcl/help.hxx>
-#include <tools/debug.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/virdev.hxx>
-#include "fieldwnd.hxx"
#include "pvlaydlg.hxx"
#include "dpuiglobal.hxx"
#include "AccessibleDataPilotControl.hxx"
@@ -231,6 +231,7 @@ void ScDPFieldControlBase::SetFieldText( const String& rText, size_t nIndex )
pAccessible = NULL;
}
}
+ return PIVOTFIELD_INVALID;
}
const String& ScDPFieldControlBase::GetFieldText( size_t nIndex ) const
@@ -304,10 +305,9 @@ void ScDPFieldControlBase::MouseButtonDown( const MouseEvent& rMEvt )
{
if( rMEvt.IsLeft() )
{
- size_t nIndex = 0;
- if( GetFieldIndex( rMEvt.GetPosPixel(), nIndex ) && IsExistingIndex( nIndex ) )
- {
- GrabFocusWithSel( nIndex );
+ --mnAutoScrollDelay;
+ return;
+ }
if( rMEvt.GetClicks() == 1 )
{
@@ -323,7 +323,9 @@ void ScDPFieldControlBase::MouseButtonDown( const MouseEvent& rMEvt )
void ScDPFieldControlBase::MouseButtonUp( const MouseEvent& rMEvt )
{
- if( rMEvt.IsLeft() )
+ if( eEndType != ENDTRACKING_DROP )
+ mnFirstVisIndex = mnOldFirstVisIndex;
+ if( eEndType != ENDTRACKING_SUSPEND )
{
if( rMEvt.GetClicks() == 1 )
{
@@ -334,29 +336,60 @@ void ScDPFieldControlBase::MouseButtonUp( const MouseEvent& rMEvt )
if( IsMouseCaptured() )
ReleaseMouse();
}
+ mnInsCursorIndex = PIVOTFIELD_INVALID;
+ Invalidate();
}
void ScDPFieldControlBase::MouseMove( const MouseEvent& rMEvt )
{
- if( IsMouseCaptured() )
+ // prepare a virtual device for buffered painting
+ VirtualDevice aVirDev;
+ // #i97623# VirtualDevice is always LTR on construction while other windows derive direction from parent
+ aVirDev.EnableRTL( IsRTLEnabled() );
+ aVirDev.SetMapMode( MAP_PIXEL );
+ aVirDev.SetOutputSizePixel( GetSizePixel() );
+ Font aFont = GetFont();
+ aFont.SetTransparent( true );
+ aVirDev.SetFont( aFont );
+
+ // draw the background and all fields
+ DrawBackground( aVirDev );
+ for( size_t nFieldIndex = mnFirstVisIndex, nEndIndex = mnFirstVisIndex + mnPageSize; nFieldIndex < nEndIndex; ++nFieldIndex )
+ DrawField( aVirDev, nFieldIndex );
+ DrawInsertionCursor( aVirDev );
+ DrawBitmap( Point( 0, 0 ), aVirDev.GetBitmap( Point( 0, 0 ), GetSizePixel() ) );
+
+ // draw field text focus
+ if( HasFocus() && (mnSelectIndex < maFields.size()) && (mnFirstVisIndex <= mnSelectIndex) && (mnSelectIndex < mnFirstVisIndex + mnPageSize) )
{
PointerStyle ePtr = mpDlg->NotifyMouseMove( OutputToScreenPixel( rMEvt.GetPosPixel() ) );
SetPointer( Pointer( ePtr ) );
}
- size_t nIndex = 0;
- if( GetFieldIndex( rMEvt.GetPosPixel(), nIndex ) && IsShortenedText( nIndex ) )
+
+ // update scrollbar
+ size_t nFieldCount = maFields.size();
+ /* Already show the scrollbar if window is full but no fields are hidden
+ (yet). This gives the user the hint that it is now possible to add more
+ fields to the window. */
+ mrScrollBar.Show( nFieldCount >= mnPageSize );
+ mrScrollBar.Enable( nFieldCount > mnPageSize );
+ if( mrScrollBar.IsVisible() )
{
- Point aPos = OutputToScreenPixel( rMEvt.GetPosPixel() );
- Rectangle aRect( aPos, GetSizePixel() );
- String aHelpText = GetFieldText(nIndex);
- Help::ShowQuickHelp( this, aRect, aHelpText );
+ mrScrollBar.SetRange( Range( 0, static_cast< long >( (nFieldCount - 1) / mnLineSize + 1 ) ) );
+ mrScrollBar.SetThumbPos( static_cast< long >( mnFirstVisIndex / mnLineSize ) );
}
+
+ /* Exclude empty fields from tab chain, but do not disable them. They need
+ to be enabled because they still act as target for field movement via
+ keyboard shortcuts. */
+ WinBits nMask = ~(WB_TABSTOP | WB_NOTABSTOP);
+ SetStyle( (GetStyle() & nMask) | (IsEmpty() ? WB_NOTABSTOP : WB_TABSTOP) );
}
void ScDPFieldControlBase::KeyInput( const KeyEvent& rKEvt )
{
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
bool bKeyEvaluated = false;
const FieldNames& rFields = GetFieldNames();
@@ -415,7 +448,7 @@ void ScDPFieldControlBase::GetFocus()
ScrollToEnd();
}
else // else change focus
- mpDlg->NotifyFieldFocus( GetFieldType(), TRUE );
+ mpDlg->NotifyFieldFocus( GetFieldType(), true );
AccessibleSetFocus(true);
}
@@ -424,7 +457,7 @@ void ScDPFieldControlBase::LoseFocus()
{
Control::LoseFocus();
Redraw();
- mpDlg->NotifyFieldFocus( GetFieldType(), FALSE );
+ mpDlg->NotifyFieldFocus( GetFieldType(), false );
AccessibleSetFocus(false);
}
@@ -779,7 +812,7 @@ void ScDPHorFieldControl::Redraw()
Point aPos0;
Size aSize( GetSizePixel() );
Font aFont( GetFont() ); // Font vom Window
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( true );
aVirDev.SetFont( aFont );
aVirDev.SetOutputSizePixel( aSize );
@@ -1095,6 +1128,11 @@ void ScDPRowFieldControl::Redraw()
bool bFocus = HasFocus() && (nField == GetSelectedField());
DrawField(aVirDev, Rectangle(aFldPt, aFldSize), *itr, bFocus);
}
+
+ // draw the button text
+ Point aLabelOffset( (maFieldSize.Width() - nLabelWidth) / 2, ::std::max< long >( (maFieldSize.Height() - rDev.GetTextHeight()) / 2, 3 ) );
+ rDev.SetTextColor( GetSettings().GetStyleSettings().GetButtonTextColor() );
+ rDev.DrawText( aFieldPos + aLabelOffset, aClippedText );
}
// Create a bitmap from the virtual device, and place that bitmap onto
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 82a8e8801b8b..03fd26ffd32e 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -115,14 +115,14 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pDoc ( NULL ),
nSrcTab ( 0 ),
nFieldCount ( 0 ),
- bRefInputMode ( FALSE ),
+ bRefInputMode ( false ),
pTimer ( NULL )
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
pEntryLists[i] = NULL;
for (SCSIZE i=0;i<MAXQUERY;i++)
{
- bRefreshExceptQuery[i]=FALSE;
+ bRefreshExceptQuery[i]=false;
}
aBtnMore.SetMoreText( String(ScResId( SCSTR_MOREBTN_MOREOPTIONS )) );
aBtnMore.SetLessText( String(ScResId( SCSTR_MOREBTN_FEWEROPTIONS )) );
@@ -133,6 +133,65 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pTimer = new Timer;
pTimer->SetTimeout( 50 ); // 50ms warten
pTimer->SetTimeoutHdl( LINK( this, ScFilterDlg, TimeOutHdl ) );
+
+ String sAccName (ScResId(RID_FILTER_OPERATOR));
+ String sIndexName(sAccName);
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbConnect1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbConnect2.SetAccessibleName(sIndexName);
+
+ sAccName = String(ScResId(RID_FILTER_FIELDNAME));
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbField1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbField2.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aLbField3.SetAccessibleName(sIndexName);
+
+
+ sAccName = String(ScResId(RID_FILTER_CONDITION));
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbCond1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbCond2.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aLbCond3.SetAccessibleName(sIndexName);
+
+ sAccName = String(ScResId(RID_FILTER_VALUE));
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aEdVal1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aEdVal2.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aEdVal3.SetAccessibleName(sIndexName);
+
+ aLbCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO));
+ aEdCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO));
+ aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+
+ aLbConnect1.SetAccessibleRelationLabeledBy(&aFtConnect);
+ aLbConnect2.SetAccessibleRelationLabeledBy(&aFtConnect);
+ aLbField1.SetAccessibleRelationLabeledBy(&aFtField);
+ aLbField2.SetAccessibleRelationLabeledBy(&aFtField);
+ aLbField3.SetAccessibleRelationLabeledBy(&aFtField);
+ aLbCond1.SetAccessibleRelationLabeledBy(&aFtCond);
+ aLbCond2.SetAccessibleRelationLabeledBy(&aFtCond);
+ aLbCond3.SetAccessibleRelationLabeledBy(&aFtCond);
+ aEdVal1.SetAccessibleRelationLabeledBy(&aFtVal);
+ aEdVal2.SetAccessibleRelationLabeledBy(&aFtVal);
+ aEdVal3.SetAccessibleRelationLabeledBy(&aFtVal);
}
@@ -140,7 +199,7 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
ScFilterDlg::~ScFilterDlg()
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
delete pEntryLists[i];
delete pOptionsMgr;
@@ -230,13 +289,13 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
for ( SCSIZE i=0; i<4; i++ )
{
String aValStr;
- USHORT nCondPos = 0;
- USHORT nFieldSelPos = 0;
+ sal_uInt16 nCondPos = 0;
+ sal_uInt16 nFieldSelPos = 0;
ScQueryEntry& rEntry = theQueryData.GetEntry(i);
if ( rEntry.bDoQuery )
{
- nCondPos = (USHORT)rEntry.eOp;
+ nCondPos = (sal_uInt16)rEntry.eOp;
nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
if ( rEntry.nVal == SC_EMPTYFIELDS && !rEntry.bQueryByString && *rEntry.pStr == EMPTY_STRING )
{
@@ -256,15 +315,15 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
nFieldSelPos = GetFieldSelPos( pViewData->GetCurX() );
rEntry.nField = nFieldSelPos ? (theQueryData.nCol1 +
static_cast<SCCOL>(nFieldSelPos) - 1) : static_cast<SCCOL>(0);
- rEntry.bDoQuery=TRUE;
- bRefreshExceptQuery[i]=TRUE;
+ rEntry.bDoQuery=sal_True;
+ bRefreshExceptQuery[i]=sal_True;
}
aFieldLbArr[i]->SelectEntryPos( nFieldSelPos );
aCondLbArr [i]->SelectEntryPos( nCondPos );
aValueEdArr[i]->SetText( aValStr );
aValueEdArr[i]->SetModifyHdl( LINK( this, ScFilterDlg, ValModifyHdl ) );
- UpdateValueList( static_cast<USHORT>(i+1) );
+ UpdateValueList( static_cast<sal_uInt16>(i+1) );
}
aScrollBar.SetEndScrollHdl( LINK( this, ScFilterDlg, ScrollHdl ) );
@@ -277,17 +336,17 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
(aLbField1.GetSelectEntryPos() != 0)
&& (aLbField2.GetSelectEntryPos() != 0)
- ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect )
+ ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect )
: aLbConnect2.SetNoSelection();
(aLbField2.GetSelectEntryPos() != 0)
&& (aLbField3.GetSelectEntryPos() != 0)
- ? aLbConnect3.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect )
+ ? aLbConnect3.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect )
: aLbConnect3.SetNoSelection();
(aLbField3.GetSelectEntryPos() != 0)
&& (aLbField4.GetSelectEntryPos() != 0)
- ? aLbConnect4.SelectEntryPos( (USHORT)theQueryData.GetEntry(3).eConnect )
+ ? aLbConnect4.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(3).eConnect )
: aLbConnect4.SetNoSelection();
if ( aLbField1.GetSelectEntryPos() == 0 )
{
@@ -333,15 +392,15 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
if(pDoc!=NULL &&
pDoc->GetChangeTrack()!=NULL) aBtnCopyResult.Disable();
// Modal-Modus einschalten
-// SetDispatcherLock( TRUE );
+// SetDispatcherLock( sal_True );
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
-// SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+// SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
-BOOL ScFilterDlg::Close()
+sal_Bool ScFilterDlg::Close()
{
if (pViewData)
pViewData->GetDocShell()->CancelAutoDBRange();
@@ -404,7 +463,7 @@ void ScFilterDlg::FillFieldLists()
SCROW nFirstRow = theQueryData.nRow1;
SCCOL nMaxCol = theQueryData.nCol2;
SCCOL col = 0;
- USHORT i=1;
+ sal_uInt16 i=1;
for ( col=nFirstCol; col<=nMaxCol; col++ )
{
@@ -428,13 +487,13 @@ void ScFilterDlg::FillFieldLists()
//----------------------------------------------------------------------------
-void ScFilterDlg::UpdateValueList( USHORT nList )
+void ScFilterDlg::UpdateValueList( sal_uInt16 nList )
{
if ( pDoc && nList>0 && nList<=4 )
{
ComboBox* pValList = aValueEdArr[nList-1];
- USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
- USHORT nListPos = 0;
+ sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
+ sal_uInt16 nListPos = 0;
String aCurValue = pValList->GetText();
pValList->Clear();
@@ -449,7 +508,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1;
if (!pEntryLists[nColumn])
{
- USHORT nOffset = GetSliderPos();
+ sal_uInt16 nOffset = GetSliderPos();
SCTAB nTab = nSrcTab;
SCROW nFirstRow = theQueryData.nRow1;
SCROW nLastRow = theQueryData.bUseDynamicRange ? theQueryData.nDynamicEndRow : theQueryData.nRow2;
@@ -486,10 +545,10 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
}
TypedScStrCollection* pColl = pEntryLists[nColumn];
- USHORT nValueCount = pColl->GetCount();
+ sal_uInt16 nValueCount = pColl->GetCount();
if ( nValueCount > 0 )
{
- for ( USHORT i=0; i<nValueCount; i++ )
+ for ( sal_uInt16 i=0; i<nValueCount; i++ )
{
pValList->InsertEntry( (*pColl)[i]->GetString(), nListPos );
nListPos++;
@@ -503,30 +562,30 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
UpdateHdrInValueList( nList );
}
-void ScFilterDlg::UpdateHdrInValueList( USHORT nList )
+void ScFilterDlg::UpdateHdrInValueList( sal_uInt16 nList )
{
//! GetText / SetText ??
if ( pDoc && nList>0 && nList<=4 )
{
- USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
+ sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
if ( nFieldSelPos )
{
SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1;
if ( pEntryLists[nColumn] )
{
- USHORT nPos = nHeaderPos[nColumn];
+ sal_uInt16 nPos = nHeaderPos[nColumn];
if ( nPos != USHRT_MAX )
{
ComboBox* pValList = aValueEdArr[nList-1];
- USHORT nListPos = nPos + 2; // nach "leer" und "nicht leer"
+ sal_uInt16 nListPos = nPos + 2; // nach "leer" und "nicht leer"
TypedStrData* pHdrEntry = (*pEntryLists[nColumn])[nPos];
if ( pHdrEntry )
{
String aHdrStr = pHdrEntry->GetString();
- BOOL bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr );
- BOOL bInclude = !aBtnHeader.IsChecked();
+ sal_Bool bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr );
+ sal_Bool bInclude = !aBtnHeader.IsChecked();
if (bInclude) // Eintrag aufnehmen
{
@@ -555,7 +614,7 @@ void ScFilterDlg::UpdateHdrInValueList( USHORT nList )
//----------------------------------------------------------------------------
-void ScFilterDlg::ClearValueList( USHORT nList )
+void ScFilterDlg::ClearValueList( sal_uInt16 nList )
{
if ( nList>0 && nList<=4 )
{
@@ -570,10 +629,10 @@ void ScFilterDlg::ClearValueList( USHORT nList )
//----------------------------------------------------------------------------
-USHORT ScFilterDlg::GetFieldSelPos( SCCOL nField )
+sal_uInt16 ScFilterDlg::GetFieldSelPos( SCCOL nField )
{
if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 )
- return static_cast<USHORT>(nField - theQueryData.nCol1 + 1);
+ return static_cast<sal_uInt16>(nField - theQueryData.nCol1 + 1);
else
return 0;
}
@@ -584,7 +643,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
{
ScAddress theCopyPos;
ScQueryParam theParam( theQueryData );
- BOOL bCopyPosOk = FALSE;
+ sal_Bool bCopyPosOk = false;
if ( aBtnCopyResult.IsChecked() )
{
@@ -594,27 +653,27 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
if ( STRING_NOTFOUND != nColonPos )
theCopyStr.Erase( nColonPos );
- USHORT nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() );
bCopyPosOk = ( SCA_VALID == (nResult & SCA_VALID) );
}
if ( aBtnCopyResult.IsChecked() && bCopyPosOk )
{
- theParam.bInplace = FALSE;
+ theParam.bInplace = false;
theParam.nDestTab = theCopyPos.Tab();
theParam.nDestCol = theCopyPos.Col();
theParam.nDestRow = theCopyPos.Row();
}
else
{
- theParam.bInplace = TRUE;
+ theParam.bInplace = sal_True;
theParam.nDestTab = 0;
theParam.nDestCol = 0;
theParam.nDestRow = 0;
}
theParam.bHasHeader = aBtnHeader.IsChecked();
- theParam.bByRow = TRUE;
+ theParam.bByRow = sal_True;
theParam.bDuplicate = !aBtnUnique.IsChecked();
theParam.bCaseSens = aBtnCase.IsChecked();
theParam.bRegExp = aBtnRegExp.IsChecked();
@@ -631,7 +690,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
//----------------------------------------------------------------------------
-BOOL ScFilterDlg::IsRefInputMode() const
+sal_Bool ScFilterDlg::IsRefInputMode() const
{
return bRefInputMode;
}
@@ -645,24 +704,24 @@ IMPL_LINK( ScFilterDlg, EndDlgHdl, Button*, pBtn )
{
if ( pBtn == &aBtnOk )
{
- BOOL bAreaInputOk = TRUE;
+ sal_Bool bAreaInputOk = sal_True;
if ( aBtnCopyResult.IsChecked() )
{
if ( !pOptionsMgr->VerifyPosStr( aEdCopyArea.GetText() ) )
{
if ( !aBtnMore.GetState() )
- aBtnMore.SetState( TRUE );
+ aBtnMore.SetState( sal_True );
ERRORBOX( STR_INVALID_TABREF );
aEdCopyArea.GrabFocus();
- bAreaInputOk = FALSE;
+ bAreaInputOk = false;
}
}
if ( bAreaInputOk )
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( FID_FILTER_OK,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -688,9 +747,9 @@ IMPL_LINK( ScFilterDlg, MoreClickHdl, MoreButton*, EMPTYARG )
else
{
pTimer->Stop();
- bRefInputMode = FALSE;
+ bRefInputMode = false;
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
return 0;
}
@@ -720,7 +779,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
* Behandlung der Enable/Disable-Logik,
* abhaengig davon, welche ListBox angefasst wurde:
*/
- USHORT nOffset = GetSliderPos();
+ sal_uInt16 nOffset = GetSliderPos();
if ( pLb == &aLbConnect1 )
{
@@ -728,10 +787,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond1.Enable();
aEdVal1.Enable();
- USHORT nConnect1 = aLbConnect1.GetSelectEntryPos();
- USHORT nQE = nOffset;
+ sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos();
+ sal_uInt16 nQE = nOffset;
theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect1;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbConnect2 )
@@ -740,10 +799,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond2.Enable();
aEdVal2.Enable();
- USHORT nConnect2 = aLbConnect2.GetSelectEntryPos();
- USHORT nQE = 1+nOffset;
+ sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos();
+ sal_uInt16 nQE = 1+nOffset;
theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect2;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbConnect3 )
{
@@ -751,10 +810,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond3.Enable();
aEdVal3.Enable();
- USHORT nConnect3 = aLbConnect3.GetSelectEntryPos();
- USHORT nQE = 2+nOffset;
+ sal_uInt16 nConnect3 = aLbConnect3.GetSelectEntryPos();
+ sal_uInt16 nQE = 2+nOffset;
theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect3;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbConnect4 )
@@ -763,10 +822,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond4.Enable();
aEdVal4.Enable();
- USHORT nConnect4 = aLbConnect4.GetSelectEntryPos();
- USHORT nQE = 3+nOffset;
+ sal_uInt16 nConnect4 = aLbConnect4.GetSelectEntryPos();
+ sal_uInt16 nQE = 3+nOffset;
theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect4;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbField1 )
@@ -799,13 +858,13 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aEdVal2.Disable();
aEdVal3.Disable();
aEdVal4.Disable();
- for (USHORT i= nOffset; i< MAXQUERY; i++)
+ for (sal_uInt16 i= nOffset; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nOffset] =TRUE;
+ bRefreshExceptQuery[nOffset] =sal_True;
}
else
{
@@ -814,8 +873,8 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
{
aLbConnect2.Enable();
}
- theQueryData.GetEntry(nOffset).bDoQuery = TRUE;
- USHORT nField = pLb->GetSelectEntryPos();
+ theQueryData.GetEntry(nOffset).bDoQuery = sal_True;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
theQueryData.GetEntry(nOffset).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
}
@@ -842,14 +901,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aEdVal3.Disable();
aEdVal4.Disable();
- USHORT nTemp=nOffset+1;
- for (USHORT i= nTemp; i< MAXQUERY; i++)
+ sal_uInt16 nTemp=nOffset+1;
+ for (sal_uInt16 i= nTemp; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nTemp]=TRUE;
+ bRefreshExceptQuery[nTemp]=sal_True;
}
else
{
@@ -858,9 +917,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
{
aLbConnect3.Enable();
}
- USHORT nField = pLb->GetSelectEntryPos();
- USHORT nQ=1+nOffset;
- theQueryData.GetEntry(nQ).bDoQuery = TRUE;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
+ sal_uInt16 nQ=1+nOffset;
+ theQueryData.GetEntry(nQ).bDoQuery = sal_True;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
}
@@ -879,14 +938,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond4.Disable();
aEdVal4.Disable();
- USHORT nTemp=nOffset+2;
- for (USHORT i= nTemp; i< MAXQUERY; i++)
+ sal_uInt16 nTemp=nOffset+2;
+ for (sal_uInt16 i= nTemp; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nTemp]=TRUE;
+ bRefreshExceptQuery[nTemp]=sal_True;
}
else
{
@@ -896,9 +955,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbConnect4.Enable();
}
- USHORT nField = pLb->GetSelectEntryPos();
- USHORT nQ=2+nOffset;
- theQueryData.GetEntry(nQ).bDoQuery = TRUE;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
+ sal_uInt16 nQ=2+nOffset;
+ theQueryData.GetEntry(nQ).bDoQuery = sal_True;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
@@ -908,21 +967,21 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
if ( aLbField4.GetSelectEntryPos() == 0 )
{
ClearValueList( 4 );
- USHORT nTemp=nOffset+3;
- for (USHORT i= nTemp; i< MAXQUERY; i++)
+ sal_uInt16 nTemp=nOffset+3;
+ for (sal_uInt16 i= nTemp; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nTemp]=TRUE;
+ bRefreshExceptQuery[nTemp]=sal_True;
}
else
{
UpdateValueList( 4 );
- USHORT nField = pLb->GetSelectEntryPos();
- USHORT nQ=3+nOffset;
- theQueryData.GetEntry(nQ).bDoQuery = TRUE;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
+ sal_uInt16 nQ=3+nOffset;
+ theQueryData.GetEntry(nQ).bDoQuery = sal_True;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
@@ -933,17 +992,17 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
}
else if ( pLb == &aLbCond2)
{
- USHORT nQ=1+nOffset;
+ sal_uInt16 nQ=1+nOffset;
theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos();
}
else if ( pLb == &aLbCond3)
{
- USHORT nQ=2+nOffset;
+ sal_uInt16 nQ=2+nOffset;
theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos();
}
else
{
- USHORT nQ=3+nOffset;
+ sal_uInt16 nQ=3+nOffset;
theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos();
}
@@ -963,10 +1022,10 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox )
if ( pBox == &aBtnHeader ) // Feldlisten und Wertlisten
{
- USHORT nCurSel1 = aLbField1.GetSelectEntryPos();
- USHORT nCurSel2 = aLbField2.GetSelectEntryPos();
- USHORT nCurSel3 = aLbField3.GetSelectEntryPos();
- USHORT nCurSel4 = aLbField4.GetSelectEntryPos();
+ sal_uInt16 nCurSel1 = aLbField1.GetSelectEntryPos();
+ sal_uInt16 nCurSel2 = aLbField2.GetSelectEntryPos();
+ sal_uInt16 nCurSel3 = aLbField3.GetSelectEntryPos();
+ sal_uInt16 nCurSel4 = aLbField4.GetSelectEntryPos();
FillFieldLists();
aLbField1.SelectEntryPos( nCurSel1 );
aLbField2.SelectEntryPos( nCurSel2 );
@@ -981,7 +1040,7 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox )
if ( pBox == &aBtnCase ) // Wertlisten komplett
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
DELETEZ( pEntryLists[i] );
UpdateValueList( 1 ); // aktueller Text wird gemerkt
@@ -998,9 +1057,9 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox )
IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
{
- USHORT nOffset = GetSliderPos();
- USHORT i=0;
- USHORT nQE =i + nOffset;
+ sal_uInt16 nOffset = GetSliderPos();
+ sal_uInt16 i=0;
+ sal_uInt16 nQE =i + nOffset;
if ( pEd )
{
String aStrVal = pEd->GetText();
@@ -1037,7 +1096,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
pLbCond->Enable();
ScQueryEntry& rEntry = theQueryData.GetEntry( nQE );
- BOOL bDoThis = (pLbField->GetSelectEntryPos() != 0);
+ sal_Bool bDoThis = (pLbField->GetSelectEntryPos() != 0);
rEntry.bDoQuery = bDoThis;
if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] )
@@ -1046,22 +1105,22 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
{
rEntry.pStr->Erase();
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else if ( aStrVal == aStrNotEmpty )
{
rEntry.pStr->Erase();
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else
{
*rEntry.pStr = aStrVal;
rEntry.nVal = 0;
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
}
- USHORT nField = pLbField->GetSelectEntryPos();
+ sal_uInt16 nField = pLbField->GetSelectEntryPos();
rEntry.nField = nField ? (theQueryData.nCol1 +
static_cast<SCCOL>(nField) - 1) : static_cast<SCCOL>(0);
@@ -1083,31 +1142,31 @@ IMPL_LINK( ScFilterDlg, ScrollHdl, ScrollBar*, EMPTYARG )
void ScFilterDlg::SliderMoved()
{
- USHORT nOffset = GetSliderPos();
+ sal_uInt16 nOffset = GetSliderPos();
RefreshEditRow( nOffset);
}
-USHORT ScFilterDlg::GetSliderPos()
+sal_uInt16 ScFilterDlg::GetSliderPos()
{
- return (USHORT) aScrollBar.GetThumbPos();
+ return (sal_uInt16) aScrollBar.GetThumbPos();
}
-void ScFilterDlg::RefreshEditRow( USHORT nOffset )
+void ScFilterDlg::RefreshEditRow( sal_uInt16 nOffset )
{
if (nOffset==0)
aConnLbArr[0]->Hide();
else
aConnLbArr[0]->Show();
- for ( USHORT i=0; i<4; i++ )
+ for ( sal_uInt16 i=0; i<4; i++ )
{
String aValStr;
- USHORT nCondPos = 0;
- USHORT nFieldSelPos = 0;
- USHORT nQE = i+nOffset;
+ sal_uInt16 nCondPos = 0;
+ sal_uInt16 nFieldSelPos = 0;
+ sal_uInt16 nQE = i+nOffset;
ScQueryEntry& rEntry = theQueryData.GetEntry( nQE);
if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] )
{
- nCondPos = (USHORT)rEntry.eOp;
+ nCondPos = (sal_uInt16)rEntry.eOp;
if(rEntry.bDoQuery)
nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
@@ -1137,9 +1196,9 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset )
aConnLbArr[i+1]->Enable();
else
aConnLbArr[i+1]->Disable();
- USHORT nQENext = nQE+1;
+ sal_uInt16 nQENext = nQE+1;
if(theQueryData.GetEntry(nQENext).bDoQuery || bRefreshExceptQuery[nQENext])
- aConnLbArr[i+1]->SelectEntryPos( (USHORT) theQueryData.GetEntry(nQENext).eConnect );
+ aConnLbArr[i+1]->SelectEntryPos( (sal_uInt16) theQueryData.GetEntry(nQENext).eConnect );
else
aConnLbArr[i+1]->SetNoSelection();
}
@@ -1152,7 +1211,7 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset )
aConnLbArr[i]->Disable();
if(rEntry.bDoQuery || bRefreshExceptQuery[nQE])
- aConnLbArr[i]->SelectEntryPos( (USHORT) rEntry.eConnect );
+ aConnLbArr[i]->SelectEntryPos( (sal_uInt16) rEntry.eConnect );
else
aConnLbArr[i]->SetNoSelection();
}
@@ -1183,7 +1242,7 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset )
aFieldLbArr[i]->SelectEntryPos( nFieldSelPos );
aCondLbArr [i]->SelectEntryPos( nCondPos );
aValueEdArr[i]->SetText( aValStr );
- UpdateValueList( static_cast<USHORT>(i+1) );
+ UpdateValueList( static_cast<sal_uInt16>(i+1) );
}
}
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index d6b331494667..d6f9d28b98ea 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -99,8 +99,8 @@ ScFilterOptionsMgr::ScFilterOptionsMgr(
ScFilterOptionsMgr::~ScFilterOptionsMgr()
{
- USHORT nEntries = rLbCopyPos.GetEntryCount();
- USHORT i;
+ sal_uInt16 nEntries = rLbCopyPos.GetEntryCount();
+ sal_uInt16 i;
for ( i=2; i<nEntries; i++ )
delete (String*)rLbCopyPos.GetEntryData( i );
@@ -162,13 +162,13 @@ void ScFilterOptionsMgr::Init()
String aRefStr;
while ( aIter.Next( aName, aRange ) )
{
- USHORT nInsert = rLbCopyPos.InsertEntry( aName );
+ sal_uInt16 nInsert = rLbCopyPos.InsertEntry( aName );
aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv );
rLbCopyPos.SetEntryData( nInsert, new String( aRefStr ) );
}
- rBtnDestPers.Check( TRUE ); // beim Aufruf immer an
+ rBtnDestPers.Check( sal_True ); // beim Aufruf immer an
rLbCopyPos.SelectEntryPos( 0 );
rEdCopyPos.SetText( EMPTY_STRING );
@@ -215,7 +215,7 @@ void ScFilterOptionsMgr::Init()
rQueryData.nDestTab
).Format( aString, SCA_ABS_3D, pDoc, eConv );
- rBtnCopyResult.Check( TRUE );
+ rBtnCopyResult.Check( sal_True );
rEdCopyPos.SetText( aString );
EdPosModifyHdl( &rEdCopyPos );
rLbCopyPos.Enable();
@@ -225,7 +225,7 @@ void ScFilterOptionsMgr::Init()
}
else
{
- rBtnCopyResult.Check( FALSE );
+ rBtnCopyResult.Check( false );
rEdCopyPos.SetText( EMPTY_STRING );
rLbCopyPos.Disable();
rEdCopyPos.Disable();
@@ -240,7 +240,7 @@ void ScFilterOptionsMgr::Init()
//----------------------------------------------------------------------------
-BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const
+sal_Bool ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const
{
String aPosStr( rPosStr );
xub_StrLen nColonPos = aPosStr.Search( ':' );
@@ -248,7 +248,7 @@ BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const
if ( STRING_NOTFOUND != nColonPos )
aPosStr.Erase( nColonPos );
- USHORT nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() );
return ( SCA_VALID == (nResult & SCA_VALID) );
}
@@ -264,7 +264,7 @@ IMPL_LINK( ScFilterOptionsMgr, LbPosSelHdl, ListBox*, pLb )
if ( pLb == &rLbCopyPos )
{
String aString;
- USHORT nSelPos = rLbCopyPos.GetSelectEntryPos();
+ sal_uInt16 nSelPos = rLbCopyPos.GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *(String*)rLbCopyPos.GetEntryData( nSelPos );
@@ -283,14 +283,14 @@ IMPL_LINK( ScFilterOptionsMgr, EdPosModifyHdl, Edit*, pEd )
if ( pEd == &rEdCopyPos )
{
String theCurPosStr = pEd->GetText();
- USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = rLbCopyPos.GetEntryCount();
+ sal_Bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = rLbCopyPos.GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 641ce7dc6374..56946006ce02 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -45,19 +45,43 @@ static const sal_Char pStrFix[] = "FIX";
ScImportOptions::ScImportOptions( const String& rStr )
{
- bFixedWidth = FALSE;
+ // Use the same string format as ScAsciiOptions,
+ // because the import options string is passed here when a CSV file is loaded and saved again.
+ // The old format is still supported because it might be used in macros.
+
+ bFixedWidth = false;
nFieldSepCode = 0;
- if ( rStr.GetTokenCount(',') >= 3 )
+ nTextSepCode = 0;
+ eCharSet = RTL_TEXTENCODING_DONTKNOW;
+ bSaveAsShown = sal_True; // "true" if not in string (after CSV import)
+ bQuoteAllText = false;
+ xub_StrLen nTokenCount = rStr.GetTokenCount(',');
+ if ( nTokenCount >= 3 )
{
+ // first 3 tokens: common
String aToken( rStr.GetToken( 0, ',' ) );
if( aToken.EqualsIgnoreCaseAscii( pStrFix ) )
- bFixedWidth = TRUE;
+ bFixedWidth = sal_True;
else
nFieldSepCode = (sal_Unicode) aToken.ToInt32();
nTextSepCode = (sal_Unicode) rStr.GetToken(1,',').ToInt32();
aStrFont = rStr.GetToken(2,',');
eCharSet = ScGlobal::GetCharsetValue(aStrFont);
- bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? TRUE : FALSE);
+
+ if ( nTokenCount == 4 )
+ {
+ // compatibility with old options string: "Save as shown" as 4th token, numeric
+ bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? sal_True : false);
+ bQuoteAllText = sal_True; // use old default then
+ }
+ else
+ {
+ // look at the same positions as in ScAsciiOptions
+ if ( nTokenCount >= 7 )
+ bQuoteAllText = rStr.GetToken(6, ',').EqualsAscii("true");
+ if ( nTokenCount >= 9 )
+ bSaveAsShown = rStr.GetToken(8, ',').EqualsAscii("true");
+ }
}
}
@@ -75,8 +99,11 @@ String ScImportOptions::BuildString() const
aResult += String::CreateFromInt32(nTextSepCode);
aResult += ',';
aResult += aStrFont;
- aResult += ',';
- aResult += String::CreateFromInt32( bSaveAsShown ? 1 : 0 );
+ // use the same string format as ScAsciiOptions:
+ aResult.AppendAscii( ",1,,0," ); // first row, no column info, default language
+ aResult.AppendAscii(bQuoteAllText ? "true" : "false"); // same as "quoted field as text" in ScAsciiOptions
+ aResult.AppendAscii( ",true," ); // "detect special numbers"
+ aResult.AppendAscii(bSaveAsShown ? "true" : "false"); // "save as shown": not in ScAsciiOptions
return aResult;
}
diff --git a/sc/source/ui/dbgui/imoptdlg.src b/sc/source/ui/dbgui/imoptdlg.src
index b63d83210c00..8f6839533851 100644
--- a/sc/source/ui/dbgui/imoptdlg.src
+++ b/sc/source/ui/dbgui/imoptdlg.src
@@ -44,6 +44,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ComboBox ED_FIELDSEP
{
+ HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_FIELDSEP";
Pos = MAP_APPFONT ( 70 , 30 ) ;
Size = MAP_APPFONT ( 121 , 60 ) ;
DropDown = TRUE ;
@@ -56,6 +57,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ComboBox ED_TEXTSEP
{
+ HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_TEXTSEP";
Pos = MAP_APPFONT ( 70 , 46 ) ;
Size = MAP_APPFONT ( 121 , 60 ) ;
DropDown = TRUE ;
@@ -68,6 +70,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ListBox DDLB_FONT
{
+ HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:DDLB_FONT";
Border = TRUE;
Sort = TRUE;
DropDown = TRUE ;
@@ -76,6 +79,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ListBox LB_FONT
{
+ HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:LB_FONT";
Border = TRUE;
Sort = TRUE;
DropDown = FALSE ;
@@ -90,7 +94,8 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
CheckBox CB_FIXEDWIDTH
{
- Pos = MAP_APPFONT( 12, 80 );
+ HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH";
+ Pos = MAP_APPFONT( 12, 92 );
Size = MAP_APPFONT( 172, 10 );
Hide = TRUE;
Text [ en-US ] = "Fixed column ~width";
@@ -103,6 +108,14 @@ ModalDialog RID_SCDLG_IMPORTOPT
Hide = TRUE;
Text [ en-US ] = "Save cell content as ~shown";
};
+ CheckBox CB_QUOTEALL
+ {
+ HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL";
+ Pos = MAP_APPFONT( 20, 64 );
+ Size = MAP_APPFONT( 164, 10 );
+ Hide = TRUE;
+ Text [ en-US ] = "~Quote all text cells";
+ };
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 202 , 6 ) ;
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 55ce7b9499b7..5cdf37116f13 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -106,7 +106,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent,
nSrcTab ( nSourceTab ), // ist nicht im QueryParam
nFieldCount ( 0 )
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
pEntryLists[i] = NULL;
Init( rArgSet );
@@ -117,7 +117,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent,
ScPivotFilterDlg::~ScPivotFilterDlg()
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
delete pEntryLists[i];
if ( pOutItem )
@@ -223,12 +223,12 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
else if (rEntry.nVal == SC_NONEMPTYFIELDS)
aValStr = aStrNotEmpty;
}
- USHORT nCondPos = (USHORT)rEntry.eOp;
- USHORT nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
+ sal_uInt16 nCondPos = (sal_uInt16)rEntry.eOp;
+ sal_uInt16 nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
aFieldLbArr[i]->SelectEntryPos( nFieldSelPos );
aCondLbArr [i]->SelectEntryPos( nCondPos );
- UpdateValueList( static_cast<USHORT>(i+1) );
+ UpdateValueList( static_cast<sal_uInt16>(i+1) );
aValueEdArr[i]->SetText( aValStr );
if (aValStr == aStrEmpty || aValStr == aStrNotEmpty)
aCondLbArr[i]->Disable();
@@ -237,7 +237,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
{
aFieldLbArr[i]->SelectEntryPos( 0 ); // "keiner" selektieren
aCondLbArr [i]->SelectEntryPos( 0 ); // "=" selektieren
- UpdateValueList( static_cast<USHORT>(i) );
+ UpdateValueList( static_cast<sal_uInt16>(i) );
aValueEdArr[i]->SetText( EMPTY_STRING );
}
aValueEdArr[i]->SetModifyHdl( LINK( this, ScPivotFilterDlg, ValModifyHdl ) );
@@ -247,12 +247,12 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
(aLbField1.GetSelectEntryPos() != 0)
&& (aLbField2.GetSelectEntryPos() != 0)
- ? aLbConnect1.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect )
+ ? aLbConnect1.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect )
: aLbConnect1.SetNoSelection();
(aLbField2.GetSelectEntryPos() != 0)
&& (aLbField3.GetSelectEntryPos() != 0)
- ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect )
+ ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect )
: aLbConnect2.SetNoSelection();
if ( aLbField1.GetSelectEntryPos() == 0 )
@@ -303,7 +303,7 @@ void ScPivotFilterDlg::FillFieldLists()
SCROW nFirstRow = theQueryData.nRow1;
SCCOL nMaxCol = theQueryData.nCol2;
SCCOL col = 0;
- USHORT i=1;
+ sal_uInt16 i=1;
for ( col=nFirstCol; col<=nMaxCol; col++ )
{
@@ -325,13 +325,13 @@ void ScPivotFilterDlg::FillFieldLists()
//------------------------------------------------------------------------
-void ScPivotFilterDlg::UpdateValueList( USHORT nList )
+void ScPivotFilterDlg::UpdateValueList( sal_uInt16 nList )
{
if ( pDoc && nList>0 && nList<=3 )
{
ComboBox* pValList = aValueEdArr[nList-1];
- USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
- USHORT nListPos = 0;
+ sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
+ sal_uInt16 nListPos = 0;
String aCurValue = pValList->GetText();
pValList->Clear();
@@ -359,10 +359,10 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
}
TypedScStrCollection* pColl = pEntryLists[nColumn];
- USHORT nValueCount = pColl->GetCount();
+ sal_uInt16 nValueCount = pColl->GetCount();
if ( nValueCount > 0 )
{
- for ( USHORT i=0; i<nValueCount; i++ )
+ for ( sal_uInt16 i=0; i<nValueCount; i++ )
{
pValList->InsertEntry( (*pColl)[i]->GetString(), nListPos );
nListPos++;
@@ -375,7 +375,7 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
//------------------------------------------------------------------------
-void ScPivotFilterDlg::ClearValueList( USHORT nList )
+void ScPivotFilterDlg::ClearValueList( sal_uInt16 nList )
{
if ( nList>0 && nList<=3 )
{
@@ -389,10 +389,10 @@ void ScPivotFilterDlg::ClearValueList( USHORT nList )
//------------------------------------------------------------------------
-USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
+sal_uInt16 ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
{
if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 )
- return static_cast<USHORT>(nField - theQueryData.nCol1 + 1);
+ return static_cast<sal_uInt16>(nField - theQueryData.nCol1 + 1);
else
return 0;
}
@@ -402,15 +402,15 @@ USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
{
ScQueryParam theParam( theQueryData );
- USHORT nConnect1 = aLbConnect1.GetSelectEntryPos();
- USHORT nConnect2 = aLbConnect2.GetSelectEntryPos();
+ sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos();
+ sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos();
for ( SCSIZE i=0; i<3; i++ )
{
- USHORT nField = aFieldLbArr[i]->GetSelectEntryPos();
+ sal_uInt16 nField = aFieldLbArr[i]->GetSelectEntryPos();
ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos();
- BOOL bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0);
+ sal_Bool bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0);
theParam.GetEntry(i).bDoQuery = bDoThis;
if ( bDoThis )
@@ -428,19 +428,19 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
{
*rEntry.pStr = EMPTY_STRING;
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else if ( aStrVal == aStrNotEmpty )
{
*rEntry.pStr = EMPTY_STRING;
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else
{
*rEntry.pStr = aStrVal;
rEntry.nVal = 0;
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
}
rEntry.nField = nField ? (theQueryData.nCol1 +
@@ -456,7 +456,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
? (ScQueryConnect)nConnect2
: SC_AND;
- theParam.bInplace = FALSE;
+ theParam.bInplace = false;
theParam.nDestTab = 0; // Woher kommen diese Werte?
theParam.nDestCol = 0;
theParam.nDestRow = 0;
@@ -574,7 +574,7 @@ IMPL_LINK( ScPivotFilterDlg, CheckBoxHdl, CheckBox*, pBox )
if ( pBox == &aBtnCase ) // Wertlisten
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
DELETEZ( pEntryLists[i] );
String aCurVal1 = aEdVal1.GetText();
diff --git a/sc/source/ui/dbgui/pivot.hrc b/sc/source/ui/dbgui/pivot.hrc
index 883be5e7f4c8..244be15649ec 100644
--- a/sc/source/ui/dbgui/pivot.hrc
+++ b/sc/source/ui/dbgui/pivot.hrc
@@ -34,8 +34,12 @@
#define BTN_OPTIONS 6
#define FL_LAYOUT 10
+#define FL_SELECT 90
+#define SCROLL_COL 91
#define WND_COL 11
+#define SCROLL_ROW 92
#define WND_ROW 12
+#define SCROLL_DATA 93
#define WND_DATA 13
#define WND_SELECT 14
#define WND_PAGE 18
diff --git a/sc/source/ui/dbgui/pivot.src b/sc/source/ui/dbgui/pivot.src
index 514a37153ab0..423c7df6e547 100644
--- a/sc/source/ui/dbgui/pivot.src
+++ b/sc/source/ui/dbgui/pivot.src
@@ -36,7 +36,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
SVLook = TRUE ;
Moveable = TRUE ;
Closeable = FALSE ;
- Text [ en-US ] = "DataPilot" ;
+ Text [ en-US ] = "Pivot Table" ;
FixedText FT_PAGE
{
@@ -44,6 +44,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text[ en-US ] = "Page Fields" ;
};
+ ScrollBar SCROLL_PAGE
+ {
+ Pos = MAP_APPFONT ( 198 , 14 ) ;
+ Size = MAP_APPFONT ( 8 , 24 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_PAGE
{
/* Size is calculated in the dialog code. */
@@ -57,6 +64,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Column Fields" ;
};
+ ScrollBar SCROLL_COL
+ {
+ Pos = MAP_APPFONT ( 198 , 42 ) ;
+ Size = MAP_APPFONT ( 8 , 24 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_COL
{
/* Size is calculated in the dialog code. */
@@ -70,6 +84,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Row\nFields" ;
};
+ ScrollBar SCROLL_ROW
+ {
+ Pos = MAP_APPFONT ( 42 , 70 ) ;
+ Size = MAP_APPFONT ( 8 , 96 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_ROW
{
/* Size is calculated in the dialog code. */
@@ -83,6 +104,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Data Fields" ;
};
+ ScrollBar SCROLL_DATA
+ {
+ Pos = MAP_APPFONT ( 198 , 70 ) ;
+ Size = MAP_APPFONT ( 8 , 96 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_DATA
{
/* Size is calculated in the dialog code. */
@@ -114,6 +142,12 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 282 , 8 ) ;
Text [ en-US ] = "Layout";
};
+ FixedLine FL_SELECT
+ {
+ Pos = MAP_APPFONT ( 212 , 3 ) ;
+ Size = MAP_APPFONT ( 74 , 8 ) ;
+ Text [ en-US ] = "Fields";
+ };
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 294 , 6 ) ;
@@ -172,6 +206,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
};
Edit ED_INAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_INAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 73 , 227 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
@@ -196,6 +231,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
};
ListBox LB_OUTAREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOT_LAYOUT:LB_OUTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 73 , 245 ) ;
Size = MAP_APPFONT ( 75 , 90 ) ;
@@ -205,6 +241,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
};
Edit ED_OUTAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_OUTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 152 , 245 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index f0da7090a2a4..403ae802fc1e 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -70,7 +70,7 @@ namespace {
@return true = The passed string list contains an empty string entry.
*/
template< typename ListBoxType >
-bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, USHORT nEmptyPos = LISTBOX_APPEND )
+bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, sal_uInt16 nEmptyPos = LISTBOX_APPEND )
{
bool bEmpty = false;
const OUString* pStr = rStrings.getConstArray();
@@ -91,7 +91,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, U
}
template< typename ListBoxType >
-bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, USHORT nEmptyPos = LISTBOX_APPEND )
+bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND )
{
bool bEmpty = false;
vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end();
@@ -110,7 +110,7 @@ bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rM
}
/** This table represents the order of the strings in the resource string array. */
-static const USHORT spnFunctions[] =
+static const sal_uInt16 spnFunctions[] =
{
PIVOT_FUNC_SUM,
PIVOT_FUNC_COUNT,
@@ -125,12 +125,12 @@ static const USHORT spnFunctions[] =
PIVOT_FUNC_STD_VARP
};
-const USHORT SC_BASEITEM_PREV_POS = 0;
-const USHORT SC_BASEITEM_NEXT_POS = 1;
-const USHORT SC_BASEITEM_USER_POS = 2;
+const sal_uInt16 SC_BASEITEM_PREV_POS = 0;
+const sal_uInt16 SC_BASEITEM_NEXT_POS = 1;
+const sal_uInt16 SC_BASEITEM_USER_POS = 2;
-const USHORT SC_SORTNAME_POS = 0;
-const USHORT SC_SORTDATA_POS = 1;
+const sal_uInt16 SC_SORTNAME_POS = 0;
+const sal_uInt16 SC_SORTDATA_POS = 1;
const long SC_SHOW_DEFAULT = 10;
@@ -173,19 +173,19 @@ ScDPFunctionListBox::ScDPFunctionListBox( Window* pParent, const ResId& rResId )
FillFunctionNames();
}
-void ScDPFunctionListBox::SetSelection( USHORT nFuncMask )
+void ScDPFunctionListBox::SetSelection( sal_uInt16 nFuncMask )
{
if( (nFuncMask == PIVOT_FUNC_NONE) || (nFuncMask == PIVOT_FUNC_AUTO) )
SetNoSelection();
else
- for( USHORT nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry )
+ for( sal_uInt16 nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry )
SelectEntryPos( nEntry, (nFuncMask & spnFunctions[ nEntry ]) != 0 );
}
-USHORT ScDPFunctionListBox::GetSelection() const
+sal_uInt16 ScDPFunctionListBox::GetSelection() const
{
- USHORT nFuncMask = PIVOT_FUNC_NONE;
- for( USHORT nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel )
+ sal_uInt16 nFuncMask = PIVOT_FUNC_NONE;
+ for( sal_uInt16 nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel )
nFuncMask |= spnFunctions[ GetSelectEntryPos( nSel ) ];
return nFuncMask;
}
@@ -195,15 +195,15 @@ void ScDPFunctionListBox::FillFunctionNames()
DBG_ASSERT( !GetEntryCount(), "ScDPFunctionListBox::FillFunctionNames - do not add texts to resource" );
Clear();
ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) );
- for( USHORT nIndex = 0, nCount = sal::static_int_cast<USHORT>(aArr.Count()); nIndex < nCount; ++nIndex )
+ for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIndex < nCount; ++nIndex )
InsertEntry( aArr.GetString( nIndex ) );
}
// ============================================================================
ScDPFunctionDlg::ScDPFunctionDlg(
- Window* pParent, const ScDPLabelDataVec& rLabelVec,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) :
+ Window* pParent, const ScDPLabelDataVector& rLabelVec,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DPDATAFIELD ) ),
maFlFunc ( this, ScResId( FL_FUNC ) ),
maLbFunc ( this, ScResId( LB_FUNC ) ),
@@ -228,7 +228,7 @@ ScDPFunctionDlg::ScDPFunctionDlg(
Init( rLabelData, rFuncData );
}
-USHORT ScDPFunctionDlg::GetFuncMask() const
+sal_uInt16 ScDPFunctionDlg::GetFuncMask() const
{
return maLbFunc.GetSelection();
}
@@ -240,7 +240,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const
aRef.ReferenceType = maLbTypeWrp.GetControlValue();
aRef.ReferenceField = GetBaseFieldName(maLbBaseField.GetSelectEntry());
- USHORT nBaseItemPos = maLbBaseItem.GetSelectEntryPos();
+ sal_uInt16 nBaseItemPos = maLbBaseItem.GetSelectEntryPos();
switch( nBaseItemPos )
{
case SC_BASEITEM_PREV_POS:
@@ -260,10 +260,10 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const
return aRef;
}
-void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData )
+void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData )
{
// list box
- USHORT nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask;
+ sal_uInt16 nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask;
maLbFunc.SetSelection( nFuncMask );
// field name
@@ -325,8 +325,8 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData&
}
else
{
- USHORT nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS;
- USHORT nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos );
+ sal_uInt16 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS;
+ sal_uInt16 nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos );
if( nPos >= maLbBaseItem.GetEntryCount() )
nPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
maLbBaseItem.SelectEntryPos( nPos );
@@ -347,7 +347,7 @@ const OUString& ScDPFunctionDlg::GetBaseItemName(const OUString& rLayoutName) co
return itr == maBaseItemNameMap.end() ? rLayoutName : itr->second;
}
-sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, USHORT nStartPos ) const
+sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, sal_uInt16 nStartPos ) const
{
sal_uInt16 nPos = nStartPos;
bool bFound = false;
@@ -417,7 +417,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox )
}
// select base item
- USHORT nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
+ sal_uInt16 nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
maLbBaseItem.SelectEntryPos( nItemPos );
}
return 0;
@@ -432,7 +432,7 @@ IMPL_LINK( ScDPFunctionDlg, DblClickHdl, MultiListBox*, EMPTYARG )
// ============================================================================
ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields, bool bEnableLayout ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_PIVOTSUBT ) ),
maFlSubt ( this, ScResId( FL_FUNC ) ),
@@ -456,9 +456,9 @@ ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj,
Init( rLabelData, rFuncData );
}
-USHORT ScDPSubtotalDlg::GetFuncMask() const
+sal_uInt16 ScDPSubtotalDlg::GetFuncMask() const
{
- USHORT nFuncMask = PIVOT_FUNC_NONE;
+ sal_uInt16 nFuncMask = PIVOT_FUNC_NONE;
if( maRbAuto.IsChecked() )
nFuncMask = PIVOT_FUNC_AUTO;
@@ -479,7 +479,7 @@ void ScDPSubtotalDlg::FillLabelData( ScDPLabelData& rLabelData ) const
rLabelData.maShowInfo = maLabelData.maShowInfo;
}
-void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData )
+void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData )
{
// field name
maFtName.SetText(rLabelData.getDisplayName());
@@ -604,8 +604,8 @@ void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const
// *** HIDDEN ITEMS ***
rLabelData.maMembers = maLabelData.maMembers;
- ULONG nVisCount = maLbHide.GetEntryCount();
- for( USHORT nPos = 0; nPos < nVisCount; ++nPos )
+ sal_uLong nVisCount = maLbHide.GetEntryCount();
+ for( sal_uInt16 nPos = 0; nPos < nVisCount; ++nPos )
rLabelData.maMembers[nPos].mbVisible = !maLbHide.IsChecked(nPos);
// *** HIERARCHY ***
@@ -634,7 +634,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou
if( maLbSortBy.GetEntryCount() > SC_SORTDATA_POS )
maLbSortBy.SetSeparatorPos( SC_SORTDATA_POS - 1 );
- USHORT nSortPos = SC_SORTNAME_POS;
+ sal_uInt16 nSortPos = SC_SORTNAME_POS;
if( nSortMode == DataPilotFieldSortMode::DATA )
{
nSortPos = FindListBoxEntry( maLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS );
@@ -704,7 +704,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou
lclFillListBox( maLbHierarchy, maLabelData.maHiers );
sal_Int32 nHier = maLabelData.mnUsedHier;
if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0;
- maLbHierarchy.SelectEntryPos( static_cast< USHORT >( nHier ) );
+ maLbHierarchy.SelectEntryPos( static_cast< sal_uInt16 >( nHier ) );
maLbHierarchy.SetSelectHdl( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) );
}
else
@@ -720,7 +720,7 @@ void ScDPSubtotalOptDlg::InitHideListBox()
lclFillListBox( maLbHide, maLabelData.maMembers );
size_t n = maLabelData.maMembers.size();
for (size_t i = 0; i < n; ++i)
- maLbHide.CheckEntryPos(static_cast<USHORT>(i), !maLabelData.maMembers[i].mbVisible);
+ maLbHide.CheckEntryPos(static_cast<sal_uInt16>(i), !maLabelData.maMembers[i].mbVisible);
bool bEnable = maLbHide.GetEntryCount() > 0;
maFlHide.Enable( bEnable );
maLbHide.Enable( bEnable );
@@ -733,7 +733,7 @@ const OUString& ScDPSubtotalOptDlg::GetFieldName(const OUString& rLayoutName) co
}
sal_uInt16 ScDPSubtotalOptDlg::FindListBoxEntry(
- const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) const
+ const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) const
{
sal_uInt16 nPos = nStartPos;
bool bFound = false;
@@ -786,7 +786,7 @@ IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox )
// ============================================================================
-ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient ) :
+ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DPSHOWDETAIL ) ),
maFtDims ( this, ScResId( FT_DIMS ) ),
maLbDims ( this, ScResId( LB_DIMS ) ),
@@ -802,7 +802,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR
long nDimCount = rDPObj.GetDimCount();
for (long nDim=0; nDim<nDimCount; nDim++)
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
sal_Int32 nDimFlags = 0;
String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
@@ -843,7 +843,7 @@ String ScDPShowDetailDlg::GetDimensionName() const
return aSelectedName;
long nDim = itr->second;
- BOOL bIsDataLayout = false;
+ sal_Bool bIsDataLayout = false;
return mrDPObj.GetDimName(nDim, bIsDataLayout);
}
diff --git a/sc/source/ui/dbgui/pvfundlg.src b/sc/source/ui/dbgui/pvfundlg.src
index ed00f6a65fa5..d5203f2a89ac 100644
--- a/sc/source/ui/dbgui/pvfundlg.src
+++ b/sc/source/ui/dbgui/pvfundlg.src
@@ -64,6 +64,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
MultiListBox LB_FUNC
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_DPDATAFIELD:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 140 , 65 ) ;
@@ -96,6 +97,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
ListBox LB_TYPE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_TYPE";
Pos = MAP_APPFONT( 75, 110 );
Size = MAP_APPFONT( 77, 120 );
TabStop = TRUE;
@@ -122,6 +124,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
ListBox LB_BASEFIELD
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_BASEFIELD";
Pos = MAP_APPFONT( 75, 126 );
Size = MAP_APPFONT( 77, 120 );
TabStop = TRUE;
@@ -136,6 +139,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
ListBox LB_BASEITEM
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_BASEITEM";
Pos = MAP_APPFONT( 75, 142 );
Size = MAP_APPFONT( 77, 120 );
TabStop = TRUE;
@@ -168,6 +172,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_DPDATAFIELD:BTN_MORE";
Pos = MAP_APPFONT ( 164 , 79 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -191,6 +196,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
Hide = TRUE ;
RadioButton RB_NONE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_NONE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 140 , 10 ) ;
Text [ en-US ] = "~None" ;
@@ -198,6 +204,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
RadioButton RB_AUTO
{
+ HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_AUTO";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 140 , 10 ) ;
Text [ en-US ] = "~Automatic" ;
@@ -205,6 +212,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
RadioButton RB_USER
{
+ HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_USER";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 140 , 10 ) ;
Text [ en-US ] = "~User-defined" ;
@@ -212,6 +220,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
MultiListBox LB_FUNC
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_PIVOTSUBT:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 140 , 65 ) ;
@@ -227,6 +236,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
CheckBox CB_SHOWALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTSUBT:CB_SHOWALL";
Pos = MAP_APPFONT ( 6 , 127 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Text [ en-US ] = "Show it~ems without data";
@@ -264,6 +274,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
PushButton BTN_OPTIONS
{
+ HelpID = "sc:PushButton:RID_SCDLG_PIVOTSUBT:BTN_OPTIONS";
Pos = MAP_APPFONT ( 164 , 135 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -290,6 +301,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_SORT_BY
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SORT_BY";
Pos = MAP_APPFONT( 12, 26 );
Size = MAP_APPFONT( 96, 120 );
TabStop = TRUE;
@@ -298,6 +310,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
RadioButton RB_SORT_ASC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_ASC";
Pos = MAP_APPFONT( 114, 14 );
Size = MAP_APPFONT( 84, 10 );
TabStop = TRUE;
@@ -305,6 +318,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
RadioButton RB_SORT_DESC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_DESC";
Pos = MAP_APPFONT( 114, 28 );
Size = MAP_APPFONT( 84, 10 );
TabStop = TRUE;
@@ -312,6 +326,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
RadioButton RB_SORT_MAN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_MAN";
Pos = MAP_APPFONT( 114, 42 );
Size = MAP_APPFONT( 84, 10 );
TabStop = TRUE;
@@ -331,6 +346,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_LAYOUT
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_LAYOUT";
Pos = MAP_APPFONT( 84, 67 );
Size = MAP_APPFONT( 114, 120 );
TabStop = TRUE;
@@ -345,6 +361,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
CheckBox CB_LAYOUT_EMPTY
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DPSUBTOTAL_OPT:CB_LAYOUT_EMPTY";
Pos = MAP_APPFONT( 12, 85 );
Size = MAP_APPFONT( 186, 10 );
TabStop = TRUE;
@@ -358,6 +375,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
CheckBox CB_SHOW
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DPSUBTOTAL_OPT:CB_SHOW";
Pos = MAP_APPFONT( 12, 112 );
Size = MAP_APPFONT( 70, 10 );
TabStop = TRUE;
@@ -365,6 +383,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
NumericField NF_SHOW
{
+ HelpID = "sc:NumericField:RID_SCDLG_DPSUBTOTAL_OPT:NF_SHOW";
Pos = MAP_APPFONT( 84, 110 );
Size = MAP_APPFONT( 30, 12 );
TabStop = TRUE;
@@ -390,6 +409,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_SHOW_FROM
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SHOW_FROM";
Pos = MAP_APPFONT( 84, 126 );
Size = MAP_APPFONT( 114, 50 );
TabStop = TRUE;
@@ -409,6 +429,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_SHOW_USING
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SHOW_USING";
Pos = MAP_APPFONT( 84, 142 );
Size = MAP_APPFONT( 114, 120 );
TabStop = TRUE;
@@ -436,6 +457,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_HIERARCHY
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_HIERARCHY";
Pos = MAP_APPFONT( 84, 222 );
Size = MAP_APPFONT( 114, 120 );
TabStop = TRUE;
@@ -483,6 +505,7 @@ ModalDialog RID_SCDLG_DPSHOWDETAIL
};
ListBox LB_DIMS
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSHOWDETAIL:LB_DIMS";
Pos = MAP_APPFONT( 6, 30 );
Size = MAP_APPFONT( 132, 80 );
TabStop = TRUE;
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 71ba04990861..e805ecff55db 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -41,6 +41,11 @@
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortMode.hpp>
+#include <sfx2/dispatch.hxx>
+#include <vcl/mnemonic.hxx>
+#include <vcl/msgbox.hxx>
+
+#include "dbdocfun.hxx"
#include "uiitems.hxx"
#include "rangeutl.hxx"
#include "document.hxx"
@@ -75,15 +80,7 @@ namespace {
PointerStyle lclGetPointerForField( ScDPFieldType eType )
{
- switch( eType )
- {
- case TYPE_PAGE: return POINTER_PIVOT_FIELD;
- case TYPE_COL: return POINTER_PIVOT_COL;
- case TYPE_ROW: return POINTER_PIVOT_ROW;
- case TYPE_DATA: return POINTER_PIVOT_FIELD;
- case TYPE_SELECT: return POINTER_PIVOT_FIELD;
- }
- return POINTER_ARROW;
+ return MnemonicGenerator::EraseAllMnemonicChars( rFixedText.GetText() );
}
} // namespace
@@ -134,7 +131,7 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ),
aStrNewTable ( ScResId( SCSTR_NEWTABLE ) ),
- bIsDrag ( FALSE ),
+ bIsDrag ( false ),
pEditActive ( NULL ),
@@ -148,8 +145,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
GetViewData()->GetDocument() ),
bRefInputMode (false)
{
- xDlgDPObject->SetAlive( TRUE ); // needed to get structure information
- xDlgDPObject->FillOldParam( thePivotData, FALSE );
+ xDlgDPObject->SetAlive( true ); // needed to get structure information
+ xDlgDPObject->FillOldParam( thePivotData, false );
xDlgDPObject->FillLabelData( thePivotData );
Init(bNewOutput);
@@ -160,8 +157,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
ScDPLayoutDlg::~ScDPLayoutDlg()
{
- USHORT nEntries = aLbOutPos.GetEntryCount();
- USHORT i;
+ sal_uInt16 nEntries = aLbOutPos.GetEntryCount();
+ sal_uInt16 i;
for ( i=2; i<nEntries; i++ )
delete (String*)aLbOutPos.GetEntryData( i );
@@ -178,7 +175,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
aBtnOptions.SetClickHdl( LINK( this, ScDPLayoutDlg, ClickHdl ) );
aFuncNameArr.reserve( PIVOT_MAXFUNC );
- for ( USHORT i = 0; i < PIVOT_MAXFUNC; ++i )
+ for ( sal_uInt16 i = 0; i < PIVOT_MAXFUNC; ++i )
aFuncNameArr.push_back( String( ScResId( i + 1 ) ) );
aBtnMore.AddWindow( &aFlAreas );
@@ -218,12 +215,17 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
}
else
{
- /* Data is not reachable, so could be a remote database */
- aEdInPos.Disable();
- aRbInPos.Disable();
+ // data is not reachable, so could be a remote database
+ maEdInPos.Disable();
+ maRbInPos.Disable();
}
- InitFields();
+ // #i29203# align right border of page window with data window
+ long nPagePosX = maWndData.GetPosPixel().X() + maWndData.GetSizePixel().Width() - maWndPage.GetSizePixel().Width();
+ maWndPage.SetPosPixel( Point( nPagePosX, maWndPage.GetPosPixel().Y() ) );
+ maScrPage.SetPosPixel( Point( maScrData.GetPosPixel().X(), maScrPage.GetPosPixel().Y() ) );
+
+ InitFieldWindows();
aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
@@ -236,7 +238,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
aEdInPos.SetGetFocusHdl( aLink );
aEdOutPos.SetGetFocusHdl( aLink );
- if ( pViewData && pDoc )
+ if( mpViewData && mpDoc )
{
/*
* Aus den RangeNames des Dokumentes werden nun die
@@ -244,11 +246,11 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
* um sinnvolle Bereiche handelt
*/
- aLbOutPos.Clear();
- aLbOutPos.InsertEntry( aStrUndefined, 0 );
- aLbOutPos.InsertEntry( aStrNewTable, 1 );
+ maLbOutPos.Clear();
+ maLbOutPos.InsertEntry( String( ScResId( SCSTR_UNDEFINED ) ), 0 );
+ maLbOutPos.InsertEntry( String( ScResId( SCSTR_NEWTABLE ) ), 1 );
- ScAreaNameIterator aIter( pDoc );
+ ScAreaNameIterator aIter( mpDoc );
String aName;
ScRange aRange;
String aRefStr;
@@ -256,10 +258,10 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
{
if ( !aIter.WasDBName() ) // hier keine DB-Bereiche !
{
- USHORT nInsert = aLbOutPos.InsertEntry( aName );
+ sal_uInt16 nInsert = maLbOutPos.InsertEntry( aName );
- aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, pDoc->GetAddressConvention() );
- aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
+ aRange.aStart.Format( aRefStr, SCA_ABS_3D, mpDoc, mpDoc->GetAddressConvention() );
+ maLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
}
}
}
@@ -318,14 +320,12 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
//----------------------------------------------------------------------------
-BOOL ScDPLayoutDlg::Close()
+sal_Bool ScDPLayoutDlg::Close()
{
return DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::StateChanged( StateChangedType nStateChange )
+ScPivotLayoutDlg::~ScPivotLayoutDlg()
{
ScAnyRefDlg::StateChanged( nStateChange );
@@ -344,9 +344,7 @@ void ScDPLayoutDlg::StateChanged( StateChangedType nStateChange )
}
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::InitWndSelect( const vector<ScDPLabelDataRef>& rLabels )
+ScDPLabelData* ScPivotLayoutDlg::GetLabelData( SCCOL nCol, size_t* pnIndex )
{
size_t nLabelCount = rLabels.size();
if (nLabelCount > MAX_LABELS)
@@ -379,7 +377,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
for (; itr != itrEnd; ++itr)
{
SCCOL nCol = itr->nCol;
- USHORT nMask = itr->nFuncMask;
+ sal_uInt16 nMask = itr->nFuncMask;
if (nCol == PIVOT_DATA_FIELD)
continue;
@@ -397,7 +395,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
OUString aStr = pData->maLayoutName;
if (!aStr.getLength())
{
- USHORT nInitMask = pInitArr->back()->mnFuncMask;
+ sal_uInt16 nInitMask = pInitArr->back()->mnFuncMask;
aStr = GetFuncString(nInitMask, pData->mbIsValue);
aStr += pData->maName;
}
@@ -414,18 +412,16 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
//----------------------------------------------------------------------------
-void ScDPLayoutDlg::InitFocus()
+void ScPivotLayoutDlg::NotifyStartTracking( ScPivotFieldWindow& rSourceWindow )
{
- if( aWndSelect.IsEmpty() )
- {
- aBtnOk.GrabFocus();
- NotifyFieldFocus( TYPE_SELECT, FALSE );
- }
- else
- aWndSelect.GrabFocus();
+ mpTrackingWindow = &rSourceWindow;
+ mpDropWindow = 0;
+ rSourceWindow.NotifyStartTracking();
+ StartTracking( STARTTRACK_BUTTONREPEAT );
+ SetPointer( Pointer( rSourceWindow.GetDropPointerStyle() ) );
}
-void ScDPLayoutDlg::InitFields()
+void ScPivotLayoutDlg::NotifyDoubleClick( ScPivotFieldWindow& rSourceWindow )
{
InitWndSelect(thePivotData.maLabelArray);
InitFieldWindow(thePivotData.maPageFields, TYPE_PAGE);
@@ -434,7 +430,10 @@ void ScDPLayoutDlg::InitFields()
InitFieldWindow(thePivotData.maDataFields, TYPE_DATA);
}
-//----------------------------------------------------------------------------
+ ScDPLabelData* pLabelData = GetLabelData( pFuncData->mnCol );
+ DBG_ASSERT( pLabelData, "ScPivotLayoutDlg::NotifyDoubleClick - missing label data" );
+ if( !pLabelData )
+ return;
void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Point& rAtPos )
{
@@ -455,42 +454,19 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
if ( bAllowed && (!Contains( toArr, fData.mnCol, nAt )) )
{
- // ggF. in anderem Fenster entfernen
- if ( rmArr1 )
- {
- if ( Contains( rmArr1, fData.mnCol, nAt ) )
- {
- rmWnd1->DelField( nAt );
- Remove( rmArr1, nAt );
- }
- }
- if ( rmArr2 )
- {
- if ( Contains( rmArr2, fData.mnCol, nAt ) )
- {
- rmWnd2->DelField( nAt );
- Remove( rmArr2, nAt );
- }
- }
-
- ScDPLabelData& rData = aLabelDataArr[nFromIndex+nOffset];
- size_t nAddedAt = 0;
-
- if ( !bDataArr )
- {
- if ( toWnd->AddField( rData.getDisplayName(),
- DlgPos2WndPos( rAtPos, *toWnd ),
- nAddedAt ) )
- {
- Insert( toArr, fData, nAddedAt );
- toWnd->GrabFocus();
- }
- }
- else
+ // list of plain names of all data fields
+ ScDPNameVec aDataFieldNames;
+ maWndData.WriteFieldNames( aDataFieldNames );
+ // allow to modify layout options for row fields, if multiple data fields exist, or if it is not the last row field
+ bool bLayout = (rSourceWindow.GetType() == PIVOTFIELDTYPE_ROW) && ((aDataFieldNames.size() > 1) || (rSourceWindow.GetSelectedIndex() + 1 < rSourceWindow.GetFieldCount()));
+
+ ::std::auto_ptr< AbstractScDPSubtotalDlg > xDlg( pFactory->CreateScDPSubtotalDlg(
+ this, RID_SCDLG_PIVOTSUBT, *mxDlgDPObject, *pLabelData, *pFuncData, aDataFieldNames, bLayout ) );
+ if( xDlg->Execute() == RET_OK )
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -506,7 +482,6 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
toWnd->GrabFocus();
}
}
-
}
}
@@ -562,7 +537,7 @@ void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType)
{
ScDPLabelData* p = GetLabelData(aFuncData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = aFuncData.mnFuncMask;
+ sal_uInt16 nMask = aFuncData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -649,7 +624,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -669,13 +644,17 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
}
}
}
- else // -> eFromType == eToType
+ if( mpDropWindow )
+ mpDropWindow->NotifyTracking( rDialogPos - pTargetWindow->GetPosPixel() );
+
+ // end tracking: move or remove field
+ if( rTEvt.IsTrackingEnded() )
{
ScDPFieldControlBase* theWnd = GetFieldWindow(eFromType);
ScDPFuncDataVec* theArr = GetFieldDataArray(eFromType);
size_t nAt = 0;
Point aToPos;
- BOOL bDataArr = eFromType == TYPE_DATA;
+ sal_Bool bDataArr = eFromType == TYPE_DATA;
ScDPFuncData fData( *((*theArr)[nFromIndex]) );
@@ -705,7 +684,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -790,7 +769,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -814,7 +793,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
ScDPFuncDataVec* theArr = GetFieldDataArray(eFromType);
size_t nAt = 0;
Point aToPos;
- BOOL bDataArr = eFromType == TYPE_DATA;
+ sal_Bool bDataArr = eFromType == TYPE_DATA;
ScDPFuncData fData( *((*theArr)[nFromIndex]) );
@@ -841,7 +820,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -856,12 +835,15 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
}
}
}
+ eTargetPointer = POINTER_ARROW;
+ if( mpTrackingWindow != mpDropWindow )
+ mpTrackingWindow->NotifyEndTracking( ENDTRACKING_CANCEL );
+ mpTrackingWindow = mpDropWindow = 0;
}
+ SetPointer( eTargetPointer );
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
+void ScPivotLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
{
ScDPFuncDataVec* pArr = GetFieldDataArray(eFromType);
@@ -877,13 +859,11 @@ void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
}
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt )
+sal_Bool ScPivotLayoutDlg::IsRefInputMode() const
{
if ( bIsDrag )
{
- bIsDrag = FALSE;
+ bIsDrag = false;
ScDPFieldType eDnDToType = TYPE_SELECT;
Point aPos = ScreenToOutputPixel( rAt );
@@ -927,59 +907,29 @@ void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt )
PointerStyle ScDPLayoutDlg::NotifyMouseMove( const Point& rAt )
{
- PointerStyle ePtr = POINTER_ARROW;
-
- if ( bIsDrag )
+ if( mbRefInputMode )
{
- Point aPos = ScreenToOutputPixel( rAt );
- ScDPFieldType eCheckTarget = TYPE_SELECT;
+ if( mpActiveEdit )
+ mpActiveEdit->GrabFocus();
- if ( aRectPage.IsInside( aPos ) )
- eCheckTarget = TYPE_PAGE;
- else if ( aRectCol.IsInside( aPos ) )
- eCheckTarget = TYPE_COL;
- else if ( aRectRow.IsInside( aPos ) )
- eCheckTarget = TYPE_ROW;
- else if ( aRectData.IsInside( aPos ) )
- eCheckTarget = TYPE_DATA;
- else if ( eDnDFromType != TYPE_SELECT )
- ePtr = POINTER_PIVOT_DELETE;
- else if ( aRectSelect.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_SELECT );
- else
- ePtr = POINTER_NOTALLOWED;
-
- if ( eCheckTarget != TYPE_SELECT )
- {
- // check if the target orientation is allowed for this field
- ScDPFuncDataVec* fromArr = NULL;
- switch ( eDnDFromType )
- {
- case TYPE_PAGE: fromArr = &aPageArr; break;
- case TYPE_COL: fromArr = &aColArr; break;
- case TYPE_ROW: fromArr = &aRowArr; break;
- case TYPE_DATA: fromArr = &aDataArr; break;
- case TYPE_SELECT: fromArr = &aSelectArr; break;
- }
- ScDPFuncData fData( *((*fromArr)[nDnDFromIndex]) );
- if (IsOrientationAllowed( fData.mnCol, eCheckTarget ))
- ePtr = lclGetPointerForField( eCheckTarget );
- else
- ePtr = POINTER_NOTALLOWED;
- }
+ if( mpActiveEdit == &maEdInPos )
+ EdInModifyHdl( 0 );
+ else if( mpActiveEdit == &maEdOutPos )
+ EdOutModifyHdl( 0 );
+ }
+ else
+ {
+ GrabFocus();
}
- return ePtr;
+ RefInputDone();
}
//----------------------------------------------------------------------------
PointerStyle ScDPLayoutDlg::NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex )
{
- bIsDrag = TRUE;
- eDnDFromType = eType;
- nDnDFromIndex = nFieldIndex;
- return lclGetPointerForField( eType );
+ return DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
}
//----------------------------------------------------------------------------
@@ -988,9 +938,14 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
{
ScDPFuncDataVec* pArr = GetFieldDataArray(eType);
- if ( pArr )
+bool ScPivotLayoutDlg::IsInsertAllowed( const ScPivotFieldWindow& rSourceWindow, const ScPivotFieldWindow& rTargetWindow )
+{
+ if( rTargetWindow.GetType() != PIVOTFIELDTYPE_SELECT )
{
- if ( nFieldIndex >= pArr->size() )
+ const ScPivotFuncData* pSourceData = rSourceWindow.GetSelectedFuncData();
+ ScDPLabelData* pLabelData = pSourceData ? GetLabelData( pSourceData->mnCol ) : 0;
+ DBG_ASSERT( pLabelData, "ScPivotLayoutDlg::IsInsertAllowed - label data not found" );
+ if( pLabelData )
{
OSL_FAIL("invalid selection");
return;
@@ -1024,7 +979,7 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
if (!aLayoutName.getLength())
{
// No layout name exists. Use the stock name.
- USHORT nMask = (*aIt)->mnFuncMask;
+ sal_uInt16 nMask = (*aIt)->mnFuncMask;
OUString aFuncStr = GetFuncString(nMask);
aLayoutName = aFuncStr + pDFData->maName;
}
@@ -1077,25 +1032,25 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
// added to avoid warnings
}
}
+ return ScDPObject::IsOrientationAllowed( static_cast< sal_uInt16 >( eOrient ), pLabelData->mnFlags );
}
}
+ return false;
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, BOOL bGotFocus )
+void ScPivotLayoutDlg::InitFieldWindows()
{
/* Enable Remove/Options buttons on GetFocus in field window.
Enable them also, if dialog is deactivated (click into document).
The !IsActive() condition handles the case that a LoseFocus event of a
field window would follow the Deactivate event of this dialog. */
- BOOL bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT);
+ sal_Bool bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT);
// The TestTool may set the focus into an empty field.
// Then the Remove/Options buttons must be disabled.
ScDPFieldControlBase* pWnd = GetFieldWindow(eType);
if ( bEnable && bGotFocus && pWnd && pWnd->IsEmpty() )
- bEnable = FALSE;
+ bEnable = false;
aBtnRemove.Enable( bEnable );
aBtnOptions.Enable( bEnable );
@@ -1114,22 +1069,14 @@ void ScDPLayoutDlg::NotifyMoveFieldToEnd( ScDPFieldType eToType )
MoveFieldToEnd(eLastActiveType, pWnd->GetSelectedField(), eToType);
if( pWnd->IsEmpty() )
- NotifyFieldFocus( eToType, TRUE );
+ NotifyFieldFocus( eToType, true );
else
pWnd->GrabFocus();
if( eLastActiveType == TYPE_SELECT )
aWndSelect.SelectNext();
}
else
- InitFocus();
-}
-
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::NotifyRemoveField( ScDPFieldType eType, size_t nFieldIndex )
-{
- if( eType != TYPE_SELECT )
- RemoveField( eType, nFieldIndex );
+ rFieldWindow.GrabFocus();
}
void ScDPLayoutDlg::Deactivate()
@@ -1138,15 +1085,15 @@ void ScDPLayoutDlg::Deactivate()
event from field window disables Remove/Options buttons. Re-enable them here by
simulating a GetFocus event. Event order of LoseFocus and Deactivate is not important.
The last event will enable the buttons in both cases (see NotifyFieldFocus). */
- NotifyFieldFocus( eLastActiveType, TRUE );
+ NotifyFieldFocus( eLastActiveType, true );
}
//----------------------------------------------------------------------------
-BOOL ScDPLayoutDlg::Contains( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt )
+bool ScPivotLayoutDlg::MoveField( ScPivotFieldWindow& rSourceWindow, ScPivotFieldWindow& rTargetWindow, size_t nInsertIndex, bool bMoveExisting )
{
if (!pArr || pArr->empty())
- return FALSE;
+ return false;
ScDPFuncDataVec::const_iterator itr, itrBeg = pArr->begin(), itrEnd = pArr->end();
for (itr = itrBeg; itr != itrEnd; ++itr)
@@ -1187,72 +1134,40 @@ void ScDPLayoutDlg::Insert( ScDPFuncDataVec* pArr, const ScDPFuncData& rFData, s
//----------------------------------------------------------------------------
-ScDPLabelData* ScDPLayoutDlg::GetLabelData( SCsCOL nCol, size_t* pnPos )
-{
- ScDPLabelData* pData = 0;
- for( ScDPLabelDataVec::iterator aIt = aLabelDataArr.begin(), aEnd = aLabelDataArr.end(); !pData && (aIt != aEnd); ++aIt )
- {
- if( aIt->mnCol == nCol )
- {
- pData = &*aIt;
- if( pnPos ) *pnPos = aIt - aLabelDataArr.begin();
- }
+ return true;
}
return pData;
}
//----------------------------------------------------------------------------
-String ScDPLayoutDlg::GetLabelString( SCsCOL nCol )
-{
- ScDPLabelData* pData = GetLabelData( nCol );
- DBG_ASSERT( pData, "LabelData not found" );
- if (pData)
- return pData->getDisplayName();
- return String();
-}
-
-//----------------------------------------------------------------------------
-
-bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType )
-{
- bool bAllowed = true;
- ScDPLabelData* pData = GetLabelData( nCol );
- DBG_ASSERT( pData, "LabelData not found" );
- if (pData)
- {
- sheet::DataPilotFieldOrientation eOrient = sheet::DataPilotFieldOrientation_HIDDEN;
- switch (eType)
- {
- case TYPE_PAGE: eOrient = sheet::DataPilotFieldOrientation_PAGE; break;
- case TYPE_COL: eOrient = sheet::DataPilotFieldOrientation_COLUMN; break;
- case TYPE_ROW: eOrient = sheet::DataPilotFieldOrientation_ROW; break;
- case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break;
- case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break;
- }
- bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags );
- }
- return bAllowed;
+ return false;
}
-//----------------------------------------------------------------------------
+// handlers -------------------------------------------------------------------
-String ScDPLayoutDlg::GetFuncString( USHORT& rFuncMask, BOOL bIsValue )
+IMPL_LINK( ScPivotLayoutDlg, ClickHdl, PushButton *, pBtn )
{
- String aStr;
-
- if ( rFuncMask == PIVOT_FUNC_NONE
- || rFuncMask == PIVOT_FUNC_AUTO )
+ if( mpFocusWindow )
{
- if ( bIsValue )
+ /* Raising sub dialogs (from the NotifyDoubleClick function) triggers
+ VCL child window focus events from this sub dialog which may
+ invalidate the member mpFocusWindow pointing to the target field
+ window. This would cause a crash with the following call to the
+ GrabFieldFocus function, if mpFocusWindow is used directly. */
+ ScPivotFieldWindow& rTargetWindow = *mpFocusWindow;
+
+ if( pBtn == &maBtnRemove )
{
- aStr = FSTR(PIVOTSTR_SUM);
- rFuncMask = PIVOT_FUNC_SUM;
+ rTargetWindow.RemoveSelectedField();
+ // focus back to field window
+ GrabFieldFocus( rTargetWindow );
}
- else
+ else if( pBtn == &maBtnOptions )
{
- aStr = FSTR(PIVOTSTR_COUNT);
- rFuncMask = PIVOT_FUNC_COUNT;
+ NotifyDoubleClick( rTargetWindow );
+ // focus back to field window
+ GrabFieldFocus( rTargetWindow );
}
}
else if ( rFuncMask == PIVOT_FUNC_SUM ) aStr = FSTR(PIVOTSTR_SUM);
@@ -1382,10 +1297,10 @@ bool ScDPLayoutDlg::GetPivotArrays(
return true;
}
-void ScDPLayoutDlg::UpdateSrcRange()
+IMPL_LINK( ScPivotLayoutDlg, OkHdl, OKButton *, EMPTYARG )
{
String aSrcStr = aEdInPos.GetText();
- USHORT nResult = ScRange().Parse(aSrcStr, pDoc, pDoc->GetAddressConvention());
+ sal_uInt16 nResult = ScRange().Parse(aSrcStr, pDoc, pDoc->GetAddressConvention());
DataSrcType eSrcType = SRC_INVALID;
ScRange aNewRange;
@@ -1450,7 +1365,7 @@ void ScDPLayoutDlg::UpdateSrcRange()
}
xDlgDPObject->SetSheetDesc(inSheet);
- xDlgDPObject->FillOldParam( thePivotData, FALSE );
+ xDlgDPObject->FillOldParam( thePivotData, false );
xDlgDPObject->FillLabelData(thePivotData);
aLabelDataArr.clear();
@@ -1568,27 +1483,17 @@ void ScDPLayoutDlg::GetOtherDataArrays(
//----------------------------------------------------------------------------
-void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
-{
- if ( !bRefInputMode || !pEditActive )
- return;
+ ScDPSaveData* pOldSaveData = mxDlgDPObject->GetSaveData();
- if ( rRef.aStart != rRef.aEnd )
- RefInputStart( pEditActive );
+ ScRange aOutRange( aAdrDest ); // bToNewTable is passed separately
- if ( pEditActive == &aEdInPos )
- {
- String aRefStr;
- rRef.Format( aRefStr, SCR_ABS_3D, pDocP, pDocP->GetAddressConvention() );
- pEditActive->SetRefString( aRefStr );
- }
- else if ( pEditActive == &aEdOutPos )
- {
- String aRefStr;
- rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
- pEditActive->SetRefString( aRefStr );
- }
-}
+ ScDPSaveData aSaveData;
+ aSaveData.SetIgnoreEmptyRows( maBtnIgnEmptyRows.IsChecked() );
+ aSaveData.SetRepeatIfEmpty( maBtnDetectCat.IsChecked() );
+ aSaveData.SetColumnGrand( maBtnTotalCol.IsChecked() );
+ aSaveData.SetRowGrand( maBtnTotalRow.IsChecked() );
+ aSaveData.SetFilterButton( maBtnFilter.IsChecked() );
+ aSaveData.SetDrillDown( maBtnDrillDown.IsChecked() );
//----------------------------------------------------------------------------
@@ -1641,8 +1546,8 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG )
{
String aOutPosStr( aEdOutPos.GetText() );
ScAddress aAdrDest;
- BOOL bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1);
- USHORT nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0;
+ sal_Bool bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1);
+ sal_uInt16 nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0;
if (!bToNewTable && (aOutPosStr.Len() == 0 || (nResult & SCA_VALID) != SCA_VALID))
{
@@ -1720,6 +1625,7 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG )
pDim->SetSubtotalName(*pSubtotalName);
}
}
+ }
bool bManualSort = ( aIt->maSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL );
@@ -1762,12 +1668,12 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG )
}
}
- USHORT nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE );
+ sal_uInt16 nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE );
ScPivotItem aOutItem( nWhichPivot, &aSaveData, &aOutRange, bToNewTable );
- bRefInputMode = FALSE; // to allow deselecting when switching sheets
+ bRefInputMode = false; // to allow deselecting when switching sheets
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
@@ -1811,29 +1717,25 @@ IMPL_LINK( ScDPLayoutDlg, CancelHdl, CancelButton *, EMPTYARG )
IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG )
{
- if ( aBtnMore.GetState() )
+ if ( maBtnMore.GetState() )
{
- bRefInputMode = TRUE;
- //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Enable();
- if ( aEdInPos.IsEnabled() )
+ mbRefInputMode = true;
+ if ( maEdInPos.IsEnabled() )
{
- aEdInPos.Enable();
- aEdInPos.GrabFocus();
- aEdInPos.Enable();
+ maEdInPos.Enable();
+ maEdInPos.GrabFocus();
+ maEdInPos.Enable();
}
else
{
- aEdOutPos.Enable();
- aEdOutPos.GrabFocus();
- aEdOutPos.Enable();
+ maEdOutPos.Enable();
+ maEdOutPos.GrabFocus();
+ maEdOutPos.Enable();
}
}
else
{
- bRefInputMode = FALSE;
- //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ mbRefInputMode = false;
}
return 0;
}
@@ -1842,59 +1744,73 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG )
IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, Edit *, EMPTYARG )
{
- String theCurPosStr = aEdOutPos.GetText();
- USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ String theCurPosStr = maEdOutPos.GetText();
+ sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, mpDoc, mpDoc->GetAddressConvention() );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
- String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = aLbOutPos.GetEntryCount();
+ String* pStr = 0;
+ bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = maLbOutPos.GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
- pStr = (String*)aLbOutPos.GetEntryData( i );
+ pStr = (String*)maLbOutPos.GetEntryData( i );
bFound = (theCurPosStr == *pStr);
}
if ( bFound )
- aLbOutPos.SelectEntryPos( --i );
+ maLbOutPos.SelectEntryPos( --i );
else
- aLbOutPos.SelectEntryPos( 0 );
+ maLbOutPos.SelectEntryPos( 0 );
}
return 0;
}
IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG )
{
- UpdateSrcRange();
- return 0;
-}
+ String theCurPosStr = maEdInPos.GetText();
+ sal_uInt16 nResult = ScRange().Parse( theCurPosStr, mpDoc, mpDoc->GetAddressConvention() );
//----------------------------------------------------------------------------
-IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
-{
- String aString;
- USHORT nSelPos = aLbOutPos.GetSelectEntryPos();
+ // new range is identical to the current range
+ if( inSheet.aSourceRange == aNewRange )
+ return 0;
- if ( nSelPos > 1 )
- {
- aString = *(String*)aLbOutPos.GetEntryData( nSelPos );
- }
- else if ( nSelPos == aLbOutPos.GetEntryCount()-1 ) // auf neue Tabelle?
+ ScTabViewShell* pTabViewShell = mpViewData->GetViewShell();
+ inSheet.aSourceRange = aNewRange;
+ mxDlgDPObject->SetSheetDesc( inSheet );
+ mxDlgDPObject->FillOldParam( maPivotData );
+ mxDlgDPObject->FillLabelData( maPivotData );
+
+ // SetDialogDPObject does not take ownership but makes a copy internally
+ pTabViewShell->SetDialogDPObject( mxDlgDPObject.get() );
+
+ // re-initialize the field windows from the new data
+ InitFieldWindows();
+
+ return 0;
+}
+
+IMPL_LINK( ScPivotLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
+{
+ String aString;
+ sal_uInt16 nSelPos = maLbOutPos.GetSelectEntryPos();
+ if( nSelPos > 1 )
{
- aEdOutPos.Disable();
- aRbOutPos.Disable();
+ aString = *(String*)maLbOutPos.GetEntryData( nSelPos );
}
else
{
- aEdOutPos.Enable();
- aRbOutPos.Enable();
+ // do not allow to specify output position, if target is "new sheet"
+ bool bNewSheet = nSelPos == 1;
+ maEdOutPos.Enable( !bNewSheet );
+ maRbOutPos.Enable( !bNewSheet );
}
- aEdOutPos.SetText( aString );
+ maEdOutPos.SetText( aString );
return 0;
}
@@ -1906,6 +1822,8 @@ IMPL_LINK( ScDPLayoutDlg, GetFocusHdl, Control*, pCtrl )
else if ( pCtrl == &aEdOutPos )
pEditActive = &aEdOutPos;
+ mpActiveEdit = dynamic_cast< ::formula::RefEdit* >( pEvent->GetWindow() );
+ }
return 0;
}
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 4f0207fd948d..466642b8e087 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -52,7 +52,7 @@
//========================================================================
-ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit, BOOL bSheetProtected)
+ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit, sal_Bool bSheetProtected)
: ModalDialog ( pParent, ScResId( RID_SCDLG_NEWSCENARIO ) ),
aFlName ( this, ScResId( FL_NAME )),
@@ -86,14 +86,14 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b
XColorTable* pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
if (pColorTable)
{
- aLbColor.SetUpdateMode( FALSE );
+ aLbColor.SetUpdateMode( false );
long nCount = pColorTable->Count();
for ( long n=0; n<nCount; n++ )
{
XColorEntry* pEntry = pColorTable->GetColor(n);
aLbColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
- aLbColor.SetUpdateMode( TRUE );
+ aLbColor.SetUpdateMode( sal_True );
}
}
}
@@ -118,31 +118,36 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b
aBtnOk .SetClickHdl( LINK( this, ScNewScenarioDlg, OkHdl ) );
aCbShowFrame.SetClickHdl( LINK( this, ScNewScenarioDlg, EnableHdl ) );
+ aLbColor.SetAccessibleName(String(ScResId( STR_COLOR ) ));
+
FreeResource();
aLbColor.SelectEntry( Color( COL_LIGHTGRAY ) );
- aCbShowFrame.Check(TRUE);
- //aCbPrintFrame.Check(TRUE);
- aCbTwoWay.Check(TRUE);
- //aCbAttrib.Check(FALSE);
- //aCbValue.Check(FALSE);
- aCbCopyAll.Check(FALSE);
- aCbProtect.Check(TRUE);
+ aCbShowFrame.Check(sal_True);
+ //aCbPrintFrame.Check(sal_True);
+ aCbTwoWay.Check(sal_True);
+ //aCbAttrib.Check(sal_False);
+ //aCbValue.Check(sal_False);
+ aCbCopyAll.Check(false);
+ aCbProtect.Check(sal_True);
if (bIsEdit)
- aCbCopyAll.Enable(FALSE);
+ aCbCopyAll.Enable(false);
// If the Sheet is protected then we disable the Scenario Protect input
// and default it to true above. Note we are in 'Add' mode here as: if
// Sheet && scenario protection are true, then we cannot edit this dialog.
if (bSheetProtected)
- aCbProtect.Enable(FALSE);
+ aCbProtect.Enable(false);
//! die drei funktionieren noch nicht...
/*
- aCbPrintFrame.Enable(FALSE);
- aCbAttrib.Enable(FALSE);
- aCbValue.Enable(FALSE);
+ aCbPrintFrame.Enable(sal_False);
+ aCbAttrib.Enable(sal_False);
+ aCbValue.Enable(sal_False);
*/
+
+ aEdComment.SetAccessibleRelationMemberOf(&aFlComment);
+ aLbColor.SetAccessibleRelationLabeledBy(&aCbShowFrame);
}
//------------------------------------------------------------------------
@@ -154,7 +159,7 @@ ScNewScenarioDlg::~ScNewScenarioDlg()
//------------------------------------------------------------------------
void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const
+ Color& rColor, sal_uInt16& rFlags ) const
{
rComment = aEdComment.GetText();
rName = aEdName.GetText();
@@ -163,7 +168,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
rName = aDefScenarioName;
rColor = aLbColor.GetSelectEntryColor();
- USHORT nBits = 0;
+ sal_uInt16 nBits = 0;
if (aCbShowFrame.IsChecked())
nBits |= SC_SCENARIO_SHOWFRAME;
/*
@@ -186,7 +191,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
}
void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
aEdComment.SetText(rComment);
aEdName.SetText(rName);
diff --git a/sc/source/ui/dbgui/scendlg.hrc b/sc/source/ui/dbgui/scendlg.hrc
index 8fbf9a2d5b54..92f16e01d362 100644
--- a/sc/source/ui/dbgui/scendlg.hrc
+++ b/sc/source/ui/dbgui/scendlg.hrc
@@ -55,3 +55,6 @@
#define STR_CREATEDBY 31
#define STR_ON 32
#define STR_EDIT 33
+//IAccessibility2 Implementation 2009-----
+#define STR_COLOR 34
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/dbgui/scendlg.src b/sc/source/ui/dbgui/scendlg.src
index 1ca084b28e11..17f55fcc274d 100644
--- a/sc/source/ui/dbgui/scendlg.src
+++ b/sc/source/ui/dbgui/scendlg.src
@@ -29,6 +29,7 @@
#include "scendlg.hrc"
ModalDialog RID_SCDLG_NEWSCENARIO
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_NEWSCENARIO";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 165 ) ;
@@ -55,6 +56,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
MultiLineEdit ED_COMMENT
{
+ HelpID = "sc:MultiLineEdit:RID_SCDLG_NEWSCENARIO:ED_COMMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 183 , 46 ) ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
Edit ED_NAME
{
+ HelpID = "sc:Edit:RID_SCDLG_NEWSCENARIO:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 183 , 12 ) ;
@@ -72,12 +75,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_SHOWFRAME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_SHOWFRAME";
Pos = MAP_APPFONT ( 12 , 107 ) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
Text [ en-US ] = "~Display border";
};
ListBox LB_COLOR
{
+ HelpID = "sc:ListBox:RID_SCDLG_NEWSCENARIO:LB_COLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 125 , 105 ) ;
Size = MAP_APPFONT ( 70 , 86 ) ;
@@ -86,6 +91,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_PRINTFRAME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_PRINTFRAME";
Hide = TRUE ;
Pos = MAP_APPFONT ( 121 , 243 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
@@ -93,12 +99,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_TWOWAY
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_TWOWAY";
Pos = MAP_APPFONT ( 12 , 121 ) ;
Size = MAP_APPFONT ( 183 , 10 ) ;
Text [ en-US ] = "Copy ~back" ;
};
CheckBox CB_ATTRIB
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_ATTRIB";
Hide = TRUE ;
Pos = MAP_APPFONT ( 20 , 243 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
@@ -106,6 +114,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_VALUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_VALUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 230 , 243 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
@@ -113,12 +122,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_COPYALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_COPYALL";
Pos = MAP_APPFONT ( 12 , 135 ) ;
Size = MAP_APPFONT ( 183 , 10 ) ;
Text [ en-US ] = "Copy ~entire sheet" ;
};
CheckBox CB_PROTECT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_PROTECT";
Pos = MAP_APPFONT ( 12 , 149 ) ;
Size = MAP_APPFONT ( 183 , 10 ) ;
Text [ en-US ] = "~Prevent changes" ;
@@ -135,6 +146,10 @@ ModalDialog RID_SCDLG_NEWSCENARIO
{
Text [ en-US ] = "on" ;
};
+ String STR_COLOR
+ {
+ Text [ en-US ] = "Display border in" ;
+ };
FixedLine FL_NAME
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 640f9213a519..743fb1044a91 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -47,13 +47,8 @@
#include <com/sun/star/uno/Sequence.hxx>
#include "miscuno.hxx"
-
//! TODO make dynamic
-#ifdef WIN
-const SCSIZE ASCIIDLG_MAXROWS = 10000;
-#else
const SCSIZE ASCIIDLG_MAXROWS = MAXROWCOUNT;
-#endif
using namespace com::sun::star::uno;
@@ -280,7 +275,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
OUString sTextSeparators(mcTextSep);
bool bMergeDelimiters = false;
bool bFixedWidth = false;
- bool bQuotedFieldAsText = true;
+ bool bQuotedFieldAsText = false;
bool bDetectSpecialNum = false;
sal_Int32 nFromRow = 1;
sal_Int32 nCharSet = -1;
@@ -323,34 +318,45 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
maFieldSeparators = GetSeparators();
// Clipboard is always Unicode, else detect.
- bool bPreselectUnicode = !mbFileImport;
+ rtl_TextEncoding ePreselectUnicode = (mbFileImport ?
+ RTL_TEXTENCODING_DONTKNOW : RTL_TEXTENCODING_UNICODE);
// Sniff for Unicode / not
- if( !bPreselectUnicode && mpDatStream )
+ if( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW && mpDatStream )
{
Seek( 0 );
- mpDatStream->StartReadingUnicodeText();
- ULONG nUniPos = mpDatStream->Tell();
- if ( nUniPos > 0 )
- bPreselectUnicode = TRUE; // read 0xfeff/0xfffe
- else
+ mpDatStream->StartReadingUnicodeText( RTL_TEXTENCODING_DONTKNOW );
+ sal_uLong nUniPos = mpDatStream->Tell();
+ switch (nUniPos)
{
- UINT16 n;
- *mpDatStream >> n;
- // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with
- // control characters except CR,LF,TAB
- if ( (n & 0xff00) < 0x2000 )
- {
- switch ( n & 0xff00 )
+ case 2:
+ ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16
+ break;
+ case 3:
+ ePreselectUnicode = RTL_TEXTENCODING_UTF8; // UTF-8
+ break;
+ case 0:
{
- case 0x0900 :
- case 0x0a00 :
- case 0x0d00 :
- break;
- default:
- bPreselectUnicode = TRUE;
+ sal_uInt16 n;
+ *mpDatStream >> n;
+ // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with
+ // control characters except CR,LF,TAB
+ if ( (n & 0xff00) < 0x2000 )
+ {
+ switch ( n & 0xff00 )
+ {
+ case 0x0900 :
+ case 0x0a00 :
+ case 0x0d00 :
+ break;
+ default:
+ ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16
+ }
+ }
+ mpDatStream->Seek(0);
}
- }
- mpDatStream->Seek(0);
+ break;
+ default:
+ ; // nothing
}
mnStreamPos = mpDatStream->Tell();
}
@@ -376,15 +382,15 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
// *** text encoding ListBox ***
// all encodings allowed, including Unicode, but subsets are excluded
- aLbCharSet.FillFromTextEncodingTable( TRUE );
+ aLbCharSet.FillFromTextEncodingTable( sal_True );
// Insert one "SYSTEM" entry for compatibility in AsciiOptions and system
// independent document linkage.
aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser );
- aLbCharSet.SelectTextEncoding( bPreselectUnicode ?
- RTL_TEXTENCODING_UNICODE : gsl_getSystemTextEncoding() );
+ aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ?
+ gsl_getSystemTextEncoding() : ePreselectUnicode );
- if( nCharSet >= 0 )
- aLbCharSet.SelectEntryPos( static_cast<USHORT>(nCharSet) );
+ if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW )
+ aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(nCharSet) );
SetSelectedCharSet();
aLbCharSet.SetSelectHdl( LINK( this, ScImportAsciiDlg, CharSetHdl ) );
@@ -418,6 +424,9 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
UpdateVertical();
maTableBox.Execute( CSVCMD_NEWCELLTEXTS );
+
+ aEdOther.SetAccessibleName(aCkbOther.GetText());
+ aEdOther.SetAccessibleRelationLabeledBy(&aCkbOther);
}
@@ -429,7 +438,7 @@ ScImportAsciiDlg::~ScImportAsciiDlg()
// ----------------------------------------------------------------------------
-bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText )
+bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText )
{
if (nLine >= ASCIIDLG_MAXROWS || !mpDatStream)
return false;
@@ -438,15 +447,14 @@ bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText )
bool bFixed = aRbFixed.IsChecked();
if (!mpRowPosArray)
- mpRowPosArray = new ULONG[ASCIIDLG_MAXROWS + 2];
+ mpRowPosArray = new sal_uLong[ASCIIDLG_MAXROWS + 2];
if (!mnRowPosCount) // complete re-fresh
{
memset( mpRowPosArray, 0, sizeof(mpRowPosArray[0]) * (ASCIIDLG_MAXROWS+2));
Seek(0);
- if ( mpDatStream->GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
- mpDatStream->StartReadingUnicodeText();
+ mpDatStream->StartReadingUnicodeText( mpDatStream->GetStreamCharSet() );
mnStreamPos = mpDatStream->Tell();
mpRowPosArray[mnRowPosCount] = mnStreamPos;
@@ -576,7 +584,7 @@ String ScImportAsciiDlg::GetSeparators() const
void ScImportAsciiDlg::SetupSeparatorCtrls()
{
- BOOL bEnable = aRbSeparated.IsChecked();
+ sal_Bool bEnable = aRbSeparated.IsChecked();
aCkbTab.Enable( bEnable );
aCkbSemicolon.Enable( bEnable );
aCkbComma.Enable( bEnable );
@@ -696,7 +704,7 @@ IMPL_LINK( ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox*, EMPTYARG )
maPreviewLine[i].Erase();
maTableBox.Execute( CSVCMD_SETLINECOUNT, mnRowPosCount);
- bool bMergeSep = (aCkbAsOnce.IsChecked() == TRUE);
+ bool bMergeSep = (aCkbAsOnce.IsChecked() == sal_True);
maTableBox.SetUniStrings( maPreviewLine, maFieldSeparators, mcTextSep, bMergeSep);
return 0;
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index a6ee4ce71cb8..4fa3e6868875 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -51,7 +51,7 @@ public:
nIter ( 0 )
{}
- USHORT GetCode( const String& rDelimiter ) const;
+ sal_uInt16 GetCode( const String& rDelimiter ) const;
String GetDelimiter( sal_Unicode nCode ) const;
String FirstDel() { nIter = 0; return theDelTab.GetToken( nIter, cSep ); }
@@ -66,7 +66,7 @@ private:
//------------------------------------------------------------------------
-USHORT ScDelimiterTable::GetCode( const String& rDel ) const
+sal_uInt16 ScDelimiterTable::GetCode( const String& rDel ) const
{
sal_Unicode nCode = 0;
@@ -118,12 +118,12 @@ String ScDelimiterTable::GetDelimiter( sal_Unicode nCode ) const
ScImportOptionsDlg::ScImportOptionsDlg(
Window* pParent,
- BOOL bAscii,
+ sal_Bool bAscii,
const ScImportOptions* pOptions,
const String* pStrTitle,
- BOOL bMultiByte,
- BOOL bOnlyDbtoolsEncodings,
- BOOL bImport )
+ sal_Bool bMultiByte,
+ sal_Bool bOnlyDbtoolsEncodings,
+ sal_Bool bImport )
: ModalDialog ( pParent, ScResId( RID_SCDLG_IMPORTOPT ) ),
aFlFieldOpt ( this, ScResId( FL_FIELDOPT ) ),
@@ -133,11 +133,12 @@ ScImportOptionsDlg::ScImportOptionsDlg(
aEdFieldSep ( this, ScResId( ED_FIELDSEP ) ),
aFtTextSep ( this, ScResId( FT_TEXTSEP ) ),
aEdTextSep ( this, ScResId( ED_TEXTSEP ) ),
+ aCbQuoteAll ( this, ScResId( CB_QUOTEALL ) ),
+ aCbShown ( this, ScResId( CB_SAVESHOWN ) ),
aCbFixed ( this, ScResId( CB_FIXEDWIDTH ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
- aCbShown ( this, ScResId( CB_SAVESHOWN ) )
+ aBtnHelp ( this, ScResId( BTN_HELP ) )
{
// im Ctor-Initializer nicht moeglich (MSC kann das nicht):
pFieldSepTab = new ScDelimiterTable( String(ScResId(SCSTR_FIELDSEP)) );
@@ -212,9 +213,11 @@ ScImportOptionsDlg::ScImportOptionsDlg(
SetSizePixel( aWinSize );
aCbFixed.Show();
aCbFixed.SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) );
- aCbFixed.Check( FALSE );
+ aCbFixed.Check( false );
aCbShown.Show();
- aCbShown.Check( TRUE );
+ aCbShown.Check( sal_True );
+ aCbQuoteAll.Show();
+ aCbQuoteAll.Check( false );
}
else
{
@@ -226,6 +229,7 @@ ScImportOptionsDlg::ScImportOptionsDlg(
aEdTextSep.Hide();
aCbFixed.Hide();
aCbShown.Hide();
+ aCbQuoteAll.Hide();
aLbFont.GrabFocus();
aLbFont.SetDoubleClickHdl( LINK( this, ScImportOptionsDlg, DoubleClickHdl ) );
}
@@ -260,16 +264,17 @@ void ScImportOptionsDlg::GetImportOptions( ScImportOptions& rOptions ) const
rOptions.nTextSepCode = GetCodeFromCombo( aEdTextSep );
rOptions.bFixedWidth = aCbFixed.IsChecked();
rOptions.bSaveAsShown = aCbShown.IsChecked();
+ rOptions.bQuoteAllText = aCbQuoteAll.IsChecked();
}
}
//------------------------------------------------------------------------
-USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
+sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
{
ScDelimiterTable* pTab;
String aStr( rEd.GetText() );
- USHORT nCode;
+ sal_uInt16 nCode;
if ( &rEd == &aEdTextSep )
pTab = pTextSepTab;
@@ -285,7 +290,7 @@ USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
nCode = pTab->GetCode( aStr );
if ( nCode == 0 )
- nCode = (USHORT)aStr.GetChar(0);
+ nCode = (sal_uInt16)aStr.GetChar(0);
}
return nCode;
@@ -297,12 +302,13 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox )
{
if( pCheckBox == &aCbFixed )
{
- BOOL bEnable = !aCbFixed.IsChecked();
+ sal_Bool bEnable = !aCbFixed.IsChecked();
aFtFieldSep.Enable( bEnable );
aEdFieldSep.Enable( bEnable );
aFtTextSep.Enable( bEnable );
aEdTextSep.Enable( bEnable );
aCbShown.Enable( bEnable );
+ aCbQuoteAll.Enable( bEnable );
}
return 0;
}
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index e7bfecfdea3d..e0fcb9936c96 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -71,8 +71,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
: ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_SPEC_FILTER ),
//
- aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ),
aFtFilterArea ( this, ScResId( FT_CRITERIA_AREA ) ),
+ aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ),
aEdFilterArea ( this, this, ScResId( ED_CRITERIA_AREA ) ),
aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, this ),
//
@@ -91,7 +91,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
pViewData ( NULL ),
pDoc ( NULL ),
pRefInputEdit ( NULL ),
- bRefInputMode ( FALSE ),
+ bRefInputMode ( false ),
pTimer ( NULL )
{
Init( rArgSet );
@@ -104,6 +104,11 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
pTimer->SetTimeout( 50 ); // 50ms warten
pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
pTimer->Start();
+
+ aLbCopyArea.SetAccessibleName(aBtnCopyResult.GetText());
+ aEdCopyArea.SetAccessibleName(aBtnCopyResult.GetText());
+ aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
}
@@ -111,8 +116,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
ScSpecialFilterDlg::~ScSpecialFilterDlg()
{
- USHORT nEntries = aLbFilterArea.GetEntryCount();
- USHORT i;
+ sal_uInt16 nEntries = aLbFilterArea.GetEntryCount();
+ sal_uInt16 i;
for ( i=1; i<nEntries; i++ )
delete (String*)aLbFilterArea.GetEntryData( i );
@@ -156,7 +161,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
if (!pRangeNames->empty())
{
ScRangeName::const_iterator itr = pRangeNames->begin(), itrEnd = pRangeNames->end();
- USHORT nInsert = 0;
+ sal_uInt16 nInsert = 0;
for (; itr != itrEnd; ++itr)
{
if (!itr->HasType(RT_CRITERIA))
@@ -205,19 +210,19 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
aStrUndefined );
// Spezialfilter braucht immer Spaltenkoepfe
- aBtnHeader.Check(TRUE);
+ aBtnHeader.Check(true);
aBtnHeader.Disable();
// Modal-Modus einschalten
-// SetDispatcherLock( TRUE );
+// SetDispatcherLock( sal_True );
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
-BOOL ScSpecialFilterDlg::Close()
+sal_Bool ScSpecialFilterDlg::Close()
{
if (pViewData)
pViewData->GetDocShell()->CancelAutoDBRange();
@@ -290,7 +295,7 @@ ScQueryItem* ScSpecialFilterDlg::GetOutputItem( const ScQueryParam& rParam,
//----------------------------------------------------------------------------
-BOOL ScSpecialFilterDlg::IsRefInputMode() const
+sal_Bool ScSpecialFilterDlg::IsRefInputMode() const
{
return bRefInputMode;
}
@@ -310,8 +315,8 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
String theAreaStr( aEdFilterArea.GetText() );
ScQueryParam theOutParam( theQueryData );
ScAddress theAdrCopy;
- BOOL bEditInputOk = TRUE;
- BOOL bQueryOk = FALSE;
+ sal_Bool bEditInputOk = sal_True;
+ sal_Bool bQueryOk = false;
ScRange theFilterArea;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -322,28 +327,28 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( STRING_NOTFOUND != nColonPos )
theCopyStr.Erase( nColonPos );
- USHORT nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
+ sal_uInt16 nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
if ( SCA_VALID != (nResult & SCA_VALID) )
{
if ( !aBtnMore.GetState() )
- aBtnMore.SetState( TRUE );
+ aBtnMore.SetState( sal_True );
ERRORBOX( STR_INVALID_TABREF );
aEdCopyArea.GrabFocus();
- bEditInputOk = FALSE;
+ bEditInputOk = false;
}
}
if ( bEditInputOk )
{
- USHORT nResult = ScRange().Parse( theAreaStr, pDoc, eConv );
+ sal_uInt16 nResult = ScRange().Parse( theAreaStr, pDoc, eConv );
if ( SCA_VALID != (nResult & SCA_VALID) )
{
ERRORBOX( STR_INVALID_TABREF );
aEdFilterArea.GrabFocus();
- bEditInputOk = FALSE;
+ bEditInputOk = false;
}
}
@@ -355,7 +360,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
* ein ScQueryParam zu erzeugen:
*/
- USHORT nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv );
+ sal_uInt16 nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
@@ -364,21 +369,21 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( aBtnCopyResult.IsChecked() )
{
- theOutParam.bInplace = FALSE;
+ theOutParam.bInplace = false;
theOutParam.nDestTab = theAdrCopy.Tab();
theOutParam.nDestCol = theAdrCopy.Col();
theOutParam.nDestRow = theAdrCopy.Row();
}
else
{
- theOutParam.bInplace = TRUE;
+ theOutParam.bInplace = sal_True;
theOutParam.nDestTab = 0;
theOutParam.nDestCol = 0;
theOutParam.nDestRow = 0;
}
theOutParam.bHasHeader = aBtnHeader.IsChecked();
- theOutParam.bByRow = TRUE;
+ theOutParam.bByRow = sal_True;
theOutParam.bCaseSens = aBtnCase.IsChecked();
theOutParam.bRegExp = aBtnRegExp.IsChecked();
theOutParam.bDuplicate = !aBtnUnique.IsChecked();
@@ -398,7 +403,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( bQueryOk && theOutParam.GetEntryCount() > MAXQUERY &&
theOutParam.GetEntry(MAXQUERY).bDoQuery )
{
- bQueryOk = FALSE; // zu viele
+ bQueryOk = false; // zu viele
//! andere Fehlermeldung ??
}
}
@@ -406,7 +411,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( bQueryOk )
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( FID_FILTER_OK,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -438,17 +443,17 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
if( aEdCopyArea.HasFocus() || aRbCopyArea.HasFocus() )
{
pRefInputEdit = &aEdCopyArea;
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
else if( aEdFilterArea.HasFocus() || aRbFilterArea.HasFocus() )
{
pRefInputEdit = &aEdFilterArea;
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
else if( bRefInputMode )
{
pRefInputEdit = NULL;
- bRefInputMode = FALSE;
+ bRefInputMode = false;
}
}
@@ -465,7 +470,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb )
if ( pLb == &aLbFilterArea )
{
String aString;
- USHORT nSelPos = aLbFilterArea.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aLbFilterArea.GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *(String*)aLbFilterArea.GetEntryData( nSelPos );
@@ -486,14 +491,14 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd )
if ( pDoc && pViewData )
{
String theCurAreaStr = pEd->GetText();
- USHORT nResult = ScRange().Parse( theCurAreaStr, pDoc );
+ sal_uInt16 nResult = ScRange().Parse( theCurAreaStr, pDoc );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = aLbFilterArea.GetEntryCount();
+ sal_Bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = aLbFilterArea.GetEntryCount();
for ( i=1; i<nCount && !bFound; i++ )
{
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index 1651a7ab1dda..57b75c8e2d7e 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -47,8 +47,8 @@ ScSortDlg::ScSortDlg( Window* pParent,
SfxTabDialog( pParent,
ScResId( RID_SCDLG_SORT ),
pArgSet ),
- bIsHeaders ( FALSE ),
- bIsByRows ( FALSE )
+ bIsHeaders ( false ),
+ bIsByRows ( false )
{
#if LAYOUT_SFX_TABDIALOG_BROKEN
@@ -56,9 +56,9 @@ ScSortDlg::ScSortDlg( Window* pParent,
AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 );
#else
String fields = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fields"));
- AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, FALSE, TAB_APPEND);
+ AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, false, TAB_APPEND);
String options = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("options"));
- AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, FALSE, TAB_APPEND);
+ AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, false, TAB_APPEND);
#endif
FreeResource();
}
diff --git a/sc/source/ui/dbgui/textimportoptions.src b/sc/source/ui/dbgui/textimportoptions.src
index a2d453555bb9..ea0b9390228b 100644
--- a/sc/source/ui/dbgui/textimportoptions.src
+++ b/sc/source/ui/dbgui/textimportoptions.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_TEXT_IMPORT_OPTIONS";
Text [ en-US ] = "Import Options" ;
Size = MAP_APPFONT ( 230 , 101 ) ;
Moveable = TRUE ;
@@ -64,6 +65,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
RadioButton RB_AUTOMATIC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_AUTOMATIC";
Pos = MAP_APPFONT( 12, 20 ) ;
Size = MAP_APPFONT( 159, 10 ) ;
TabStop = TRUE ;
@@ -73,6 +75,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
RadioButton RB_CUSTOM
{
+ HelpID = "sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_CUSTOM";
Pos = MAP_APPFONT( 12, 34 ) ;
Size = MAP_APPFONT( 159, 10 ) ;
TabStop = TRUE ;
@@ -82,6 +85,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
ListBox LB_CUSTOM_LANG
{
+ HelpID = "sc:ListBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:LB_CUSTOM_LANG";
Pos = MAP_APPFONT( 20, 50 ) ;
Size = MAP_APPFONT( 140, 120 ) ;
TabStop = TRUE ;
@@ -98,6 +102,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
CheckBox BTN_CONVERT_DATE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:BTN_CONVERT_DATE";
Pos = MAP_APPFONT( 12, 86 );
Size = MAP_APPFONT( 159, 10 );
TabStop = TRUE ;
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 44676b136e14..6974e7d2135a 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -61,7 +61,7 @@ using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
-static USHORT pSortRanges[] =
+static sal_uInt16 pSortRanges[] =
{
SID_SORT,
SID_SORT,
@@ -81,7 +81,7 @@ static USHORT pSortRanges[] =
*
* Die Klasse SfxTabPage bietet mittlerweile ein Verfahren an:
*
- * virtual BOOL HasExchangeSupport() const; -> return TRUE;
+ * virtual sal_Bool HasExchangeSupport() const; -> return sal_True;
* virtual void ActivatePage(const SfxItemSet &);
* virtual int DeactivatePage(SfxItemSet * = 0);
*
@@ -125,8 +125,8 @@ ScTabPageSortFields::ScTabPageSortFields( Window* pParent,
rArgSet.Get( nWhichSort )).
GetSortData() ),
nFieldCount ( 0 ),
- bHasHeader ( FALSE ),
- bSortByRows ( FALSE )
+ bHasHeader ( false ),
+ bSortByRows ( false )
{
Init();
FreeResource();
@@ -177,7 +177,7 @@ void ScTabPageSortFields::Init()
//------------------------------------------------------------------------
-USHORT* ScTabPageSortFields::GetRanges()
+sal_uInt16* ScTabPageSortFields::GetRanges()
{
return pSortRanges;
}
@@ -204,7 +204,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
if ( rSortData.bDoSort[0] )
{
- for ( USHORT i=0; i<3; i++ )
+ for ( sal_uInt16 i=0; i<3; i++ )
{
if ( rSortData.bDoSort[i] )
{
@@ -239,7 +239,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
else if( nCol > rSortData.nCol2 )
nCol = rSortData.nCol2;
- USHORT nSort1Pos = nCol - rSortData.nCol1+1;
+ sal_uInt16 nSort1Pos = nCol - rSortData.nCol1+1;
aLbSort1.SelectEntryPos( nSort1Pos );
aLbSort2.SelectEntryPos( 0 );
aLbSort3.SelectEntryPos( 0 );
@@ -260,20 +260,20 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
// -----------------------------------------------------------------------
-BOOL ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
{
ScSortParam theSortData = rSortData;
if (pDlg)
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET )
theSortData = ((const ScSortItem*)pItem)->GetSortData();
}
- USHORT nSort1Pos = aLbSort1.GetSelectEntryPos();
- USHORT nSort2Pos = aLbSort2.GetSelectEntryPos();
- USHORT nSort3Pos = aLbSort3.GetSelectEntryPos();
+ sal_uInt16 nSort1Pos = aLbSort1.GetSelectEntryPos();
+ sal_uInt16 nSort2Pos = aLbSort2.GetSelectEntryPos();
+ sal_uInt16 nSort3Pos = aLbSort3.GetSelectEntryPos();
DBG_ASSERT( (nSort1Pos <= SC_MAXFIELDS)
&& (nSort2Pos <= SC_MAXFIELDS)
@@ -318,12 +318,12 @@ BOOL ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
{
theSortData.bDoSort[0] =
theSortData.bDoSort[1] =
- theSortData.bDoSort[2] = FALSE;
+ theSortData.bDoSort[2] = false;
}
rArgSet.Put( ScSortItem( SCITEM_SORTDATA, NULL, &theSortData ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -337,9 +337,9 @@ void ScTabPageSortFields::ActivatePage()
if ( bHasHeader != pDlg->GetHeaders()
|| bSortByRows != pDlg->GetByRows() )
{
- USHORT nCurSel1 = aLbSort1.GetSelectEntryPos();
- USHORT nCurSel2 = aLbSort2.GetSelectEntryPos();
- USHORT nCurSel3 = aLbSort3.GetSelectEntryPos();
+ sal_uInt16 nCurSel1 = aLbSort1.GetSelectEntryPos();
+ sal_uInt16 nCurSel2 = aLbSort2.GetSelectEntryPos();
+ sal_uInt16 nCurSel3 = aLbSort3.GetSelectEntryPos();
bHasHeader = pDlg->GetHeaders();
bSortByRows = pDlg->GetByRows();
@@ -372,7 +372,7 @@ int ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP )
// -----------------------------------------------------------------------
-void ScTabPageSortFields::DisableField( USHORT nField )
+void ScTabPageSortFields::DisableField( sal_uInt16 nField )
{
nField--;
@@ -387,7 +387,7 @@ void ScTabPageSortFields::DisableField( USHORT nField )
// -----------------------------------------------------------------------
-void ScTabPageSortFields::EnableField( USHORT nField )
+void ScTabPageSortFields::EnableField( sal_uInt16 nField )
{
nField--;
@@ -420,7 +420,7 @@ void ScTabPageSortFields::FillFieldLists()
SCCOL nFirstSortCol = rSortData.nCol1;
SCROW nFirstSortRow = rSortData.nRow1;
SCTAB nTab = pViewData->GetTabNo();
- USHORT i = 1;
+ sal_uInt16 i = 1;
if ( bSortByRows )
{
@@ -473,17 +473,17 @@ void ScTabPageSortFields::FillFieldLists()
//------------------------------------------------------------------------
-USHORT ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField )
+sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField )
{
- USHORT nFieldPos = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 nFieldPos = 0;
+ sal_Bool bFound = false;
- for ( USHORT n=1; n<nFieldCount && !bFound; n++ )
+ for ( sal_uInt16 n=1; n<nFieldCount && !bFound; n++ )
{
if ( nFieldArr[n] == nField )
{
nFieldPos = n;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -596,15 +596,22 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent,
Init();
FreeResource();
SetExchangeSupport();
+
+ aLbOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aLbOutPos.SetAccessibleName(aBtnCopyResult.GetText());
+ aEdOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aEdOutPos.SetAccessibleName(aBtnCopyResult.GetText());
+ aLbSortUser.SetAccessibleRelationLabeledBy(&aBtnSortUser);
+ aLbSortUser.SetAccessibleName(aBtnSortUser.GetText());
}
// -----------------------------------------------------------------------
ScTabPageSortOptions::~ScTabPageSortOptions()
{
- USHORT nEntries = aLbOutPos.GetEntryCount();
+ sal_uInt16 nEntries = aLbOutPos.GetEntryCount();
- for ( USHORT i=1; i<nEntries; i++ )
+ for ( sal_uInt16 i=1; i<nEntries; i++ )
delete (String*)aLbOutPos.GetEntryData( i );
delete pColRes;
@@ -655,7 +662,7 @@ void ScTabPageSortOptions::Init()
String aRefStr;
while ( aIter.Next( aName, aRange ) )
{
- USHORT nInsert = aLbOutPos.InsertEntry( aName );
+ sal_uInt16 nInsert = aLbOutPos.InsertEntry( aName );
aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv );
aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
@@ -698,13 +705,13 @@ void ScTabPageSortOptions::Init()
// get available languages
- aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE );
+ aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, false );
aLbLanguage.InsertLanguage( LANGUAGE_SYSTEM );
}
//------------------------------------------------------------------------
-USHORT* ScTabPageSortOptions::GetRanges()
+sal_uInt16* ScTabPageSortOptions::GetRanges()
{
return pSortRanges;
}
@@ -727,13 +734,13 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
{
if ( rSortData.bUserDef )
{
- aBtnSortUser.Check( TRUE );
+ aBtnSortUser.Check( sal_True );
aLbSortUser.Enable();
aLbSortUser.SelectEntryPos( rSortData.nUserIndex );
}
else
{
- aBtnSortUser.Check( FALSE );
+ aBtnSortUser.Check( false );
aLbSortUser.Disable();
aLbSortUser.SelectEntryPos( 0 );
}
@@ -765,7 +772,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
if ( pDoc && !rSortData.bInplace )
{
String aStr;
- USHORT nFormat = (rSortData.nDestTab != pViewData->GetTabNo())
+ sal_uInt16 nFormat = (rSortData.nDestTab != pViewData->GetTabNo())
? SCR_ABS_3D
: SCR_ABS;
@@ -784,7 +791,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
}
else
{
- aBtnCopyResult.Check( FALSE );
+ aBtnCopyResult.Check( false );
aLbOutPos.Disable();
aEdOutPos.Disable();
aEdOutPos.SetText( EMPTY_STRING );
@@ -793,14 +800,14 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
// -----------------------------------------------------------------------
-BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
{
ScSortParam theSortData = rSortData;
if (pDlg)
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET )
theSortData = ((const ScSortItem*)pItem)->GetSortData();
}
@@ -828,7 +835,7 @@ BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
{
uno::Sequence<rtl::OUString> aAlgos = pColWrap->listCollatorAlgorithms(
theSortData.aCollatorLocale );
- USHORT nSel = aLbAlgorithm.GetSelectEntryPos();
+ sal_uInt16 nSel = aLbAlgorithm.GetSelectEntryPos();
if ( nSel < aAlgos.getLength() )
sAlg = aAlgos[nSel];
}
@@ -836,7 +843,7 @@ BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
rArgSet.Put( ScSortItem( SCITEM_SORTDATA, &theSortData ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -867,7 +874,7 @@ void ScTabPageSortOptions::ActivatePage()
int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
{
- BOOL bPosInputOk = TRUE;
+ sal_Bool bPosInputOk = sal_True;
if ( aBtnCopyResult.IsChecked() )
{
@@ -885,7 +892,7 @@ int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
thePos.SetTab( pViewData->GetTabNo() );
}
- USHORT nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() );
bPosInputOk = ( SCA_VALID == (nResult & SCA_VALID) );
@@ -928,9 +935,9 @@ void ScTabPageSortOptions::FillUserSortListBox()
aLbSortUser.Clear();
if ( pUserLists )
{
- USHORT nCount = pUserLists->GetCount();
+ sal_uInt16 nCount = pUserLists->GetCount();
if ( nCount > 0 )
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
aLbSortUser.InsertEntry( (*pUserLists)[i]->GetString() );
}
}
@@ -974,7 +981,7 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb )
if ( pLb == &aLbOutPos )
{
String aString;
- USHORT nSelPos = aLbOutPos.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aLbOutPos.GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *(String*)aLbOutPos.GetEntryData( nSelPos );
@@ -1006,14 +1013,14 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd )
if ( pEd == &aEdOutPos )
{
String theCurPosStr = aEdOutPos.GetText();
- USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = aLbOutPos.GetEntryCount();
+ sal_Bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = aLbOutPos.GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
@@ -1033,7 +1040,7 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd )
IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG )
{
- aLbAlgorithm.SetUpdateMode( FALSE );
+ aLbAlgorithm.SetUpdateMode( false );
aLbAlgorithm.Clear();
LanguageType eLang = aLbLanguage.GetSelectLanguage();
@@ -1042,8 +1049,8 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG )
// for LANGUAGE_SYSTEM no algorithm can be selected because
// it wouldn't necessarily exist for other languages
// -> leave list box empty if LANGUAGE_SYSTEM is selected
- aFtAlgorithm.Enable( FALSE ); // nothing to select
- aLbAlgorithm.Enable( FALSE ); // nothing to select
+ aFtAlgorithm.Enable( false ); // nothing to select
+ aLbAlgorithm.Enable( false ); // nothing to select
}
else
{
@@ -1063,7 +1070,7 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG )
aLbAlgorithm.Enable( nCount > 1 ); // enable only if there is a choice
}
- aLbAlgorithm.SetUpdateMode( TRUE );
+ aLbAlgorithm.SetUpdateMode( sal_True );
return 0;
}
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index abc491618d2e..d27dae46011e 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -46,7 +46,7 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pSubTotalsRanges[] =
+static sal_uInt16 pSubTotalsRanges[] =
{
SID_SUBTOTALS,
SID_SUBTOTALS,
@@ -56,7 +56,7 @@ static USHORT pSubTotalsRanges[] =
//========================================================================
// Zwischenergebnisgruppen-Tabpage:
-ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId,
+ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, sal_uInt16 nResId,
const SfxItemSet& rArgSet )
: SfxTabPage ( pParent,
ScResId( nResId ),
@@ -91,15 +91,15 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId,
ScTpSubTotalGroup::~ScTpSubTotalGroup()
{
- USHORT nCount = (USHORT)aLbColumns.GetEntryCount();
+ sal_uInt16 nCount = (sal_uInt16)aLbColumns.GetEntryCount();
if ( nCount > 0 )
{
- USHORT* pData = NULL;
+ sal_uInt16* pData = NULL;
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
- pData = (USHORT*)(aLbColumns.GetEntryData( i ));
+ pData = (sal_uInt16*)(aLbColumns.GetEntryData( i ));
DBG_ASSERT( pData, "EntryData not found" );
delete pData;
@@ -130,32 +130,32 @@ void ScTpSubTotalGroup::Init()
//------------------------------------------------------------------------
-USHORT* ScTpSubTotalGroup::GetRanges()
+sal_uInt16* ScTpSubTotalGroup::GetRanges()
{
return pSubTotalsRanges;
}
// -----------------------------------------------------------------------
-BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo,
+sal_Bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
const SfxItemSet& rArgSet )
{
- USHORT nGroupIdx = 0;
+ sal_uInt16 nGroupIdx = 0;
DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
if ( (nGroupNo > 3) || (nGroupNo == 0) )
- return FALSE;
+ return false;
else
nGroupIdx = nGroupNo-1;
//----------------------------------------------------------
// first we have to clear the listboxes...
- for ( USHORT nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry )
+ for ( sal_uInt16 nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry )
{
- aLbColumns.CheckEntryPos( nLbEntry, FALSE );
- *((USHORT*)aLbColumns.GetEntryData( nLbEntry )) = 0;
+ aLbColumns.CheckEntryPos( nLbEntry, false );
+ *((sal_uInt16*)aLbColumns.GetEntryData( nLbEntry )) = 0;
}
aLbFunctions.SelectEntryPos( 0 );
@@ -172,10 +172,10 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo,
aLbGroup.SelectEntryPos( GetFieldSelPos( nField )+1 );
- for ( USHORT i=0; i<nSubTotals; i++ )
+ for ( sal_uInt16 i=0; i<nSubTotals; i++ )
{
- USHORT nCheckPos = GetFieldSelPos( pSubTotals[i] );
- USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nCheckPos );
+ sal_uInt16 nCheckPos = GetFieldSelPos( pSubTotals[i] );
+ sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nCheckPos );
aLbColumns.CheckEntryPos( nCheckPos );
*pFunction = FuncToLbPos( pFunctions[i] );
@@ -189,15 +189,15 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo,
aLbFunctions.SelectEntryPos( 0 );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
+sal_Bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
SfxItemSet& rArgSet )
{
- USHORT nGroupIdx = 0;
+ sal_uInt16 nGroupIdx = 0;
DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
DBG_ASSERT( (aLbGroup.GetEntryCount() > 0)
@@ -211,7 +211,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
|| (aLbColumns.GetEntryCount() == 0)
|| (aLbFunctions.GetEntryCount() == 0)
)
- return FALSE;
+ return false;
else
nGroupIdx = nGroupNo-1;
@@ -223,15 +223,15 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET )
theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData();
}
ScSubTotalFunc* pFunctions = NULL;
SCCOL* pSubTotals = NULL;
- USHORT nGroup = aLbGroup.GetSelectEntryPos();
- USHORT nEntryCount = (USHORT)aLbColumns.GetEntryCount();
- USHORT nCheckCount = aLbColumns.GetCheckedEntryCount();
+ sal_uInt16 nGroup = aLbGroup.GetSelectEntryPos();
+ sal_uInt16 nEntryCount = (sal_uInt16)aLbColumns.GetEntryCount();
+ sal_uInt16 nCheckCount = aLbColumns.GetCheckedEntryCount();
theSubTotalData.nCol1 = rSubTotalData.nCol1;
theSubTotalData.nRow1 = rSubTotalData.nRow1;
@@ -244,18 +244,18 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
if ( nEntryCount>0 && nCheckCount>0 && nGroup!=0 )
{
- USHORT nFunction = 0;
+ sal_uInt16 nFunction = 0;
pSubTotals = new SCCOL [nCheckCount];
pFunctions = new ScSubTotalFunc [nCheckCount];
- for ( USHORT i=0, nCheck=0; i<nEntryCount; i++ )
+ for ( sal_uInt16 i=0, nCheck=0; i<nEntryCount; i++ )
{
if ( aLbColumns.IsChecked( i ) )
{
DBG_ASSERT( nCheck <= nCheckCount,
"Range error :-(" );
- nFunction = *((USHORT*)aLbColumns.GetEntryData( i ));
+ nFunction = *((sal_uInt16*)aLbColumns.GetEntryData( i ));
pSubTotals[nCheck] = nFieldArr[i];
pFunctions[nCheck] = LbPosToFunc( nFunction );
nCheck++;
@@ -273,7 +273,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
if ( pSubTotals ) delete [] pSubTotals;
if ( pFunctions ) delete [] pFunctions;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -289,7 +289,7 @@ void ScTpSubTotalGroup::FillListBoxes()
SCTAB nTab = pViewData->GetTabNo();
SCCOL nMaxCol = rSubTotalData.nCol2;
SCCOL col;
- USHORT i=0;
+ sal_uInt16 i=0;
String aFieldName;
aLbGroup.Clear();
@@ -309,27 +309,27 @@ void ScTpSubTotalGroup::FillListBoxes()
nFieldArr[i] = col;
aLbGroup.InsertEntry( aFieldName, i+1 );
aLbColumns.InsertEntry( aFieldName, i );
- aLbColumns.SetEntryData( i, new USHORT(0) );
+ aLbColumns.SetEntryData( i, new sal_uInt16(0) );
i++;
}
// Nachtraegliche "Konstanteninitialisierung":
- (USHORT&)nFieldCount = i;
+ (sal_uInt16&)nFieldCount = i;
}
}
// -----------------------------------------------------------------------
-USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField )
+sal_uInt16 ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField )
{
- USHORT nFieldPos = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 nFieldPos = 0;
+ sal_Bool bFound = false;
- for ( USHORT n=0; n<nFieldCount && !bFound; n++ )
+ for ( sal_uInt16 n=0; n<nFieldCount && !bFound; n++ )
{
if ( nFieldArr[n] == nField )
{
nFieldPos = n;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -338,7 +338,7 @@ USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField )
// -----------------------------------------------------------------------
-ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos )
+ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( sal_uInt16 nPos )
{
switch ( nPos )
{
@@ -362,7 +362,7 @@ ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos )
// -----------------------------------------------------------------------
-USHORT ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc )
+sal_uInt16 ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc )
{
switch ( eFunc )
{
@@ -393,9 +393,9 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb )
if ( (aLbColumns.GetEntryCount() > 0)
&& (aLbColumns.GetSelectionCount() > 0) )
{
- USHORT nFunction = aLbFunctions.GetSelectEntryPos();
- USHORT nColumn = aLbColumns.GetSelectEntryPos();
- USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nColumn );
+ sal_uInt16 nFunction = aLbFunctions.GetSelectEntryPos();
+ sal_uInt16 nColumn = aLbColumns.GetSelectEntryPos();
+ sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nColumn );
DBG_ASSERT( pFunction, "EntryData nicht gefunden!" );
if ( !pFunction )
@@ -408,7 +408,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb )
else if ( pLb == &aLbFunctions )
{
*pFunction = nFunction;
- aLbColumns.CheckEntryPos( nColumn, TRUE );
+ aLbColumns.CheckEntryPos( nColumn, true );
}
}
return 0;
@@ -424,7 +424,7 @@ IMPL_LINK( ScTpSubTotalGroup, CheckHdl, ListBox *, pLb )
if ( pEntry )
{
- aLbColumns.SelectEntryPos( (USHORT)aLbColumns.GetModel()->GetAbsPos( pEntry ) );
+ aLbColumns.SelectEntryPos( (sal_uInt16)aLbColumns.GetModel()->GetAbsPos( pEntry ) );
SelectHdl( pLb );
}
}
@@ -476,9 +476,9 @@ void ScTpSubTotalGroup3::Reset( const SfxItemSet& rArgSet ) { RESET(3); }
// -----------------------------------------------------------------------
#define FILLSET(i) (ScTpSubTotalGroup::DoFillItemSet( (i), rArgSet ))
-BOOL ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); }
-BOOL ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); }
-BOOL ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); }
+sal_Bool ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); }
+sal_Bool ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); }
+sal_Bool ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); }
#undef FILL
//========================================================================
@@ -509,6 +509,9 @@ ScTpSubTotalOptions::ScTpSubTotalOptions( Window* pParent,
{
Init();
FreeResource();
+
+ aLbUserDef.SetAccessibleRelationLabeledBy(&aBtnUserDef);
+ aLbUserDef.SetAccessibleName(aBtnUserDef.GetText());
}
// -----------------------------------------------------------------------
@@ -556,13 +559,13 @@ void ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ )
if ( rSubTotalData.bUserDef )
{
- aBtnUserDef.Check( TRUE );
+ aBtnUserDef.Check( sal_True );
aLbUserDef.Enable();
aLbUserDef.SelectEntryPos( rSubTotalData.nUserIndex );
}
else
{
- aBtnUserDef.Check( FALSE );
+ aBtnUserDef.Check( false );
aLbUserDef.Disable();
aLbUserDef.SelectEntryPos( 0 );
}
@@ -572,7 +575,7 @@ void ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ )
// -----------------------------------------------------------------------
-BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
{
ScSubTotalParam theSubTotalData; // auslesen, wenn schon teilweise gefuellt
SfxTabDialog* pDlg = GetTabDialog();
@@ -580,12 +583,12 @@ BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET )
theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData();
}
theSubTotalData.bPagebreak = aBtnPagebreak.IsChecked();
- theSubTotalData.bReplace = TRUE;
+ theSubTotalData.bReplace = sal_True;
theSubTotalData.bCaseSens = aBtnCase.IsChecked();
theSubTotalData.bIncludePattern = aBtnFormats.IsChecked();
theSubTotalData.bDoSort = aBtnSort.IsChecked();
@@ -597,7 +600,7 @@ BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
rArgSet.Put( ScSubTotalItem( nWhichSubTotals, &theSubTotalData ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -609,9 +612,9 @@ void ScTpSubTotalOptions::FillUserSortListBox()
aLbUserDef.Clear();
if ( pUserLists )
{
- USHORT nCount = pUserLists->GetCount();
+ sal_uInt16 nCount = pUserLists->GetCount();
if ( nCount > 0 )
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
aLbUserDef.InsertEntry( (*pUserLists)[i]->GetString() );
}
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index e643b3a85e7c..fdfe24ba26e0 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -60,7 +60,7 @@
// ============================================================================
-static USHORT pValueRanges[] =
+static sal_uInt16 pValueRanges[] =
{
FID_VALID_MODE, FID_VALID_ERRTEXT,
FID_VALID_LISTTYPE, FID_VALID_LISTTYPE,
@@ -160,7 +160,7 @@ void ScTPValidationValue::RefInputDonePostHdl()
}
-BOOL ScValidationDlg::Close()
+sal_Bool ScValidationDlg::Close()
{
if( m_bOwnRefHdlr )
if( SfxTabPage* pPage = GetTabPage( TP_VALIDATION_VALUES ) )
@@ -172,7 +172,7 @@ BOOL ScValidationDlg::Close()
ScValidationDlg::~ScValidationDlg()
{
if( m_bOwnRefHdlr )
- RemoveRefDlg( FALSE );
+ RemoveRefDlg( false );
}
@@ -181,9 +181,9 @@ ScValidationDlg::~ScValidationDlg()
namespace {
/** Converts the passed ScValidationMode to the position in the list box. */
-USHORT lclGetPosFromValMode( ScValidationMode eValMode )
+sal_uInt16 lclGetPosFromValMode( ScValidationMode eValMode )
{
- USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY;
+ sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
switch( eValMode )
{
case SC_VALID_ANY: nLbPos = SC_VALIDDLG_ALLOW_ANY; break;
@@ -200,7 +200,7 @@ USHORT lclGetPosFromValMode( ScValidationMode eValMode )
}
/** Converts the passed list box position to an ScValidationMode. */
-ScValidationMode lclGetValModeFromPos( USHORT nLbPos )
+ScValidationMode lclGetValModeFromPos( sal_uInt16 nLbPos )
{
ScValidationMode eValMode = SC_VALID_ANY;
switch( nLbPos )
@@ -219,9 +219,9 @@ ScValidationMode lclGetValModeFromPos( USHORT nLbPos )
}
/** Converts the passed ScConditionMode to the position in the list box. */
-USHORT lclGetPosFromCondMode( ScConditionMode eCondMode )
+sal_uInt16 lclGetPosFromCondMode( ScConditionMode eCondMode )
{
- USHORT nLbPos = SC_VALIDDLG_DATA_EQUAL;
+ sal_uInt16 nLbPos = SC_VALIDDLG_DATA_EQUAL;
switch( eCondMode )
{
case SC_COND_NONE: // may occur in old XML files after Excel import
@@ -239,7 +239,7 @@ USHORT lclGetPosFromCondMode( ScConditionMode eCondMode )
}
/** Converts the passed list box position to an ScConditionMode. */
-ScConditionMode lclGetCondModeFromPos( USHORT nLbPos )
+ScConditionMode lclGetCondModeFromPos( sal_uInt16 nLbPos )
{
ScConditionMode eCondMode = SC_COND_EQUAL;
switch( nLbPos )
@@ -374,7 +374,7 @@ SfxTabPage* ScTPValidationValue::Create( Window* pParent, const SfxItemSet& rArg
return( new ScTPValidationValue( pParent, rArgSet ) );
}
-USHORT* ScTPValidationValue::GetRanges()
+sal_uInt16* ScTPValidationValue::GetRanges()
{
return pValueRanges;
}
@@ -383,38 +383,38 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet )
{
const SfxPoolItem* pItem;
- USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY;
- if( rArgSet.GetItemState( FID_VALID_MODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
+ if( rArgSet.GetItemState( FID_VALID_MODE, sal_True, &pItem ) == SFX_ITEM_SET )
nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >(
static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
maLbAllow.SelectEntryPos( nLbPos );
nLbPos = SC_VALIDDLG_DATA_EQUAL;
- if( rArgSet.GetItemState( FID_VALID_CONDMODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if( rArgSet.GetItemState( FID_VALID_CONDMODE, sal_True, &pItem ) == SFX_ITEM_SET )
nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >(
static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
maLbValue.SelectEntryPos( nLbPos );
// *** check boxes ***
- BOOL bCheck = TRUE;
- if( rArgSet.GetItemState( FID_VALID_BLANK, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bCheck = sal_True;
+ if( rArgSet.GetItemState( FID_VALID_BLANK, sal_True, &pItem ) == SFX_ITEM_SET )
bCheck = static_cast< const SfxBoolItem* >( pItem )->GetValue();
maCbAllow.Check( bCheck );
sal_Int32 nListType = ValidListType::UNSORTED;
- if( rArgSet.GetItemState( FID_VALID_LISTTYPE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if( rArgSet.GetItemState( FID_VALID_LISTTYPE, sal_True, &pItem ) == SFX_ITEM_SET )
nListType = static_cast< const SfxInt16Item* >( pItem )->GetValue();
maCbShow.Check( nListType != ValidListType::INVISIBLE );
maCbSort.Check( nListType == ValidListType::SORTEDASCENDING );
// *** formulas ***
String aFmlaStr;
- if ( rArgSet.GetItemState( FID_VALID_VALUE1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET )
aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue();
SetFirstFormula( aFmlaStr );
aFmlaStr.Erase();
- if ( rArgSet.GetItemState( FID_VALID_VALUE2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET )
aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue();
SetSecondFormula( aFmlaStr );
@@ -422,21 +422,21 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet )
CheckHdl( NULL );
}
-BOOL ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet )
{
sal_Int16 nListType = maCbShow.IsChecked() ?
(maCbSort.IsChecked() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) :
ValidListType::INVISIBLE;
- rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<USHORT>(
+ rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
lclGetValModeFromPos( maLbAllow.GetSelectEntryPos() ) ) ) );
- rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<USHORT>(
+ rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(
lclGetCondModeFromPos( maLbValue.GetSelectEntryPos() ) ) ) );
rArgSet.Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) );
rArgSet.Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) );
rArgSet.Put( SfxBoolItem( FID_VALID_BLANK, maCbAllow.IsChecked() ) );
rArgSet.Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) );
- return TRUE;
+ return sal_True;
}
String ScTPValidationValue::GetFirstFormula() const
@@ -582,7 +582,7 @@ void ScTPValidationValue::TidyListBoxes()
IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit *, EMPTYARG)
{
- USHORT nPos=maLbAllow.GetSelectEntryPos();
+ sal_uInt16 nPos=maLbAllow.GetSelectEntryPos();
if ( nPos == SC_VALIDDLG_ALLOW_RANGE )
{
@@ -609,7 +609,7 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd )
IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG )
{
- USHORT nLbPos = maLbAllow.GetSelectEntryPos();
+ sal_uInt16 nLbPos = maLbAllow.GetSelectEntryPos();
bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY);
bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE);
bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST);
@@ -701,12 +701,12 @@ ScTPValidationHelp::~ScTPValidationHelp()
void ScTPValidationHelp::Init()
{
- aTsbHelp.EnableTriState( FALSE );
+ aTsbHelp.EnableTriState( false );
}
//------------------------------------------------------------------------
-USHORT* ScTPValidationHelp::GetRanges()
+sal_uInt16* ScTPValidationHelp::GetRanges()
{
return pValueRanges;
}
@@ -725,17 +725,17 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet )
{
const SfxPoolItem* pItem;
- if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, sal_True, &pItem ) == SFX_ITEM_SET )
aTsbHelp.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK );
else
aTsbHelp.SetState( STATE_NOCHECK );
- if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdtTitle.SetText( EMPTY_STRING );
- if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aEdInputHelp.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdInputHelp.SetText( EMPTY_STRING );
@@ -743,13 +743,13 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet )
// -----------------------------------------------------------------------
-BOOL ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet )
{
rArgSet.Put( SfxBoolItem( FID_VALID_SHOWHELP, aTsbHelp.GetState() == STATE_CHECK ) );
rArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aEdtTitle.GetText() ) );
rArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aEdInputHelp.GetText() ) );
- return TRUE;
+ return sal_True;
}
//========================================================================
@@ -792,14 +792,14 @@ void ScTPValidationError::Init()
aBtnSearch.SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl ) );
aLbAction.SelectEntryPos( 0 );
- aTsbShow.EnableTriState( FALSE );
+ aTsbShow.EnableTriState( false );
SelectActionHdl( NULL );
}
//------------------------------------------------------------------------
-USHORT* ScTPValidationError::GetRanges()
+sal_uInt16* ScTPValidationError::GetRanges()
{
return pValueRanges;
}
@@ -818,22 +818,22 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet )
{
const SfxPoolItem* pItem;
- if ( rArgSet.GetItemState( FID_VALID_SHOWERR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET )
aTsbShow.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK );
else
aTsbShow.SetState( STATE_CHECK ); // check by default
- if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET )
aLbAction.SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() );
else
aLbAction.SelectEntryPos( 0 );
- if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdtTitle.SetText( EMPTY_STRING );
- if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aEdError.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdError.SetText( EMPTY_STRING );
@@ -843,14 +843,14 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet )
// -----------------------------------------------------------------------
-BOOL ScTPValidationError::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet )
{
rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, aTsbShow.GetState() == STATE_CHECK ) );
rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, aLbAction.GetSelectEntryPos() ) );
rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aEdtTitle.GetText() ) );
rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aEdError.GetText() ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -858,7 +858,7 @@ BOOL ScTPValidationError::FillItemSet( SfxItemSet& rArgSet )
IMPL_LINK( ScTPValidationError, SelectActionHdl, ListBox*, EMPTYARG )
{
ScValidErrorStyle eStyle = (ScValidErrorStyle) aLbAction.GetSelectEntryPos();
- BOOL bMacro = ( eStyle == SC_VALERR_MACRO );
+ sal_Bool bMacro = ( eStyle == SC_VALERR_MACRO );
aBtnSearch.Enable( bMacro );
aFtError.Enable( !bMacro );
@@ -894,13 +894,13 @@ bool ScValidationDlg::EnterRefStatus()
if( !pTabViewShell ) return false;
- USHORT nId = SLOTID;
+ sal_uInt16 nId = SLOTID;
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL;
- SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ SC_MOD()->SetRefDialog( nId, pWnd ? false : sal_True );
return true;
}
@@ -911,7 +911,7 @@ bool ScValidationDlg::LeaveRefStatus()
if( !pTabViewShell ) return false;
- USHORT nId = SLOTID;
+ sal_uInt16 nId = SLOTID;
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
if ( pViewFrm->GetChildWindow( nId ) )
{
@@ -925,14 +925,14 @@ bool ScValidationDlg::SetupRefDlg()
if ( m_bOwnRefHdlr ) return false;
if( EnterRefMode() )
{
- SetModal( FALSE );
+ SetModal( false );
return m_bOwnRefHdlr = true && EnterRefStatus();
}
return false;
}
-bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ )
+bool ScValidationDlg::RemoveRefDlg( sal_Bool bRestoreModal /* = sal_True */ )
{
bool bVisLock = false;
bool bFreeWindowLock = false;
@@ -953,7 +953,7 @@ bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ )
m_bOwnRefHdlr = false;
if( bRestoreModal )
- SetModal( TRUE );
+ SetModal( sal_True );
}
if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) )
@@ -979,14 +979,14 @@ void ScTPValidationValue::OnClick( Button *pBtn )
SetupRefDlg();
}
-BOOL ScValidationDlg::IsChildFocus()
+sal_Bool ScValidationDlg::IsChildFocus()
{
if ( const Window *pWin = Application::GetFocusWindow() )
while( NULL != ( pWin = pWin->GetParent() ) )
if( pWin == this )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/dbgui/validate.src b/sc/source/ui/dbgui/validate.src
index 0e1ea8403132..62e7f597ca25 100644
--- a/sc/source/ui/dbgui/validate.src
+++ b/sc/source/ui/dbgui/validate.src
@@ -66,6 +66,7 @@ TabDialog TAB_DLG_VALIDATION
TabPage TP_VALIDATION_VALUES
{
+ HelpID = "sc:TabPage:TP_VALIDATION_VALUES";
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
@@ -78,6 +79,7 @@ TabPage TP_VALIDATION_VALUES
};
ListBox LB_ALLOW
{
+ HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_ALLOW";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 14 ) ;
Size = MAP_APPFONT ( 90 , 80 ) ;
@@ -103,6 +105,7 @@ TabPage TP_VALIDATION_VALUES
};
ListBox LB_VALUE
{
+ HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 56 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -129,6 +132,7 @@ TabPage TP_VALIDATION_VALUES
};
Edit EDT_MIN
{
+ HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MIN";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
@@ -136,6 +140,7 @@ TabPage TP_VALIDATION_VALUES
};
MultiLineEdit EDT_LIST
{
+ HelpID = "sc:MultiLineEdit:TP_VALIDATION_VALUES:EDT_LIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
Size = MAP_APPFONT ( 174 + OFFSET_X , 105 ) ;
@@ -150,6 +155,7 @@ TabPage TP_VALIDATION_VALUES
};
Edit EDT_MAX
{
+ HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MAX";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 90 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
@@ -185,6 +191,7 @@ TabPage TP_VALIDATION_VALUES
};
ImageButton RB_VALIDITY_REF
{
+ HelpID = "sc:ImageButton:TP_VALIDATION_VALUES:RB_VALIDITY_REF";
Pos = MAP_APPFONT ( 142 , 73 ) ;
Size = MAP_APPFONT ( 13 , 14 ) ;
TabStop = TRUE ;
@@ -194,12 +201,14 @@ TabPage TP_VALIDATION_VALUES
TabPage TP_VALIDATION_INPUTHELP
{
+ HelpID = "sc:TabPage:TP_VALIDATION_INPUTHELP";
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
Text = "Eingabehilfe" ;
TriStateBox TSB_HELP
{
+ HelpID = "sc:TriStateBox:TP_VALIDATION_INPUTHELP:TSB_HELP";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -225,6 +234,7 @@ TabPage TP_VALIDATION_INPUTHELP
};
Edit EDT_TITLE
{
+ HelpID = "sc:Edit:TP_VALIDATION_INPUTHELP:EDT_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 33 ) ;
Size = MAP_APPFONT ( 171 , 12 ) ;
@@ -232,6 +242,7 @@ TabPage TP_VALIDATION_INPUTHELP
};
MultiLineEdit EDT_INPUTHELP
{
+ HelpID = "sc:MultiLineEdit:TP_VALIDATION_INPUTHELP:EDT_INPUTHELP";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 51 ) ;
Size = MAP_APPFONT ( 171 , 128 ) ;
@@ -243,6 +254,7 @@ TabPage TP_VALIDATION_INPUTHELP
TabPage TP_VALIDATION_ERROR
{
+ HelpID = "sc:TabPage:TP_VALIDATION_ERROR";
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
@@ -254,6 +266,7 @@ TabPage TP_VALIDATION_ERROR
};
TriStateBox TSB_SHOW
{
+ HelpID = "sc:TriStateBox:TP_VALIDATION_ERROR:TSB_SHOW";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -261,6 +274,7 @@ TabPage TP_VALIDATION_ERROR
};
MultiLineEdit EDT_ERROR
{
+ HelpID = "sc:MultiLineEdit:TP_VALIDATION_ERROR:EDT_ERROR";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 69 ) ;
Size = MAP_APPFONT ( 171 , 110 ) ;
@@ -270,6 +284,7 @@ TabPage TP_VALIDATION_ERROR
};
Edit EDT_TITLE
{
+ HelpID = "sc:Edit:TP_VALIDATION_ERROR:EDT_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 51 ) ;
Size = MAP_APPFONT ( 171 , 12 ) ;
@@ -295,6 +310,7 @@ TabPage TP_VALIDATION_ERROR
};
ListBox LB_ACTION
{
+ HelpID = "sc:ListBox:TP_VALIDATION_ERROR:LB_ACTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 33 ) ;
Size = MAP_APPFONT ( 107 , 76 ) ;
@@ -311,6 +327,7 @@ TabPage TP_VALIDATION_ERROR
};
PushButton BTN_SEARCH
{
+ HelpID = "sc:PushButton:TP_VALIDATION_ERROR:BTN_SEARCH";
Pos = MAP_APPFONT ( 191 , 32 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index ddef0eb95bc5..1d51186f0c7a 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -77,7 +77,7 @@ TYPEINIT1(ScAreaLink,::sfx2::SvBaseLink);
ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile,
const String& rFilter, const String& rOpt,
const String& rArea, const ScRange& rDest,
- ULONG nRefresh ) :
+ sal_uLong nRefresh ) :
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer ( nRefresh ),
pImpl ( new AreaLink_Impl() ),
@@ -86,9 +86,9 @@ ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile,
aOptions (rOpt),
aSourceArea (rArea),
aDestArea (rDest),
- bAddUndo (TRUE),
- bInCreate (FALSE),
- bDoInsert (TRUE)
+ bAddUndo (sal_True),
+ bInCreate (false),
+ bDoInsert (sal_True)
{
DBG_ASSERT(pShell->ISA(ScDocShell), "ScAreaLink mit falscher ObjectShell");
pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell );
@@ -159,19 +159,19 @@ void ScAreaLink::Closed()
// Verknuepfung loeschen: Undo
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if (bAddUndo && bUndo)
{
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveAreaLink( pImpl->m_pDocSh,
aFileName, aFilterName, aOptions,
aSourceArea, aDestArea, GetRefreshDelay() ) );
- bAddUndo = FALSE; // nur einmal
+ bAddUndo = false; // nur einmal
}
SCTAB nDestTab = aDestArea.aStart.Tab();
if (pDoc->IsStreamValid(nDestTab))
- pDoc->SetStreamValid(nDestTab, FALSE);
+ pDoc->SetStreamValid(nDestTab, false);
SvBaseLink::Closed();
}
@@ -195,7 +195,7 @@ void ScAreaLink::SetSource(const String& rDoc, const String& rFlt, const String&
SetName( aNewLinkName );
}
-BOOL ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const String& rOpt,
+sal_Bool ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const String& rOpt,
const String& rSource, const ScRange& rDest ) const
{
return aFileName == rFile && aFilterName == rFilter && aOptions == rOpt &&
@@ -203,11 +203,11 @@ BOOL ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const Stri
}
// find a range with name >rAreaName< in >pSrcDoc<, return it in >rRange<
-BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName )
+sal_Bool ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName )
{
bool bFound = false;
ScRangeName* pNames = pSrcDoc->GetRangeName();
- USHORT nPos;
+ sal_uInt16 nPos;
if (pNames) // benannte Bereiche
{
const ScRangeData* p = pNames->findByName(rAreaName);
@@ -239,25 +239,25 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin
// ausfuehren:
-BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
- const String& rNewArea, ULONG nNewRefresh )
+sal_Bool ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
+ const String& rNewArea, sal_uLong nNewRefresh )
{
// Dokument laden - wie TabLink
if (!rNewFile.Len() || !rNewFilter.Len())
- return FALSE;
+ return false;
String aNewUrl( ScGlobal::GetAbsDocName( rNewFile, pImpl->m_pDocSh ) );
- BOOL bNewUrlName = (aNewUrl != aFileName);
+ sal_Bool bNewUrlName = (aNewUrl != aFileName);
const SfxFilter* pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter);
if (!pFilter)
- return FALSE;
+ return false;
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
- pDoc->SetInLinkUpdate( TRUE );
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
+ pDoc->SetInLinkUpdate( sal_True );
// wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
if ( rNewFilter != aFilterName )
@@ -268,8 +268,9 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if ( aOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
- SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter);
+ SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, false, pFilter);
+ // aRef->DoClose() will be closed explicitly, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
SfxObjectShellRef aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
@@ -325,7 +326,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
}
//! check CanFitBlock only if bDoInsert is set?
- BOOL bCanDo = ValidColRow( aNewRange.aEnd.Col(), aNewRange.aEnd.Row() ) &&
+ sal_Bool bCanDo = ValidColRow( aNewRange.aEnd.Col(), aNewRange.aEnd.Row() ) &&
pDoc->CanFitBlock( aOldRange, aNewRange );
if (bCanDo)
{
@@ -351,16 +352,16 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
{
pUndoDoc->InitUndo( pDoc, 0, pDoc->GetTableCount()-1 );
pDoc->CopyToDocument( 0,0,0,MAXCOL,MAXROW,MAXTAB,
- IDF_FORMULA, FALSE, pUndoDoc ); // alle Formeln
+ IDF_FORMULA, false, pUndoDoc ); // alle Formeln
}
else
pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
- pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
}
else // ohne Einfuegen
{
pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
- pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
}
}
@@ -409,7 +410,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewTokenRange );
- pDoc->CopyFromClip( aNewTokenRange, aDestMark, IDF_ALL, NULL, &aClipDoc, FALSE );
+ pDoc->CopyFromClip( aNewTokenRange, aDestMark, IDF_ALL, NULL, &aClipDoc, false );
aNewTokenRange.aStart.SetRow( aNewTokenRange.aEnd.Row() + 2 );
}
}
@@ -426,7 +427,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
{
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nDestTab, nDestTab );
- pDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, false, pRedoDoc );
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoUpdateAreaLink( pImpl->m_pDocSh,
@@ -469,7 +470,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
}
else
{
- // CanFitBlock FALSE -> Probleme mit zusammengefassten Zellen
+ // CanFitBlock sal_False -> Probleme mit zusammengefassten Zellen
// oder Tabellengrenze erreicht!
//! Zellschutz ???
@@ -484,7 +485,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
aRef->DoClose();
- pDoc->SetInLinkUpdate( FALSE );
+ pDoc->SetInLinkUpdate( false );
if (bCanDo)
{
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index cc00106a4a2e..bfb7c8f3c9a1 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -42,26 +42,26 @@ struct ScAutoStyleInitData
{
ScRange aRange;
String aStyle1;
- ULONG nTimeout;
+ sal_uLong nTimeout;
String aStyle2;
- ScAutoStyleInitData( const ScRange& rR, const String& rSt1, ULONG nT, const String& rSt2 ) :
+ ScAutoStyleInitData( const ScRange& rR, const String& rSt1, sal_uLong nT, const String& rSt2 ) :
aRange(rR), aStyle1(rSt1), nTimeout(nT), aStyle2(rSt2) {}
};
struct ScAutoStyleData
{
- ULONG nTimeout;
+ sal_uLong nTimeout;
ScRange aRange;
String aStyle;
- ScAutoStyleData( ULONG nT, const ScRange& rR, const String& rT ) :
+ ScAutoStyleData( sal_uLong nT, const ScRange& rR, const String& rT ) :
nTimeout(nT), aRange(rR), aStyle(rT) {}
};
-inline ULONG TimeNow() // Sekunden
+inline sal_uLong TimeNow() // Sekunden
{
- return (ULONG) time(0);
+ return (sal_uLong) time(0);
}
ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell) :
@@ -79,7 +79,7 @@ ScAutoStyleList::~ScAutoStyleList()
// initial short delay (asynchronous call)
void ScAutoStyleList::AddInitial( const ScRange& rRange, const String& rStyle1,
- ULONG nTimeout, const String& rStyle2 )
+ sal_uLong nTimeout, const String& rStyle2 )
{
aInitials.push_back(new ScAutoStyleInitData( rRange, rStyle1, nTimeout, rStyle2 ));
aInitTimer.Start();
@@ -103,10 +103,10 @@ IMPL_LINK( ScAutoStyleList, InitHdl, Timer*, EMPTYARG )
return 0;
}
-void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const String& rStyle )
+void ScAutoStyleList::AddEntry( sal_uLong nTimeout, const ScRange& rRange, const String& rStyle )
{
aTimer.Stop();
- ULONG nNow = TimeNow();
+ sal_uLong nNow = TimeNow();
aEntries.erase(std::remove_if(aEntries.begin(),aEntries.end(),
boost::bind(&ScAutoStyleData::aRange,_1) == rRange));
@@ -131,7 +131,7 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str
StartTimer(nNow);
}
-void ScAutoStyleList::AdjustEntries( ULONG nDiff ) // Millisekunden
+void ScAutoStyleList::AdjustEntries( sal_uLong nDiff ) // Millisekunden
{
boost::ptr_vector<ScAutoStyleData>::iterator iter;
for (iter = aEntries.begin(); iter != aEntries.end(); ++iter)
@@ -171,7 +171,7 @@ void ScAutoStyleList::ExecuteAllNow()
aEntries.clear();
}
-void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden
+void ScAutoStyleList::StartTimer( sal_uLong nNow ) // Sekunden
{
// ersten Eintrag mit Timeout != 0 suchen
boost::ptr_vector<ScAutoStyleData>::iterator iter = std::find_if(aEntries.begin(),aEntries.end(),
@@ -188,7 +188,7 @@ void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden
IMPL_LINK( ScAutoStyleList, TimerHdl, Timer*, EMPTYARG )
{
- ULONG nNow = TimeNow();
+ sal_uLong nNow = TimeNow();
AdjustEntries(aTimer.GetTimeout()); // eingestellte Wartezeit
ExecuteEntries();
StartTimer(nNow);
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 96228b2256f3..7ff1efa3cb78 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -61,14 +61,14 @@
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, sal_Bool /* bApi */ )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDBCollection* pUndoColl = NULL;
if (bUndo)
@@ -81,19 +81,19 @@ BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL /
// #i55926# While loading XML, formula cells only have a single string token,
// so CompileDBFormula would never find any name (index) tokens, and would
// unnecessarily loop through all cells.
- BOOL bCompile = !pDoc->IsImportingXML();
+ sal_Bool bCompile = !pDoc->IsImportingXML();
if ( bCompile )
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- BOOL bOk = pDocColl->Insert( pNew );
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ sal_Bool bOk = pDocColl->Insert( pNew );
if ( bCompile )
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
if (!bOk)
{
delete pNew;
delete pUndoColl;
- return FALSE;
+ return false;
}
if (bUndo)
@@ -105,17 +105,17 @@ BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL /
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- return TRUE;
+ return sal_True;
}
-BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::DeleteDBRange( const String& rName, sal_Bool /* bApi */ )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pDocColl->SearchName( rName, nPos ))
{
ScDocShellModificator aModificator( rDocShell );
@@ -124,9 +124,9 @@ BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ )
if (bUndo)
pUndoColl = new ScDBCollection( *pDocColl );
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
pDocColl->AtFree( nPos );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
if (bUndo)
{
@@ -137,21 +137,21 @@ BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ )
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
-BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, sal_Bool /* bApi */ )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
- USHORT nPos = 0;
- USHORT nDummy = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nDummy = 0;
if ( pDocColl->SearchName( rOld, nPos ) &&
!pDocColl->SearchName( rNew, nDummy ) )
{
@@ -163,15 +163,15 @@ BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /*
ScDBCollection* pUndoColl = new ScDBCollection( *pDocColl );
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
pDocColl->AtFree( nPos );
- BOOL bInserted = pDocColl->Insert( pNewData );
+ sal_Bool bInserted = pDocColl->Insert( pNewData );
if (!bInserted) // Fehler -> alten Zustand wiederherstellen
{
delete pNewData;
pDoc->SetDBCollection( pUndoColl ); // gehoert dann dem Dokument
}
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
if (bInserted) // Einfuegen hat geklappt
{
@@ -186,21 +186,21 @@ BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /*
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- bDone = TRUE;
+ bDone = sal_True;
}
}
return bDone;
}
-BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, sal_Bool /* bApi */ )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pDocColl->SearchName( rNewData.GetName(), nPos ))
{
ScDocShellModificator aModificator( rDocShell );
@@ -210,7 +210,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
ScRange aOldRange, aNewRange;
pData->GetArea(aOldRange);
rNewData.GetArea(aNewRange);
- BOOL bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden
+ sal_Bool bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden
ScDBCollection* pUndoColl = NULL;
if (bUndo)
@@ -228,7 +228,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
}
aModificator.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
@@ -236,45 +236,45 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
+sal_Bool ScDBDocFunc::RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi )
{
//! auch fuer ScDBFunc::RepeatDB benutzen!
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBCollection* pColl = pDoc->GetDBCollection();
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( pColl && pColl->SearchName( rDBName, nIndex ) )
{
ScDBData* pDBData = (*pColl)[nIndex];
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
- BOOL bQuery = aQueryParam.GetEntry(0).bDoQuery;
+ sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery;
ScSortParam aSortParam;
pDBData->GetSortParam( aSortParam );
- BOOL bSort = aSortParam.bDoSort[0];
+ sal_Bool bSort = aSortParam.bDoSort[0];
ScSubTotalParam aSubTotalParam;
pDBData->GetSubTotalParam( aSubTotalParam );
- BOOL bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
+ sal_Bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
if ( bQuery || bSort || bSubTotal )
{
- BOOL bQuerySize = FALSE;
+ sal_Bool bQuerySize = false;
ScRange aOldQuery;
ScRange aNewQuery;
if (bQuery && !aQueryParam.bInplace)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest && pDest->IsDoSize())
{
pDest->GetArea( aOldQuery );
- bQuerySize = TRUE;
+ bQuerySize = sal_True;
}
}
@@ -307,22 +307,22 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0,
nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
pDoc->CopyToDocument( 0, static_cast<SCROW>(nOutStartRow),
nTab, MAXCOL, static_cast<SCROW>(nOutEndRow), nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
// Datenbereich sichern - incl. Filter-Ergebnis
- pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
- pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -337,23 +337,23 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
{
// Sortieren ohne SubTotals
- aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt
- DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi );
+ aSubTotalParam.bRemoveOnly = sal_True; // wird unten wieder zurueckgesetzt
+ DoSubTotals( nTab, aSubTotalParam, NULL, false, bApi );
}
if (bSort)
{
pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben
- Sort( nTab, aSortParam, FALSE, FALSE, bApi );
+ Sort( nTab, aSortParam, false, false, bApi );
}
if (bQuery)
{
pDBData->GetQueryParam( aQueryParam ); // Bereich kann sich geaendert haben
ScRange aAdvSource;
if (pDBData->GetAdvancedQuerySource(aAdvSource))
- Query( nTab, aQueryParam, &aAdvSource, FALSE, bApi );
+ Query( nTab, aQueryParam, &aAdvSource, false, bApi );
else
- Query( nTab, aQueryParam, NULL, FALSE, bApi );
+ Query( nTab, aQueryParam, NULL, false, bApi );
// bei nicht-inplace kann die Tabelle umgestellt worden sein
// if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
@@ -362,8 +362,8 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
if (bSubTotal)
{
pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben
- aSubTotalParam.bRemoveOnly = FALSE;
- DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi );
+ aSubTotalParam.bRemoveOnly = false;
+ DoSubTotals( nTab, aSubTotalParam, NULL, false, bApi );
}
if (bRecord)
@@ -379,7 +379,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
if (bQuerySize)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest)
{
pDest->GetArea( aNewQuery );
@@ -401,7 +401,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
- bDone = TRUE;
+ bDone = sal_True;
}
else if (!bApi) // "Keine Operationen auszufuehren"
rDocShell.ErrorMessage(STR_MSSG_REPEATDB_0);
@@ -412,14 +412,14 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
- BOOL bRecord, BOOL bPaint, BOOL bApi )
+sal_Bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nSrcTab = nTab;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
@@ -428,15 +428,15 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if (!pDBData)
{
OSL_FAIL( "Sort: keine DBData" );
- return FALSE;
+ return false;
}
ScDBData* pDestData = NULL;
ScRange aOldDest;
- BOOL bCopy = !rSortParam.bInplace;
+ sal_Bool bCopy = !rSortParam.bInplace;
if ( bCopy && rSortParam.nDestCol == rSortParam.nCol1 &&
rSortParam.nDestRow == rSortParam.nRow1 && rSortParam.nDestTab == nTab )
- bCopy = FALSE;
+ bCopy = false;
ScSortParam aLocalParam( rSortParam );
if ( bCopy )
{
@@ -445,12 +445,12 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
nTab = rSortParam.nDestTab;
pDestData = pDoc->GetDBAtCursor( rSortParam.nDestCol, rSortParam.nDestRow,
- rSortParam.nDestTab, TRUE );
+ rSortParam.nDestTab, sal_True );
if (pDestData)
pDestData->GetArea(aOldDest);
}
@@ -461,7 +461,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if ( aLocalParam.bIncludePattern && pDoc->HasAttrib(
@@ -472,7 +472,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
// Merge-Attribute wuerden beim Sortieren durcheinanderkommen
if (!bApi)
rDocShell.ErrorMessage(STR_SORT_ERR_MERGED);
- return FALSE;
+ return false;
}
@@ -480,11 +480,11 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bRepeatQuery = FALSE; // bestehenden Filter wiederholen?
+ sal_Bool bRepeatQuery = false; // bestehenden Filter wiederholen?
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
if ( aQueryParam.GetEntry(0).bDoQuery )
- bRepeatQuery = TRUE;
+ bRepeatQuery = sal_True;
if (bRepeatQuery && bCopy)
{
@@ -492,7 +492,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
aQueryParam.nDestCol != rSortParam.nDestCol ||
aQueryParam.nDestRow != rSortParam.nDestRow ||
aQueryParam.nDestTab != rSortParam.nDestTab ) // Query auf selben Zielbereich?
- bRepeatQuery = FALSE;
+ bRepeatQuery = false;
}
ScUndoSort* pUndoAction = 0;
@@ -503,7 +503,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
// Zeilenhoehen immer (wegen automatischer Anpassung)
//! auf ScBlockUndo umstellen
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
/* #i59745# Do not copy note captions to undo document. All existing
caption objects will be repositioned while sorting which is tracked
@@ -512,7 +512,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
existing captions) will be copied back into the source document. */
pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nTab,
aLocalParam.nCol2, aLocalParam.nRow2, nTab,
- IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
const ScRange* pR = 0;
if (pDestData)
@@ -523,7 +523,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
caption objects are reinserted with drawing undo, and the cells
with the old notes (which still refer to the existing captions)
will be copied back into the source document. */
- pDoc->CopyToDocument( aOldDest, IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aOldDest, IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
pR = &aOldDest;
}
@@ -531,7 +531,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
//! auf ScBlockUndo umstellen
// if (bRepeatQuery)
pDoc->CopyToDocument( 0, aLocalParam.nRow1, nTab, MAXCOL, aLocalParam.nRow2, nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
ScDBCollection* pUndoDB = NULL;
ScDBCollection* pDocDB = pDoc->GetDBCollection();
@@ -555,21 +555,21 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
rSortParam.nCol2,rSortParam.nRow2,nSrcTab );
ScAddress aDest( rSortParam.nDestCol, rSortParam.nDestRow, rSortParam.nDestTab );
- rDocShell.GetDocFunc().MoveBlock( aSource, aDest, FALSE, FALSE, FALSE, TRUE );
+ rDocShell.GetDocFunc().MoveBlock( aSource, aDest, false, false, false, sal_True );
}
// don't call ScDocument::Sort with an empty SortParam (may be empty here if bCopy is set)
if ( aLocalParam.bDoSort[0] )
pDoc->Sort( nTab, aLocalParam, bRepeatQuery );
- BOOL bSave = TRUE;
+ sal_Bool bSave = sal_True;
if (bCopy)
{
ScSortParam aOldSortParam;
pDBData->GetSortParam( aOldSortParam );
if ( aOldSortParam.bDoSort[0] && aOldSortParam.bInplace ) // Inplace-Sortierung gemerkt?
{
- bSave = FALSE;
+ bSave = false;
aOldSortParam.nDestCol = rSortParam.nDestCol;
aOldSortParam.nDestRow = rSortParam.nDestRow;
aOldSortParam.nDestTab = rSortParam.nDestTab;
@@ -616,7 +616,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if (bPaint)
{
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
SCCOL nStartX = aLocalParam.nCol1;
SCROW nStartY = aLocalParam.nRow1;
SCCOL nEndX = aLocalParam.nCol2;
@@ -646,25 +646,25 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
- const ScRange* pAdvSource, BOOL bRecord, BOOL bApi )
+sal_Bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
+ const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rQueryParam.nCol1, rQueryParam.nRow1,
rQueryParam.nCol2, rQueryParam.nRow2 );
if (!pDBData)
{
OSL_FAIL( "Query: keine DBData" );
- return FALSE;
+ return false;
}
// Wechsel von Inplace auf nicht-Inplace, dann erst Inplace aufheben:
@@ -680,23 +680,23 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
SCSIZE nEC = aOldQuery.GetEntryCount();
for (SCSIZE i=0; i<nEC; i++)
- aOldQuery.GetEntry(i).bDoQuery = FALSE;
- aOldQuery.bDuplicate = TRUE;
+ aOldQuery.GetEntry(i).bDoQuery = false;
+ aOldQuery.bDuplicate = sal_True;
Query( nTab, aOldQuery, NULL, bRecord, bApi );
}
}
ScQueryParam aLocalParam( rQueryParam ); // fuer Paint / Zielbereich
- BOOL bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query
+ sal_Bool bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query
ScDBData* pDestData = NULL; // Bereich, in den kopiert wird
- BOOL bDoSize = FALSE; // Zielgroesse anpassen (einf./loeschen)
+ sal_Bool bDoSize = false; // Zielgroesse anpassen (einf./loeschen)
SCCOL nFormulaCols = 0; // nur bei bDoSize
- BOOL bKeepFmt = FALSE;
+ sal_Bool bKeepFmt = false;
ScRange aOldDest;
ScRange aDestTotal;
if ( bCopy && rQueryParam.nDestCol == rQueryParam.nCol1 &&
rQueryParam.nDestRow == rQueryParam.nRow1 && rQueryParam.nDestTab == nTab )
- bCopy = FALSE;
+ bCopy = false;
SCTAB nDestTab = nTab;
if ( bCopy )
{
@@ -706,7 +706,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
ScEditableTester aTester( pDoc, nDestTab, aLocalParam.nCol1,aLocalParam.nRow1,
@@ -715,11 +715,11 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
pDestData = pDoc->GetDBAtCursor( rQueryParam.nDestCol, rQueryParam.nDestRow,
- rQueryParam.nDestTab, TRUE );
+ rQueryParam.nDestTab, sal_True );
if (pDestData)
{
pDestData->GetArea( aOldDest );
@@ -747,7 +747,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_DOSUBTOTALS_2); // kann keine Zeilen einfuegen
- return FALSE;
+ return false;
}
}
}
@@ -756,14 +756,14 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bKeepSub = FALSE; // bestehende Teilergebnisse wiederholen?
+ sal_Bool bKeepSub = false; // bestehende Teilergebnisse wiederholen?
ScSubTotalParam aSubTotalParam;
if (rQueryParam.GetEntry(0).bDoQuery) // nicht beim Aufheben
{
pDBData->GetSubTotalParam( aSubTotalParam ); // Teilergebnisse vorhanden?
if ( aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly )
- bKeepSub = TRUE;
+ bKeepSub = sal_True;
}
ScDocument* pUndoDoc = NULL;
@@ -775,23 +775,23 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bCopy)
{
- pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab, false, sal_True );
pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// Attribute sichern, falls beim Filtern mitkopiert
if (pDestData)
{
- pDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
pOld = &aOldDest;
}
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
pDoc->CopyToDocument( 0, rQueryParam.nRow1, nTab, MAXCOL, rQueryParam.nRow2, nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
}
ScDBCollection* pDocDB = pDoc->GetDBCollection();
@@ -818,8 +818,8 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
aAttribRange.aEnd.SetCol( aAttribRange.aEnd.Col() + nFormulaCols );
pAttribDoc = new ScDocument( SCDOCMODE_UNDO );
- pAttribDoc->InitUndo( pDoc, nDestTab, nDestTab, FALSE, TRUE );
- pDoc->CopyToDocument( aAttribRange, IDF_ATTRIB, FALSE, pAttribDoc );
+ pAttribDoc->InitUndo( pDoc, nDestTab, nDestTab, false, sal_True );
+ pDoc->CopyToDocument( aAttribRange, IDF_ATTRIB, false, pAttribDoc );
}
if ( bDoSize )
@@ -843,7 +843,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
ScRange aNewDest( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab );
- pDoc->FitBlock( aDestTotal, aNewDest, FALSE ); // FALSE - nicht loeschen
+ pDoc->FitBlock( aDestTotal, aNewDest, false ); // sal_False - nicht loeschen
if ( nFormulaCols > 0 )
{
@@ -854,7 +854,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
aLocalParam.nCol2+nFormulaCols, aLocalParam.nRow2, nDestTab );
ScRange aOldForm = aNewForm;
aOldForm.aEnd.SetRow( aOldDest.aEnd.Row() );
- pDoc->FitBlock( aOldForm, aNewForm, FALSE );
+ pDoc->FitBlock( aOldForm, aNewForm, false );
ScMarkData aMark;
aMark.SelectOneTable(nDestTab);
@@ -873,7 +873,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
ScRange aHdrRange = aAttribRange;
aHdrRange.aEnd.SetRow( aHdrRange.aStart.Row() );
- pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, FALSE, pDoc );
+ pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, false, pDoc );
}
// Daten
@@ -902,7 +902,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
// speichern: Inplace immer, sonst je nach Einstellung
// alter Inplace-Filter ist ggf. schon aufgehoben
- BOOL bSave = rQueryParam.bInplace || rQueryParam.bDestPers;
+ sal_Bool bSave = rQueryParam.bInplace || rQueryParam.bDestPers;
if (bSave) // merken
{
pDBData->SetQueryParam( rQueryParam );
@@ -979,31 +979,31 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
PAINT_GRID | PAINT_LEFT );
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
- const ScSortParam* pForceNewSort, BOOL bRecord, BOOL bApi )
+sal_Bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
+ const ScSortParam* pForceNewSort, sal_Bool bRecord, sal_Bool bApi )
{
//! auch fuer ScDBFunc::DoSubTotals benutzen!
// dann bleibt aussen:
// - neuen Bereich (aus DBData) markieren
// - SelectionChanged (?)
- BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen
- BOOL bRet = FALSE;
+ sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen
+ sal_Bool bRet = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1,
rParam.nCol2, rParam.nRow2 );
if (!pDBData)
{
OSL_FAIL( "SubTotals: keine DBData" );
- return FALSE;
+ return false;
}
ScEditableTester aTester( pDoc, nTab, 0,rParam.nRow1+1, MAXCOL,MAXROW );
@@ -1011,7 +1011,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if (pDoc->HasAttrib( rParam.nCol1, rParam.nRow1+1, nTab,
@@ -1019,10 +1019,10 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen
- return FALSE;
+ return false;
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = true;
if (rParam.bReplace)
if (pDoc->TestRemoveSubTotals( nTab, rParam ))
{
@@ -1046,7 +1046,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
if (bRecord) // alte Daten sichern
{
- BOOL bOldFilter = bDo && rParam.bDoSort;
+ sal_Bool bOldFilter = bDo && rParam.bDoSort;
SCTAB nTabCount = pDoc->GetTableCount();
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1061,20 +1061,20 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, bOldFilter );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, bOldFilter );
// Datenbereich sichern - incl. Filter-Ergebnis
pDoc->CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -1092,7 +1092,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
if (rParam.bReplace)
pDoc->RemoveSubTotals( nTab, aNewParam );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if (bDo)
{
// Sortieren
@@ -1106,7 +1106,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
ScSortParam aOldSort;
pDBData->GetSortParam( aOldSort );
ScSortParam aSortParam( aNewParam, pForceNewSort ? *pForceNewSort : aOldSort );
- Sort( nTab, aSortParam, FALSE, FALSE, bApi );
+ Sort( nTab, aSortParam, false, false, bApi );
}
pDoc->InitializeNoteCaptions(nTab);
@@ -1150,7 +1150,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
//==================================================================
-BOOL lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rExcept )
+sal_Bool lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rExcept )
{
ScCellIterator aIter( pDoc, rRange );
ScBaseCell* pCell = aIter.GetFirst();
@@ -1159,23 +1159,23 @@ BOOL lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rE
if ( !pCell->IsBlank() ) // real content?
{
if ( !rExcept.In( ScAddress( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ) ) )
- return FALSE; // cell found
+ return false; // cell found
}
pCell = aIter.GetNext();
}
- return TRUE; // nothing found - empty
+ return sal_True; // nothing found - empty
}
-BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
- BOOL bRecord, BOOL bApi, BOOL bAllowMove )
+sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
+ sal_Bool bRecord, sal_Bool bApi, sal_Bool bAllowMove )
{
ScDocShellModificator aModificator( rDocShell );
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bDone = FALSE;
- BOOL bUndoSelf = FALSE;
- USHORT nErrId = 0;
+ sal_Bool bDone = false;
+ sal_Bool bUndoSelf = false;
+ sal_uInt16 nErrId = 0;
ScDocument* pOldUndoDoc = NULL;
ScDocument* pNewUndoDoc = NULL;
@@ -1185,7 +1185,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( !rDocShell.IsEditable() || pDoc->GetChangeTrack() )
{
// not recorded -> disallow
@@ -1226,7 +1226,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
{
pOldUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pOldUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pOldUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL, false, pOldUndoDoc );
}
pDoc->DeleteAreaTab( aRange.aStart.Col(), aRange.aStart.Row(),
@@ -1242,7 +1242,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
rDocShell.PostPaint( aRange.aStart.Col(), aRange.aStart.Row(), nTab,
aRange.aEnd.Col(), aRange.aEnd.Row(), nTab,
PAINT_GRID );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( pNewObj )
{
@@ -1254,7 +1254,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
SCTAB nTab = aRange.aStart.Tab();
pOldUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pOldUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pOldUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL, false, pOldUndoDoc );
}
if ( pNewObj == pOldObj )
@@ -1286,7 +1286,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
if ( pDoc->GetDPCollection()->GetByName(pDestObj->GetName()) )
pDestObj->SetName( String() ); // ignore the invalid name, create a new name below
- pDestObj->SetAlive(TRUE);
+ pDestObj->SetAlive(sal_True);
if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) )
{
OSL_FAIL("cannot insert DPObject");
@@ -1321,7 +1321,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
aNewOut.aStart.SetRow( aOldRange.aStart.Row() );
aNewOut.aEnd.SetRow( aNewOut.aEnd.Row()+nDiff );
if( !ValidRow( aNewOut.aStart.Row() ) || !ValidRow( aNewOut.aEnd.Row() ) )
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
@@ -1329,7 +1329,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
{
// like with STR_PROTECTIONERR, use undo to reverse everything
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
- bUndoSelf = TRUE;
+ bUndoSelf = sal_True;
nErrId = STR_PIVOT_ERROR;
}
else
@@ -1343,7 +1343,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
// quick solution: proceed to end, use undo action
// to reverse everything:
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
- bUndoSelf = TRUE;
+ bUndoSelf = sal_True;
nErrId = aTester.GetMessageId();
}
}
@@ -1351,7 +1351,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
// test if new output area is empty except for old area
if ( !bApi )
{
- BOOL bEmpty;
+ sal_Bool bEmpty;
if ( pOldObj ) // OutRange of pOldObj (pDestObj) is still old area
bEmpty = lcl_EmptyExcept( pDoc, aNewOut, pOldObj->GetOutRange() );
else
@@ -1367,7 +1367,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
{
//! like above (not editable), use undo to reverse everything
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
- bUndoSelf = TRUE;
+ bUndoSelf = sal_True;
}
}
}
@@ -1377,13 +1377,13 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
SCTAB nTab = aNewOut.aStart.Tab();
pNewUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pNewUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( aNewOut, IDF_ALL, FALSE, pNewUndoDoc );
+ pDoc->CopyToDocument( aNewOut, IDF_ALL, false, pNewUndoDoc );
}
pDestObj->Output( aNewOut.aStart );
rDocShell.PostPaintGridAll(); //! only necessary parts
- bDone = TRUE;
+ bDone = sal_True;
}
}
// else nothing (no old, no new)
@@ -1404,7 +1404,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
pAction->Undo();
delete pAction;
- bDone = FALSE;
+ bDone = false;
}
else
rDocShell.GetUndoManager()->AddUndoAction( pAction );
@@ -1433,8 +1433,8 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
// Datenbank-Import...
void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
- const String& rTableName, const String& rStatement, BOOL bNative,
- BYTE nType, const ::com::sun::star::uno::Reference<
+ const String& rTableName, const String& rStatement, sal_Bool bNative,
+ sal_uInt8 nType, const ::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet >& xResultSet,
const SbaSelectionList* pSelection )
{
@@ -1444,13 +1444,13 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
ScDBCollection& rDBColl = *pDoc->GetDBCollection();
ScDBData* pData = NULL;
ScImportParam aImportParam;
- BOOL bFound = FALSE;
- USHORT nCount = rDBColl.GetCount();
- for (USHORT i=0; i<nCount && !bFound; i++)
+ sal_Bool bFound = false;
+ sal_uInt16 nCount = rDBColl.GetCount();
+ for (sal_uInt16 i=0; i<nCount && !bFound; i++)
{
pData = rDBColl[i];
if (pData->GetName() == rTarget)
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
{
@@ -1466,15 +1466,15 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
pData->GetImportParam( aImportParam );
- BOOL bSql = ( rStatement.Len() != 0 );
+ sal_Bool bSql = ( rStatement.Len() != 0 );
aImportParam.aDBName = rDBName;
aImportParam.bSql = bSql;
aImportParam.aStatement = bSql ? rStatement : rTableName;
aImportParam.bNative = bNative;
aImportParam.nType = nType;
- aImportParam.bImport = TRUE;
- BOOL bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, TRUE );
+ aImportParam.bImport = sal_True;
+ sal_Bool bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, sal_True );
// DB-Operationen wiederholen
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 92c411ea5638..fb5951338e37 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -119,15 +119,15 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
+sal_Bool ScDBDocFunc::DoImportUno( const ScAddress& rPos,
const uno::Sequence<beans::PropertyValue>& aArgs )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScImportParam aImParam;
aImParam.nCol1 = aImParam.nCol2 = rPos.Col();
aImParam.nRow1 = aImParam.nRow2 = rPos.Row();
- aImParam.bImport = TRUE;
+ aImParam.bImport = sal_True;
uno::Reference<sdbc::XResultSet> xResSet;
uno::Sequence<uno::Any> aSelection;
@@ -157,7 +157,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
if ( rProp.Value >>= nType )
{
aImParam.bSql = ( nType == sdb::CommandType::COMMAND );
- aImParam.nType = sal::static_int_cast<BYTE>( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable );
+ aImParam.nType = sal::static_int_cast<sal_uInt8>( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable );
// nType is ignored if bSql is set
}
}
@@ -180,10 +180,10 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
aList.Insert( (void*)(sal_IntPtr)nEntry, LIST_APPEND );
}
- BOOL bAddrInsert = FALSE; //!???
+ sal_Bool bAddrInsert = false; //!???
if ( bAddrInsert )
{
- bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, TRUE, bAddrInsert );
+ bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, sal_True, bAddrInsert );
}
else
{
@@ -204,7 +204,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
UpdateImport( sTarget, aImParam.aDBName, aTableName, aStatement,
aImParam.bNative, aImParam.nType, xResSet, &aList );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
@@ -212,16 +212,16 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
+sal_Bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
const uno::Reference< sdbc::XResultSet >& xResultSet,
- const SbaSelectionList* pSelection, BOOL bRecord, BOOL bAddrInsert )
+ const SbaSelectionList* pSelection, sal_Bool bRecord, sal_Bool bAddrInsert )
{
ScDocument* pDoc = rDocShell.GetDocument();
ScChangeTrack *pChangeTrack = NULL;
ScRange aChangedRange;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = 0;
if ( !bAddrInsert )
@@ -231,7 +231,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (!pDBData)
{
OSL_FAIL( "DoImport: no DBData" );
- return FALSE;
+ return false;
}
}
@@ -240,10 +240,10 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pWaitWin->EnterWait();
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
- BOOL bApi = FALSE; //! pass as argument
- BOOL bTruncated = FALSE; // for warning
- USHORT nErrStringId = 0;
+ sal_Bool bSuccess = false;
+ sal_Bool bApi = false; //! pass as argument
+ sal_Bool bTruncated = false; // for warning
+ sal_uInt16 nErrStringId = 0;
String aErrorMessage;
SCCOL nCol = rParam.nCol1;
@@ -252,16 +252,16 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
SCROW nEndRow = nRow;
long i;
- BOOL bDoSelection = FALSE;
- BOOL bRealSelection = FALSE; // TRUE if not everything is selected
- ULONG nListPos = 0;
- ULONG nRowsRead = 0;
- ULONG nListCount = 0;
+ sal_Bool bDoSelection = false;
+ sal_Bool bRealSelection = false; // sal_True if not everything is selected
+ sal_uLong nListPos = 0;
+ sal_uLong nRowsRead = 0;
+ sal_uLong nListCount = 0;
// -1 is special
if ( pSelection && pSelection->Count() && (long)pSelection->GetObject(0) != -1L )
{
- bDoSelection = TRUE;
+ bDoSelection = sal_True;
nListCount = pSelection->Count();
}
@@ -282,7 +282,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
uno::Reference<sdbc::XRowSet> xRowSet = uno::Reference<sdbc::XRowSet>(
xResultSet, uno::UNO_QUERY );
- sal_Bool bDispose = sal_False;
+ sal_Bool bDispose = false;
if ( !xRowSet.is() )
{
bDispose = sal_True;
@@ -375,32 +375,32 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
++nRow;
}
- BOOL bEnd = FALSE;
+ sal_Bool bEnd = false;
if ( !bDoSelection )
xRowSet->beforeFirst();
- USHORT nInserted = 0;
+ sal_uInt16 nInserted = 0;
while ( !bEnd )
{
// skip rows that are not selected
if ( !bDoSelection )
{
- if ( (bEnd = !xRowSet->next()) == FALSE )
+ if ( (bEnd = !xRowSet->next()) == false )
++nRowsRead;
}
else
{
if (nListPos < nListCount)
{
- ULONG nNextRow = (ULONG) pSelection->GetObject(nListPos);
+ sal_uLong nNextRow = (sal_uLong) pSelection->GetObject(nListPos);
if ( nRowsRead+1 < nNextRow )
- bRealSelection = TRUE;
+ bRealSelection = sal_True;
bEnd = !xRowSet->absolute(nRowsRead = nNextRow);
++nListPos;
}
else
{
bRealSelection = xRowSet->next();
- bEnd = TRUE; // more data available but not used
+ bEnd = sal_True; // more data available but not used
}
}
@@ -430,21 +430,21 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (!aProgress.SetStateText( 0, aText )) // stopped by user?
{
- bEnd = TRUE;
- bSuccess = FALSE;
+ bEnd = sal_True;
+ bSuccess = false;
nErrStringId = STR_DATABASE_ABORTED;
}
}
}
else // past the end of the spreadsheet
{
- bEnd = TRUE; // don't continue
- bTruncated = TRUE; // warning flag
+ bEnd = sal_True; // don't continue
+ bTruncated = sal_True; // warning flag
}
}
}
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
if ( bDispose )
@@ -466,8 +466,8 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// test for cell protection
//
- BOOL bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt();
- BOOL bMoveCells = !bAddrInsert && pDBData->IsDoSize();
+ sal_Bool bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt();
+ sal_Bool bMoveCells = !bAddrInsert && pDBData->IsDoSize();
SCCOL nFormulaCols = 0; // columns to be filled with formulas
if (bMoveCells && nEndCol == rParam.nCol2)
{
@@ -490,7 +490,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( !aTester.IsEditable() )
{
nErrStringId = aTester.GetMessageId();
- bSuccess = FALSE;
+ bSuccess = false;
}
else if ( (pChangeTrack = pDoc->GetChangeTrack()) != NULL )
aChangedRange = ScRange(rParam.nCol1, rParam.nRow1, nTab,
@@ -506,7 +506,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (!pDoc->CanFitBlock( aOld, aNew ))
{
nErrStringId = STR_MSSG_DOSUBTOTALS_2; // can't insert cells
- bSuccess = FALSE;
+ bSuccess = false;
}
}
@@ -526,7 +526,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, IDF_ATTRIB );
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nMinEndCol, rParam.nRow1, nTab,
- IDF_ATTRIB, FALSE, pImportDoc );
+ IDF_ATTRIB, false, pImportDoc );
SCROW nDataStartRow = rParam.nRow1+1;
for (SCCOL nCopyCol=rParam.nCol1; nCopyCol<=nMinEndCol; nCopyCol++)
@@ -546,7 +546,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (pDoc->IsTabProtected(nTab))
{
ScPatternAttr aPattern(pImportDoc->GetPool());
- aPattern.GetItemSet().Put( ScProtectionAttr( FALSE,FALSE,FALSE,FALSE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( false,false,false,false ) );
pImportDoc->ApplyPatternAreaTab( 0,0,MAXCOL,MAXROW, nTab, aPattern );
}
@@ -579,15 +579,15 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// nFormulaCols is set only if column count is unchanged
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- nCopyFlags, FALSE, pUndoDoc );
+ nCopyFlags, false, pUndoDoc );
if ( rParam.nCol2 > nEndCol )
pDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab,
nUndoEndCol, nUndoEndRow, nTab,
- nCopyFlags, FALSE, pUndoDoc );
+ nCopyFlags, false, pUndoDoc );
if ( rParam.nRow2 > nEndRow )
pDoc->CopyToDocument( rParam.nCol1, nEndRow+1, nTab,
nUndoEndCol+nFormulaCols, nUndoEndRow, nTab,
- nCopyFlags, FALSE, pUndoDoc );
+ nCopyFlags, false, pUndoDoc );
}
//
@@ -607,7 +607,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
rParam.nCol2+nFormulaCols, rParam.nRow2, nTab );
ScRange aNew( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab );
- pDoc->FitBlock( aOld, aNew, FALSE ); // Formeln nicht loeschen
+ pDoc->FitBlock( aOld, aNew, false ); // Formeln nicht loeschen
}
else if ( nEndCol < rParam.nCol2 ) // DeleteArea calls PutInOrder
pDoc->DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2,
@@ -617,12 +617,12 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pDoc->DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS & ~IDF_NOTE );
// remove each column from ImportDoc after copying to reduce memory usage
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // outside of the loop
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // outside of the loop
for (SCCOL nCopyCol = rParam.nCol1; nCopyCol <= nEndCol; nCopyCol++)
{
pImportDoc->CopyToDocument( nCopyCol, rParam.nRow1, nTab, nCopyCol, nEndRow, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
pImportDoc->DeleteAreaTab( nCopyCol, rParam.nRow1, nCopyCol, nEndRow, nTab, IDF_CONTENTS );
pImportDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 );
}
@@ -633,7 +633,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bKeepFormat) // formats for formulas
pImportDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ATTRIB, FALSE, pDoc );
+ IDF_ATTRIB, false, pDoc );
// fill formulas
ScMarkData aMark;
aMark.SelectOneTable(nTab);
@@ -656,8 +656,8 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if( !bAddrInsert ) // update database range
{
pDBData->SetImportParam( rParam );
- pDBData->SetHeader( TRUE );
- pDBData->SetByRow( TRUE );
+ pDBData->SetHeader( sal_True );
+ pDBData->SetByRow( sal_True );
pDBData->SetArea( nTab, rParam.nCol1,rParam.nRow1, nEndCol,nEndRow );
pDBData->SetImportSelection( bRealSelection );
pDoc->CompileDBFormula();
@@ -671,7 +671,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (nFormulaCols > 0) // include filled formulas for redo
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc );
+ IDF_ALL & ~IDF_NOTE, false, pRedoDoc );
ScDBData* pRedoDBData = pDBData ? new ScDBData( *pDBData ) : NULL;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 5ad00f2a8f55..ac589ccba498 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -131,7 +131,7 @@ IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction )
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
return 0;
}
@@ -153,17 +153,17 @@ void lcl_PaintAbove( ScDocShell& rDocShell, const ScRange& rRange )
//------------------------------------------------------------------------
-BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint )
+sal_Bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint )
{
ScDocument* pDoc = rDocShell.GetDocument();
if ( pDoc->IsImportingXML() )
{
// for XML import, all row heights are updated together after importing
- return FALSE;
+ return false;
}
if ( !pDoc->IsAdjustHeightEnabled() )
{
- return FALSE;
+ return false;
}
SCTAB nTab = rRange.aStart.Tab();
@@ -173,8 +173,8 @@ BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint )
ScSizeDeviceProvider aProv( &rDocShell );
Fraction aOne(1,1);
- BOOL bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
- aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, FALSE );
+ sal_Bool bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
+ aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, false );
if ( bPaint && bChanged )
rDocShell.PostPaint( 0, nStartRow, nTab, MAXCOL, MAXROW, nTab,
@@ -186,13 +186,13 @@ BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint )
//------------------------------------------------------------------------
-BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -200,7 +200,7 @@ BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -224,14 +224,14 @@ BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
@@ -241,7 +241,7 @@ BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -265,14 +265,14 @@ BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -280,7 +280,7 @@ BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -304,14 +304,14 @@ BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
@@ -321,7 +321,7 @@ BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -345,14 +345,14 @@ BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -360,7 +360,7 @@ BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -384,14 +384,14 @@ BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
+sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
Window* pWaitWin = rDocShell.GetActiveDialogParent();
@@ -399,8 +399,8 @@ BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
pWaitWin->EnterWait();
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bOverflow;
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow );
+ sal_Bool bOverflow;
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -426,20 +426,20 @@ BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
return bDone;
}
-BOOL ScDocFunc::DetectiveDelAll(SCTAB nTab)
+sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab)
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -468,12 +468,12 @@ BOOL ScDocFunc::DetectiveDelAll(SCTAB nTab)
return bDone;
}
-BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
+sal_Bool ScDocFunc::DetectiveRefresh( sal_Bool bAutomatic )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDetOpList* pList = pDoc->GetDetOpList();
if ( pList && pList->Count() )
{
@@ -490,8 +490,8 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
// Wiederholen
- USHORT nCount = pList->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pList->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScDetOpData* pData = (*pList)[i];
if (pData)
@@ -536,7 +536,7 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
}
}
rDocShell.SetDrawModified();
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
@@ -582,38 +582,38 @@ void ScDocFunc::DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, vector<S
//------------------------------------------------------------------------
-BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
{
OSL_FAIL("ScDocFunc::DeleteContents ohne Markierung");
- return FALSE;
+ return false;
}
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScRange aMarkRange;
- BOOL bSimple = FALSE;
+ sal_Bool bSimple = false;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // fuer MarkToMulti
+ aMultiMark.SetMarking(false); // fuer MarkToMulti
ScDocument* pUndoDoc = NULL;
- BOOL bMulti = !bSimple && aMultiMark.IsMultiMarked();
+ sal_Bool bMulti = !bSimple && aMultiMark.IsMultiMarked();
if (!bSimple)
{
aMultiMark.MarkToMulti();
@@ -622,22 +622,22 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
ScRange aExtendedRange(aMarkRange);
if (!bSimple)
{
- if ( pDoc->ExtendMerge( aExtendedRange, TRUE ) )
- bMulti = FALSE;
+ if ( pDoc->ExtendMerge( aExtendedRange, sal_True ) )
+ bMulti = false;
}
// keine Objekte auf geschuetzten Tabellen
- BOOL bObjects = FALSE;
+ sal_Bool bObjects = false;
if ( nFlags & IDF_OBJECTS )
{
- bObjects = TRUE;
+ bObjects = sal_True;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aMultiMark.GetTableSelect(nTab) && pDoc->IsTabProtected(nTab))
- bObjects = FALSE;
+ bObjects = false;
}
- USHORT nExtFlags = 0; // extra flags are needed only if attributes are deleted
+ sal_uInt16 nExtFlags = 0; // extra flags are needed only if attributes are deleted
if ( nFlags & IDF_ATTRIB )
rDocShell.UpdatePaintExt( nExtFlags, aMarkRange );
@@ -668,7 +668,7 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
// bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument
// nur mit IDF_HARDATTR zu langsam ist:
- USHORT nUndoDocFlags = nFlags;
+ sal_uInt16 nUndoDocFlags = nFlags;
if (nFlags & IDF_ATTRIB)
nUndoDocFlags |= IDF_ATTRIB;
if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
@@ -703,31 +703,31 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScRange aMarkRange;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // for MarkToMulti
+ aMultiMark.SetMarking(false); // for MarkToMulti
aMultiMark.MarkToMulti();
aMultiMark.GetMultiMarkArea( aMarkRange );
@@ -745,7 +745,7 @@ BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, TRUE, pUndoDoc, &aMultiMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, sal_True, pUndoDoc, &aMultiMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoTransliterate( &rDocShell, aMultiMark, pUndoDoc, nType ) );
@@ -758,31 +758,31 @@ BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOOL bApi )
+sal_Bool ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
SCTAB* pTabs = NULL;
ScBaseCell** ppOldCells = NULL;
- BOOL* pHasFormat = NULL;
- ULONG* pOldFormats = NULL;
+ sal_Bool* pHasFormat = NULL;
+ sal_uLong* pOldFormats = NULL;
ScBaseCell* pDocCell = pDoc->GetCell( rPos );
- BOOL bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
+ sal_Bool bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
if (bUndo)
{
pTabs = new SCTAB[1];
@@ -790,18 +790,18 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO
ppOldCells = new ScBaseCell*[1];
ppOldCells[0] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0;
- pHasFormat = new BOOL[1];
- pOldFormats = new ULONG[1];
+ pHasFormat = new sal_Bool[1];
+ pOldFormats = new sal_uLong[1];
const SfxPoolItem* pItem;
const ScPatternAttr* pPattern = pDoc->GetPattern( rPos.Col(),rPos.Row(),rPos.Tab() );
if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState(
- ATTR_VALUE_FORMAT,FALSE,&pItem) )
+ ATTR_VALUE_FORMAT,false,&pItem) )
{
- pHasFormat[0] = TRUE;
+ pHasFormat[0] = sal_True;
pOldFormats[0] = ((const SfxUInt32Item*)pItem)->GetValue();
}
else
- pHasFormat[0] = FALSE;
+ pHasFormat[0] = false;
}
pDoc->SetString( rPos.Col(), rPos.Row(), rPos.Tab(), rText );
@@ -823,15 +823,15 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO
if (bApi)
NotifyInputHandler( rPos );
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi )
+sal_Bool ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
- BOOL bXMLLoading(pDoc->IsImportingXML());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bXMLLoading(pDoc->IsImportingXML());
// #i925#; it is not neccessary to test whether the cell is editable on loading a XML document
if (!bXMLLoading)
@@ -842,14 +842,14 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
pNewCell->Delete();
- return FALSE;
+ return false;
}
}
- BOOL bEditCell = ( pNewCell->GetCellType() == CELLTYPE_EDIT );
+ sal_Bool bEditCell = ( pNewCell->GetCellType() == CELLTYPE_EDIT );
ScBaseCell* pDocCell = pDoc->GetCell( rPos );
- BOOL bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
- BOOL bHeight = ( bEditDeleted || bEditCell ||
+ sal_Bool bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
+ sal_Bool bHeight = ( bEditDeleted || bEditCell ||
pDoc->HasAttrib( ScRange(rPos), HASATTR_NEEDHEIGHT ) );
ScBaseCell* pUndoCell = (bUndo && pDocCell) ? pDocCell->CloneWithoutNote( *pDoc, rPos ) : 0;
@@ -877,16 +877,16 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi
if (bApi && !bXMLLoading)
NotifyInputHandler( rPos );
- return TRUE;
+ return sal_True;
}
-void ScDocFunc::NotifyInputHandler( const ScAddress& /* rPos */ )
+void ScDocFunc::NotifyInputHandler( const ScAddress& rPos )
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh && pViewSh->GetViewData()->GetDocShell() == &rDocShell )
{
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
- if ( pInputHdl )
+ if ( pInputHdl && pInputHdl->GetCursorPos() == rPos )
{
sal_Bool bIsEditMode(pInputHdl->IsEditMode());
@@ -894,30 +894,30 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& /* rPos */ )
// (the cell shows the same like the InputWindow)
if (bIsEditMode)
pInputHdl->SetModified();
- pViewSh->UpdateInputHandler(FALSE, !bIsEditMode);
+ pViewSh->UpdateInputHandler(false, !bIsEditMode);
}
}
}
struct ScMyRememberItem
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
SfxItemSet aItemSet;
- ScMyRememberItem(const SfxItemSet& rItemSet, USHORT nTempIndex) :
+ ScMyRememberItem(const SfxItemSet& rItemSet, sal_uInt16 nTempIndex) :
nIndex(nTempIndex), aItemSet(rItemSet) {}
};
typedef ::std::list<ScMyRememberItem*> ScMyRememberItemList;
-BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, BOOL bInterpret, BOOL bApi )
+sal_Bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, sal_Bool bInterpret, sal_Bool bApi )
{
// PutData ruft PutCell oder SetNormalString
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScEditAttrTester aTester( &rEngine );
- BOOL bEditCell = aTester.NeedsObject();
+ sal_Bool bEditCell = aTester.NeedsObject();
if ( bEditCell )
{
// #i61702# With bLoseContent set, the content of rEngine isn't restored
@@ -927,7 +927,7 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
sal_Bool bUpdateMode(rEngine.GetUpdateMode());
if (bUpdateMode)
- rEngine.SetUpdateMode(sal_False);
+ rEngine.SetUpdateMode(false);
ScMyRememberItemList aRememberItems;
ScMyRememberItem* pRememberItem = NULL;
@@ -936,8 +936,8 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
// not only alignment, so the object doesn't contain the cell attributes as
// paragraph attributes. Before remove the attributes store they in a list to
// set they back to the EditEngine.
- USHORT nCount = rEngine.GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const SfxItemSet& rOld = rEngine.GetParaAttribs( i );
if ( rOld.Count() )
@@ -994,9 +994,9 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
if ( aPattern.GetItemSet().Count() > 0 )
{
ScMarkData aMark;
- aMark.SelectTable( rPos.Tab(), TRUE );
+ aMark.SelectTable( rPos.Tab(), sal_True );
aMark.SetMarkArea( ScRange( rPos ) );
- ApplyAttributes( aMark, aPattern, TRUE, bApi );
+ ApplyAttributes( aMark, aPattern, sal_True, bApi );
}
}
@@ -1015,7 +1015,7 @@ ScTokenArray* lcl_ScDocFunc_CreateTokenArrayXML( const String& rText, const Stri
ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
- const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
+ const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar, short* pRetFormatType )
{
ScDocument* pDoc = rDocShell.GetDocument();
ScBaseCell* pNewCell = NULL;
@@ -1049,7 +1049,12 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
sal_uInt32 nEnglish = pFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US);
double fVal;
if ( pFormatter->IsNumberFormat( rText, nEnglish, fVal ) )
+ {
pNewCell = new ScValueCell( fVal );
+ // return the format type from the English format, so a localized format can be created
+ if ( pRetFormatType )
+ *pRetFormatType = pFormatter->GetType( nEnglish );
+ }
else if ( rText.Len() )
pNewCell = ScBaseCell::CreateTextCell( rText, pDoc );
@@ -1061,8 +1066,8 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
}
-BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText,
- BOOL bInterpret, BOOL bEnglish, BOOL bApi,
+sal_Bool ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText,
+ sal_Bool bInterpret, sal_Bool bEnglish, sal_Bool bApi,
const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
// SetCellText ruft PutCell oder SetNormalString
@@ -1110,7 +1115,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
rDocShell.GetUndoManager()->AddUndoAction( new ScUndoShowHideNote( rDocShell, rPos, bShow ) );
if (rDoc.IsStreamValid(rPos.Tab()))
- rDoc.SetStreamValid(rPos.Tab(), FALSE);
+ rDoc.SetStreamValid(rPos.Tab(), false);
rDocShell.SetDocumentModified();
@@ -1119,7 +1124,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
//------------------------------------------------------------------------
-bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bApi )
+bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -1141,7 +1146,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bA
//! Undo !!!
if (pDoc->IsStreamValid(rPos.Tab()))
- pDoc->SetStreamValid(rPos.Tab(), FALSE);
+ pDoc->SetStreamValid(rPos.Tab(), false);
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -1151,7 +1156,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bA
//------------------------------------------------------------------------
-bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, BOOL bApi )
+bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, sal_Bool bApi )
{
bool bDone = false;
@@ -1161,7 +1166,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
if (aTester.IsEditable())
{
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
- SfxUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0;
ScNoteData aOldData;
ScPostIt* pOldNote = rDoc.ReleaseNote( rPos );
@@ -1198,7 +1203,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
rDocShell.PostPaintCell( rPos );
if (rDoc.IsStreamValid(rPos.Tab()))
- rDoc.SetStreamValid(rPos.Tab(), FALSE);
+ rDoc.SetStreamValid(rPos.Tab(), false);
aModificator.SetDocumentModified();
bDone = true;
@@ -1213,23 +1218,23 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
//------------------------------------------------------------------------
-BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
if ( bRecord && !pDoc->IsUndoEnabled() )
- bRecord = FALSE;
+ bRecord = false;
- BOOL bImportingXML = pDoc->IsImportingXML();
+ sal_Bool bImportingXML = pDoc->IsImportingXML();
// Cell formats can still be set if the range isn't editable only because of matrix formulas.
// #i62483# When loading XML, the check can be skipped altogether.
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !bImportingXML && !pDoc->IsSelectionEditable( rMark, &bOnlyNotBecauseOfMatrix )
&& !bOnlyNotBecauseOfMatrix )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScDocShellModificator aModificator( rDocShell );
@@ -1237,7 +1242,7 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
//! Umrandung
ScRange aMultiRange;
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if ( bMulti )
rMark.GetMultiMarkArea( aMultiRange );
else
@@ -1258,7 +1263,7 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
}
// While loading XML it is not neccessary to ask HasAttrib. It needs too much time.
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if ( !bImportingXML )
rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content before the change
pDoc->ApplySelectionPattern( rPattern, rMark );
@@ -1272,38 +1277,38 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
if ( bRecord && !pDoc->IsUndoEnabled() )
- bRecord = FALSE;
+ bRecord = false;
- BOOL bImportingXML = pDoc->IsImportingXML();
+ sal_Bool bImportingXML = pDoc->IsImportingXML();
// Cell formats can still be set if the range isn't editable only because of matrix formulas.
// #i62483# When loading XML, the check can be skipped altogether.
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !bImportingXML && !pDoc->IsSelectionEditable( rMark, &bOnlyNotBecauseOfMatrix )
&& !bOnlyNotBecauseOfMatrix )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScStyleSheet* pStyleSheet = (ScStyleSheet*) pDoc->GetStyleSheetPool()->Find(
rStyleName, SFX_STYLE_FAMILY_PARA );
if (!pStyleSheet)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
ScRange aMultiRange;
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if ( bMulti )
rMark.GetMultiMarkArea( aMultiRange );
else
@@ -1332,7 +1337,7 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
pDoc->ApplySelectionStyle( (ScStyleSheet&)*pStyleSheet, rMark );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if (!AdjustRowHeight( aMultiRange ))
rDocShell.PostPaint( aMultiRange, PAINT_GRID, nExtFlags );
else if (nExtFlags & SC_PF_LINES)
@@ -1340,13 +1345,13 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, InsCellCmd eCmd,
- BOOL bRecord, BOOL bApi, BOOL bPartOfPaste )
+sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, InsCellCmd eCmd,
+ sal_Bool bRecord, sal_Bool bApi, sal_Bool bPartOfPaste )
{
ScDocShellModificator aModificator( rDocShell );
@@ -1360,7 +1365,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) )
{
OSL_FAIL("invalid row in InsertCells");
- return FALSE;
+ return false;
}
ScDocument* pDoc = rDocShell.GetDocument();
@@ -1369,8 +1374,8 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nPaintStartY = nStartRow;
SCCOL nPaintEndX = nEndCol;
SCROW nPaintEndY = nEndRow;
- USHORT nPaintFlags = PAINT_GRID;
- BOOL bSuccess;
+ sal_uInt16 nPaintFlags = PAINT_GRID;
+ sal_Bool bSuccess;
SCTAB i;
ScTabViewShell* pViewSh = rDocShell.GetBestViewShell(); //preserve current cursor position
@@ -1383,7 +1388,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
}
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -1398,7 +1403,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
nCount++;
if( nCount == nEndTab+1 )
{
- aMark.SelectTable( i, TRUE );
+ aMark.SelectTable( i, sal_True );
break;
}
}
@@ -1410,7 +1415,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( aMark.GetTableSelect( i ) )
{
for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ )
- aFullMark.SelectTable( j, TRUE );
+ aFullMark.SelectTable( j, sal_True );
}
SCTAB nSelCount = aMark.GetSelectCount();
@@ -1450,7 +1455,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( eCmd == INS_CELLSRIGHT )
nMergeTestEndX = MAXCOL;
- BOOL bNeedRefresh = FALSE;
+ sal_Bool bNeedRefresh = false;
SCCOL nEditTestEndX = (eCmd==INS_INSCOLS) ? MAXCOL : nMergeTestEndX;
SCROW nEditTestEndY = (eCmd==INS_INSROWS) ? MAXROW : nMergeTestEndY;
@@ -1459,7 +1464,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
@@ -1469,7 +1474,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( bRecord )
{
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
// pRefUndoDoc is filled in InsertCol / InsertRow
@@ -1480,7 +1485,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
// #i8302 : we unmerge overwhelming ranges, before insertion all the actions are put in the same ListAction
// the patch comes from mloiseleur and maoyg
- BOOL bInsertMerge = FALSE;
+ sal_Bool bInsertMerge = false;
std::vector<ScRange> qIncreaseRange;
String aUndo = ScGlobal::GetRscString( STR_UNDO_INSERTCELLS );
if (bRecord)
@@ -1493,7 +1498,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( pDoc->HasAttrib( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
if (eCmd==INS_CELLSRIGHT)
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
SCCOL nMergeStartX = nMergeTestStartX;
SCROW nMergeStartY = nMergeTestStartY;
@@ -1509,7 +1514,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
SCCOL nTestCol = -1;
@@ -1525,12 +1530,12 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem(ATTR_MERGE);
pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem(ATTR_MERGE_FLAG);
- INT16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
+ sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER )
{
ScRange aRange( nTestCol, nTestRow1, i );
pDoc->ExtendOverlapped(aRange);
- pDoc->ExtendMerge(aRange, TRUE, TRUE);
+ pDoc->ExtendMerge(aRange, sal_True, sal_True);
if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
{
@@ -1538,12 +1543,12 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
ScRange aTestRange( nTestCol, nTestRow, i );
pDoc->ExtendOverlapped( aTestRange );
- pDoc->ExtendMerge( aTestRange, TRUE, TRUE);
+ pDoc->ExtendMerge( aTestRange, sal_True, sal_True);
ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i );
if( !aExtendRange.In( aMergeRange ) )
{
qIncreaseRange.push_back( aTestRange );
- bInsertMerge = TRUE;
+ bInsertMerge = sal_True;
}
}
}
@@ -1554,7 +1559,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
qIncreaseRange.push_back( aRange );
}
- bInsertMerge = TRUE;
+ bInsertMerge = sal_True;
}
}
}
@@ -1597,7 +1602,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aRange( *iIter );
if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
{
- UnmergeCells( aRange, TRUE, TRUE );
+ UnmergeCells( aRange, sal_True, sal_True );
}
}
}
@@ -1607,7 +1612,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
}
}
@@ -1639,7 +1644,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
break;
default:
OSL_FAIL("Falscher Code beim Einfuegen");
- bSuccess = FALSE;
+ bSuccess = false;
break;
}
@@ -1702,7 +1707,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row() );
aMergeOption.maTabs.insert(aRange.aStart.Tab());
- MergeCells(aMergeOption, FALSE, TRUE, TRUE);
+ MergeCells(aMergeOption, false, true, true);
}
qIncreaseRange.pop_back();
}
@@ -1715,14 +1720,14 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( aMark.GetTableSelect( i ) )
{
if (bNeedRefresh)
- pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, TRUE );
+ pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, sal_True );
else
pDoc->RefreshAutoFilter( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i );
if ( eCmd == INS_INSROWS || eCmd == INS_INSCOLS )
pDoc->UpdatePageBreaks( i );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
rDocShell.UpdatePaintExt( nExtFlags, nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i );
SCTAB nScenarioCount = 0;
@@ -1730,7 +1735,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ )
nScenarioCount ++;
- BOOL bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) :
+ sal_Bool bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) :
AdjustRowHeight(ScRange(0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount ));
if (bAdjusted)
{
@@ -1753,20 +1758,19 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScCellMergeOption aMergeOption(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row() );
- MergeCells(aMergeOption, FALSE, TRUE, TRUE);
+ MergeCells(aMergeOption, false, true, true);
qIncreaseRange.pop_back();
}
if( pViewSh )
{
- pViewSh->MarkRange( rRange, FALSE );
+ pViewSh->MarkRange( rRange, false );
pViewSh->SetCursor( nCursorCol, nCursorRow );
}
}
rDocShell.GetUndoManager()->LeaveListAction();
- SfxUndoManager* pMgr = rDocShell.GetUndoManager();
- pMgr->RemoveLastUndoAction();
+ rDocShell.GetUndoManager()->RemoveLastUndoAction();
delete pRefUndoDoc;
delete pUndoData;
@@ -1780,8 +1784,8 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
return bSuccess;
}
-BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -1795,7 +1799,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) )
{
OSL_FAIL("invalid row in DeleteCells");
- return FALSE;
+ return false;
}
ScDocument* pDoc = rDocShell.GetDocument();
@@ -1804,11 +1808,11 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nPaintStartY = nStartRow;
SCCOL nPaintEndX = nEndCol;
SCROW nPaintEndY = nEndRow;
- USHORT nPaintFlags = PAINT_GRID;
+ sal_uInt16 nPaintFlags = PAINT_GRID;
SCTAB i;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -1823,7 +1827,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nCount++;
if( nCount == nEndTab+1 )
{
- aMark.SelectTable( i, TRUE );
+ aMark.SelectTable( i, sal_True );
break;
}
}
@@ -1835,7 +1839,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( aMark.GetTableSelect( i ) )
{
for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ )
- aFullMark.SelectTable( j, TRUE );
+ aFullMark.SelectTable( j, sal_True );
}
SCTAB nSelCount = aMark.GetSelectCount();
@@ -1880,7 +1884,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
// Test zusammengefasste
@@ -1889,12 +1893,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nMergeTestEndY = (eCmd==DEL_CELLSUP) ? MAXROW : nUndoEndY;
SCCOL nExtendStartCol = nUndoStartX;
SCROW nExtendStartRow = nUndoStartY;
- BOOL bNeedRefresh = FALSE;
+ sal_Bool bNeedRefresh = false;
//Issue 8302 want to be able to insert into the middle of merged cells
//the patch comes from maoyg
::std::vector<ScRange> qDecreaseRange;
- BOOL bDeletingMerge = FALSE;
+ sal_Bool bDeletingMerge = false;
String aUndo = ScGlobal::GetRscString( STR_UNDO_DELETECELLS );
if (bRecord)
rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo );
@@ -1918,7 +1922,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
nExtendStartCol = nMergeStartX;
@@ -1936,12 +1940,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem( ATTR_MERGE );
pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem( ATTR_MERGE_FLAG );
- INT16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
+ sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER )
{
ScRange aRange( nTestCol, nTestRow1, i );
pDoc->ExtendOverlapped( aRange );
- pDoc->ExtendMerge( aRange, TRUE, TRUE );
+ pDoc->ExtendMerge( aRange, sal_True, sal_True );
if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
{
@@ -1949,12 +1953,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
ScRange aTestRange( nTestCol, nTestRow, i );
pDoc->ExtendOverlapped( aTestRange );
- pDoc->ExtendMerge( aTestRange, TRUE, TRUE);
+ pDoc->ExtendMerge( aTestRange, sal_True, sal_True);
ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i );
if( !aExtendRange.In( aMergeRange ) )
{
qDecreaseRange.push_back( aTestRange );
- bDeletingMerge = TRUE;
+ bDeletingMerge = sal_True;
}
}
}
@@ -1965,7 +1969,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
qDecreaseRange.push_back( aRange );
}
- bDeletingMerge = TRUE;
+ bDeletingMerge = sal_True;
}
}
}
@@ -1977,7 +1981,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
nStartRow = aExtendMergeRange.aStart.Row();
nEndRow = aExtendMergeRange.aEnd.Row();
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
if( eCmd == DEL_CELLSUP )
{
@@ -1997,7 +2001,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( eCmd == DEL_CELLSLEFT )
{
nEndRow = aExtendMergeRange.aEnd.Row();
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
}
else
{
@@ -2013,7 +2017,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aRange( *iIter );
if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
{
- UnmergeCells( aRange, TRUE, TRUE );
+ UnmergeCells( aRange, sal_True, sal_True );
}
}
}
@@ -2023,7 +2027,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
}
}
@@ -2055,26 +2059,26 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nScenarioCount ++;
pDoc->CopyToDocument( nUndoStartX, nUndoStartY, i, nUndoEndX, nUndoEndY, i+nScenarioCount,
- IDF_ALL | IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc );
}
}
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
pUndoData = new ScRefUndoData( pDoc );
pDoc->BeginDrawUndo();
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
for( i=0; i<nTabCount; i++ )
{
if( aMark.GetTableSelect( i ) )
rDocShell.UpdatePaintExt( nExtFlags, nStartCol, nStartRow, i, nEndCol, nEndRow, i );
}
- BOOL bUndoOutline = FALSE;
+ sal_Bool bUndoOutline = false;
switch (eCmd)
{
case DEL_CELLSUP:
@@ -2113,10 +2117,10 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
pRefUndoDoc->DeleteAreaTab(nUndoStartX,nUndoStartY,nUndoEndX,nUndoEndY, i, IDF_ALL);
// alle Tabellen anlegen, damit Formeln kopiert werden koennen:
- pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
+ pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
- // kopieren mit bColRowFlags=FALSE (#54194#)
- pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,FALSE,pUndoDoc,NULL,FALSE);
+ // kopieren mit bColRowFlags=sal_False (#54194#)
+ pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,false,pUndoDoc,NULL,false);
delete pRefUndoDoc;
SCTAB* pTabs = new SCTAB[nSelCount];
@@ -2192,7 +2196,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( !pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
{
ScCellMergeOption aMergeOption(aRange);
- MergeCells( aMergeOption, FALSE, TRUE, TRUE );
+ MergeCells( aMergeOption, false, true, true );
}
qDecreaseRange.pop_back();
}
@@ -2224,7 +2228,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nScenarioCount ++;
ScRange aMergedRange( nExtendStartCol, nExtendStartRow, i, nMergeTestEndX, nMergeTestEndY, i+nScenarioCount );
- pDoc->ExtendMerge( aMergedRange, TRUE );
+ pDoc->ExtendMerge( aMergedRange, sal_True );
}
}
}
@@ -2260,11 +2264,11 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi )
+sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -2281,21 +2285,21 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) || !ValidRow(nDestRow) )
{
OSL_FAIL("invalid row in MoveBlock");
- return FALSE;
+ return false;
}
// zugehoerige Szenarien auch anpassen - nur wenn innerhalb einer Tabelle verschoben wird!
- BOOL bScenariosAdded = FALSE;
+ sal_Bool bScenariosAdded = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nTabCount = pDoc->GetTableCount();
if ( nDestTab == nStartTab && !pDoc->IsScenario(nEndTab) )
while ( nEndTab+1 < nTabCount && pDoc->IsScenario(nEndTab+1) )
{
++nEndTab;
- bScenariosAdded = TRUE;
+ bScenariosAdded = sal_True;
}
SCTAB nSrcTabCount = nEndTab-nStartTab+1;
@@ -2306,7 +2310,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScMarkData aSourceMark;
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
- aSourceMark.SelectTable( nTab, TRUE ); // Source selektieren
+ aSourceMark.SelectTable( nTab, sal_True ); // Source selektieren
aSourceMark.SetMarkArea( rSource );
ScDocShellRef aDragShellRef;
@@ -2324,13 +2328,13 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCCOL nOldEndCol = nEndCol;
SCROW nOldEndRow = nEndRow;
- BOOL bClipOver = FALSE;
+ sal_Bool bClipOver = false;
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
SCCOL nTmpEndCol = nOldEndCol;
SCROW nTmpEndRow = nOldEndRow;
if (pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab ))
- bClipOver = TRUE;
+ bClipOver = sal_True;
if ( nTmpEndCol > nEndCol ) nEndCol = nTmpEndCol;
if ( nTmpEndRow > nEndRow ) nEndRow = nTmpEndRow;
}
@@ -2341,14 +2345,14 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCCOL nUndoEndCol = nDestCol + ( nEndCol-nStartCol ); // erweitert im Zielblock
SCROW nUndoEndRow = nDestRow + ( nEndRow-nStartRow );
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
// adjust sizes to include only non-filtered rows
SCCOL nClipX;
SCROW nClipY;
- pClipDoc->GetClipArea( nClipX, nClipY, FALSE );
+ pClipDoc->GetClipArea( nClipX, nClipY, false );
SCROW nUndoAdd = nUndoEndRow - nDestEndRow;
nDestEndRow = nDestRow + nClipY;
nUndoEndRow = nDestEndRow + nUndoAdd;
@@ -2359,7 +2363,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (!bApi)
rDocShell.ErrorMessage(STR_PASTE_FULL);
delete pClipDoc;
- return FALSE;
+ return false;
}
// Test auf Zellschutz
@@ -2376,7 +2380,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
delete pClipDoc;
- return FALSE;
+ return false;
}
// Test auf zusammengefasste - beim Verschieben erst nach dem Loeschen
@@ -2388,14 +2392,14 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
delete pClipDoc;
- return FALSE;
+ return false;
}
// Are there borders in the cells? (for painting)
- USHORT nSourceExt = 0;
+ sal_uInt16 nSourceExt = 0;
rDocShell.UpdatePaintExt( nSourceExt, nStartCol,nStartRow,nStartTab, nEndCol,nEndRow,nEndTab );
- USHORT nDestExt = 0;
+ sal_uInt16 nDestExt = 0;
rDocShell.UpdatePaintExt( nDestExt, nDestCol,nDestRow,nDestTab, nDestEndCol,nDestEndRow,nDestEndTab );
//
@@ -2407,9 +2411,9 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScRefUndoData* pUndoData = NULL;
if (bRecord)
{
- BOOL bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
- BOOL bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL );
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_Bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
+ sal_Bool bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL );
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab, bWholeCols, bWholeRows );
@@ -2417,30 +2421,30 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (bCut)
{
pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
- nUndoFlags, FALSE, pUndoDoc );
+ nUndoFlags, false, pUndoDoc );
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
}
if ( nDestTab != nStartTab )
pUndoDoc->AddUndoTab( nDestTab, nDestEndTab, bWholeCols, bWholeRows );
pDoc->CopyToDocument( nDestCol, nDestRow, nDestTab,
nDestEndCol, nDestEndRow, nDestEndTab,
- nUndoFlags, FALSE, pUndoDoc );
+ nUndoFlags, false, pUndoDoc );
pUndoData = new ScRefUndoData( pDoc );
pDoc->BeginDrawUndo();
}
- BOOL bSourceHeight = FALSE; // Hoehen angepasst?
+ sal_Bool bSourceHeight = false; // Hoehen angepasst?
if (bCut)
{
ScMarkData aDelMark; // only for tables
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
pDoc->DeleteAreaTab( nStartCol,nStartRow, nOldEndCol,nOldEndRow, nTab, IDF_ALL );
- aDelMark.SelectTable( nTab, TRUE );
+ aDelMark.SelectTable( nTab, sal_True );
}
pDoc->DeleteObjectsInArea( nStartCol,nStartRow, nOldEndCol,nOldEndRow, aDelMark );
@@ -2456,7 +2460,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
SCCOL nTmpEndCol = nEndCol;
SCROW nTmpEndRow = nEndRow;
- pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab, sal_True );
}
// Fehlermeldung erst nach dem Wiederherstellen des Inhalts
@@ -2467,17 +2471,17 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
delete pRefUndoDoc;
delete pUndoData;
delete pClipDoc;
- return FALSE;
+ return false;
}
- bSourceHeight = AdjustRowHeight( rSource, FALSE );
+ bSourceHeight = AdjustRowHeight( rSource, false );
}
ScRange aPasteDest( nDestCol, nDestRow, nDestTab, nDestEndCol, nDestEndRow, nDestEndTab );
ScMarkData aDestMark;
for (nTab=nDestTab; nTab<=nDestEndTab; nTab++)
- aDestMark.SelectTable( nTab, TRUE ); // Destination selektieren
+ aDestMark.SelectTable( nTab, sal_True ); // Destination selektieren
aDestMark.SetMarkArea( aPasteDest );
/* Do not copy cell notes and drawing objects here. While pasting, the
@@ -2486,16 +2490,16 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
positions (e.g. if source and destination range overlaps). Cell notes
and drawing objects are pasted below after doing all adjusting. */
pDoc->CopyFromClip( aPasteDest, aDestMark, IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS),
- pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered );
+ pRefUndoDoc, pClipDoc, sal_True, false, bIncludeFiltered );
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
- UnmergeCells( aPasteDest, FALSE, TRUE );
+ UnmergeCells( aPasteDest, false, sal_True );
VirtualDevice aVirtDev;
- BOOL bDestHeight = AdjustRowHeight(
+ sal_Bool bDestHeight = AdjustRowHeight(
ScRange( 0,nDestRow,nDestTab, MAXCOL,nDestEndRow,nDestEndTab ),
- FALSE );
+ false );
/* Paste cell notes and drawing objects after adjusting formula references
and row heights. There are no cell notes or drawing objects, if the
@@ -2506,19 +2510,19 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
touch existing cells. */
if ( pClipDoc->GetDrawLayer() )
pDoc->CopyFromClip( aPasteDest, aDestMark, IDF_NOTE | IDF_ADDNOTES | IDF_OBJECTS,
- pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered );
+ pRefUndoDoc, pClipDoc, sal_True, false, bIncludeFiltered );
if (bRecord)
{
if (pRefUndoDoc)
{
// alle Tabellen anlegen, damit Formeln kopiert werden koennen:
- pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
+ pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
pRefUndoDoc->DeleteArea( nDestCol, nDestRow, nDestEndCol, nDestEndRow, aSourceMark, IDF_ALL );
- // kopieren mit bColRowFlags=FALSE (#54194#)
+ // kopieren mit bColRowFlags=sal_False (#54194#)
pRefUndoDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, MAXTAB,
- IDF_FORMULA, FALSE, pUndoDoc, NULL, FALSE );
+ IDF_FORMULA, false, pUndoDoc, NULL, false );
delete pRefUndoDoc;
}
@@ -2536,7 +2540,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
SCCOL nTmpEndCol = nDestEndCol;
SCROW nTmpEndRow = nDestEndRow;
- pDoc->ExtendMerge( nDestCol, nDestRow, nTmpEndCol, nTmpEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nDestCol, nDestRow, nTmpEndCol, nTmpEndRow, nTab, sal_True );
if (nTmpEndCol > nDestPaintEndCol) nDestPaintEndCol = nTmpEndCol;
if (nTmpEndRow > nDestPaintEndRow) nDestPaintEndRow = nTmpEndRow;
}
@@ -2553,7 +2557,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCROW nPaintStartY = nDestRow;
SCCOL nPaintEndX = nDestPaintEndCol;
SCROW nPaintEndY = nDestPaintEndRow;
- USHORT nFlags = PAINT_GRID;
+ sal_uInt16 nFlags = PAINT_GRID;
if ( nStartRow==0 && nEndRow==MAXROW ) // Breiten mitkopiert?
{
@@ -2615,7 +2619,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
delete pClipDoc;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -2643,7 +2647,6 @@ script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule )
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sSource )
{
- SFX_APP()->EnterBasicCall();
SfxObjectShell& rDocSh = *rDoc.GetDocumentShell();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
@@ -2687,12 +2690,10 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
}
}
- SFX_APP()->LeaveBasicCall();
}
void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
{
- SFX_APP()->EnterBasicCall();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
@@ -2714,13 +2715,12 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
xVBAModuleInfo->removeModuleInfo( sModuleName );
}
- SFX_APP()->LeaveBasicCall();
}
-BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
WaitObject aWait( rDocShell.GetActiveDialogParent() );
ScDocShellModificator aModificator( rDocShell );
@@ -2730,20 +2730,20 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
// Strange loop, also basic is loaded too early ( InsertTable )
// is called via the xml import for sheets in described in odf
- BOOL bInsertDocModule = false;
+ sal_Bool bInsertDocModule = false;
if( !rDocShell.GetDocument()->IsImportingXML() )
{
bInsertDocModule = pDoc ? pDoc->IsInVBAMode() : false;
}
if ( bInsertDocModule || ( bRecord && !pDoc->IsUndoEnabled() ) )
- bRecord = FALSE;
+ bRecord = false;
if (bRecord)
pDoc->BeginDrawUndo(); // InsertTab erzeugt ein SdrUndoNewPage
SCTAB nTabCount = pDoc->GetTableCount();
- BOOL bAppend = ( nTab >= nTabCount );
+ sal_Bool bAppend = ( nTab >= nTabCount );
if ( bAppend )
nTab = nTabCount; // wichtig fuer Undo
@@ -2765,7 +2765,7 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
rDocShell.PostPaintExtras();
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(STR_TABINSERT_ERROR);
@@ -2773,20 +2773,20 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
return bSuccess;
}
-BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
+sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi */ )
{
WaitObject aWait( rDocShell.GetActiveDialogParent() );
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false;
+ sal_Bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( bVbaEnabled )
- bRecord = FALSE;
- BOOL bWasLinked = pDoc->IsLinked(nTab);
+ bRecord = false;
+ sal_Bool bWasLinked = pDoc->IsLinked(nTab);
ScDocument* pUndoDoc = NULL;
ScRefUndoData* pUndoData = NULL;
if (bRecord)
@@ -2794,13 +2794,13 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
SCTAB nCount = pDoc->GetTableCount();
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); // nur nTab mit Flags
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); // nur nTab mit Flags
pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen
- pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pUndoDoc );
+ pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
String aOldName;
pDoc->GetName( nTab, aOldName );
- pUndoDoc->RenameTab( nTab, aOldName, FALSE );
+ pUndoDoc->RenameTab( nTab, aOldName, false );
if (bWasLinked)
pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab),
pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab),
@@ -2809,13 +2809,13 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
if ( pDoc->IsScenario(nTab) )
{
- pUndoDoc->SetScenario( nTab, TRUE );
+ pUndoDoc->SetScenario( nTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario( nTab );
+ sal_Bool bActive = pDoc->IsActiveScenario( nTab );
pUndoDoc->SetActiveScenario( nTab, bActive );
}
pUndoDoc->SetVisible( nTab, pDoc->IsVisible( nTab ) );
@@ -2829,7 +2829,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
}
String sCodeName;
- BOOL bHasCodeName = pDoc->GetCodeName( nTab, sCodeName );
+ sal_Bool bHasCodeName = pDoc->GetCodeName( nTab, sCodeName );
if (pDoc->DeleteTab( nTab, pUndoDoc ))
{
if (bRecord)
@@ -2865,7 +2865,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else
{
@@ -2875,18 +2875,18 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
return bSuccess;
}
-BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
+sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsVisible( nTab ) == bVisible )
- return TRUE; // nichts zu tun - ok
+ return sal_True; // nichts zu tun - ok
if ( !pDoc->IsDocEditable() )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScDocShellModificator aModificator( rDocShell );
@@ -2895,7 +2895,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
{
// nicht alle Tabellen ausblenden
- USHORT nVisCount = 0;
+ sal_uInt16 nVisCount = 0;
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nCount; i++)
if (pDoc->IsVisible(i))
@@ -2905,7 +2905,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
- return FALSE;
+ return false;
}
}
@@ -2921,15 +2921,15 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ )
+sal_Bool ScDocFunc::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsLayoutRTL( nTab ) == bRTL )
- return TRUE; // nothing to do - ok
+ return sal_True; // nothing to do - ok
//! protection (sheet or document?)
@@ -2952,24 +2952,24 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ )
pBindings->Invalidate( SID_ATTR_SIZE );
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( !pDoc->IsDocEditable() )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
String sOldName;
pDoc->GetName(nTab, sOldName);
if (pDoc->RenameTab( nTab, rName ))
@@ -2983,7 +2983,7 @@ BOOL ScDocFunc::RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
return bSuccess;
}
@@ -3039,7 +3039,7 @@ bool ScDocFunc::SetTabBgColor(
return false;
}
- USHORT nTab;
+ sal_uInt16 nTab;
Color aNewTabBgColor;
bool bSuccess = true;
size_t nTabProtectCount = 0;
@@ -3093,9 +3093,9 @@ bool ScDocFunc::SetTabBgColor(
//! - Optimale Hoehe fuer Edit-Zellen ist unterschiedlich zwischen Drucker und Bildschirm
//! - Optimale Breite braucht Selektion, um evtl. nur selektierte Zellen zu beruecksichtigen
-USHORT lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, BOOL bFormula )
+sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, sal_Bool bFormula )
{
- USHORT nTwips = 0;
+ sal_uInt16 nTwips = 0;
ScSizeDeviceProvider aProv(&rDocShell);
OutputDevice* pDev = aProv.GetDevice(); // has pixel MapMode
@@ -3110,30 +3110,32 @@ USHORT lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, BO
return nTwips;
}
-BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab,
- ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab,
+ ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bApi )
{
+ ScDocShellModificator aModificator( rDocShell );
+
if (!nRangeCnt)
- return TRUE;
+ return sal_True;
ScDocument* pDoc = rDocShell.GetDocument();
if ( bRecord && !pDoc->IsUndoEnabled() )
- bRecord = FALSE;
+ bRecord = false;
// import into read-only document is possible
if ( !pDoc->IsChangeReadOnlyEnabled() && !rDocShell.IsEditable() )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
- return FALSE;
+ return false;
}
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
SCCOLROW nStart = pRanges[0];
SCCOLROW nEnd = pRanges[2*nRangeCnt-1];
- BOOL bFormula = FALSE;
+ sal_Bool bFormula = false;
if ( eMode == SC_SIZE_OPTIMAL )
{
//! Option "Formeln anzeigen" - woher nehmen?
@@ -3150,13 +3152,13 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bWidth)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(nEnd), nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(nEnd), nTab, IDF_NONE, false, pUndoDoc );
}
pUndoRanges = new SCCOLROW[ 2*nRangeCnt ];
@@ -3167,8 +3169,8 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pUndoTab = new ScOutlineTable( *pTable );
}
- BOOL bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
- BOOL bOutline = FALSE;
+ sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
+ sal_Bool bOutline = false;
pDoc->InitializeNoteCaptions(nTab);
for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++)
@@ -3180,14 +3182,14 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
{
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
{
- BOOL bAll = ( eMode==SC_SIZE_OPTIMAL );
+ sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL );
if (!bAll)
{
// fuer alle eingeblendeten CR_MANUALSIZE loeschen,
// dann SetOptimalHeight mit bShrink = FALSE
for (SCROW nRow=nStartNo; nRow<=nEndNo; nRow++)
{
- BYTE nOld = pDoc->GetRowFlags(nRow,nTab);
+ sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab);
SCROW nLastRow = -1;
bool bHidden = pDoc->RowHidden(nRow, nTab, NULL, &nLastRow);
if ( !bHidden && ( nOld & CR_MANUALSIZE ) )
@@ -3201,9 +3203,9 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, bAll );
if (bAll)
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
- // Manual-Flag wird bei bAll=TRUE schon in SetOptimalHeight gesetzt
+ // Manual-Flag wird bei bAll=sal_True schon in SetOptimalHeight gesetzt
// (an bei Extra-Height, sonst aus).
}
else if ( eMode==SC_SIZE_DIRECT || eMode==SC_SIZE_ORIGINAL )
@@ -3211,14 +3213,14 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
if (nSizeTwips)
{
pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips );
- pDoc->SetManualHeight( nStartNo, nEndNo, nTab, TRUE ); // height was set manually
+ pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually
}
if ( eMode != SC_SIZE_ORIGINAL )
pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 );
}
else if ( eMode==SC_SIZE_SHOW )
{
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
}
}
else // Spaltenbreiten
@@ -3227,7 +3229,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
{
if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) )
{
- USHORT nThisSize = nSizeTwips;
+ sal_uInt16 nThisSize = nSizeTwips;
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
nThisSize = nSizeTwips +
@@ -3274,26 +3276,27 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pDoc->UpdatePageBreaks( nTab );
rDocShell.PostPaint(0,0,nTab,MAXCOL,MAXROW,nTab,PAINT_ALL);
+ aModificator.SetDocumentModified();
return bSuccess;
}
-BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL /* bApi */ )
+sal_Bool ScDocFunc::InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nTab = rPos.Tab();
SfxBindings* pBindings = rDocShell.GetViewBindings();
SCCOLROW nPos = bColumn ? static_cast<SCCOLROW>(rPos.Col()) :
static_cast<SCCOLROW>(rPos.Row());
if (nPos == 0)
- return FALSE; // erste Spalte / Zeile
+ return false; // erste Spalte / Zeile
ScBreakType nBreak = bColumn ?
pDoc->HasColBreak(static_cast<SCCOL>(nPos), nTab) :
@@ -3303,7 +3306,7 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
if (bRecord)
rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, TRUE ) );
+ new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, sal_True ) );
if (bColumn)
pDoc->SetColBreak(static_cast<SCCOL>(nPos), nTab, false, true);
@@ -3314,7 +3317,7 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
pDoc->UpdatePageBreaks( nTab );
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
if (bColumn)
{
@@ -3340,17 +3343,17 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
if (bSetModified)
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL /* bApi */ )
+sal_Bool ScDocFunc::RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nTab = rPos.Tab();
SfxBindings* pBindings = rDocShell.GetViewBindings();
@@ -3368,7 +3371,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
if (bRecord)
rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, FALSE ) );
+ new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, false ) );
if (bColumn)
pDoc->RemoveColBreak(static_cast<SCCOL>(nPos), nTab, false, true);
@@ -3378,7 +3381,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
pDoc->UpdatePageBreaks( nTab );
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
if (bColumn)
{
@@ -3404,7 +3407,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
if (bSetModified)
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -3434,7 +3437,7 @@ void ScDocFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect )
aModificator.SetDocumentModified();
}
-BOOL ScDocFunc::Protect( SCTAB nTab, const String& rPassword, BOOL /*bApi*/ )
+sal_Bool ScDocFunc::Protect( SCTAB nTab, const String& rPassword, sal_Bool /*bApi*/ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (nTab == TABLEID_DOC)
@@ -3488,7 +3491,7 @@ BOOL ScDocFunc::Protect( SCTAB nTab, const String& rPassword, BOOL /*bApi*/ )
return true;
}
-BOOL ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi )
+sal_Bool ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
@@ -3563,18 +3566,18 @@ BOOL ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL bApi )
+sal_Bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
// #i12940# ClearItems is called (from setPropertyToDefault) directly with uno object's cached
@@ -3583,7 +3586,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
ScRange aMarkRange;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // for MarkToMulti
+ aMultiMark.SetMarking(false); // for MarkToMulti
aMultiMark.MarkToMulti();
aMultiMark.GetMultiMarkArea( aMarkRange );
@@ -3594,7 +3597,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( aMarkRange, IDF_ATTRIB, TRUE, pUndoDoc, (ScMarkData*)&aMultiMark );
+ pDoc->CopyToDocument( aMarkRange, IDF_ATTRIB, sal_True, pUndoDoc, (ScMarkData*)&aMultiMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoClearItems( &rDocShell, aMultiMark, pUndoDoc, pWhich ) );
@@ -3607,21 +3610,21 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
//! Bindings-Invalidate etc.?
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bApi )
+sal_Bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScRange aMarkRange;
@@ -3641,7 +3644,7 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pUndoDoc, (ScMarkData*)&rMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, (ScMarkData*)&rMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoIndent( &rDocShell, rMark, pUndoDoc, bIncrement ) );
@@ -3667,15 +3670,15 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp
pBindings->Invalidate( SID_ALIGN_ANY_JUSTIFIED );
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
- USHORT nFormatNo, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_uInt16 nFormatNo, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3685,14 +3688,14 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
aMark = *pTabMark;
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat();
@@ -3701,7 +3704,7 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
{
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bSize = (*pAutoFormat)[nFormatNo]->GetIncludeWidthHeight();
+ sal_Bool bSize = (*pAutoFormat)[nFormatNo]->GetIncludeWidthHeight();
SCTAB nTabCount = pDoc->GetTableCount();
ScDocument* pUndoDoc = NULL;
@@ -3716,13 +3719,13 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aCopyRange = rRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aStart.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pUndoDoc, &aMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pUndoDoc, &aMark );
if (bSize)
{
pDoc->CopyToDocument( nStartCol,0,0, nEndCol,MAXROW,nTabCount-1,
- IDF_NONE, FALSE, pUndoDoc, &aMark );
+ IDF_NONE, false, pUndoDoc, &aMark );
pDoc->CopyToDocument( 0,nStartRow,0, MAXCOL,nEndRow,nTabCount-1,
- IDF_NONE, FALSE, pUndoDoc, &aMark );
+ IDF_NONE, false, pUndoDoc, &aMark );
}
pDoc->BeginDrawUndo();
}
@@ -3737,8 +3740,8 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aMark.GetTableSelect(nTab))
{
- SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, FALSE, TRUE);
- SetWidthOrHeight( FALSE,1,nRows, nTab, SC_SIZE_VISOPT, 0, FALSE, FALSE);
+ SetWidthOrHeight( sal_True, 1,nCols, nTab, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, false, sal_True);
+ SetWidthOrHeight( false,1,nRows, nTab, SC_SIZE_VISOPT, 0, false, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT | PAINT_TOP );
}
@@ -3748,8 +3751,8 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aMark.GetTableSelect(nTab))
{
- BOOL bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, nTab,
- nEndCol, nEndRow, nTab), FALSE );
+ sal_Bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, nTab,
+ nEndCol, nEndRow, nTab), false );
if (bAdj)
rDocShell.PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT );
@@ -3775,13 +3778,13 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
//------------------------------------------------------------------------
-BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
- const ScTokenArray* pTokenArray, const String& rString, BOOL bApi, BOOL bEnglish,
+sal_Bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTokenArray* pTokenArray, const String& rString, sal_Bool bApi, sal_Bool bEnglish,
const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3790,7 +3793,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nEndRow = rRange.aEnd.Row();
SCTAB nEndTab = rRange.aEnd.Tab();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScMarkData aMark;
if (pTabMark)
@@ -3798,7 +3801,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -3813,7 +3816,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
}
// use TokenArray if given, string (and flags) otherwise
@@ -3854,7 +3857,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
rDocShell.PostPaint( nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab, PAINT_GRID );
aModificator.SetDocumentModified();
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -3864,12 +3867,12 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
//------------------------------------------------------------------------
-BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
- const ScTabOpParam& rParam, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3879,7 +3882,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -3887,7 +3890,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -3900,7 +3903,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoTabOp( &rDocShell,
@@ -3915,7 +3918,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->InsertTableOp(rParam, nStartCol, nStartRow, nEndCol, nEndRow, aMark);
rDocShell.PostPaintGridAll();
aModificator.SetDocumentModified();
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -3937,12 +3940,12 @@ inline ScDirection DirFromFillDir( FillDir eDir )
return DIR_LEFT;
}
-BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3952,7 +3955,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -3960,7 +3963,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -4007,7 +4010,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aCopyRange = aDestArea;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_AUTOFILL, FALSE, pUndoDoc, &aMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
@@ -4026,7 +4029,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
rDocShell.PostPaintGridAll();
aModificator.SetDocumentModified();
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -4034,14 +4037,14 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
return bSuccess;
}
-BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
+sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
double fStart, double fStep, double fMax,
- BOOL bRecord, BOOL bApi )
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -4051,7 +4054,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -4059,7 +4062,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -4113,7 +4116,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->CopyToDocument(
aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0,
aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1,
- IDF_AUTOFILL, FALSE, pUndoDoc, &aMark );
+ IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
if (aDestArea.aStart.Col() <= aDestArea.aEnd.Col() &&
@@ -4143,7 +4146,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->GetRangeName()->GetSharedMaxIndex()+1 ) );
}
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -4151,15 +4154,15 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
return bSuccess;
}
-BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi )
{
double fStep = 1.0;
double fMax = MAXDOUBLE;
return FillAuto( rRange, pTabMark, eDir, FILL_AUTO, FILL_DAY, nCount, fStep, fMax, bRecord, bApi );
}
-BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -4172,7 +4175,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -4180,7 +4183,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScRange aSourceArea = rRange;
@@ -4193,7 +4196,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
aDestArea.aEnd.SetRow( sal::static_int_cast<SCROW>( aSourceArea.aEnd.Row() + nCount ) );
break;
case FILL_TO_TOP:
- if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Row() ))
+ if (nCount > sal::static_int_cast<sal_uLong>( aSourceArea.aStart.Row() ))
{
OSL_FAIL("FillAuto: Row < 0");
nCount = aSourceArea.aStart.Row();
@@ -4204,7 +4207,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
aDestArea.aEnd.SetCol( sal::static_int_cast<SCCOL>( aSourceArea.aEnd.Col() + nCount ) );
break;
case FILL_TO_LEFT:
- if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Col() ))
+ if (nCount > sal::static_int_cast<sal_uLong>( aSourceArea.aStart.Col() ))
{
OSL_FAIL("FillAuto: Col < 0");
nCount = aSourceArea.aStart.Col();
@@ -4225,7 +4228,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if ( pDoc->HasSelectedBlockMatrixFragment( nStartCol, nStartRow,
@@ -4233,7 +4236,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
{
if (!bApi)
rDocShell.ErrorMessage(STR_MATRIXFRAGMENTERR);
- return FALSE;
+ return false;
}
WaitObject aWait( rDocShell.GetActiveDialogParent() );
@@ -4254,7 +4257,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
pDoc->CopyToDocument(
aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0,
aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1,
- IDF_AUTOFILL, FALSE, pUndoDoc, &aMark );
+ IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
@@ -4275,12 +4278,12 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
aModificator.SetDocumentModified();
rRange = aDestArea; // Zielbereich zurueckgeben (zum Markieren)
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, sal_Bool bContents, sal_Bool bRecord, sal_Bool bApi )
{
using ::std::set;
@@ -4293,7 +4296,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
if ((nStartCol == nEndCol && nStartRow == nEndRow) || rOption.maTabs.empty())
{
// Nothing to do. Bail out quick.
- return TRUE;
+ return true;
}
ScDocument* pDoc = rDocShell.GetDocument();
@@ -4301,7 +4304,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
SCTAB nTab1 = *itrBeg, nTab2 = *rOption.maTabs.rbegin();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
for (set<SCTAB>::const_iterator itr = itrBeg; itr != itrEnd; ++itr)
{
@@ -4310,7 +4313,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if ( pDoc->HasAttrib( nStartCol, nStartRow, *itr, nEndCol, nEndRow, *itr,
@@ -4319,7 +4322,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
// "Zusammenfassen nicht verschachteln !"
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_MERGECELLS_0);
- return FALSE;
+ return false;
}
}
@@ -4349,7 +4352,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
}
// note captions are collected by drawing undo
pDoc->CopyToDocument( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
- IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
}
if( bHasNotes )
pDoc->BeginDrawUndo();
@@ -4394,10 +4397,10 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
pBindings->Invalidate( FID_MERGE_TOGGLE );
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::UnmergeCells( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
ScCellMergeOption aOption(rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row());
SCTAB nTab1 = rRange.aStart.Tab(), nTab2 = rRange.aEnd.Tab();
@@ -4407,7 +4410,7 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi )
return UnmergeCells(aOption, bRecord, bApi);
}
-bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BOOL bApi )
+bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord, sal_Bool bApi )
{
using ::std::set;
@@ -4419,7 +4422,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocument* pUndoDoc = NULL;
bool bBeep = false;
@@ -4446,7 +4449,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo(pDoc, *rOption.maTabs.begin(), *rOption.maTabs.rbegin());
}
- pDoc->CopyToDocument(aExtended, IDF_ATTRIB, FALSE, pUndoDoc);
+ pDoc->CopyToDocument(aExtended, IDF_ATTRIB, false, pUndoDoc);
}
const SfxPoolItem& rDefAttr = pDoc->GetPool()->GetDefaultItem( ATTR_MERGE );
@@ -4460,7 +4463,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
aExtended.aEnd.Col(), aExtended.aEnd.Row(), nTab,
SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( aRefresh, TRUE, FALSE );
+ pDoc->ExtendMerge( aRefresh, sal_True, false );
if ( !AdjustRowHeight( aExtended ) )
rDocShell.PostPaint( aExtended, PAINT_GRID );
@@ -4475,7 +4478,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
}
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -4491,7 +4494,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
DBG_ASSERT( pNewRanges, "pNewRanges is 0" );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if (bUndo)
{
@@ -4505,13 +4508,13 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
// #i55926# While loading XML, formula cells only have a single string token,
// so CompileNameFormula would never find any name (index) tokens, and would
// unnecessarily loop through all cells.
- BOOL bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 );
+ sal_Bool bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 );
if ( bCompile )
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( sal_True ); // CreateFormulaString
pDoc->SetRangeName( pNewRanges ); // takes ownership
if ( bCompile )
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( false ); // CompileFormulaString
if (bModifyDoc)
{
@@ -4527,7 +4530,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
void ScDocFunc::CreateOneName( ScRangeName& rList,
SCCOL nPosX, SCROW nPosY, SCTAB nTab,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL& rCancel, BOOL bApi )
+ sal_Bool& rCancel, sal_Bool bApi )
{
if (rCancel)
return;
@@ -4552,7 +4555,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
if (aOldStr != aContent)
{
if (bApi)
- bInsert = TRUE; // per API nicht nachfragen
+ bInsert = sal_True; // per API nicht nachfragen
else
{
String aTemplate = ScGlobal::GetRscString( STR_CREATENAME_REPLACE );
@@ -4570,7 +4573,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
bInsert = true;
}
else if ( nResult == RET_CANCEL )
- rCancel = TRUE;
+ rCancel = sal_True;
}
}
}
@@ -4591,14 +4594,14 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
}
}
-BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
+sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi )
{
if (!nFlags)
- return FALSE; // war nix
+ return false; // war nix
ScDocShellModificator aModificator( rDocShell );
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
@@ -4606,26 +4609,26 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
SCTAB nTab = rRange.aStart.Tab();
DBG_ASSERT(rRange.aEnd.Tab() == nTab, "CreateNames: mehrere Tabellen geht nicht");
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
if ( nFlags & ( NAME_TOP | NAME_BOTTOM ) )
if ( nStartRow == nEndRow )
- bValid = FALSE;
+ bValid = false;
if ( nFlags & ( NAME_LEFT | NAME_RIGHT ) )
if ( nStartCol == nEndCol )
- bValid = FALSE;
+ bValid = false;
if (bValid)
{
ScDocument* pDoc = rDocShell.GetDocument();
ScRangeName* pNames = pDoc->GetRangeName();
if (!pNames)
- return FALSE; // soll nicht sein
+ return false; // soll nicht sein
ScRangeName aNewRanges( *pNames );
- BOOL bTop = ( ( nFlags & NAME_TOP ) != 0 );
- BOOL bLeft = ( ( nFlags & NAME_LEFT ) != 0 );
- BOOL bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 );
- BOOL bRight = ( ( nFlags & NAME_RIGHT ) != 0 );
+ sal_Bool bTop = ( ( nFlags & NAME_TOP ) != 0 );
+ sal_Bool bLeft = ( ( nFlags & NAME_LEFT ) != 0 );
+ sal_Bool bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 );
+ sal_Bool bRight = ( ( nFlags & NAME_RIGHT ) != 0 );
SCCOL nContX1 = nStartCol;
SCROW nContY1 = nStartRow;
@@ -4641,7 +4644,7 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
if ( bRight )
--nContX2;
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = false;
SCCOL i;
SCROW j;
@@ -4678,19 +4681,19 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
+sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
- const BOOL bRecord = pDoc->IsUndoEnabled();
+ const sal_Bool bRecord = pDoc->IsUndoEnabled();
SCTAB nTab = rStartPos.Tab();
ScDocument* pUndoDoc = NULL;
ScRangeName* pList = pDoc->GetRangeName();
- USHORT nValidCount = 0;
+ sal_uInt16 nValidCount = 0;
ScRangeName::iterator itrBeg = pList->begin(), itrEnd = pList->end();
for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr)
{
@@ -4714,13 +4717,13 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
pDoc->BeginDrawUndo(); // wegen Hoehenanpassung
}
ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ];
- USHORT j = 0;
+ sal_uInt16 j = 0;
for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr)
{
ScRangeData& r = *itr;
@@ -4758,7 +4761,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nTab, nTab );
pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- IDF_ALL, FALSE, pRedoDoc );
+ IDF_ALL, false, pRedoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoListNames( &rDocShell,
@@ -4770,7 +4773,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
rDocShell.PostPaint( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, PAINT_GRID );
aModificator.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -4780,16 +4783,16 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, BOOL bApi )
+sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rOldRange.aStart.Col();
SCROW nStartRow = rOldRange.aStart.Row();
SCTAB nTab = rOldRange.aStart.Tab();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
String aFormula;
pDoc->GetFormula( nStartCol, nStartRow, nTab, aFormula );
@@ -4804,17 +4807,17 @@ BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
ScMarkData aMark;
aMark.SetMarkArea( rOldRange );
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
ScRange aNewRange( rOldRange.aStart, rNewEnd );
- if ( DeleteContents( aMark, IDF_CONTENTS, TRUE, bApi ) )
+ if ( DeleteContents( aMark, IDF_CONTENTS, sal_True, bApi ) )
{
// GRAM_PODF_A1 for API compatibility.
- bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, false, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
if (!bRet)
{
// versuchen, alten Zustand wiederherzustellen
- EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, false, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -4827,15 +4830,15 @@ BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
//------------------------------------------------------------------------
-BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
+sal_Bool ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- const ScRange& rDestRange, ULONG nRefresh,
- BOOL bFitBlock, BOOL bApi )
+ const ScRange& rDestRange, sal_uLong nRefresh,
+ sal_Bool bFitBlock, sal_Bool bApi )
{
//! auch fuer ScViewFunc::InsertAreaLink benutzen!
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
@@ -4843,9 +4846,9 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
// remove them first (file format specifies only one link definition
// for a cell)
- USHORT nLinkCount = pLinkManager->GetLinks().Count();
- USHORT nRemoved = 0;
- USHORT nLinkPos = 0;
+ sal_uInt16 nLinkCount = pLinkManager->GetLinks().Count();
+ sal_uInt16 nRemoved = 0;
+ sal_uInt16 nLinkPos = 0;
while (nLinkPos<nLinkCount)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[nLinkPos];
@@ -4878,7 +4881,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
String aFilterName = rFilter;
String aNewOptions = rOptions;
if (!aFilterName.Len())
- ScDocumentLoader::GetFilterName( rFile, aFilterName, aNewOptions, TRUE, !bApi );
+ ScDocumentLoader::GetFilterName( rFile, aFilterName, aNewOptions, sal_True, !bApi );
// remove application prefix from filter name here, so the filter options
// aren't reset when the filter name is changed in ScAreaLink::DataChanged
@@ -4900,10 +4903,12 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
}
// Update hat sein eigenes Undo
-
- pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
- pLink->Update(); // kein SetInCreate -> Update ausfuehren
- pLink->SetDoInsert(TRUE); // Default = TRUE
+ if (pDoc->IsExecuteLinkEnabled())
+ {
+ pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
+ pLink->Update(); // kein SetInCreate -> Update ausfuehren
+ }
+ pLink->SetDoInsert(sal_True); // Default = sal_True
SfxBindings* pBindings = rDocShell.GetViewBindings();
if (pBindings)
@@ -4911,7 +4916,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 221b5d8a439c..6ad8123c3659 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -78,7 +78,6 @@
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
#include <basic/sbstar.hxx>
#include <basic/basmgr.hxx>
-#include <vbahelper/vbaaccesshelper.hxx>
#include "scabstdlg.hxx"
#include <sot/formats.hxx>
@@ -268,7 +267,7 @@ sal_uInt16 ScDocShell::GetHiddenInformationState( sal_uInt16 nStates )
{
SCTAB nTableCount = aDocument.GetTableCount();
SCTAB nTable = 0;
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while ( nTable < nTableCount && !bFound )
{
ScCellIterator aCellIter( &aDocument, 0,0, nTable, MAXCOL,MAXROW, nTable );
@@ -287,17 +286,17 @@ sal_uInt16 ScDocShell::GetHiddenInformationState( sal_uInt16 nStates )
void ScDocShell::BeforeXMLLoading()
{
- aDocument.DisableIdle( TRUE );
+ aDocument.DisableIdle( sal_True );
// prevent unnecessary broadcasts and updates
DBG_ASSERT(pModificator == NULL, "The Modificator should not exist");
pModificator = new ScDocShellModificator( *this );
- aDocument.SetImportingXML( TRUE );
+ aDocument.SetImportingXML( sal_True );
aDocument.EnableExecuteLink( false ); // #i101304# to be safe, prevent nested loading from external references
- aDocument.EnableUndo( FALSE );
+ aDocument.EnableUndo( false );
// prevent unnecessary broadcasts and "half way listeners"
- aDocument.SetInsertingFromOtherDoc( TRUE );
+ aDocument.SetInsertingFromOtherDoc( sal_True );
if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
ScColumn::bDoubleAlloc = sal_True;
@@ -309,7 +308,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
{
UpdateLinks();
// don't prevent establishing of listeners anymore
- aDocument.SetInsertingFromOtherDoc( FALSE );
+ aDocument.SetInsertingFromOtherDoc( false );
if ( bRet )
{
ScChartListenerCollection* pChartListener = aDocument.GetChartListenerCollection();
@@ -336,12 +335,12 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) )
{
rtl::OUStringBuffer aDocURLBuffer;
- BOOL bQuote = TRUE; // Dokumentenname ist immer quoted
+ sal_Bool bQuote = sal_True; // Dokumentenname ist immer quoted
++pNameBuffer;
while ( bQuote && *pNameBuffer )
{
if ( *pNameBuffer == '\'' && *(pNameBuffer-1) != '\\' )
- bQuote = FALSE;
+ bQuote = false;
else if( !(*pNameBuffer == '\\' && *(pNameBuffer+1) == '\'') )
aDocURLBuffer.append(*pNameBuffer); // falls escaped Quote: nur Quote in den Namen
++pNameBuffer;
@@ -357,7 +356,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
!aINetURLObject.HasError()) // the docname should be a valid URL
{
aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) );
- aDocument.RenameTab(i, aName, TRUE, TRUE);
+ aDocument.RenameTab(i, aName, sal_True, sal_True);
}
// else; nothing has to happen, because it is a user given name
}
@@ -383,15 +382,15 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
}
}
}
- ScColumn::bDoubleAlloc = sal_False;
+ ScColumn::bDoubleAlloc = false;
}
else
- aDocument.SetInsertingFromOtherDoc( FALSE );
+ aDocument.SetInsertingFromOtherDoc( false );
- aDocument.SetImportingXML( FALSE );
+ aDocument.SetImportingXML( false );
aDocument.EnableExecuteLink( true );
- aDocument.EnableUndo( TRUE );
- bIsEmpty = FALSE;
+ aDocument.EnableUndo( sal_True );
+ bIsEmpty = false;
if (pModificator)
{
@@ -403,7 +402,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
OSL_FAIL("The Modificator should exist");
}
- aDocument.DisableIdle( FALSE );
+ aDocument.DisableIdle( false );
}
namespace {
@@ -427,7 +426,7 @@ private:
}
-BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
+sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
{
LoadMediumGuard aLoadGuard(&aDocument);
@@ -440,21 +439,21 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
// #i62677# BeforeXMLLoading is also called from ScXMLImport::startDocument when invoked
// from an external component. The XMLFromWrapper flag is only set here, when called
// through ScDocShell.
- aDocument.SetXMLFromWrapper( TRUE );
+ aDocument.SetXMLFromWrapper( sal_True );
ScXMLImportWrapper aImport( aDocument, pLoadMedium, xStor );
- sal_Bool bRet(sal_False);
+ sal_Bool bRet(false);
ErrCode nError = ERRCODE_NONE;
if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
- bRet = aImport.Import(sal_False, nError);
+ bRet = aImport.Import(false, nError);
else
bRet = aImport.Import(sal_True, nError);
if ( nError )
pLoadMedium->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- aDocument.SetXMLFromWrapper( FALSE );
+ aDocument.SetXMLFromWrapper( false );
AfterXMLLoading(bRet);
//! row heights...
@@ -462,25 +461,25 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
return bRet;
}
-BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
+sal_Bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "sb99857", "ScDocShell::SaveXML" );
- aDocument.DisableIdle( TRUE );
+ aDocument.DisableIdle( sal_True );
ScXMLImportWrapper aImport( aDocument, pSaveMedium, xStor );
- sal_Bool bRet(sal_False);
+ sal_Bool bRet(false);
if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
- bRet = aImport.Export(sal_False);
+ bRet = aImport.Export(false);
else
bRet = aImport.Export(sal_True);
- aDocument.DisableIdle( FALSE );
+ aDocument.DisableIdle( false );
return bRet;
}
-BOOL ScDocShell::Load( SfxMedium& rMedium )
+sal_Bool ScDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Load" );
LoadMediumGuard aLoadGuard(&aDocument);
@@ -492,12 +491,12 @@ BOOL ScDocShell::Load( SfxMedium& rMedium )
GetUndoManager()->Clear();
- BOOL bRet = SfxObjectShell::Load( rMedium );
+ sal_Bool bRet = SfxObjectShell::Load( rMedium );
if( bRet )
{
if (GetMedium())
{
- SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : com::sun::star::document::UpdateDocMode::NO_UPDATE;
}
@@ -525,7 +524,7 @@ BOOL ScDocShell::Load( SfxMedium& rMedium )
if ( bRet )
aDocument.InvalidateTableArea();
- bIsEmpty = FALSE;
+ bIsEmpty = false;
FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES );
return bRet;
}
@@ -548,7 +547,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxEventHint ) )
{
- ULONG nEventId = static_cast< const SfxEventHint& >( rHint ).GetEventId();
+ sal_uLong nEventId = static_cast< const SfxEventHint& >( rHint ).GetEventId();
switch ( nEventId )
{
case SFX_EVENT_ACTIVATEDOC:
@@ -587,6 +586,13 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
xVbaEvents->processVbaEvent( WORKBOOK_AFTERSAVE, aArgs );
}
break;
+ case SFX_EVENT_CLOSEDOC:
+ {
+ // #163655# prevent event processing after model is disposed
+ aDocument.SetVbaEventProcessor( uno::Reference< script::vba::XVBAEventProcessor >() );
+ uno::Reference< lang::XEventListener >( xVbaEvents, uno::UNO_QUERY_THROW )->disposing( lang::EventObject() );
+ }
+ break;
}
}
}
@@ -596,7 +602,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if (rHint.ISA(SfxSimpleHint)) // ohne Parameter
{
- ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nSlot = ((const SfxSimpleHint&)rHint).GetId();
switch ( nSlot )
{
case SFX_HINT_TITLECHANGED:
@@ -620,7 +626,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScRange aRange = rStlHint.GetRange();
String aName1 = rStlHint.GetStyle1();
String aName2 = rStlHint.GetStyle2();
- UINT32 nTimeout = rStlHint.GetTimeout();
+ sal_uInt32 nTimeout = rStlHint.GetTimeout();
if (!pAutoStyleList)
pAutoStyleList = new ScAutoStyleList(this);
@@ -628,7 +634,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxEventHint ) )
{
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
switch ( nEventId )
{
case SFX_EVENT_LOADFINISHED:
@@ -636,7 +642,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
// the readonly documents should not be opened in shared mode
if ( HasSharedXMLFlagSet() && !SC_MOD()->IsInSharedDocLoading() && !IsReadOnly() )
{
- if ( SwitchToShared( sal_True, sal_False ) )
+ if ( SwitchToShared( sal_True, false ) )
{
ScViewData* pViewData = GetViewData();
ScTabView* pTabView = ( pViewData ? dynamic_cast< ScTabView* >( pViewData->GetView() ) : NULL );
@@ -652,25 +658,6 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
SetReadOnlyUI( sal_True );
}
}
-
- // VBA specific initialization
- if( aDocument.IsInVBAMode() ) try
- {
- uno::Reference< frame::XModel > xModel( GetModel(), uno::UNO_SET_THROW );
-
- // create VBAGlobals object if not yet done (this also creates the "ThisExcelDoc" symbol)
- uno::Reference< lang::XMultiServiceFactory > xFactory( xModel, uno::UNO_QUERY_THROW );
- xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
-
- // create the VBA document event processor
- uno::Sequence< uno::Any > aArgs( 1 );
- aArgs[ 0 ] <<= xModel;
- xVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( this, "com.sun.star.script.vba.VBASpreadsheetEventProcessor" , aArgs ), uno::UNO_QUERY );
- aDocument.SetVbaEventProcessor( xVbaEvents );
- }
- catch( uno::Exception& )
- {
- }
}
break;
case SFX_EVENT_VIEWCREATED:
@@ -684,7 +671,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScGlobal::GetRscString( STR_SHARED_DOC_WARNING ) );
aBox.SetDefaultCheckBoxText();
aBox.Execute();
- BOOL bChecked = aBox.GetCheckBoxState();
+ sal_Bool bChecked = aBox.GetCheckBoxState();
if ( bChecked )
{
aAppOptions.SetShowSharedDocumentWarning( !bChecked );
@@ -841,8 +828,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScChangeViewSettings* pChangeViewSet = aDocument.GetChangeViewSettings();
if ( pChangeViewSet && pChangeViewSet->ShowChanges() )
{
- pChangeViewSet->SetShowChanges( FALSE );
- pChangeViewSet->SetShowAccepted( FALSE );
+ pChangeViewSet->SetShowChanges( false );
+ pChangeViewSet->SetShowAccepted( false );
aDocument.SetChangeViewSettings( *pChangeViewSet );
bChangedViewSettings = true;
}
@@ -853,7 +840,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
aValues[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName"));
aValues[0].Value <<= ::rtl::OUString( GetMedium()->GetFilter()->GetFilterName() );
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False);
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false);
if ( pPasswordItem && pPasswordItem->GetValue().Len() )
{
aValues.realloc( 2 );
@@ -867,8 +854,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( bChangedViewSettings )
{
- pChangeViewSet->SetShowChanges( TRUE );
- pChangeViewSet->SetShowAccepted( TRUE );
+ pChangeViewSet->SetShowChanges( sal_True );
+ pChangeViewSet->SetShowAccepted( sal_True );
aDocument.SetChangeViewSettings( *pChangeViewSet );
}
}
@@ -963,7 +950,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
// Inhalte fuer Organizer laden
-BOOL ScDocShell::LoadFrom( SfxMedium& rMedium )
+sal_Bool ScDocShell::LoadFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::LoadFrom" );
LoadMediumGuard aLoadGuard(&aDocument);
@@ -971,11 +958,11 @@ BOOL ScDocShell::LoadFrom( SfxMedium& rMedium )
WaitObject aWait( GetActiveDialogParent() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if (GetMedium())
{
- SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : com::sun::star::document::UpdateDocMode::NO_UPDATE;
}
@@ -1018,13 +1005,13 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa
rDateConvert = static_cast<bool>(aTokens[1].toInt32());
}
-BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
+sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertFrom" );
LoadMediumGuard aLoadGuard(&aDocument);
- BOOL bRet = FALSE; // FALSE heisst Benutzerabbruch !!
+ sal_Bool bRet = false; // sal_False heisst Benutzerabbruch !!
// bei Fehler: Fehler am Stream setzen!!
ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
@@ -1032,12 +1019,12 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
GetUndoManager()->Clear();
// ob nach dem Import optimale Spaltenbreiten gesetzt werden sollen
- BOOL bSetColWidths = FALSE;
- BOOL bSetSimpleTextColWidths = FALSE;
+ sal_Bool bSetColWidths = false;
+ sal_Bool bSetSimpleTextColWidths = false;
ScColWidthParam aColWidthParam[MAXCOLCOUNT];
ScRange aColWidthRange;
// ob nach dem Import optimale Zeilenhoehen gesetzt werden sollen
- BOOL bSetRowHeights = FALSE;
+ sal_Bool bSetRowHeights = false;
vector<ScDocRowHeightUpdater::TabRanges> aRecalcRowRangesArray;
@@ -1048,7 +1035,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
// Datei uebertragen wird.
rMedium.GetPhysicalName(); //! CreateFileStream direkt rufen, wenn verfuegbar
- SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : com::sun::star::document::UpdateDocMode::NO_UPDATE;
const SfxFilter* pFilter = rMedium.GetFilter();
@@ -1058,10 +1045,10 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
aConvFilterName=aFltName; //@ #BugId 54198
- BOOL bCalc3 = ( aFltName.EqualsAscii(pFilterSc30) );
- BOOL bCalc4 = ( aFltName.EqualsAscii(pFilterSc40) );
+ sal_Bool bCalc3 = ( aFltName.EqualsAscii(pFilterSc30) );
+ sal_Bool bCalc4 = ( aFltName.EqualsAscii(pFilterSc40) );
if (!bCalc3 && !bCalc4)
- aDocument.SetInsertingFromOtherDoc( TRUE );
+ aDocument.SetInsertingFromOtherDoc( sal_True );
if (aFltName.EqualsAscii(pFilterXML))
bRet = LoadXML( &rMedium, NULL );
@@ -1077,7 +1064,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if (aFltName.EqualsAscii(pFilterLotus))
@@ -1086,7 +1073,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -1098,22 +1085,22 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_437 );
}
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = sal_True;
FltError eError = ScFormatFilter::Get().ScImportLotus123( rMedium, &aDocument,
ScGlobal::GetCharsetValue(sItStr));
- ScColumn::bDoubleAlloc = FALSE;
+ ScColumn::bDoubleAlloc = false;
if (eError != eERR_OK)
{
if (!GetError())
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
- bSetColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bRet = sal_True;
+ bSetColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else if ( aFltName.EqualsAscii(pFilterExcel4) || aFltName.EqualsAscii(pFilterExcel5) ||
aFltName.EqualsAscii(pFilterExcel95) || aFltName.EqualsAscii(pFilterExcel97) ||
@@ -1131,9 +1118,9 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
MakeDrawLayer(); //! im Filter
CalcOutputFactor(); // prepare update of row height
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = true;
FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat );
- ScColumn::bDoubleAlloc = FALSE;
+ ScColumn::bDoubleAlloc = false;
aDocument.UpdateFontCharSet();
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
aDocument.UpdateChartListenerCollection(); //! fuer alle Importe?
@@ -1145,7 +1132,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
if (!GetError())
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
- bRet = TRUE;
+ bRet = sal_True;
}
else if (eError != eERR_OK)
{
@@ -1153,20 +1140,20 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
}
else
- bRet = TRUE;
+ bRet = true;
}
else if (aFltName.EqualsAscii(pFilterAscii))
{
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
ScAsciiOptions aOptions;
- BOOL bOptInit = FALSE;
+ sal_Bool bOptInit = false;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
aOptions.ReadFromString( ((const SfxStringItem*)pItem)->GetValue() );
- bOptInit = TRUE;
+ bOptInit = sal_True;
}
if ( !bOptInit )
@@ -1180,7 +1167,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
FltError eError = eERR_OK;
- BOOL bOverflow = FALSE;
+ sal_Bool bOverflow = false;
if( ! rMedium.IsStorage() )
{
@@ -1214,8 +1201,8 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!GetError())
SetError(SCWARN_IMPORT_RANGE_OVERFLOW, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
}
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
+ bSetColWidths = sal_True;
+ bSetSimpleTextColWidths = sal_True;
}
else if (aFltName.EqualsAscii(pFilterDBase))
{
@@ -1223,7 +1210,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -1237,7 +1224,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
ScDocRowHeightUpdater::TabRanges aRecalcRanges(0);
- ULONG eError = DBaseImport( rMedium.GetPhysicalName(),
+ sal_uLong eError = DBaseImport( rMedium.GetPhysicalName(),
ScGlobal::GetCharsetValue(sItStr), aColWidthParam, *aRecalcRanges.mpRanges );
aRecalcRowRangesArray.push_back(aRecalcRanges);
@@ -1248,11 +1235,11 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
bRet = ( eError == SCWARN_IMPORT_RANGE_OVERFLOW );
}
else
- bRet = TRUE;
+ bRet = sal_True;
aColWidthRange.aStart.SetRow( 1 ); // Spaltenheader nicht
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
+ bSetColWidths = true;
+ bSetSimpleTextColWidths = true;
}
else if (aFltName.EqualsAscii(pFilterDif))
{
@@ -1264,7 +1251,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -1285,14 +1272,14 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bSetColWidths = sal_True;
+ bSetSimpleTextColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else if (aFltName.EqualsAscii(pFilterSylk))
{
@@ -1318,29 +1305,29 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if ( eError != eERR_OK && !GetError() )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bSetColWidths = sal_True;
+ bSetSimpleTextColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else if (aFltName.EqualsAscii(pFilterQPro6))
{
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = sal_True;
FltError eError = ScFormatFilter::Get().ScImportQuattroPro( rMedium, &aDocument);
- ScColumn::bDoubleAlloc = FALSE;
+ ScColumn::bDoubleAlloc = false;
if (eError != eERR_OK)
{
if (!GetError())
SetError( eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
// TODO: Filter should set column widths. Not doing it here, it may
// result in very narrow or wide columns, depending on content.
// Setting row heights makes cells with font size attribution or
// wrapping enabled look nicer..
- bSetRowHeights = TRUE;
+ bSetRowHeights = sal_True;
}
else if (aFltName.EqualsAscii(pFilterRtf))
{
@@ -1359,14 +1346,14 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
aDocument.StartAllListeners();
aDocument.SetDirty();
- bSetColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bSetColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else
{
@@ -1380,7 +1367,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
else if (aFltName.EqualsAscii(pFilterHtml) || aFltName.EqualsAscii(pFilterHtmlWebQ))
{
FltError eError = SCERR_IMPORT_UNKNOWN;
- BOOL bWebQuery = aFltName.EqualsAscii(pFilterHtmlWebQ);
+ sal_Bool bWebQuery = aFltName.EqualsAscii(pFilterHtmlWebQ);
if( !rMedium.IsStorage() )
{
SvStream* pInStream = rMedium.GetInStream();
@@ -1391,7 +1378,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
String aFilterOption = (static_cast<const SfxStringItem*>(pItem))->GetValue();
lcl_parseHtmlFilterOption(aFilterOption, eLang, bDateConvert);
@@ -1410,10 +1397,10 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
aDocument.StartAllListeners();
aDocument.SetDirty();
}
@@ -1433,7 +1420,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
if (!bCalc3)
- aDocument.SetInsertingFromOtherDoc( FALSE );
+ aDocument.SetInsertingFromOtherDoc( false );
}
else
{
@@ -1469,11 +1456,11 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!bSetSimpleTextColWidths)
aColWidthParam[nCol].mbSimpleText = false;
- USHORT nWidth = aDocument.GetOptimalColWidth(
- nCol, nTab, &aVirtDev, nPPTX, nPPTY, aZoom, aZoom, FALSE, &aMark,
+ sal_uInt16 nWidth = aDocument.GetOptimalColWidth(
+ nCol, nTab, &aVirtDev, nPPTX, nPPTY, aZoom, aZoom, false, &aMark,
&aColWidthParam[nCol] );
aDocument.SetColWidth( nCol, nTab,
- nWidth + (USHORT)ScGlobal::nLastColWidthExtra );
+ nWidth + (sal_uInt16)ScGlobal::nLastColWidthExtra );
}
}
}
@@ -1500,7 +1487,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if ( bRet )
aDocument.InvalidateTableArea();
- bIsEmpty = FALSE;
+ bIsEmpty = false;
return bRet;
}
@@ -1544,7 +1531,7 @@ ScDocShell::PrepareSaveGuard::~PrepareSaveGuard()
}
-BOOL ScDocShell::Save()
+sal_Bool ScDocShell::Save()
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Save" );
@@ -1553,14 +1540,14 @@ BOOL ScDocShell::Save()
PrepareSaveGuard aPrepareGuard( *this);
// wait cursor is handled with progress bar
- BOOL bRet = SfxObjectShell::Save();
+ sal_Bool bRet = SfxObjectShell::Save();
if( bRet )
bRet = SaveXML( GetMedium(), NULL );
return bRet;
}
-BOOL ScDocShell::SaveAs( SfxMedium& rMedium )
+sal_Bool ScDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::SaveAs" );
@@ -1582,7 +1569,7 @@ BOOL ScDocShell::SaveAs( SfxMedium& rMedium )
PrepareSaveGuard aPrepareGuard( *this);
// wait cursor is handled with progress bar
- BOOL bRet = SfxObjectShell::SaveAs( rMedium );
+ sal_Bool bRet = SfxObjectShell::SaveAs( rMedium );
if( bRet )
bRet = SaveXML( &rMedium, NULL );
@@ -1590,7 +1577,7 @@ BOOL ScDocShell::SaveAs( SfxMedium& rMedium )
}
-BOOL ScDocShell::IsInformationLost()
+sal_Bool ScDocShell::IsInformationLost()
{
//!!! bei Gelegenheit ein korrekte eigene Behandlung einbauen
@@ -1599,7 +1586,7 @@ BOOL ScDocShell::IsInformationLost()
// Xcl-like column width measured in characters of standard font.
-xub_StrLen lcl_ScDocShell_GetColWidthInChars( USHORT nWidth )
+xub_StrLen lcl_ScDocShell_GetColWidthInChars( sal_uInt16 nWidth )
{
double f = nWidth;
f *= 1328.0 / 25.0;
@@ -1612,7 +1599,7 @@ xub_StrLen lcl_ScDocShell_GetColWidthInChars( USHORT nWidth )
void lcl_ScDocShell_GetFixedWidthString( String& rStr, const ScDocument& rDoc,
- SCTAB nTab, SCCOL nCol, BOOL bValue, SvxCellHorJustify eHorJust )
+ SCTAB nTab, SCCOL nCol, sal_Bool bValue, SvxCellHorJustify eHorJust )
{
xub_StrLen nLen = lcl_ScDocShell_GetColWidthInChars(
rDoc.GetColWidth( nCol, nTab ) );
@@ -1655,7 +1642,7 @@ void lcl_ScDocShell_WriteEmptyFixedWidthString( SvStream& rStream,
const ScDocument& rDoc, SCTAB nTab, SCCOL nCol )
{
String aString;
- lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, FALSE,
+ lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, false,
SVX_HOR_JUSTIFY_STANDARD );
rStream.WriteUnicodeOrByteText( aString );
}
@@ -1666,23 +1653,26 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
sal_Unicode cDelim = rAsciiOpt.nFieldSepCode;
sal_Unicode cStrDelim = rAsciiOpt.nTextSepCode;
CharSet eCharSet = rAsciiOpt.eCharSet;
- BOOL bFixedWidth = rAsciiOpt.bFixedWidth;
- BOOL bSaveAsShown = rAsciiOpt.bSaveAsShown;
+ sal_Bool bFixedWidth = rAsciiOpt.bFixedWidth;
+ sal_Bool bSaveAsShown = rAsciiOpt.bSaveAsShown;
CharSet eOldCharSet = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eCharSet );
- USHORT nOldNumberFormatInt = rStream.GetNumberFormatInt();
+ sal_uInt16 nOldNumberFormatInt = rStream.GetNumberFormatInt();
ByteString aStrDelimEncoded; // only used if not Unicode
UniString aStrDelimDecoded; // only used if context encoding
- BOOL bContextOrNotAsciiEncoding;
+ ByteString aDelimEncoded;
+ UniString aDelimDecoded;
+ sal_Bool bContextOrNotAsciiEncoding;
if ( eCharSet == RTL_TEXTENCODING_UNICODE )
{
rStream.StartWritingUnicodeText();
- bContextOrNotAsciiEncoding = FALSE;
+ bContextOrNotAsciiEncoding = false;
}
else
{
aStrDelimEncoded = ByteString( cStrDelim, eCharSet );
+ aDelimEncoded = ByteString( cDelim, eCharSet );
rtl_TextEncodingInfo aInfo;
aInfo.StructSize = sizeof(aInfo);
if ( rtl_getTextEncodingInfo( eCharSet, &aInfo ) )
@@ -1691,10 +1681,13 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
(((aInfo.Flags & RTL_TEXTENCODING_INFO_CONTEXT) != 0) ||
((aInfo.Flags & RTL_TEXTENCODING_INFO_ASCII) == 0));
if ( bContextOrNotAsciiEncoding )
+ {
aStrDelimDecoded = String( aStrDelimEncoded, eCharSet );
+ aDelimDecoded = String( aDelimEncoded, eCharSet );
+ }
}
else
- bContextOrNotAsciiEncoding = FALSE;
+ bContextOrNotAsciiEncoding = false;
}
SCCOL nStartCol = 0;
@@ -1712,8 +1705,8 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
const ScViewOptions& rOpt = (pViewSh)
? pViewSh->GetViewData()->GetOptions()
: aDocument.GetViewOptions();
- BOOL bShowFormulas = rOpt.GetOption( VOPT_FORMULAS );
- BOOL bTabProtect = aDocument.IsTabProtected( nTab );
+ sal_Bool bShowFormulas = rOpt.GetOption( VOPT_FORMULAS );
+ sal_Bool bTabProtect = aDocument.IsTabProtected( nTab );
SCCOL nCol;
SCROW nRow;
@@ -1728,10 +1721,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
ScBaseCell* pCell;
while ( ( pCell = aIter.GetNext( nCol, nRow ) ) != NULL )
{
- BOOL bProgress = FALSE; // only upon line change
+ sal_Bool bProgress = false; // only upon line change
if ( nNextRow < nRow )
{ // empty rows or/and empty columns up to end of row
- bProgress = TRUE;
+ bProgress = sal_True;
for ( nEmptyCol = nNextCol; nEmptyCol < nEndCol; nEmptyCol++ )
{ // remaining columns of last row
if ( bFixedWidth )
@@ -1777,7 +1770,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
if ( nCol == nEndCol )
{
- bProgress = TRUE;
+ bProgress = sal_True;
nNextCol = nStartCol;
nNextRow = nRow + 1;
}
@@ -1795,26 +1788,26 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
pProtAttr->GetHideFormula() ) )
eType = CELLTYPE_NONE; // hide
}
- BOOL bString;
+ sal_Bool bString;
switch ( eType )
{
case CELLTYPE_NOTE:
case CELLTYPE_NONE:
aString.Erase();
- bString = FALSE;
+ bString = false;
break;
case CELLTYPE_FORMULA :
{
- USHORT nErrCode;
+ sal_uInt16 nErrCode;
if ( bShowFormulas )
{
((ScFormulaCell*)pCell)->GetFormula( aString );
- bString = TRUE;
+ bString = sal_True;
}
else if ( ( nErrCode = ((ScFormulaCell*)pCell)->GetErrCode() ) != 0 )
{
aString = ScGlobal::GetErrorString( nErrCode );
- bString = TRUE;
+ bString = sal_True;
}
else if ( ((ScFormulaCell*)pCell)->IsValue() )
{
@@ -1829,7 +1822,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
else
{
ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter );
- bString = FALSE;
+ bString = false;
}
}
else
@@ -1843,7 +1836,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
((ScFormulaCell*)pCell)->GetString( aString );
- bString = TRUE;
+ bString = sal_True;
}
}
break;
@@ -1857,7 +1850,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
((ScStringCell*)pCell)->GetString( aString );
- bString = TRUE;
+ bString = sal_True;
break;
case CELLTYPE_EDIT :
{
@@ -1866,7 +1859,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
EditEngine& rEngine = aDocument.GetEditEngine();
rEngine.SetText( *pObj);
aString = rEngine.GetText(); // including LF
- bString = TRUE;
+ bString = sal_True;
}
break;
case CELLTYPE_VALUE :
@@ -1882,14 +1875,14 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
else
{
ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter );
- bString = FALSE;
+ bString = false;
}
}
break;
default:
OSL_FAIL( "ScDocShell::AsciiSave: unknown CellType" );
aString.Erase();
- bString = FALSE;
+ bString = false;
}
if ( bFixedWidth )
@@ -1919,14 +1912,21 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( eCharSet == RTL_TEXTENCODING_UNICODE )
{
xub_StrLen nPos = aString.Search( cStrDelim );
+ // #i116636# quotes are needed if text delimiter (quote), field delimiter, or LF is in the cell text
+ bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
+ ( nPos != STRING_NOTFOUND ) ||
+ ( aString.Search( cDelim ) != STRING_NOTFOUND ) ||
+ ( aString.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND );
while ( nPos != STRING_NOTFOUND )
{
aString.Insert( cStrDelim, nPos );
nPos = aString.Search( cStrDelim, nPos+2 );
}
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
rStream.WriteUnicodeText( aString );
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
}
else
{
@@ -1952,6 +1952,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
UniString aStrDec( aStrEnc, eCharSet );
// search on re-decoded string
xub_StrLen nPos = aStrDec.Search( aStrDelimDecoded );
+ bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
+ ( nPos != STRING_NOTFOUND ) ||
+ ( aStrDec.Search( aDelimDecoded ) != STRING_NOTFOUND ) ||
+ ( aStrDec.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND );
while ( nPos != STRING_NOTFOUND )
{
aStrDec.Insert( aStrDelimDecoded, nPos );
@@ -1959,15 +1963,21 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
nPos+1+aStrDelimDecoded.Len() );
}
// write byte re-encoded
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
rStream.WriteUnicodeOrByteText( aStrDec, eCharSet );
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
}
else
{
ByteString aStrEnc( aString, eCharSet );
// search on encoded string
xub_StrLen nPos = aStrEnc.Search( aStrDelimEncoded );
+ bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
+ ( nPos != STRING_NOTFOUND ) ||
+ ( aStrEnc.Search( aDelimEncoded ) != STRING_NOTFOUND ) ||
+ ( aStrEnc.Search( sal_Char(_LF) ) != STRING_NOTFOUND );
while ( nPos != STRING_NOTFOUND )
{
aStrEnc.Insert( aStrDelimEncoded, nPos );
@@ -1975,11 +1985,13 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
nPos+1+aStrDelimEncoded.Len() );
}
// write byte encoded
- rStream.Write( aStrDelimEncoded.GetBuffer(),
- aStrDelimEncoded.Len() );
+ if ( bNeedQuotes )
+ rStream.Write( aStrDelimEncoded.GetBuffer(),
+ aStrDelimEncoded.Len() );
rStream.Write( aStrEnc.GetBuffer(), aStrEnc.Len() );
- rStream.Write( aStrDelimEncoded.GetBuffer(),
- aStrDelimEncoded.Len() );
+ if ( bNeedQuotes )
+ rStream.Write( aStrDelimEncoded.GetBuffer(),
+ aStrDelimEncoded.Len() );
}
}
}
@@ -2033,7 +2045,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
rStream.SetNumberFormatInt( nOldNumberFormatInt );
}
-BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
+sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertTo" );
@@ -2049,7 +2061,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
DBG_ASSERT( rMed.GetFilter(), "Filter == 0" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
String aFltName = rMed.GetFilter()->GetFilterName();
if (aFltName.EqualsAscii(pFilterXML))
@@ -2123,7 +2135,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2140,7 +2152,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
WaitObject aWait( GetActiveDialogParent() );
ScImportOptions aOptions( sItStr );
AsciiSave( *pStream, aOptions );
- bRet = TRUE;
+ bRet = sal_True;
if (aDocument.GetTableCount() > 1)
if (!rMed.GetError())
@@ -2153,7 +2165,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sCharSet = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2169,9 +2181,9 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
WaitObject aWait( GetActiveDialogParent() );
// HACK damit Sba geoffnetes TempFile ueberschreiben kann
rMed.CloseOutStream();
- BOOL bHasMemo = FALSE;
+ sal_Bool bHasMemo = false;
- ULONG eError = DBaseExport( rMed.GetPhysicalName(),
+ sal_uLong eError = DBaseExport( rMed.GetPhysicalName(),
ScGlobal::GetCharsetValue(sCharSet), bHasMemo );
if ( eError != eERR_OK && (eError & ERRCODE_WARNING_MASK) )
@@ -2191,7 +2203,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
}
else
{
- bRet = TRUE;
+ bRet = sal_True;
if ( bHasMemo )
{
SfxStringItem* pNameItem =
@@ -2199,9 +2211,9 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
INetURLObject aDbtFile( pNameItem->GetValue(), INET_PROT_FILE );
aDbtFile.setExtension( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("dbt")) );
if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) )
- bRet = FALSE;
+ bRet = false;
if ( bRet && !MoveFile( aTmpFile, aDbtFile ) )
- bRet = FALSE;
+ bRet = false;
if ( !bRet )
{
KillFile( aTmpFile );
@@ -2220,7 +2232,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2236,7 +2248,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
WaitObject aWait( GetActiveDialogParent() );
ScFormatFilter::Get().ScExportDif( *pStream, &aDocument, ScAddress(0,0,0),
ScGlobal::GetCharsetValue(sItStr) );
- bRet = TRUE;
+ bRet = sal_True;
if (aDocument.GetTableCount() > 1)
if (!rMed.GetError())
@@ -2256,7 +2268,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
ScRange aRange( 0,0,0, nEndCol,nEndRow,0 );
ScImportExport aImExport( &aDocument, aRange );
- aImExport.SetFormulas( TRUE );
+ aImExport.SetFormulas( sal_True );
bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SOT_FORMATSTR_ID_SYLK );
}
}
@@ -2285,15 +2297,15 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
}
-BOOL ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
+sal_Bool ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
{
return SfxObjectShell::SaveCompleted( xStor );
}
-BOOL ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
+sal_Bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
{
- BOOL bRet = SfxObjectShell::DoSaveCompleted( pNewStor );
+ sal_Bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor );
// SC_HINT_DOC_SAVED fuer Wechsel ReadOnly -> Read/Write
Broadcast( SfxSimpleHint( SC_HINT_DOC_SAVED ) );
@@ -2301,7 +2313,7 @@ BOOL ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
}
-sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
+sal_Bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId )
{
// #i112634# ask VBA event handlers whether to save or print the document
@@ -2331,7 +2343,7 @@ sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
}
catch( util::VetoException& )
{
- bSlotExecutable = sal_False;
+ bSlotExecutable = false;
}
catch( uno::Exception& )
{
@@ -2340,7 +2352,7 @@ sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
}
-USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 ScDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
if(SC_MOD()->GetCurRefDlgId()>0)
{
@@ -2356,12 +2368,12 @@ USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
}
}
- return FALSE;
+ return false;
}
if ( aDocument.IsInLinkUpdate() || aDocument.IsInInterpreter() )
{
ErrorMessage(STR_CLOSE_ERROR_LINK);
- return FALSE;
+ return false;
}
DoEnterHandler();
@@ -2378,7 +2390,7 @@ USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
catch( util::VetoException& )
{
// if event processor throws VetoException, macro has vetoed close
- return sal_False;
+ return false;
}
catch( uno::Exception& )
{
@@ -2386,9 +2398,9 @@ USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
}
// end handler code
- USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if (nRet == TRUE) // TRUE = schliessen
- aDocument.DisableIdle(TRUE); // nicht mehr drin rumpfuschen !!!
+ sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
+ if (nRet == sal_True) // sal_True = schliessen
+ aDocument.DisableIdle(sal_True); // nicht mehr drin rumpfuschen !!!
return nRet;
}
@@ -2442,9 +2454,9 @@ String ScDocShell::GetDifFilterName()
return String::CreateFromAscii(pFilterDif);
}
-BOOL ScDocShell::HasAutomaticTableName( const String& rFilter )
+sal_Bool ScDocShell::HasAutomaticTableName( const String& rFilter )
{
- // TRUE for those filters that keep the default table name
+ // sal_True for those filters that keep the default table name
// (which is language specific)
return rFilter.EqualsAscii( pFilterAscii )
@@ -2465,15 +2477,15 @@ BOOL ScDocShell::HasAutomaticTableName( const String& rFilter )
aDdeTextFmt(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TEXT"))), \
nPrtToScreenFactor( 1.0 ), \
pImpl ( new DocShell_Impl ), \
- bHeaderOn ( TRUE ), \
- bFooterOn ( TRUE ), \
- bNoInformLost ( TRUE ), \
- bIsEmpty ( TRUE ), \
- bIsInUndo ( FALSE ), \
- bDocumentModifiedPending( FALSE ), \
+ bHeaderOn ( sal_True ), \
+ bFooterOn ( sal_True ), \
+ bNoInformLost ( sal_True ), \
+ bIsEmpty ( sal_True ), \
+ bIsInUndo ( false ), \
+ bDocumentModifiedPending( false ), \
nDocumentLock ( 0 ), \
nCanUpdate (com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG), \
- bUpdateEnabled ( TRUE ), \
+ bUpdateEnabled ( sal_True ), \
pOldAutoDBRange ( NULL ), \
pDocHelper ( NULL ), \
pAutoStyleList ( NULL ), \
@@ -2588,7 +2600,7 @@ SfxUndoManager* ScDocShell::GetUndoManager()
return aDocument.GetUndoManager();
}
-void ScDocShell::SetModified( BOOL bModified )
+void ScDocShell::SetModified( sal_Bool bModified )
{
if ( SfxObjectShell::IsEnableSetModified() )
{
@@ -2598,7 +2610,7 @@ void ScDocShell::SetModified( BOOL bModified )
}
-void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
+void ScDocShell::SetDocumentModified( sal_Bool bIsModified /* = sal_True */ )
{
// BroadcastUno muss auch mit pPaintLockData sofort passieren
//! auch bei SetDrawModified, wenn Drawing angebunden ist
@@ -2607,6 +2619,7 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
if ( pPaintLockData && bIsModified )
{
//! BCA_BRDCST_ALWAYS etc. also needed here?
+ aDocument.InvalidateTableArea(); // #i105279# needed here
aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
pPaintLockData->SetModified(); // spaeter...
@@ -2618,16 +2631,16 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
if ( bIsModified )
{
if ( aDocument.IsAutoCalcShellDisabled() )
- SetDocumentModifiedPending( TRUE );
+ SetDocumentModifiedPending( sal_True );
else
{
- SetDocumentModifiedPending( FALSE );
+ SetDocumentModifiedPending( false );
aDocument.InvalidateStyleSheetUsage();
aDocument.InvalidateTableArea();
aDocument.InvalidateLastTableOpParams();
aDocument.Broadcast( SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS, NULL );
if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() )
- aDocument.CalcFormulaTree( TRUE );
+ aDocument.CalcFormulaTree( sal_True );
PostDataChanged();
// Detective AutoUpdate:
@@ -2639,9 +2652,9 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
if ( pList && ( aDocument.IsDetectiveDirty() || pList->HasAddError() ) &&
pList->Count() && !IsInUndo() && SC_MOD()->GetAppOptions().GetDetectiveAuto() )
{
- GetDocFunc().DetectiveRefresh(TRUE); // TRUE = caused by automatic update
+ GetDocFunc().DetectiveRefresh(sal_True); // sal_True = caused by automatic update
}
- aDocument.SetDetectiveDirty(FALSE); // always reset, also if not refreshed
+ aDocument.SetDetectiveDirty(false); // always reset, also if not refreshed
}
// notify UNO objects after BCA_BRDCST_ALWAYS etc.
@@ -2653,9 +2666,9 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
// (Drawing muss auch beim normalen SetDocumentModified upgedated werden,
// z.B. bei Tabelle loeschen etc.)
-void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
+void ScDocShell::SetDrawModified( sal_Bool bIsModified /* = sal_True */ )
{
- BOOL bUpdate = ( bIsModified != IsModified() );
+ sal_Bool bUpdate = ( bIsModified != IsModified() );
SetModified( bIsModified );
@@ -2690,7 +2703,7 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
}
}
-void ScDocShell::SetInUndo(BOOL bSet)
+void ScDocShell::SetInUndo(sal_Bool bSet)
{
bIsInUndo = bSet;
}
@@ -2705,8 +2718,8 @@ void ScDocShell::GetDocStat( ScDocStat& rDocStat )
if ( pPrinter )
for ( SCTAB i=0; i<rDocStat.nTableCount; i++ )
- rDocStat.nPageCount = sal::static_int_cast<USHORT>( rDocStat.nPageCount +
- (USHORT) ScPrintFunc( this, pPrinter, i ).GetTotalPages() );
+ rDocStat.nPageCount = sal::static_int_cast<sal_uInt16>( rDocStat.nPageCount +
+ (sal_uInt16) ScPrintFunc( this, pPrinter, i ).GetTotalPages() );
}
@@ -2879,7 +2892,7 @@ void ScDocShell::UseSheetSaveEntries()
for (nTab = 0; nTab < nTabCount; ++nTab)
if (aDocument.IsStreamValid(nTab))
- aDocument.SetStreamValid(nTab, FALSE);
+ aDocument.SetStreamValid(nTab, false);
}
}
}
@@ -2894,8 +2907,8 @@ ScDocShellModificator::ScDocShellModificator( ScDocShell& rDS )
ScDocument* pDoc = rDocShell.GetDocument();
bAutoCalcShellDisabled = pDoc->IsAutoCalcShellDisabled();
bIdleDisabled = pDoc->IsIdleDisabled();
- pDoc->SetAutoCalcShellDisabled( TRUE );
- pDoc->DisableIdle( TRUE );
+ pDoc->SetAutoCalcShellDisabled( sal_True );
+ pDoc->DisableIdle( sal_True );
}
@@ -2915,7 +2928,7 @@ void ScDocShellModificator::SetDocumentModified()
if ( !pDoc->IsImportingXML() )
{
// AutoCalcShellDisabled temporaer restaurieren
- BOOL bDisabled = pDoc->IsAutoCalcShellDisabled();
+ sal_Bool bDisabled = pDoc->IsAutoCalcShellDisabled();
pDoc->SetAutoCalcShellDisabled( bAutoCalcShellDisabled );
rDocShell.SetDocumentModified();
pDoc->SetAutoCalcShellDisabled( bDisabled );
@@ -2936,7 +2949,7 @@ sal_Bool ScDocShell::AcceptStateUpdate() const
if( SC_MOD()->Find1RefWindow( SFX_APP()->GetTopWindow() ) )
return sal_True;
- return sal_False;
+ return false;
}
@@ -2965,7 +2978,7 @@ void ScDocShell::SetChangeRecording( bool bActivate )
{
aDocument.StartChangeTracking();
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
aDocument.SetChangeViewSettings(aChangeViewSet);
}
else
@@ -2980,7 +2993,7 @@ void ScDocShell::SetChangeRecording( bool bActivate )
// Slots invalidieren
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
- pBindings->InvalidateAll(FALSE);
+ pBindings->InvalidateAll(false);
}
}
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index d4d581dc7783..52d99479f27d 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -68,22 +68,22 @@ using namespace com::sun::star;
//------------------------------------------------------------------
-BOOL ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
+sal_Bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::InitNew" );
- BOOL bRet = SfxObjectShell::InitNew( xStor );
+ sal_Bool bRet = SfxObjectShell::InitNew( xStor );
aDocument.MakeTable(0);
// zusaetzliche Tabellen werden von der ersten View angelegt,
- // wenn bIsEmpty dann noch TRUE ist
+ // wenn bIsEmpty dann noch sal_True ist
if( bRet )
{
Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ),
(long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) );
// hier muss auch der Start angepasst werden
- SetVisAreaOrSize( Rectangle( Point(), aSize ), TRUE );
+ SetVisAreaOrSize( Rectangle( Point(), aSize ), sal_True );
}
aDocument.SetDrawDefaults(); // drawing layer defaults that are set only in InitNew
@@ -104,13 +104,13 @@ BOOL ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
//------------------------------------------------------------------
-BOOL ScDocShell::IsEmpty() const
+sal_Bool ScDocShell::IsEmpty() const
{
return bIsEmpty;
}
-void ScDocShell::SetEmpty(BOOL bSet)
+void ScDocShell::SetEmpty(sal_Bool bSet)
{
bIsEmpty = bSet;
}
@@ -151,7 +151,7 @@ void ScDocShell::InitItems()
!aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning() )
{
// get settings from SvxAsianConfig
- SvxAsianConfig aAsian( sal_False );
+ SvxAsianConfig aAsian( false );
if ( !aDocument.GetForbiddenCharacters().is() )
{
@@ -179,7 +179,7 @@ void ScDocShell::InitItems()
if ( !aDocument.IsValidAsianCompression() )
{
// set compression mode from configuration if not already set (e.g. XML import)
- aDocument.SetAsianCompression( sal::static_int_cast<BYTE>( aAsian.GetCharDistanceCompression() ) );
+ aDocument.SetAsianCompression( sal::static_int_cast<sal_uInt8>( aAsian.GetCharDistanceCompression() ) );
}
if ( !aDocument.IsValidAsianKerning() )
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index a9e79b46e86f..87ae56cceb38 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -111,8 +111,8 @@ void ScDocShell::PostDataChanged()
}
void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, USHORT nPart,
- USHORT nExtFlags )
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, sal_uInt16 nPart,
+ sal_uInt16 nExtFlags )
{
if (!ValidCol(nStartCol)) nStartCol = MAXCOL;
if (!ValidRow(nStartRow)) nStartRow = MAXROW;
@@ -123,7 +123,7 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
{
// #i54081# PAINT_EXTRAS still has to be brodcast because it changes the
// current sheet if it's invalid. All other flags added to pPaintLockData.
- USHORT nLockPart = nPart & ~PAINT_EXTRAS;
+ sal_uInt16 nLockPart = nPart & ~PAINT_EXTRAS;
if ( nLockPart )
{
//! nExtFlags ???
@@ -173,7 +173,7 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
aDocument.ResetChanged( ScRange(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) );
}
-void ScDocShell::PostPaint( const ScRange& rRange, USHORT nPart, USHORT nExtFlags )
+void ScDocShell::PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags )
{
PostPaint( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -200,7 +200,7 @@ void ScDocShell::PostPaintExtras()
PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS );
}
-void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange )
+void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange )
{
if ( ( rExtFlags & SC_PF_LINES ) == 0 && aDocument.HasAttrib( rRange, HASATTR_PAINTEXT ) )
{
@@ -224,7 +224,7 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange )
}
}
-void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
+void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab )
{
UpdatePaintExt( rExtFlags, ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ) );
@@ -232,14 +232,14 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStar
//------------------------------------------------------------------
-void ScDocShell::LockPaint_Impl(BOOL bDoc)
+void ScDocShell::LockPaint_Impl(sal_Bool bDoc)
{
if ( !pPaintLockData )
pPaintLockData = new ScPaintLockData(0); //! Modus...
pPaintLockData->IncLevel(bDoc);
}
-void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
+void ScDocShell::UnlockPaint_Impl(sal_Bool bDoc)
{
if ( pPaintLockData )
{
@@ -255,7 +255,7 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
ScRangeListRef xRangeList = pPaint->GetRangeList();
if (xRangeList)
{
- USHORT nParts = pPaint->GetParts();
+ sal_uInt16 nParts = pPaint->GetParts();
for ( size_t i = 0, nCount = xRangeList->size(); i < nCount; i++ )
{
//! nExtFlags ???
@@ -278,7 +278,7 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
}
}
-void ScDocShell::LockDocument_Impl(USHORT nNew)
+void ScDocShell::LockDocument_Impl(sal_uInt16 nNew)
{
if (!nDocumentLock)
{
@@ -289,7 +289,7 @@ void ScDocShell::LockDocument_Impl(USHORT nNew)
nDocumentLock = nNew;
}
-void ScDocShell::UnlockDocument_Impl(USHORT nNew)
+void ScDocShell::UnlockDocument_Impl(sal_uInt16 nNew)
{
nDocumentLock = nNew;
if (!nDocumentLock)
@@ -300,41 +300,41 @@ void ScDocShell::UnlockDocument_Impl(USHORT nNew)
}
}
-USHORT ScDocShell::GetLockCount() const
+sal_uInt16 ScDocShell::GetLockCount() const
{
return nDocumentLock;
}
-void ScDocShell::SetLockCount(USHORT nNew)
+void ScDocShell::SetLockCount(sal_uInt16 nNew)
{
if (nNew) // setzen
{
if ( !pPaintLockData )
pPaintLockData = new ScPaintLockData(0); //! Modus...
- pPaintLockData->SetLevel(nNew-1, TRUE);
+ pPaintLockData->SetLevel(nNew-1, sal_True);
LockDocument_Impl(nNew);
}
else if (pPaintLockData) // loeschen
{
- pPaintLockData->SetLevel(0, TRUE); // bei Unlock sofort ausfuehren
- UnlockPaint_Impl(TRUE); // jetzt
+ pPaintLockData->SetLevel(0, sal_True); // bei Unlock sofort ausfuehren
+ UnlockPaint_Impl(sal_True); // jetzt
UnlockDocument_Impl(0);
}
}
void ScDocShell::LockPaint()
{
- LockPaint_Impl(FALSE);
+ LockPaint_Impl(false);
}
void ScDocShell::UnlockPaint()
{
- UnlockPaint_Impl(FALSE);
+ UnlockPaint_Impl(false);
}
void ScDocShell::LockDocument()
{
- LockPaint_Impl(TRUE);
+ LockPaint_Impl(sal_True);
LockDocument_Impl(nDocumentLock + 1);
}
@@ -342,7 +342,7 @@ void ScDocShell::UnlockDocument()
{
if (nDocumentLock)
{
- UnlockPaint_Impl(TRUE);
+ UnlockPaint_Impl(sal_True);
UnlockDocument_Impl(nDocumentLock - 1);
}
else
@@ -353,7 +353,7 @@ void ScDocShell::UnlockDocument()
//------------------------------------------------------------------
-void ScDocShell::SetInplace( BOOL bInplace )
+void ScDocShell::SetInplace( sal_Bool bInplace )
{
if (bIsInplace != bInplace)
{
@@ -370,7 +370,7 @@ void ScDocShell::CalcOutputFactor()
return;
}
- BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
if (bTextWysiwyg)
{
nPrtToScreenFactor = 1.0;
@@ -423,8 +423,8 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
{
// Einstellungen aus dem SpellCheckCfg kommen in Doc- und ViewOptions
- USHORT nDefLang, nCjkLang, nCtlLang;
- BOOL bAutoSpell;
+ sal_uInt16 nDefLang, nCjkLang, nCtlLang;
+ sal_Bool bAutoSpell;
ScModule::GetSpellSettings( nDefLang, nCjkLang, nCtlLang, bAutoSpell );
ScModule* pScMod = SC_MOD();
@@ -433,7 +433,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
aDocOpt.SetAutoSpell( bAutoSpell );
// zweistellige Jahreszahleneingabe aus Extras->Optionen->Allgemein->Sonstiges
- aDocOpt.SetYear2000( sal::static_int_cast<USHORT>( ::utl::MiscCfg().GetYear2000() ) );
+ aDocOpt.SetYear2000( sal::static_int_cast<sal_uInt16>( ::utl::MiscCfg().GetYear2000() ) );
if (bForLoading)
{
@@ -458,7 +458,7 @@ Printer* ScDocShell::GetDocumentPrinter() // fuer OLE
return aDocument.GetPrinter();
}
-SfxPrinter* ScDocShell::GetPrinter(BOOL bCreateIfNotExist)
+SfxPrinter* ScDocShell::GetPrinter(sal_Bool bCreateIfNotExist)
{
return aDocument.GetPrinter(bCreateIfNotExist);
}
@@ -467,7 +467,7 @@ void ScDocShell::UpdateFontList()
{
delete pImpl->pFontList;
// pImpl->pFontList = new FontList( GetPrinter(), Application::GetDefaultDevice() );
- pImpl->pFontList = new FontList( GetRefDevice(), NULL, FALSE ); // FALSE or TRUE???
+ pImpl->pFontList = new FontList( GetRefDevice(), NULL, false ); // sal_False or sal_True???
SvxFontListItem aFontListItem( pImpl->pFontList, SID_ATTR_CHAR_FONTLIST );
PutItem( aFontListItem );
@@ -479,9 +479,9 @@ OutputDevice* ScDocShell::GetRefDevice()
return aDocument.GetRefDevice();
}
-USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
+sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags )
{
- SfxPrinter *pOld = aDocument.GetPrinter( FALSE );
+ SfxPrinter *pOld = aDocument.GetPrinter( false );
if ( pOld && pOld->IsPrinting() )
return SFX_PRINTERROR_BUSY;
@@ -552,8 +552,8 @@ USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
if (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION)
{
const SvxPageItem& rOldItem = (const SvxPageItem&)rSet.Get(ATTR_PAGE);
- BOOL bWasLand = rOldItem.IsLandscape();
- BOOL bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE );
+ sal_Bool bWasLand = rOldItem.IsLandscape();
+ sal_Bool bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE );
if (bNewLand != bWasLand)
{
SvxPageItem aNewItem( rOldItem );
@@ -660,13 +660,13 @@ void ScDocShell::SetChangeComment( ScChangeAction* pAction, const String& rComme
ScChangeTrack* pTrack = GetDocument()->GetChangeTrack();
if (pTrack)
{
- ULONG nNumber = pAction->GetActionNumber();
+ sal_uLong nNumber = pAction->GetActionNumber();
pTrack->NotifyModified( SC_CTM_CHANGE, nNumber, nNumber );
}
}
}
-void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext)
+void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,sal_Bool bPrevNext)
{
if (!pAction) return; // ohne Aktion ist nichts..
@@ -676,7 +676,7 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pP
DateTime aDT = pAction->GetDateTime();
String aDate = ScGlobal::pLocaleData->getDate( aDT );
aDate += ' ';
- aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE );
+ aDate += ScGlobal::pLocaleData->getTime( aDT, false, false );
SfxItemSet aSet( GetPool(),
SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR,
@@ -728,7 +728,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
if (pOtherMed)
aOtherFile = pOtherMed->GetName();
}
- BOOL bSameDoc = ( aThisFile == aOtherFile && aThisFile.Len() );
+ sal_Bool bSameDoc = ( aThisFile == aOtherFile && aThisFile.Len() );
if ( !bSameDoc )
{
// create change actions from comparing with the name of the user
@@ -764,7 +764,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
//
//---------------------------------------------------------------------
-inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL bIgnore100Sec )
+inline sal_Bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, sal_Bool bIgnore100Sec )
{
return pA && pB &&
pA->GetActionNumber() == pB->GetActionNumber() &&
@@ -776,14 +776,14 @@ inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL
// State nicht vergleichen, falls eine alte Aenderung akzeptiert wurde
}
-bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, BOOL bIgnore100Sec )
+bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, sal_Bool bIgnore100Sec )
{
if ( !pDoc || !pAction || !pSearchDoc || !pFirstSearchAction || !pLastSearchAction )
{
return false;
}
- ULONG nLastSearchAction = pLastSearchAction->GetActionNumber();
+ sal_uLong nLastSearchAction = pLastSearchAction->GetActionNumber();
const ScChangeAction* pA = pFirstSearchAction;
while ( pA && pA->GetActionNumber() <= nLastSearchAction )
{
@@ -795,9 +795,9 @@ bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument
pAction->GetBigRange() == pA->GetBigRange() )
{
String aActionDesc;
- pAction->GetDescription( aActionDesc, pDoc, TRUE );
+ pAction->GetDescription( aActionDesc, pDoc, sal_True );
String aADesc;
- pA->GetDescription( aADesc, pSearchDoc, TRUE );
+ pA->GetDescription( aADesc, pSearchDoc, sal_True );
if ( aActionDesc.Equals( aADesc ) )
{
OSL_FAIL( "lcl_FindAction(): found equal action!" );
@@ -810,9 +810,9 @@ bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument
return false;
}
-void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheckDuplicates, ULONG nOffset, ScChangeActionMergeMap* pMergeMap, bool bInverseMap )
+void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheckDuplicates, sal_uLong nOffset, ScChangeActionMergeMap* pMergeMap, bool bInverseMap )
{
- ScTabViewShell* pViewSh = GetBestViewShell( FALSE ); //! Funktionen an die DocShell
+ ScTabViewShell* pViewSh = GetBestViewShell( false ); //! Funktionen an die DocShell
if (!pViewSh)
return;
@@ -830,17 +830,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{
// visuelles RedLining einschalten
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
aDocument.SetChangeViewSettings(aChangeViewSet);
}
}
// include 100th seconds in compare?
- BOOL bIgnore100Sec = !pSourceTrack->IsTime100thSeconds() ||
+ sal_Bool bIgnore100Sec = !pSourceTrack->IsTime100thSeconds() ||
!pThisTrack->IsTime100thSeconds();
// gemeinsame Ausgangsposition suchen
- ULONG nFirstNewNumber = 0;
+ sal_uLong nFirstNewNumber = 0;
const ScChangeAction* pSourceAction = pSourceTrack->GetFirst();
const ScChangeAction* pThisAction = pThisTrack->GetFirst();
// skip identical actions
@@ -863,7 +863,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
const ScChangeAction* pLastSearchAction = pThisTrack->GetLast();
// MergeChangeData aus den folgenden Aktionen erzeugen
- ULONG nNewActionCount = 0;
+ sal_uLong nNewActionCount = 0;
const ScChangeAction* pCount = pSourceAction;
while ( pCount )
{
@@ -879,7 +879,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")),
nNewActionCount );
- ULONG nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber();
+ sal_uLong nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber();
// UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand
pSourceTrack->MergePrepare( (ScChangeAction*) pFirstMergeAction, bShared );
@@ -905,7 +905,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
const ScChangeActionDel* pDel = (const ScChangeActionDel*) pThisAction;
if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
{ // deleted Table enthaelt deleted Cols, die nicht
- ULONG nStart, nEnd;
+ sal_uLong nStart, nEnd;
pSourceTrack->AppendDeleteRange(
pDel->GetOverAllRange().MakeRange(), NULL, nStart, nEnd );
}
@@ -930,9 +930,9 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
LockPaint(); // #i73877# no repainting after each action
// MergeChangeData in das aktuelle Dokument uebernehmen
- BOOL bHasRejected = FALSE;
+ sal_Bool bHasRejected = false;
String aOldUser = pThisTrack->GetUser();
- pThisTrack->SetUseFixDateTime( TRUE );
+ pThisTrack->SetUseFixDateTime( sal_True );
ScMarkData& rMarkData = pViewSh->GetViewData()->GetMarkData();
ScMarkData aOldMarkData( rMarkData );
pSourceAction = pFirstMergeAction;
@@ -981,10 +981,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
pThisTrack->SetUser( pSourceAction->GetUser() );
pThisTrack->SetFixDateTimeUTC( pSourceAction->GetDateTimeUTC() );
- ULONG nOldActionMax = pThisTrack->GetActionMax();
+ sal_uLong nOldActionMax = pThisTrack->GetActionMax();
bool bExecute = true;
- ULONG nReject = pSourceAction->GetRejectAction();
+ sal_uLong nReject = pSourceAction->GetRejectAction();
if ( nReject )
{
if ( bShared )
@@ -997,7 +997,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pOldAction && pOldAction->IsVirgin() )
{
pThisTrack->Reject( pOldAction );
- bHasRejected = TRUE;
+ bHasRejected = sal_True;
bExecute = false;
}
}
@@ -1012,7 +1012,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
//! oder Reject-Aenderung normal ausfuehren
pThisTrack->Reject(pOldAction);
- bHasRejected = TRUE; // fuer Paint
+ bHasRejected = sal_True; // fuer Paint
}
bExecute = false;
}
@@ -1034,7 +1034,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
ScAddress aPos = aSourceRange.aStart;
String aValue;
((const ScChangeActionContent*)pSourceAction)->GetNewString( aValue );
- BYTE eMatrix = MM_NONE;
+ sal_uInt8 eMatrix = MM_NONE;
const ScBaseCell* pCell = ((const ScChangeActionContent*)pSourceAction)->GetNewCell();
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
eMatrix = ((const ScFormulaCell*)pCell)->GetMatrixFlag();
@@ -1053,7 +1053,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
aValue.Erase( 0, 1 );
aValue.Erase( aValue.Len()-1, 1 );
GetDocFunc().EnterMatrix( aSourceRange,
- NULL, NULL, aValue, FALSE, FALSE,
+ NULL, NULL, aValue, false, false,
EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT );
}
break;
@@ -1072,17 +1072,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{
String aName;
aDocument.CreateValidTabName( aName );
- GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, TRUE, FALSE );
+ GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, sal_True, false );
}
break;
case SC_CAT_INSERT_ROWS:
- GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, TRUE, FALSE );
+ GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, sal_True, false );
break;
case SC_CAT_INSERT_COLS:
- GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, TRUE, FALSE );
+ GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, sal_True, false );
break;
case SC_CAT_DELETE_TABS :
- GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), TRUE, FALSE );
+ GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), sal_True, false );
break;
case SC_CAT_DELETE_ROWS:
{
@@ -1090,7 +1090,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, NULL, DEL_DELROWS, sal_True, false );
// #i101099# [Collaboration] Changes are not correctly shown
if ( bShared )
@@ -1110,7 +1110,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, NULL, DEL_DELCOLS, sal_True, false );
}
}
break;
@@ -1119,7 +1119,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
const ScChangeActionMove* pMove = (const ScChangeActionMove*) pSourceAction;
ScRange aFromRange( pMove->GetFromRange().MakeRange() );
GetDocFunc().MoveBlock( aFromRange,
- aSourceRange.aStart, TRUE, TRUE, FALSE, FALSE );
+ aSourceRange.aStart, sal_True, sal_True, false, false );
}
break;
default:
@@ -1159,10 +1159,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
ScChangeAction* pAct = pThisTrack->GetLast();
if ( pAct && pAct->GetActionNumber() > nOldActionMax )
{
- ULONG nActionMax = pAct->GetActionNumber();
- ULONG nActionCount = nActionMax - nOldActionMax;
- ULONG nAction = nActionMax - nActionCount + 1;
- ULONG nSourceAction = pSourceAction->GetActionNumber() - nActionCount + 1;
+ sal_uLong nActionMax = pAct->GetActionNumber();
+ sal_uLong nActionCount = nActionMax - nOldActionMax;
+ sal_uLong nAction = nActionMax - nActionCount + 1;
+ sal_uLong nSourceAction = pSourceAction->GetActionNumber() - nActionCount + 1;
while ( nAction <= nActionMax )
{
if ( bInverseMap )
@@ -1184,7 +1184,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
rMarkData = aOldMarkData;
pThisTrack->SetUser(aOldUser);
- pThisTrack->SetUseFixDateTime( FALSE );
+ pThisTrack->SetUseFixDateTime( false );
pSourceTrack->Clear(); //! der ist jetzt verhunzt
@@ -1216,11 +1216,11 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// reset show changes
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges( FALSE );
+ aChangeViewSet.SetShowChanges( false );
aDocument.SetChangeViewSettings( aChangeViewSet );
// find first merge action in this document
- BOOL bIgnore100Sec = !pThisTrack->IsTime100thSeconds() || !pSharedTrack->IsTime100thSeconds();
+ sal_Bool bIgnore100Sec = !pThisTrack->IsTime100thSeconds() || !pSharedTrack->IsTime100thSeconds();
ScChangeAction* pThisAction = pThisTrack->GetFirst();
ScChangeAction* pSharedAction = pSharedTrack->GetFirst();
while ( lcl_Equal( pThisAction, pSharedAction, bIgnore100Sec ) )
@@ -1234,8 +1234,8 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
if ( pThisAction )
{
// merge own changes into shared document
- ULONG nActStartShared = pSharedAction->GetActionNumber();
- ULONG nActEndShared = pSharedTrack->GetActionMax();
+ sal_uLong nActStartShared = pSharedAction->GetActionNumber();
+ sal_uLong nActEndShared = pSharedTrack->GetActionMax();
ScDocument* pTmpDoc = new ScDocument;
for ( sal_Int32 nIndex = 0; nIndex < aDocument.GetTableCount(); ++nIndex )
{
@@ -1247,8 +1247,8 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
ScChangeActionMergeMap aOwnInverseMergeMap;
pSharedDocShell->MergeDocument( *pTmpDoc, true, true, 0, &aOwnInverseMergeMap, true );
delete pTmpDoc;
- ULONG nActStartOwn = nActEndShared + 1;
- ULONG nActEndOwn = pSharedTrack->GetActionMax();
+ sal_uLong nActStartOwn = nActEndShared + 1;
+ sal_uLong nActEndOwn = pSharedTrack->GetActionMax();
// find conflicts
ScConflictsList aConflictsList;
@@ -1291,7 +1291,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
pThisTrack->Clone( pTmpDoc );
// undo own changes since last save in own document
- ULONG nStartShared = pThisAction->GetActionNumber();
+ sal_uLong nStartShared = pThisAction->GetActionNumber();
ScChangeAction* pAction = pThisTrack->GetLast();
while ( pAction && pAction->GetActionNumber() >= nStartShared )
{
@@ -1305,7 +1305,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// merge shared changes into own document
ScChangeActionMergeMap aSharedMergeMap;
MergeDocument( rSharedDoc, true, true, 0, &aSharedMergeMap );
- ULONG nEndShared = pThisTrack->GetActionMax();
+ sal_uLong nEndShared = pThisTrack->GetActionMax();
// resolve conflicts for shared non-content actions
if ( !aConflictsList.empty() )
@@ -1323,18 +1323,18 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
nEndShared = pThisTrack->GetActionMax();
// only show changes from shared document
- aChangeViewSet.SetShowChanges( TRUE );
- aChangeViewSet.SetShowAccepted( TRUE );
+ aChangeViewSet.SetShowChanges( sal_True );
+ aChangeViewSet.SetShowAccepted( sal_True );
aChangeViewSet.SetHasActionRange( true );
aChangeViewSet.SetTheActionRange( nStartShared, nEndShared );
aDocument.SetChangeViewSettings( aChangeViewSet );
// merge own changes back into own document
- ULONG nStartOwn = nEndShared + 1;
+ sal_uLong nStartOwn = nEndShared + 1;
ScChangeActionMergeMap aOwnMergeMap;
MergeDocument( *pTmpDoc, true, true, nEndShared - nStartShared + 1, &aOwnMergeMap );
delete pTmpDoc;
- ULONG nEndOwn = pThisTrack->GetActionMax();
+ sal_uLong nEndOwn = pThisTrack->GetActionMax();
// resolve conflicts for shared content actions and own actions
if ( !aConflictsList.empty() )
@@ -1362,13 +1362,13 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
else
{
// merge shared changes into own document
- ULONG nStartShared = pThisTrack->GetActionMax() + 1;
+ sal_uLong nStartShared = pThisTrack->GetActionMax() + 1;
MergeDocument( rSharedDoc, true, true );
- ULONG nEndShared = pThisTrack->GetActionMax();
+ sal_uLong nEndShared = pThisTrack->GetActionMax();
// only show changes from shared document
- aChangeViewSet.SetShowChanges( TRUE );
- aChangeViewSet.SetShowAccepted( TRUE );
+ aChangeViewSet.SetShowChanges( sal_True );
+ aChangeViewSet.SetShowAccepted( sal_True );
aChangeViewSet.SetHasActionRange( true );
aChangeViewSet.SetTheActionRange( nStartShared, nEndShared );
aDocument.SetChangeViewSettings( aChangeViewSet );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index fbf4ab710e73..b4ee37a9e7b7 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -42,7 +42,7 @@ using namespace ::com::sun::star;
#include "scitems.hxx"
#include <sfx2/fcontnr.hxx>
#include <editeng/eeitem.hxx>
-
+#include <sfx2/objface.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/docfile.hxx>
@@ -54,7 +54,6 @@ using namespace ::com::sun::star;
#include <svtools/sfxecode.hxx>
#include <svx/ofaitem.hxx>
#include <sot/formats.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/waitobj.hxx>
@@ -104,6 +103,7 @@ using namespace ::com::sun::star;
#include "chgviset.hxx"
#include "reffact.hxx"
#include "chartlis.hxx"
+#include "chartpos.hxx"
#include "waitoff.hxx"
#include "tablink.hxx" // ScDocumentLoader statics
#include "drwlayer.hxx"
@@ -133,7 +133,7 @@ using namespace ::com::sun::star;
Get(ATTR_PAGE_SHARED)).GetValue()
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
#define SC_PREVIEW_SIZE_X 10000
#define SC_PREVIEW_SIZE_Y 12400
@@ -149,9 +149,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
const SfxItemSet* pReqArgs = rReq.GetArgs();
SfxBindings* pBindings = GetViewBindings();
- BOOL bUndo (aDocument.IsUndoEnabled());
+ sal_Bool bUndo (aDocument.IsUndoEnabled());
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_SC_SETTEXT:
@@ -206,18 +206,18 @@ void ScDocShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
String sSbaData, sTarget;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
sSbaData = ((const SfxStringItem*)pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
sTarget = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bIsNewArea = TRUE; // Default TRUE (keine Nachfrage)
- if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bIsNewArea = sal_True; // Default sal_True (keine Nachfrage)
+ if ( pReqArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET )
bIsNewArea = ((const SfxBoolItem*)pItem)->GetValue();
::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet > xResultSet;
- if ( pReqArgs->GetItemState( FN_PARAM_3, FALSE, &pItem ) == SFX_ITEM_SET && pItem )
+ if ( pReqArgs->GetItemState( FN_PARAM_3, false, &pItem ) == SFX_ITEM_SET && pItem )
xResultSet.set(((const SfxUsrAnyItem*)pItem)->GetValue(),::com::sun::star::uno::UNO_QUERY);
String sDBName = sSbaData.GetToken(0,cSbaSep); // Datenbankname
@@ -225,7 +225,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
String sTabFlag = sSbaData.GetToken(2,cSbaSep);
String sDBSql = sSbaData.GetToken(3,cSbaSep); // SQL im Klartext
- BYTE nType = ScDbTable; // "0" oder "1"
+ sal_uInt8 nType = ScDbTable; // "0" oder "1"
if ( sTabFlag.EqualsAscii("0") ) // "0" = Query, "1" = Table (Default)
nType = ScDbQuery;
@@ -243,17 +243,17 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
// bei Bedarf neuen Datenbankbereich anlegen
- BOOL bMakeArea = FALSE;
+ sal_Bool bMakeArea = false;
if (bIsNewArea)
{
ScDBCollection* pDBColl = aDocument.GetDBCollection();
- USHORT nDummy;
+ sal_uInt16 nDummy;
if ( !pDBColl || !pDBColl->SearchName( sTarget, nDummy ) )
{
ScAddress aPos;
if ( aPos.Parse( sTarget, &aDocument, aDocument.GetAddressConvention() ) & SCA_VALID )
{
- bMakeArea = TRUE;
+ bMakeArea = sal_True;
if (bUndo)
{
String aStrImport = ScGlobal::GetRscString( STR_UNDO_IMPORTDATA );
@@ -268,7 +268,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
// nachfragen, bevor alter DB-Bereich ueberschrieben wird
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
if (!bIsNewArea)
{
String aTemplate = ScGlobal::GetRscString( STR_IMPORT_REPLACE );
@@ -283,7 +283,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (bDo)
{
ScDBDocFunc(*this).UpdateImport( sTarget, sDBName,
- sDBTable, sDBSql, TRUE, nType, xResultSet,
+ sDBTable, sDBSql, sal_True, nType, xResultSet,
pSelectionList );
rReq.Done();
@@ -312,13 +312,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScRange aSingleRange;
ScRangeListRef aRangeListRef;
- BOOL bMultiRange = FALSE;
+ sal_Bool bMultiRange = false;
- BOOL bColHeaders = TRUE;
- BOOL bRowHeaders = TRUE;
- BOOL bColInit = FALSE;
- BOOL bRowInit = FALSE;
- BOOL bAddRange = (nSlot == SID_CHART_ADDSOURCE);
+ sal_Bool bColHeaders = sal_True;
+ sal_Bool bRowHeaders = sal_True;
+ sal_Bool bColInit = false;
+ sal_Bool bRowInit = false;
+ sal_Bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
if( IS_AVAILABLE( SID_CHART_NAME, &pItem ) )
aChartName = ((const SfxStringItem*)pItem)->GetValue();
@@ -329,25 +329,25 @@ void ScDocShell::Execute( SfxRequest& rReq )
if( IS_AVAILABLE( FN_PARAM_1, &pItem ) )
{
bColHeaders = ((const SfxBoolItem*)pItem)->GetValue();
- bColInit = TRUE;
+ bColInit = sal_True;
}
if( IS_AVAILABLE( FN_PARAM_2, &pItem ) )
{
bRowHeaders = ((const SfxBoolItem*)pItem)->GetValue();
- bRowInit = TRUE;
+ bRowInit = sal_True;
}
ScAddress::Details aDetails(pDoc->GetAddressConvention(), 0, 0);
- BOOL bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0;
+ sal_Bool bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0;
if (!bValid)
{
aRangeListRef = new ScRangeList;
aRangeListRef->Parse( aRangeName, pDoc );
if ( !aRangeListRef->empty() )
{
- bMultiRange = TRUE;
+ bMultiRange = true;
aSingleRange = *aRangeListRef->front(); // fuer Header
- bValid = TRUE;
+ bValid = true;
}
else
aRangeListRef.Clear();
@@ -369,22 +369,14 @@ void ScDocShell::Execute( SfxRequest& rReq )
aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
// Dialog fuer Spalten/Zeilenkoepfe
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if ( !bAddRange && ( !bColInit || !bRowInit ) )
{
- // Spalten/Zeilenkoepfe testen wie in chartarr
+ ScChartPositioner aChartPositioner( &aDocument, nTab, nCol1,nRow1, nCol2,nRow2 );
if (!bColInit)
- {
- for (SCCOL i=nCol1; i<=nCol2 && bColHeaders; i++)
- if (aDocument.HasValueData( i, nRow1, nTab ))
- bColHeaders = FALSE;
- }
+ bColHeaders = aChartPositioner.HasColHeaders();
if (!bRowInit)
- {
- for (SCROW i=nRow1; i<=nRow2 && bRowHeaders; i++)
- if (aDocument.HasValueData( nCol1, i, nTab ))
- bRowHeaders = FALSE;
- }
+ bRowHeaders = aChartPositioner.HasRowHeaders();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -400,7 +392,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
rReq.AppendItem(SfxBoolItem(FN_PARAM_2, bRowHeaders));
}
else
- bOk = FALSE;
+ bOk = false;
delete pDlg;
}
@@ -445,9 +437,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
case FID_AUTO_CALC:
{
- BOOL bNewVal;
+ sal_Bool bNewVal;
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) )
bNewVal = ((const SfxBoolItem*)pItem)->GetValue();
else
bNewVal = !aDocument.GetAutoCalc(); // Toggle fuer Menue
@@ -475,7 +467,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScLkUpdMode nSet=pDoc->GetLinkMode();
- USHORT nDlgRet=RET_NO;
+ sal_uInt16 nDlgRet=RET_NO;
if(nSet==LM_UNKNOWN)
{
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
@@ -518,7 +510,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
// wird nach dem Laden aufgerufen, wenn DB-Bereiche mit
// weggelassenen Daten enthalten sind
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDBCollection* pDBColl = aDocument.GetDBCollection();
if ((nCanUpdate != com::sun::star::document::UpdateDocMode::NO_UPDATE) &&
@@ -533,7 +525,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) );
if (aBox.Execute() == RET_YES)
{
- for (USHORT i=0; i<pDBColl->GetCount(); i++)
+ for (sal_uInt16 i=0; i<pDBColl->GetCount(); i++)
{
ScDBData* pDBData = (*pDBColl)[i];
if ( pDBData->IsStripData() &&
@@ -547,7 +539,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
- BOOL bContinue = pViewSh->ImportData( aImportParam );
+ sal_Bool bContinue = pViewSh->ImportData( aImportParam );
pDBData->SetImportParam( aImportParam );
// markieren (Groesse kann sich geaendert haben)
@@ -568,7 +560,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
}
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -609,19 +601,19 @@ void ScDocShell::Execute( SfxRequest& rReq )
if(pDoc!=NULL)
{
// get argument (recorded macro)
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, sal_False );
- BOOL bDo = TRUE;
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, false );
+ sal_Bool bDo = sal_True;
// xmlsec05/06:
// getting real parent window when called from Security-Options TP
Window* pParent = NULL;
const SfxPoolItem* pParentItem;
- if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
// desired state
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
- BOOL bActivateTracking = (pChangeTrack == 0); // toggle
+ sal_Bool bActivateTracking = (pChangeTrack == 0); // toggle
if ( pItem )
bActivateTracking = pItem->GetValue(); // from argument
@@ -651,7 +643,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
pDoc->StartChangeTracking();
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
pDoc->SetChangeViewSettings(aChangeViewSet);
}
@@ -661,7 +653,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
// Slots invalidieren
if (pBindings)
- pBindings->InvalidateAll(FALSE);
+ pBindings->InvalidateAll(false);
if ( !pItem )
rReq.AppendItem( SfxBoolItem( FID_CHG_RECORD, bActivateTracking ) );
rReq.Done();
@@ -676,7 +668,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
Window* pParent = NULL;
const SfxPoolItem* pParentItem;
- if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
if ( ExecuteChangeProtectionDialog( pParent ) )
{
@@ -691,7 +683,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_DOCUMENT_MERGE:
case SID_DOCUMENT_COMPARE:
{
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if ( pChangeTrack && !pImpl->bIgnoreLostRedliningWarning )
{
@@ -701,12 +693,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( NULL, sal_True );
else
- bDo = FALSE;
+ bDo = false;
}
else // merge might reject some actions
- bDo = ExecuteChangeProtectionDialog( NULL, TRUE );
+ bDo = ExecuteChangeProtectionDialog( NULL, sal_True );
}
if ( !bDo )
{
@@ -717,25 +709,25 @@ void ScDocShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
SfxMedium* pMed = NULL;
if ( pReqArgs &&
- pReqArgs->GetItemState( SID_FILE_NAME, TRUE, &pItem ) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState( SID_FILE_NAME, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxStringItem) )
{
String aFileName = ((const SfxStringItem*)pItem)->GetValue();
String aFilterName;
- if ( pReqArgs->GetItemState( SID_FILTER_NAME, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pReqArgs->GetItemState( SID_FILTER_NAME, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxStringItem) )
{
aFilterName = ((const SfxStringItem*)pItem)->GetValue();
}
String aOptions;
- if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxStringItem) )
{
aOptions = ((const SfxStringItem*)pItem)->GetValue();
}
short nVersion = 0;
- if ( pReqArgs->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pReqArgs->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxInt16Item) )
{
nVersion = ((const SfxInt16Item*)pItem)->GetValue();
@@ -743,7 +735,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
// kein Filter angegeben -> Detection
if ( !aFilterName.Len() )
- ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, TRUE, FALSE );
+ ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, sal_True, false );
// filter name from dialog contains application prefix,
// GetFilter needs name without the prefix.
@@ -755,7 +747,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
if ( nVersion != 0 )
pSet->Put( SfxInt16Item( SID_VERSION, nVersion ) );
- pMed = new SfxMedium( aFileName, STREAM_STD_READ, FALSE, pFilter, pSet );
+ pMed = new SfxMedium( aFileName, STREAM_STD_READ, false, pFilter, pSet );
}
else
{
@@ -774,17 +766,18 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, pMed->GetName() );
+ // pOtherDocSh->DoClose() will be called explicitly later, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pOtherDocSh = new ScDocShell;
- SfxObjectShellRef aDocShTablesRef = pOtherDocSh;
+ SfxObjectShellLock aDocShTablesRef = pOtherDocSh;
pOtherDocSh->DoLoad( pMed );
- ULONG nErr = pOtherDocSh->GetErrorCode();
+ sal_uLong nErr = pOtherDocSh->GetErrorCode();
if (nErr)
ErrorHandler::HandleError( nErr ); // auch Warnings
if ( !pOtherDocSh->GetError() ) // nur Errors
{
- BOOL bHadTrack = ( aDocument.GetChangeTrack() != NULL );
- ULONG nStart = 0;
+ sal_Bool bHadTrack = ( aDocument.GetChangeTrack() != NULL );
+ sal_uLong nStart = 0;
if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
{
nStart = pChangeTrack->GetActionMax() + 1;
@@ -802,7 +795,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if ( pViewFrm )
{
- pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), TRUE ); //@51669
+ pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), sal_True ); //@51669
}
if ( pBindings )
{
@@ -819,19 +812,19 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( !pOldSet || !pOldSet->ShowChanges() )
{
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
aDocument.SetChangeViewSettings(aChangeViewSet);
}
}
else if ( nSlot == SID_DOCUMENT_MERGE && IsDocShared() && pChangeTrack )
{
- ULONG nEnd = pChangeTrack->GetActionMax();
+ sal_uLong nEnd = pChangeTrack->GetActionMax();
if ( nEnd >= nStart )
{
// only show changes from merged document
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges( TRUE );
- aChangeViewSet.SetShowAccepted( TRUE );
+ aChangeViewSet.SetShowChanges( sal_True );
+ aChangeViewSet.SetShowAccepted( sal_True );
aChangeViewSet.SetHasActionRange( true );
aChangeViewSet.SetTheActionRange( nStart, nEnd );
aDocument.SetChangeViewSettings( aChangeViewSet );
@@ -851,7 +844,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (pReqArgs)
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
{
if ( pItem->ISA(SfxStringItem) )
{
@@ -879,7 +872,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_EDIT_SCENARIO:
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
{
if ( pItem->ISA(SfxStringItem) )
{
@@ -891,7 +884,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
aDocument.GetScenarioData( nTab, aComment, aColor, nFlags );
// Determine if the Sheet that the Scenario was created on
@@ -903,12 +896,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
nActualTab--;
}
while(aDocument.IsScenario(nActualTab));
- BOOL bSheetProtected = aDocument.IsTabProtected(nActualTab);
+ sal_Bool bSheetProtected = aDocument.IsTabProtected(nActualTab);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, TRUE,bSheetProtected);
+ AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, true,bSheetProtected);
DBG_ASSERT(pNewDlg, "Dialog create fail!");
pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags );
if ( pNewDlg->Execute() == RET_OK )
@@ -928,11 +921,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_ATTR_YEAR2000 :
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
{
if ( pItem->ISA(SfxUInt16Item) )
{
- UINT16 nY2k = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nY2k = ((SfxUInt16Item*)pItem)->GetValue();
// immer an den DocOptions setzen, damit das auch fuer SO50
// gespeichert wird (und alle Abfragen bisher auch darauf laufen).
// SetDocOptions propagiert das an den NumberFormatter
@@ -1075,7 +1068,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
xCloseable->close( sal_True );
- if ( !SwitchToShared( sal_False, sal_True ) )
+ if ( !SwitchToShared( false, sal_True ) )
{
// TODO/LATER: what should be done in case the switch has failed?
// for example in case the user has cancelled the saveAs operation
@@ -1159,15 +1152,15 @@ void UpdateAcceptChangesDialog()
//------------------------------------------------------------------
-BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected )
+sal_Bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if ( pChangeTrack )
{
- BOOL bProtected = pChangeTrack->IsProtected();
+ sal_Bool bProtected = pChangeTrack->IsProtected();
if ( bJustQueryIfProtected && !bProtected )
- return TRUE;
+ return sal_True;
String aTitle( ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) );
String aText( ScResId( SCSTR_PASSWORD ) );
@@ -1177,7 +1170,7 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer
_pParent ? _pParent : GetActiveDialogParent(), &aText );
pDlg->SetText( aTitle );
pDlg->SetMinLen( 1 );
- pDlg->SetHelpId( SID_CHG_PROTECT );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(SID_CHG_PROTECT)->GetCommand() );
pDlg->SetEditHelpId( HID_CHG_PROTECT );
if ( !bProtected )
pDlg->ShowExtras( SHOWEXTRAS_CONFIRM );
@@ -1192,7 +1185,7 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer
if ( SvPasswordHelper::CompareHashPassword(pChangeTrack->GetProtection(), aPassword) )
{
if ( bJustQueryIfProtected )
- bDone = TRUE;
+ bDone = sal_True;
else
pChangeTrack->SetProtection(
com::sun::star::uno::Sequence< sal_Int8 > (0) );
@@ -1213,21 +1206,21 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer
if ( bProtected != pChangeTrack->IsProtected() )
{
UpdateAcceptChangesDialog();
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
else if ( bJustQueryIfProtected )
- bDone = TRUE;
+ bDone = sal_True;
return bDone;
}
//------------------------------------------------------------------
-void ScDocShell::DoRecalc( BOOL bApi )
+void ScDocShell::DoRecalc( sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScTabViewShell* pSh = GetBestViewShell();
if ( pSh )
{
@@ -1235,7 +1228,7 @@ void ScDocShell::DoRecalc( BOOL bApi )
if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi )
{
pHdl->FormulaPreview(); // Teilergebnis als QuickHelp
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -1248,7 +1241,7 @@ void ScDocShell::DoRecalc( BOOL bApi )
WaitObject aWaitObj( GetActiveDialogParent() );
aDocument.CalcFormulaTree();
if ( pSh )
- pSh->UpdateCharts(TRUE);
+ pSh->UpdateCharts(sal_True);
aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
@@ -1264,7 +1257,7 @@ void ScDocShell::DoRecalc( BOOL bApi )
}
}
-void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
+void ScDocShell::DoHardRecalc( sal_Bool /* bApi */ )
{
WaitObject aWaitObj( GetActiveDialogParent() );
ScTabViewShell* pSh = GetBestViewShell();
@@ -1276,7 +1269,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
aDocument.CalcAll();
GetDocFunc().DetectiveRefresh(); // erzeugt eigenes Undo
if ( pSh )
- pSh->UpdateCharts(TRUE);
+ pSh->UpdateCharts(sal_True);
// set notification flags for "calculate" event (used in SFX_HINT_DATACHANGED broadcast)
// (might check for the presence of any formulas on each sheet)
@@ -1295,7 +1288,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
// (somewhat consistent with charts)
for (nTab=0; nTab<nTabCount; nTab++)
if (aDocument.IsStreamValid(nTab))
- aDocument.SetStreamValid(nTab, FALSE);
+ aDocument.SetStreamValid(nTab, false);
PostPaintGridAll();
}
@@ -1329,7 +1322,7 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const String& rStyle )
void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
- USHORT nId = rHint.GetHint();
+ sal_uInt16 nId = rHint.GetHint();
const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet();
if (!pStyle)
return;
@@ -1342,7 +1335,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
String aNewName = pStyle->GetName();
String aOldName = aNewName;
- BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert?
+ sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert?
if (bExtended)
aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName();
@@ -1380,7 +1373,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
String aNewName = pStyle->GetName();
String aOldName = aNewName;
- BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended);
+ sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended);
if (bExtended)
aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName();
if ( aNewName != aOldName )
@@ -1398,9 +1391,9 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
// wie in printfun.cxx
#define ZOOM_MIN 10
-void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages )
+void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages )
{
- BOOL bUndo(aDocument.IsUndoEnabled());
+ sal_Bool bUndo(aDocument.IsUndoEnabled());
String aStyleName = aDocument.GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
@@ -1412,8 +1405,8 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages )
SfxItemSet& rSet = pStyleSheet->GetItemSet();
if (bUndo)
{
- USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
- USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
+ sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
+ sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
GetUndoManager()->AddUndoAction( new ScUndoPrintZoom(
this, nTab, nOldScale, nOldPages, nScale, nPages ) );
}
@@ -1431,9 +1424,9 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages )
}
}
-BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
+sal_Bool ScDocShell::AdjustPrintZoom( const ScRange& rRange )
{
- BOOL bChange = FALSE;
+ sal_Bool bChange = false;
SCTAB nTab = rRange.aStart.Tab();
String aStyleName = aDocument.GetPageStyle( nTab );
@@ -1443,15 +1436,15 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
if ( pStyleSheet )
{
SfxItemSet& rSet = pStyleSheet->GetItemSet();
- BOOL bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue();
- USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
- USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
+ sal_Bool bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue();
+ sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
+ sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
const ScRange* pRepeatCol = aDocument.GetRepeatColRange( nTab );
const ScRange* pRepeatRow = aDocument.GetRepeatRowRange( nTab );
// benoetigte Skalierung fuer Selektion ausrechnen
- USHORT nNewScale = nOldScale;
+ sal_uInt16 nNewScale = nOldScale;
long nBlkTwipsX = 0;
if (bHeaders)
@@ -1501,7 +1494,7 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
if ( nNeeded < ZOOM_MIN )
nNeeded = ZOOM_MIN; // Begrenzung
if ( nNeeded < (long) nNewScale )
- nNewScale = (USHORT) nNeeded;
+ nNewScale = (sal_uInt16) nNeeded;
bChange = ( nNewScale != nOldScale || nOldPages != 0 );
if ( bChange )
@@ -1510,11 +1503,11 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
return bChange;
}
-void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi )
+void ScDocShell::PageStyleModified( const String& rStyleName, sal_Bool bApi )
{
ScDocShellModificator aModificator( *this );
- BOOL bWarn = FALSE;
+ sal_Bool bWarn = false;
SCTAB nTabCount = aDocument.GetTableCount();
SCTAB nUseTab = MAXTAB+1;
@@ -1528,7 +1521,7 @@ void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi )
{
ScPrintFunc aPrintFunc( this, GetPrinter(), nUseTab ); //! ohne CountPages auskommen
if (!aPrintFunc.UpdatePages()) // setzt Umbrueche auf allen Tabs
- bWarn = TRUE;
+ bWarn = sal_True;
if (bWarn && !bApi)
{
@@ -1566,7 +1559,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
}
else if ( pReqArgs == NULL )
{
- BOOL bUndo(aDocument.IsUndoEnabled());
+ sal_Bool bUndo(aDocument.IsUndoEnabled());
String aOldName = aDocument.GetPageStyle( nCurTab );
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet
@@ -1622,7 +1615,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
aOldData, aNewData ) );
}
- PageStyleModified( aNewName, FALSE );
+ PageStyleModified( aNewName, false );
rReq.Done();
}
delete pDlg;
@@ -1658,9 +1651,9 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
SvxPageUsage( ((const SvxPageItem&)
rStyleSet.Get( ATTR_PAGE )).
GetPageUsage() );
- BOOL bShareHeader = IS_SHARE_HEADER(rStyleSet);
- BOOL bShareFooter = IS_SHARE_FOOTER(rStyleSet);
- USHORT nResId = 0;
+ sal_Bool bShareHeader = IS_SHARE_HEADER(rStyleSet);
+ sal_Bool bShareFooter = IS_SHARE_FOOTER(rStyleSet);
+ sal_uInt16 nResId = 0;
switch ( eUsage )
{
@@ -1772,7 +1765,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */,
SCTAB nCurTab )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -1817,7 +1810,7 @@ void lcl_GetPrintData( ScDocShell* pDocShell /*in*/,
// get settings from print options sub-dialog
const SfxItemSet& rOptionSet = pPrinter->GetOptions();
const SfxPoolItem* pItem;
- rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, FALSE, &pItem ) == SFX_ITEM_SET );
+ rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, false, &pItem ) == SFX_ITEM_SET );
if ( rbHasOptions )
{
rOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
@@ -1955,7 +1948,7 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
aPageArr, aPageRanges, &pMarkedRange );
- BOOL bFound = FALSE; // erste Seite gefunden
+ sal_Bool bFound = false; // erste Seite gefunden
long nTabStart = 0;
SCTAB nTabCount = aDocument.GetTableCount();
for ( SCTAB nTab=0; nTab<nTabCount && !bFound; nTab++ )
@@ -1963,17 +1956,17 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
if ( bAllTabs || !pMarkData || pMarkData->GetTableSelect( nTab ) )
{
long nNext = nTabStart + aPageArr[nTab];
- BOOL bSelected = FALSE;
+ sal_Bool bSelected = false;
for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert
if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert?
- bSelected = TRUE;
+ bSelected = true;
if (bSelected)
{
ScPrintFunc aPrintFunc( this, pPrinter, nTab );
aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle
- bFound = TRUE;
+ bFound = true;
}
nTabStart = nNext;
}
@@ -1982,9 +1975,9 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
delete pMarkedRange;
}
-BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
+sal_Bool lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if (pDrawLayer)
{
@@ -2007,10 +2000,10 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
{
Rectangle aObjRect = pObject->GetLogicRect();
if ( aObjRect.IsOver( aMMRect ) )
- bFound = TRUE;
+ bFound = true;
}
else
- bFound = TRUE;
+ bFound = true;
}
pObject = aIter.Next();
@@ -2022,7 +2015,7 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
}
void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
- ScMarkData* pMarkData, Window* pDialogParent, BOOL bForceSelected, BOOL bIsAPI )
+ ScMarkData* pMarkData, Window* pDialogParent, sal_Bool bForceSelected, sal_Bool bIsAPI )
{
SfxPrinter* pPrinter = GetPrinter();
if ( !pPrinter )
@@ -2042,14 +2035,14 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
aPageArr, aPageRanges, &pMarkedRange );
- USHORT nCollateCopies = 1;
+ sal_uInt16 nCollateCopies = 1;
if ( pPrintDialog && pPrintDialog->IsCollateEnabled() && pPrintDialog->IsCollateChecked() )
nCollateCopies = pPrintDialog->GetCopyCount();
// test if printed range contains transparent objects
- BOOL bHasTransp = FALSE;
- BOOL bAnyPrintRanges = aDocument.HasPrintRange();
+ sal_Bool bHasTransp = false;
+ sal_Bool bAnyPrintRanges = aDocument.HasPrintRange();
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SCTAB nTabCount = aDocument.GetTableCount();
for ( SCTAB nTab=0; nTab<nTabCount && !bHasTransp; nTab++ )
@@ -2069,8 +2062,8 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, pMarkedRange );
else if ( aDocument.GetPrintRangeCount(nTab) )
{
- USHORT nRangeCount = aDocument.GetPrintRangeCount(nTab);
- for (USHORT i=0; i<nRangeCount; i++)
+ sal_uInt16 nRangeCount = aDocument.GetPrintRangeCount(nTab);
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
bHasTransp = bHasTransp ||
lcl_HasTransparent( &aDocument, nTab, aDocument.GetPrintRange( nTab, i ) );
}
@@ -2081,11 +2074,11 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
}
}
- BOOL bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp );
+ sal_Bool bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp );
if ( bContinue )
{
- for ( USHORT n=0; n<nCollateCopies; n++ )
+ for ( sal_uInt16 n=0; n<nCollateCopies; n++ )
{
long nTabStart = 0;
long nDisplayStart = 0;
@@ -2105,12 +2098,12 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
{
pDrawView = new FmFormView( pModel, pPrinter );
pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetPrintPreview( true );
}
ScPrintFunc aPrintFunc( this, pPrinter, nTab, nAttrPage, nTotalPages, pMarkedRange, &aOptions );
aPrintFunc.SetDrawView( pDrawView );
- aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, TRUE, &rProgress, NULL );
+ aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, true, &rProgress, NULL );
nTabStart += aPageArr[nTab];
if ( aDocument.NeedPageResetAfterTab(nTab) )
@@ -2159,13 +2152,13 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
void ScDocShell::GetState( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
{
case FID_AUTO_CALC:
- if ( (BOOL) aDocument.GetHardRecalcState() )
+ if ( (sal_Bool) aDocument.GetHardRecalcState() )
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem( nWhich, aDocument.GetAutoCalc() ) );
@@ -2249,14 +2242,14 @@ void ScDocShell::GetSbxState( SfxItemSet &rSet )
pVisibleSh->GetState( rSet );
}
-void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT nAspect )
+void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uInt16 nAspect )
{
SCTAB nVisTab = aDocument.GetVisibleTab();
if (!aDocument.HasTable(nVisTab))
return;
- ULONG nOldLayoutMode = pDev->GetLayoutMode();
+ sal_uLong nOldLayoutMode = pDev->GetLayoutMode();
pDev->SetLayoutMode( TEXT_LAYOUT_DEFAULT ); // even if it's the same, to get the metafile action
if ( nAspect == ASPECT_THUMBNAIL )
@@ -2266,7 +2259,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT
aTmpData.SetTabNo(nVisTab);
aDocument.SnapVisArea( aBoundRect );
aTmpData.SetScreen( aBoundRect );
- ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE );
+ ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True );
}
else
{
@@ -2275,13 +2268,13 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT
aTmpData.SetTabNo(nVisTab);
aDocument.SnapVisArea( aBoundRect );
aTmpData.SetScreen( aBoundRect );
- ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE );
+ ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True );
}
pDev->SetLayoutMode( nOldLayoutMode );
}
-Rectangle ScDocShell::GetVisArea( USHORT nAspect ) const
+Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
SfxObjectCreateMode eShellMode = GetCreateMode();
if ( eShellMode == SFX_CREATE_MODE_ORGANIZER )
@@ -2294,7 +2287,7 @@ Rectangle ScDocShell::GetVisArea( USHORT nAspect ) const
if( nAspect == ASPECT_THUMBNAIL )
{
Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X,SC_PREVIEW_SIZE_Y );
- BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
+ sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
if ( bNegativePage )
ScDrawLayer::MirrorRectRTL( aArea );
aDocument.SnapVisArea( aArea );
@@ -2332,8 +2325,8 @@ Rectangle ScDocShell::GetVisArea( USHORT nAspect ) const
void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
SCTAB nCurTab,
- BOOL& rbHeader,
- BOOL& rbFooter )
+ sal_Bool& rbHeader,
+ sal_Bool& rbFooter )
{
if ( !pStyleSet )
{
@@ -2347,7 +2340,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
if ( pStyleSheet )
pStyleSet = &pStyleSheet->GetItemSet();
else
- rbHeader = rbFooter = FALSE;
+ rbHeader = rbFooter = false;
}
DBG_ASSERT( pStyleSet, "PageStyle-Set not found! :-(" );
@@ -2385,7 +2378,7 @@ long ScDocShell::DdeGetData( const String& rItem,
return 0; // ungueltiger Bereich
if( aDdeTextFmt.GetChar(0) == 'F' )
- aObj.SetFormulas( TRUE );
+ aObj.SetFormulas( sal_True );
if( aDdeTextFmt.EqualsAscii( "SYLK" ) ||
aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{
@@ -2432,7 +2425,7 @@ long ScDocShell::DdeSetData( const String& rItem,
}
ScImportExport aObj( &aDocument, rItem );
if( aDdeTextFmt.GetChar(0) == 'F' )
- aObj.SetFormulas( TRUE );
+ aObj.SetFormulas( sal_True );
if( aDdeTextFmt.EqualsAscii( "SYLK" ) ||
aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{
@@ -2510,7 +2503,7 @@ SCTAB ScDocShell::GetCurTab()
return pViewData ? pViewData->GetTabNo() : static_cast<SCTAB>(0);
}
-ScTabViewShell* ScDocShell::GetBestViewShell( BOOL bOnlyVisible )
+ScTabViewShell* ScDocShell::GetBestViewShell( sal_Bool bOnlyVisible )
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
// falsches Doc?
@@ -2542,11 +2535,11 @@ SfxBindings* ScDocShell::GetViewBindings()
//------------------------------------------------------------------
-ScDocShell* ScDocShell::GetShellByNum( USHORT nDocNo ) // static
+ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static
{
ScDocShell* pFound = NULL;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
- USHORT nShellCnt = 0;
+ sal_uInt16 nShellCnt = 0;
while ( pShell && !pFound )
{
@@ -2572,7 +2565,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
if ( ERRCODE_NONE == _pFileDlg->GetError() )
{
- USHORT nSlot = pImpl->pRequest->GetSlot();
+ sal_uInt16 nSlot = pImpl->pRequest->GetSlot();
SfxMedium* pMed = pImpl->pDocInserter->CreateMedium();
// #i87094# If a .odt was selected pMed is NULL.
if (pMed)
@@ -2590,7 +2583,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
const SfxPoolItem* pItem = NULL;
SfxItemSet* pSet = pMed->GetItemSet();
if ( pSet &&
- pSet->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET &&
+ pSet->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SfxInt16Item ) )
{
pImpl->pRequest->AppendItem( *pItem );
@@ -2616,7 +2609,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable )
aDocument.StartChangeTracking();
// hide accept or reject changes dialog
- USHORT nId = ScAcceptChgDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
if ( pViewFrame && pViewFrame->HasChildWindow( nId ) )
{
@@ -2634,7 +2627,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable )
}
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges( FALSE );
+ aChangeViewSet.SetShowChanges( false );
aDocument.SetChangeViewSettings( aChangeViewSet );
}
@@ -2655,7 +2648,7 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument()
if ( GetMedium() )
{
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False);
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false);
if ( pPasswordItem && pPasswordItem->GetValue().Len() )
{
aArgs.realloc( 2 );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 4d09ec0c9438..4fafac178e2f 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -90,13 +90,13 @@ using ::std::vector;
// former viewfunc/dbfunc methods
//
-void ScDocShell::ErrorMessage( USHORT nGlobStrId )
+void ScDocShell::ErrorMessage( sal_uInt16 nGlobStrId )
{
//! StopMarking an der (aktiven) View?
Window* pParent = GetActiveDialogParent();
ScWaitCursorOff aWaitOff( pParent );
- BOOL bFocus = pParent && pParent->HasFocus();
+ sal_Bool bFocus = pParent && pParent->HasFocus();
if(nGlobStrId==STR_PROTECTIONERR)
{
@@ -112,7 +112,7 @@ void ScDocShell::ErrorMessage( USHORT nGlobStrId )
pParent->GrabFocus();
}
-BOOL ScDocShell::IsEditable() const
+sal_Bool ScDocShell::IsEditable() const
{
// import into read-only document is possible - must be extended if other filters use api
// #i108547# MSOOXML filter uses "IsChangeReadOnlyEnabled" property
@@ -139,12 +139,12 @@ ScDBData* lcl_GetDBNearCursor( ScDBCollection* pColl, SCCOL nCol, SCROW nRow, SC
ScDBData* pNoNameData = NULL;
ScDBData* pNearData = NULL;
- USHORT nCount = pColl->GetCount();
+ sal_uInt16 nCount = pColl->GetCount();
String aNoName = ScGlobal::GetRscString( STR_DB_NONAME );
SCTAB nAreaTab;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
ScDBData* pDB = (*pColl)[i];
pDB->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow );
@@ -188,11 +188,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
if (!pData)
pData = lcl_GetDBNearCursor( aDocument.GetDBCollection(), nCol, nRow, nTab );
- BOOL bSelected = ( eSel == SC_DBSEL_FORCE_MARK ||
+ sal_Bool bSelected = ( eSel == SC_DBSEL_FORCE_MARK ||
(rMarked.aStart != rMarked.aEnd && eSel != SC_DBSEL_ROW_DOWN) );
bool bOnlyDown = (!bSelected && eSel == SC_DBSEL_ROW_DOWN && rMarked.aStart.Row() == rMarked.aEnd.Row());
- BOOL bUseThis = FALSE;
+ sal_Bool bUseThis = false;
if (pData)
{
// Bereich nehmen, wenn nichts anderes markiert
@@ -203,11 +203,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
SCCOL nOldCol2;
SCROW nOldRow2;
pData->GetArea( nDummy, nOldCol1,nOldRow1, nOldCol2,nOldRow2 );
- BOOL bIsNoName = ( pData->GetName() == ScGlobal::GetRscString( STR_DB_NONAME ) );
+ sal_Bool bIsNoName = ( pData->GetName() == ScGlobal::GetRscString( STR_DB_NONAME ) );
if (!bSelected)
{
- bUseThis = TRUE;
+ bUseThis = sal_True;
if ( bIsNoName && eMode == SC_DB_MAKE )
{
// If nothing marked or only one row marked, adapt
@@ -224,9 +224,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
nEndCol = nStartCol;
nEndRow = nStartRow;
}
- aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, bOnlyDown );
+ aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, bOnlyDown );
if ( nOldCol1 != nStartCol || nOldCol2 != nEndCol || nOldRow1 != nStartRow )
- bUseThis = FALSE; // passt gar nicht
+ bUseThis = false; // passt gar nicht
else if ( nOldRow2 != nEndRow )
{
// Bereich auf neue End-Zeile erweitern
@@ -238,15 +238,15 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
{
if ( nOldCol1 == nStartCol && nOldRow1 == nStartRow &&
nOldCol2 == nEndCol && nOldRow2 == nEndRow ) // genau markiert?
- bUseThis = TRUE;
+ bUseThis = sal_True;
else
- bUseThis = FALSE; // immer Markierung nehmen (Bug 11964)
+ bUseThis = false; // immer Markierung nehmen (Bug 11964)
}
// fuer Import nie "unbenannt" nehmen
if ( bUseThis && eMode == SC_DB_IMPORT && bIsNoName )
- bUseThis = FALSE;
+ bUseThis = false;
}
if ( bUseThis )
@@ -277,13 +277,13 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
nEndCol = nStartCol;
nEndRow = nStartRow;
}
- aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, bOnlyDown );
+ aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, bOnlyDown );
}
- BOOL bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
+ sal_Bool bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
ScDBData* pNoNameData;
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDBCollection* pColl = aDocument.GetDBCollection();
if ( eMode != SC_DB_IMPORT &&
pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -310,9 +310,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
pNoNameData->SetSubTotalParam( ScSubTotalParam() );
pNoNameData->SetArea( nTab, nStartCol,nStartRow, nEndCol,nEndRow ); // neu setzen
- pNoNameData->SetByRow( TRUE );
+ pNoNameData->SetByRow( sal_True );
pNoNameData->SetHeader( bHasHeader );
- pNoNameData->SetAutoFilter( FALSE );
+ pNoNameData->SetAutoFilter( false );
}
else
{
@@ -321,12 +321,12 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
String aNewName;
if (eMode==SC_DB_IMPORT)
{
- aDocument.CompileDBFormula( TRUE ); // CreateFormulaString
+ aDocument.CompileDBFormula( sal_True ); // CreateFormulaString
pUndoColl = new ScDBCollection( *pColl ); // Undo fuer Import1-Bereich
String aImport = ScGlobal::GetRscString( STR_DBNAME_IMPORT );
long nCount = 0;
- USHORT nDummy;
+ sal_uInt16 nDummy;
do
{
++nCount;
@@ -339,12 +339,12 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
aNewName = ScGlobal::GetRscString( STR_DB_NONAME );
pNoNameData = new ScDBData( aNewName, nTab,
nStartCol,nStartRow, nEndCol,nEndRow,
- TRUE, bHasHeader );
+ sal_True, bHasHeader );
pColl->Insert( pNoNameData );
if ( pUndoColl )
{
- aDocument.CompileDBFormula( FALSE ); // CompileFormulaString
+ aDocument.CompileDBFormula( false ); // CompileFormulaString
ScDBCollection* pRedoColl = new ScDBCollection( *pColl );
GetUndoManager()->AddUndoAction( new ScUndoDBData( this, pUndoColl, pRedoColl ) );
@@ -374,7 +374,7 @@ void ScDocShell::CancelAutoDBRange()
// called when dialog is cancelled
if ( pOldAutoDBRange )
{
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDBCollection* pColl = aDocument.GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
{
@@ -408,12 +408,12 @@ void ScDocShell::CancelAutoDBRange()
// Hoehen anpassen
//! mit docfunc zusammenfassen
-BOOL ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
+sal_Bool ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
{
ScSizeDeviceProvider aProv(this);
Fraction aZoom(1,1);
- BOOL bChange = aDocument.SetOptimalHeight( nStartRow,nEndRow, nTab, 0, aProv.GetDevice(),
- aProv.GetPPTX(),aProv.GetPPTY(), aZoom,aZoom, FALSE );
+ sal_Bool bChange = aDocument.SetOptimalHeight( nStartRow,nEndRow, nTab, 0, aProv.GetDevice(),
+ aProv.GetPPTX(),aProv.GetPPTY(), aZoom,aZoom, false );
if (bChange)
PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID|PAINT_LEFT );
@@ -431,8 +431,8 @@ void ScDocShell::UpdateAllRowHeights( const ScMarkData* pTabMark )
void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
{
- BOOL bIsUndoEnabled = aDocument.IsUndoEnabled();
- aDocument.EnableUndo( FALSE );
+ sal_Bool bIsUndoEnabled = aDocument.IsUndoEnabled();
+ aDocument.EnableUndo( false );
aDocument.LockStreamValid( true ); // ignore draw page size (but not formula results)
if ( bBefore ) // check all sheets up to nUpdateTab
{
@@ -444,7 +444,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
SCTAB nTab;
for (nTab=0; nTab<=nUpdateTab; ++nTab)
if ( aDocument.IsPendingRowHeights( nTab ) )
- aUpdateSheets.SelectTable( nTab, TRUE );
+ aUpdateSheets.SelectTable( nTab, sal_True );
if (aUpdateSheets.GetSelectCount())
UpdateAllRowHeights(&aUpdateSheets); // update with a single progress bar
@@ -453,7 +453,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
if ( aUpdateSheets.GetTableSelect( nTab ) )
{
aDocument.UpdatePageBreaks( nTab );
- aDocument.SetPendingRowHeights( nTab, FALSE );
+ aDocument.SetPendingRowHeights( nTab, false );
}
}
else // only nUpdateTab
@@ -462,7 +462,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
{
AdjustRowHeight( 0, MAXROW, nUpdateTab );
aDocument.UpdatePageBreaks( nUpdateTab );
- aDocument.SetPendingRowHeights( nUpdateTab, FALSE );
+ aDocument.SetPendingRowHeights( nUpdateTab, false );
}
}
aDocument.LockStreamValid( false );
@@ -479,8 +479,8 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
// DataPilotUpdate doesn't modify the collection order like PivotUpdate did,
// so a simple loop can be used.
- USHORT nCount = pColl->GetCount();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pColl->GetCount();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDPObject* pOld = (*pColl)[i];
if ( pOld )
@@ -490,7 +490,7 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
{
ScDPObject* pNew = new ScDPObject( *pOld );
ScDBDocFunc aFunc( *this );
- aFunc.DataPilotUpdate( pOld, pNew, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pOld, pNew, sal_True, false );
delete pNew; // DataPilotUpdate copies settings from "new" object
}
}
@@ -501,14 +501,14 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
{
String aName;
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart,
pArea->nColEnd, pArea->nRowEnd );
if (pData)
{
pData->GetName( aName );
if ( aName != ScGlobal::GetRscString( STR_DB_NONAME ) )
- bOk = TRUE;
+ bOk = sal_True;
}
if (!bOk)
@@ -517,14 +517,14 @@ String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
return aName;
}
-void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
+void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, sal_Bool bRecord )
{
ScConsData aData;
- USHORT nPos;
+ sal_uInt16 nPos;
SCCOL nColSize = 0;
SCROW nRowSize = 0;
- BOOL bErr = FALSE;
+ sal_Bool bErr = false;
for (nPos=0; nPos<rParam.nDataAreaCount; nPos++)
{
ScArea* pArea = rParam.ppDataAreas[nPos];
@@ -534,7 +534,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
// Test, ob Quelldaten verschoben wuerden
if (rParam.bReferenceData)
if (pArea->nTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow)
- bErr = TRUE;
+ bErr = sal_True;
}
if (bErr)
@@ -551,7 +551,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
ScDocShellModificator aModificator( *this );
ScRange aOldDest;
- ScDBData* pDestData = aDocument.GetDBAtCursor( rParam.nCol, rParam.nRow, rParam.nTab, TRUE );
+ ScDBData* pDestData = aDocument.GetDBAtCursor( rParam.nCol, rParam.nRow, rParam.nTab, sal_True );
if (pDestData)
pDestData->GetArea(aOldDest);
@@ -594,28 +594,28 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
ScOutlineTable* pUndoTab = pTable ? new ScOutlineTable( *pTable ) : NULL;
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( &aDocument, 0, nTabCount-1, FALSE, TRUE );
+ pUndoDoc->InitUndo( &aDocument, 0, nTabCount-1, false, sal_True );
// Zeilenstatus
aDocument.CopyToDocument( 0,0,nDestTab, MAXCOL,MAXROW,nDestTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
// alle Formeln
aDocument.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
// komplette Ausgangszeilen
aDocument.CopyToDocument( 0,aDestArea.nRowStart,nDestTab,
MAXCOL,aDestArea.nRowEnd,nDestTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
- TRUE, nInsertCount, pUndoTab, pUndoData ) );
+ sal_True, nInsertCount, pUndoTab, pUndoData ) );
}
else
{
@@ -624,15 +624,15 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
aDocument.CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, aDestArea.nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, aDestArea.nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
- FALSE, 0, NULL, pUndoData ) );
+ false, 0, NULL, pUndoData ) );
}
}
@@ -650,7 +650,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
SCROW nPaintStartRow = rParam.nRow;
SCCOL nPaintEndCol = nPaintStartCol + nColSize - 1;
SCROW nPaintEndRow = nPaintStartRow + nRowSize - 1;
- USHORT nPaintFlags = PAINT_GRID;
+ sal_uInt16 nPaintFlags = PAINT_GRID;
if (rParam.bByCol)
++nPaintEndRow;
if (rParam.bByRow)
@@ -674,7 +674,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
aModificator.SetDocumentModified();
}
-void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
+void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord )
{
if (!aDocument.IsScenario(nTab))
{
@@ -712,22 +712,22 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
pUndoDoc->InitUndo( &aDocument, nTab,nEndTab ); // auch alle Szenarien
// angezeigte Tabelle:
aDocument.CopyToDocument( nStartCol,nStartRow,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL,TRUE, pUndoDoc, &aScenMark );
+ nEndCol,nEndRow,nTab, IDF_ALL,sal_True, pUndoDoc, &aScenMark );
// Szenarien
for (SCTAB i=nTab+1; i<=nEndTab; i++)
{
- pUndoDoc->SetScenario( i, TRUE );
+ pUndoDoc->SetScenario( i, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
aDocument.GetScenarioData( i, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
- BOOL bActive = aDocument.IsActiveScenario( i );
+ sal_Bool bActive = aDocument.IsActiveScenario( i );
pUndoDoc->SetActiveScenario( i, bActive );
// Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
aDocument.CopyToDocument( 0,0,i, MAXCOL,MAXROW,i,
- IDF_ALL,FALSE, pUndoDoc );
+ IDF_ALL,false, pUndoDoc );
}
GetUndoManager()->AddUndoAction(
@@ -766,14 +766,14 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
}
void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
// Undo
String aOldName;
aDocument.GetName( nTab, aOldName );
String aOldComment;
Color aOldColor;
- USHORT nOldFlags;
+ sal_uInt16 nOldFlags;
aDocument.GetScenarioData( nTab, aOldComment, aOldColor, nOldFlags );
GetUndoManager()->AddUndoAction(
new ScUndoScenarioFlags( this, nTab,
@@ -796,8 +796,8 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
}
SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags,
- ScMarkData& rMark, BOOL bRecord )
+ const Color& rColor, sal_uInt16 nFlags,
+ ScMarkData& rMark, sal_Bool bRecord )
{
rMark.MarkToMulti();
if (rMark.IsMultiMarked())
@@ -806,7 +806,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
while (aDocument.IsScenario(nNewTab))
++nNewTab;
- BOOL bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
+ sal_Bool bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
const ScMarkData* pCopyMark = NULL;
if (!bCopyAll)
pCopyMark = &rMark;
@@ -825,8 +825,8 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
rName, rComment, rColor, nFlags, rMark ));
}
- aDocument.RenameTab( nNewTab, rName, FALSE ); // ohne Formel-Update
- aDocument.SetScenario( nNewTab, TRUE );
+ aDocument.RenameTab( nNewTab, rName, false ); // ohne Formel-Update
+ aDocument.SetScenario( nNewTab, sal_True );
aDocument.SetScenarioData( nNewTab, rComment, rColor, nFlags );
ScMarkData aDestMark = rMark;
@@ -835,19 +835,19 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
//! auf Filter / Buttons / Merging testen !
ScPatternAttr aProtPattern( aDocument.GetPool() );
- aProtPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aProtPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
aDocument.ApplyPatternAreaTab( 0,0, MAXCOL,MAXROW, nNewTab, aProtPattern );
ScPatternAttr aPattern( aDocument.GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
aDocument.ApplySelectionPattern( aPattern, aDestMark );
if (!bCopyAll)
- aDocument.SetVisible( nNewTab, FALSE );
+ aDocument.SetVisible( nNewTab, false );
// dies ist dann das aktive Szenario
- aDocument.CopyScenario( nNewTab, nTab, TRUE ); // TRUE - nicht aus Szenario kopieren
+ aDocument.CopyScenario( nNewTab, nTab, sal_True ); // sal_True - nicht aus Szenario kopieren
if (nFlags & SC_SCENARIO_SHOWFRAME)
PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); // Rahmen painten
@@ -862,13 +862,13 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
return nTab;
}
-ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
- SCTAB nDestPos, BOOL bInsertNew,
- BOOL bNotifyAndPaint )
+sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
+ SCTAB nDestPos, sal_Bool bInsertNew,
+ sal_Bool bNotifyAndPaint )
{
ScDocument* pSrcDoc = rSrcDocShell.GetDocument();
- ULONG nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
+ sal_uLong nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
bInsertNew ); // no insert
// TransferTab doesn't copy drawing objects with bInsertNew=FALSE
@@ -879,15 +879,15 @@ ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pSrcDoc->GetScenarioData( nSrcPos, aComment,aColor, nFlags);
- aDocument.SetScenario(nDestPos,TRUE);
+ aDocument.SetScenario(nDestPos,true);
aDocument.SetScenarioData(nDestPos,aComment,aColor,nFlags);
- BOOL bActive = pSrcDoc->IsActiveScenario(nSrcPos);
+ sal_Bool bActive = pSrcDoc->IsActiveScenario(nSrcPos);
aDocument.SetActiveScenario(nDestPos, bActive );
- BOOL bVisible=pSrcDoc->IsVisible(nSrcPos);
+ sal_Bool bVisible=pSrcDoc->IsVisible(nSrcPos);
aDocument.SetVisible(nDestPos,bVisible );
}
@@ -903,7 +903,7 @@ ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
return nErrVal;
}
-BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord )
+sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, sal_Bool bRecord )
{
ScDocShellModificator aModificator( *this );
@@ -922,7 +922,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if (!aDocument.CopyTab( nSrcTab, nDestTab ))
{
//! EndDrawUndo?
- return FALSE;
+ return false;
}
else
{
@@ -941,7 +941,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
new ScUndoCopyTab(this, pSrcList.release(), pDestList.release()));
}
- BOOL bVbaEnabled = aDocument.IsInVBAMode();
+ sal_Bool bVbaEnabled = aDocument.IsInVBAMode();
if ( bVbaEnabled )
{
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
@@ -978,7 +978,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
else
{
if ( aDocument.GetChangeTrack() )
- return FALSE;
+ return false;
if ( nSrcTab<nDestTab && nDestTab!=SC_TAB_APPEND )
nDestTab--;
@@ -986,11 +986,11 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if ( nSrcTab == nDestTab )
{
//! allow only for api calls?
- return TRUE; // nothing to do, but valid
+ return sal_True; // nothing to do, but valid
}
if (!aDocument.MoveTab( nSrcTab, nDestTab ))
- return FALSE;
+ return false;
else if (bRecord)
{
auto_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
@@ -1007,7 +1007,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- return TRUE;
+ return sal_True;
}
@@ -1015,7 +1015,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
{
ScDBDocFunc aFunc(*this);
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
ScDBData* pDBData = static_cast<ScDBData*>(pRefreshTimer);
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
@@ -1024,11 +1024,11 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
ScRange aRange;
pDBData->GetArea( aRange );
Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
- bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag as parameter
+ bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, true, false ); //! Api-Flag as parameter
// internal operations (sort, query, subtotal) only if no error
if (bContinue)
{
- aFunc.RepeatDB( pDBData->GetName(), TRUE, TRUE );
+ aFunc.RepeatDB( pDBData->GetName(), sal_True, sal_True );
RefreshPivotTables(aRange);
}
}
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 88ea2135f9f6..07bc6e4c5d35 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -103,7 +103,7 @@ void ScDocShell::SetVisArea( const Rectangle & rVisArea )
{
// with the SnapVisArea call in SetVisAreaOrSize, it's safe to always
// use both the size and position of the VisArea
- SetVisAreaOrSize( rVisArea, TRUE );
+ SetVisAreaOrSize( rVisArea, sal_True );
}
void lcl_SetTopRight( Rectangle& rRect, const Point& rPos )
@@ -115,9 +115,9 @@ void lcl_SetTopRight( Rectangle& rRect, const Point& rPos )
rRect.Bottom() = rPos.Y() + aSize.Height() - 1;
}
-void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart )
+void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifyStart )
{
- BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
+ sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
Rectangle aArea = rVisArea;
if (bModifyStart)
@@ -200,12 +200,12 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart
}
}
-BOOL ScDocShell::IsOle()
+sal_Bool ScDocShell::IsOle()
{
return (GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
}
-void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
+void ScDocShell::UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize )
{
// wenn's gar nicht Ole ist, kann man sich die Berechnungen sparen
// (VisArea wird dann beim Save wieder zurueckgesetzt)
@@ -218,7 +218,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
Rectangle aOldArea = SfxObjectShell::GetVisArea();
Rectangle aNewArea = aOldArea;
- BOOL bEmbedded = aDocument.IsEmbedded();
+ sal_Bool bEmbedded = aDocument.IsEmbedded();
if (bEmbedded)
aNewArea = aDocument.GetEmbeddedRect();
else
@@ -227,7 +227,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
if ( nTab != aDocument.GetVisibleTab() )
aDocument.SetVisibleTab( nTab );
- BOOL bNegativePage = aDocument.IsNegativePage( nTab );
+ sal_Bool bNegativePage = aDocument.IsNegativePage( nTab );
SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT);
SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM);
Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab );
@@ -240,7 +240,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
}
if (aNewArea != aOldArea)
- SetVisAreaOrSize( aNewArea, TRUE ); // hier muss auch der Start angepasst werden
+ SetVisAreaOrSize( aNewArea, true ); // hier muss auch der Start angepasst werden
}
//
@@ -266,14 +266,14 @@ void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
SfxItemSet& rStyleSet = pStyle->GetItemSet();
const SfxPoolItem* pItem;
- if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,FALSE,&pItem) == SFX_ITEM_SET)
+ if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,false,&pItem) == SFX_ITEM_SET)
{
SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet();
SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges());
pDestSet->Put(rSrcSet);
rStyleSet.Put(SvxSetItem(ATTR_PAGE_HEADERSET,pDestSet));
}
- if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,FALSE,&pItem) == SFX_ITEM_SET)
+ if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,false,&pItem) == SFX_ITEM_SET)
{
SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet();
SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges());
@@ -301,7 +301,7 @@ void ScDocShell::LoadStyles( SfxObjectShell &rSource )
PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_LEFT );
}
-void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles )
+void ScDocShell::LoadStylesArgs( ScDocShell& rSource, sal_Bool bReplace, sal_Bool bCellStyles, sal_Bool bPageStyles )
{
// similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call
@@ -315,12 +315,12 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
( bPageStyles ? SFX_STYLE_FAMILY_ALL : SFX_STYLE_FAMILY_PARA ) :
SFX_STYLE_FAMILY_PAGE;
SfxStyleSheetIterator aIter( pSourcePool, eFamily );
- USHORT nSourceCount = aIter.Count();
+ sal_uInt16 nSourceCount = aIter.Count();
if ( nSourceCount == 0 )
return; // no source styles
ScStylePair* pStyles = new ScStylePair[ nSourceCount ];
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
// first create all new styles
@@ -351,7 +351,7 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
// then copy contents (after inserting all styles, for parent etc.)
- for ( USHORT i = 0; i < nFound; ++i )
+ for ( sal_uInt16 i = 0; i < nFound; ++i )
{
pStyles[i].pDest->GetItemSet().PutExtended(
pStyles[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT);
@@ -368,11 +368,11 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
}
-BOOL ScDocShell::Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3,
- USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted )
+sal_Bool ScDocShell::Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3,
+ sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted )
{
- BOOL bRet = SfxObjectShell::Insert( rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3,
+ sal_Bool bRet = SfxObjectShell::Insert( rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3,
nIdx1, nIdx2, nIdx3, rIdxDeleted );
if (bRet)
lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen
@@ -396,8 +396,8 @@ void ScDocShell::UpdateLinks()
// nicht mehr benutzte Links raus
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT k=nCount; k>0; )
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 k=nCount; k>0; )
{
--k;
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[k];
@@ -412,7 +412,7 @@ void ScDocShell::UpdateLinks()
}
else // nicht mehr benutzt -> loeschen
{
- pTabLink->SetAddUndo(TRUE);
+ pTabLink->SetAddUndo(sal_True);
pLinkManager->Remove(k);
}
}
@@ -428,8 +428,8 @@ void ScDocShell::UpdateLinks()
String aDocName = aDocument.GetLinkDoc(i);
String aFltName = aDocument.GetLinkFlt(i);
String aOptions = aDocument.GetLinkOpt(i);
- ULONG nRefresh = aDocument.GetLinkRefreshDelay(i);
- BOOL bThere = FALSE;
+ sal_uLong nRefresh = aDocument.GetLinkRefreshDelay(i);
+ sal_Bool bThere = false;
for (SCTAB j=0; j<i && !bThere; j++) // im Dokument mehrfach?
if (aDocument.IsLinked(j)
&& aDocument.GetLinkDoc(j) == aDocName
@@ -438,7 +438,7 @@ void ScDocShell::UpdateLinks()
// Ignore refresh delay in compare, it should be the
// same for identical links and we don't want dupes
// if it ain't.
- bThere = TRUE;
+ bThere = sal_True;
if (!bThere) // schon als Filter eingetragen?
{
@@ -446,36 +446,36 @@ void ScDocShell::UpdateLinks()
if (!aNames.Insert(pData))
{
delete pData;
- bThere = TRUE;
+ bThere = sal_True;
}
}
if (!bThere)
{
ScTableLink* pLink = new ScTableLink( this, aDocName, aFltName, aOptions, nRefresh );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
}
}
}
-BOOL ScDocShell::ReloadTabLinks()
+sal_Bool ScDocShell::ReloadTabLinks()
{
sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager();
- BOOL bAny = FALSE;
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++ )
+ sal_Bool bAny = false;
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++ )
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScTableLink))
{
ScTableLink* pTabLink = (ScTableLink*)pBase;
- pTabLink->SetPaint(FALSE); // Paint nur einmal am Ende
+ pTabLink->SetPaint(false); // Paint nur einmal am Ende
pTabLink->Update();
- pTabLink->SetPaint(TRUE);
- bAny = TRUE;
+ pTabLink->SetPaint(true);
+ bAny = true;
}
}
@@ -488,7 +488,7 @@ BOOL ScDocShell::ReloadTabLinks()
SetDocumentModified();
}
- return TRUE; //! Fehler erkennen
+ return sal_True; //! Fehler erkennen
}
void ScDocShell::CheckConfigOptions()
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index db1bcaf82251..1d7ec23e50e9 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -115,7 +115,7 @@ using ::std::vector;
namespace
{
- ULONG lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager>& _rDrvMgr,uno::Reference<sdbc::XConnection>& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet)
+ sal_uLong lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager>& _rDrvMgr,uno::Reference<sdbc::XConnection>& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet)
{
INetURLObject aURL;
aURL.SetSmartProtocol( INET_PROT_FILE );
@@ -171,13 +171,13 @@ namespace
// -----------------------------------------------------------------------
// MoveFile/KillFile/IsDocument: similar to SfxContentHelper
-BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& rDestObj )
+sal_Bool ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& rDestObj )
{
sal_Bool bMoveData = sal_True;
- sal_Bool bRet = sal_True, bKillSource = sal_False;
+ sal_Bool bRet = sal_True, bKillSource = false;
if ( rSourceObj.GetProtocol() != rDestObj.GetProtocol() )
{
- bMoveData = sal_False;
+ bMoveData = false;
bKillSource = sal_True;
}
String aName = rDestObj.getName();
@@ -205,7 +205,7 @@ BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject&
catch( uno::Exception& )
{
// ucb may throw different exceptions on failure now
- bRet = sal_False;
+ bRet = false;
}
if ( bKillSource )
@@ -215,7 +215,7 @@ BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject&
}
-BOOL ScDocShell::KillFile( const INetURLObject& rURL )
+sal_Bool ScDocShell::KillFile( const INetURLObject& rURL )
{
sal_Bool bRet = sal_True;
try
@@ -228,15 +228,15 @@ BOOL ScDocShell::KillFile( const INetURLObject& rURL )
catch( uno::Exception& )
{
// ucb may throw different exceptions on failure now
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
-BOOL ScDocShell::IsDocument( const INetURLObject& rURL )
+sal_Bool ScDocShell::IsDocument( const INetURLObject& rURL )
{
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
try
{
::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::NO_DECODE),
@@ -273,11 +273,11 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales
continue;
LanguageType eLang = pOldEntry->GetLanguage();
- BOOL bThousand, bNegRed;
- USHORT nPrecision, nLeading;
+ sal_Bool bThousand, bNegRed;
+ sal_uInt16 nPrecision, nLeading;
pOldEntry->GetFormatSpecialInfo(bThousand, bNegRed, nPrecision, nLeading);
- nPrecision = static_cast<USHORT>(rScales[i]);
+ nPrecision = static_cast<sal_uInt16>(rScales[i]);
String aNewPicture;
pFormatter->GenerateFormat(aNewPicture, nOldFormat, eLang,
bThousand, bNegRed, nPrecision, nLeading);
@@ -301,12 +301,12 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales
}
}
-ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
+sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc )
{
ScColumn::DoubleAllocSwitch aAllocSwitch(true);
- ULONG nErr = eERR_OK;
+ sal_uLong nErr = eERR_OK;
long i;
try
@@ -314,7 +314,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
String aTabName;
uno::Reference<sdbc::XDriverManager> xDrvMan;
uno::Reference<sdbc::XConnection> xConnection;
- ULONG nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
+ sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
if ( !xConnection.is() || !xDrvMan.is() )
return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection);
@@ -351,7 +351,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
xRowProp->setPropertyValue(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMAND)), aAny );
- aAny <<= sal_False;
+ aAny <<= false;
xRowProp->setPropertyValue(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_PROPCHANGE_NOTIFY)), aAny );
@@ -429,7 +429,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
lcl_setScalesToColumns(aDocument, aScales);
SCROW nRow = 1; // 0 is column titles
- BOOL bEnd = FALSE;
+ sal_Bool bEnd = false;
while ( !bEnd && xRowSet->next() )
{
bool bSimpleRow = true;
@@ -440,7 +440,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
{
ScDatabaseDocUtil::StrData aStrData;
ScDatabaseDocUtil::PutData( &aDocument, nCol, nRow, 0,
- xRow, i+1, pTypeArr[i], FALSE,
+ xRow, i+1, pTypeArr[i], false,
&aStrData );
if (aStrData.mnStrLength > aColWidthParam[nCol].mnMaxTextLen)
@@ -463,7 +463,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
}
else // past the end of the spreadsheet
{
- bEnd = TRUE; // don't continue
+ bEnd = sal_True; // don't continue
nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning message
}
@@ -497,15 +497,15 @@ inline sal_Bool IsAsciiAlpha( sal_Unicode c )
}
void lcl_GetColumnTypes( ScDocShell& rDocShell,
- const ScRange& rDataRange, BOOL bHasFieldNames,
+ const ScRange& rDataRange, sal_Bool bHasFieldNames,
rtl::OUString* pColNames, sal_Int32* pColTypes,
sal_Int32* pColLengths, sal_Int32* pColScales,
- BOOL& bHasMemo, CharSet eCharSet )
+ sal_Bool& bHasMemo, CharSet eCharSet )
{
// updating of column titles didn't work in 5.2 and isn't always wanted
// (saving normally shouldn't modify the document)
//! read flag from configuration
- BOOL bUpdateTitles = FALSE;
+ sal_Bool bUpdateTitles = false;
ScDocument* pDoc = rDocShell.GetDocument();
SvNumberFormatter* pNumFmt = pDoc->GetFormatTable();
@@ -522,8 +522,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
SCROW nFirstDataRow = ( bHasFieldNames ? nFirstRow + 1 : nFirstRow );
for ( SCCOL nCol = nFirstCol; nCol <= nLastCol; nCol++ )
{
- BOOL bTypeDefined = FALSE;
- BOOL bPrecDefined = FALSE;
+ sal_Bool bTypeDefined = false;
+ sal_Bool bPrecDefined = false;
sal_Int32 nFieldLen = 0;
sal_Int32 nPrecision = 0;
sal_Int32 nDbType = sdbc::DataType::SQLNULL;
@@ -545,26 +545,26 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
case 'L' :
nDbType = sdbc::DataType::BIT;
nFieldLen = 1;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
break;
case 'D' :
nDbType = sdbc::DataType::DATE;
nFieldLen = 8;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
break;
case 'M' :
nDbType = sdbc::DataType::LONGVARCHAR;
nFieldLen = 10;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
- bHasMemo = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
+ bHasMemo = sal_True;
break;
case 'C' :
nDbType = sdbc::DataType::VARCHAR;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
break;
case 'N' :
nDbType = sdbc::DataType::DECIMAL;
@@ -579,7 +579,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
if ( CharClass::isAsciiNumeric(aTmp) )
{
nPrecision = aTmp.ToInt32();
- bPrecDefined = TRUE;
+ bPrecDefined = sal_True;
}
}
}
@@ -609,7 +609,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
StrData* pStrData = new StrData( aFieldName );
if ( !aFieldNamesCollection.Insert( pStrData ) )
{ // doppelter Feldname, numerisch erweitern
- USHORT nSub = 1;
+ sal_uInt16 nSub = 1;
String aFixPart( aFieldName );
do
{
@@ -665,8 +665,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
}
}
}
- BOOL bSdbLenAdjusted = FALSE;
- BOOL bSdbLenBad = FALSE;
+ sal_Bool bSdbLenAdjusted = false;
+ sal_Bool bSdbLenBad = false;
// Feldlaenge
if ( nDbType == sdbc::DataType::VARCHAR && !nFieldLen )
{ // maximale Feldbreite bestimmen
@@ -708,9 +708,9 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
//! CAVEAT! There is no way to define a numeric field with a length
//! of 1 and no decimals!
if ( nFieldLen == 1 && nPrecision == 0 )
- bSdbLenBad = TRUE;
+ bSdbLenBad = sal_True;
nFieldLen = SvDbaseConverter::ConvertPrecisionToOdbc( nFieldLen, nPrecision );
- bSdbLenAdjusted = TRUE;
+ bSdbLenAdjusted = sal_True;
}
if ( nFieldLen > 254 )
{
@@ -718,7 +718,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
{ // zu lang fuer normales Textfeld => Memofeld
nDbType = sdbc::DataType::LONGVARCHAR;
nFieldLen = 10;
- bHasMemo = TRUE;
+ bHasMemo = sal_True;
}
else
nFieldLen = 254; // dumm gelaufen..
@@ -790,13 +790,13 @@ inline void lcl_getLongVarCharString( String& rString, ScBaseCell* pCell,
}
-ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BOOL& bHasMemo )
+sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, sal_Bool& bHasMemo )
{
// remove the file so the dBase driver doesn't find an invalid file
INetURLObject aDeleteObj( rFullFileName, INET_PROT_FILE );
KillFile( aDeleteObj );
- ULONG nErr = eERR_OK;
+ sal_uLong nErr = eERR_OK;
uno::Any aAny;
SCCOL nFirstCol, nLastCol;
@@ -812,11 +812,11 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
nLastRow - nFirstRow );
SvNumberFormatter* pNumFmt = aDocument.GetFormatTable();
- BOOL bHasFieldNames = TRUE;
+ sal_Bool bHasFieldNames = sal_True;
for ( SCCOL nDocCol = nFirstCol; nDocCol <= nLastCol && bHasFieldNames; nDocCol++ )
{ // nur Strings in erster Zeile => sind Feldnamen
if ( !aDocument.HasStringData( nDocCol, nFirstRow, nTab ) )
- bHasFieldNames = FALSE;
+ bHasFieldNames = false;
}
long nColCount = nLastCol - nFirstCol + 1;
@@ -840,7 +840,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
{
uno::Reference<sdbc::XDriverManager> xDrvMan;
uno::Reference<sdbc::XConnection> xConnection;
- ULONG nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
+ sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
if ( !xConnection.is() || !xDrvMan.is() )
return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection);
@@ -1004,7 +1004,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
{
aDocument.GetValue( nDocCol, nDocRow, nTab, fVal );
// zwischen 0 Wert und 0 kein Wert unterscheiden
- BOOL bIsNull = (fVal == 0.0);
+ sal_Bool bIsNull = (fVal == 0.0);
if ( bIsNull )
bIsNull = !aDocument.HasValueData( nDocCol, nDocRow, nTab );
if ( bIsNull )
diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx
index 24cae921fddf..4e5535f92677 100644
--- a/sc/source/ui/docshell/editable.cxx
+++ b/sc/source/ui/docshell/editable.cxx
@@ -39,15 +39,15 @@
//------------------------------------------------------------------
ScEditableTester::ScEditableTester() :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
}
ScEditableTester::ScEditableTester( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestBlock( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow );
}
@@ -55,29 +55,29 @@ ScEditableTester::ScEditableTester( ScDocument* pDoc, SCTAB nTab,
ScEditableTester::ScEditableTester( ScDocument* pDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestSelectedBlock( pDoc, nStartCol, nStartRow, nEndCol, nEndRow, rMark );
}
ScEditableTester::ScEditableTester( ScDocument* pDoc, const ScRange& rRange ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestRange( pDoc, rRange );
}
ScEditableTester::ScEditableTester( ScDocument* pDoc, const ScMarkData& rMark ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestSelection( pDoc, rMark );
}
ScEditableTester::ScEditableTester( ScViewFunc* pView ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestView( pView );
}
@@ -89,12 +89,12 @@ void ScEditableTester::TestBlock( ScDocument* pDoc, SCTAB nTab,
{
if ( bIsEditable || bOnlyMatrix )
{
- BOOL bThisMatrix;
+ sal_Bool bThisMatrix;
if ( !pDoc->IsBlockEditable( nTab, nStartCol, nStartRow, nEndCol, nEndRow, &bThisMatrix ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( !bThisMatrix )
- bOnlyMatrix = FALSE;
+ bOnlyMatrix = false;
}
}
}
@@ -125,12 +125,12 @@ void ScEditableTester::TestSelection( ScDocument* pDoc, const ScMarkData& rMark
{
if ( bIsEditable || bOnlyMatrix )
{
- BOOL bThisMatrix;
+ sal_Bool bThisMatrix;
if ( !pDoc->IsSelectionEditable( rMark, &bThisMatrix ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( !bThisMatrix )
- bOnlyMatrix = FALSE;
+ bOnlyMatrix = false;
}
}
}
@@ -139,19 +139,19 @@ void ScEditableTester::TestView( ScViewFunc* pView )
{
if ( bIsEditable || bOnlyMatrix )
{
- BOOL bThisMatrix;
+ sal_Bool bThisMatrix;
if ( !pView->SelectionEditable( &bThisMatrix ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( !bThisMatrix )
- bOnlyMatrix = FALSE;
+ bOnlyMatrix = false;
}
}
}
//------------------------------------------------------------------
-USHORT ScEditableTester::GetMessageId() const
+sal_uInt16 ScEditableTester::GetMessageId() const
{
if (bIsEditable)
return 0;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 2c2bb32e3ef9..f9de3e8c0c48 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1288,7 +1288,7 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell)
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nError = pFCell->GetErrCode();
+ sal_uInt16 nError = pFCell->GetErrCode();
if (nError)
return new FormulaErrorToken( nError);
else if (pFCell->IsValue())
@@ -1391,7 +1391,7 @@ static ScTokenArray* lcl_convertToTokenArray(const ScDocument* pSrcDoc, ScRange&
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nError = pFCell->GetErrCode();
+ sal_uInt16 nError = pFCell->GetErrCode();
if (nError)
xMat->PutDouble( CreateDoubleError( nError), nC, nR);
else if (pFCell->IsValue())
@@ -2162,7 +2162,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri
pSet->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions));
// make medium hidden to prevent assertion from progress bar
- pSet->Put( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_HIDDEN, sal_True ) );
auto_ptr<SfxMedium> pMedium(new SfxMedium(aFile, STREAM_STD_READ, false, pFilter, pSet));
if (pMedium->GetError() != ERRCODE_NONE)
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 8b08e80d21ae..133cb368e117 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -113,9 +113,9 @@ enum SylkVersion
ScImportExport::ScImportExport( ScDocument* p )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( TRUE ), bSingle( TRUE ), bUndo( FALSE ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( sal_True ), bSingle( sal_True ), bUndo( false ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -128,9 +128,9 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
aRange( rPt ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( FALSE ), bSingle( TRUE ), bUndo( BOOL( pDocSh != NULL ) ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( false ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -138,15 +138,15 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
// ctor with a range is only used for export
-//! ctor with a string (and bSingle=TRUE) is also used for DdeSetData
+//! ctor with a string (and bSingle=sal_True) is also used for DdeSetData
ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
aRange( r ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( FALSE ), bSingle( FALSE ), bUndo( BOOL( pDocSh != NULL ) ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( false ), bSingle( false ), bUndo( sal_Bool( pDocSh != NULL ) ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -161,9 +161,9 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
ScImportExport::ScImportExport( ScDocument* p, const String& rPos )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( FALSE ), bSingle( TRUE ), bUndo( BOOL( pDocSh != NULL ) ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( false ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -187,12 +187,12 @@ ScImportExport::ScImportExport( ScDocument* p, const String& rPos )
formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
// Bereich?
if( aRange.Parse( aPos, pDoc, eConv ) & SCA_VALID )
- bSingle = FALSE;
+ bSingle = false;
// Zelle?
else if( aRange.aStart.Parse( aPos, pDoc, eConv ) & SCA_VALID )
aRange.aEnd = aRange.aStart;
else
- bAll = TRUE;
+ bAll = sal_True;
}
@@ -217,9 +217,9 @@ void ScImportExport::SetExtOptions( const ScAsciiOptions& rOpt )
}
-BOOL ScImportExport::IsFormatSupported( ULONG nFormat )
+sal_Bool ScImportExport::IsFormatSupported( sal_uLong nFormat )
{
- return BOOL( nFormat == FORMAT_STRING
+ return sal_Bool( nFormat == FORMAT_STRING
|| nFormat == SOT_FORMATSTR_ID_SYLK
|| nFormat == SOT_FORMATSTR_ID_LINK
|| nFormat == SOT_FORMATSTR_ID_HTML
@@ -233,7 +233,7 @@ BOOL ScImportExport::IsFormatSupported( ULONG nFormat )
// Vorbereitung fuer Undo: Undo-Dokument erzeugen
-BOOL ScImportExport::StartPaste()
+sal_Bool ScImportExport::StartPaste()
{
if ( !bAll )
{
@@ -243,16 +243,16 @@ BOOL ScImportExport::StartPaste()
InfoBox aInfoBox(Application::GetDefDialogParent(),
ScGlobal::GetRscString( aTester.GetMessageId() ) );
aInfoBox.Execute();
- return FALSE;
+ return false;
}
}
if( bUndo && pDocSh && pDoc->IsUndoEnabled())
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc );
}
- return TRUE;
+ return sal_True;
}
// Nachbereitung Insert: Undo/Redo-Aktionen erzeugen, Invalidate/Repaint
@@ -260,14 +260,14 @@ BOOL ScImportExport::StartPaste()
void ScImportExport::EndPaste()
{
- BOOL bHeight = pDocSh && pDocSh->AdjustRowHeight(
+ sal_Bool bHeight = pDocSh && pDocSh->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row(), aRange.aStart.Tab() );
if( pUndoDoc && pDoc->IsUndoEnabled() )
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, false, pRedoDoc );
ScMarkData aDestMark;
aDestMark.SelectOneTable( aRange.aStart.Tab() );
pDocSh->GetUndoManager()->AddUndoAction(
@@ -291,14 +291,14 @@ void ScImportExport::EndPaste()
/////////////////////////////////////////////////////////////////////////////
-BOOL ScImportExport::ImportData( const String& /* rMimeType */,
+sal_Bool ScImportExport::ImportData( const String& /* rMimeType */,
const ::com::sun::star::uno::Any & /* rValue */ )
{
DBG_ASSERT( !this, "Implementation is missing" );
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ExportData( const String& rMimeType,
+sal_Bool ScImportExport::ExportData( const String& rMimeType,
::com::sun::star::uno::Any & rValue )
{
SvMemoryStream aStrm;
@@ -306,17 +306,17 @@ BOOL ScImportExport::ExportData( const String& rMimeType,
if( ExportStream( aStrm, String(),
SotExchange::GetFormatIdFromMimeType( rMimeType ) ))
{
- aStrm << (BYTE) 0;
+ aStrm << (sal_uInt8) 0;
rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
(sal_Int8*)aStrm.GetData(),
aStrm.Seek( STREAM_SEEK_TO_END ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt )
+sal_Bool ScImportExport::ImportString( const ::rtl::OUString& rText, sal_uLong nFmt )
{
switch ( nFmt )
{
@@ -341,14 +341,14 @@ BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt )
}
-BOOL ScImportExport::ExportString( ::rtl::OUString& rText, ULONG nFmt )
+sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt )
{
DBG_ASSERT( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" );
if ( nFmt != FORMAT_STRING )
{
rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
ByteString aTmp;
- BOOL bOk = ExportByteString( aTmp, eEnc, nFmt );
+ sal_Bool bOk = ExportByteString( aTmp, eEnc, nFmt );
rText = UniString( aTmp, eEnc );
return bOk;
}
@@ -364,16 +364,16 @@ BOOL ScImportExport::ExportString( ::rtl::OUString& rText, ULONG nFmt )
aStrm.Seek( STREAM_SEEK_TO_END );
rText = rtl::OUString( (const sal_Unicode*) aStrm.GetData() );
- return TRUE;
+ return sal_True;
}
rText = rtl::OUString();
- return FALSE;
+ return false;
// ExportStream must handle RTL_TEXTENCODING_UNICODE
}
-BOOL ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, ULONG nFmt )
+sal_Bool ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, sal_uLong nFmt )
{
DBG_ASSERT( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" );
if ( eEnc == RTL_TEXTENCODING_UNICODE )
@@ -391,74 +391,74 @@ BOOL ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc,
aStrm << (sal_Char) 0;
aStrm.Seek( STREAM_SEEK_TO_END );
// Sicherheits-Check:
- if( aStrm.Tell() <= (ULONG) STRING_MAXLEN )
+ if( aStrm.Tell() <= (sal_uLong) STRING_MAXLEN )
{
rText = (const sal_Char*) aStrm.GetData();
- return TRUE;
+ return sal_True;
}
}
rText.Erase();
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, ULONG nFmt )
+sal_Bool ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt )
{
if( nFmt == FORMAT_STRING )
{
if( ExtText2Doc( rStrm ) ) // pExtOptions auswerten
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_SYLK )
{
if( Sylk2Doc( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_DIF )
{
if( Dif2Doc( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == FORMAT_RTF )
{
if( RTF2Doc( rStrm, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_LINK )
- return TRUE; // Link-Import?
+ return sal_True; // Link-Import?
if ( nFmt == SOT_FORMATSTR_ID_HTML )
{
if( HTML2Doc( rStrm, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE )
{
MSE40HTMLClipFormatObj aMSE40ClpObj; // needed to skip the header data
SvStream* pHTML = aMSE40ClpObj.IsValid( rStrm );
if ( pHTML && HTML2Doc( *pHTML, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULONG nFmt )
+sal_Bool ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt )
{
if( nFmt == FORMAT_STRING )
{
if( Doc2Text( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_SYLK )
{
if( Doc2Sylk( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_DIF )
{
if( Doc2Dif( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_LINK && !bAll )
{
@@ -476,7 +476,7 @@ BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULON
if( aDocName.Len() )
{
String aRefName;
- USHORT nFlags = SCA_VALID | SCA_TAB_3D;
+ sal_uInt16 nFlags = SCA_VALID | SCA_TAB_3D;
if( bSingle )
aRange.aStart.Format( aRefName, nFlags, pDoc, pDoc->GetAddressConvention() );
else
@@ -487,32 +487,32 @@ BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULON
}
String aAppName = Application::GetAppName();
- WriteUnicodeOrByteString( rStrm, aAppName, TRUE );
- WriteUnicodeOrByteString( rStrm, aDocName, TRUE );
- WriteUnicodeOrByteString( rStrm, aRefName, TRUE );
+ WriteUnicodeOrByteString( rStrm, aAppName, sal_True );
+ WriteUnicodeOrByteString( rStrm, aDocName, sal_True );
+ WriteUnicodeOrByteString( rStrm, aRefName, sal_True );
if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
rStrm << sal_Unicode(0);
else
rStrm << sal_Char(0);
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
}
if( nFmt == SOT_FORMATSTR_ID_HTML )
{
if( Doc2HTML( rStrm, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == FORMAT_RTF )
{
if( Doc2RTF( rStrm ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero )
+void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, sal_Bool bZero )
{
rtl_TextEncoding eEnc = rStrm.GetStreamCharSet();
if ( eEnc == RTL_TEXTENCODING_UNICODE )
@@ -575,10 +575,10 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
sal_Unicode cStr, DoubledQuoteMode eMode )
{
p++; //! jump over opening quote
- BOOL bCont;
+ sal_Bool bCont;
do
{
- bCont = FALSE;
+ bCont = false;
const sal_Unicode* p0 = p;
for( ;; )
{
@@ -596,7 +596,7 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
break;
case DQM_ESCAPE :
p++; // one for us (breaking for-loop)
- bCont = TRUE; // and more
+ bCont = sal_True; // and more
break;
case DQM_CONCAT :
if ( p0+1 < p )
@@ -770,18 +770,17 @@ inline void lcl_WriteSimpleString( SvStream& rStrm, const String& rString )
//////////////////////////////////////////////////////////////////////////////
-BOOL ScImportExport::Text2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::Text2Doc( SvStream& rStrm )
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SCCOL nStartCol = aRange.aStart.Col();
SCROW nStartRow = aRange.aStart.Row();
SCCOL nEndCol = aRange.aEnd.Col();
SCROW nEndRow = aRange.aEnd.Row();
- ULONG nOldPos = rStrm.Tell();
- if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
- rStrm.StartReadingUnicodeText();
- BOOL bData = BOOL( !bSingle );
+ sal_uLong nOldPos = rStrm.Tell();
+ rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() );
+ sal_Bool bData = sal_Bool( !bSingle );
if( !bSingle)
bOk = StartPaste();
@@ -829,7 +828,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
pDoc->SetString( nCol, nRow, aRange.aStart.Tab(), aCell );
}
else // zuviele Spalten/Zeilen
- bOverflow = TRUE; // beim Import Warnung ausgeben
+ bOverflow = sal_True; // beim Import Warnung ausgeben
++nCol;
}
++nRow;
@@ -840,7 +839,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
aRange.aEnd.SetCol( nEndCol );
aRange.aEnd.SetRow( nEndRow );
bOk = StartPaste();
- bData = TRUE;
+ bData = sal_True;
}
else
break;
@@ -856,7 +855,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
static bool lcl_PutString(
- ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rStr, BYTE nColFormat,
+ ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rStr, sal_uInt8 nColFormat,
SvNumberFormatter* pFormatter, bool bDetectNumFormat,
::utl::TransliterationWrapper& rTransliteration, CalendarWrapper& rCalendar,
::utl::TransliterationWrapper* pSecondTransliteration, CalendarWrapper* pSecondCalendar )
@@ -900,12 +899,12 @@ static bool lcl_PutString(
}
else if ( nColFormat != SC_COL_STANDARD ) // Datumsformate
{
- const USHORT nMaxNumberParts = 7; // Y-M-D h:m:s.t
+ const sal_uInt16 nMaxNumberParts = 7; // Y-M-D h:m:s.t
xub_StrLen nLen = rStr.Len();
xub_StrLen nStart[nMaxNumberParts];
xub_StrLen nEnd[nMaxNumberParts];
- USHORT nDP, nMP, nYP;
+ sal_uInt16 nDP, nMP, nYP;
switch ( nColFormat )
{
case SC_COL_YMD: nDP = 2; nMP = 1; nYP = 0; break;
@@ -914,28 +913,28 @@ static bool lcl_PutString(
default: nDP = 0; nMP = 1; nYP = 2; break;
}
- USHORT nFound = 0;
- BOOL bInNum = FALSE;
+ sal_uInt16 nFound = 0;
+ sal_Bool bInNum = false;
for ( xub_StrLen nPos=0; nPos<nLen && (bInNum ||
nFound<nMaxNumberParts); nPos++ )
{
if (bInNum && nFound == 3 && nColFormat == SC_COL_YMD &&
nPos <= nStart[nFound]+2 && rStr.GetChar(nPos) == 'T')
- bInNum = FALSE; // ISO-8601: YYYY-MM-DDThh:mm...
+ bInNum = false; // ISO-8601: YYYY-MM-DDThh:mm...
else if ((((!bInNum && nFound==nMP) || (bInNum && nFound==nMP+1))
&& ScGlobal::pCharClass->isLetterNumeric( rStr, nPos))
|| ScGlobal::pCharClass->isDigit( rStr, nPos))
{
if (!bInNum)
{
- bInNum = TRUE;
+ bInNum = sal_True;
nStart[nFound] = nPos;
++nFound;
}
nEnd[nFound-1] = nPos;
}
else
- bInNum = FALSE;
+ bInNum = false;
}
if ( nFound == 1 )
@@ -952,13 +951,13 @@ static bool lcl_PutString(
// 8 digits: 4 for year, 2 each for day and month
// 5 or 7 digits: first field is shortened by 1
- BOOL bLongYear = ( nDateLen >= 7 );
- BOOL bShortFirst = ( nDateLen == 5 || nDateLen == 7 );
+ sal_Bool bLongYear = ( nDateLen >= 7 );
+ sal_Bool bShortFirst = ( nDateLen == 5 || nDateLen == 7 );
- USHORT nFieldStart = nDateStart;
- for (USHORT nPos=0; nPos<3; nPos++)
+ sal_uInt16 nFieldStart = nDateStart;
+ for (sal_uInt16 nPos=0; nPos<3; nPos++)
{
- USHORT nFieldEnd = nFieldStart + 1; // default: 2 digits
+ sal_uInt16 nFieldEnd = nFieldStart + 1; // default: 2 digits
if ( bLongYear && nPos == nYP )
nFieldEnd += 2; // 2 extra digits for long year
if ( bShortFirst && nPos == 0 )
@@ -975,9 +974,9 @@ static bool lcl_PutString(
if ( nFound >= 3 )
{
using namespace ::com::sun::star;
- BOOL bSecondCal = FALSE;
- USHORT nDay = (USHORT) rStr.Copy( nStart[nDP], nEnd[nDP]+1-nStart[nDP] ).ToInt32();
- USHORT nYear = (USHORT) rStr.Copy( nStart[nYP], nEnd[nYP]+1-nStart[nYP] ).ToInt32();
+ sal_Bool bSecondCal = false;
+ sal_uInt16 nDay = (sal_uInt16) rStr.Copy( nStart[nDP], nEnd[nDP]+1-nStart[nDP] ).ToInt32();
+ sal_uInt16 nYear = (sal_uInt16) rStr.Copy( nStart[nYP], nEnd[nYP]+1-nStart[nYP] ).ToInt32();
String aMStr = rStr.Copy( nStart[nMP], nEnd[nMP]+1-nStart[nMP] );
sal_Int16 nMonth = (sal_Int16) aMStr.ToInt32();
if (!nMonth)
@@ -1013,14 +1012,14 @@ static bool lcl_PutString(
pSecondTransliteration->isEqual( aMStr, xMonths[i].AbbrevName ) )
{
nMonth = sal::static_int_cast<sal_Int16>( i+1 );
- bSecondCal = TRUE;
+ bSecondCal = sal_True;
}
else if ( i == 8 && pSecondTransliteration->isEqual(
aMStr, aSepShortened ) )
{ // correct English abbreviation is SEPT,
// but data mostly contains SEP only
nMonth = sal::static_int_cast<sal_Int16>( i+1 );
- bSecondCal = TRUE;
+ bSecondCal = sal_True;
}
}
}
@@ -1076,12 +1075,12 @@ static bool lcl_PutString(
LanguageType eDocLang = eLatin; //! which language for date formats?
short nType = (nFound > 3 ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE);
- ULONG nFormat = pDocFormatter->GetStandardFormat( nType, eDocLang );
+ sal_uLong nFormat = pDocFormatter->GetStandardFormat( nType, eDocLang );
// maybe there is a special format including seconds or milliseconds
if (nFound > 5)
nFormat = pDocFormatter->GetStandardFormat( fDays, nFormat, nType, eDocLang);
- pDoc->PutCell( nCol, nRow, nTab, new ScValueCell(fDays), nFormat, FALSE );
+ pDoc->PutCell( nCol, nRow, nTab, new ScValueCell(fDays), nFormat, false );
return bMultiLine; // success
}
@@ -1128,18 +1127,17 @@ String lcl_GetFixed( const String& rLine, xub_StrLen nStart, xub_StrLen nNext, b
return rLine.Copy(nStart, nSpace-nStart);
}
-BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
{
if (!pExtOptions)
return Text2Doc( rStrm );
- ULONG nOldPos = rStrm.Tell();
+ sal_uLong nOldPos = rStrm.Tell();
rStrm.Seek( STREAM_SEEK_TO_END );
::std::auto_ptr<ScProgress> xProgress( new ScProgress( pDocSh,
ScGlobal::GetRscString( STR_LOAD_DOC ), rStrm.Tell() - nOldPos ));
rStrm.Seek( nOldPos );
- if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
- rStrm.StartReadingUnicodeText();
+ rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() );
ScColumn::DoubleAllocSwitch aAllocSwitch(true);
@@ -1148,13 +1146,13 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
SCROW nStartRow = aRange.aStart.Row();
SCTAB nTab = aRange.aStart.Tab();
- BOOL bFixed = pExtOptions->IsFixedLen();
+ sal_Bool bFixed = pExtOptions->IsFixedLen();
const String& rSeps = pExtOptions->GetFieldSeps();
const sal_Unicode* pSeps = rSeps.GetBuffer();
- BOOL bMerge = pExtOptions->IsMergeSeps();
- USHORT nInfoCount = pExtOptions->GetInfoCount();
+ sal_Bool bMerge = pExtOptions->IsMergeSeps();
+ sal_uInt16 nInfoCount = pExtOptions->GetInfoCount();
const xub_StrLen* pColStart = pExtOptions->GetColStart();
- const BYTE* pColFormat = pExtOptions->GetColFormat();
+ const sal_uInt8* pColFormat = pExtOptions->GetColFormat();
long nSkipLines = pExtOptions->GetStartRow();
LanguageType eDocLang = pExtOptions->GetLanguage();
@@ -1181,7 +1179,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
}
String aLine, aCell;
- USHORT i;
+ sal_uInt16 i;
SCROW nRow = nStartRow;
while(--nSkipLines>0)
@@ -1203,7 +1201,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
bool bQuotedAsText = pExtOptions && pExtOptions->IsQuotedAsText();
- ULONG nOriginalStreamPos = rStrm.Tell();
+ sal_uLong nOriginalStreamPos = rStrm.Tell();
do
{
@@ -1224,11 +1222,11 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
// SC_COL_SKIP.
for ( i=0; i<nInfoCount && nCol <= MAXCOL+1; i++ )
{
- BYTE nFmt = pColFormat[i];
+ sal_uInt8 nFmt = pColFormat[i];
if (nFmt != SC_COL_SKIP) // sonst auch nCol nicht hochzaehlen
{
if (nCol > MAXCOL)
- bOverflow = TRUE; // display warning on import
+ bOverflow = sal_True; // display warning on import
else if (!bDetermineRange)
{
xub_StrLen nStart = pColStart[i];
@@ -1250,7 +1248,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
else // Nach Trennzeichen suchen
{
SCCOL nSourceCol = 0;
- USHORT nInfoStart = 0;
+ sal_uInt16 nInfoStart = 0;
const sal_Unicode* p = aLine.GetBuffer();
// Yes, the check is nCol<=MAXCOL+1, +1 because it is only an
// overflow if there is really data following to be put behind
@@ -1261,7 +1259,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
bool bIsQuoted = false;
p = ScImportExport::ScanNextFieldFromString( p, aCell, cStr, pSeps, bMerge, bIsQuoted );
- BYTE nFmt = SC_COL_STANDARD;
+ sal_uInt8 nFmt = SC_COL_STANDARD;
for ( i=nInfoStart; i<nInfoCount; i++ )
{
if ( pColStart[i] == nSourceCol + 1 ) // pColStart ist 1-basiert
@@ -1274,7 +1272,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if ( nFmt != SC_COL_SKIP )
{
if (nCol > MAXCOL)
- bOverflow = TRUE; // display warning on import
+ bOverflow = sal_True; // display warning on import
else if (!bDetermineRange)
{
if (bIsQuoted && bQuotedAsText)
@@ -1303,7 +1301,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
++nRow;
if ( nRow > MAXROW )
{
- bOverflow = TRUE; // display warning on import
+ bOverflow = sal_True; // display warning on import
break; // for
}
}
@@ -1326,7 +1324,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
{
delete pEnglishTransliteration;
delete pEnglishCalendar;
- return FALSE;
+ return false;
}
}
@@ -1335,7 +1333,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if (!StartPaste())
{
EndPaste();
- return FALSE;
+ return false;
}
}
@@ -1351,7 +1349,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if (bRangeIsDetermined)
EndPaste();
- return TRUE;
+ return sal_True;
}
@@ -1424,7 +1422,7 @@ bool hasLineBreaksOrSeps( const String& rStr, sal_Unicode cSep )
}
-BOOL ScImportExport::Doc2Text( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2Text( SvStream& rStrm )
{
SCCOL nCol;
SCROW nRow;
@@ -1520,14 +1518,14 @@ BOOL ScImportExport::Doc2Text( SvStream& rStrm )
}
}
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm )
{
- BOOL bOk = TRUE;
- BOOL bMyDoc = FALSE;
+ sal_Bool bOk = sal_True;
+ sal_Bool bMyDoc = false;
SylkVersion eVersion = SYLK_OTHER;
// US-English separators for StringToDouble
@@ -1538,8 +1536,8 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
SCROW nStartRow = aRange.aStart.Row();
SCCOL nEndCol = aRange.aEnd.Col();
SCROW nEndRow = aRange.aEnd.Row();
- ULONG nOldPos = rStrm.Tell();
- BOOL bData = BOOL( !bSingle );
+ sal_uLong nOldPos = rStrm.Tell();
+ sal_Bool bData = sal_Bool( !bSingle );
SvULongs aFormats;
if( !bSingle)
@@ -1567,7 +1565,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
if( cTag == 'C' ) // Content
{
if( *p++ != ';' )
- return FALSE;
+ return false;
while( *p )
{
sal_Unicode ch = *p++;
@@ -1601,15 +1599,15 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
nEndCol = nCol;
break;
}
- BOOL bText;
+ sal_Bool bText;
if( *p == '"' )
{
- bText = TRUE;
+ bText = sal_True;
aText.Erase();
p = lcl_ScanSylkString( p, aText, eVersion);
}
else
- bText = FALSE;
+ bText = false;
const sal_Unicode* q = p;
while( *q && *q != ';' )
q++;
@@ -1619,7 +1617,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
{
pDoc->PutCell( nCol, nRow, aRange.aStart.Tab(),
ScBaseCell::CreateTextCell( aText, pDoc),
- (BOOL) TRUE);
+ (sal_Bool) sal_True);
}
else
{
@@ -1663,7 +1661,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
if ( ch == 'M' )
{
ScMarkData aMark;
- aMark.SelectTable( aPos.Tab(), TRUE );
+ aMark.SelectTable( aPos.Tab(), sal_True );
pDoc->InsertMatrixFormula( nCol, nRow, nRefCol,
nRefRow, aMark, EMPTY_STRING, pCode );
}
@@ -1686,7 +1684,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
else if( cTag == 'F' ) // Format
{
if( *p++ != ';' )
- return FALSE;
+ return false;
sal_Int32 nFormat = -1;
while( *p )
{
@@ -1728,7 +1726,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
}
if ( 0 <= nFormat && nFormat < aFormats.Count() )
{
- ULONG nKey = aFormats[(USHORT)nFormat];
+ sal_uLong nKey = aFormats[(sal_uInt16)nFormat];
pDoc->ApplyAttr( nCol, nRow, aRange.aStart.Tab(),
SfxUInt32Item( ATTR_VALUE_FORMAT, nKey ) );
}
@@ -1775,7 +1773,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
aRange.aEnd.SetCol( nEndCol );
aRange.aEnd.SetRow( nEndRow );
bOk = StartPaste();
- bData = TRUE;
+ bData = sal_True;
}
else
break;
@@ -1786,7 +1784,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
}
-BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2Sylk( SvStream& rStrm )
{
SCCOL nCol;
SCROW nRow;
@@ -1806,7 +1804,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
{
String aBufStr;
double nVal;
- BOOL bForm = FALSE;
+ sal_Bool bForm = false;
SCROW r = nRow - nStartRow + 1;
SCCOL c = nCol - nStartCol + 1;
ScBaseCell* pCell;
@@ -1827,7 +1825,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
aValStr = ::rtl::math::doubleToUString( nVal,
rtl_math_StringFormat_Automatic,
- rtl_math_DecimalPlaces_Max, '.', TRUE );
+ rtl_math_DecimalPlaces_Max, '.', sal_True );
aBufStr.AssignAscii(RTL_CONSTASCII_STRINGPARAM( "C;X" ));
aBufStr += String::CreateFromInt32( c );
@@ -1926,35 +1924,35 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
}
lcl_WriteSimpleString( rStrm, String( 'E' ) );
WriteUnicodeOrByteEndl( rStrm );
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
+sal_Bool ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
{
// CharSet is ignored in ScExportHTML, read from Load/Save HTML options
ScFormatFilter::Get().ScExportHTML( rStrm, rBaseURL, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW, bAll,
aStreamPath, aNonConvertibleChars );
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Doc2RTF( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2RTF( SvStream& rStrm )
{
// CharSet is ignored in ScExportRTF
ScFormatFilter::Get().ScExportRTF( rStrm, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW );
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Doc2Dif( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2Dif( SvStream& rStrm )
{
// for DIF in the clipboard, IBM_850 is always used
ScFormatFilter::Get().ScExportDif( rStrm, pDoc, aRange, RTL_TEXTENCODING_IBM_850 );
- return TRUE;
+ return sal_True;
}
-BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::Dif2Doc( SvStream& rStrm )
{
SCTAB nTab = aRange.aStart.Tab();
ScDocument* pImportDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1973,12 +1971,12 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
nEndRow = aRange.aStart.Row();
aRange.aEnd = ScAddress( nEndCol, nEndRow, nTab );
- BOOL bOk = StartPaste();
+ sal_Bool bOk = StartPaste();
if (bOk)
{
- USHORT nFlags = IDF_ALL & ~IDF_STYLES;
+ sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
- pImportDoc->CopyToDocument( aRange, nFlags, FALSE, pDoc );
+ pImportDoc->CopyToDocument( aRange, nFlags, false, pDoc );
EndPaste();
}
@@ -1988,7 +1986,7 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
}
-BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
+sal_Bool ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
{
ScEEAbsImport *pImp = ScFormatFilter::Get().CreateRTFImport( pDoc, aRange );
if (!pImp)
@@ -1996,10 +1994,10 @@ BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
pImp->Read( rStrm, rBaseURL );
aRange = pImp->GetRange();
- BOOL bOk = StartPaste();
+ sal_Bool bOk = StartPaste();
if (bOk)
{
- USHORT nFlags = IDF_ALL & ~IDF_STYLES;
+ sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
pImp->WriteToDocument();
EndPaste();
@@ -2009,15 +2007,15 @@ BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
}
-BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
+sal_Bool ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
{
- ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, TRUE);
+ ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, sal_True);
if (!pImp)
return false;
pImp->Read( rStrm, rBaseURL );
aRange = pImp->GetRange();
- BOOL bOk = StartPaste();
+ sal_Bool bOk = StartPaste();
if (bOk)
{
// ScHTMLImport may call ScDocument::InitDrawLayer, resulting in
@@ -2025,7 +2023,7 @@ BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
if (pDocSh)
pDocSh->MakeDrawLayer();
- USHORT nFlags = IDF_ALL & ~IDF_STYLES;
+ sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
if (pExtOptions)
@@ -2058,21 +2056,21 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) RETURN_ERROR
virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) RETURN_ERROR
virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress&,
- const CharSet, UINT32 ) RETURN_ERROR
+ const CharSet, sal_uInt32 ) RETURN_ERROR
virtual FltError ScImportRTF( SvStream&, const String&, ScDocument*, ScRange& ) RETURN_ERROR
- virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, BOOL, SvNumberFormatter*, bool ) RETURN_ERROR
+ virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, sal_Bool, SvNumberFormatter*, bool ) RETURN_ERROR
virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) { return NULL; }
- virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, BOOL ) { return NULL; }
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, sal_Bool ) { return NULL; }
virtual String GetHTMLRangeNameList( ScDocument*, const String& ) { return String(); }
#if ENABLE_LOTUS123_EXPORT
virtual FltError ScExportLotus123( SvStream&, ScDocument*, ExportFormatLotus, CharSet ) RETURN_ERROR
#endif
virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, CharSet ) RETURN_ERROR
- virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, UINT32 ) RETURN_ERROR
- virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, UINT32 ) RETURN_ERROR
- virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, BOOL,
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, sal_uInt32 ) RETURN_ERROR
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, sal_uInt32 ) RETURN_ERROR
+ virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, sal_Bool,
const String&, String& ) RETURN_ERROR
virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const CharSet ) RETURN_ERROR
};
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index dfbe7ed24fe0..6d35207b78ce 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -65,11 +65,11 @@ void lcl_InvalidateOutliner( SfxBindings* pBindings )
//! PaintWidthHeight zur DocShell verschieben?
void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab,
- BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd )
+ sal_Bool bColumns, SCCOLROW nStart, SCCOLROW nEnd )
{
ScDocument* pDoc = rDocShell.GetDocument();
- USHORT nParts = PAINT_GRID;
+ sal_uInt16 nParts = PAINT_GRID;
SCCOL nStartCol = 0;
SCROW nStartRow = 0;
SCCOL nEndCol = MAXCOL; // fuer Test auf Merge
@@ -97,9 +97,9 @@ void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab,
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::MakeOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
@@ -107,19 +107,19 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
SCTAB nTab = rRange.aStart.Tab();
ScDocument* pDoc = rDocShell.GetDocument();
- ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab, TRUE );
+ ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab, sal_True );
ScOutlineTable* pUndoTab = NULL;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if (bRecord)
pUndoTab = new ScOutlineTable( *pTable );
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
- BOOL bRes;
- BOOL bSize = FALSE;
+ sal_Bool bRes;
+ sal_Bool bSize = false;
if ( bColumns )
bRes = pArray->Insert( nStartCol, nEndCol, bSize );
else
@@ -132,13 +132,13 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoMakeOutline( &rDocShell,
nStartCol,nStartRow,nTab,nEndCol,nEndRow,nTab,
- pUndoTab, bColumns, TRUE ) );
+ pUndoTab, bColumns, sal_True ) );
}
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
- USHORT nParts = 0; // Datenbereich nicht geaendert
+ sal_uInt16 nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
else
@@ -149,7 +149,7 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, nParts );
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else
{
@@ -161,9 +161,9 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
return bSuccess;
}
-BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -174,7 +174,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
{
@@ -184,8 +184,8 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
- BOOL bRes;
- BOOL bSize = FALSE;
+ sal_Bool bRes;
+ sal_Bool bSize = false;
if ( bColumns )
bRes = pArray->Remove( nStartCol, nEndCol, bSize );
else
@@ -198,13 +198,13 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoMakeOutline( &rDocShell,
nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- pUndoTab, bColumns, FALSE ) );
+ pUndoTab, bColumns, false ) );
}
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
- USHORT nParts = 0; // Datenbereich nicht geaendert
+ sal_uInt16 nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
else
@@ -214,7 +214,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, nParts );
rDocShell.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
// es wird nicht wieder eingeblendet -> kein UpdatePageBreaks
@@ -229,13 +229,13 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
return bDone;
}
-BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
{
@@ -250,9 +250,9 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
SCROW nEndRow = nRow2;
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pUndoDoc );
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
@@ -263,20 +263,20 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
pUndoDoc, pUndoTab ) );
}
- SelectLevel( nTab, TRUE, pTable->GetColArray()->GetDepth(), FALSE, FALSE, bApi );
- SelectLevel( nTab, FALSE, pTable->GetRowArray()->GetDepth(), FALSE, FALSE, bApi );
+ SelectLevel( nTab, sal_True, pTable->GetColArray()->GetDepth(), false, false, bApi );
+ SelectLevel( nTab, false, pTable->GetRowArray()->GetDepth(), false, false, bApi );
pDoc->SetOutlineTable( nTab, NULL );
pDoc->UpdatePageBreaks( nTab );
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
Sound::Beep();
@@ -286,7 +286,7 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -297,7 +297,7 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
ScDocument* pUndoDoc = NULL;
@@ -318,14 +318,14 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
SCROW nOutEndRow = nRow2;
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
// einblenden
- SelectLevel( nTab, TRUE, pTable->GetColArray()->GetDepth(), FALSE, FALSE, bApi );
- SelectLevel( nTab, FALSE, pTable->GetRowArray()->GetDepth(), FALSE, FALSE, bApi );
+ SelectLevel( nTab, sal_True, pTable->GetColArray()->GetDepth(), false, false, bApi );
+ SelectLevel( nTab, false, pTable->GetRowArray()->GetDepth(), false, false, bApi );
pDoc->SetOutlineTable( nTab, NULL );
}
@@ -341,30 +341,30 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
}
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
- BOOL bRecord, BOOL bPaint, BOOL /* bApi */ )
+sal_Bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); // ist schon da
if (!pTable)
- return FALSE;
+ return false;
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
if (!pArray)
- return FALSE;
+ return false;
SCCOLROW nStart, nEnd;
pArray->GetRange( nStart, nEnd );
@@ -375,15 +375,15 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bColumns)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
@@ -398,21 +398,21 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
ScOutlineEntry* pEntry;
while ((pEntry=aIter.GetNext()) != NULL)
{
- USHORT nThisLevel = aIter.LastLevel();
- BOOL bShow = (nThisLevel < nLevel);
+ sal_uInt16 nThisLevel = aIter.LastLevel();
+ sal_Bool bShow = (nThisLevel < nLevel);
if (bShow) // einblenden
{
- pEntry->SetHidden( FALSE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( false );
+ pEntry->SetVisible( sal_True );
}
else if ( nThisLevel == nLevel ) // ausblenden
{
- pEntry->SetHidden( TRUE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( sal_True );
+ pEntry->SetVisible( sal_True );
}
else // verdeckt
{
- pEntry->SetVisible( FALSE );
+ pEntry->SetVisible( false );
}
SCCOLROW nThisStart = pEntry->GetStart();
@@ -436,14 +436,14 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -454,7 +454,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
@@ -471,14 +471,14 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
{
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoOutlineBlock( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
- pUndoDoc, pUndoTab, TRUE ) );
+ pUndoDoc, pUndoTab, sal_True ) );
}
// Spalten
@@ -493,14 +493,14 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( nStart>=nStartCol && nEnd<=nEndCol )
{
- pEntry->SetHidden( FALSE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( false );
+ pEntry->SetVisible( sal_True );
if (nStart<nMin) nMin=nStart;
if (nEnd>nMax) nMax=nEnd;
}
}
for ( i=nMin; i<=nMax; i++ )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, TRUE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, sal_True );
// Zeilen
@@ -515,22 +515,22 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( nStart>=nStartRow && nEnd<=nEndRow )
{
- pEntry->SetHidden( FALSE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( false );
+ pEntry->SetVisible( sal_True );
if (nStart<nMin) nMin=nStart;
if (nEnd>nMax) nMax=nEnd;
}
}
for ( i=nMin; i<=nMax; i++ )
if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
- pDoc->ShowRow( i, nTab, TRUE );
+ pDoc->ShowRow( i, nTab, sal_True );
pDoc->SetDrawPageSize(nTab);
pDoc->UpdatePageBreaks( nTab );
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP );
rDocShell.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
}
@@ -541,9 +541,9 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
return bDone;
}
-BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -554,18 +554,18 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
{
ScOutlineEntry* pEntry;
- USHORT nColLevel;
- USHORT nRowLevel;
- USHORT nCount;
+ sal_uInt16 nColLevel;
+ sal_uInt16 nRowLevel;
+ sal_uInt16 nCount;
SCCOLROW nStart;
SCCOLROW nEnd;
- USHORT i;
+ sal_uInt16 i;
SCCOLROW nEffStartCol = nStartCol;
SCCOLROW nEffEndCol = nEndCol;
@@ -582,16 +582,16 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
{
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
pDoc->CopyToDocument( static_cast<SCCOL>(nEffStartCol), 0, nTab,
static_cast<SCCOL>(nEffEndCol), MAXROW, nTab, IDF_NONE,
- FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoOutlineBlock( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
- pUndoDoc, pUndoTab, FALSE ) );
+ pUndoDoc, pUndoTab, false ) );
}
// Spalten
@@ -604,7 +604,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( static_cast<SCCOLROW>(nStartCol)<=nEnd && static_cast<SCCOLROW>(nEndCol)>=nStart )
- HideOutline( nTab, TRUE, nColLevel, i, FALSE, FALSE, bApi );
+ HideOutline( nTab, sal_True, nColLevel, i, false, false, bApi );
}
// Zeilen
@@ -617,7 +617,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( nStartRow<=nEnd && nEndRow>=nStart )
- HideOutline( nTab, FALSE, nRowLevel, i, FALSE, FALSE, bApi );
+ HideOutline( nTab, false, nRowLevel, i, false, false, bApi );
}
pDoc->UpdatePageBreaks( nTab );
@@ -625,7 +625,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP );
rDocShell.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
}
@@ -638,12 +638,12 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL /* bApi */ )
+sal_Bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
@@ -656,35 +656,35 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bColumns)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDoOutline( &rDocShell,
nStart, nEnd, nTab, pUndoDoc, //! start und end berechnen
- bColumns, nLevel, nEntry, TRUE ) );
+ bColumns, nLevel, nEntry, sal_True ) );
}
//! HideCursor();
pDoc->InitializeNoteCaptions(nTab);
- pEntry->SetHidden(FALSE);
+ pEntry->SetHidden(false);
SCCOLROW i;
for ( i = nStart; i <= nEnd; i++ )
{
if ( bColumns )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, TRUE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, sal_True );
else
if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
- pDoc->ShowRow( i, nTab, TRUE );
+ pDoc->ShowRow( i, nTab, sal_True );
}
ScSubOutlineIterator aIter( pArray, nLevel, nEntry );
@@ -697,14 +697,14 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
for ( i = nSubStart; i <= nSubEnd; i++ )
{
if ( bColumns )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, FALSE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, false );
else
- pDoc->ShowRow( i, nTab, FALSE );
+ pDoc->ShowRow( i, nTab, false );
}
}
}
- pArray->SetVisibleBelow( nLevel, nEntry, TRUE, TRUE );
+ pArray->SetVisibleBelow( nLevel, nEntry, sal_True, sal_True );
pDoc->SetDrawPageSize(nTab);
pDoc->InvalidatePageBreaks(nTab);
@@ -721,15 +721,15 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE; //! immer ???
+ return sal_True; //! immer ???
}
-BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL /* bApi */ )
+sal_Bool ScOutlineDocFunc::HideOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
@@ -742,37 +742,37 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bColumns)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDoOutline( &rDocShell,
nStart, nEnd, nTab, pUndoDoc,
- bColumns, nLevel, nEntry, FALSE ) );
+ bColumns, nLevel, nEntry, false ) );
}
//! HideCursor();
pDoc->InitializeNoteCaptions(nTab);
- pEntry->SetHidden(TRUE);
+ pEntry->SetHidden(true);
SCCOLROW i;
for ( i = nStart; i <= nEnd; i++ )
{
if ( bColumns )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, FALSE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, false );
else
- pDoc->ShowRow( i, nTab, FALSE );
+ pDoc->ShowRow( i, nTab, false );
}
- pArray->SetVisibleBelow( nLevel, nEntry, FALSE );
+ pArray->SetVisibleBelow( nLevel, nEntry, false );
pDoc->SetDrawPageSize(nTab);
pDoc->InvalidatePageBreaks(nTab);
@@ -789,7 +789,7 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE; //! immer ???
+ return sal_True; //! immer ???
}
diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx
index e87c2322a228..b3ec3e31d010 100644
--- a/sc/source/ui/docshell/pagedata.cxx
+++ b/sc/source/ui/docshell/pagedata.cxx
@@ -43,7 +43,7 @@ ScPrintRangeData::ScPrintRangeData()
nPagesX = nPagesY = 0;
pPageEndX = NULL;
pPageEndY = NULL;
- bTopDown = bAutomatic = TRUE;
+ bTopDown = bAutomatic = sal_True;
nFirstPage = 1;
}
@@ -109,18 +109,18 @@ ScPrintRangeData& ScPageBreakData::GetData(size_t nPos)
return pData[nPos];
}
-BOOL ScPageBreakData::IsEqual( const ScPageBreakData& rOther ) const
+sal_Bool ScPageBreakData::IsEqual( const ScPageBreakData& rOther ) const
{
if ( nUsed != rOther.nUsed )
- return FALSE;
+ return false;
- for (USHORT i=0; i<nUsed; i++)
+ for (sal_uInt16 i=0; i<nUsed; i++)
if ( pData[i].GetPrintRange() != rOther.pData[i].GetPrintRange() )
- return FALSE;
+ return false;
//! ScPrintRangeData komplett vergleichen ??
- return TRUE;
+ return sal_True;
}
void ScPageBreakData::AddPages()
@@ -128,7 +128,7 @@ void ScPageBreakData::AddPages()
if ( nUsed > 1 )
{
long nPage = pData[0].GetFirstPage();
- for (USHORT i=0; sal::static_int_cast<size_t>(i+1)<nUsed; i++)
+ for (sal_uInt16 i=0; sal::static_int_cast<size_t>(i+1)<nUsed; i++)
{
nPage += ((long)pData[i].GetPagesX())*pData[i].GetPagesY();
pData[i+1].SetFirstPage( nPage );
diff --git a/sc/source/ui/docshell/pntlock.cxx b/sc/source/ui/docshell/pntlock.cxx
index 0450f7c67a0d..2ca47820eb6d 100644
--- a/sc/source/ui/docshell/pntlock.cxx
+++ b/sc/source/ui/docshell/pntlock.cxx
@@ -35,12 +35,12 @@
//------------------------------------------------------------------------
-ScPaintLockData::ScPaintLockData(USHORT nNewMode) :
+ScPaintLockData::ScPaintLockData(sal_uInt16 nNewMode) :
nMode( nNewMode ),
nLevel( 0 ),
nDocLevel( 0 ),
nParts( 0 ),
- bModified( FALSE )
+ bModified( false )
{
}
@@ -48,7 +48,7 @@ ScPaintLockData::~ScPaintLockData()
{
}
-void ScPaintLockData::AddRange( const ScRange& rRange, USHORT nP )
+void ScPaintLockData::AddRange( const ScRange& rRange, sal_uInt16 nP )
{
if (!xRangeList.Is())
xRangeList = new ScRangeList;
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index d96f9101b858..6bd9f6d629bf 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -46,7 +46,7 @@ using namespace formula;
// -----------------------------------------------------------------------
-BOOL lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& rName )
+sal_Bool lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& rName )
{
if (pDocSh)
{
@@ -58,11 +58,11 @@ BOOL lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& r
if (pData)
{
if ( pData->IsValidReference( rRange ) )
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
ScServerObjectSvtListenerForwarder::ScServerObjectSvtListenerForwarder(
@@ -84,7 +84,7 @@ void ScServerObjectSvtListenerForwarder::Notify( SvtBroadcaster& /* rBC */, cons
ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) :
aForwarder( this ),
pDocSh( pShell ),
- bRefreshListener( FALSE )
+ bRefreshListener( false )
{
// parse item string
@@ -148,12 +148,12 @@ void ScServerObject::EndListeningAll()
SfxListener::EndListeningAll();
}
-BOOL ScServerObject::GetData(
+sal_Bool ScServerObject::GetData(
::com::sun::star::uno::Any & rData /*out param*/,
- const String & rMimeType, BOOL /* bSynchron */ )
+ const String & rMimeType, sal_Bool /* bSynchron */ )
{
if (!pDocSh)
- return FALSE;
+ return false;
// named ranges may have changed -> update aRange
if ( aItemStr.Len() )
@@ -162,7 +162,7 @@ BOOL ScServerObject::GetData(
if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange )
{
aRange = aNew;
- bRefreshListener = TRUE;
+ bRefreshListener = sal_True;
}
}
@@ -174,7 +174,7 @@ BOOL ScServerObject::GetData(
pDocSh->GetDocument()->StartListeningArea( aRange, &aForwarder );
StartListening(*pDocSh);
StartListening(*SFX_APP());
- bRefreshListener = FALSE;
+ bRefreshListener = false;
}
String aDdeTextFmt = pDocSh->GetDdeTextFmt();
@@ -184,7 +184,7 @@ BOOL ScServerObject::GetData(
{
ScImportExport aObj( pDoc, aRange );
if( aDdeTextFmt.GetChar(0) == 'F' )
- aObj.SetFormulas( TRUE );
+ aObj.SetFormulas( sal_True );
if( aDdeTextFmt.EqualsAscii( "SYLK" ) ||
aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{
@@ -214,7 +214,7 @@ BOOL ScServerObject::GetData(
void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- BOOL bDataChanged = FALSE;
+ sal_Bool bDataChanged = false;
// DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor
if ( &rBC == pDocSh )
@@ -235,7 +235,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// check if named range was modified
ScRange aNew;
if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange )
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else
@@ -244,25 +244,25 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const ScHint* pScHint = PTR_CAST( ScHint, &rHint );
if( pScHint && (pScHint->GetId() & (SC_HINT_DATACHANGED | SC_HINT_DYING)) )
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
else if (rHint.ISA(ScAreaChangedHint)) // position of broadcaster changed
{
ScRange aNewRange = ((const ScAreaChangedHint&)rHint).GetRange();
if ( aRange != aNewRange )
{
- bRefreshListener = TRUE;
- bDataChanged = TRUE;
+ bRefreshListener = sal_True;
+ bDataChanged = sal_True;
}
}
else if (rHint.ISA(SfxSimpleHint))
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if (nId == SFX_HINT_DYING)
{
// If the range is being deleted, listening must be restarted
// after the deletion is complete (done in GetData)
- bRefreshListener = TRUE;
- bDataChanged = TRUE;
+ bRefreshListener = sal_True;
+ bDataChanged = sal_True;
}
}
}
diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx
index 3171fa8164ae..19dc2843470e 100644
--- a/sc/source/ui/docshell/sizedev.cxx
+++ b/sc/source/ui/docshell/sizedev.cxx
@@ -43,11 +43,11 @@
ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
{
- BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
if ( bTextWysiwyg )
{
pDevice = pDocSh->GetPrinter();
- bOwner = FALSE;
+ bOwner = false;
aOldMapMode = pDevice->GetMapMode();
pDevice->SetMapMode( MAP_PIXEL ); // GetNeededSize needs pixel MapMode
@@ -57,7 +57,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
{
pDevice = new VirtualDevice;
pDevice->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
- bOwner = TRUE;
+ bOwner = sal_True;
}
Point aLogic = pDevice->LogicToPixel( Point(1000,1000), MAP_TWIP );
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index aad15c30feb7..b962bcfd37e1 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -79,34 +79,34 @@ TYPEINIT1(ScTableLink, ::sfx2::SvBaseLink);
ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile,
const String& rFilter, const String& rOpt,
- ULONG nRefresh ):
+ sal_uLong nRefresh ):
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer( nRefresh ),
pImpl( new TableLink_Impl ),
aFileName(rFile),
aFilterName(rFilter),
aOptions(rOpt),
- bInCreate( FALSE ),
- bInEdit( FALSE ),
- bAddUndo( TRUE ),
- bDoPaint( TRUE )
+ bInCreate( false ),
+ bInEdit( false ),
+ bAddUndo( sal_True ),
+ bDoPaint( sal_True )
{
pImpl->m_pDocSh = pDocSh;
}
ScTableLink::ScTableLink(SfxObjectShell* pShell, const String& rFile,
const String& rFilter, const String& rOpt,
- ULONG nRefresh ):
+ sal_uLong nRefresh ):
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer( nRefresh ),
pImpl( new TableLink_Impl ),
aFileName(rFile),
aFilterName(rFilter),
aOptions(rOpt),
- bInCreate( FALSE ),
- bInEdit( FALSE ),
- bAddUndo( TRUE ),
- bDoPaint( TRUE )
+ bInCreate( false ),
+ bInEdit( false ),
+ bAddUndo( sal_True ),
+ bDoPaint( sal_True )
{
pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell );
SetRefreshHandler( LINK( this, ScTableLink, RefreshHdl ) );
@@ -137,7 +137,7 @@ void ScTableLink::Edit( Window* pParent, const Link& rEndEditHdl )
if (pParent)
Application::SetDefDialogParent(pParent);
- bInEdit = TRUE;
+ bInEdit = sal_True;
SvBaseLink::Edit( pParent, LINK( this, ScTableLink, TableEndEditHdl ) );
}
@@ -164,14 +164,14 @@ void ScTableLink::Closed()
{
// Verknuepfung loeschen: Undo
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if (bAddUndo && bUndo)
{
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveLink( pImpl->m_pDocSh, aFileName ) );
- bAddUndo = FALSE; // nur einmal
+ bAddUndo = false; // nur einmal
}
// Verbindung wird im dtor aufgehoben
@@ -179,30 +179,30 @@ void ScTableLink::Closed()
SvBaseLink::Closed();
}
-BOOL ScTableLink::IsUsed() const
+sal_Bool ScTableLink::IsUsed() const
{
return pImpl->m_pDocSh->GetDocument()->HasLink( aFileName, aFilterName, aOptions );
}
-BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
- const String* pNewOptions, ULONG nNewRefresh )
+sal_Bool ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
+ const String* pNewOptions, sal_uLong nNewRefresh )
{
// Dokument laden
if (!rNewFile.Len() || !rNewFilter.Len())
- return FALSE;
+ return false;
String aNewUrl( ScGlobal::GetAbsDocName( rNewFile, pImpl->m_pDocSh ) );
- BOOL bNewUrlName = (aNewUrl != aFileName);
+ sal_Bool bNewUrlName = (aNewUrl != aFileName);
const SfxFilter* pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter);
if (!pFilter)
- return FALSE;
+ return false;
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- pDoc->SetInLinkUpdate( TRUE );
+ pDoc->SetInLinkUpdate( sal_True );
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
// wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
if ( rNewFilter != aFilterName )
@@ -215,13 +215,14 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if ( aOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
- SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter, pSet);
+ SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, false, pFilter, pSet);
if ( bInEdit ) // only if using the edit dialog,
- pMed->UseInteractionHandler( TRUE ); // enable the filter options dialog
+ pMed->UseInteractionHandler( sal_True ); // enable the filter options dialog
+ // aRef->DoClose() will be called explicitly, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
- SfxObjectShellRef aRef = pSrcShell;
+ SfxObjectShellLock aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
// Optionen koennten gesetzt worden sein
@@ -232,7 +233,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
// Undo...
ScDocument* pUndoDoc = NULL;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
if (bAddUndo && bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -240,18 +241,18 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
ScDocShellModificator aModificator( *pImpl->m_pDocSh );
- BOOL bNotFound = FALSE;
+ sal_Bool bNotFound = false;
ScDocument* pSrcDoc = pSrcShell->GetDocument();
// from text filters that don't set the table name,
// use the one table regardless of link table name
- BOOL bAutoTab = (pSrcDoc->GetTableCount() == 1) &&
+ sal_Bool bAutoTab = (pSrcDoc->GetTableCount() == 1) &&
ScDocShell::HasAutomaticTableName( rNewFilter );
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nCount; nTab++)
{
- BYTE nMode = pDoc->GetLinkMode(nTab);
+ sal_uInt8 nMode = pDoc->GetLinkMode(nTab);
if (nMode && pDoc->GetLinkDoc(nTab)==aFileName)
{
String aTabName = pDoc->GetLinkTab(nTab);
@@ -261,12 +262,12 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if (bAddUndo && bUndo)
{
if (bFirst)
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
else
- pUndoDoc->AddUndoTab( nTab, nTab, TRUE, TRUE );
- bFirst = FALSE;
+ pUndoDoc->AddUndoTab( nTab, nTab, sal_True, sal_True );
+ bFirst = false;
ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab);
- pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pUndoDoc);
+ pDoc->CopyToDocument(aRange, IDF_ALL, false, pUndoDoc);
pUndoDoc->TransferDrawPage( pDoc, nTab, nTab );
pUndoDoc->SetLink( nTab, nMode, aFileName, aFilterName,
aOptions, aTabName, GetRefreshDelay() );
@@ -283,7 +284,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
{
pDoc->RenameTab( nTab,
ScGlobal::GetDocTabName( aNewUrl, aTabName ),
- FALSE, TRUE ); // kein RefUpdate, kein ValidTabName
+ false, sal_True ); // kein RefUpdate, kein ValidTabName
}
}
@@ -304,7 +305,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
}
if (bFound)
- pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, FALSE, // nicht neu einfuegen
+ pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, false, // nicht neu einfuegen
(nMode == SC_LINK_VALUE) ); // nur Werte?
else
{
@@ -382,7 +383,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
pDoc->SetString( 1,2,nTab, aTabName );
}
- bNotFound = TRUE;
+ bNotFound = sal_True;
}
if ( bNewUrlName || rNewFilter != aFilterName ||
@@ -426,7 +427,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
//! Fehler ausgeben ?
}
- pDoc->SetInLinkUpdate( FALSE );
+ pDoc->SetInLinkUpdate( false );
// notify Uno objects (for XRefreshListener)
//! also notify Uno objects if file name was changed!
@@ -434,7 +435,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
aHint.SetSheetLink( aFileName );
pDoc->BroadcastUno( aHint );
- return TRUE;
+ return sal_True;
}
IMPL_LINK( ScTableLink, RefreshHdl, ScTableLink*, EMPTYARG )
@@ -447,7 +448,7 @@ IMPL_LINK( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink*, pLink )
{
if ( pImpl->m_aEndEditLink.IsSet() )
pImpl->m_aEndEditLink.Call( pLink );
- bInEdit = FALSE;
+ bInEdit = false;
Application::SetDefDialogParent( pImpl->m_pOldParent );
return 0;
}
@@ -458,15 +459,15 @@ String ScDocumentLoader::GetOptions( SfxMedium& rMedium )
{
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
return ((const SfxStringItem*)pItem)->GetValue();
return EMPTY_STRING;
}
-BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
+sal_Bool ScDocumentLoader::GetFilterName( const String& rFileName,
String& rFilter, String& rOptions,
- BOOL bWithContent, BOOL bWithInteraction )
+ sal_Bool bWithContent, sal_Bool bWithInteraction )
{
TypeId aScType = TYPE(ScDocShell);
SfxObjectShell* pDocSh = SfxObjectShell::GetFirst( &aScType );
@@ -479,7 +480,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
{
rFilter = pMed->GetFilter()->GetFilterName();
rOptions = GetOptions(*pMed);
- return TRUE;
+ return sal_True;
}
}
pDocSh = SfxObjectShell::GetNext( *pDocSh, &aScType );
@@ -488,16 +489,16 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
INetURLObject aUrl( rFileName );
INetProtocol eProt = aUrl.GetProtocol();
if ( eProt == INET_PROT_NOT_VALID ) // invalid URL?
- return FALSE; // abort without creating a medium
+ return false; // abort without creating a medium
// Filter-Detection
const SfxFilter* pSfxFilter = NULL;
- SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE );
+ SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ, false );
if ( pMedium->GetError() == ERRCODE_NONE )
{
if ( bWithInteraction )
- pMedium->UseInteractionHandler(TRUE); // #i73992# no longer called from GuessFilter
+ pMedium->UseInteractionHandler(sal_True); // #i73992# no longer called from GuessFilter
SfxFilterMatcher aMatcher( String::CreateFromAscii("scalc") );
if( bWithContent )
@@ -506,7 +507,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter );
}
- BOOL bOK = FALSE;
+ sal_Bool bOK = false;
if ( pMedium->GetError() == ERRCODE_NONE )
{
if ( pSfxFilter )
@@ -531,12 +532,12 @@ void ScDocumentLoader::RemoveAppPrefix( String& rFilterName )
ScDocumentLoader::ScDocumentLoader( const String& rFileName,
String& rFilterName, String& rOptions,
- UINT32 nRekCnt, BOOL bWithInteraction ) :
+ sal_uInt32 nRekCnt, sal_Bool bWithInteraction ) :
pDocShell(0),
pMedium(0)
{
if ( !rFilterName.Len() )
- GetFilterName( rFileName, rFilterName, rOptions, TRUE, bWithInteraction );
+ GetFilterName( rFileName, rFilterName, rOptions, sal_True, bWithInteraction );
const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( rFilterName );
@@ -545,12 +546,12 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
if ( rOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) );
- pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE, pFilter, pSet );
+ pMedium = new SfxMedium( rFileName, STREAM_STD_READ, false, pFilter, pSet );
if ( pMedium->GetError() != ERRCODE_NONE )
return ;
if ( bWithInteraction )
- pMedium->UseInteractionHandler( TRUE ); // to enable the filter options dialog
+ pMedium->UseInteractionHandler( sal_True ); // to enable the filter options dialog
pDocShell = new ScDocShell( SFX_CREATE_MODE_INTERNAL );
aRef = pDocShell;
@@ -600,12 +601,12 @@ ScDocument* ScDocumentLoader::GetDocument()
return pDocShell ? pDocShell->GetDocument() : 0;
}
-BOOL ScDocumentLoader::IsError() const
+sal_Bool ScDocumentLoader::IsError() const
{
if ( pDocShell && pMedium )
return pMedium->GetError() != ERRCODE_NONE;
else
- return TRUE;
+ return sal_True;
}
String ScDocumentLoader::GetTitle() const
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index 32a45998827e..0c9dcef4606f 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -86,9 +86,9 @@ ScDocStatPage::~ScDocStatPage()
//------------------------------------------------------------------------
-BOOL ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ )
+sal_Bool ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ )
{
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 4e6ac3ad6b8b..cd2ad601a465 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -90,7 +90,7 @@ SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL) )
void ScDrawShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -111,13 +111,13 @@ void lcl_setModified( SfxObjectShell* pShell )
void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
Window* pWin = pViewData->GetActiveWin();
ScDrawView* pView = pViewData->GetScDrawView();
SdrModel* pDoc = pViewData->GetDocument()->GetDrawLayer();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
SdrObject* pSingleSelectedObj = NULL;
if ( nMarkCount > 0 )
pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -134,7 +134,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
case SID_TEXT_STANDARD: // Harte Textattributierung loeschen
{
SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
- pView->SetAttributes(aEmptyAttr, TRUE);
+ pView->SetAttributes(aEmptyAttr, sal_True);
}
break;
@@ -186,9 +186,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
}
if( pView->AreObjectsMarked() )
- pView->SetAttrToMarked( *rReq.GetArgs(), FALSE );
+ pView->SetAttrToMarked( *rReq.GetArgs(), false );
else
- pView->SetDefaultAttr( *rReq.GetArgs(), FALSE);
+ pView->SetDefaultAttr( *rReq.GetArgs(), false);
pView->InvalidateAttribs();
}
break;
@@ -257,7 +257,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
{
SfxAbstractTabDialog *pDlg = pFact->CreateCaptionDialog( pWin, pView );
- const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
aCombSet.Put( aNewAttr );
aCombSet.Put( aNewGeoAttr );
@@ -307,7 +307,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
{
SvxMacroItem aItem ( SFX_APP()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
if ( pInfo->GetMacro().getLength() > 0 )
{
SvxMacroTableDtor aTab;
@@ -334,7 +334,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
{
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem ))
{
rtl::OUString sMacro;
SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT );
@@ -344,10 +344,10 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
if ( pObj->IsGroupObject() )
{
SdrObjList* pOL = pObj->GetSubList();
- ULONG nObj = pOL->GetObjCount();
- for ( ULONG index=0; index<nObj; ++index )
+ sal_uLong nObj = pOL->GetObjCount();
+ for ( sal_uLong index=0; index<nObj; ++index )
{
- pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), TRUE );
+ pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), sal_True );
pInfo->SetMacro( sMacro );
}
}
@@ -361,10 +361,10 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
delete pItemSet;
}
-void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
+void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
{
ScDrawView* pView = pViewData->GetScDrawView();
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
const SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -373,7 +373,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
SfxItemSet aNewAttr( pView->GetDefaultAttr() );
if( bHasMarked )
- pView->MergeAttrFromMarked( aNewAttr, FALSE );
+ pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
@@ -389,9 +389,9 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
if ( pDlg->Execute() == RET_OK )
{
if( bHasMarked )
- pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
pView->InvalidateAttribs();
rReq.Done();
@@ -400,14 +400,14 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
delete pDlg;
}
-void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
+void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
{
ScDrawView* pView = pViewData->GetScDrawView();
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SfxItemSet aNewAttr( pView->GetDefaultAttr() );
if( bHasMarked )
- pView->MergeAttrFromMarked( aNewAttr, FALSE );
+ pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -431,9 +431,9 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
if ( pDlg->Execute() == RET_OK )
{
if( bHasMarked )
- pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
pView->InvalidateAttribs();
rReq.Done();
@@ -442,26 +442,26 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
delete pDlg;
}
-void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, USHORT /* nTabPage */ )
+void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 /* nTabPage */ )
{
ScDrawView* pView = pViewData->GetScDrawView();
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
if( bHasMarked )
- pView->MergeAttrFromMarked( aNewAttr, FALSE );
+ pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if ( RET_OK == nResult )
{
if ( bHasMarked )
pView->SetAttributes( *pDlg->GetOutputItemSet() );
else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
pView->InvalidateAttribs();
rReq.Done();
@@ -473,7 +473,7 @@ void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk
{
if ( pObj )
{
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
pInfo->SetHlink( rHlnk );
lcl_setModified( GetObjectShell() );
}
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 033b93fcdd4e..4e1539fc38ff 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -58,7 +58,7 @@
#include <svx/svdoole2.hxx>
#include <svx/svdocapt.hxx>
-USHORT ScGetFontWorkId(); // in drtxtob
+sal_uInt16 ScGetFontWorkId(); // in drtxtob
using namespace com::sun::star;
@@ -69,7 +69,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) :
pViewData( pData )
{
SetPool( &pViewData->GetScDrawView()->GetModel()->GetItemPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -92,14 +92,14 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles
rSet.Put( SfxBoolItem( SID_OBJECT_MIRROR, eMode == SDRDRAG_MIRROR ) );
rSet.Put( SfxBoolItem( SID_BEZIER_EDIT, !pView->IsFrameDragSingles() ) );
- USHORT nFWId = ScGetFontWorkId();
+ sal_uInt16 nFWId = ScGetFontWorkId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
rSet.Put(SfxBoolItem(SID_FONTWORK, pViewFrm->HasChildWindow(nFWId)));
// Notes always default to Page anchor.
bool bDisableAnchor = false;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount == 1 )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -116,18 +116,18 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles
switch( pView->GetAnchorType() )
{
case SCA_PAGE:
- rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, TRUE ) );
- rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, sal_True ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, false ) );
break;
case SCA_CELL:
- rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) );
- rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, false ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, sal_True ) );
break;
default:
- rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) );
- rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, false ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, false ) );
break;
}
}
@@ -139,14 +139,14 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
// call IsMirrorAllowed first to make sure ForcePossibilities (and thus CheckMarked)
// is called before GetMarkCount, so the nMarkCount value is valid for the rest of this method.
- if (!pView->IsMirrorAllowed(TRUE,TRUE))
+ if (!pView->IsMirrorAllowed(sal_True,sal_True))
{
rSet.DisableItem( SID_MIRROR_HORIZONTAL );
rSet.DisableItem( SID_MIRROR_VERTICAL );
}
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount <= 1 || !pView->IsGroupPossible() )
rSet.DisableItem( SID_GROUP );
@@ -195,7 +195,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
}
}
- BOOL bCanRename = FALSE;
+ sal_Bool bCanRename = false;
if ( nMarkCount > 1 )
{
// no hypelink options for a selected group
@@ -214,10 +214,10 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
}
SdrLayerID nLayerID = pObj->GetLayer();
if ( nLayerID != SC_LAYER_INTERN )
- bCanRename = TRUE; // #i51351# anything except internal objects can be renamed
+ bCanRename = sal_True; // #i51351# anything except internal objects can be renamed
// #91929#; don't show original size entry if not possible
- UINT16 nObjType = pObj->GetObjIdentifier();
+ sal_uInt16 nObjType = pObj->GetObjIdentifier();
if ( nObjType == OBJ_OLE2 )
{
SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
@@ -270,7 +270,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
pView->GetAttributes( aAttrs );
if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE )
{
- BOOL bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) );
}
}
@@ -289,17 +289,17 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
Window* pWindow = pViewData->GetActiveWin();
ScDrawView* pDrView = pViewData->GetScDrawView();
Point aPos = pWindow->PixelToLogic(aMousePos);
- BOOL bHasMarked = pDrView->AreObjectsMarked();
+ sal_Bool bHasMarked = pDrView->AreObjectsMarked();
if( bHasMarked )
{
- rSet.Put( pDrView->GetAttrFromMarked(FALSE) );
+ rSet.Put( pDrView->GetAttrFromMarked(false) );
// Wenn die View selektierte Objekte besitzt, muessen entspr. Items
// von SFX_ITEM_DEFAULT (_ON) auf SFX_ITEM_DISABLED geaendert werden
SfxWhichIter aIter( rSet, XATTR_LINE_FIRST, XATTR_FILL_LAST );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( SFX_ITEM_DEFAULT == rSet.GetItemState( nWhich ) )
@@ -322,7 +322,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
// #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by
// SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE.
- BOOL bActionItem = FALSE;
+ sal_Bool bActionItem = false;
if ( pDrView->IsAction() ) // action rectangle
{
Rectangle aRect;
@@ -333,7 +333,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
- bActionItem = TRUE;
+ bActionItem = sal_True;
}
}
if ( !bActionItem )
@@ -362,7 +362,7 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet)
// Dialoge fuer Draw-Attribute disablen, wenn noetig
ScDrawView* pDrView = pViewData->GetScDrawView();
- SfxItemSet aViewSet = pDrView->GetAttrFromMarked(FALSE);
+ SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false);
if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SFX_ITEM_DEFAULT )
{
@@ -374,18 +374,18 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet)
rSet.DisableItem( SID_ATTRIBUTES_AREA );
}
-BOOL ScDrawShell::AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark)
+sal_Bool ScDrawShell::AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark)
{
- BOOL bResult=TRUE;
- ULONG nCount = rMark.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_Bool bResult=sal_True;
+ sal_uLong nCount = rMark.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
if ( !pObj->ISA(SdrUnoObj) )
{
if(nLayerNo!=pObj->GetLayer())
{
- bResult=FALSE;
+ bResult=false;
break;
}
}
diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx
index 49c8ed0652a6..75b1747dc3be 100644
--- a/sc/source/ui/drawfunc/drawsh4.cxx
+++ b/sc/source/ui/drawfunc/drawsh4.cxx
@@ -56,7 +56,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
SvxFontWorkDialog* pDlg = NULL;
ScDrawView* pDrView = pViewData->GetScDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( pViewFrm->HasChildWindow(nId) )
@@ -69,7 +69,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
if ( pDlg )
- pDlg->SetActive(FALSE);
+ pDlg->SetActive(false);
rSet.DisableItem(XATTR_FORMTXTSTYLE);
rSet.DisableItem(XATTR_FORMTXTADJUST);
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index c471aad6f85e..ea0830b65d7e 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -82,7 +82,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
{
ScDrawView* pView = pViewData->GetScDrawView();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
// Hyperlink
@@ -160,14 +160,14 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_HYPERLINK_SETLINK:
if( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
const String& rName = pHyper->GetName();
@@ -175,7 +175,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
const String& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( eMode == HLINK_FIELD || eMode == HLINK_BUTTON )
{
ScDrawView* pView = pViewData->GetScDrawView();
@@ -232,20 +232,20 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
//! Undo ???
pViewData->GetDocShell()->SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
else
{
SetHlinkForObject( pObj, rURL );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
if (!bDone)
pViewData->GetViewShell()->
- InsertURL( rName, rURL, rTarget, (USHORT) eMode );
+ InsertURL( rName, rURL, rTarget, (sal_uInt16) eMode );
// InsertURL an der ViewShell schaltet bei "Text" die DrawShell ab !!!
}
@@ -256,7 +256,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
}
}
-USHORT ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2
+sal_uInt16 ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2
//------------------------------------------------------------------
@@ -270,7 +270,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
ScTabView* pTabView = pViewData->GetView();
ScDrawView* pView = pTabView->GetScDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
//!!!
// wer weiss, wie lange das funktioniert? (->vom Abreisscontrol funktioniert es)
@@ -291,7 +291,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
rBindings.Invalidate(SID_OBJECT_HELL);
// leave draw shell if nothing selected (layer may be locked)
if ( pView->GetMarkedObjectList().GetMarkCount() == 0 )
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_FRAME_TO_TOP:
@@ -362,13 +362,13 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_DELETE_CONTENTS:
pView->DeleteMarked();
if (!pTabView->IsDrawSelMode())
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_CUT:
pView->DoCut();
if (!pTabView->IsDrawSelMode())
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_COPY:
@@ -423,7 +423,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
rBindings.Invalidate( SID_OBJECT_MIRROR );
if (eMode == SDRDRAG_ROTATE && !pView->IsFrameDragSingles())
{
- pView->SetFrameDragSingles( TRUE );
+ pView->SetFrameDragSingles( sal_True );
rBindings.Invalidate( SID_BEZIER_EDIT );
}
}
@@ -440,14 +440,14 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
rBindings.Invalidate( SID_OBJECT_MIRROR );
if (eMode == SDRDRAG_MIRROR && !pView->IsFrameDragSingles())
{
- pView->SetFrameDragSingles( TRUE );
+ pView->SetFrameDragSingles( sal_True );
rBindings.Invalidate( SID_BEZIER_EDIT );
}
}
break;
case SID_BEZIER_EDIT:
{
- BOOL bOld = pView->IsFrameDragSingles();
+ sal_Bool bOld = pView->IsFrameDragSingles();
pView->SetFrameDragSingles( !bOld );
rBindings.Invalidate( SID_BEZIER_EDIT );
if (bOld && pView->GetDragMode() != SDRDRAG_MOVE)
@@ -461,7 +461,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_FONTWORK:
{
- USHORT nId = ScGetFontWorkId();
+ sal_uInt16 nId = ScGetFontWorkId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( rReq.GetArgs() )
@@ -483,11 +483,11 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_ENABLE_HYPHENATION:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, false);
if( pItem )
{
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
- BOOL bValue = ( (const SfxBoolItem*) pItem)->GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
}
@@ -555,7 +555,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
}
// ChartListenerCollectionNeedsUpdate is needed for Navigator update
- pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( TRUE );
+ pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( sal_True );
pDocSh->SetDrawModified();
}
@@ -594,7 +594,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
pSelected->SetDescription(aDescription);
// ChartListenerCollectionNeedsUpdate is needed for Navigator update
- pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( TRUE );
+ pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( sal_True );
pDocSh->SetDrawModified();
}
@@ -680,12 +680,12 @@ void ScDrawShell::ExecFormText(SfxRequest& rReq)
pDrView->ScEndTextEdit();
if ( SFX_ITEM_SET ==
- rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem)
+ rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem)
&& XFTFORM_NONE !=
((const XFormTextStdFormItem*) pItem)->GetValue() )
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)
(pViewFrm->
@@ -713,7 +713,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq )
}
else
{
- BOOL bLock = FALSE;
+ sal_Bool bLock = false;
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue();
@@ -721,7 +721,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq )
ScDrawView* pDrawView = pViewData->GetScDrawView();
if ( pDrawView && pDrawView->AreObjectsMarked() )
{
- BOOL bOnlyHardAttr = TRUE;
+ sal_Bool bOnlyHardAttr = sal_True;
SfxItemSet* pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) );
pView->SetDrawBrushSet( pItemSet, bLock );
}
@@ -731,8 +731,8 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq )
void ScDrawShell::StateFormatPaintbrush( SfxItemSet& rSet )
{
ScDrawView* pDrawView = pViewData->GetScDrawView();
- BOOL bSelection = pDrawView && pDrawView->AreObjectsMarked();
- BOOL bHasPaintBrush = pViewData->GetView()->HasPaintBrush();
+ sal_Bool bSelection = pDrawView && pDrawView->AreObjectsMarked();
+ sal_Bool bHasPaintBrush = pViewData->GetView()->HasPaintBrush();
if ( !bHasPaintBrush && !bSelection )
rSet.DisableItem( SID_FORMATPAINTBRUSH );
diff --git a/sc/source/ui/drawfunc/drformsh.src b/sc/source/ui/drawfunc/drformsh.src
index a69aadb2d43c..638d9a5676ad 100644
--- a/sc/source/ui/drawfunc/drformsh.src
+++ b/sc/source/ui/drawfunc/drformsh.src
@@ -35,19 +35,19 @@
ToolBoxItem\
{\
Identifier = SID_FRAME_TO_TOP ; \
- HelpID = SID_FRAME_TO_TOP ; \
+ HelpID = CMD_SID_FRAME_TO_TOP ; \
};\
ToolBoxItem\
{\
Identifier = SID_FRAME_TO_BOTTOM ; \
- HelpID = SID_FRAME_TO_BOTTOM ; \
+ HelpID = CMD_SID_FRAME_TO_BOTTOM ; \
};
#define MN_RENAME_OBJECT \
MenuItem\
{\
Identifier = SID_RENAME_OBJECT ; \
- HelpId = SID_RENAME_OBJECT ; \
+ HelpId = CMD_SID_RENAME_OBJECT ; \
Text [ en-US ] = "Name...";\
};
@@ -56,7 +56,7 @@
MenuItem\
{\
Identifier = SID_TITLE_DESCRIPTION_OBJECT; \
- HelpId = SID_TITLE_DESCRIPTION_OBJECT; \
+ HelpId = CMD_SID_TITLE_DESCRIPTION_OBJECT; \
Text [ en-US ] = "Description...";\
};
@@ -117,14 +117,14 @@
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_PAGE ; \
- HelpId = SID_ANCHOR_PAGE ; \
+ HelpId = CMD_SID_ANCHOR_PAGE ; \
Text [ en-US ] = "To P~age" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_CELL ; \
- HelpId = SID_ANCHOR_CELL ; \
+ HelpId = CMD_SID_ANCHOR_CELL ; \
Text [ en-US ] = "To ~Cell" ; \
};\
};\
@@ -135,7 +135,7 @@
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN ; \
- HelpId = SID_OBJECT_ALIGN ; \
+ HelpId = CMD_SID_OBJECT_ALIGN ; \
Text [ en-US ] = "A~lignment" ; \
SubMenu = Menu\
{\
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 3325cdcbbde5..9237d0e1f66a 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -110,7 +110,7 @@ TYPEINIT1( ScDrawTextObjectBar, SfxShell );
void ScDrawTextObjectBar::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -123,12 +123,12 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) :
SfxShell(pData->GetViewShell()),
pViewData(pData),
pClipEvtLstnr(NULL),
- bPastePossible(FALSE)
+ bPastePossible(false)
{
SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() );
// UndoManager wird beim Umschalten in den Edit-Modus umgesetzt...
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -143,7 +143,7 @@ ScDrawTextObjectBar::~ScDrawTextObjectBar()
{
if ( pClipEvtLstnr )
{
- pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), FALSE );
+ pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), false );
// The listener may just now be waiting for the SolarMutex and call the link
// afterwards, in spite of RemoveListener. So the link has to be reset, too.
@@ -172,7 +172,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
}
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_COPY:
@@ -189,10 +189,10 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -214,8 +214,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_SELECTALL:
{
- ULONG nCount = pOutliner->GetParagraphCount();
- ESelection aSel( 0,0,(USHORT)nCount,0 );
+ sal_uLong nCount = pOutliner->GetParagraphCount();
+ ESelection aSel( 0,0,(sal_uInt16)nCount,0 );
pOutView->SetSelection( aSel );
}
break;
@@ -231,13 +231,13 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
aString = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
{
@@ -270,7 +270,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
if( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
const String& rName = pHyper->GetName();
@@ -278,7 +278,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
const String& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pOutView && ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) )
{
const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection();
@@ -315,7 +315,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
pOutView->SetSelection( aSel );
}
- bDone = TRUE;
+ bDone = sal_True;
}
if (!bDone)
@@ -356,7 +356,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_THES:
{
String aReplaceText;
- SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, false );
if (pItem2)
aReplaceText = pItem2->GetValue();
if (aReplaceText.Len() > 0)
@@ -376,13 +376,13 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
{
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
- BOOL bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK);
- BOOL bDisableFontWork = FALSE;
+ sal_Bool bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK);
+ sal_Bool bDisableFontWork = false;
if (IsNoteEdit())
{
// #i21255# notes now support rich text formatting (#i74140# but not fontwork)
- bDisableFontWork = TRUE;
+ bDisableFontWork = sal_True;
}
if ( bDisableFontWork )
@@ -397,7 +397,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
if ( pOutView )
{
- BOOL bField = FALSE;
+ sal_Bool bField = false;
const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection();
if (pFieldItem)
{
@@ -408,7 +408,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
aHLinkItem.SetName( pURLField->GetRepresentation() );
aHLinkItem.SetURL( pURLField->GetURL() );
aHLinkItem.SetTargetFrame( pURLField->GetTargetFrame() );
- bField = TRUE;
+ bField = sal_True;
}
}
if (!bField)
@@ -457,7 +457,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
pView->GetAttributes( aAttrs );
if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE )
{
- BOOL bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) );
}
}
@@ -479,7 +479,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
// disable thesaurus main menu and context menu entry if there is nothing to look up
- BOOL bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
+ sal_Bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
if (!bIsLookUpWord || !bCanDoThesaurus)
rSet.DisableItem( SID_THES );
if (!bCanDoThesaurus)
@@ -516,7 +516,7 @@ void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet )
pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScDrawTextObjectBar, ClipboardChanged ) );
pClipEvtLstnr->acquire();
Window* pWin = pViewData->GetActiveWin();
- pClipEvtLstnr->AddRemoveListener( pWin, TRUE );
+ pClipEvtLstnr->AddRemoveListener( pWin, sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
@@ -524,7 +524,7 @@ void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet )
}
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -568,7 +568,7 @@ void ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq )
SdrView* pView = pViewData->GetScDrawView();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxItemSet aSet( pView->GetDefaultAttr() );
@@ -615,41 +615,41 @@ void lcl_RemoveFields( OutlinerView& rOutView )
aSel.Adjust();
xub_StrLen nNewEnd = aSel.nEndPos;
- BOOL bUpdate = pOutliner->GetUpdateMode();
- BOOL bChanged = FALSE;
+ sal_Bool bUpdate = pOutliner->GetUpdateMode();
+ sal_Bool bChanged = false;
//! GetPortions and GetAttribs should be const!
EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine();
- ULONG nParCount = pOutliner->GetParagraphCount();
- for (ULONG nPar=0; nPar<nParCount; nPar++)
+ sal_uLong nParCount = pOutliner->GetParagraphCount();
+ for (sal_uLong nPar=0; nPar<nParCount; nPar++)
if ( nPar >= aSel.nStartPara && nPar <= aSel.nEndPara )
{
SvUShorts aPortions;
- rEditEng.GetPortions( (USHORT)nPar, aPortions );
+ rEditEng.GetPortions( (sal_uInt16)nPar, aPortions );
//! GetPortions should use xub_StrLen instead of USHORT
- for ( USHORT nPos = aPortions.Count(); nPos; )
+ for ( sal_uInt16 nPos = aPortions.Count(); nPos; )
{
--nPos;
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
// fields are single characters
if ( nEnd == nStart+1 &&
( nPar > aSel.nStartPara || nStart >= aSel.nStartPos ) &&
( nPar < aSel.nEndPara || nEnd <= aSel.nEndPos ) )
{
- ESelection aFieldSel( (USHORT)nPar, nStart, (USHORT)nPar, nEnd );
+ ESelection aFieldSel( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd );
SfxItemSet aSet = rEditEng.GetAttribs( aFieldSel );
if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_ON )
{
if (!bChanged)
{
if (bUpdate)
- pOutliner->SetUpdateMode( FALSE );
+ pOutliner->SetUpdateMode( false );
String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
pOutliner->GetUndoManager().EnterListAction( aName, aName );
- bChanged = TRUE;
+ bChanged = sal_True;
}
String aFieldText = rEditEng.GetText( aFieldSel );
@@ -667,7 +667,7 @@ void lcl_RemoveFields( OutlinerView& rOutView )
if (bUpdate && bChanged)
{
pOutliner->GetUndoManager().LeaveListAction();
- pOutliner->SetUpdateMode( TRUE );
+ pOutliner->SetUpdateMode( sal_True );
}
if ( aOldSel.IsEqual( aSel ) ) // aSel is adjusted
@@ -681,15 +681,15 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
{
SdrView* pView = pViewData->GetScDrawView();
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
- BOOL bArgsInReq = ( pArgs != NULL );
+ sal_Bool bArgsInReq = ( pArgs != NULL );
if ( !bArgsInReq )
{
SfxItemSet aEditAttr(pView->GetModel()->GetItemPool());
pView->GetAttributes(aEditAttr);
SfxItemSet aNewAttr( *aEditAttr.GetPool(), aEditAttr.GetRanges() );
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
switch ( nSlot )
{
@@ -701,7 +701,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
pOutView->Paint( Rectangle() );
SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END );
- pView->SetAttributes( aEmptyAttr, TRUE );
+ pView->SetAttributes( aEmptyAttr, sal_True );
if ( pOutView )
{
@@ -711,7 +711,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
rReq.Done( aEmptyAttr );
pViewData->GetScDrawView()->InvalidateDrawTextAttrs();
- bDone = FALSE; // bereits hier passiert
+ bDone = false; // bereits hier passiert
}
break;
@@ -855,13 +855,13 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
// font items from toolbox controller have to be applied for the right script type
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScript = pView->GetScriptType();
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
- USHORT nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) );
pView->SetAttributes( aSetItem.GetItemSet() );
@@ -884,8 +884,8 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
}
SvtLanguageOptions aLangOpt;
- BOOL bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
- BOOL bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
+ sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
+ sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
SdrView* pView = pViewData->GetScDrawView();
SfxItemSet aAttrSet(pView->GetModel()->GetItemPool());
@@ -897,10 +897,10 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
// choose font info according to selection script type
- USHORT nScript = pView->GetScriptType();
+ sal_uInt16 nScript = pView->GetScriptType();
// #i55929# input-language-dependent script type (depends on input language if nothing selected)
- USHORT nInputScript = nScript;
+ sal_uInt16 nInputScript = nScript;
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
if (pOutView && !pOutView->GetSelection().HasRange())
{
@@ -925,16 +925,16 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
switch( eAdj )
{
case SVX_ADJUST_LEFT:
- rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, sal_True ) );
break;
case SVX_ADJUST_CENTER:
- rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, sal_True ) );
break;
case SVX_ADJUST_RIGHT:
- rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, sal_True ) );
break;
case SVX_ADJUST_BLOCK:
- rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, sal_True ) );
break;
default:
{
@@ -949,19 +949,19 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
// Zeilenabstand
- USHORT nLineSpace = (USHORT)
+ sal_uInt16 nLineSpace = (sal_uInt16)
((const SvxLineSpacingItem&)aAttrSet.
Get( EE_PARA_SBL )).GetPropLineSpace();
switch( nLineSpace )
{
case 100:
- rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, sal_True ) );
break;
case 150:
- rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, sal_True ) );
break;
case 200:
- rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, sal_True ) );
break;
}
@@ -970,13 +970,13 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
- rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) );
else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
- rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) );
// Unterstreichung
- SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, TRUE );
+ SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, sal_True );
if ( eState == SFX_ITEM_DONTCARE )
{
rDestSet.InvalidateItem( SID_ULINE_VAL_NONE );
@@ -988,7 +988,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
{
FontUnderline eUnderline = ((const SvxUnderlineItem&)
aAttrSet.Get(EE_CHAR_UNDERLINE)).GetLineStyle();
- USHORT nId = SID_ULINE_VAL_NONE;
+ sal_uInt16 nId = SID_ULINE_VAL_NONE;
switch (eUnderline)
{
case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break;
@@ -997,18 +997,18 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
default:
break;
}
- rDestSet.Put( SfxBoolItem( nId, TRUE ) );
+ rDestSet.Put( SfxBoolItem( nId, sal_True ) );
}
// horizontal / vertical
- BOOL bLeftToRight = TRUE;
+ sal_Bool bLeftToRight = sal_True;
SdrOutliner* pOutl = pView->GetTextEditOutliner();
if( pOutl )
{
if( pOutl->IsVertical() )
- bLeftToRight = FALSE;
+ bLeftToRight = false;
}
else
bLeftToRight = ( (const SvxWritingModeItem&) aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == com::sun::star::text::WritingMode_LR_TB;
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index e3ab9efcd409..7dfafc870102 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -56,7 +56,7 @@
#include "scabstdlg.hxx"
//------------------------------------------------------------------------
-BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
+sal_Bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
SfxItemSet& rOutSet )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -65,7 +65,7 @@ BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
SfxAbstractTabDialog* pDlg = pFact->CreateScCharDlg( pViewData->GetDialogParent(), &rArgs,
pViewData->GetSfxDocShell(),RID_SCDLG_CHAR );
DBG_ASSERT(pDlg, "Dialog create fail!");
- BOOL bRet = ( pDlg->Execute() == RET_OK );
+ sal_Bool bRet = ( pDlg->Execute() == RET_OK );
if ( bRet )
{
@@ -78,7 +78,7 @@ BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
return bRet;
}
-BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
+sal_Bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
SfxItemSet& rOutSet )
{
SfxItemPool* pArgPool = rArgs.GetPool();
@@ -96,7 +96,7 @@ BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
// Muss natuerlich noch geaendert werden
// aNewAttr.Put( SvxParaDlgLimitsItem( 567 * 50, 5670) );
- aNewAttr.Put( SvxHyphenZoneItem( sal_False, SID_ATTR_PARA_HYPHENZONE ) );
+ aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) );
aNewAttr.Put( SvxFmtBreakItem( SVX_BREAK_NONE, SID_ATTR_PARA_PAGEBREAK ) );
aNewAttr.Put( SvxFmtSplitItem( sal_True, SID_ATTR_PARA_SPLIT) );
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
@@ -107,7 +107,7 @@ BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
SfxAbstractTabDialog* pDlg = pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr, RID_SCDLG_PARAGRAPH);
DBG_ASSERT(pDlg, "Dialog create fail!");
- BOOL bRet = ( pDlg->Execute() == RET_OK );
+ sal_Bool bRet = ( pDlg->Execute() == RET_OK );
if ( bRet )
{
@@ -132,7 +132,7 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ )
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
//! test if outliner view is still valid
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index fe38c247518b..d85ac90fa677 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -58,12 +58,12 @@
//------------------------------------------------------------------------
-USHORT ScGetFontWorkId()
+sal_uInt16 ScGetFontWorkId()
{
return SvxFontWorkChildWindow::GetChildWindowId();
}
-BOOL ScDrawTextObjectBar::IsNoteEdit()
+sal_Bool ScDrawTextObjectBar::IsNoteEdit()
{
return ScDrawLayer::IsNoteCaption( pViewData->GetView()->GetSdrView()->GetTextEditObject() );
}
@@ -75,7 +75,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
ScTabView* pTabView = pViewData->GetView();
ScDrawView* pView = pTabView->GetScDrawView();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_COPY:
@@ -85,7 +85,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
case SID_CUT:
pView->DoCut();
if (!pTabView->IsDrawSelMode())
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_PASTE:
@@ -119,11 +119,11 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
case SID_ENABLE_HYPHENATION:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, false);
if( pItem )
{
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
- BOOL bValue = ( (const SfxBoolItem*) pItem)->GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
}
@@ -140,7 +140,7 @@ void ScDrawTextObjectBar::GetGlobalClipState( SfxItemSet& rSet )
//! move paste etc. to view shell?
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -153,12 +153,12 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
ScTabView* pTabView = pViewData->GetView();
ScDrawView* pView = pTabView->GetScDrawView();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_FONTWORK:
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( rReq.GetArgs() )
@@ -181,7 +181,7 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
EE_PARA_JUST, EE_PARA_JUST,
0 );
- BOOL bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT );
+ sal_Bool bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT );
aAttr.Put( SvxFrameDirectionItem(
bLeft ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP,
EE_PARA_WRITINGDIR ) );
@@ -212,12 +212,12 @@ void ScDrawTextObjectBar::ExecFormText(SfxRequest& rReq)
pDrView->ScEndTextEdit();
if ( SFX_ITEM_SET ==
- rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem)
+ rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem)
&& XFTFORM_NONE !=
((const XFormTextStdFormItem*) pItem)->GetValue() )
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)
(pViewFrm->
@@ -239,7 +239,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
SvxFontWorkDialog* pDlg = NULL;
ScDrawView* pDrView = pViewData->GetView()->GetScDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( pViewFrm->HasChildWindow(nId) )
@@ -252,7 +252,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
if ( pDlg )
- pDlg->SetActive(FALSE);
+ pDlg->SetActive(false);
rSet.DisableItem(XATTR_FORMTXTSTYLE);
rSet.DisableItem(XATTR_FORMTXTADJUST);
diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx
index 865d1eb5196b..9906919f0f3f 100644
--- a/sc/source/ui/drawfunc/fuconarc.cxx
+++ b/sc/source/ui/drawfunc/fuconarc.cxx
@@ -66,19 +66,19 @@ FuConstArc::~FuConstArc()
|*
\************************************************************************/
-BOOL FuConstArc::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool FuConstArc::MouseButtonDown( const MouseEvent& rMEvt )
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown( rMEvt );
+ sal_Bool bReturn = FuConstruct::MouseButtonDown( rMEvt );
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pWindow->CaptureMouse();
pView->BegCreateObj( aPnt );
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -89,7 +89,7 @@ BOOL FuConstArc::MouseButtonDown( const MouseEvent& rMEvt )
|*
\************************************************************************/
-BOOL FuConstArc::MouseMove( const MouseEvent& rMEvt )
+sal_Bool FuConstArc::MouseMove( const MouseEvent& rMEvt )
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -100,17 +100,17 @@ BOOL FuConstArc::MouseMove( const MouseEvent& rMEvt )
|*
\************************************************************************/
-BOOL FuConstArc::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool FuConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
pView->EndCreateObj( SDRCREATE_NEXTPOINT );
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -119,14 +119,14 @@ BOOL FuConstArc::MouseButtonUp( const MouseEvent& rMEvt )
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstArc::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstArc::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -163,7 +163,7 @@ void FuConstArc::Activate()
break;
}
- pView->SetCurrentObj( sal::static_int_cast<UINT16>( aObjKind ) );
+ pView->SetCurrentObj( sal::static_int_cast<sal_uInt16>( aObjKind ) );
aOldPointer = pWindow->GetPointer();
pViewShell->SetActivePointer( aNewPointer );
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index 974c7f0d6ba8..c2704f8c32c6 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -76,12 +76,12 @@ FuConstCustomShape::~FuConstCustomShape()
|*
\************************************************************************/
-BOOL FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -92,14 +92,14 @@ BOOL FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
if ( pObj )
{
SetAttributes( pObj );
- sal_Bool bForceNoFillStyle = sal_False;
+ sal_Bool bForceNoFillStyle = false;
if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() )
bForceNoFillStyle = sal_True;
if ( bForceNoFillStyle )
pObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -110,7 +110,7 @@ BOOL FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstCustomShape::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstCustomShape::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -121,18 +121,18 @@ BOOL FuConstCustomShape::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pView->EndCreateObj(SDRCREATE_FORCEEND);
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -141,14 +141,14 @@ BOOL FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstCustomShape::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstCustomShape::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -215,7 +215,7 @@ SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, c
void FuConstCustomShape::SetAttributes( SdrObject* pObj )
{
- sal_Bool bAttributesAppliedFromGallery = sal_False;
+ sal_Bool bAttributesAppliedFromGallery = false;
if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) )
{
@@ -271,7 +271,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) );
pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
- pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) );
+ pObj->SetMergedItem( SdrTextAutoGrowHeightItem( false ) );
((SdrObjCustomShape*)pObj)->MergeDefaultAttributes( &aCustomShape );
}
}
diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx
index 822780dafd26..46bacf8ef245 100644
--- a/sc/source/ui/drawfunc/fuconpol.cxx
+++ b/sc/source/ui/drawfunc/fuconpol.cxx
@@ -74,12 +74,12 @@ FuConstPolygon::~FuConstPolygon()
|*
\************************************************************************/
-BOOL FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
SdrViewEvent aVEvt;
(void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
@@ -87,15 +87,15 @@ BOOL FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
// Texteingabe hier nicht zulassen
aVEvt.eEvent = SDREVENT_BEGDRAGOBJ;
- pView->EnableExtendedMouseEventDispatcher(FALSE);
+ pView->EnableExtendedMouseEventDispatcher(false);
}
else
{
- pView->EnableExtendedMouseEventDispatcher(TRUE);
+ pView->EnableExtendedMouseEventDispatcher(sal_True);
}
if ( pView->MouseButtonDown(rMEvt, pWindow) )
- bReturn = TRUE;
+ bReturn = sal_True;
return bReturn;
}
@@ -106,10 +106,10 @@ BOOL FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
{
pView->MouseMove(rMEvt, pWindow);
- BOOL bReturn = FuConstruct::MouseMove(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseMove(rMEvt);
return bReturn;
}
@@ -119,13 +119,13 @@ BOOL FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
- BOOL bSimple = FALSE;
+ sal_Bool bReturn = false;
+ sal_Bool bSimple = false;
SdrViewEvent aVEvt;
(void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt);
@@ -134,11 +134,11 @@ BOOL FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
if (aVEvt.eEvent == SDREVENT_ENDCREATE)
{
- bReturn = TRUE;
- bSimple = TRUE; // Doppelklick nicht weiterreichen
+ bReturn = sal_True;
+ bSimple = sal_True; // Doppelklick nicht weiterreichen
}
- BOOL bParent;
+ sal_Bool bParent;
if (bSimple)
bParent = FuConstruct::SimpleMouseButtonUp(rMEvt);
else
@@ -151,14 +151,14 @@ BOOL FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstPolygon::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstPolygon::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -171,7 +171,7 @@ BOOL FuConstPolygon::KeyInput(const KeyEvent& rKEvt)
void FuConstPolygon::Activate()
{
- pView->EnableExtendedMouseEventDispatcher(TRUE);
+ pView->EnableExtendedMouseEventDispatcher(sal_True);
SdrObjKind eKind;
@@ -222,7 +222,7 @@ void FuConstPolygon::Activate()
break;
}
- pView->SetCurrentObj(sal::static_int_cast<UINT16>(eKind));
+ pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(eKind));
pView->SetEditMode(SDREDITMODE_CREATE);
@@ -243,7 +243,7 @@ void FuConstPolygon::Deactivate()
{
pView->SetEditMode(SDREDITMODE_EDIT);
- pView->EnableExtendedMouseEventDispatcher(FALSE);
+ pView->EnableExtendedMouseEventDispatcher(false);
FuConstruct::Deactivate();
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index e9f3e7031db4..d6f623ad8367 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -74,12 +74,12 @@ FuConstRectangle::~FuConstRectangle()
|*
\************************************************************************/
-BOOL FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
@@ -107,7 +107,7 @@ BOOL FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstRectangle::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstRectangle::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -118,12 +118,12 @@ BOOL FuConstRectangle::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
@@ -143,11 +143,11 @@ BOOL FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
((SdrTextObj*)pObj)->ForceOutlinerParaObject();
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
if( pOPO && !pOPO->IsVertical() )
- pOPO->SetVertical( TRUE );
+ pOPO->SetVertical( sal_True );
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -156,14 +156,14 @@ BOOL FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstRectangle::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstRectangle::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -206,7 +206,7 @@ void FuConstRectangle::Activate()
break;
}
- pView->SetCurrentObj(sal::static_int_cast<UINT16>(aObjKind));
+ pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(aObjKind));
aOldPointer = pWindow->GetPointer();
pViewShell->SetActivePointer( aNewPointer );
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index 2784102537ea..f4db6ebfb742 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -70,7 +70,7 @@ FuConstruct::~FuConstruct()
{
}
-BYTE FuConstruct::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuConstruct::Command(const CommandEvent& rCEvt)
{
// special code for non-VCL OS2/UNX removed
@@ -83,18 +83,18 @@ BYTE FuConstruct::Command(const CommandEvent& rCEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
if ( pView->IsAction() )
{
if ( rMEvt.IsRight() )
pView->BckAction();
- return TRUE;
+ return sal_True;
}
aDragTimer.Start();
@@ -110,16 +110,16 @@ BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) )
{
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, 1);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( pView->AreObjectsMarked() )
{
pView->UnmarkAll();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
- bIsInDragMode = FALSE;
+ bIsInDragMode = false;
return bReturn;
}
@@ -130,7 +130,7 @@ BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseMove(const MouseEvent& rMEvt)
{
FuDraw::MouseMove(rMEvt);
@@ -168,7 +168,7 @@ BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
pViewShell->SetActivePointer( aNewPointer );
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -177,16 +177,16 @@ BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = SimpleMouseButtonUp( rMEvt );
+ sal_Bool bReturn = SimpleMouseButtonUp( rMEvt );
// Doppelklick auf Textobjekt? (->fusel)
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks == 2 && rMEvt.IsLeft() )
{
if ( pView->AreObjectsMarked() )
@@ -201,8 +201,8 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) )
{
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
- BOOL bVertical = ( pOPO && pOPO->IsVertical() );
- USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
+ sal_Bool bVertical = ( pOPO && pOPO->IsVertical() );
+ sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
pViewShell->GetViewData()->GetDispatcher().
Execute(nTextSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
@@ -215,7 +215,7 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
Point aMousePixel = rMEvt.GetPosPixel();
pText->SetInEditMode( pObj, &aMousePixel );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -228,9 +228,9 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
// SimpleMouseButtonUp - ohne Test auf Doppelklick
-BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = TRUE;
+ sal_Bool bReturn = sal_True;
if (aDragTimer.IsActive() )
{
@@ -245,7 +245,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
else if ( pView->IsMarkObj() )
pView->EndMarkObj();
- else bReturn = FALSE;
+ else bReturn = false;
if ( !pView->IsAction() )
{
@@ -253,7 +253,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 )
{
- pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+ pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher();
if ( pView->AreObjectsMarked() )
@@ -270,14 +270,14 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstruct::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstruct::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
switch ( rKEvt.GetKeyCode().GetCode() )
{
@@ -286,7 +286,7 @@ BOOL FuConstruct::KeyInput(const KeyEvent& rKEvt)
{
pView->BrkAction();
pWindow->ReleaseMouse();
- bReturn = TRUE;
+ bReturn = sal_True;
}
else // Zeichenmodus beenden
{
@@ -297,7 +297,7 @@ BOOL FuConstruct::KeyInput(const KeyEvent& rKEvt)
case KEY_DELETE:
pView->DeleteMarked();
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index aa7a0b730eed..3bd7175a5bdd 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -44,8 +44,8 @@ FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDr
SdrModel* pDoc, SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
{
- SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, FALSE );
- SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, FALSE );
+ SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, false );
+ SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, false );
if( pInventorItem )
nInventor = pInventorItem->GetValue();
if( pIdentifierItem )
@@ -68,19 +68,19 @@ FuConstUnoControl::~FuConstUnoControl()
|*
\************************************************************************/
-BOOL FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pWindow->CaptureMouse();
pView->BegCreateObj(aPnt);
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -91,7 +91,7 @@ BOOL FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstUnoControl::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstUnoControl::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -102,18 +102,18 @@ BOOL FuConstUnoControl::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pView->EndCreateObj(SDRCREATE_FORCEEND);
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -122,14 +122,14 @@ BOOL FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstUnoControl::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstUnoControl::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 456a3bde9432..df8725cbded0 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -91,12 +91,12 @@ void FuDraw::DoModifiers(const MouseEvent& rMEvt)
// Control = Snap (Toggle)
// Alt = zentrisch
- BOOL bShift = rMEvt.IsShift();
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bShift = rMEvt.IsShift();
+ sal_Bool bAlt = rMEvt.IsMod2();
bool bOrtho = bShift;
- BOOL bAngleSnap = bShift;
- BOOL bCenter = bAlt;
+ sal_Bool bAngleSnap = bShift;
+ sal_Bool bCenter = bAlt;
// #i33136#
if(doConstructOrthogonal())
@@ -121,12 +121,12 @@ void FuDraw::ResetModifiers()
ScViewData* pViewData = pViewShell->GetViewData();
const ScViewOptions& rOpt = pViewData->GetOptions();
const ScGridOptions& rGrid = rOpt.GetGridOptions();
- BOOL bGridOpt = rGrid.GetUseGridSnap();
+ sal_Bool bGridOpt = rGrid.GetUseGridSnap();
if (pView->IsOrtho())
- pView->SetOrtho(FALSE);
+ pView->SetOrtho(false);
if (pView->IsAngleSnapEnabled())
- pView->SetAngleSnapEnabled(FALSE);
+ pView->SetAngleSnapEnabled(false);
if (pView->IsGridSnap() != bGridOpt)
pView->SetGridSnap(bGridOpt);
@@ -134,9 +134,9 @@ void FuDraw::ResetModifiers()
pView->SetSnapEnabled(bGridOpt);
if (pView->IsCreate1stPointAsCenter())
- pView->SetCreate1stPointAsCenter(FALSE);
+ pView->SetCreate1stPointAsCenter(false);
if (pView->IsResizeAtCenter())
- pView->SetResizeAtCenter(FALSE);
+ pView->SetResizeAtCenter(false);
}
/*************************************************************************
@@ -145,13 +145,13 @@ void FuDraw::ResetModifiers()
|*
\************************************************************************/
-BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
DoModifiers( rMEvt );
- return FALSE;
+ return false;
}
/*************************************************************************
@@ -160,14 +160,14 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseMove(const MouseEvent& rMEvt)
{
// evaluate modifiers only if in a drawing layer action
// (don't interfere with keyboard shortcut handling)
if (pView->IsAction())
DoModifiers( rMEvt );
- return FALSE;
+ return false;
}
/*************************************************************************
@@ -176,35 +176,35 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
ResetModifiers();
- return FALSE;
+ return false;
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey )
+sal_Bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pObj && pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) )
{
// start text edit - like FuSelection::MouseButtonUp,
// but with bCursorToEnd instead of mouse position
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
- BOOL bVertical = ( pOPO && pOPO->IsVertical() );
- USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
+ sal_Bool bVertical = ( pOPO && pOPO->IsVertical() );
+ sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
// don't switch shells if text shell is already active
FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr();
@@ -219,17 +219,17 @@ BOOL lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEven
if ( pPoor && pPoor->GetSlotID() == nTextSlotId ) // no RTTI
{
FuText* pText = (FuText*)pPoor;
- pText->SetInEditMode( pObj, NULL, TRUE, pInitialKey );
+ pText->SetInEditMode( pObj, NULL, sal_True, pInitialKey );
//! set cursor to end of text
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
-BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuDraw::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
ScViewData& rViewData = *pViewShell->GetViewData();
switch ( rKEvt.GetKeyCode().GetCode() )
@@ -239,13 +239,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// in normale Draw-Shell, wenn Objekt selektiert, sonst Zeichnen aus
rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( pViewShell->IsDrawSelMode() )
{
pView->UnmarkAll();
rViewData.GetDispatcher().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( pView->AreObjectsMarked() )
{
@@ -258,15 +258,15 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
// Beim Bezier-Editieren ist jetzt wieder das Objekt selektiert
if (!pView->AreObjectsMarked())
- pViewShell->SetDrawShell( FALSE );
+ pViewShell->SetDrawShell( false );
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
case KEY_DELETE: //! ueber Accelerator
pView->DeleteMarked();
- bReturn = TRUE;
+ bReturn = sal_True;
break;
case KEY_RETURN:
@@ -278,17 +278,17 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
{
- BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( pObj && pObj->ISA( SdrOle2Obj ) && !bOle )
{
pViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -305,7 +305,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -335,7 +335,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
if(pView->AreObjectsMarked())
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
// handle Mod1 and Mod2 to get travelling running on different systems
@@ -358,7 +358,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
}
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -377,13 +377,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// mark last object
pView->UnmarkAllObj();
- pView->MarkNextObj(FALSE);
+ pView->MarkNextObj(false);
// II
if(pView->AreObjectsMarked())
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -402,13 +402,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// mark first object
pView->UnmarkAllObj();
- pView->MarkNextObj(TRUE);
+ pView->MarkNextObj(sal_True);
// II
if(pView->AreObjectsMarked())
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -437,7 +437,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
long nX = 0;
long nY = 0;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
if (nCode == KEY_UP)
{
@@ -464,7 +464,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
nY = 0;
}
- BOOL bReadOnly = rViewData.GetDocShell()->IsReadOnly();
+ sal_Bool bReadOnly = rViewData.GetDocShell()->IsReadOnly();
if(!rKEvt.GetKeyCode().IsMod1() && !bReadOnly)
{
@@ -532,7 +532,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
// II
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else
@@ -551,13 +551,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
if(pView->IsDragObj())
{
bool bWasNoSnap = rDragStat.IsNoSnap();
- BOOL bWasSnapEnabled = pView->IsSnapEnabled();
+ sal_Bool bWasSnapEnabled = pView->IsSnapEnabled();
// switch snapping off
if(!bWasNoSnap)
- ((SdrDragStat&)rDragStat).SetNoSnap(TRUE);
+ ((SdrDragStat&)rDragStat).SetNoSnap(sal_True);
if(bWasSnapEnabled)
- pView->SetSnapEnabled(FALSE);
+ pView->SetSnapEnabled(false);
pView->MovAction(aEndPoint);
pView->EndDragObj();
@@ -573,7 +573,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200));
pView->MakeVisible(aVisRect, *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -640,7 +640,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -664,7 +664,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
// start text edit for suitable object, pass key event to OutlinerView
if ( lcl_KeyEditMode( pObj, pViewShell, &rKEvt ) )
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
@@ -728,7 +728,7 @@ void FuDraw::Deactivate()
|*
\************************************************************************/
-BOOL lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow )
+sal_Bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow )
{
SdrViewEvent aVEvt;
MouseEvent aMEvt( rPosPixel, 1, 0, MOUSE_LEFT );
@@ -738,13 +738,13 @@ BOOL lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow )
{
if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) && ScDrawLayer::GetHitIMapObject(
aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), *pWindow ) )
- return TRUE;
+ return sal_True;
if ( aVEvt.eEvent == SDREVENT_EXECUTEURL )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void FuDraw::ForcePointer(const MouseEvent* pMEvt)
@@ -752,7 +752,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if ( !pView->IsAction() )
{
Point aPosPixel = pWindow->GetPointerPosPixel();
- BOOL bAlt = pMEvt && pMEvt->IsMod2();
+ sal_Bool bAlt = pMEvt && pMEvt->IsMod2();
Point aPnt = pWindow->PixelToLogic( aPosPixel );
SdrHdl* pHdl = pView->PickHandle(aPnt);
SdrObject* pObj;
@@ -804,9 +804,9 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
}
}
-BOOL FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const
+sal_Bool FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const
{
- BOOL bIsSizingOrMoving = FALSE;
+ sal_Bool bIsSizingOrMoving = false;
if ( rMEvt.IsLeft() )
{
const SdrMarkList& rNoteMarkList = pView->GetMarkedObjectList();
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 2ae18fd3d7e8..33eb9f8882ad 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -61,7 +61,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r
return;
Size aPageSize = rPage;
- BOOL bNegative = aPageSize.Width() < 0;
+ sal_Bool bNegative = aPageSize.Width() < 0;
if ( bNegative )
{
// make everything positive temporarily
@@ -103,7 +103,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r
//------------------------------------------------------------------------
void lcl_InsertGraphic( const Graphic& rGraphic,
- const String& rFileName, const String& rFilterName, BOOL bAsLink, BOOL bApi,
+ const String& rFileName, const String& rFilterName, sal_Bool bAsLink, sal_Bool bApi,
ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView )
{
// set the size so the graphic has its original pixel size
@@ -148,7 +148,7 @@ void lcl_InsertGraphic( const Graphic& rGraphic,
pObj->SetName(aName);
// don't select if from (dispatch) API, to allow subsequent cell operations
- ULONG nInsOptions = bApi ? SDRINSERT_DONTMARK : 0;
+ sal_uLong nInsOptions = bApi ? SDRINSERT_DONTMARK : 0;
pView->InsertObjectAtView( pObj, *pPV, nInsOptions );
// SetGraphicLink has to be used after inserting the object,
@@ -211,23 +211,23 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
const SfxItemSet* pReqArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState( SID_INSERT_GRAPHIC, TRUE, &pItem ) == SFX_ITEM_SET )
+ pReqArgs->GetItemState( SID_INSERT_GRAPHIC, sal_True, &pItem ) == SFX_ITEM_SET )
{
String aFileName = ((const SfxStringItem*)pItem)->GetValue();
String aFilterName;
- if ( pReqArgs->GetItemState( FN_PARAM_FILTER, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_FILTER, sal_True, &pItem ) == SFX_ITEM_SET )
aFilterName = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bAsLink = FALSE;
- if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bAsLink = false;
+ if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
bAsLink = ((const SfxBoolItem*)pItem)->GetValue();
Graphic aGraphic;
int nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, GraphicFilter::GetGraphicFilter() );
if ( nError == GRFILTER_OK )
{
- lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, TRUE, pViewSh, pWindow, pView );
+ lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, sal_True, pViewSh, pWindow, pView );
}
}
else
@@ -242,17 +242,17 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
{
String aFileName = aDlg.GetPath();
String aFilterName = aDlg.GetCurrentFilter();
- BOOL bAsLink = aDlg.IsAsLink();
+ sal_Bool bAsLink = aDlg.IsAsLink();
// really store as link only?
if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() )
{
SvxLinkWarningDialog aWarnDlg(pWin,aFileName);
if( aWarnDlg.Execute() != RET_OK )
- bAsLink = sal_False; // don't store as link
+ bAsLink = false; // don't store as link
}
- lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, FALSE, pViewSh, pWindow, pView );
+ lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, false, pViewSh, pWindow, pView );
// append items for recording
rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aFileName ) );
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 0efb433c071c..3efae6b07752 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -55,7 +55,8 @@
#include <svx/svdpagv.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdundo.hxx>
-
+#include <sfx2/msgpool.hxx>
+#include <scmod.hxx>
// BM/IHA --
#include <cppuhelper/component_context.hxx>
@@ -98,7 +99,7 @@ extern SdrObject* pSkipPaintObj; // output.cxx - dieses Objekt nicht
//------------------------------------------------------------------------
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScViewData* pViewData,
const rtl::OUString& rRangeParam )
@@ -118,7 +119,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie
ScMarkData& rMark = pViewData->GetMarkData();
if ( !rMark.IsMarked() )
- pViewData->GetView()->MarkDataArea( TRUE );
+ pViewData->GetView()->MarkDataArea( sal_True );
if ( pViewData->GetSimpleArea( nCol1,nRow1,nTab1, nCol2,nRow2,nTab2 ) == SC_MARK_SIMPLE )
{
@@ -228,7 +229,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
uno::Reference < embed::XEmbeddedObject > xObj;
uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
- BOOL bIsFromFile = FALSE;
+ sal_Bool bIsFromFile = false;
::rtl::OUString aName;
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
@@ -236,8 +237,8 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
uno::Reference< io::XInputStream > xIconMetaFile;
- USHORT nSlot = rReq.GetSlot();
- SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False );
+ sal_uInt16 nSlot = rReq.GetSlot();
+ SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, false );
if ( nSlot == SID_INSERT_OBJECT && pNameItem )
{
SvGlobalName aClassName = pNameItem->GetValue();
@@ -262,12 +263,11 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
aServerLst.Remove( ScDocShell::Factory().GetClassId() ); // Starcalc nicht anzeigen
//TODO/LATER: currently no inserting of ClassId into SfxRequest!
case SID_INSERT_PLUGIN :
- case SID_INSERT_APPLET :
case SID_INSERT_FLOATINGFRAME :
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractInsertObjectDialog* pDlg =
- pFact->CreateInsertObjectDialog( pViewShell->GetWindow(), nSlot,
+ pFact->CreateInsertObjectDialog( pViewShell->GetWindow(), SC_MOD()->GetSlotPool()->GetSlot(nSlot)->GetCommandString(),
xStorage, &aServerLst );
if ( pDlg )
{
@@ -428,7 +428,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
if (bIsFromFile)
{
// Objekt ist selektiert, also Draw-Shell aktivieren
- pViewShell->SetDrawShell( TRUE );
+ pViewShell->SetDrawShell( true );
}
else
{
@@ -517,7 +517,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
bool bAutomaticMark = false;
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
{
- pViewSh->GetViewData()->GetView()->MarkDataArea( TRUE );
+ pViewSh->GetViewData()->GetView()->MarkDataArea( sal_True );
bAutomaticMark = true;
}
@@ -525,7 +525,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
aMultiMark.MarkToMulti();
ScRangeList aRanges;
- aMultiMark.FillRangeListWithMarks( &aRanges, FALSE );
+ aMultiMark.FillRangeListWithMarks( &aRanges, false );
String aStr;
ScDocument* pDocument = pViewSh->GetViewData()->GetDocument();
aRanges.Format( aStr, SCR_ABS_3D, pDocument, pDocument->GetAddressConvention() );
@@ -568,7 +568,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
ScRangeListRef aDummy;
Rectangle aMarkDest;
SCTAB nMarkTab;
- BOOL bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab );
+ sal_Bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab );
// Objekt-Groesse
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
@@ -576,17 +576,17 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
- BOOL bSizeCh = FALSE;
+ sal_Bool bSizeCh = false;
if (bDrawRect && !aMarkDest.IsEmpty())
{
aSize = aMarkDest.GetSize();
- bSizeCh = TRUE;
+ bSizeCh = sal_True;
}
if (aSize.Height() <= 0 || aSize.Width() <= 0)
{
aSize.Width() = 5000;
aSize.Height() = 5000;
- bSizeCh = TRUE;
+ bSizeCh = sal_True;
}
if (bSizeCh)
{
@@ -599,12 +599,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
ScViewData* pData = pViewSh->GetViewData();
ScDocShell* pScDocSh = pData->GetDocShell();
ScDocument* pScDoc = pScDocSh->GetDocument();
- BOOL bUndo (pScDoc->IsUndoEnabled());
+ sal_Bool bUndo (pScDoc->IsUndoEnabled());
if( pReqArgs )
{
const SfxPoolItem* pItem;
- UINT16 nToTable = 0;
+ sal_uInt16 nToTable = 0;
if( IS_AVAILABLE( FN_PARAM_4, &pItem ) )
{
@@ -616,15 +616,15 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
// -> wenn gesetzt, neue Tabelle, sonst aktuelle Tabelle
if ( ((const SfxBoolItem*)pItem)->GetValue() )
- nToTable = static_cast<UINT16>(pScDoc->GetTableCount());
+ nToTable = static_cast<sal_uInt16>(pScDoc->GetTableCount());
else
- nToTable = static_cast<UINT16>(pData->GetTabNo());
+ nToTable = static_cast<sal_uInt16>(pData->GetTabNo());
}
}
else
{
if (bDrawRect)
- nToTable = static_cast<UINT16>(nMarkTab);
+ nToTable = static_cast<sal_uInt16>(nMarkTab);
rReq.AppendItem( SfxUInt16Item( FN_PARAM_4, nToTable ) );
}
@@ -639,7 +639,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
if ( pScDoc->InsertTab( nNewTab, aTabName ) )
{
- BOOL bAppend = TRUE;
+ sal_Bool bAppend = sal_True;
if (bUndo)
{
@@ -649,7 +649,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
}
pScDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nNewTab ) );
- pViewSh->SetTabNo( nNewTab, TRUE );
+ pViewSh->SetTabNo( nNewTab, sal_True );
pScDocSh->PostPaintExtras(); //! erst hinterher ???
}
else
@@ -659,7 +659,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
}
else if ( nToTable != pData->GetTabNo() )
{
- pViewSh->SetTabNo( nToTable, TRUE );
+ pViewSh->SetTabNo( nToTable, sal_True );
}
}
@@ -790,7 +790,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
bAddUndo = false; // don't create the undo action for inserting
// leave the draw shell
- pViewShell->SetDrawShell( FALSE );
+ pViewShell->SetDrawShell( false );
}
else
{
diff --git a/sc/source/ui/drawfunc/fumark.cxx b/sc/source/ui/drawfunc/fumark.cxx
index 199331bd6e48..b46e43d93125 100644
--- a/sc/source/ui/drawfunc/fumark.cxx
+++ b/sc/source/ui/drawfunc/fumark.cxx
@@ -52,8 +52,8 @@
FuMarkRect::FuMarkRect(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq) :
FuPoor(pViewSh, pWin, pViewP, pDoc, rReq),
- bVisible(FALSE),
- bStartDrag(FALSE)
+ bVisible(false),
+ bStartDrag(false)
{
}
@@ -73,18 +73,18 @@ FuMarkRect::~FuMarkRect()
|*
\************************************************************************/
-BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
pWindow->CaptureMouse();
pView->UnmarkAll(); // der Einheitlichkeit halber und wegen #50558#
- bStartDrag = TRUE;
+ bStartDrag = sal_True;
aBeginPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
aZoomRect = Rectangle( aBeginPos, Size() );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -93,7 +93,7 @@ BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuMarkRect::MouseMove(const MouseEvent& rMEvt)
{
if ( bStartDrag )
{
@@ -107,7 +107,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt)
aZoomRect = aRect;
aZoomRect.Justify();
pViewShell->DrawMarkRect(aZoomRect);
- bVisible = TRUE;
+ bVisible = sal_True;
}
ForcePointer(&rMEvt);
@@ -121,7 +121,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
@@ -130,12 +130,12 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
{
// Hide ZoomRect
pViewShell->DrawMarkRect(aZoomRect);
- bVisible = FALSE;
+ bVisible = false;
}
Size aZoomSizePixel = pWindow->LogicToPixel(aZoomRect).GetSize();
- USHORT nMinMove = pView->GetMinMoveDistancePixel();
+ sal_uInt16 nMinMove = pView->GetMinMoveDistancePixel();
if ( aZoomSizePixel.Width() < nMinMove || aZoomSizePixel.Height() < nMinMove )
{
// Klick auf der Stelle
@@ -143,7 +143,7 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
aZoomRect.SetSize(Size()); // dann ganz leer
}
- bStartDrag = FALSE;
+ bStartDrag = false;
pWindow->ReleaseMouse();
pViewShell->GetViewData()->GetDispatcher().
@@ -155,11 +155,11 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
// Chart-Dialog starten:
-// USHORT nId = ScChartDlgWrapper::GetChildWindowId();
+// sal_uInt16 nId = ScChartDlgWrapper::GetChildWindowId();
// SfxChildWindow* pWnd = pViewShell->GetViewFrame()->GetChildWindow( nId );
-// SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+// SC_MOD()->SetRefDialog( nId, pWnd ? sal_False : sal_True );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -168,7 +168,7 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BYTE FuMarkRect::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuMarkRect::Command(const CommandEvent& rCEvt)
{
if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
{
@@ -184,14 +184,14 @@ BYTE FuMarkRect::Command(const CommandEvent& rCEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuMarkRect::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuMarkRect::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
switch ( rKEvt.GetKeyCode().GetCode() )
{
@@ -199,7 +199,7 @@ BOOL FuMarkRect::KeyInput(const KeyEvent& rKEvt)
// beenden
pViewShell->GetViewData()->GetDispatcher().
Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
@@ -247,7 +247,7 @@ void FuMarkRect::Activate()
ScMarkData& rMark = pViewData->GetMarkData();
if ( !rMark.IsMultiMarked() && !rMark.IsMarked() )
- pViewShell->MarkDataArea( TRUE );
+ pViewShell->MarkDataArea( sal_True );
pViewData->GetMultiArea( aSourceRange ); // Mehrfachselektion erlaubt
@@ -270,8 +270,8 @@ void FuMarkRect::Deactivate()
{
// Hide ZoomRect
pViewShell->DrawMarkRect(aZoomRect);
- bVisible = FALSE;
- bStartDrag = FALSE;
+ bVisible = false;
+ bStartDrag = false;
}
}
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 232a619589e2..014a10e19405 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -56,7 +56,7 @@ FuPoor::FuPoor(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
pDrDoc(pDoc),
aSfxRequest(rReq),
pDialog(NULL),
- bIsInDragMode(FALSE),
+ bIsInDragMode(false),
// remember MouseButton state
mnCode(0)
{
@@ -179,21 +179,21 @@ IMPL_LINK_INLINE_START( FuPoor, ScrollHdl, Timer *, EMPTYARG )
IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
// moved from inline to *.cxx
-BOOL FuPoor::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuPoor::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- return FALSE;
+ return false;
}
// moved from inline to *.cxx
-BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- return FALSE;
+ return false;
}
/*************************************************************************
@@ -208,25 +208,25 @@ BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuPoor::KeyInput(const KeyEvent& /* rKEvt */)
+sal_Bool FuPoor::KeyInput(const KeyEvent& /* rKEvt */)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
return(bReturn);
}
-BYTE FuPoor::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuPoor::Command(const CommandEvent& rCEvt)
{
if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
{
//!!! sollte Joe eigentlich machen:
// nur, wenn im Outliner was selektiert ist, darf
- // Command TRUE zurueckliefern:
+ // Command sal_True zurueckliefern:
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
@@ -307,7 +307,7 @@ IMPL_LINK( FuPoor, DragHdl, void *, EMPTYARG )
if ( pHdl==NULL && pView->IsMarkedHit(aMDPos) )
{
pWindow->ReleaseMouse();
- bIsInDragMode = TRUE;
+ bIsInDragMode = sal_True;
// pView->BeginDrag(pWindow, aMDPos);
pViewShell->GetScDrawView()->BeginDrag(pWindow, aMDPos);
@@ -317,24 +317,24 @@ IMPL_LINK( FuPoor, DragHdl, void *, EMPTYARG )
// Detektiv-Linie
-BOOL FuPoor::IsDetectiveHit( const Point& rLogicPos )
+sal_Bool FuPoor::IsDetectiveHit( const Point& rLogicPos )
{
SdrPageView* pPV = pView->GetSdrPageView();
if (!pPV)
- return FALSE;
+ return false;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if (ScDetectiveFunc::IsNonAlienArrow( pObject ))
{
- USHORT nHitLog = (USHORT) pWindow->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic(
Size(pView->GetHitTolerancePixel(),0)).Width();
if(SdrObjectPrimitiveHit(*pObject, rLogicPos, nHitLog, *pPV, 0, false))
{
- bFound = TRUE;
+ bFound = sal_True;
}
}
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index d7e95b311fd6..ceca9c45bd9d 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -57,6 +57,9 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "scmod.hxx"
+#include "charthelper.hxx"
+#include "docuno.hxx"
+#include "docsh.hxx"
// -----------------------------------------------------------------------
@@ -81,7 +84,7 @@ using namespace com::sun::star;
FuSelection::FuSelection(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq ) :
FuDraw(pViewSh, pWin, pViewP, pDoc, rReq),
- bVCAction(FALSE)
+ bVCAction(false)
{
}
@@ -95,7 +98,7 @@ FuSelection::~FuSelection()
{
}
-BYTE FuSelection::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuSelection::Command(const CommandEvent& rCEvt)
{
// special code for non-VCL OS2/UNX removed
@@ -108,7 +111,7 @@ BYTE FuSelection::Command(const CommandEvent& rCEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
@@ -117,13 +120,13 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
if ( bSelectionOnly )
pView->BckAction();
- return TRUE;
+ return sal_True;
}
- bVCAction = FALSE;
- bIsInDragMode = FALSE; // irgendwo muss es ja zurueckgesetzt werden (#50033#)
+ bVCAction = false;
+ bIsInDragMode = false; // irgendwo muss es ja zurueckgesetzt werden (#50033#)
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
@@ -163,16 +166,16 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
aDragTimer.Start();
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else
{
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) )
{
pView->BegMacroObj(aMDPos, pObj, pPV, pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -202,7 +205,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pObj = pHit;
}
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
// For interoperability favour links over macros if both are defined
if ( pInfo->GetHlink().getLength() > 0 )
{
@@ -232,7 +235,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pObjSh->CallXScript( pInfo->GetMacro(),
*pInArgs, aRet, aOutArgsIndex, aOutArgs, true, &aCaller );
pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() );
- return TRUE; // kein CaptureMouse etc.
+ return sal_True; // kein CaptureMouse etc.
}
}
}
@@ -266,13 +269,13 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
ScGlobal::OpenURL( sURL, sTarget );
pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() );
- return TRUE; // kein CaptureMouse etc.
+ return sal_True; // kein CaptureMouse etc.
}
// Is another object being edited in this view?
// (Editing is ended in MarkListHasChanged - test before UnmarkAll)
SfxInPlaceClient* pClient = pViewShell->GetIPClient();
- BOOL bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ sal_Bool bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
// Markieren
@@ -287,7 +290,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pView->UnlockInternalLayer();
// try to select the clicked object
- if ( pView->MarkObj( aMDPos, -2, FALSE, rMEvt.IsMod1() ) )
+ if ( pView->MarkObj( aMDPos, -2, false, rMEvt.IsMod1() ) )
{
//*********************************************************
//Objekt verschieben
@@ -303,11 +306,11 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pHdl=pView->PickHandle(aMDPos);
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else // Objekt am Rand getroffen
if (pViewShell->IsDrawSelMode())
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -319,7 +322,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
//Objekt selektieren
//********************************************************
pView->BegMarkObj(aMDPos);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -343,9 +346,9 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuDraw::MouseMove(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseMove(rMEvt);
if (aDragTimer.IsActive() )
{
@@ -363,14 +366,14 @@ BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
ForceScroll(aPix);
pView->MovAction(aPnt);
- bReturn = TRUE;
+ bReturn = sal_True;
}
// Ein VCControl ist aktiv
// Event an den Manager weiterleiten
if( bVCAction )
{
- bReturn = TRUE;
+ bReturn = true;
}
ForcePointer(&rMEvt);
@@ -384,13 +387,13 @@ BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuDraw::MouseButtonUp(rMEvt);
- BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bReturn = FuDraw::MouseButtonUp(rMEvt);
+ sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
if (aDragTimer.IsActive() )
{
@@ -399,6 +402,14 @@ 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 );
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ ScRangeListVector aProtectedChartRangesVector;
+
if ( rMEvt.IsLeft() )
{
if ( pView->IsDragObj() )
@@ -406,6 +417,29 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
/******************************************************************
* Objekt wurde verschoben
******************************************************************/
+ if ( rMEvt.IsMod1() )
+ {
+ if ( pPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
+ }
+ if ( pView && pDocument )
+ {
+ const SdrMarkList& rSdrMarkList = pView->GetMarkedObjectList();
+ sal_uLong nMarkCount = rSdrMarkList.GetMarkCount();
+ for ( sal_uLong i = 0; i < nMarkCount; ++i )
+ {
+ SdrMark* pMark = rSdrMarkList.GetMark( i );
+ SdrObject* pObj = ( pMark ? pMark->GetMarkedSdrObj() : NULL );
+ if ( pObj )
+ {
+ ScChartHelper::AddRangesIfProtectedChart( aProtectedChartRangesVector, pDocument, pObj );
+ }
+ }
+ }
+ bCopy = true;
+ }
+
pView->EndDragObj( rMEvt.IsMod1() );
pView->ForceMarkedToAnotherPage();
@@ -418,7 +452,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
FuText* pText = static_cast<FuText*>(pPoor);
pText->StopDragMode(pObj );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if (pView->IsAction() )
{
@@ -427,16 +461,16 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
pView->EndAction();
if ( pView->AreObjectsMarked() )
{
- bReturn = TRUE;
+ bReturn = sal_True;
/* if multi-selection contains a note caption object, remove
all other objects from selection. */
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
+ sal_uLong nCount = rMarkList.GetMarkCount();
if( nCount > 1 )
{
bool bFound = false;
- for( ULONG nIdx = 0; !bFound && (nIdx < nCount); ++nIdx )
+ for( sal_uLong nIdx = 0; !bFound && (nIdx < nCount); ++nIdx )
{
SdrObject* pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj();
bFound = ScDrawLayer::IsNoteCaption( pObj );
@@ -465,7 +499,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
pIPClient->DeactivateObject();
}
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks == 2 && rMEvt.IsLeft() )
{
if ( pView->AreObjectsMarked() )
@@ -483,7 +517,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt );
if ( eHit != SDRHIT_NONE && aVEvt.pObj == pObj )
{
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
//
// OLE: aktivieren
@@ -508,8 +542,8 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
else if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) && !pObj->ISA(SdrMediaObj) )
{
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
- BOOL bVertical = ( pOPO && pOPO->IsVertical() );
- USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
+ sal_Bool bVertical = ( pOPO && pOPO->IsVertical() );
+ sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
pViewShell->GetViewData()->GetDispatcher().
Execute(nTextSlotId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
@@ -522,21 +556,21 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Point aMousePixel = rMEvt.GetPosPixel();
pText->SetInEditMode( pObj, &aMousePixel );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
}
else if ( TestDetective( pView->GetSdrPageView(), aPnt ) )
- bReturn = TRUE;
+ bReturn = sal_True;
}
// Ein VCControl ist aktiv
// Event an den Manager weiterleiten
if( bVCAction )
{
- bVCAction = FALSE;
- bReturn = TRUE;
+ bVCAction = false;
+ bReturn = true;
}
ForcePointer(&rMEvt);
@@ -550,6 +584,18 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
pViewShell->GetViewData()->GetDispatcher().
Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ if ( bCopy && pViewData && pDocument && pPage )
+ {
+ ScDocShell* pDocShell = pViewData->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ if ( pModelObj )
+ {
+ SCTAB nTab = pViewData->GetTabNo();
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pPage, pModelObj, nTab,
+ aProtectedChartRangesVector, aExcludedChartNames );
+ }
+ }
+
return (bReturn);
}
@@ -557,14 +603,14 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuSelection::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if (!bReturn)
{
diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx
index 8e884ee45a61..4978b3c7c709 100644
--- a/sc/source/ui/drawfunc/fusel2.cxx
+++ b/sc/source/ui/drawfunc/fusel2.cxx
@@ -64,19 +64,19 @@ inline long Diff( const Point& rP1, const Point& rP2 )
return nX+nY;
}
-BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
+sal_Bool FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
{
if (!pPV)
- return FALSE;
+ return false;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if (ScDetectiveFunc::IsNonAlienArrow( pObject ))
{
- USHORT nHitLog = (USHORT) pWindow->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic(
Size(pView->GetHitTolerancePixel(),0)).Width();
if (SdrObjectPrimitiveHit(*pObject, rPos, nHitLog, *pPV, 0, false))
{
@@ -94,11 +94,11 @@ BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nEndCol, nEndRow );
SCsCOL nCurX = (SCsCOL) pViewData->GetCurX();
SCsROW nCurY = (SCsROW) pViewData->GetCurY();
- BOOL bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) );
+ sal_Bool bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) );
if ( nCurX == nStartCol && nCurY == nStartRow )
- bStart = FALSE;
+ bStart = false;
else if ( nCurX == nEndCol && nCurY == nEndRow )
- bStart = TRUE;
+ bStart = sal_True;
SCsCOL nDifX;
SCsROW nDifY;
@@ -112,9 +112,9 @@ BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
nDifX = nEndCol - nCurX;
nDifY = nEndRow - nCurY;
}
- pViewShell->MoveCursorRel( nDifX, nDifY, SC_FOLLOW_JUMP, FALSE );
+ pViewShell->MoveCursorRel( nDifX, nDifY, SC_FOLLOW_JUMP, false );
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -149,7 +149,7 @@ bool FuSelection::IsNoteCaptionClicked( const Point& rPos ) const
bool bProtectDoc = rDoc.IsTabProtected( nTab ) || (pDocSh && pDocSh->IsReadOnly());
// search the last object (on top) in the object list
- SdrObjListIter aIter( *pPageView->GetObjList(), IM_DEEPNOGROUPS, TRUE );
+ SdrObjListIter aIter( *pPageView->GetObjList(), IM_DEEPNOGROUPS, sal_True );
for( SdrObject* pObj = aIter.Next(); pObj; pObj = aIter.Next() )
{
if( pObj->GetLogicRect().IsInside( rPos ) )
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 5d5f9befd329..7e926e0b1ae4 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -132,13 +132,13 @@ FuText::~FuText()
|*
\************************************************************************/
-BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
if ( pView->MouseButtonDown(rMEvt, pWindow) )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
if ( pView->IsTextEdit() )
{
@@ -153,13 +153,13 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
SdrHdl* pHdl = pView->PickHandle(aMDPos);
- ULONG nHdlNum = pView->GetHdlNum(pHdl);
+ sal_uLong nHdlNum = pView->GetHdlNum(pHdl);
if (pHdl != NULL)
{
if (pView->HasMarkablePoints() && pView->IsPointMarkable(*pHdl))
{
- BOOL bPointMarked=pView->IsPointMarked(*pHdl);
+ sal_Bool bPointMarked=pView->IsPointMarked(*pHdl);
if ( rMEvt.IsShift() )
{
@@ -199,8 +199,8 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
// vertical flag:
// deduced from slot ids only if text object has no content
- USHORT nSlotID = aSfxRequest.GetSlot();
- BOOL bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
+ sal_uInt16 nSlotID = aSfxRequest.GetSlot();
+ sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
if ( pOPO )
bVertical = pOPO->IsVertical(); // content wins
@@ -214,7 +214,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
OutlinerView* pOLV = pView->GetTextEditOutlinerView();
if ( pOLV->MouseButtonDown(rMEvt) )
- return (TRUE); // Event an den Outliner
+ return (sal_True); // Event an den Outliner
}
}
else
@@ -245,7 +245,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- BOOL bMacro = FALSE;
+ sal_Bool bMacro = false;
// if (bMacro && pView->TakeMacroObject(aMDPos,pObj,pPV))
if (bMacro && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) )
@@ -257,7 +257,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
if (pView->IsEditMode())
{
- BOOL bPointMode=pView->HasMarkablePoints();
+ sal_Bool bPointMode=pView->HasMarkablePoints();
if (!rMEvt.IsShift())
{
@@ -277,7 +277,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
pHdl=pView->GetHdl(nHdlNum);
}
- if ( pView->MarkObj(aMDPos, -2, FALSE, rMEvt.IsMod1()) )
+ if ( pView->MarkObj(aMDPos, -2, false, rMEvt.IsMod1()) )
{
aDragTimer.Start();
@@ -334,7 +334,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow ));
// return (bReturn);
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -343,9 +343,9 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuText::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
// pViewShell->SetActivePointer(aNewPointer);
@@ -362,7 +362,7 @@ BOOL FuText::MouseMove(const MouseEvent& rMEvt)
}
if ( pView->MouseMove(rMEvt, pWindow) )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
if ( pView->IsAction() )
{
@@ -382,12 +382,12 @@ BOOL FuText::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if (aDragTimer.IsActive() )
{
@@ -399,7 +399,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
if ( pView->MouseButtonUp(rMEvt, pWindow) )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
if ( pView->IsDragObj() )
{
@@ -433,20 +433,20 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
SfxItemSet aItemSet( pDrDoc->GetItemPool(),
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aItemSet.Put( SdrTextAutoGrowWidthItem( false ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( false ) );
aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aItemSet.Put( SdrTextAniCountItem( 1 ) );
aItemSet.Put( SdrTextAniAmountItem(
- (INT16)pWindow->PixelToLogic(Size(2,1)).Width()) );
+ (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aItemSet);
}
}
// init object different when vertical writing
sal_uInt16 nSlotID(aSfxRequest.GetSlot());
- BOOL bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID);
+ sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID);
if(bVertical)
{
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -458,10 +458,10 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
SdrTextObj* pText = (SdrTextObj*)pObj;
SfxItemSet aSet(pDrDoc->GetItemPool());
- pText->SetVerticalWriting(TRUE);
+ pText->SetVerticalWriting(sal_True);
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(false));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -477,7 +477,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
if ( !pView->AreObjectsMarked() )
{
- pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+ pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher();
if ( pView->AreObjectsMarked() )
@@ -497,7 +497,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 )
{
- pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+ pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher();
if ( pView->AreObjectsMarked() )
@@ -527,18 +527,18 @@ void FuText::ForcePointer(const MouseEvent* /* pMEvt */)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuText::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuText::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->KeyInput(rKEvt, pWindow) )
{
- bReturn = TRUE;
+ bReturn = sal_True;
lcl_InvalidateAttribs( pViewShell->GetViewFrame()->GetBindings() );
}
else
@@ -572,7 +572,7 @@ void FuText::Activate()
/**********************************************************************
* Kein Textobjekt im EditMode, daher CreateMode setzen
**********************************************************************/
- USHORT nObj = OBJ_TEXT;
+ sal_uInt16 nObj = OBJ_TEXT;
pView->SetCurrentObj(nObj);
@@ -626,7 +626,7 @@ void FuText::SelectionHasChanged()
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_TEXT ||
nSdrObjKind == OBJ_TITLETEXT ||
@@ -643,9 +643,9 @@ void FuText::SelectionHasChanged()
/**********************************************************************
* Kein Textobjekt im EditMode, daher CreateMode setzen
**********************************************************************/
- USHORT nObj = OBJ_TEXT;
- UINT16 nIdent;
- UINT32 nInvent;
+ sal_uInt16 nObj = OBJ_TEXT;
+ sal_uInt16 nIdent;
+ sal_uInt32 nInvent;
pView->TakeCurrentObj(nIdent, nInvent);
pView->SetCurrentObj(nObj);
@@ -661,7 +661,7 @@ void FuText::SelectionHasChanged()
\************************************************************************/
void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
- BOOL bCursorToEnd, const KeyEvent* pInitialKey)
+ sal_Bool bCursorToEnd, const KeyEvent* pInitialKey)
{
/* It is possible to pass a special (unselected) object in pObj, e.g. the
caption object of a cell note. If pObj is 0, then the selected object
@@ -683,7 +683,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
if ( pObj )
{
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_TEXT ||
nSdrObjKind == OBJ_TITLETEXT ||
@@ -700,8 +700,8 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
// vertical flag:
// deduced from slot ids only if text object has no content
- USHORT nSlotID = aSfxRequest.GetSlot();
- BOOL bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
+ sal_uInt16 nSlotID = aSfxRequest.GetSlot();
+ sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
if ( pOPO )
bVertical = pOPO->IsVertical(); // content wins
@@ -777,8 +777,8 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
{
SfxItemSet aSet(pDrDoc->GetItemPool());
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(false));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -789,12 +789,12 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
{
SfxItemSet aSet(pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( false ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( false ) );
aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aSet.Put( SdrTextAniCountItem( 1 ) );
- aSet.Put( SdrTextAniAmountItem( (INT16)pWindow->PixelToLogic(Size(2,1)).Width()) );
+ aSet.Put( SdrTextAniAmountItem( (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aSet);
}
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index c1a4e2ce6f22..e43c1ce44344 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -60,10 +60,6 @@
#define _COLDLG_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 09a4240c0678..096a7b602744 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -59,10 +59,10 @@
// Editieren von Notiz-Legendenobjekten muss immer ueber StopEditMode beendet werden,
// damit die Aenderungen ins Dokument uebernommen werden!
// (Fontwork-Execute in drawsh und drtxtob passiert nicht fuer Legendenobjekte)
-// bTextDirection=TRUE means that this function is called from SID_TEXTDIRECTION_XXX(drtxtob.cxx).
+// bTextDirection=sal_True means that this function is called from SID_TEXTDIRECTION_XXX(drtxtob.cxx).
// ------------------------------------------------------------------------------------
-void FuText::StopEditMode(BOOL /*bTextDirection*/)
+void FuText::StopEditMode(sal_Bool /*bTextDirection*/)
{
SdrObject* pObject = pView->GetTextEditObject();
if( !pObject ) return;
@@ -86,7 +86,7 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/)
}
ScDocShell* pDocShell = rViewData.GetDocShell();
- SfxUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0;
bool bNewNote = false;
if( pNote && pUndoMgr )
{
@@ -188,7 +188,7 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/)
// invalidate stream positions only for the affected sheet
rDoc.LockStreamValid(false);
if (rDoc.IsStreamValid(aNotePos.Tab()))
- rDoc.SetStreamValid(aNotePos.Tab(), FALSE);
+ rDoc.SetStreamValid(aNotePos.Tab(), false);
}
}
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 101ce8578f05..4d950a69c783 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -96,14 +96,14 @@ void ScGraphicShell::GetFilterState( SfxItemSet& rSet )
{
ScDrawView* pView = GetViewData()->GetScDrawView();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = false;
if( rMarkList.GetMarkCount() == 1 )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( pObj && pObj->ISA( SdrGrafObj ) && ( ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) )
- bEnable = TRUE;
+ bEnable = sal_True;
}
if( !bEnable )
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index 542573e39fa9..6fcdedf3b7fd 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -75,7 +75,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet )
if( pView )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -118,7 +118,7 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) )
+ if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) )
pItem = NULL;
if( pItem )
diff --git a/sc/source/ui/drawfunc/objdraw.src b/sc/source/ui/drawfunc/objdraw.src
index c7749d7adf27..586aaf822e92 100644
--- a/sc/source/ui/drawfunc/objdraw.src
+++ b/sc/source/ui/drawfunc/objdraw.src
@@ -35,7 +35,7 @@
MenuItem\
{\
Identifier = SID_TEXT_STANDARD ; \
- HelpID = SID_TEXT_STANDARD ; \
+ HelpID = CMD_SID_TEXT_STANDARD ; \
Text [ en-US ] = "~Default" ; \
Text [ x-comment ] = " ";\
};
@@ -46,7 +46,7 @@
MenuItem\
{\
Identifier = RID_MN_FORMAT_STYLE ; \
- HelpID = RID_MN_FORMAT_STYLE ; \
+ HelpID = HID_MN_FORMAT_STYLE ; \
Text [ en-US ] = "~Style" ; \
SubMenu = Menu\
{\
@@ -87,14 +87,14 @@
MenuItem\
{\
Identifier = SID_SET_SUPER_SCRIPT ; \
- HelpID = SID_SET_SUPER_SCRIPT ; \
+ HelpID = CMD_SID_SET_SUPER_SCRIPT ; \
Text [ en-US ] = "~Superscript" ; \
Text [ x-comment ] = " ";\
};\
MenuItem\
{\
Identifier = SID_SET_SUB_SCRIPT ; \
- HelpID = SID_SET_SUB_SCRIPT ; \
+ HelpID = CMD_SID_SET_SUB_SCRIPT ; \
Text [ en-US ] = "S~ubscript" ; \
Text [ x-comment ] = " ";\
};\
@@ -105,7 +105,7 @@
MenuItem\
{\
Identifier = RID_MN_FORMAT_ALGN ; \
- HelpID = RID_MN_FORMAT_ALGN ; \
+ HelpID = HID_MN_FORMAT_ALGN ; \
Text [ en-US ] = "~Alignment" ; \
RadioCheck = TRUE ; \
SubMenu = Menu\
@@ -115,7 +115,7 @@
MenuItem\
{\
Identifier = SID_ALIGNLEFT ; \
- HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_LEFT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Left" ;\
Text [ x-comment ] = " "; \
@@ -123,21 +123,21 @@
MenuItem\
{\
Identifier = SID_ALIGNRIGHT ; \
- HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_RIGHT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Right" ;\
};\
MenuItem\
{\
Identifier = SID_ALIGNCENTERHOR ; \
- HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_CENTER ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Centered" ;\
};\
MenuItem\
{\
Identifier = SID_ALIGNBLOCK ; \
- HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Justified" ; \
Text [ x-comment ] = " ";\
@@ -149,7 +149,7 @@
MenuItem\
{\
Identifier = RID_MN_FORMAT_LINESPACE ; \
- HelpID = RID_MN_FORMAT_LINESPACE ; \
+ HelpID = HID_MN_FORMAT_LINESPACE ; \
Text [ en-US ] = "~Line Spacing" ; \
_MenuItemFlags = MIB_RADIOCHECK ; \
SubMenu = Menu\
@@ -190,7 +190,7 @@
MenuItem\
{\
Identifier = SID_DRAW_HLINK_EDIT ; \
- HelpID = SID_DRAW_HLINK_EDIT ; \
+ HelpID = CMD_SID_DRAW_HLINK_EDIT ; \
Text [ en-US ] = "~Hyperlink..." ; \
};
@@ -198,7 +198,7 @@
MenuItem\
{\
Identifier = SID_DRAW_HLINK_DELETE ; \
- HelpID = SID_DRAW_HLINK_DELETE ; \
+ HelpID = CMD_SID_DRAW_HLINK_DELETE ; \
Text [ en-US ] = "~Remove Hyperlink" ; \
};
@@ -206,7 +206,7 @@
MenuItem\
{\
Identifier = SID_DRAWTEXT_ATTR_DLG ; \
- HelpID = SID_DRAWTEXT_ATTR_DLG ; \
+ HelpID = CMD_SID_DRAWTEXT_ATTR_DLG ; \
Text [ en-US ] = "Te~xt..." ; \
Text [ x-comment ] = " ";\
};
@@ -215,7 +215,7 @@
MenuItem\
{\
Identifier = SID_ASSIGNMACRO ; \
- HelpID = SID_ASSIGNMACRO ; \
+ HelpID = CMD_SID_ASSIGNMACRO ; \
Text [ en-US ] = "Assig~n Macro..." ; \
Text [ x-comment ] = " ";\
};
@@ -233,7 +233,7 @@
MenuItem\
{\
Identifier = SID_RENAME_OBJECT ; \
- HelpId = SID_RENAME_OBJECT ; \
+ HelpId = CMD_SID_RENAME_OBJECT ; \
Text [ en-US ] = "Name...";\
};
@@ -242,7 +242,7 @@
MenuItem\
{\
Identifier = SID_TITLE_DESCRIPTION_OBJECT; \
- HelpId = SID_TITLE_DESCRIPTION_OBJECT; \
+ HelpId = CMD_SID_TITLE_DESCRIPTION_OBJECT; \
Text [ en-US ] = "Description...";\
};
@@ -259,14 +259,14 @@
MenuItem\
{\
Identifier = SID_MIRROR_VERTICAL ; \
- HelpId = SID_MIRROR_VERTICAL ; \
+ HelpId = CMD_SID_MIRROR_VERTICAL ; \
Text [ en-US ] = "~Vertically" ; \
Text [ x-comment ] = " ";\
};\
MenuItem\
{\
Identifier = SID_MIRROR_HORIZONTAL ; \
- HelpId = SID_MIRROR_HORIZONTAL ; \
+ HelpId = CMD_SID_MIRROR_HORIZONTAL ; \
Text [ en-US ] = "~Horizontal" ; \
Text [ x-comment ] = " ";\
};\
@@ -335,7 +335,7 @@
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_PAGE ; \
- HelpId = SID_ANCHOR_PAGE ; \
+ HelpId = CMD_SID_ANCHOR_PAGE ; \
Text [ en-US ] = "To P~age" ; \
Text [ x-comment ] = " ";\
};\
@@ -343,7 +343,7 @@
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_CELL ; \
- HelpId = SID_ANCHOR_CELL ; \
+ HelpId = CMD_SID_ANCHOR_CELL ; \
Text [ en-US ] = "To ~Cell" ; \
Text [ x-comment ] = " ";\
};\
@@ -356,7 +356,7 @@
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN ; \
- HelpId = SID_OBJECT_ALIGN ; \
+ HelpId = CMD_SID_OBJECT_ALIGN ; \
Text [ en-US ] = "A~lignment" ; \
SubMenu = Menu\
{\
@@ -406,150 +406,6 @@ String RID_DRAW_OBJECTBAR
Text [ en-US ] = "Drawing Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_DRAW_OBJECTBAR
-{
- HelpId = HID_SC_TOOLBOX_DRAW ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- LineSpacing = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDIT ;
- HelpID = SID_BEZIER_EDIT ;
-
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- // Linien
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_LINE ;
- HelpId = SID_ATTRIBUTES_LINE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINEEND_STYLE ;
- HelpID = SID_ATTR_LINEEND_STYLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINE_STYLE ;
- HelpId = SID_ATTR_LINE_STYLE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINE_WIDTH ;
- HelpId = SID_ATTR_LINE_WIDTH ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINE_COLOR ;
- HelpId = SID_ATTR_LINE_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_AREA ;
- HelpId = SID_ATTRIBUTES_AREA ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_FILL_STYLE ;
- HelpId = SID_ATTR_FILL_STYLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- // Rest
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ROTATE ;
- HelpId = SID_OBJECT_ROTATE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ANCHOR_TOGGLE ;
- HelpId = SID_ANCHOR_TOGGLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_TOP ;
- HelpId = SID_FRAME_TO_TOP ;
- };
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_BOTTOM ;
- HelpId = SID_FRAME_TO_BOTTOM ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HEAVEN ;
- HelpID = SID_OBJECT_HEAVEN ;
-
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HELL ;
- HelpID = SID_OBJECT_HELL ;
-
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
-
- ToolBoxItem
- {
- Identifier = SID_GRID_VISIBLE;
- HelpID = SID_GRID_VISIBLE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_GRID_USE;
- HelpID = SID_GRID_USE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_HELPLINES_MOVE;
- HelpID = SID_HELPLINES_MOVE;
- Hide = TRUE;
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ALIGN ;
- HelpId = SID_OBJECT_ALIGN ;
- };
- };
- Scroll = TRUE ;
-};
//
// Text-Toolbox
//
@@ -558,504 +414,6 @@ String RID_TEXT_TOOLBOX
Text [ en-US ] = "Text Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_TEXT_TOOLBOX
-{
- HelpId = HID_SC_TOOLBOX_DRTEXT ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONT ;
- HelpId = SID_ATTR_CHAR_FONT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONTHEIGHT ;
- HelpId = SID_ATTR_CHAR_FONTHEIGHT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_WEIGHT ;
- HelpId = SID_ATTR_CHAR_WEIGHT ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_POSTURE ;
- HelpId = SID_ATTR_CHAR_POSTURE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_UNDERLINE ;
- HelpId = SID_ATTR_CHAR_UNDERLINE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ULINE_VAL_DOUBLE;
- HelpId = SID_ULINE_VAL_DOUBLE;
- AutoCheck = TRUE ;
- Hide=TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_COLOR ;
- HelpId = SID_ATTR_CHAR_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_10 ;
- HelpId = SID_ATTR_PARA_LINESPACE_10 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_15 ;
- HelpId = SID_ATTR_PARA_LINESPACE_15 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_20 ;
- HelpId = SID_ATTR_PARA_LINESPACE_20 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ALIGNLEFT ;
- HelpId = SID_ATTR_PARA_ADJUST_LEFT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNCENTERHOR ;
- HelpId = SID_ATTR_PARA_ADJUST_CENTER ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNRIGHT ;
- HelpId = SID_ATTR_PARA_ADJUST_RIGHT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNBLOCK ;
- HelpId = SID_ATTR_PARA_ADJUST_BLOCK ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;
- HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;
- HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
- };
- ToolBoxItem
- {
- Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_CHAR_DLG ;
- HelpID = SID_CHAR_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_PARA_DLG ;
- HelpID = SID_PARA_DLG ;
- };
- };
- ItemList[ ar ] =
- {
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONT ;
- HelpId = SID_ATTR_CHAR_FONT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONTHEIGHT ;
- HelpId = SID_ATTR_CHAR_FONTHEIGHT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_WEIGHT ;
- HelpId = SID_ATTR_CHAR_WEIGHT ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_POSTURE ;
- HelpId = SID_ATTR_CHAR_POSTURE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_UNDERLINE ;
- HelpId = SID_ATTR_CHAR_UNDERLINE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ULINE_VAL_DOUBLE;
- HelpId = SID_ULINE_VAL_DOUBLE;
- AutoCheck = TRUE ;
- Hide=TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_COLOR ;
- HelpId = SID_ATTR_CHAR_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_10 ;
- HelpId = SID_ATTR_PARA_LINESPACE_10 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_15 ;
- HelpId = SID_ATTR_PARA_LINESPACE_15 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_20 ;
- HelpId = SID_ATTR_PARA_LINESPACE_20 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ALIGNRIGHT ;
- HelpId = SID_ATTR_PARA_ADJUST_RIGHT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNCENTERHOR ;
- HelpId = SID_ATTR_PARA_ADJUST_CENTER ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNLEFT ;
- HelpId = SID_ATTR_PARA_ADJUST_LEFT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNBLOCK ;
- HelpId = SID_ATTR_PARA_ADJUST_BLOCK ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;
- HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;
- HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
- };
- ToolBoxItem
- {
- Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_CHAR_DLG ;
- HelpID = SID_CHAR_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_PARA_DLG ;
- HelpID = SID_PARA_DLG ;
- };
- };
- ItemList[ he ] =
- {
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONT ;
- HelpId = SID_ATTR_CHAR_FONT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONTHEIGHT ;
- HelpId = SID_ATTR_CHAR_FONTHEIGHT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_WEIGHT ;
- HelpId = SID_ATTR_CHAR_WEIGHT ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_POSTURE ;
- HelpId = SID_ATTR_CHAR_POSTURE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_UNDERLINE ;
- HelpId = SID_ATTR_CHAR_UNDERLINE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ULINE_VAL_DOUBLE;
- HelpId = SID_ULINE_VAL_DOUBLE;
- AutoCheck = TRUE ;
- Hide=TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_COLOR ;
- HelpId = SID_ATTR_CHAR_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_10 ;
- HelpId = SID_ATTR_PARA_LINESPACE_10 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_15 ;
- HelpId = SID_ATTR_PARA_LINESPACE_15 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_20 ;
- HelpId = SID_ATTR_PARA_LINESPACE_20 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ALIGNRIGHT ;
- HelpId = SID_ATTR_PARA_ADJUST_RIGHT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNCENTERHOR ;
- HelpId = SID_ATTR_PARA_ADJUST_CENTER ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNLEFT ;
- HelpId = SID_ATTR_PARA_ADJUST_LEFT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNBLOCK ;
- HelpId = SID_ATTR_PARA_ADJUST_BLOCK ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;
- HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;
- HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
- };
- ToolBoxItem
- {
- Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_CHAR_DLG ;
- HelpID = SID_CHAR_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_PARA_DLG ;
- HelpID = SID_PARA_DLG ;
- };
- };
-};
//
// Graphics toolbox
//
@@ -1063,182 +421,6 @@ String RID_GRAPHIC_OBJECTBAR
{
Text [ en-US ] = "Graphics Object Bar";
};
-ToolBox RID_GRAPHIC_OBJECTBAR
-{
- HelpId = HID_SC_TOOLBOX_GRAPHIC ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_GRFFILTER;
- HelpID = SID_GRFFILTER;
- DropDown = TRUE ;
- Checkable = FALSE ;
- RadioCheck = FALSE ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_MODE;
- HelpID = SID_ATTR_GRAF_MODE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_RED;
- HelpID = SID_ATTR_GRAF_RED;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GREEN;
- HelpID = SID_ATTR_GRAF_GREEN;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_BLUE;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_LUMINANCE;
- HelpID = SID_ATTR_GRAF_LUMINANCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CONTRAST;
- HelpID = SID_ATTR_GRAF_CONTRAST;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GAMMA;
- HelpID = SID_ATTR_GRAF_GAMMA;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_TRANSPARENCE;
- HelpID = SID_ATTR_GRAF_TRANSPARENCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- // #i25616#
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_LINE;
- HelpID = SID_ATTRIBUTES_LINE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_AREA;
- HelpID = SID_ATTRIBUTES_AREA;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_FILL_SHADOW;
- HelpID = SID_ATTR_FILL_SHADOW;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CROP;
- HelpID = SID_ATTR_GRAF_CROP;
- };
-
- // copied from the "normal" drawing toolbar:
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ANCHOR_TOGGLE ;
- HelpId = SID_ANCHOR_TOGGLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_TOP ;
- HelpId = SID_FRAME_TO_TOP ;
- };
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_BOTTOM ;
- HelpId = SID_FRAME_TO_BOTTOM ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HEAVEN ;
- HelpID = SID_OBJECT_HEAVEN ;
-
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HELL ;
- HelpID = SID_OBJECT_HELL ;
-
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
-
- ToolBoxItem
- {
- Identifier = SID_GRID_VISIBLE;
- HelpID = SID_GRID_VISIBLE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_GRID_USE;
- HelpID = SID_GRID_USE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_HELPLINES_MOVE;
- HelpID = SID_HELPLINES_MOVE;
- Hide = TRUE;
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ALIGN ;
- HelpId = SID_OBJECT_ALIGN ;
- };
- };
-};
//
// Popup-Menues ---------------------------------------------------------------------
//
@@ -1404,36 +586,6 @@ Menu RID_POPUP_MEDIA
};
};
-ToolBox RID_MEDIA_OBJECTBAR
-{
- //HelpId = HID_SC_TOOLBOX_MEDIA ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_AVMEDIA_TOOLBOX;
- HelpID = SID_AVMEDIA_TOOLBOX;
- DropDown = FALSE ;
- Checkable = FALSE ;
- RadioCheck = FALSE ;
- };
- };
-};
-
//
// Ole-Objekt
//
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 4b6bfee38d46..e923f66b31d0 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -73,7 +73,7 @@ SFX_IMPL_DOCKINGWINDOW( ScFunctionChildWindow, FID_FUNCTION_BOX )
#************************************************************************/
ScFunctionChildWindow::ScFunctionChildWindow( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( pParentP, nId )
@@ -122,13 +122,13 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
eSfxNewAlignment=GetAlignment();
eSfxOldAlignment=eSfxNewAlignment;
- aFiFuncDesc.SetUpdateMode(TRUE);
+ aFiFuncDesc.SetUpdateMode(sal_True);
pAllFuncList=&aFuncList;
aDDFuncList.Disable();
aDDFuncList.Hide();
nArgs=0;
nDockMode=0;
- bSizeFlag=FALSE;
+ bSizeFlag=false;
aCatBox.SetDropDownLineCount(9);
Font aFont=aFiFuncDesc.GetFont();
aFont.SetColor(Color(COL_BLACK));
@@ -147,7 +147,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
Link a3Link=LINK( this, ScFunctionDockWin, SetSplitHdl);
aPrivatSplit.SetCtrModifiedHdl(a3Link);
- StartListening( *pBindingsP, TRUE );
+ StartListening( *pBindingsP, sal_True );
Point aTopLeft=aCatBox.GetPosPixel();
String aString=String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ww"));
@@ -161,7 +161,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
GetOutputSizePixel().Height()-2*aTxtSize.Height());
aPrivatSplit.SetYRange(aYRange);
SelHdl(&aCatBox);
- bInit=TRUE;
+ bInit=sal_True;
}
/*************************************************************************
@@ -204,7 +204,7 @@ void ScFunctionDockWin::InitLRUList()
pFuncMgr->fillLastRecentlyUsedFunctions(aLRUList);
- USHORT nSelPos = aCatBox.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos();
if(nSelPos == 0)
UpdateFunctionList();
@@ -250,7 +250,7 @@ void ScFunctionDockWin::UpdateLRUList()
void ScFunctionDockWin::SetSize()
{
- USHORT nSelEntry=0;
+ sal_uInt16 nSelEntry=0;
SfxChildAlignment aChildAlign=eSfxOldAlignment;//GetAlignment();
short nNewDockMode;
switch(aChildAlign)
@@ -328,9 +328,9 @@ void ScFunctionDockWin::SetSize()
void ScFunctionDockWin::SetLeftRightSize()
{
- if(bSizeFlag==FALSE)
+ if(bSizeFlag==false)
{
- bSizeFlag=TRUE;
+ bSizeFlag=sal_True;
Size aDiffSize=GetSizePixel();
Size aNewSize=GetOutputSizePixel();
@@ -355,7 +355,7 @@ void ScFunctionDockWin::SetLeftRightSize()
aOldSize=aNewSize;
aNewSize.Width()+=aDiffSize.Width();
aNewSize.Height()+=aDiffSize.Height();
- bSizeFlag=FALSE;
+ bSizeFlag=false;
}
}
@@ -376,9 +376,9 @@ void ScFunctionDockWin::SetLeftRightSize()
void ScFunctionDockWin::SetTopBottonSize()
{
- if(bSizeFlag==FALSE)
+ if(bSizeFlag==false)
{
- bSizeFlag=TRUE;
+ bSizeFlag=sal_True;
Size aDiffSize=GetSizePixel();
Size aNewSize=GetOutputSizePixel();
aDiffSize.Width()-=aNewSize.Width();
@@ -389,7 +389,7 @@ void ScFunctionDockWin::SetTopBottonSize()
aNewSize.Width()+=aDiffSize.Width();
aNewSize.Height()+=aDiffSize.Height();
- bSizeFlag=FALSE;
+ bSizeFlag=false;
}
}
@@ -410,7 +410,7 @@ void ScFunctionDockWin::SetTopBottonSize()
void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
{
- if((ULONG)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
+ if((sal_uLong)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
Size aCDSize=aCatBox.GetSizePixel();
Size aFLSize=aFuncList.GetSizePixel();
@@ -448,7 +448,7 @@ void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
{
- if((ULONG)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
+ if((sal_uLong)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
Size aFLSize=aFuncList.GetSizePixel();
Size aSplitterSize=aPrivatSplit.GetSizePixel();
@@ -497,7 +497,7 @@ void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
void ScFunctionDockWin::SetMyWidthToBo(Size &aNewSize)
{
- if((ULONG)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
+ if((sal_uLong)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
Size aCDSize=aCatBox.GetSizePixel();
Size aDdFLSize=aDDFuncList.GetSizePixel();
@@ -538,7 +538,7 @@ void ScFunctionDockWin::SetMyWidthToBo(Size &aNewSize)
void ScFunctionDockWin::SetMyHeightToBo(Size &aNewSize)
{
- if((ULONG)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
+ if((sal_uLong)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
Size aFDSize=aFiFuncDesc.GetSizePixel();
@@ -621,8 +621,8 @@ void ScFunctionDockWin::SetDescription()
void ScFunctionDockWin::Resizing( Size& rNewSize )
{
- if((ULONG)rNewSize.Width()<nMinWidth) rNewSize.Width()=nMinWidth;
- if((ULONG)rNewSize.Height()<nMinHeight) rNewSize.Height()=nMinHeight;
+ if((sal_uLong)rNewSize.Width()<nMinWidth) rNewSize.Width()=nMinWidth;
+ if((sal_uLong)rNewSize.Height()<nMinHeight) rNewSize.Height()=nMinHeight;
}
@@ -640,9 +640,9 @@ void ScFunctionDockWin::Resizing( Size& rNewSize )
#*
#************************************************************************/
-BOOL ScFunctionDockWin::Close()
+sal_Bool ScFunctionDockWin::Close()
{
- SfxBoolItem aItem( FID_FUNCTION_BOX, FALSE );
+ SfxBoolItem aItem( FID_FUNCTION_BOX, false );
GetBindings().GetDispatcher()->Execute( FID_FUNCTION_BOX,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
@@ -650,7 +650,7 @@ BOOL ScFunctionDockWin::Close()
SfxDockingWindow::Close();
- return( TRUE );
+ return( sal_True );
}
@@ -680,7 +680,7 @@ SfxChildAlignment ScFunctionDockWin::CheckAlignment(SfxChildAlignment /* abla */
}
else
{
- bInit=FALSE;
+ bInit=false;
eSfxOldAlignment=aChildAlign;
eSfxNewAlignment=aChildAlign;
}
@@ -779,12 +779,12 @@ void ScFunctionDockWin::Resize()
void ScFunctionDockWin::UpdateFunctionList()
{
- USHORT nSelPos = aCatBox.GetSelectEntryPos();
- USHORT nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos();
+ sal_uInt16 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
? (nSelPos-1) : 0;
pAllFuncList->Clear();
- pAllFuncList->SetUpdateMode( FALSE );
+ pAllFuncList->SetUpdateMode( false );
if ( nSelPos > 0 )
{
@@ -812,7 +812,7 @@ void ScFunctionDockWin::UpdateFunctionList()
//------------------------------------------------------
- pAllFuncList->SetUpdateMode( TRUE );
+ pAllFuncList->SetUpdateMode( sal_True );
if ( pAllFuncList->GetEntryCount() > 0 )
{
@@ -841,7 +841,7 @@ void ScFunctionDockWin::UpdateFunctionList()
#*
#************************************************************************/
-void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
+void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
{
String aFirstArgStr;
String aParaStr;
@@ -883,8 +883,8 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
if ( nArgs != VAR_ARGS )
{ // no VarArgs or Fix plus VarArgs, but not VarArgs only
String aArgSep = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "; " ));
- USHORT nFix = ( nArgs < VAR_ARGS ? nArgs : nArgs - VAR_ARGS + 1 );
- for ( USHORT nArg = 1;
+ sal_uInt16 nFix = ( nArgs < VAR_ARGS ? nArgs : nArgs - VAR_ARGS + 1 );
+ for ( sal_uInt16 nArg = 1;
nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++ )
{
if (!pDesc->pDefArgFlags[nArg].bSuppress)
@@ -912,7 +912,7 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
if(nArgs>0)
{
pHdl->InsertFunction(aString);
- pEdView->InsertText(aArgStr,TRUE);
+ pEdView->InsertText(aArgStr,sal_True);
ESelection aESel=pEdView->GetSelection();
aESel.nEndPos=aESel.nStartPos+aFirstArgStr.Len();
pEdView->SetSelection(aESel);
@@ -921,7 +921,7 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
else
{
aString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "()" ));
- pEdView->InsertText(aString,FALSE);
+ pEdView->InsertText(aString,false);
pHdl->DataChanged();
}
}
@@ -994,7 +994,7 @@ IMPL_LINK( ScFunctionDockWin, SetSelectionHdl, void*, pCtrl )
if ((ImageButton *)pCtrl == &aInsertButton ||
(ListBox *)pCtrl == &aFuncList)
{
- DoEnter(TRUE); // Uebernimmt die Eingabe
+ DoEnter(sal_True); // Uebernimmt die Eingabe
}
//...
@@ -1091,10 +1091,10 @@ void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo)
if ( aStr.Len())
{
aSplitterInitPos=aPrivatSplit.GetPosPixel();
- aSplitterInitPos.Y()=(USHORT) aStr.ToInt32();
+ aSplitterInitPos.Y()=(sal_uInt16) aStr.ToInt32();
xub_StrLen n1 = aStr.Search(';');
aStr.Erase(0, n1+1);
- USHORT nSelPos=sal::static_int_cast<USHORT>( aStr.ToInt32() );
+ sal_uInt16 nSelPos=sal::static_int_cast<sal_uInt16>( aStr.ToInt32() );
aCatBox.SelectEntryPos(nSelPos);
SelHdl(&aCatBox);
diff --git a/sc/source/ui/formdlg/dwfunctr.src b/sc/source/ui/formdlg/dwfunctr.src
index 46061a512955..dc50a2b41486 100644
--- a/sc/source/ui/formdlg/dwfunctr.src
+++ b/sc/source/ui/formdlg/dwfunctr.src
@@ -46,6 +46,7 @@ DockingWindow FID_FUNCTION_BOX
HelpId = HID_FUNCTION_BOX ;
ListBox CB_CAT
{
+ HelpID = "sc:ListBox:FID_FUNCTION_BOX:CB_CAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 4 ) ;
Size = MAP_APPFONT ( 56 , 80 ) ;
@@ -73,6 +74,7 @@ DockingWindow FID_FUNCTION_BOX
};
ListBox DDLB_FUNC
{
+ HelpID = "sc:ListBox:FID_FUNCTION_BOX:DDLB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 103 , 4 ) ;
Size = MAP_APPFONT ( 56 , 80 ) ;
@@ -83,6 +85,7 @@ DockingWindow FID_FUNCTION_BOX
};
ListBox LB_FUNC
{
+ HelpID = "sc:ListBox:FID_FUNCTION_BOX:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 3 , 19 ) ;
Size = MAP_APPFONT ( 72 , 90 ) ;
@@ -104,6 +107,7 @@ DockingWindow FID_FUNCTION_BOX
};
ImageButton IMB_INSERT
{
+ HelpID = "sc:ImageButton:FID_FUNCTION_BOX:IMB_INSERT";
Pos = MAP_APPFONT ( 3 , 4 ) ;
Size = MAP_APPFONT ( 13 , 13 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index d2da590cdc07..14a4e0023efa 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -107,7 +107,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
{
pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() );
if( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(true);
}
}
}
@@ -127,10 +127,10 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
if ( pInputHdl )
pInputHdl->NotifyChange( NULL );
- m_aHelper.enableInput( FALSE );
+ m_aHelper.enableInput( false );
m_aHelper.EnableSpreadsheets();
m_aHelper.Init();
- m_aHelper.SetDispatcherLock( TRUE );
+ m_aHelper.SetDispatcherLock( sal_True );
notifyChange();
fill();
@@ -160,26 +160,26 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
String aFormula;
pDoc->GetFormula( nCol, nRow, nTab, aFormula );
- BOOL bEdit = ( aFormula.Len() > 1 );
- BOOL bMatrix = FALSE;
+ sal_Bool bEdit = ( aFormula.Len() > 1 );
+ sal_Bool bMatrix = false;
if ( bEdit )
{
bMatrix = CheckMatrix(aFormula);
xub_StrLen nFStart = 0;
xub_StrLen nFEnd = 0;
- if ( GetFormulaHelper().GetNextFunc( aFormula, FALSE, nFStart, &nFEnd) )
+ if ( GetFormulaHelper().GetNextFunc( aFormula, false, nFStart, &nFEnd) )
{
pScMod->InputReplaceSelection( aFormula );
pScMod->InputSetSelection( nFStart, nFEnd );
xub_StrLen PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd);
- eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,TRUE,TRUE);
+ eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,sal_True,sal_True);
pData->SetFStart( nFStart );
}
else
- bEdit = FALSE;
+ bEdit = false;
}
if ( !bEdit )
@@ -192,12 +192,12 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
pScMod->InputSetSelection( 1, aNewFormula.Len()+1 );
xub_StrLen PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd);
- SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,FALSE,FALSE);
+ SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,false,false);
pData->SetFStart( 1 ); // hinter dem "="
}
- pData->SetMode( (USHORT) eMode );
+ pData->SetMode( (sal_uInt16) eMode );
String rStrExp = GetMeText();
pCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp );
@@ -279,9 +279,9 @@ ScFormulaDlg::~ScFormulaDlg()
delete pCell;
}
-BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
+sal_Bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
{
- BOOL bAlive = FALSE;
+ sal_Bool bAlive = false;
// gehoert der InputHandler zu irgendeiner ViewShell ?
@@ -290,7 +290,7 @@ BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
while ( pSh && !bAlive )
{
if (((ScTabViewShell*)pSh)->GetInputHandler() == pHdl)
- bAlive = TRUE;
+ bAlive = sal_True;
pSh = SfxViewShell::GetNext( *pSh, &aScType );
}
@@ -320,10 +320,10 @@ ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell,PtrTabVi
}
-BOOL ScFormulaDlg::Close()
+sal_Bool ScFormulaDlg::Close()
{
- DoEnter(FALSE);
- return TRUE;
+ DoEnter(false);
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -331,7 +331,7 @@ BOOL ScFormulaDlg::Close()
// --------------------------------------------------------------------------
bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
{
- BOOL bResult = TRUE;
+ sal_Bool bResult = sal_True;
::std::auto_ptr<ScFormulaCell> pFCell( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) );
@@ -339,7 +339,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
// wenn ein Name eigentlich als Bereich in die Gesamt-Formel
// eingefuegt wird, bei der Einzeldarstellung aber als
// single-Zellbezug interpretiert wird
- BOOL bColRowName = pCell->HasColRowName();
+ sal_Bool bColRowName = pCell->HasColRowName();
if ( bColRowName )
{
// ColRowName im RPN-Code?
@@ -352,10 +352,10 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
pFCell.reset( new ScFormulaCell( pDoc, aCursorPos, aBraced ) );
}
else
- bColRowName = FALSE;
+ bColRowName = false;
}
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
if ( nErrCode == 0 )
{
SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable());
@@ -363,7 +363,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
if ( pFCell->IsValue() )
{
double n = pFCell->GetValue();
- ULONG nFormat = aFormatter.GetStandardFormat( n, 0,
+ sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0,
pFCell->GetFormatType(), ScGlobal::eLnge );
aFormatter.GetOutputString( n, nFormat,
rStrResult, &pColor );
@@ -373,7 +373,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
String aStr;
pFCell->GetString( aStr );
- ULONG nFormat = aFormatter.GetStandardFormat(
+ sal_uLong nFormat = aFormatter.GetStandardFormat(
pFCell->GetFormatType(), ScGlobal::eLnge);
aFormatter.GetOutputString( aStr, nFormat,
rStrResult, &pColor );
@@ -405,7 +405,7 @@ void ScFormulaDlg::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* p
m_aHelper.RefInputStart( aPair.second, aPair.first);
RefInputStartAfter( aPair.second, aPair.first );
}
-void ScFormulaDlg::RefInputDone( BOOL bForced )
+void ScFormulaDlg::RefInputDone( sal_Bool bForced )
{
m_aHelper.RefInputDone( bForced );
RefInputDoneAfter( bForced );
@@ -417,7 +417,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
if ( pFunc && pFunc->getSuppressedArgumentCount() > 0 )
{
Selection theSel;
- BOOL bRefNull = UpdateParaWin(theSel);
+ sal_Bool bRefNull = UpdateParaWin(theSel);
if ( rRef.aStart != rRef.aEnd && bRefNull )
{
@@ -425,7 +425,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
}
String aRefStr;
- BOOL bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() );
+ sal_Bool bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() );
if ( bOtherDoc )
{
// Referenz auf anderes Dokument - wie inputhdl.cxx
@@ -472,21 +472,21 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
}
}
-BOOL ScFormulaDlg::IsRefInputMode() const
+sal_Bool ScFormulaDlg::IsRefInputMode() const
{
const IFunctionDescription* pDesc = getCurrentFunctionDescription();
- BOOL bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL);
+ sal_Bool bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL);
return bRef;
}
-BOOL ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const
+sal_Bool ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const
{
// not allowed: different from this doc, and no name
// pDocSh is always a ScDocShell
if ( pDocSh && ((ScDocShell*)pDocSh)->GetDocument() != pDoc && !pDocSh->HasName() )
- return FALSE;
+ return false;
- return TRUE; // everything else is allowed
+ return sal_True; // everything else is allowed
}
void ScFormulaDlg::SetActive()
@@ -508,7 +508,7 @@ void ScFormulaDlg::SaveLRUEntry(const ScFuncDesc* pFuncDescP)
}
}
-void ScFormulaDlg::doClose(BOOL /*_bOk*/)
+void ScFormulaDlg::doClose(sal_Bool /*_bOk*/)
{
m_aHelper.DoClose( ScFormulaDlgWrapper::GetChildWindowId() );
}
@@ -525,7 +525,7 @@ void ScFormulaDlg::ShowReference(const String& _sFormula)
{
m_aHelper.ShowReference(_sFormula);
}
-void ScFormulaDlg::HideReference( BOOL bDoneRefMode )
+void ScFormulaDlg::HideReference( sal_Bool bDoneRefMode )
{
m_aHelper.HideReference(bDoneRefMode);
}
@@ -537,10 +537,10 @@ void ScFormulaDlg::AddRefEntry( )
{
}
-BOOL ScFormulaDlg::IsTableLocked( ) const
+sal_Bool ScFormulaDlg::IsTableLocked( ) const
{
// per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden
- return FALSE;
+ return false;
}
void ScFormulaDlg::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton)
{
@@ -550,7 +550,7 @@ void ScFormulaDlg::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pB
{
m_aHelper.ReleaseFocus(pEdit,pButton);
}
-void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked)
+void ScFormulaDlg::dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked)
{
SfxBoolItem aRetItem( SID_DLG_RETOK, _bOK );
SfxBoolItem aMatItem( SID_DLG_MATRIX, _bMartixChecked );
@@ -559,9 +559,9 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked)
// Wenn durch Dokument-Umschalterei die Eingabezeile weg war/ist,
// ist der String leer. Dann nicht die alte Formel loeschen.
if ( !aStrItem.GetValue().Len() )
- aRetItem.SetValue( FALSE ); // FALSE = Cancel
+ aRetItem.SetValue( false ); // sal_False = Cancel
- m_aHelper.SetDispatcherLock( FALSE ); // Modal-Modus ausschalten
+ m_aHelper.SetDispatcherLock( false ); // Modal-Modus ausschalten
clear();
@@ -569,7 +569,7 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked)
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aRetItem, &aStrItem, &aMatItem, 0L );
}
-void ScFormulaDlg::setDispatcherLock( BOOL bLock )
+void ScFormulaDlg::setDispatcherLock( sal_Bool bLock )
{
m_aHelper.SetDispatcherLock( bLock );
}
diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx
index 3639f2a6b4e6..65df2a6f86c9 100644
--- a/sc/source/ui/formdlg/privsplt.cxx
+++ b/sc/source/ui/formdlg/privsplt.cxx
@@ -64,7 +64,7 @@ ScPrivatSplit::ScPrivatSplit( Window* pParent, const ResId& rResId,
aWinPointer=GetPointer();
- aMovingFlag=FALSE;
+ aMovingFlag=false;
if(eScSplit==SC_SPLIT_HORZ)
{
aWinPointer=Pointer(POINTER_HSPLIT);
@@ -350,7 +350,7 @@ void ScPrivatSplit::MoveSplitTo(Point aPos)
}
-void ScPrivatSplit::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground )
+void ScPrivatSplit::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -389,17 +389,17 @@ void ScPrivatSplit::StateChanged( StateChangedType nType )
if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, false, false );
Invalidate();
}
if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( false, sal_True, false );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( false, false, sal_True );
Invalidate();
}
@@ -413,7 +413,7 @@ void ScPrivatSplit::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
else
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index eaa68f0e6aa2..43d3c1aba20d 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -150,7 +150,7 @@ public:
virtual void UpdateData() { }
virtual void SetDoUpdate(sal_Bool /* bValue */) { }
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
DECL_LINK( NotifyHdl, EENotify* );
protected:
@@ -267,7 +267,7 @@ public:
virtual void UpdateData() { }
virtual void SetDoUpdate(sal_Bool /* bValue */) { }
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
private:
ScPreviewViewForwarder* mpViewForwarder;
ScPreviewShell* mpViewShell;
@@ -300,7 +300,7 @@ public:
virtual void UpdateData() { }
virtual void SetDoUpdate(sal_Bool /* bValue */) { }
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
private:
ScPreviewViewForwarder* mpViewForwarder;
ScPreviewShell* mpViewShell;
@@ -349,7 +349,7 @@ public:
virtual void UpdateData() {}
virtual void SetDoUpdate( sal_Bool /* bValue */ ) {}
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
};
diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx
index d23f1d5ceebf..afd90f5305f3 100644
--- a/sc/source/ui/inc/IAnyRefDialog.hxx
+++ b/sc/source/ui/inc/IAnyRefDialog.hxx
@@ -46,11 +46,11 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0;
- virtual void RefInputDone( BOOL bForced = FALSE ) = 0;
- virtual BOOL IsTableLocked() const = 0;
- virtual BOOL IsRefInputMode() const = 0;
+ virtual void RefInputDone( sal_Bool bForced = false ) = 0;
+ virtual sal_Bool IsTableLocked() const = 0;
+ virtual sal_Bool IsRefInputMode() const = 0;
- virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const = 0;
+ virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const = 0;
virtual void AddRefEntry() = 0;
virtual void SetActive() = 0;
virtual void ViewShellChanged( ScTabViewShell* pScViewShell ) = 0;
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index aeff805d72ca..f984c2347fe5 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -107,10 +107,10 @@ public:
SCTAB nTable;
SCCOL nCol;
SCROW nRow;
- ULONG nActionNo;
- ULONG nInfo;
- BOOL bIsRejectable;
- BOOL bIsAcceptable;
+ sal_uLong nActionNo;
+ sal_uLong nInfo;
+ sal_Bool bIsRejectable;
+ sal_Bool bIsAcceptable;
};
typedef long LExpNum;
@@ -153,15 +153,15 @@ private:
String aStrChildContent;
String aStrChildOrgContent;
String aStrEmpty;
- ULONG nAcceptCount;
- ULONG nRejectCount;
- BOOL bAcceptEnableFlag;
- BOOL bRejectEnableFlag;
- BOOL bNeedsUpdate;
- BOOL bIgnoreMsg;
- BOOL bNoSelection;
- BOOL bHasFilterEntry;
- BOOL bUseColor;
+ sal_uLong nAcceptCount;
+ sal_uLong nRejectCount;
+ sal_Bool bAcceptEnableFlag;
+ sal_Bool bRejectEnableFlag;
+ sal_Bool bNeedsUpdate;
+ sal_Bool bIgnoreMsg;
+ sal_Bool bNoSelection;
+ sal_Bool bHasFilterEntry;
+ sal_Bool bUseColor;
//ScChgTrackExps aExpandArray;
void Init();
@@ -190,51 +190,51 @@ private:
protected:
virtual void Resize();
- virtual BOOL Close();
+ virtual sal_Bool Close();
void RejectFiltered();
void AcceptFiltered();
- BOOL IsValidAction(const ScChangeAction* pScChangeAction);
+ sal_Bool IsValidAction(const ScChangeAction* pScChangeAction);
String* MakeTypeString(ScChangeActionType eType);
SvLBoxEntry* InsertChangeAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState,
- SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE,
- BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND);
+ SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=false,
+ sal_Bool bDisabled=false,sal_uLong nPos=LIST_APPEND);
SvLBoxEntry* InsertFilteredAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState,
- SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE,
- BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND);
+ SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=false,
+ sal_Bool bDisabled=false,sal_uLong nPos=LIST_APPEND);
SvLBoxEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
- SvLBoxEntry* pParent,ULONG nSpecial);
+ SvLBoxEntry* pParent,sal_uLong nSpecial);
void GetDependents( const ScChangeAction* pScChangeAction,
ScChangeActionTable& aActionTable,
SvLBoxEntry* pEntry);
- BOOL InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
+ sal_Bool InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
- BOOL InsertAcceptedORejected(SvLBoxEntry* pParent);
+ sal_Bool InsertAcceptedORejected(SvLBoxEntry* pParent);
- BOOL InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable,
+ sal_Bool InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable,
SvLBoxEntry* pParent);
- BOOL InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
+ sal_Bool InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
- void AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, ULONG nEndAction,
- ULONG nPos=LIST_APPEND);
+ void AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction,
+ sal_uLong nPos=LIST_APPEND);
- void RemoveEntrys(ULONG nStartAction,ULONG nEndAction);
- void UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,ULONG nEndAction);
+ void RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction);
+ void UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction);
void UpdateView();
void ClearView();
- BOOL Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
- SvLBoxEntry* pEntry, BOOL bFilter=FALSE);
+ sal_Bool Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
+ SvLBoxEntry* pEntry, sal_Bool bFilter=false);
public:
ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index fa49f6dea5cf..c1c2ec29029c 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -63,7 +63,7 @@ class ScFormulaReferenceHelper
SfxBindings* m_pBindings;
::std::auto_ptr<Accelerator>
pAccel; // fuer Enter/Escape
- BOOL* pHiddenMarks; // Merkfeld fuer versteckte Controls
+ sal_Bool* pHiddenMarks; // Merkfeld fuer versteckte Controls
SCTAB nRefTab; // used for ShowReference
String sOldDialogText; // Originaltitel des Dialogfensters
@@ -72,9 +72,9 @@ class ScFormulaReferenceHelper
Size aOldEditSize; // Originalgroesse des Eingabefeldes
Point aOldButtonPos; // Originalpositiuon des Buttons
- BOOL bEnableColorRef;
- BOOL bHighLightRef;
- BOOL bAccInserted;
+ sal_Bool bEnableColorRef;
+ sal_Bool bHighLightRef;
+ sal_Bool bAccInserted;
DECL_LINK( AccelSelectHdl, Accelerator* );
@@ -89,25 +89,25 @@ public:
void ShowReference( const XubString& rStr );
void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- void HideReference( BOOL bDoneRefMode = TRUE );
+ void HideReference( sal_Bool bDoneRefMode = sal_True );
void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- void RefInputDone( BOOL bForced = FALSE );
+ void RefInputDone( sal_Bool bForced = false );
void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
inline void SetWindow(Window* _pWindow) { m_pWindow = _pWindow; }
- BOOL DoClose( USHORT nId );
- void SetDispatcherLock( BOOL bLock );
- void EnableSpreadsheets( BOOL bFlag = TRUE, BOOL bChilds = TRUE );
+ sal_Bool DoClose( sal_uInt16 nId );
+ void SetDispatcherLock( sal_Bool bLock );
+ void EnableSpreadsheets( sal_Bool bFlag = sal_True, sal_Bool bChilds = sal_True );
void ViewShellChanged( ScTabViewShell* pScViewShell );
- static void enableInput(BOOL _bInput);
+ static void enableInput(sal_Bool _bInput);
protected:
Window * GetWindow(){ return m_pWindow; }
public:
bool CanInputStart( const formula::RefEdit *pEdit ){ return !!pEdit; }
- bool CanInputDone( BOOL bForced ){ return pRefEdit && (bForced || !pRefBtn); }
+ bool CanInputDone( sal_Bool bForced ){ return pRefEdit && (bForced || !pRefBtn); }
};
//============================================================================
@@ -138,15 +138,15 @@ private:
protected:
- virtual BOOL DoClose( USHORT nId );
+ virtual sal_Bool DoClose( sal_uInt16 nId );
- void SetDispatcherLock( BOOL bLock );
+ void SetDispatcherLock( sal_Bool bLock );
//Overwrite TWindow will implemented by ScRefHdlrImplBase
//virtual long PreNotify( NotifyEvent& rNEvt );
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
void ShowSimpleReference( const XubString& rStr );
void ShowFormulaReference( const XubString& rStr );
@@ -154,18 +154,18 @@ protected:
public:
ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW,
- Window* pParent, USHORT nResId*/, bool bBindRef );
+ Window* pParent, sal_uInt16 nResId*/, bool bBindRef );
virtual ~ScRefHandler();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
virtual void AddRefEntry();
- virtual BOOL IsRefInputMode() const;
- virtual BOOL IsTableLocked() const;
- virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const;
+ virtual sal_Bool IsRefInputMode() const;
+ virtual sal_Bool IsTableLocked() const;
+ virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const;
virtual void ShowReference( const XubString& rStr );
- virtual void HideReference( BOOL bDoneRefMode = TRUE );
+ virtual void HideReference( sal_Bool bDoneRefMode = sal_True );
virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
@@ -175,7 +175,7 @@ public:
//SfxBindings& GetBindings();
virtual void SetActive() = 0;
-// virtual BOOL Close();
+// virtual sal_Bool Close();
//Overwrite TWindow will implemented by ScRefHdlrImplBase
//virtual void StateChanged( StateChangedType nStateChange );
@@ -183,7 +183,7 @@ public:
bool EnterRefMode();
bool LeaveRefMode();
inline bool CanInputStart( const formula::RefEdit *pEdit );
- inline bool CanInputDone( BOOL bForced );
+ inline bool CanInputDone( sal_Bool bForced );
};
//============================================================================
@@ -212,12 +212,12 @@ private:
template<class TWindow, bool bBindRef>
template<class TBindings, class TChildWindow, class TParentWindow, class TResId>
ScRefHdlrImplBase<TWindow, bBindRef>::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW,
- TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<USHORT>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+ TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<sal_uInt16>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
template<class TWindow, bool bBindRef >
template<class TParentWindow, class TResId, class TArg>
ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, TResId nResIdP, const TArg &rArg, SfxBindings *pB /*= NULL*/ )
-:TWindow( pParent, ScResId(static_cast<USHORT>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+:TWindow( pParent, ScResId(static_cast<sal_uInt16>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
template<class TWindow, bool bBindRef >
ScRefHdlrImplBase<TWindow,bBindRef>::~ScRefHdlrImplBase(){}
@@ -231,12 +231,12 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase<TBase, bBindRef >
template<class T1, class T2, class T3, class T4>
ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4 )
{
- SC_MOD()->RegisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ SC_MOD()->RegisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(this)->SLOTID ), this );
}
~ScRefHdlrImpl()
{
- SC_MOD()->UnregisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ SC_MOD()->UnregisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(this)->SLOTID ), this );
}
};
//============================================================================
@@ -252,7 +252,7 @@ inline bool ScRefHandler::CanInputStart( const formula::RefEdit *pEdit )
return m_aHelper.CanInputStart( pEdit );
}
-inline bool ScRefHandler::CanInputDone( BOOL bForced )
+inline bool ScRefHandler::CanInputDone( sal_Bool bForced )
{
return m_aHelper.CanInputDone( bForced );
}
diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
index c1ba5b4726a0..c1a7eeb9aa65 100644
--- a/sc/source/ui/inc/areasave.hxx
+++ b/sc/source/ui/inc/areasave.hxx
@@ -45,7 +45,7 @@ private:
String aOptions;
String aSourceArea;
ScRange aDestArea;
- ULONG nRefresh;
+ sal_uLong nRefresh;
public:
ScAreaLinkSaver( const ScAreaLink& rSource );
@@ -54,8 +54,8 @@ public:
virtual ScDataObject* Clone() const;
- BOOL IsEqual( const ScAreaLink& rCompare ) const;
- BOOL IsEqualSource( const ScAreaLink& rCompare ) const;
+ sal_Bool IsEqual( const ScAreaLink& rCompare ) const;
+ sal_Bool IsEqualSource( const ScAreaLink& rCompare ) const;
void WriteToLink( ScAreaLink& rLink ) const;
void InsertNewLink( ScDocument* pDoc ) const;
@@ -71,9 +71,9 @@ public:
virtual ScDataObject* Clone() const;
- ScAreaLinkSaver* operator[](USHORT nIndex) const {return (ScAreaLinkSaver*)At(nIndex);}
+ ScAreaLinkSaver* operator[](sal_uInt16 nIndex) const {return (ScAreaLinkSaver*)At(nIndex);}
- BOOL IsEqual( const ScDocument* pDoc ) const;
+ sal_Bool IsEqual( const ScDocument* pDoc ) const;
void Restore( ScDocument* pDoc ) const;
// returns NULL if empty
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index ed579ea065b7..fafd293a2a4b 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -52,25 +52,25 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
virtual void AddRefEntry();
- virtual BOOL IsTableLocked() const;
+ virtual sal_Bool IsTableLocked() const;
virtual void SetActive();
virtual void Deactivate();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
- ListBox aLbPrintArea;
FixedLine aFlPrintArea;
+ ListBox aLbPrintArea;
formula::RefEdit aEdPrintArea;
formula::RefButton aRbPrintArea;
- ListBox aLbRepeatRow;
FixedLine aFlRepeatRow;
+ ListBox aLbRepeatRow;
formula::RefEdit aEdRepeatRow;
formula::RefButton aRbRepeatRow;
- ListBox aLbRepeatCol;
FixedLine aFlRepeatCol;
+ ListBox aLbRepeatCol;
formula::RefEdit aEdRepeatCol;
formula::RefButton aRbRepeatCol;
@@ -78,7 +78,7 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
formula::RefEdit* pRefInputEdit;
ScDocument* pDoc;
ScViewData* pViewData;
@@ -87,9 +87,9 @@ private:
#ifdef _AREASDLG_CXX
private:
void Impl_Reset();
- BOOL Impl_CheckRefStrings();
+ sal_Bool Impl_CheckRefStrings();
void Impl_FillLists();
- BOOL Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
+ sal_Bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
// Handler:
DECL_LINK( Impl_SelectHdl, ListBox* );
diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx
index 7581f7f8d072..7fb3c937538d 100644
--- a/sc/source/ui/inc/asciiopt.hxx
+++ b/sc/source/ui/inc/asciiopt.hxx
@@ -48,19 +48,19 @@
class SC_DLLPUBLIC ScAsciiOptions
{
private:
- BOOL bFixedLen;
+ sal_Bool bFixedLen;
String aFieldSeps;
- BOOL bMergeFieldSeps;
+ sal_Bool bMergeFieldSeps;
bool bQuotedFieldAsText;
bool bDetectSpecialNumber;
sal_Unicode cTextSep;
CharSet eCharSet;
LanguageType eLang;
- BOOL bCharSetSystem;
+ sal_Bool bCharSetSystem;
long nStartRow;
- USHORT nInfoCount;
+ sal_uInt16 nInfoCount;
xub_StrLen* pColStart; //! TODO replace with vector
- BYTE* pColFormat; //! TODO replace with vector
+ sal_uInt8* pColFormat; //! TODO replace with vector
public:
ScAsciiOptions();
@@ -71,7 +71,7 @@ public:
ScAsciiOptions& operator=( const ScAsciiOptions& rCpy );
- BOOL operator==( const ScAsciiOptions& rCmp ) const;
+ sal_Bool operator==( const ScAsciiOptions& rCmp ) const;
void ReadFromString( const String& rString );
String WriteToString() const;
@@ -79,31 +79,31 @@ public:
void InterpretColumnList( const String& rString );
CharSet GetCharSet() const { return eCharSet; }
- BOOL GetCharSetSystem() const { return bCharSetSystem; }
+ sal_Bool GetCharSetSystem() const { return bCharSetSystem; }
const String& GetFieldSeps() const { return aFieldSeps; }
- BOOL IsMergeSeps() const { return bMergeFieldSeps; }
+ sal_Bool IsMergeSeps() const { return bMergeFieldSeps; }
bool IsQuotedAsText() const { return bQuotedFieldAsText; }
bool IsDetectSpecialNumber() const { return bDetectSpecialNumber; }
sal_Unicode GetTextSep() const { return cTextSep; }
- BOOL IsFixedLen() const { return bFixedLen; }
- USHORT GetInfoCount() const { return nInfoCount; }
+ sal_Bool IsFixedLen() const { return bFixedLen; }
+ sal_uInt16 GetInfoCount() const { return nInfoCount; }
const xub_StrLen* GetColStart() const { return pColStart; }
- const BYTE* GetColFormat() const { return pColFormat; }
+ const sal_uInt8* GetColFormat() const { return pColFormat; }
long GetStartRow() const { return nStartRow; }
LanguageType GetLanguage() const { return eLang; }
void SetCharSet( CharSet eNew ) { eCharSet = eNew; }
- void SetCharSetSystem( BOOL bSet ) { bCharSetSystem = bSet; }
- void SetFixedLen( BOOL bSet ) { bFixedLen = bSet; }
+ void SetCharSetSystem( sal_Bool bSet ) { bCharSetSystem = bSet; }
+ void SetFixedLen( sal_Bool bSet ) { bFixedLen = bSet; }
void SetFieldSeps( const String& rStr ) { aFieldSeps = rStr; }
- void SetMergeSeps( BOOL bSet ) { bMergeFieldSeps = bSet; }
+ void SetMergeSeps( sal_Bool bSet ) { bMergeFieldSeps = bSet; }
void SetQuotedAsText(bool bSet) { bQuotedFieldAsText = bSet; }
void SetDetectSpecialNumber(bool bSet) { bDetectSpecialNumber = bSet; }
void SetTextSep( sal_Unicode c ) { cTextSep = c; }
void SetStartRow( long nRow) { nStartRow= nRow; }
void SetLanguage(LanguageType e) { eLang = e; }
- void SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat );
+ void SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat );
void SetColumnInfo( const ScCsvExpDataVec& rDataVec );
};
diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx
index 07a2ed16726e..8f1bae4260ff 100644
--- a/sc/source/ui/inc/attrdlg.hxx
+++ b/sc/source/ui/inc/attrdlg.hxx
@@ -55,7 +55,7 @@ public:
~ScAttrDlg();
protected:
- virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+ virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage );
private:
DECL_LINK( OkHandler, void* ); // fuer DoppelClick-Beenden in TabPages
diff --git a/sc/source/ui/inc/auditsh.hxx b/sc/source/ui/inc/auditsh.hxx
index 20d9702aeefa..0d11a49f517d 100644
--- a/sc/source/ui/inc/auditsh.hxx
+++ b/sc/source/ui/inc/auditsh.hxx
@@ -40,7 +40,7 @@ class ScAuditingShell : public SfxShell
{
private:
ScViewData* pViewData;
- USHORT nFunction;
+ sal_uInt16 nFunction;
public:
TYPEINFO();
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index d8952ee2cbf6..408e5a892107 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -71,7 +71,7 @@ private:
VirtualDevice aVD;
SvtScriptedTextHelper aScriptedText;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBreakIter;
- BOOL bFitWidth;
+ sal_Bool bFitWidth;
svx::frame::Array maArray; /// Implementation to draw the frame borders.
bool mbRTL;
Size aPrvSize;
@@ -90,7 +90,7 @@ private:
//-------------------------------------------
SC_DLLPRIVATE void Init ();
SC_DLLPRIVATE void DoPaint ( const Rectangle& rRect );
- SC_DLLPRIVATE void CalcCellArray ( BOOL bFitWidth );
+ SC_DLLPRIVATE void CalcCellArray ( sal_Bool bFitWidth );
SC_DLLPRIVATE void CalcLineMap ();
SC_DLLPRIVATE void PaintCells ();
@@ -98,7 +98,7 @@ private:
conjunction with class svx::frame::Array (svx/framelinkarray.hxx), which
expects size_t coordinates. */
- SC_DLLPRIVATE USHORT GetFormatIndex( size_t nCol, size_t nRow ) const;
+ SC_DLLPRIVATE sal_uInt16 GetFormatIndex( size_t nCol, size_t nRow ) const;
SC_DLLPRIVATE const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const;
SC_DLLPRIVATE const SvxLineItem& GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const;
@@ -106,26 +106,26 @@ private:
SC_DLLPRIVATE void DrawStrings();
SC_DLLPRIVATE void DrawBackground();
- SC_DLLPRIVATE void MakeFonts ( USHORT nIndex,
+ SC_DLLPRIVATE void MakeFonts ( sal_uInt16 nIndex,
Font& rFont,
Font& rCJKFont,
Font& rCTLFont );
- SC_DLLPRIVATE String MakeNumberString( String cellString, BOOL bAddDec );
+ SC_DLLPRIVATE String MakeNumberString( String cellString, sal_Bool bAddDec );
SC_DLLPRIVATE void DrawFrameLine ( const SvxBorderLine& rLineD,
Point from,
Point to,
- BOOL bHorizontal,
+ sal_Bool bHorizontal,
const SvxBorderLine& rLineLT,
const SvxBorderLine& rLineL,
const SvxBorderLine& rLineLB,
const SvxBorderLine& rLineRT,
const SvxBorderLine& rLineR,
const SvxBorderLine& rLineRB );
- SC_DLLPRIVATE void CheckPriority ( USHORT nCurLine,
+ SC_DLLPRIVATE void CheckPriority ( sal_uInt16 nCurLine,
AutoFmtLine eLine,
SvxBorderLine& rLine );
- SC_DLLPRIVATE void GetLines ( USHORT nIndex, AutoFmtLine eLine,
+ SC_DLLPRIVATE void GetLines ( sal_uInt16 nIndex, AutoFmtLine eLine,
SvxBorderLine& rLineD,
SvxBorderLine& rLineLT,
SvxBorderLine& rLineL,
diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx
index 3dcf57fbf39c..c45be3bb0a78 100644
--- a/sc/source/ui/inc/autostyl.hxx
+++ b/sc/source/ui/inc/autostyl.hxx
@@ -47,13 +47,13 @@ private:
ScDocShell* pDocSh;
Timer aTimer;
Timer aInitTimer;
- ULONG nTimerStart;
+ sal_uLong nTimerStart;
boost::ptr_vector<ScAutoStyleData> aEntries;
boost::ptr_vector<ScAutoStyleInitData> aInitials;
void ExecuteEntries();
- void AdjustEntries(ULONG nDiff);
- void StartTimer(ULONG nNow);
+ void AdjustEntries(sal_uLong nDiff);
+ void StartTimer(sal_uLong nNow);
DECL_LINK( TimerHdl, Timer* );
DECL_LINK( InitHdl, Timer* );
@@ -62,8 +62,8 @@ public:
~ScAutoStyleList();
void AddInitial( const ScRange& rRange, const String& rStyle1,
- ULONG nTimeout, const String& rStyle2 );
- void AddEntry( ULONG nTimeout, const ScRange& rRange, const String& rStyle );
+ sal_uLong nTimeout, const String& rStyle2 );
+ void AddEntry( sal_uLong nTimeout, const ScRange& rRange, const String& rStyle );
void ExecuteAllNow();
};
diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx
index b74fec6276ae..dc588ebb02f8 100644
--- a/sc/source/ui/inc/cbutton.hxx
+++ b/sc/source/ui/inc/cbutton.hxx
@@ -49,16 +49,16 @@ public:
void Draw( const Point& rAt,
const Size& rSize,
- BOOL bState,
- BOOL bBtnIn = FALSE );
+ sal_Bool bState,
+ sal_Bool bBtnIn = false );
void Draw( const Point& rAt,
- BOOL bState,
- BOOL bBtnIn = FALSE )
+ sal_Bool bState,
+ sal_Bool bBtnIn = false )
{ Draw( rAt, aBtnSize, bState, bBtnIn ); }
- void Draw( BOOL bState,
- BOOL bBtnIn = FALSE )
+ void Draw( sal_Bool bState,
+ sal_Bool bBtnIn = false )
{ Draw( aBtnPos, aBtnSize, bState, bBtnIn ); }
void SetOptSizePixel();
@@ -71,7 +71,7 @@ public:
private:
void ImpDrawArrow( const Rectangle& rRect,
- BOOL bState );
+ sal_Bool bState );
protected:
OutputDevice* pOut;
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index f942f2c49699..6bbdd8ab6e27 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -59,12 +59,12 @@ class ScCellShell: public ScFormatShell
{
private:
CellShell_Impl* pImpl;
- BOOL bPastePossible;
+ sal_Bool bPastePossible;
void GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats );
void ExecuteExternalSource(
const String& _rFile, const String& _rFilter, const String& _rOptions,
- const String& _rSource, ULONG _nRefresh, SfxRequest& _rRequest );
+ const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest );
void ExecuteDataPilotDialog();
diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx
index b4e1ba481ca0..fdc4b191972a 100644
--- a/sc/source/ui/inc/colrowba.hxx
+++ b/sc/source/ui/inc/colrowba.hxx
@@ -51,24 +51,24 @@ public:
~ScColBar();
virtual SCCOLROW GetPos();
- virtual USHORT GetEntrySize( SCCOLROW nEntryNo );
+ virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo );
virtual String GetEntryText( SCCOLROW nEntryNo );
- virtual BOOL IsLayoutRTL(); // only for columns
+ virtual sal_Bool IsLayoutRTL(); // only for columns
- virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize );
+ virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize );
virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd );
- virtual void SetMarking( BOOL bSet );
+ virtual void SetMarking( sal_Bool bSet );
virtual void SelectWindow();
- virtual BOOL IsDisabled();
- virtual BOOL ResizeAllowed();
+ virtual sal_Bool IsDisabled();
+ virtual sal_Bool ResizeAllowed();
virtual void DrawInvert( long nDragPos );
virtual String GetDragHelp( long nVal );
- BOOL UseNumericHeader() const;
+ sal_Bool UseNumericHeader() const;
};
@@ -85,19 +85,19 @@ public:
~ScRowBar();
virtual SCCOLROW GetPos();
- virtual USHORT GetEntrySize( SCCOLROW nEntryNo );
+ virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo );
virtual String GetEntryText( SCCOLROW nEntryNo );
- virtual BOOL IsMirrored(); // only for columns
+ virtual sal_Bool IsMirrored(); // only for columns
virtual SCROW GetHiddenCount( SCROW nEntryNo ); // only for columns
- virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize );
+ virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize );
virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd );
- virtual void SetMarking( BOOL bSet );
+ virtual void SetMarking( sal_Bool bSet );
virtual void SelectWindow();
- virtual BOOL IsDisabled();
- virtual BOOL ResizeAllowed();
+ virtual sal_Bool IsDisabled();
+ virtual sal_Bool ResizeAllowed();
virtual void DrawInvert( long nDragPos );
diff --git a/sc/source/ui/inc/condfrmt.hrc b/sc/source/ui/inc/condfrmt.hrc
index 223e2f8d3918..e1013438d219 100644
--- a/sc/source/ui/inc/condfrmt.hrc
+++ b/sc/source/ui/inc/condfrmt.hrc
@@ -63,6 +63,12 @@
#define FL_SEP1 41
#define FL_SEP2 42
+//IAccessibility2 Implementation 2009-----
+#define LABEL_FORMARTTING_CONDITIONS 5043
+#define LABEL_CONDITIONS 5044
+#define LABEL_CONDITION_VALUE 5045
+//-----IAccessibility2 Implementation 2009
+
#define BTN_OK 31
#define BTN_CANCEL 32
#define BTN_HELP 33
diff --git a/sc/source/ui/inc/condfrmt.hxx b/sc/source/ui/inc/condfrmt.hxx
index 1cb7b8cc83b0..85d7b6e225da 100644
--- a/sc/source/ui/inc/condfrmt.hxx
+++ b/sc/source/ui/inc/condfrmt.hxx
@@ -54,9 +54,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
virtual void AddRefEntry();
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
CheckBox aCbxCond1;
@@ -70,8 +70,6 @@ private:
FixedText aFtCond1Template;
ListBox aLbCond1Template;
PushButton aBtnNew1;
- FixedLine aFlSep1;
-
CheckBox aCbxCond2;
ListBox aLbCond21;
ListBox aLbCond22;
@@ -83,8 +81,6 @@ private:
FixedText aFtCond2Template;
ListBox aLbCond2Template;
PushButton aBtnNew2;
- FixedLine aFlSep2;
-
CheckBox aCbxCond3;
ListBox aLbCond31;
ListBox aLbCond32;
@@ -124,9 +120,10 @@ private:
Size aCond3Size1;
Size aCond3Size2;
Size aCond3Size3;
-
+ FixedLine aFlSep2;
+ FixedLine aFlSep1;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
ScDocument* pDoc;
#ifdef _CONDFRMT_CXX
diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx
index d7ba96ab526a..5dcdd07d62fe 100644
--- a/sc/source/ui/inc/conflictsdlg.hxx
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -50,7 +50,7 @@ enum ScConflictAction
SC_CONFLICT_ACTION_KEEP_OTHER
};
-typedef ::std::vector< ULONG > ScChangeActionList;
+typedef ::std::vector< sal_uLong > ScChangeActionList;
//=============================================================================
@@ -63,8 +63,8 @@ struct ScConflictsListEntry
ScChangeActionList maSharedActions;
ScChangeActionList maOwnActions;
- bool HasSharedAction( ULONG nSharedAction ) const;
- bool HasOwnAction( ULONG nOwnAction ) const;
+ bool HasSharedAction( sal_uLong nSharedAction ) const;
+ bool HasOwnAction( sal_uLong nOwnAction ) const;
};
@@ -83,10 +83,10 @@ private:
static void Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap );
public:
- static bool HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction );
+ static bool HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction );
- static ScConflictsListEntry* GetSharedActionEntry( ScConflictsList& rConflictsList, ULONG nSharedAction );
- static ScConflictsListEntry* GetOwnActionEntry( ScConflictsList& rConflictsList, ULONG nOwnAction );
+ static ScConflictsListEntry* GetSharedActionEntry( ScConflictsList& rConflictsList, sal_uLong nSharedAction );
+ static ScConflictsListEntry* GetOwnActionEntry( ScConflictsList& rConflictsList, sal_uLong nOwnAction );
static void TransformConflictsList( ScConflictsList& rConflictsList,
ScChangeActionMergeMap* pSharedMap, ScChangeActionMergeMap* pOwnMap );
@@ -101,19 +101,19 @@ class ScConflictsFinder
{
private:
ScChangeTrack* mpTrack;
- ULONG mnStartShared;
- ULONG mnEndShared;
- ULONG mnStartOwn;
- ULONG mnEndOwn;
+ sal_uLong mnStartShared;
+ sal_uLong mnEndShared;
+ sal_uLong mnStartOwn;
+ sal_uLong mnEndOwn;
ScConflictsList& mrConflictsList;
static bool DoActionsIntersect( const ScChangeAction* pAction1, const ScChangeAction* pAction2 );
ScConflictsListEntry* GetIntersectingEntry( const ScChangeAction* pAction ) const;
- ScConflictsListEntry* GetEntry( ULONG nSharedAction, const ScChangeActionList& rOwnActions );
+ ScConflictsListEntry* GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions );
public:
- ScConflictsFinder( ScChangeTrack* pTrack, ULONG nStartShared, ULONG nEndShared,
- ULONG nStartOwn, ULONG nEndOwn, ScConflictsList& rConflictsList );
+ ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared,
+ sal_uLong nStartOwn, sal_uLong nEndOwn, ScConflictsList& rConflictsList );
virtual ~ScConflictsFinder();
bool Find();
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index d90a871e8c36..fa4fe9e41651 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -53,10 +53,10 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const { return TRUE; }
+ virtual sal_Bool IsRefInputMode() const { return sal_True; }
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
protected:
virtual void Deactivate();
@@ -100,17 +100,17 @@ private:
ScDocument* pDoc;
ScRangeUtil* pRangeUtil;
ScAreaData* pAreaData;
- USHORT nAreaDataCount;
- USHORT nWhichCons;
+ sal_uInt16 nAreaDataCount;
+ sal_uInt16 nWhichCons;
formula::RefEdit* pRefInputEdit;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
#ifdef _CONSDLG_CXX
private:
void Init ();
void FillAreaLists ();
- BOOL VerifyEdit ( formula::RefEdit* pEd );
+ sal_Bool VerifyEdit ( formula::RefEdit* pEd );
DECL_LINK( OkHdl, void* );
DECL_LINK( ClickHdl, PushButton* );
@@ -118,8 +118,8 @@ private:
DECL_LINK( ModifyHdl, formula::RefEdit* );
DECL_LINK( SelectHdl, ListBox* );
- ScSubTotalFunc LbPosToFunc( USHORT nPos );
- USHORT FuncToLbPos( ScSubTotalFunc eFunc );
+ ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos );
+ sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc );
#endif // _CONSDLG_CXX
};
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 03924cc998cf..1de37c004126 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -51,7 +51,7 @@ class ScAreaLink;
#define SC_CONTENT_DRAWING 8
#define SC_CONTENT_COUNT 9
-const ULONG SC_CONTENT_NOCHILD = ~0UL;
+const sal_uLong SC_CONTENT_NOCHILD = ~0UL;
//
// TreeListBox fuer Inhalte
@@ -62,24 +62,24 @@ class ScContentTree : public SvTreeListBox
ScNavigatorDlg* pParentWindow;
ImageList aEntryImages;
SvLBoxEntry* pRootNodes[SC_CONTENT_COUNT];
- USHORT nRootType; // als Root eingestellt
+ sal_uInt16 nRootType; // als Root eingestellt
String aManualDoc; // im Navigator umgeschaltet (Title)
- BOOL bHiddenDoc; // verstecktes aktiv?
+ sal_Bool bHiddenDoc; // verstecktes aktiv?
String aHiddenName; // URL zum Laden
String aHiddenTitle; // fuer Anzeige
ScDocument* pHiddenDocument; // temporaer
- USHORT pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge
+ sal_uInt16 pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge
- static BOOL bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
+ static sal_Bool bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
ScDocShell* GetManualOrCurrent();
- void InitRoot(USHORT nType);
- void ClearType(USHORT nType);
+ void InitRoot(sal_uInt16 nType);
+ void ClearType(sal_uInt16 nType);
void ClearAll();
- void InsertContent( USHORT nType, const String& rValue );
- void GetDrawNames( USHORT nType );
+ void InsertContent( sal_uInt16 nType, const String& rValue );
+ void GetDrawNames( sal_uInt16 nType );
void GetTableNames();
void GetAreaNames();
@@ -90,24 +90,24 @@ class ScContentTree : public SvTreeListBox
void GetDrawingNames();
void GetNoteStrings();
- static bool IsPartOfType( USHORT nContentType, USHORT nObjIdentifier );
+ static bool IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier );
- BOOL DrawNamesChanged( USHORT nType );
- BOOL NoteStringsChanged();
+ sal_Bool DrawNamesChanged( sal_uInt16 nType );
+ sal_Bool NoteStringsChanged();
- ScAddress GetNotePos( ULONG nIndex );
- const ScAreaLink* GetLink( ULONG nIndex );
+ ScAddress GetNotePos( sal_uLong nIndex );
+ const ScAreaLink* GetLink( sal_uLong nIndex );
/** Returns the indexes of the specified listbox entry.
@param rnRootIndex Root index of specified entry is returned.
@param rnChildIndex Index of the entry inside its root is returned (or SC_CONTENT_NOCHILD if entry is root).
@param pEntry The entry to examine. */
- void GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const;
+ void GetEntryIndexes( sal_uInt16& rnRootIndex, sal_uLong& rnChildIndex, SvLBoxEntry* pEntry ) const;
/** Returns the child index of the specified listbox entry.
@param pEntry The entry to examine or NULL for the selected entry.
@return Index of the entry inside its root or SC_CONTENT_NOCHILD if entry is root. */
- ULONG GetChildIndex( SvLBoxEntry* pEntry ) const;
+ sal_uLong GetChildIndex( SvLBoxEntry* pEntry ) const;
void DoDrag();
@@ -117,8 +117,8 @@ class ScContentTree : public SvTreeListBox
DECL_STATIC_LINK( ScContentTree, ExecDragHdl, void* );
protected:
-// virtual BOOL Drop( const DropEvent& rEvt );
-// virtual BOOL QueryDrop( DropEvent& rEvt );
+// virtual sal_Bool Drop( const DropEvent& rEvt );
+// virtual sal_Bool QueryDrop( DropEvent& rEvt );
using SvTreeListBox::ExecuteDrop;
@@ -137,18 +137,18 @@ public:
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void KeyInput( const KeyEvent& rKEvt );
- void InitWindowBits( BOOL bButtons );
+ void InitWindowBits( sal_Bool bButtons );
- void Refresh( USHORT nType = 0 );
+ void Refresh( sal_uInt16 nType = 0 );
void ToggleRoot();
- void SetRootType( USHORT nNew );
- USHORT GetRootType() const { return nRootType; }
+ void SetRootType( sal_uInt16 nNew );
+ sal_uInt16 GetRootType() const { return nRootType; }
void ActiveDocChanged();
void ResetManualDoc();
void SetManualDoc(const String& rName);
- BOOL LoadFile(const String& rUrl);
+ sal_Bool LoadFile(const String& rUrl);
void SelectDoc(const String& rName);
const String& GetHiddenTitle() const { return aHiddenTitle; }
@@ -158,7 +158,7 @@ public:
/** Stores the current listbox state in the navigator settings. */
void StoreSettings() const;
- static BOOL IsInDrag() { return bIsInDrag; }
+ static sal_Bool IsInDrag() { return bIsInDrag; }
};
diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx
index fcf692500351..87662e0f3da1 100644
--- a/sc/source/ui/inc/corodlg.hxx
+++ b/sc/source/ui/inc/corodlg.hxx
@@ -42,8 +42,8 @@ class ScColRowLabelDlg : public ModalDialog
{
public:
ScColRowLabelDlg( Window* pParent,
- BOOL bCol = FALSE,
- BOOL bRow = FALSE )
+ sal_Bool bCol = false,
+ sal_Bool bRow = false )
: ModalDialog( pParent, ScResId( RID_SCDLG_CHARTCOLROW ) ),
aFlColRow ( this, ScResId(6) ),
aBtnRow ( this, ScResId(2) ),
@@ -57,8 +57,8 @@ public:
aBtnRow.Check( bRow );
}
- BOOL IsCol() { return aBtnCol.IsChecked(); }
- BOOL IsRow() { return aBtnRow.IsChecked(); }
+ sal_Bool IsCol() { return aBtnCol.IsChecked(); }
+ sal_Bool IsRow() { return aBtnRow.IsChecked(); }
private:
FixedLine aFlColRow;
diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx
index 544926756286..648544ee117f 100644
--- a/sc/source/ui/inc/crdlg.hxx
+++ b/sc/source/ui/inc/crdlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include "scui_def.hxx"
@@ -43,7 +43,7 @@ public:
ScColOrRowDlg( Window* pParent,
const String& rStrTitle,
const String& rStrLabel,
- BOOL bColDefault = TRUE );
+ sal_Bool bColDefault = sal_True );
~ScColOrRowDlg();
private:
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
index 8a8540bbd5d8..7c5c58b9bc5d 100644
--- a/sc/source/ui/inc/crnrdlg.hxx
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -51,9 +51,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlAssign;
@@ -84,15 +84,15 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
#ifdef _CRNRDLG_CXX
private:
void Init ();
void UpdateNames ();
- void UpdateRangeData ( const ScRange& rRange, BOOL bColName );
- void SetColRowData( const ScRange& rLabelRange,BOOL bRef=FALSE);
- void AdjustColRowData( const ScRange& rDataRange,BOOL bRef=FALSE);
+ void UpdateRangeData ( const ScRange& rRange, sal_Bool bColName );
+ void SetColRowData( const ScRange& rLabelRange,sal_Bool bRef=false);
+ void AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef=false);
DECL_LINK( CancelBtnHdl, void * );
DECL_LINK( OkBtnHdl, void * );
DECL_LINK( AddBtnHdl, void * );
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index 3d2d01da8b0f..c0c1f99cc5da 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -78,7 +78,7 @@ public:
virtual void SetPosSizePixel(
long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
+ sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
/** Apply current layout data to the ruler. */
void ApplyLayout( const ScCsvLayoutData& rOldData );
@@ -90,7 +90,7 @@ private:
SC_DLLPRIVATE void InitSizeData();
/** Moves cursor to a new position.
- @param bScroll TRUE = The method may scroll the ruler. */
+ @param bScroll sal_True = The method may scroll the ruler. */
SC_DLLPRIVATE void MoveCursor( sal_Int32 nPos, bool bScroll = true );
/** Moves cursor to the given direction. */
SC_DLLPRIVATE void MoveCursorRel( ScMoveMode eDir );
@@ -151,7 +151,7 @@ private:
/** Moves tracking to a new position. */
SC_DLLPRIVATE void MoveMouseTracking( sal_Int32 nPos );
/** Applies tracking action for the current tracking position.
- @param bApply TRUE = apply action, FALSE = cancel action. */
+ @param bApply sal_True = apply action, sal_False = cancel action. */
SC_DLLPRIVATE void EndMouseTracking( bool bApply );
// painting ---------------------------------------------------------------
diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx
index 6c3ba731a342..54eefe20f520 100644
--- a/sc/source/ui/inc/dapitype.hxx
+++ b/sc/source/ui/inc/dapitype.hxx
@@ -52,7 +52,7 @@ private:
HelpButton aBtnHelp;
public:
- ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal );
+ ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal );
~ScDataPilotSourceTypeDlg();
bool IsDatabase() const;
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
index b9a338ff0289..5742e7ac8550 100644
--- a/sc/source/ui/inc/datafdlg.hxx
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -81,7 +81,7 @@ private:
SCROW nStartRow;
SCROW nEndRow;
SCTAB nTab;
- BOOL bNoSelection;
+ sal_Bool bNoSelection;
FixedText** pFixedTexts;
Edit** pEdits;
diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx
index aad57b0502f1..132eb9a3750b 100644
--- a/sc/source/ui/inc/dbdocfun.hxx
+++ b/sc/source/ui/inc/dbdocfun.hxx
@@ -82,42 +82,42 @@ public:
void UpdateImport( const String& rTarget, const String& rDBName,
const String& rTableName, const String& rStatement,
- BOOL bNative, BYTE nType,
+ sal_Bool bNative, sal_uInt8 nType,
const ::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet >& xResultSet,
const SbaSelectionList* pSelection );
- BOOL DoImport( SCTAB nTab, const ScImportParam& rParam,
+ sal_Bool DoImport( SCTAB nTab, const ScImportParam& rParam,
const ::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet >& xResultSet,
- const SbaSelectionList* pSelection, BOOL bRecord,
- BOOL bAddrInsert = FALSE );
+ const SbaSelectionList* pSelection, sal_Bool bRecord,
+ sal_Bool bAddrInsert = false );
- BOOL DoImportUno( const ScAddress& rPos,
+ sal_Bool DoImportUno( const ScAddress& rPos,
const com::sun::star::uno::Sequence<
com::sun::star::beans::PropertyValue>& aArgs );
static void ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame );
- BOOL Sort( SCTAB nTab, const ScSortParam& rSortParam,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool Sort( SCTAB nTab, const ScSortParam& rSortParam,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- SC_DLLPUBLIC BOOL Query( SCTAB nTab, const ScQueryParam& rQueryParam,
- const ScRange* pAdvSource, BOOL bRecord, BOOL bApi );
+ SC_DLLPUBLIC sal_Bool Query( SCTAB nTab, const ScQueryParam& rQueryParam,
+ const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi );
- BOOL DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
+ sal_Bool DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
const ScSortParam* pForceNewSort,
- BOOL bRecord, BOOL bApi );
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL AddDBRange( const String& rName, const ScRange& rRange, BOOL bApi );
- BOOL DeleteDBRange( const String& rName, BOOL bApi );
- BOOL RenameDBRange( const String& rOld, const String& rNew, BOOL bApi );
- BOOL ModifyDBData( const ScDBData& rNewData, BOOL bApi ); // Name unveraendert
+ sal_Bool AddDBRange( const String& rName, const ScRange& rRange, sal_Bool bApi );
+ sal_Bool DeleteDBRange( const String& rName, sal_Bool bApi );
+ sal_Bool RenameDBRange( const String& rOld, const String& rNew, sal_Bool bApi );
+ sal_Bool ModifyDBData( const ScDBData& rNewData, sal_Bool bApi ); // Name unveraendert
- BOOL RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi );
+ sal_Bool RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi );
- BOOL DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
- BOOL bRecord, BOOL bApi, BOOL bAllowMove = FALSE );
+ sal_Bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
+ sal_Bool bRecord, sal_Bool bApi, sal_Bool bAllowMove = false );
};
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index 6c04731e341f..823b4509fcc5 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -58,37 +58,37 @@ public:
// nur UISort wiederholt bei Bedarf die Teilergebnisse
void UISort( const ScSortParam& rSortParam,
- BOOL bRecord = TRUE );
+ sal_Bool bRecord = sal_True );
void Sort( const ScSortParam& rSortParam,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam,
- const ScRange* pAdvSource, BOOL bRecord );
- void DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord = TRUE,
+ const ScRange* pAdvSource, sal_Bool bRecord );
+ void DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord = sal_True,
const ScSortParam* pForceNewSort = NULL );
void ToggleAutoFilter();
void HideAutoFilter();
- void RepeatDB( BOOL bRecord = TRUE );
+ void RepeatDB( sal_Bool bRecord = sal_True );
- BOOL ImportData( const ScImportParam& rParam, BOOL bRecord = TRUE );
+ sal_Bool ImportData( const ScImportParam& rParam, sal_Bool bRecord = sal_True );
void GotoDBArea( const String& rDBName );
// DB-Bereich vom Cursor
- ScDBData* GetDBData( BOOL bMarkArea = TRUE, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP, bool bShrinkToData = false, bool bExpandRows = false );
+ ScDBData* GetDBData( sal_Bool bMarkArea = true, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP, bool bShrinkToData = false, bool bExpandRows = false );
void NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& rDelAreaList );
- void Consolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE );
+ void Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True );
- bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable,
- const ScDPObject& rSource, BOOL bApi = FALSE );
+ bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, sal_Bool bNewTable,
+ const ScDPObject& rSource, sal_Bool bApi = false );
void DeletePivotTable();
void RecalcPivotTable();
- BOOL HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts );
- BOOL HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo );
+ sal_Bool HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts );
+ sal_Bool HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo );
void GroupDataPilot();
void DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nParts );
void NumGroupDataPilot( const ScDPNumGroupInfo& rInfo );
@@ -96,35 +96,35 @@ public:
void DataPilotInput( const ScAddress& rPos, const String& rString );
bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = NULL );
- BOOL DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
+ sal_Bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
- BOOL HasSelectionForDrillDown( USHORT& rOrientation );
- void SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName = NULL );
+ sal_Bool HasSelectionForDrillDown( sal_uInt16& rOrientation );
+ void SetDataPilotDetails( sal_Bool bShow, const String* pNewDimensionName = NULL );
void ShowDataPilotSourceData( ScDPObject& rDPObj,
const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::DataPilotFieldFilter >& rFilters );
- void MakeOutline( BOOL bColumns, BOOL bRecord = TRUE );
- void RemoveOutline( BOOL bColumns, BOOL bRecord = TRUE );
- void RemoveAllOutlines( BOOL bRecord = TRUE );
- void TestRemoveOutline( BOOL& rCol, BOOL& rRow );
+ void MakeOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True );
+ void RemoveOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True );
+ void RemoveAllOutlines( sal_Bool bRecord = sal_True );
+ void TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow );
- void AutoOutline( BOOL bRecord = TRUE );
+ void AutoOutline( sal_Bool bRecord = sal_True );
- void SelectLevel( BOOL bColumns, USHORT nLevel,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
- void ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
- void HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ void SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
+ void ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
+ void HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
- void ShowMarkedOutlines( BOOL bRecord = TRUE );
- void HideMarkedOutlines( BOOL bRecord = TRUE );
- BOOL OutlinePossible(BOOL bHide);
+ void ShowMarkedOutlines( sal_Bool bRecord = sal_True );
+ void HideMarkedOutlines( sal_Bool bRecord = sal_True );
+ sal_Bool OutlinePossible(sal_Bool bHide);
- void UpdateCharts(BOOL bAllCharts = FALSE); // Default: am Cursor
+ void UpdateCharts(sal_Bool bAllCharts = false); // Default: am Cursor
- static USHORT DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts );
+ static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts );
};
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index cd7f757f3937..a2df8f728379 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -53,9 +53,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlName;
@@ -80,7 +80,7 @@ private:
PushButton aBtnRemove;
MoreButton aBtnMore;
- BOOL bSaved;
+ sal_Bool bSaved;
const String aStrAdd; // "Hinzufuegen"
@@ -93,7 +93,7 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- BOOL bRefInputMode;
+ sal_Bool bRefInputMode;
ScAddress::Details aAddrDetails;
ScDBCollection aLocalDbCol;
diff --git a/sc/source/ui/inc/delcldlg.hxx b/sc/source/ui/inc/delcldlg.hxx
index e1bbcc0f9b59..59cb84e5f3a7 100644
--- a/sc/source/ui/inc/delcldlg.hxx
+++ b/sc/source/ui/inc/delcldlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
@@ -53,7 +53,7 @@ private:
public:
- ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove = FALSE );
+ ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove = false );
~ScDeleteCellDlg();
DelCellCmd GetDelCellCmd() const;
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index 15050229b507..d7a203f75dea 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include "global.hxx"
//------------------------------------------------------------------------
@@ -52,21 +52,21 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- BOOL bObjectsDisabled;
+ sal_Bool bObjectsDisabled;
- static BOOL bPreviousAllCheck;
- static USHORT nPreviousChecks;
+ static sal_Bool bPreviousAllCheck;
+ static sal_uInt16 nPreviousChecks;
- void DisableChecks( BOOL bDelAllChecked = TRUE );
+ void DisableChecks( sal_Bool bDelAllChecked = sal_True );
DECL_LINK( DelAllHdl, void * );
public:
ScDeleteContentsDlg( Window* pParent,
- USHORT nCheckDefaults = 0 );
+ sal_uInt16 nCheckDefaults = 0 );
~ScDeleteContentsDlg();
void DisableObjects();
- USHORT GetDelContentsCmdBits() const;
+ sal_uInt16 GetDelContentsCmdBits() const;
};
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 8fb4fcd83e76..0719b640072b 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -59,11 +59,11 @@ class ScDocFunc
private:
ScDocShell& rDocShell;
- BOOL AdjustRowHeight( const ScRange& rRange, BOOL bPaint = TRUE );
+ sal_Bool AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint = true );
void CreateOneName( ScRangeName& rList,
SCCOL nPosX, SCROW nPosY, SCTAB nTab,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL& rCancel, BOOL bApi );
+ sal_Bool& rCancel, sal_Bool bApi );
void NotifyInputHandler( const ScAddress& rPos );
public:
@@ -72,29 +72,29 @@ public:
DECL_LINK( NotifyDrawUndo, SdrUndoAction* );
- BOOL DetectiveAddPred(const ScAddress& rPos);
- BOOL DetectiveDelPred(const ScAddress& rPos);
- BOOL DetectiveAddSucc(const ScAddress& rPos);
- BOOL DetectiveDelSucc(const ScAddress& rPos);
- BOOL DetectiveAddError(const ScAddress& rPos);
- BOOL DetectiveMarkInvalid(SCTAB nTab);
- BOOL DetectiveDelAll(SCTAB nTab);
- BOOL DetectiveRefresh(BOOL bAutomatic = FALSE);
+ sal_Bool DetectiveAddPred(const ScAddress& rPos);
+ sal_Bool DetectiveDelPred(const ScAddress& rPos);
+ sal_Bool DetectiveAddSucc(const ScAddress& rPos);
+ sal_Bool DetectiveDelSucc(const ScAddress& rPos);
+ sal_Bool DetectiveAddError(const ScAddress& rPos);
+ sal_Bool DetectiveMarkInvalid(SCTAB nTab);
+ sal_Bool DetectiveDelAll(SCTAB nTab);
+ sal_Bool DetectiveRefresh(sal_Bool bAutomatic = false);
void DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens);
void DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens);
- BOOL DeleteContents( const ScMarkData& rMark, USHORT nFlags,
- BOOL bRecord, BOOL bApi );
+ sal_Bool DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
- BOOL bRecord, BOOL bApi );
+ sal_Bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL SetNormalString( const ScAddress& rPos, const String& rText, BOOL bApi );
- BOOL PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi );
- BOOL PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
- BOOL bInterpret, BOOL bApi );
- BOOL SetCellText( const ScAddress& rPos, const String& rText,
- BOOL bInterpret, BOOL bEnglish, BOOL bApi,
+ sal_Bool SetNormalString( const ScAddress& rPos, const String& rText, sal_Bool bApi );
+ sal_Bool PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bool bApi );
+ sal_Bool PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
+ sal_Bool bInterpret, sal_Bool bApi );
+ sal_Bool SetCellText( const ScAddress& rPos, const String& rText,
+ sal_Bool bInterpret, sal_Bool bEnglish, sal_Bool bApi,
const String& rFormulaNmsp,
const formula::FormulaGrammar::Grammar eGrammar );
@@ -105,91 +105,91 @@ public:
bool ShowNote( const ScAddress& rPos, bool bShow = true );
inline bool HideNote( const ScAddress& rPos ) { return ShowNote( rPos, false ); }
- bool SetNoteText( const ScAddress& rPos, const String& rNoteText, BOOL bApi );
- bool ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, BOOL bApi );
+ bool SetNoteText( const ScAddress& rPos, const String& rNoteText, sal_Bool bApi );
+ bool ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, sal_Bool bApi );
- BOOL ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
- BOOL bRecord, BOOL bApi );
- BOOL ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
- BOOL bRecord, BOOL bApi );
+ sal_Bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
+ sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL InsertCells( const ScRange& rRange,const ScMarkData* pTabMark,
- InsCellCmd eCmd, BOOL bRecord, BOOL bApi,
- BOOL bPartOfPaste = FALSE );
- BOOL DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
- DelCellCmd eCmd, BOOL bRecord, BOOL bApi );
+ sal_Bool InsertCells( const ScRange& rRange,const ScMarkData* pTabMark,
+ InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bApi,
+ sal_Bool bPartOfPaste = false );
+ sal_Bool DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
+ DelCellCmd eCmd, sal_Bool bRecord, sal_Bool bApi );
- BOOL MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- BOOL InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi );
- BOOL RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi );
- BOOL DeleteTable( SCTAB nTab, BOOL bRecord, BOOL bApi );
+ sal_Bool InsertTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool RenameTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi );
bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
- BOOL SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi );
+ sal_Bool SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi );
- BOOL SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL bApi );
+ sal_Bool SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool bApi );
- SC_DLLPUBLIC BOOL SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
- SCTAB nTab, ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bApi );
+ SC_DLLPUBLIC sal_Bool SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ SCTAB nTab, ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL bApi );
- BOOL RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL bApi );
+ sal_Bool InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi );
+ sal_Bool RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi );
void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
- BOOL Protect( SCTAB nTab, const String& rPassword, BOOL bApi );
- BOOL Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi );
+ sal_Bool Protect( SCTAB nTab, const String& rPassword, sal_Bool bApi );
+ sal_Bool Unprotect( SCTAB nTab, const String& rPassword, sal_Bool bApi );
- BOOL ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL bApi );
- BOOL ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bApi );
- BOOL AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
- USHORT nFormatNo, BOOL bRecord, BOOL bApi );
+ sal_Bool ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi );
+ sal_Bool ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi );
+ sal_Bool AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_uInt16 nFormatNo, sal_Bool bRecord, sal_Bool bApi );
- BOOL EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_Bool EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
const ScTokenArray* pTokenArray,
- const String& rString, BOOL bApi, BOOL bEnglish,
+ const String& rString, sal_Bool bApi, sal_Bool bEnglish,
const String& rFormulaNmsp,
const formula::FormulaGrammar::Grammar );
- BOOL TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
- const ScTabOpParam& rParam, BOOL bRecord, BOOL bApi );
+ sal_Bool TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi );
- BOOL FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, BOOL bRecord, BOOL bApi );
- BOOL FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_Bool FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
double fStart, double fStep, double fMax,
- BOOL bRecord, BOOL bApi );
+ sal_Bool bRecord, sal_Bool bApi );
// FillAuto: rRange wird von Source-Range auf Dest-Range angepasst
- SC_DLLPUBLIC BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi );
+ SC_DLLPUBLIC sal_Bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, sal_Bool bRecord, sal_Bool bApi );
- BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi );
+ sal_Bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi );
- BOOL ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, BOOL bApi );
+ sal_Bool ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi );
- BOOL MergeCells( const ScCellMergeOption& rOption, BOOL bContents,
- BOOL bRecord, BOOL bApi );
- BOOL UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi );
- bool UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BOOL bApi );
+ sal_Bool MergeCells( const ScCellMergeOption& rOption, sal_Bool bContents,
+ sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool UnmergeCells( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
+ bool UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord, sal_Bool bApi );
bool SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc = true ); // takes ownership of pNewRanges
bool ModifyRangeNames( const ScRangeName& rNewRanges );
- BOOL CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi );
- BOOL InsertNameList( const ScAddress& rStartPos, BOOL bApi );
+ sal_Bool CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi );
+ sal_Bool InsertNameList( const ScAddress& rStartPos, sal_Bool bApi );
- BOOL InsertAreaLink( const String& rFile, const String& rFilter,
+ sal_Bool InsertAreaLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- const ScRange& rDestRange, ULONG nRefresh,
- BOOL bFitBlock, BOOL bApi );
+ const ScRange& rDestRange, sal_uLong nRefresh,
+ sal_Bool bFitBlock, sal_Bool bApi );
};
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index a88cbf575376..4f3cefbd68a6 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -50,7 +50,6 @@
class ScEditEngineDefaulter;
class FontList;
-class PrintDialog;
class SfxStyleSheetBasePool;
class SfxStyleSheetHint;
struct ChartSelectionInfo;
@@ -79,7 +78,7 @@ struct ScColWidthParam;
namespace sfx2 { class FileDialogHelper; }
struct DocShell_Impl;
-typedef ::boost::unordered_map< ULONG, ULONG > ScChangeActionMergeMap;
+typedef ::boost::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap;
//==================================================================
@@ -107,16 +106,16 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
//SfxObjectCreateMode eShellMode;
- BOOL bIsInplace; // wird von der View gesetzt
- BOOL bHeaderOn;
- BOOL bFooterOn;
- BOOL bNoInformLost;
- BOOL bIsEmpty;
- BOOL bIsInUndo;
- BOOL bDocumentModifiedPending;
- USHORT nDocumentLock;
+ sal_Bool bIsInplace; // wird von der View gesetzt
+ sal_Bool bHeaderOn;
+ sal_Bool bFooterOn;
+ sal_Bool bNoInformLost;
+ sal_Bool bIsEmpty;
+ sal_Bool bIsInUndo;
+ sal_Bool bDocumentModifiedPending;
+ sal_uInt16 nDocumentLock;
sal_Int16 nCanUpdate; // stores the UpdateDocMode from loading a document till update links
- BOOL bUpdateEnabled;
+ sal_Bool bUpdateEnabled;
ScDBData* pOldAutoDBRange;
@@ -150,23 +149,23 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
ScDocShell & mrDocShell;
};
- SC_DLLPRIVATE BOOL LoadXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
- SC_DLLPRIVATE BOOL SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ SC_DLLPRIVATE sal_Bool LoadXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ SC_DLLPRIVATE sal_Bool SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
SC_DLLPRIVATE SCTAB GetSaveTab();
- SC_DLLPRIVATE ULONG DBaseImport( const String& rFullFileName, CharSet eCharSet,
+ SC_DLLPRIVATE sal_uLong DBaseImport( const String& rFullFileName, CharSet eCharSet,
ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc );
- SC_DLLPRIVATE ULONG DBaseExport( const String& rFullFileName, CharSet eCharSet,
- BOOL& bHasMemo );
+ SC_DLLPRIVATE sal_uLong DBaseExport( const String& rFullFileName, CharSet eCharSet,
+ sal_Bool& bHasMemo );
- SC_DLLPRIVATE static BOOL MoveFile( const INetURLObject& rSource, const INetURLObject& rDest );
- SC_DLLPRIVATE static BOOL KillFile( const INetURLObject& rURL );
- SC_DLLPRIVATE static BOOL IsDocument( const INetURLObject& rURL );
+ SC_DLLPRIVATE static sal_Bool MoveFile( const INetURLObject& rSource, const INetURLObject& rDest );
+ SC_DLLPRIVATE static sal_Bool KillFile( const INetURLObject& rURL );
+ SC_DLLPRIVATE static sal_Bool IsDocument( const INetURLObject& rURL );
- SC_DLLPRIVATE void LockPaint_Impl(BOOL bDoc);
- SC_DLLPRIVATE void UnlockPaint_Impl(BOOL bDoc);
- SC_DLLPRIVATE void LockDocument_Impl(USHORT nNew);
- SC_DLLPRIVATE void UnlockDocument_Impl(USHORT nNew);
+ SC_DLLPRIVATE void LockPaint_Impl(sal_Bool bDoc);
+ SC_DLLPRIVATE void UnlockPaint_Impl(sal_Bool bDoc);
+ SC_DLLPRIVATE void LockDocument_Impl(sal_uInt16 nNew);
+ SC_DLLPRIVATE void UnlockDocument_Impl(sal_uInt16 nNew);
SC_DLLPRIVATE void EnableSharedSettings( bool bEnable );
SC_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > LoadSharedDocument();
@@ -188,14 +187,15 @@ public:
~ScDocShell();
using SotObject::GetInterface;
- using SfxShell::Activate; // with BOOL bMDI
- using SfxShell::Deactivate; // with BOOL bMDI
+ using SfxShell::Activate; // with sal_Bool bMDI
+ using SfxShell::Deactivate; // with sal_Bool bMDI
using SfxObjectShell::Print; // print styles
virtual void Activate();
virtual void Deactivate();
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
virtual void FillClass( SvGlobalName * pClassName,
sal_uInt32 * pFormat,
@@ -203,40 +203,40 @@ public:
String * pFullTypeName,
String * pShortTypeName,
sal_Int32 nFileFormat,
- sal_Bool bTemplate = sal_False ) const;
-
- virtual BOOL InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
- virtual BOOL Load( SfxMedium& rMedium );
- virtual BOOL LoadFrom( SfxMedium& rMedium );
- virtual BOOL ConvertFrom( SfxMedium &rMedium );
- virtual BOOL Save();
- virtual BOOL SaveAs( SfxMedium& rMedium );
- virtual BOOL ConvertTo( SfxMedium &rMedium );
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ sal_Bool bTemplate = false ) const;
+
+ virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ virtual sal_Bool Load( SfxMedium& rMedium );
+ virtual sal_Bool LoadFrom( SfxMedium& rMedium );
+ virtual sal_Bool ConvertFrom( SfxMedium &rMedium );
+ virtual sal_Bool Save();
+ virtual sal_Bool SaveAs( SfxMedium& rMedium );
+ virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = false );
virtual void PrepareReload();
- virtual BOOL IsInformationLost();
+ virtual sal_Bool IsInformationLost();
virtual void LoadStyles( SfxObjectShell &rSource );
- virtual BOOL Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3,
- USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted );
+ virtual sal_Bool Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3,
+ sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted );
- virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject
- virtual BOOL DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell
- virtual sal_Bool QuerySlotExecutable( USHORT nSlotId );
+ virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject
+ virtual sal_Bool DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell
+ virtual sal_Bool QuerySlotExecutable( sal_uInt16 nSlotId );
virtual void Draw( OutputDevice *, const JobSetup & rSetup,
- USHORT nAspect = ASPECT_CONTENT );
+ sal_uInt16 nAspect = ASPECT_CONTENT );
virtual void SetVisArea( const Rectangle & rVisArea );
using SfxObjectShell::GetVisArea;
- virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const;
virtual Printer* GetDocumentPrinter();
- virtual void SetModified( BOOL = TRUE );
+ virtual void SetModified( sal_Bool = sal_True );
- void SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart );
+ void SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifyStart );
virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( Window *pParent,
const SfxItemSet &rSet );
@@ -246,8 +246,8 @@ public:
ScDocument* GetDocument() { return &aDocument; }
ScDocFunc& GetDocFunc() { return *pDocFunc; }
- SfxPrinter* GetPrinter( BOOL bCreateIfNotExist = TRUE );
- USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL );
+ SfxPrinter* GetPrinter( sal_Bool bCreateIfNotExist = sal_True );
+ sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL );
void UpdateFontList();
@@ -266,63 +266,56 @@ public:
void GetStatePageStyle( SfxViewShell& rCaller, SfxItemSet& rSet, SCTAB nCurTab );
void CompareDocument( ScDocument& rOtherDoc );
- void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, 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 = NULL, bool bInverseMap = false );
bool MergeSharedDocument( ScDocShell* pSharedDocShell );
ScChangeAction* GetChangeAction( const ScAddress& rPos );
void SetChangeComment( ScChangeAction* pAction, const String& rComment );
- void ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext=TRUE );
+ void ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,sal_Bool bPrevNext=sal_True );
/// Protect/unprotect ChangeTrack and return <TRUE/> if
/// protection was successfully changed.
- /// If bJustQueryIfProtected==TRUE protection is not
+ /// If bJustQueryIfProtected==sal_True protection is not
/// changed and <TRUE/> is returned if not protected or
/// password was entered correctly.
- BOOL ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected = FALSE );
+ sal_Bool ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected = false );
- void SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages );
- BOOL AdjustPrintZoom( const ScRange& rRange );
+ void SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages );
+ sal_Bool AdjustPrintZoom( const ScRange& rRange );
- void LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles );
+ void LoadStylesArgs( ScDocShell& rSource, sal_Bool bReplace, sal_Bool bCellStyles, sal_Bool bPageStyles );
- void PageStyleModified( const String& rStyleName, BOOL bApi );
+ void PageStyleModified( const String& rStyleName, sal_Bool bApi );
void NotifyStyle( const SfxStyleSheetHint& rHint );
void DoAutoStyle( const ScRange& rRange, const String& rStyle );
Window* GetActiveDialogParent();
- void ErrorMessage( USHORT nGlobStrId );
- BOOL IsEditable() const;
+ void ErrorMessage( sal_uInt16 nGlobStrId );
+ sal_Bool IsEditable() const;
- BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
+ sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL );
void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false );
void RefreshPivotTables( const ScRange& rSource );
- void DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE );
- void UseScenario( SCTAB nTab, const String& rName, BOOL bRecord = TRUE );
+ void DoConsolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True );
+ void UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord = sal_True );
SCTAB MakeScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags,
- ScMarkData& rMark, BOOL bRecord = TRUE );
+ const Color& rColor, sal_uInt16 nFlags,
+ ScMarkData& rMark, sal_Bool bRecord = sal_True );
void ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
- ULONG TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
- SCTAB nDestPos, BOOL bInsertNew,
- BOOL bNotifyAndPaint );
+ const Color& rColor, sal_uInt16 nFlags );
+ sal_uLong TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
+ SCTAB nDestPos, sal_Bool bInsertNew,
+ sal_Bool bNotifyAndPaint );
- BOOL MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord );
+ sal_Bool MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, sal_Bool bRecord );
- void DoRecalc( BOOL bApi );
- void DoHardRecalc( BOOL bApi );
+ void DoRecalc( sal_Bool bApi );
+ void DoHardRecalc( sal_Bool bApi );
- bool CheckPrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData,
- bool bForceSelected, bool bIsAPI );
- void PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData );
- void Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
- ScMarkData* pMarkData, Window* pDialogParent,
- BOOL bForceSelected, BOOL bIsAPI );
-
- void UpdateOle( const ScViewData* pViewData, BOOL bSnapSize = FALSE );
- BOOL IsOle();
+ void UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize = false);
+ sal_Bool IsOle();
void DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
ScDBData* GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel );
@@ -331,35 +324,37 @@ public:
virtual void ReconnectDdeLink(SfxObjectShell& rServer);
void UpdateLinks(); // Link-Eintraege aktuallisieren
- BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren)
+ sal_Bool ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren)
virtual void CheckConfigOptions();
void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos );
void PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, USHORT nPart,
- USHORT nExtFlags = 0 );
- void PostPaint( const ScRange& rRange, USHORT nPart, USHORT nExtFlags = 0 );
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, sal_uInt16 nPart,
+ sal_uInt16 nExtFlags = 0 );
+ void PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags = 0 );
void PostPaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
void PostPaintCell( const ScAddress& rPos );
void PostPaintGridAll();
void PostPaintExtras();
+ bool IsPaintLocked() const { return pPaintLockData != NULL; }
+
void PostDataChanged();
- void UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
+ void UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab );
- void UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange );
+ void UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange );
- void SetDocumentModified( BOOL bIsModified = TRUE );
- void SetDrawModified( BOOL bIsModified = TRUE );
+ void SetDocumentModified( sal_Bool bIsModified = sal_True );
+ void SetDrawModified( sal_Bool bIsModified = sal_True );
void LockPaint();
void UnlockPaint();
- USHORT GetLockCount() const;
- void SetLockCount(USHORT nNew);
+ sal_uInt16 GetLockCount() const;
+ void SetLockCount(sal_uInt16 nNew);
void LockDocument();
void UnlockDocument();
@@ -368,19 +363,19 @@ public:
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
- void SetInplace( BOOL bInplace );
- BOOL IsEmpty() const;
- void SetEmpty(BOOL bSet);
+ void SetInplace( sal_Bool bInplace );
+ sal_Bool IsEmpty() const;
+ void SetEmpty(sal_Bool bSet);
- BOOL IsInUndo() const { return bIsInUndo; }
- void SetInUndo(BOOL bSet);
+ sal_Bool IsInUndo() const { return bIsInUndo; }
+ void SetInUndo(sal_Bool bSet);
void CalcOutputFactor();
double GetOutputFactor() const;
void GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
SCTAB nCurTab,
- BOOL& rbHeader,
- BOOL& rbFooter );
+ sal_Bool& rbHeader,
+ sal_Bool& rbFooter );
virtual long DdeGetData( const String& rItem, const String& rMimeType,
::com::sun::star::uno::Any & rValue );
@@ -392,17 +387,17 @@ public:
SfxBindings* GetViewBindings();
- ScTabViewShell* GetBestViewShell( BOOL bOnlyVisible = TRUE );
+ ScTabViewShell* GetBestViewShell( sal_Bool bOnlyVisible = sal_True );
ScSbxDocHelper* GetDocHelperObject() { return pDocHelper; }
- void SetDocumentModifiedPending( BOOL bVal )
+ void SetDocumentModifiedPending( sal_Bool bVal )
{ bDocumentModifiedPending = bVal; }
- BOOL IsDocumentModifiedPending() const
+ sal_Bool IsDocumentModifiedPending() const
{ return bDocumentModifiedPending; }
- BOOL IsUpdateEnabled() const
+ sal_Bool IsUpdateEnabled() const
{ return bUpdateEnabled; }
- void SetUpdateEnabled(BOOL bValue)
+ void SetUpdateEnabled(sal_Bool bValue)
{ bUpdateEnabled = bValue; }
OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
@@ -410,7 +405,7 @@ public:
static ScViewData* GetViewData();
static SCTAB GetCurTab();
- static ScDocShell* GetShellByNum( USHORT nDocNo );
+ static ScDocShell* GetShellByNum( sal_uInt16 nDocNo );
static String GetOwnFilterName();
static String GetHtmlFilterName();
static String GetWebQueryFilterName();
@@ -418,7 +413,7 @@ public:
static String GetLotusFilterName();
static String GetDBaseFilterName();
static String GetDifFilterName();
- static BOOL HasAutomaticTableName( const String& rFilter );
+ static sal_Bool HasAutomaticTableName( const String& rFilter );
DECL_LINK( RefreshDBDataHdl, ScRefreshTimer* );
@@ -462,8 +457,8 @@ class SC_DLLPUBLIC ScDocShellModificator
{
ScDocShell& rDocShell;
ScRefreshTimerProtector aProtector;
- BOOL bAutoCalcShellDisabled;
- BOOL bIdleDisabled;
+ sal_Bool bAutoCalcShellDisabled;
+ sal_Bool bIdleDisabled;
// not implemented
ScDocShellModificator( const ScDocShellModificator& );
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index 489e6b23e05d..ec868b9e8ba0 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -115,7 +115,7 @@ public:
virtual void execute() = 0;
};
- explicit ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel = 0);
+ explicit ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel = 0);
virtual ~ScMenuFloatingWindow();
virtual void MouseMove(const MouseEvent& rMEvt);
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index e0a9ee9674eb..17296dcbce10 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -77,13 +77,13 @@ public:
void StateFormatPaintbrush(SfxItemSet& rSet);
void ExecuteMacroAssign( SdrObject* pObj, Window* pWin );
- void ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
- void ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
- void ExecuteTextAttrDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+ void ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
+ void ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
+ void ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
ScDrawView* GetDrawView();
- BOOL AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark);
+ sal_Bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark);
};
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index b49cd1488453..ca3eb42e208a 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -49,7 +49,7 @@ class ScDrawView: public FmFormView
Fraction aScaleY;
SdrDropMarkerOverlay* pDropMarker;
SdrObject* pDropMarkObj;
- BOOL bInConstruct;
+ sal_Bool bInConstruct;
void Construct();
void UpdateBrowser();
@@ -77,12 +77,12 @@ public:
void MarkDropObj( SdrObject* pObj );
- void SetMarkedToLayer( BYTE nLayerNo );
+ void SetMarkedToLayer( sal_uInt8 nLayerNo );
void InvalidateAttribs();
void InvalidateDrawTextAttrs();
- BOOL BeginDrag( Window* pWindow, const Point& rStartPos );
+ sal_Bool BeginDrag( Window* pWindow, const Point& rStartPos );
void DoCut();
void DoCopy();
@@ -102,16 +102,16 @@ public:
void UpdateIMap( SdrObject* pObj );
- USHORT GetPopupMenuId();
+ sal_uInt16 GetPopupMenuId();
void UpdateUserViewOptions();
void SetMarkedOriginalSize();
- BOOL SelectObject( const String& rName );
+ sal_Bool SelectObject( const String& rName );
bool HasMarkedControl() const;
bool HasMarkedInternal() const;
- bool InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0);
+ bool InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, sal_uLong nOptions=0);
/** 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. */
diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx
index 4baea1857e55..ae6be419b942 100644
--- a/sc/source/ui/inc/drtxtob.hxx
+++ b/sc/source/ui/inc/drtxtob.hxx
@@ -35,7 +35,7 @@
#include "shellids.hxx"
-USHORT ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId()
+sal_uInt16 ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId()
class ScViewData;
class TransferableDataHelper;
@@ -45,7 +45,7 @@ class ScDrawTextObjectBar : public SfxShell
{
ScViewData* pViewData;
TransferableClipboardListener* pClipEvtLstnr;
- BOOL bPastePossible;
+ sal_Bool bPastePossible;
DECL_LINK( ClipboardChanged, TransferableDataHelper* );
@@ -67,8 +67,8 @@ public:
void GetAttrState( SfxItemSet& rSet );
void ExecuteToggle( SfxRequest &rReq );
- BOOL ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
- BOOL ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
+ sal_Bool ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
+ sal_Bool ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
void ExecuteExtra( SfxRequest &rReq );
void ExecFormText(SfxRequest& rReq); // StarFontWork
@@ -78,7 +78,7 @@ private:
void ExecuteGlobal( SfxRequest &rReq ); // von Execute gerufen fuer ganze Objekte
void GetGlobalClipState( SfxItemSet& rSet );
void ExecutePasteContents( SfxRequest &rReq );
- BOOL IsNoteEdit();
+ sal_Bool IsNoteEdit();
};
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
index 7690f860be41..c1194f9bd5cc 100644
--- a/sc/source/ui/inc/drwtrans.hxx
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -35,6 +35,8 @@
#include <sfx2/objsh.hxx>
#include "global.hxx"
+#include "charthelper.hxx"
+#include "rangelst.hxx"
class SdrModel;
@@ -57,17 +59,19 @@ private:
// extracted from model in ctor:
Size aSrcSize;
INetBookmark* pBookmark;
- BOOL bGraphic;
- BOOL bGrIsBit;
- BOOL bOleObj;
+ sal_Bool bGraphic;
+ sal_Bool bGrIsBit;
+ sal_Bool bOleObj;
// source information for drag&drop:
// (view is needed to handle drawing obejcts)
SdrView* pDragSourceView;
- USHORT nDragSourceFlags;
- BOOL bDragWasInternal;
+ sal_uInt16 nDragSourceFlags;
+ sal_Bool bDragWasInternal;
sal_uInt32 nSourceDocID;
+ ScRangeListVector m_aProtectedChartRangesVector;
+
void InitDocShell();
SdrOle2Obj* GetSingleObject();
@@ -89,11 +93,11 @@ public:
void SetDrawPersist( const SfxObjectShellRef& rRef );
void SetDragSource( ScDrawView* pView );
void SetDragSourceObj( SdrObject* pObj, SCTAB nTab );
- void SetDragSourceFlags( USHORT nFlags );
+ void SetDragSourceFlags( sal_uInt16 nFlags );
void SetDragWasInternal();
SdrView* GetDragSourceView() { return pDragSourceView; }
- USHORT GetDragSourceFlags() const { return nDragSourceFlags; }
+ sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; }
void SetSourceDocID( sal_uInt32 nVal )
{ nSourceDocID = nVal; }
@@ -102,6 +106,8 @@ public:
static ScDrawTransferObj* GetOwnClipboard( Window* pUIWin );
virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException );
static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ const ScRangeListVector& GetProtectedChartRangesVector() const { return m_aProtectedChartRangesVector; }
};
#endif
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
index 1bb4206f3990..85387e5c11ae 100644
--- a/sc/source/ui/inc/dwfunctr.hxx
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -52,7 +52,7 @@
class ScFunctionChildWindow : public SfxChildWindow
{
public:
- ScFunctionChildWindow( Window*, USHORT, SfxBindings*,
+ ScFunctionChildWindow( Window*, sal_uInt16, SfxBindings*,
SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW(ScFunctionChildWindow);
@@ -79,17 +79,17 @@ private:
SfxChildAlignment eSfxOldAlignment;
ImageButton aInsertButton;
FixedText aFiFuncDesc;
- USHORT nLeftSlot;
- USHORT nRightSlot;
- ULONG nMinWidth;
- ULONG nMinHeight;
+ sal_uInt16 nLeftSlot;
+ sal_uInt16 nRightSlot;
+ sal_uLong nMinWidth;
+ sal_uLong nMinHeight;
Size aOldSize;
- BOOL bSizeFlag;
- BOOL bInit;
+ sal_Bool bSizeFlag;
+ sal_Bool bInit;
short nDockMode;
Point aSplitterInitPos;
const ScFuncDesc* pFuncDesc;
- USHORT nArgs;
+ sal_uInt16 nArgs;
String** pArgArr;
@@ -97,7 +97,7 @@ private:
void UpdateFunctionList();
void UpdateLRUList();
- void DoEnter(BOOL bOk); //@@ ???
+ void DoEnter(sal_Bool bOk); //@@ ???
void SetDescription();
void SetLeftRightSize();
void SetTopBottonSize();
@@ -114,7 +114,7 @@ private:
protected:
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void Resizing( Size& rSize );
virtual void SetSize();
@@ -136,7 +136,7 @@ public:
using SfxDockingWindow::Notify;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- void SetSlotIDs( USHORT nLeft, USHORT nRight )
+ void SetSlotIDs( sal_uInt16 nLeft, sal_uInt16 nRight )
{ nLeftSlot = nLeft; nRightSlot = nRight; }
void InitLRUList();
diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx
index a0519be1b788..7e0e0472da65 100644
--- a/sc/source/ui/inc/editable.hxx
+++ b/sc/source/ui/inc/editable.hxx
@@ -40,8 +40,8 @@ class ScRange;
class ScEditableTester
{
- BOOL bIsEditable;
- BOOL bOnlyMatrix;
+ sal_Bool bIsEditable;
+ sal_Bool bOnlyMatrix;
public:
// no test in ctor
@@ -78,9 +78,9 @@ public:
void TestSelection( ScDocument* pDoc, const ScMarkData& rMark );
void TestView( ScViewFunc* pView );
- BOOL IsEditable() const { return bIsEditable; }
- BOOL IsFormatEditable() const { return bIsEditable || bOnlyMatrix; }
- USHORT GetMessageId() const;
+ sal_Bool IsEditable() const { return bIsEditable; }
+ sal_Bool IsFormatEditable() const { return bIsEditable || bOnlyMatrix; }
+ sal_uInt16 GetMessageId() const;
};
#endif
diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx
index 5e915aa2a89e..bd6b75ae2ede 100644
--- a/sc/source/ui/inc/editsh.hxx
+++ b/sc/source/ui/inc/editsh.hxx
@@ -49,8 +49,8 @@ private:
EditView* pEditView;
ScViewData* pViewData;
TransferableClipboardListener* pClipEvtLstnr;
- BOOL bPastePossible;
- BOOL bIsInsertMode;
+ sal_Bool bPastePossible;
+ sal_Bool bIsInsertMode;
const SvxURLField* GetURLField();
ScInputHandler* GetMyInputHdl();
@@ -78,7 +78,7 @@ public:
void ExecuteUndo(SfxRequest& rReq);
void GetUndoState(SfxItemSet &rSet);
- String GetSelectionText( BOOL bWholeWord );
+ String GetSelectionText( sal_Bool bWholeWord );
};
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 78358557444c..e9aaee89604a 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -29,6 +29,7 @@
#ifndef SC_FIELDWND_HXX
#define SC_FIELDWND_HXX
+#include <utility>
#include <vector>
#include "address.hxx"
#include "dpglobal.hxx"
@@ -40,19 +41,33 @@
class ScDPLayoutDlg;
class ScAccessibleDataPilotControl;
-//===================================================================
+const size_t PIVOTFIELD_INVALID = static_cast< size_t >( -1 );
-/** Type of content area. */
-enum ScDPFieldType
+// ============================================================================
+
+/** Type of the pivot table field window. */
+enum ScPivotFieldType
+{
+ PIVOTFIELDTYPE_PAGE, /// Window for all page fields.
+ PIVOTFIELDTYPE_COL, /// Window for all column fields.
+ PIVOTFIELDTYPE_ROW, /// Window for all row fields.
+ PIVOTFIELDTYPE_DATA, /// Window for all data fields.
+ PIVOTFIELDTYPE_SELECT /// Selection window with all fields.
+};
+
+/** Type of an end tracking event. */
+enum ScPivotFieldEndTracking
{
- TYPE_PAGE, /// Area for all page fields.
- TYPE_ROW, /// Area for all row fields.
- TYPE_COL, /// Area for all column fields.
- TYPE_DATA, /// Area for all data fields.
- TYPE_SELECT /// Selection area with all fields.
+ ENDTRACKING_SUSPEND, /// Stop tracking in this window, but tracking still active (in another window).
+ ENDTRACKING_CANCEL, /// Tracking has been cancelled.
+ ENDTRACKING_DROP /// Tracking has ended, a field has been dropped.
};
-//-------------------------------------------------------------------
+// ============================================================================
+
+typedef ::std::pair< const ScPivotFuncData*, size_t > ScPivotFuncDataEntry;
+
+// ============================================================================
/**
* Represents a field area in the DataPilot layout dialog. This base class
diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx
index ddd5621c558f..abecfa27c75a 100644
--- a/sc/source/ui/inc/filldlg.hxx
+++ b/sc/source/ui/inc/filldlg.hxx
@@ -53,7 +53,7 @@ public:
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir );
+ sal_uInt16 nPossDir );
~ScFillSeriesDlg();
FillDir GetFillDir() const { return theFillDir; }
@@ -65,9 +65,18 @@ public:
String GetStartStr() const { return aEdStartVal.GetText(); }
- void SetEdStartValEnabled(BOOL bFlag=FALSE);
+ void SetEdStartValEnabled(sal_Bool bFlag=false);
private:
+ FixedText aFtStartVal;
+ Edit aEdStartVal;
+ String aStartStrVal;
+
+ FixedText aFtEndVal;
+ Edit aEdEndVal;
+
+ FixedText aFtIncrement;
+ Edit aEdIncrement;
FixedLine aFlDirection;
RadioButton aBtnDown;
RadioButton aBtnRight;
@@ -87,17 +96,7 @@ private:
RadioButton aBtnDayOfWeek;
RadioButton aBtnMonth;
RadioButton aBtnYear;
-
- BOOL bStartValFlag;
- FixedText aFtStartVal;
- Edit aEdStartVal;
- String aStartStrVal;
-
- FixedText aFtEndVal;
- Edit aEdEndVal;
-
- FixedText aFtIncrement;
- Edit aEdIncrement;
+ sal_Bool bStartValFlag;
OKButton aBtnOk;
CancelButton aBtnCancel;
@@ -117,10 +116,10 @@ private:
#ifdef _FILLDLG_CXX
private:
- void Init( USHORT nPossDir );
- BOOL CheckStartVal();
- BOOL CheckIncrementVal();
- BOOL CheckEndVal();
+ void Init( sal_uInt16 nPossDir );
+ sal_Bool CheckStartVal();
+ sal_Bool CheckIncrementVal();
+ sal_Bool CheckEndVal();
DECL_LINK( OKHdl, void * );
DECL_LINK( DisableHdl, Button * );
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 44ea68f8e9c9..47a9dc414824 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -94,13 +94,13 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
void SliderMoved();
- USHORT GetSliderPos();
- void RefreshEditRow( USHORT nOffset );
+ sal_uInt16 GetSliderPos();
+ void RefreshEditRow( sal_uInt16 nOffset );
private:
FixedLine aFlCriteria;
@@ -148,7 +148,7 @@ private:
ScFilterOptionsMgr* pOptionsMgr;
- const USHORT nWhichQuery;
+ const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
ScQueryItem* pOutItem;
ScViewData* pViewData;
@@ -160,12 +160,12 @@ private:
ListBox* aCondLbArr[4];
ListBox* aConnLbArr[4];
bool mbHasDates[MAXQUERY];
- BOOL bRefreshExceptQuery[MAXQUERY];
- USHORT nFieldCount;
- BOOL bRefInputMode;
+ sal_Bool bRefreshExceptQuery[MAXQUERY];
+ sal_uInt16 nFieldCount;
+ sal_Bool bRefInputMode;
TypedScStrCollection* pEntryLists[MAXCOLCOUNT];
- USHORT nHeaderPos[MAXCOLCOUNT];
+ sal_uInt16 nHeaderPos[MAXCOLCOUNT];
// Hack: RefInput-Kontrolle
Timer* pTimer;
@@ -175,10 +175,10 @@ private:
void Init ( const SfxItemSet& rArgSet );
void FillFieldLists ();
void FillAreaList ();
- void UpdateValueList ( USHORT nList );
- void UpdateHdrInValueList( USHORT nList );
- void ClearValueList ( USHORT nList );
- USHORT GetFieldSelPos ( SCCOL nField );
+ void UpdateValueList ( sal_uInt16 nList );
+ void UpdateHdrInValueList( sal_uInt16 nList );
+ void ClearValueList ( sal_uInt16 nList );
+ sal_uInt16 GetFieldSelPos ( SCCOL nField );
ScQueryItem* GetOutputItem ();
// Handler:
@@ -205,14 +205,14 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
- ListBox aLbFilterArea;
FixedText aFtFilterArea;
+ ListBox aLbFilterArea;
formula::RefEdit aEdFilterArea;
formula::RefButton aRbFilterArea;
@@ -227,14 +227,14 @@ private:
ScFilterOptionsMgr* pOptionsMgr;
- const USHORT nWhichQuery;
+ const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
ScQueryItem* pOutItem;
ScViewData* pViewData;
ScDocument* pDoc;
formula::RefEdit* pRefInputEdit;
- BOOL bRefInputMode;
+ sal_Bool bRefInputMode;
// Hack: RefInput-Kontrolle
Timer* pTimer;
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index 18164f1b7d35..5ba7345cd314 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -72,7 +72,7 @@ public:
const String& refStrUndefined );
~ScFilterOptionsMgr();
- BOOL VerifyPosStr ( const String& rPosStr ) const;
+ sal_Bool VerifyPosStr ( const String& rPosStr ) const;
private:
Dialog* pDlg;
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index ea8298bea0ef..306aaa565d8d 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -82,11 +82,11 @@ public:
virtual void notifyChange();
virtual void fill();
virtual bool calculateValue(const String& _sExpression,String& _rResult);
- virtual void doClose(BOOL _bOk);
+ virtual void doClose(sal_Bool _bOk);
virtual void insertEntryToLRUList(const formula::IFunctionDescription* pDesc);
virtual void showReference(const String& _sFormula);
- virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked);
- virtual void setDispatcherLock( BOOL bLock );
+ virtual void dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked);
+ virtual void setDispatcherLock( sal_Bool bLock );
virtual void setReferenceInput(const formula::FormEditData* _pData);
virtual void deleteFormData();
virtual void clear();
@@ -103,31 +103,31 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const;
virtual ::com::sun::star::table::CellAddress getReferencePosition() const;
- virtual BOOL Close();
+ virtual sal_Bool Close();
// sc::IAnyRefDialog
virtual void ShowReference(const String& _sRef);
- virtual void HideReference( BOOL bDoneRefMode = TRUE );
+ virtual void HideReference( sal_Bool bDoneRefMode = sal_True );
virtual void SetReference( const ScRange& rRef, ScDocument* pD );
virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- virtual void RefInputDone( BOOL bForced = FALSE );
- virtual BOOL IsTableLocked() const;
- virtual BOOL IsRefInputMode() const;
+ virtual void RefInputDone( sal_Bool bForced = false );
+ virtual sal_Bool IsTableLocked() const;
+ virtual sal_Bool IsRefInputMode() const;
- virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const;
+ virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const;
virtual void AddRefEntry();
virtual void SetActive();
virtual void ViewShellChanged( ScTabViewShell* pScViewShell );
protected:
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- ULONG FindFocusWin(Window *pWin);
+ sal_uLong FindFocusWin(Window *pWin);
void SaveLRUEntry(const ScFuncDesc* pFuncDesc);
void HighlightFunctionParas(const String& aFormula);
- BOOL IsInputHdl(ScInputHandler* pHdl);
+ sal_Bool IsInputHdl(ScInputHandler* pHdl);
ScInputHandler* GetNextInputHandler(ScDocShell* pDocShell,PtrTabViewShell* ppViewSh);
};
diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx
index ea7a67d5d356..232d5c0e1b79 100644
--- a/sc/source/ui/inc/fuconarc.hxx
+++ b/sc/source/ui/inc/fuconarc.hxx
@@ -45,10 +45,10 @@ class FuConstArc : public FuConstruct
virtual ~FuConstArc();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx
index 6afa6be65021..6fb89242cbc0 100644
--- a/sc/source/ui/inc/fuconcustomshape.hxx
+++ b/sc/source/ui/inc/fuconcustomshape.hxx
@@ -43,10 +43,10 @@ public:
virtual ~FuConstCustomShape();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx
index 894dcd4193eb..0104388ac03a 100644
--- a/sc/source/ui/inc/fuconpol.hxx
+++ b/sc/source/ui/inc/fuconpol.hxx
@@ -47,10 +47,10 @@ class FuConstPolygon : public FuConstruct
virtual ~FuConstPolygon();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx
index dede18b8b03f..5c0cf72735c7 100644
--- a/sc/source/ui/inc/fuconrec.hxx
+++ b/sc/source/ui/inc/fuconrec.hxx
@@ -45,10 +45,10 @@ class FuConstRectangle : public FuConstruct
virtual ~FuConstRectangle();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconstr.hxx b/sc/source/ui/inc/fuconstr.hxx
index 66c55a981caf..5468e2f60f6a 100644
--- a/sc/source/ui/inc/fuconstr.hxx
+++ b/sc/source/ui/inc/fuconstr.hxx
@@ -51,13 +51,13 @@ class FuConstruct : public FuDraw
virtual ~FuConstruct();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
- BOOL SimpleMouseButtonUp(const MouseEvent& rMEvt);
+ sal_Bool SimpleMouseButtonUp(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx
index 44ce6876a4bc..efb19ccf39e7 100644
--- a/sc/source/ui/inc/fuconuno.hxx
+++ b/sc/source/ui/inc/fuconuno.hxx
@@ -41,8 +41,8 @@
class FuConstUnoControl : public FuConstruct
{
protected:
- UINT32 nInventor;
- UINT16 nIdentifier;
+ sal_uInt32 nInventor;
+ sal_uInt16 nIdentifier;
public:
FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
@@ -50,10 +50,10 @@ public:
virtual ~FuConstUnoControl();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fudraw.hxx b/sc/source/ui/inc/fudraw.hxx
index a88580144301..c2820c5c0569 100644
--- a/sc/source/ui/inc/fudraw.hxx
+++ b/sc/source/ui/inc/fudraw.hxx
@@ -49,7 +49,7 @@ class FuDraw : public FuPoor
SdrModel* pDoc, SfxRequest& rReq);
virtual ~FuDraw();
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
virtual void ScrollStart();
virtual void ScrollEnd();
@@ -59,14 +59,14 @@ class FuDraw : public FuPoor
virtual void ForcePointer(const MouseEvent* pMEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
// II
virtual void SelectionHasChanged();
- BOOL IsSizingOrMovingNote( const MouseEvent& rMEvt ) const;
+ sal_Bool IsSizingOrMovingNote( const MouseEvent& rMEvt ) const;
private:
void DoModifiers(const MouseEvent& rMEvt);
diff --git a/sc/source/ui/inc/fuedipo.hxx b/sc/source/ui/inc/fuedipo.hxx
index 3b27834f7a56..892fd748fbb8 100644
--- a/sc/source/ui/inc/fuedipo.hxx
+++ b/sc/source/ui/inc/fuedipo.hxx
@@ -46,10 +46,10 @@ class FuEditPoints : public FuDraw
virtual ~FuEditPoints();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fumark.hxx b/sc/source/ui/inc/fumark.hxx
index 61d287ea30f4..58f22302ea24 100644
--- a/sc/source/ui/inc/fumark.hxx
+++ b/sc/source/ui/inc/fumark.hxx
@@ -44,8 +44,8 @@ class FuMarkRect : public FuPoor
protected:
Point aBeginPos;
Rectangle aZoomRect;
- BOOL bVisible;
- BOOL bStartDrag;
+ sal_Bool bVisible;
+ sal_Bool bStartDrag;
ScRangeListRef aSourceRange;
public:
@@ -53,7 +53,7 @@ class FuMarkRect : public FuPoor
SdrModel* pDoc, SfxRequest& rReq);
virtual ~FuMarkRect();
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
virtual void ScrollStart();
virtual void ScrollEnd();
@@ -63,10 +63,10 @@ class FuMarkRect : public FuPoor
virtual void ForcePointer(const MouseEvent* pMEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
};
diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx
index 799f5e260645..ca24748cc5a7 100644
--- a/sc/source/ui/inc/funcpage.hxx
+++ b/sc/source/ui/inc/funcpage.hxx
@@ -103,15 +103,15 @@ public:
ScFuncPage( Window* pParent);
- void SetCategory(USHORT nCat);
- void SetFunction(USHORT nFunc);
+ void SetCategory(sal_uInt16 nCat);
+ void SetFunction(sal_uInt16 nFunc);
void SetFocus();
- USHORT GetCategory();
- USHORT GetFunction();
- USHORT GetFunctionEntryCount();
+ sal_uInt16 GetCategory();
+ sal_uInt16 GetFunction();
+ sal_uInt16 GetFunctionEntryCount();
- USHORT GetFuncPos(const ScFuncDesc*);
- const ScFuncDesc* GetFuncDesc( USHORT nPos ) const;
+ sal_uInt16 GetFuncPos(const ScFuncDesc*);
+ const ScFuncDesc* GetFuncDesc( sal_uInt16 nPos ) const;
String GetSelFunctionName() const;
void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; }
diff --git a/sc/source/ui/inc/funcutl.hxx b/sc/source/ui/inc/funcutl.hxx
index afa8e1f5c853..d7878714e4f2 100644
--- a/sc/source/ui/inc/funcutl.hxx
+++ b/sc/source/ui/inc/funcutl.hxx
@@ -64,7 +64,7 @@ private:
MultiLineEdit* pMEdit;
Link aSelChangedLink;
Selection aOldSel;
- BOOL bMouseFlag;
+ sal_Bool bMouseFlag;
DECL_LINK( ChangedHdl, ScEditBox* );
protected:
@@ -99,7 +99,7 @@ public:
ArgEdit( Window* pParent, const ResId& rResId );
void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
- ScrollBar& rArgSlider, USHORT nArgCount );
+ ScrollBar& rArgSlider, sal_uInt16 nArgCount );
protected:
virtual void KeyInput( const KeyEvent& rKEvt );
@@ -108,7 +108,7 @@ private:
ArgEdit* pEdPrev;
ArgEdit* pEdNext;
ScrollBar* pSlider;
- USHORT nArgs;
+ sal_uInt16 nArgs;
};
diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx
index 237432e763f2..5638b3bc6f68 100644
--- a/sc/source/ui/inc/fupoor.hxx
+++ b/sc/source/ui/inc/fupoor.hxx
@@ -71,7 +71,7 @@ protected:
Timer aDragTimer; // fuer Drag&Drop
DECL_LINK( DragTimerHdl, Timer * );
DECL_LINK( DragHdl, void * );
- BOOL bIsInDragMode;
+ sal_Bool bIsInDragMode;
Point aMDPos; // Position von MouseButtonDown
// member to hold state of the mouse buttons for creation
@@ -95,16 +95,16 @@ public:
virtual void DoPaste();
// Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent&) { return FALSE; }
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent&) { return false; }
// moved from inline to *.cxx
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); // { return FALSE; }
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); // { return FALSE; }
// moved from inline to *.cxx
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); // { return FALSE; }
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); // { return FALSE; }
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -114,9 +114,9 @@ public:
void SetWindow(Window* pWin) { pWindow = pWin; }
- USHORT GetSlotID() const { return( aSfxRequest.GetSlot() ); }
+ sal_uInt16 GetSlotID() const { return( aSfxRequest.GetSlot() ); }
- BOOL IsDetectiveHit( const Point& rLogicPos );
+ sal_Bool IsDetectiveHit( const Point& rLogicPos );
void StopDragTimer();
diff --git a/sc/source/ui/inc/fusel.hxx b/sc/source/ui/inc/fusel.hxx
index 7f0783537624..d13ddc3e9558 100644
--- a/sc/source/ui/inc/fusel.hxx
+++ b/sc/source/ui/inc/fusel.hxx
@@ -50,11 +50,11 @@ public:
virtual ~FuSelection();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -64,10 +64,10 @@ public:
protected:
// Outliner* pOutliner;
// OutlinerView* pOutlinerView;
- BOOL bVCAction;
+ sal_Bool bVCAction;
private:
- BOOL TestDetective( SdrPageView* pPV, const Point& rPos ); // -> fusel2
+ sal_Bool TestDetective( SdrPageView* pPV, const Point& rPos ); // -> fusel2
bool IsNoteCaptionMarked() const;
bool IsNoteCaptionClicked( const Point& rPos ) const;
diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx
index 2af36d3aa5de..f3150424ba50 100644
--- a/sc/source/ui/inc/futext.hxx
+++ b/sc/source/ui/inc/futext.hxx
@@ -43,7 +43,7 @@ class SdrOutliner;
class FuText : public FuConstruct
{
protected:
-// USHORT nOldObjectBar;
+// sal_uInt16 nOldObjectBar;
SdrTextObj* pTextObj;
public:
@@ -52,10 +52,10 @@ public:
virtual ~FuText();
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -65,8 +65,8 @@ public:
virtual void SelectionHasChanged();
void SetInEditMode( SdrObject* pObj = NULL, const Point* pMousePixel = NULL,
- BOOL bCursorToEnd = FALSE, const KeyEvent* pInitialKey = NULL );
- void StopEditMode(BOOL bTextDirection = FALSE);
+ sal_Bool bCursorToEnd = false, const KeyEvent* pInitialKey = NULL );
+ void StopEditMode(sal_Bool bTextDirection = false);
void StopDragMode(SdrObject* pObject);
// Create default drawing objects via keyboard
diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx
index d8cd2d16b7b4..86cae4fdfab8 100644
--- a/sc/source/ui/inc/gridmerg.hxx
+++ b/sc/source/ui/inc/gridmerg.hxx
@@ -44,8 +44,8 @@ private:
long nVarStart;
long nVarDiff;
long nCount;
- BOOL bVertical;
- BOOL bOptimize;
+ sal_Bool bVertical;
+ sal_Bool bOptimize;
void AddLine( long nStart, long nEnd, long nPos );
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 46d3f6cdee91..a3762b40d421 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -147,61 +147,61 @@ private:
::std::auto_ptr<ScDPFieldPopupWindow> mpDPFieldPopup;
::std::auto_ptr<ScDPFieldButton> mpFilterButton;
- USHORT nCursorHideCount;
+ sal_uInt16 nCursorHideCount;
- BOOL bMarking;
+ sal_Bool bMarking;
- USHORT nButtonDown;
- BOOL bEEMouse; // Edit-Engine hat Maus
- BYTE nMouseStatus;
- BYTE nNestedButtonState; // track nested button up/down calls
+ sal_uInt16 nButtonDown;
+ sal_Bool bEEMouse; // Edit-Engine hat Maus
+ sal_uInt8 nMouseStatus;
+ sal_uInt8 nNestedButtonState; // track nested button up/down calls
- BOOL bDPMouse; // DataPilot-D&D (neue Pivottabellen)
+ sal_Bool bDPMouse; // DataPilot-D&D (neue Pivottabellen)
long nDPField;
ScDPObject* pDragDPObj; //! name?
- BOOL bRFMouse; // RangeFinder-Drag
- BOOL bRFSize;
- USHORT nRFIndex;
+ sal_Bool bRFMouse; // RangeFinder-Drag
+ sal_Bool bRFSize;
+ sal_uInt16 nRFIndex;
SCsCOL nRFAddX;
SCsROW nRFAddY;
- USHORT nPagebreakMouse; // Pagebreak-Modus Drag
+ sal_uInt16 nPagebreakMouse; // Pagebreak-Modus Drag
SCCOLROW nPagebreakBreak;
SCCOLROW nPagebreakPrev;
ScRange aPagebreakSource;
ScRange aPagebreakDrag;
- BOOL bPagebreakDrawn;
+ sal_Bool bPagebreakDrawn;
- BYTE nPageScript;
+ sal_uInt8 nPageScript;
long nLastClickX;
long nLastClickY;
- BOOL bDragRect;
+ sal_Bool bDragRect;
SCCOL nDragStartX;
SCROW nDragStartY;
SCCOL nDragEndX;
SCROW nDragEndY;
InsCellCmd meDragInsertMode;
- USHORT nCurrentPointer;
+ sal_uInt16 nCurrentPointer;
- BOOL bIsInScroll;
- BOOL bIsInPaint;
+ sal_Bool bIsInScroll;
+ sal_Bool bIsInPaint;
ScDDComboBoxButton aComboButton;
Point aCurMousePos;
- USHORT nPaintCount;
+ sal_uInt16 nPaintCount;
Rectangle aRepaintPixel;
- BOOL bNeedsRepaint;
+ sal_Bool bNeedsRepaint;
- BOOL bAutoMarkVisible;
+ sal_Bool bAutoMarkVisible;
ScAddress aAutoMarkPos;
- BOOL bListValButton;
+ sal_Bool bListValButton;
ScAddress aListValPos;
Rectangle aInvertRect;
@@ -209,15 +209,15 @@ private:
DECL_LINK( PopupModeEndHdl, FloatingWindow* );
DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
- BOOL TestMouse( const MouseEvent& rMEvt, BOOL bAction );
+ sal_Bool TestMouse( const MouseEvent& rMEvt, sal_Bool bAction );
- BOOL DoPageFieldSelection( SCCOL nCol, SCROW nRow );
+ sal_Bool DoPageFieldSelection( SCCOL nCol, SCROW nRow );
bool DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
void DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
void DPMouseMove( const MouseEvent& rMEvt );
void DPMouseButtonUp( const MouseEvent& rMEvt );
- void DPTestMouse( const MouseEvent& rMEvt, BOOL bMove );
+ void DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove );
/**
* Check if the mouse click is on a field popup button.
@@ -229,24 +229,24 @@ private:
void DPLaunchFieldPopupMenu(
const Point& rScrPos, const Size& rScrSize, const ScAddress& rPos, ScDPObject* pDPObj);
- void RFMouseMove( const MouseEvent& rMEvt, BOOL bUp );
+ void RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp );
- void PagebreakMove( const MouseEvent& rMEvt, BOOL bUp );
+ void PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp );
- void UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect );
+ void UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect );
- BOOL IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
- void ExecFilter( ULONG nSel, SCCOL nCol, SCROW nRow,
+ sal_Bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
+ void ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow,
const String& aValue, bool bCheckForDates );
- void FilterSelect( ULONG nSel );
+ void FilterSelect( sal_uLong nSel );
void ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr );
- void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr );
+ void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr );
- BOOL HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
+ sal_Bool HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
- BOOL DropScroll( const Point& rMousePos );
+ sal_Bool DropScroll( const Point& rMousePos );
sal_Int8 AcceptPrivateDrop( const AcceptDropEvent& rEvt );
sal_Int8 ExecutePrivateDrop( const ExecuteDropEvent& rEvt );
@@ -255,33 +255,33 @@ private:
void HandleMouseButtonDown( const MouseEvent& rMEvt );
- BOOL DrawMouseButtonDown(const MouseEvent& rMEvt);
- BOOL DrawMouseButtonUp(const MouseEvent& rMEvt);
- BOOL DrawMouseMove(const MouseEvent& rMEvt);
- BOOL DrawKeyInput(const KeyEvent& rKEvt);
- BOOL DrawCommand(const CommandEvent& rCEvt);
- BOOL DrawHasMarkedObj();
+ sal_Bool DrawMouseButtonDown(const MouseEvent& rMEvt);
+ sal_Bool DrawMouseButtonUp(const MouseEvent& rMEvt);
+ sal_Bool DrawMouseMove(const MouseEvent& rMEvt);
+ sal_Bool DrawKeyInput(const KeyEvent& rKEvt);
+ sal_Bool DrawCommand(const CommandEvent& rCEvt);
+ sal_Bool DrawHasMarkedObj();
void DrawEndAction();
void DrawMarkDropObj( SdrObject* pObj );
SdrObject* GetEditObject();
- BOOL IsMyModel(SdrEditView* pSdrView);
+ sal_Bool IsMyModel(SdrEditView* pSdrView);
- void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer );
+ void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer );
void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev );
void DrawAfterScroll(/*BOOL bVal*/);
Rectangle GetListValButtonRect( const ScAddress& rButtonPos );
void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, OutputDevice* pContentDev );
- BOOL GetEditUrl( const Point& rPos,
+ sal_Bool GetEditUrl( const Point& rPos,
String* pName=0, String* pUrl=0, String* pTarget=0 );
- BOOL GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
+ sal_Bool GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
String* pName=0, String* pUrl=0, String* pTarget=0 );
- BOOL HitRangeFinder( const Point& rMouse, BOOL& rCorner, USHORT* pIndex = NULL,
+ sal_Bool HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, sal_uInt16* pIndex = NULL,
SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
- USHORT HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
+ sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL );
void PasteSelection( const Point& rPosPixel );
@@ -340,7 +340,7 @@ public:
void UpdateFormulas();
- void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect );
+ void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect );
void DoScenarioMenue( const ScRange& rScenRange );
void LaunchPageFieldMenu( SCCOL nCol, SCROW nRow );
@@ -356,27 +356,27 @@ public:
ScUpdateMode eMode = SC_UPDATE_ALL );
void InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bTestMerge = FALSE, BOOL bRepeat = FALSE );
+ sal_Bool bTestMerge = false, sal_Bool bRepeat = false );
void CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddress);
void HideCursor();
void ShowCursor();
- void UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange);
+ void UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange);
- void UpdateListValPos( BOOL bVisible, const ScAddress& rPos );
+ void UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos );
- BOOL ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard );
+ sal_Bool ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard );
void HideNoteMarker();
- MapMode GetDrawMapMode( BOOL bForce = FALSE );
+ MapMode GetDrawMapMode( sal_Bool bForce = false );
void ContinueDrag();
void StopMarking();
void UpdateInputContext();
- void CheckInverted() { if (nPaintCount) bNeedsRepaint = TRUE; }
+ void CheckInverted() { if (nPaintCount) bNeedsRepaint = sal_True; }
void DoInvertRect( const Rectangle& rPixel );
diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx
index 557044f16a3e..1510d1cf6154 100644
--- a/sc/source/ui/inc/groupdlg.hxx
+++ b/sc/source/ui/inc/groupdlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
//------------------------------------------------------------------------
@@ -40,12 +40,12 @@ class ScGroupDlg : public ModalDialog
{
public:
ScGroupDlg( Window* pParent,
- USHORT nResId,
- BOOL bUnGroup = FALSE,
- BOOL bRows = TRUE );
+ sal_uInt16 nResId,
+ sal_Bool bUnGroup = false,
+ sal_Bool bRows = sal_True );
~ScGroupDlg();
- BOOL GetColsChecked() const;
+ sal_Bool GetColsChecked() const;
private:
FixedLine aFlFrame;
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
index c4cc590fc7ed..da614f7fa762 100644
--- a/sc/source/ui/inc/hdrcont.hxx
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -51,10 +51,10 @@ private:
SelectionEngine* pSelEngine;
Font aNormFont;
Font aBoldFont;
- BOOL bBoldSet;
+ sal_Bool bBoldSet;
- USHORT nFlags;
- BOOL bVertical; // Vertikal = Zeilenheader
+ sal_uInt16 nFlags;
+ sal_Bool bVertical; // Vertikal = Zeilenheader
long nWidth;
long nSmallWidth;
@@ -64,18 +64,18 @@ private:
SCCOLROW nMarkStart;
SCCOLROW nMarkEnd;
- BOOL bMarkRange;
+ sal_Bool bMarkRange;
- BOOL bDragging; // Groessen aendern
+ sal_Bool bDragging; // Groessen aendern
SCCOLROW nDragNo;
long nDragStart;
long nDragPos;
- BOOL bDragMoved;
+ sal_Bool bDragMoved;
- BOOL bIgnoreMove;
+ sal_Bool bIgnoreMove;
long GetScrPos( SCCOLROW nEntryNo );
- SCCOLROW GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder );
+ SCCOLROW GetMousePos( const MouseEvent& rMEvt, sal_Bool& rBorder );
bool IsSelectionAllowed(SCCOLROW nPos) const;
void ShowDragHelp();
@@ -98,20 +98,20 @@ protected:
// neue Methoden
virtual SCCOLROW GetPos() = 0; // aktuelle Position (Scrolling)
- virtual USHORT GetEntrySize( SCCOLROW nEntryNo ) = 0; // Breite / Hoehe (Pixel)
+ virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo ) = 0; // Breite / Hoehe (Pixel)
virtual String GetEntryText( SCCOLROW nEntryNo ) = 0;
virtual SCCOLROW GetHiddenCount( SCCOLROW nEntryNo );
- virtual BOOL IsLayoutRTL();
- virtual BOOL IsMirrored();
+ virtual sal_Bool IsLayoutRTL();
+ virtual sal_Bool IsMirrored();
- virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewWidth ) = 0;
+ virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewWidth ) = 0;
virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ) = 0;
- virtual void SetMarking( BOOL bSet );
+ virtual void SetMarking( sal_Bool bSet );
virtual void SelectWindow();
- virtual BOOL IsDisabled();
- virtual BOOL ResizeAllowed();
+ virtual sal_Bool IsDisabled();
+ virtual sal_Bool ResizeAllowed();
virtual String GetDragHelp( long nVal );
virtual void DrawInvert( long nDragPos );
@@ -119,14 +119,14 @@ protected:
public:
ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEngine,
- SCCOLROW nNewSize, USHORT nNewFlags );
+ SCCOLROW nNewSize, sal_uInt16 nNewFlags );
~ScHeaderControl();
- void SetIgnoreMove(BOOL bSet) { bIgnoreMove = bSet; }
+ void SetIgnoreMove(sal_Bool bSet) { bIgnoreMove = bSet; }
void StopMarking();
- void SetMark( BOOL bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd );
+ void SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd );
long GetWidth() const { return nWidth; }
long GetSmallWidth() const { return nSmallWidth; }
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
index 335fe9618b50..0f63f2e7bae9 100644
--- a/sc/source/ui/inc/hfedtdlg.hxx
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -46,11 +46,11 @@ public:
Window* pParent,
const SfxItemSet& rCoreSet,
const String& rPageStyle,
- USHORT nResId = RID_SCDLG_HFEDIT );
+ sal_uInt16 nResId = RID_SCDLG_HFEDIT );
~ScHFEditDlg();
- virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage );
};
diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx
index 090905c481e8..d3b6b24513a0 100644
--- a/sc/source/ui/inc/highred.hxx
+++ b/sc/source/ui/inc/highred.hxx
@@ -95,7 +95,7 @@ private:
protected:
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
public:
ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
@@ -105,8 +105,8 @@ public:
virtual void SetActive();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL Close();
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool Close();
+ virtual sal_Bool IsRefInputMode() const;
};
diff --git a/sc/source/ui/inc/hiranges.hxx b/sc/source/ui/inc/hiranges.hxx
index a79bfad079c4..e14c74938bdd 100644
--- a/sc/source/ui/inc/hiranges.hxx
+++ b/sc/source/ui/inc/hiranges.hxx
@@ -52,9 +52,9 @@ public:
ScHighlightRanges();
~ScHighlightRanges();
- ULONG Count() const { return aEntries.Count(); }
+ sal_uLong Count() const { return aEntries.Count(); }
void Insert( ScHighlightEntry* pNew ) { aEntries.Insert(pNew, LIST_APPEND); }
- ScHighlightEntry* GetObject( ULONG nIndex ) const
+ ScHighlightEntry* GetObject( sal_uLong nIndex ) const
{ return (ScHighlightEntry*)aEntries.GetObject(nIndex); }
};
diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx
index 49f574bbf055..016b0e863304 100644
--- a/sc/source/ui/inc/imoptdlg.hxx
+++ b/sc/source/ui/inc/imoptdlg.hxx
@@ -33,7 +33,7 @@
#include <vcl/fixed.hxx>
#include <vcl/combobox.hxx>
#include <vcl/lstbox.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <svx/txencbox.hxx>
#include "scdllapi.h"
#include "global.hxx"
@@ -45,19 +45,19 @@ class SC_DLLPUBLIC ScImportOptions
public:
ScImportOptions()
: nFieldSepCode(0), nTextSepCode(0),
- eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(FALSE),
- bSaveAsShown(FALSE)
+ eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(false),
+ bSaveAsShown(false), bQuoteAllText(false)
{}
ScImportOptions( const String& rStr );
ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const String& rStr )
: nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr),
- bFixedWidth(FALSE), bSaveAsShown(FALSE)
+ bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false)
{ eCharSet = ScGlobal::GetCharsetValue(aStrFont); }
ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc )
: nFieldSepCode(nFieldSep), nTextSepCode(nTextSep),
- bFixedWidth(FALSE), bSaveAsShown(FALSE)
+ bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false)
{ SetTextEncoding( nEnc ); }
ScImportOptions( const ScImportOptions& rCpy )
@@ -66,7 +66,8 @@ public:
aStrFont (rCpy.aStrFont),
eCharSet (rCpy.eCharSet),
bFixedWidth (rCpy.bFixedWidth),
- bSaveAsShown (rCpy.bSaveAsShown)
+ bSaveAsShown (rCpy.bSaveAsShown),
+ bQuoteAllText (rCpy.bQuoteAllText)
{}
ScImportOptions& operator=( const ScImportOptions& rCpy )
@@ -77,10 +78,11 @@ public:
eCharSet = rCpy.eCharSet;
bFixedWidth = rCpy.bFixedWidth;
bSaveAsShown = rCpy.bSaveAsShown;
+ bQuoteAllText = rCpy.bQuoteAllText;
return *this;
}
- BOOL operator==( const ScImportOptions& rCmp )
+ sal_Bool operator==( const ScImportOptions& rCmp )
{
return
nFieldSepCode == rCmp.nFieldSepCode
@@ -88,7 +90,8 @@ public:
&& eCharSet == rCmp.eCharSet
&& aStrFont == rCmp.aStrFont
&& bFixedWidth == rCmp.bFixedWidth
- && bSaveAsShown == rCmp.bSaveAsShown;
+ && bSaveAsShown == rCmp.bSaveAsShown
+ && bQuoteAllText == rCmp.bQuoteAllText;
}
String BuildString() const;
@@ -98,8 +101,9 @@ public:
sal_Unicode nTextSepCode;
String aStrFont;
CharSet eCharSet;
- BOOL bFixedWidth;
- BOOL bSaveAsShown;
+ sal_Bool bFixedWidth;
+ sal_Bool bSaveAsShown;
+ sal_Bool bQuoteAllText;
};
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 343e952abb3e..a4c28b1150e7 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -63,33 +63,33 @@ class SC_DLLPUBLIC ScImportExport
ScRange aRange;
String aStreamPath;
String aNonConvertibleChars;
- ULONG nSizeLimit;
+ sal_uLong nSizeLimit;
sal_Unicode cSep; // Separator
sal_Unicode cStr; // String Delimiter
- BOOL bFormulas; // Formeln im Text?
- BOOL bIncludeFiltered; // include filtered rows? (default true)
- BOOL bAll; // keine Selektion
- BOOL bSingle; // Einfachselektion
- BOOL bUndo; // Mit Undo?
- BOOL bOverflow; // zuviele Zeilen/Spalten
+ sal_Bool bFormulas; // Formeln im Text?
+ sal_Bool bIncludeFiltered; // include filtered rows? (default true)
+ sal_Bool bAll; // keine Selektion
+ sal_Bool bSingle; // Einfachselektion
+ sal_Bool bUndo; // Mit Undo?
+ sal_Bool bOverflow; // zuviele Zeilen/Spalten
bool mbApi;
ScExportTextOptions mExportTextOptions;
ScAsciiOptions* pExtOptions; // erweiterte Optionen
- BOOL StartPaste(); // Protect-Check, Undo einrichten
+ sal_Bool StartPaste(); // Protect-Check, Undo einrichten
void EndPaste(); // Undo/Redo-Aktionen, Repaint
- BOOL Doc2Text( SvStream& );
- BOOL Text2Doc( SvStream& );
- BOOL Doc2Sylk( SvStream& );
- BOOL Sylk2Doc( SvStream& );
- BOOL Doc2HTML( SvStream&, const String& );
- BOOL Doc2RTF( SvStream& );
- BOOL Doc2Dif( SvStream& );
- BOOL Dif2Doc( SvStream& );
- BOOL ExtText2Doc( SvStream& ); // mit pExtOptions
- BOOL RTF2Doc( SvStream&, const String& rBaseURL );
- BOOL HTML2Doc( SvStream&, const String& rBaseURL );
+ sal_Bool Doc2Text( SvStream& );
+ sal_Bool Text2Doc( SvStream& );
+ sal_Bool Doc2Sylk( SvStream& );
+ sal_Bool Sylk2Doc( SvStream& );
+ sal_Bool Doc2HTML( SvStream&, const String& );
+ sal_Bool Doc2RTF( SvStream& );
+ sal_Bool Doc2Dif( SvStream& );
+ sal_Bool Dif2Doc( SvStream& );
+ sal_Bool ExtText2Doc( SvStream& ); // mit pExtOptions
+ sal_Bool RTF2Doc( SvStream&, const String& rBaseURL );
+ sal_Bool HTML2Doc( SvStream&, const String& rBaseURL );
public:
ScImportExport( ScDocument* ); // Gesamtdokument
@@ -100,22 +100,22 @@ public:
void SetExtOptions( const ScAsciiOptions& rOpt );
- BOOL IsDoubleRef() const { return BOOL( !( bAll || bSingle ) ); }
- BOOL IsSingleRef() const { return bSingle; }
- BOOL IsNoRef() const { return bAll; }
- BOOL IsRef() const { return BOOL( !bAll ); }
+ sal_Bool IsDoubleRef() const { return sal_Bool( !( bAll || bSingle ) ); }
+ sal_Bool IsSingleRef() const { return bSingle; }
+ sal_Bool IsNoRef() const { return bAll; }
+ sal_Bool IsRef() const { return sal_Bool( !bAll ); }
const ScRange& GetRange() const { return aRange; }
- BOOL IsUndo() const { return bUndo; }
- void SetUndo( BOOL b ) { bUndo = b; }
+ sal_Bool IsUndo() const { return bUndo; }
+ void SetUndo( sal_Bool b ) { bUndo = b; }
- static BOOL IsFormatSupported( ULONG nFormat );
+ static sal_Bool IsFormatSupported( sal_uLong nFormat );
static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p,
String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted );
- static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero = FALSE );
+ static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, sal_Bool bZero = false );
static void WriteUnicodeOrByteEndl( SvStream& rStrm );
- static inline BOOL IsEndianSwap( const SvStream& rStrm );
+ static inline sal_Bool IsEndianSwap( const SvStream& rStrm );
//! only if stream is only used in own (!) memory
static inline void SetNoEndianSwap( SvStream& rStrm );
@@ -124,29 +124,29 @@ public:
void SetSeparator( sal_Unicode c ) { cSep = c; }
sal_Unicode GetDelimiter() const { return cStr; }
void SetDelimiter( sal_Unicode c ) { cStr = c; }
- BOOL IsFormulas() const { return bFormulas; }
- void SetFormulas( BOOL b ) { bFormulas = b; }
- BOOL IsIncludeFiltered() const { return bIncludeFiltered; }
- void SetIncludeFiltered( BOOL b ) { bIncludeFiltered = b; }
+ sal_Bool IsFormulas() const { return bFormulas; }
+ void SetFormulas( sal_Bool b ) { bFormulas = b; }
+ sal_Bool IsIncludeFiltered() const { return bIncludeFiltered; }
+ void SetIncludeFiltered( sal_Bool b ) { bIncludeFiltered = b; }
- void SetSizeLimit( ULONG nNew ) { nSizeLimit = nNew; } // momentan nur fuer Ascii
+ void SetSizeLimit( sal_uLong nNew ) { nSizeLimit = nNew; } // momentan nur fuer Ascii
void SetStreamPath( const String& rPath ) { aStreamPath = rPath; }
const String& GetStreamPath() const { return aStreamPath; }
- BOOL ImportString( const ::rtl::OUString&, ULONG=FORMAT_STRING );
- BOOL ExportString( ::rtl::OUString&, ULONG=FORMAT_STRING );
- BOOL ExportByteString( ByteString&, rtl_TextEncoding, ULONG=FORMAT_STRING );
+ sal_Bool ImportString( const ::rtl::OUString&, sal_uLong=FORMAT_STRING );
+ sal_Bool ExportString( ::rtl::OUString&, sal_uLong=FORMAT_STRING );
+ sal_Bool ExportByteString( ByteString&, rtl_TextEncoding, sal_uLong=FORMAT_STRING );
- BOOL ImportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING );
- BOOL ExportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING );
+ sal_Bool ImportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING );
+ sal_Bool ExportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING );
- BOOL ImportData( const String& rMimeType,
+ sal_Bool ImportData( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue );
- BOOL ExportData( const String& rMimeType,
+ sal_Bool ExportData( const String& rMimeType,
::com::sun::star::uno::Any & rValue );
- BOOL IsOverflow() const { return bOverflow; } // nach dem Importieren
+ sal_Bool IsOverflow() const { return bOverflow; } // nach dem Importieren
const String& GetNonConvertibleChars() const { return aNonConvertibleChars; }
@@ -157,7 +157,7 @@ public:
};
-inline BOOL ScImportExport::IsEndianSwap( const SvStream& rStrm )
+inline sal_Bool ScImportExport::IsEndianSwap( const SvStream& rStrm )
{
#ifdef OSL_BIGENDIAN
return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN;
@@ -185,7 +185,7 @@ public:
rStr.getLength() * sizeof(sal_Unicode), STREAM_READ)
{
SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
- SetEndianSwap( FALSE );
+ SetEndianSwap( false );
}
};
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index b6fb5eead65a..76c4daca74cc 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -70,38 +70,38 @@ private:
TypedScStrCollection* pFormulaData;
TypedScStrCollection* pFormulaDataPara;
Window* pTipVisibleParent;
- ULONG nTipVisible;
+ sal_uLong nTipVisible;
Window* pTipVisibleSecParent;
- ULONG nTipVisibleSec;
+ sal_uLong nTipVisibleSec;
String aManualTip;
String aAutoSearch;
- USHORT nAutoPos;
- BOOL bUseTab; // Blaettern moeglich
+ sal_uInt16 nAutoPos;
+ sal_Bool bUseTab; // Blaettern moeglich
- BOOL bTextValid; // Text noch nicht in Edit-Engine
+ sal_Bool bTextValid; // Text noch nicht in Edit-Engine
String aCurrentText;
String aFormText; // fuer Funktions-Autopilot
xub_StrLen nFormSelStart; // Selektion fuer Funktions-Autopilot
xub_StrLen nFormSelEnd;
- USHORT nAutoPar; // autom.parentheses than can be overwritten
+ sal_uInt16 nAutoPar; // autom.parentheses than can be overwritten
ScAddress aCursorPos;
ScInputMode eMode;
- BOOL bModified;
- BOOL bSelIsRef;
- BOOL bFormulaMode;
- BOOL bInRangeUpdate;
- BOOL bParenthesisShown;
- BOOL bCreatingFuncView;
- BOOL bInEnterHandler;
- BOOL bCommandErrorShown;
- BOOL bInOwnChange;
-
- BOOL bProtected;
- BOOL bCellHasPercentFormat;
- ULONG nValidation;
+ sal_Bool bModified;
+ sal_Bool bSelIsRef;
+ sal_Bool bFormulaMode;
+ sal_Bool bInRangeUpdate;
+ sal_Bool bParenthesisShown;
+ sal_Bool bCreatingFuncView;
+ sal_Bool bInEnterHandler;
+ sal_Bool bCommandErrorShown;
+ sal_Bool bInOwnChange;
+
+ sal_Bool bProtected;
+ sal_Bool bCellHasPercentFormat;
+ sal_uLong nValidation;
SvxCellHorJustify eAttrAdjust;
Fraction aScaleX; // fuer Ref-MapMode
@@ -112,15 +112,15 @@ private:
const ScPatternAttr* pLastPattern;
SfxItemSet* pEditDefaults;
- BOOL bLastIsSymbol;
+ sal_Bool bLastIsSymbol;
ScInputHdlState* pLastState;
Timer* pDelayTimer;
ScRangeFindList* pRangeFindList;
- static BOOL bAutoComplete; // aus App-Optionen
- static BOOL bOptLoaded;
+ static sal_Bool bAutoComplete; // aus App-Optionen
+ static sal_Bool bOptLoaded;
#ifdef _INPUTHDL_CXX
private:
@@ -141,11 +141,11 @@ private:
DECL_LINK( DelayTimer, Timer* );
void GetColData();
void UseColData();
- void NextAutoEntry( BOOL bBack );
+ void NextAutoEntry( sal_Bool bBack );
void UpdateAdjust( sal_Unicode cTyped );
void GetFormulaData();
void UseFormulaData();
- void NextFormulaEntry( BOOL bBack );
+ void NextFormulaEntry( sal_Bool bBack );
void PasteFunctionData();
void PasteManualTip();
EditView* GetFuncEditView();
@@ -156,7 +156,7 @@ private:
void UpdateAutoCorrFlag();
void ResetAutoPar();
void AutoParAdded();
- BOOL CursorAtClosingPar();
+ sal_Bool CursorAtClosingPar();
void SkipClosingPar();
DECL_LINK( ModifyHdl, void* );
DECL_LINK( ShowHideTipVisibleParentListener, VclWindowEvent* );
@@ -168,36 +168,38 @@ public:
virtual ~ScInputHandler();
void SetMode( ScInputMode eNewMode );
- BOOL IsInputMode() const { return (eMode != SC_INPUT_NONE); }
- BOOL IsEditMode() const { return (eMode != SC_INPUT_NONE &&
+ sal_Bool IsInputMode() const { return (eMode != SC_INPUT_NONE); }
+ sal_Bool IsEditMode() const { return (eMode != SC_INPUT_NONE &&
eMode != SC_INPUT_TYPE); }
- BOOL IsTopMode() const { return (eMode == SC_INPUT_TOP); }
+ sal_Bool IsTopMode() const { return (eMode == SC_INPUT_TOP); }
const String& GetEditString();
const String& GetFormString() const { return aFormText; }
- BOOL GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
+ const ScAddress& GetCursorPos() const { return aCursorPos; }
- BOOL KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit = FALSE );
- void EnterHandler( BYTE nBlockMode = 0 );
+ sal_Bool GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
+
+ sal_Bool KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit = false );
+ void EnterHandler( sal_uInt8 nBlockMode = 0 );
void CancelHandler();
void SetReference( const ScRange& rRef, ScDocument* pDoc );
void AddRefEntry();
- BOOL InputCommand( const CommandEvent& rCEvt, BOOL bForce );
+ sal_Bool InputCommand( const CommandEvent& rCEvt, sal_Bool bForce );
- void InsertFunction( const String& rFuncName, BOOL bAddPar = TRUE );
+ void InsertFunction( const String& rFuncName, sal_Bool bAddPar = sal_True );
void ClearText();
void InputSelection( EditView* pView );
- void InputChanged( EditView* pView, BOOL bFromNotify = FALSE );
+ void InputChanged( EditView* pView, sal_Bool bFromNotify = false );
void ViewShellGone(ScTabViewShell* pViewSh);
void SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;}
- void NotifyChange( const ScInputHdlState* pState, BOOL bForce = FALSE,
+ void NotifyChange( const ScInputHdlState* pState, sal_Bool bForce = false,
ScTabViewShell* pSourceSh = NULL,
- BOOL bStopEditing = TRUE);
+ sal_Bool bStopEditing = sal_True);
void UpdateCellAdjust( SvxCellHorJustify eJust );
void ResetDelayTimer(); //BugId 54702
@@ -215,21 +217,21 @@ public:
EditView* GetTableView() { return pTableView; }
EditView* GetTopView() { return pTopView; }
- BOOL DataChanging( sal_Unicode cTyped = 0, BOOL bFromCommand = FALSE );
- void DataChanged( BOOL bFromTopNotify = FALSE );
+ sal_Bool DataChanging( sal_Unicode cTyped = 0, sal_Bool bFromCommand = false );
+ void DataChanged( sal_Bool bFromTopNotify = false );
- BOOL TakesReturn() const { return ( nTipVisible != 0 ); }
+ sal_Bool TakesReturn() const { return ( nTipVisible != 0 ); }
- void SetModified() { bModified = TRUE; }
+ void SetModified() { bModified = sal_True; }
- BOOL GetSelIsRef() const { return bSelIsRef; }
- void SetSelIsRef(BOOL bSet) { bSelIsRef = bSet; }
+ sal_Bool GetSelIsRef() const { return bSelIsRef; }
+ void SetSelIsRef(sal_Bool bSet) { bSelIsRef = bSet; }
void ShowRefFrame();
ScRangeFindList* GetRangeFindList() { return pRangeFindList; }
- void UpdateRange( USHORT nIndex, const ScRange& rNew );
+ void UpdateRange( sal_uInt16 nIndex, const ScRange& rNew );
// Kommunikation mit Funktionsautopilot
void InputGetSelection ( xub_StrLen& rStart, xub_StrLen& rEnd );
@@ -237,19 +239,19 @@ public:
void InputReplaceSelection ( const String& rStr );
String InputGetFormulaStr ();
- BOOL IsFormulaMode() const { return bFormulaMode; }
+ sal_Bool IsFormulaMode() const { return bFormulaMode; }
ScInputWindow* GetInputWindow() { return pInputWin; }
void SetInputWindow( ScInputWindow* pNew ) { pInputWin = pNew; }
- void StopInputWinEngine( BOOL bAll );
+ void StopInputWinEngine( sal_Bool bAll );
- BOOL IsInEnterHandler() const { return bInEnterHandler; }
- BOOL IsInOwnChange() const { return bInOwnChange; }
+ sal_Bool IsInEnterHandler() const { return bInEnterHandler; }
+ sal_Bool IsInOwnChange() const { return bInOwnChange; }
- BOOL IsModalMode( SfxObjectShell* pDocSh );
+ sal_Bool IsModalMode( SfxObjectShell* pDocSh );
void ForgetLastPattern();
- void UpdateSpellSettings( BOOL bFromStartTab = FALSE );
+ void UpdateSpellSettings( sal_Bool bFromStartTab = false );
void FormulaPreview();
@@ -258,7 +260,7 @@ public:
// eigentlich private, fuer SID_INPUT_SUM public
void InitRangeFinder( const String& rFormula );
- static void SetAutoComplete(BOOL bSet) { bAutoComplete = bSet; }
+ static void SetAutoComplete(sal_Bool bSet) { bAutoComplete = bSet; }
};
//========================================================================
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 46dbe9eb920a..27bc405f24c5 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -56,18 +56,18 @@ public:
void SetTextString( const String& rString );
const String& GetTextString() const;
- BOOL IsInputActive();
+ sal_Bool IsInputActive();
EditView* GetEditView();
// fuer FunktionsAutopiloten
void MakeDialogEditView();
void StartEditEngine();
- void StopEditEngine( BOOL bAll );
+ void StopEditEngine( sal_Bool bAll );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void SetFormulaMode( BOOL bSet );
+ void SetFormulaMode( sal_Bool bSet );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
@@ -104,13 +104,13 @@ private:
ScEditEngineDefaulter* pEditEngine; // erst bei Bedarf angelegt
EditView* pEditView;
AccTextDataVector maAccTextDatas; // #i105267# text datas may be cloned, remember all copies
- BOOL bIsRTL;
- BOOL bIsInsertMode;
- BOOL bFormulaMode;
+ sal_Bool bIsRTL;
+ sal_Bool bIsInsertMode;
+ sal_Bool bFormulaMode;
// #102710#; this flag should be true if a key input or a command is handled
// it prevents the call of InputChanged in the ModifyHandler of the EditEngine
- BOOL bInputMode;
+ sal_Bool bInputMode;
};
//========================================================================
@@ -120,16 +120,16 @@ class ScPosWnd : public ComboBox, public SfxListener // Positionsanzeige
private:
String aPosStr;
Accelerator* pAccel;
- ULONG nTipVisible;
- BOOL bFormulaMode;
- BOOL bTopHadFocus;
+ sal_uLong nTipVisible;
+ sal_Bool bFormulaMode;
+ sal_Bool bTopHadFocus;
public:
ScPosWnd( Window* pParent );
virtual ~ScPosWnd();
void SetPos( const String& rPosStr ); // angezeigter Text
- void SetFormulaMode( BOOL bSet );
+ void SetFormulaMode( sal_Bool bSet );
protected:
virtual void Select();
@@ -159,17 +159,17 @@ public:
virtual void Resize();
virtual void Select();
- void SetFuncString( const String& rString, BOOL bDoEdit = TRUE );
+ void SetFuncString( const String& rString, sal_Bool bDoEdit = sal_True );
void SetPosString( const String& rStr );
void SetTextString( const String& rString );
void SetOkCancelMode();
void SetSumAssignMode();
- void EnableButtons( BOOL bEnable = TRUE );
+ void EnableButtons( sal_Bool bEnable = sal_True );
- void SetFormulaMode( BOOL bSet );
+ void SetFormulaMode( sal_Bool bSet );
- BOOL IsInputActive();
+ sal_Bool IsInputActive();
EditView* GetEditView();
void TextGrabFocus();
@@ -181,7 +181,7 @@ public:
// Fuer FunktionsAutopiloten
void MakeDialogEditView();
- void StopEditEngine( BOOL bAll );
+ void StopEditEngine( sal_Bool bAll );
void SetInputHandler( ScInputHandler* pNew );
@@ -206,7 +206,7 @@ private:
String aTextCancel;
String aTextSum;
String aTextEqual;
- BOOL bIsOkCancelMode;
+ sal_Bool bIsOkCancelMode;
};
//==================================================================
@@ -215,7 +215,7 @@ class ScInputWindowWrapper : public SfxChildWindow
{
public:
ScInputWindowWrapper( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo );
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
index 7c3965ef981c..41608bccdf83 100644
--- a/sc/source/ui/inc/inscldlg.hxx
+++ b/sc/source/ui/inc/inscldlg.hxx
@@ -30,7 +30,7 @@
#define SC_INSCLDLG_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
@@ -51,7 +51,7 @@ private:
HelpButton aBtnHelp;
public:
- ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove = FALSE );
+ ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove = false );
~ScInsertCellDlg();
InsCellCmd GetInsCellCmd() const;
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 5888c1e72209..0b893ed0f7cc 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -30,7 +30,7 @@
#define SC_INSCODLG_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include "global.hxx"
@@ -41,20 +41,20 @@ class ScInsertContentsDlg : public ModalDialog
{
public:
ScInsertContentsDlg( Window* pParent,
- USHORT nCheckDefaults = 0,
+ sal_uInt16 nCheckDefaults = 0,
const String* pStrTitle = NULL );
~ScInsertContentsDlg();
- USHORT GetInsContentsCmdBits() const;
- USHORT GetFormulaCmdBits() const;
- BOOL IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();}
- BOOL IsTranspose() const {return aBtnTranspose.IsChecked();}
- BOOL IsLink() const {return aBtnLink.IsChecked();}
+ sal_uInt16 GetInsContentsCmdBits() const;
+ sal_uInt16 GetFormulaCmdBits() const;
+ sal_Bool IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();}
+ sal_Bool IsTranspose() const {return aBtnTranspose.IsChecked();}
+ sal_Bool IsLink() const {return aBtnLink.IsChecked();}
InsCellCmd GetMoveMode();
- void SetOtherDoc( BOOL bSet );
- void SetFillMode( BOOL bSet );
- void SetChangeTrack( BOOL bSet );
+ void SetOtherDoc( sal_Bool bSet );
+ void SetFillMode( sal_Bool bSet );
+ void SetChangeTrack( sal_Bool bSet );
void SetCellShiftDisabled( int nDisable );
private:
@@ -91,19 +91,19 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- BOOL bOtherDoc;
- BOOL bFillMode;
- BOOL bChangeTrack;
- BOOL bMoveDownDisabled;
- BOOL bMoveRightDisabled;
+ sal_Bool bOtherDoc;
+ sal_Bool bFillMode;
+ sal_Bool bChangeTrack;
+ sal_Bool bMoveDownDisabled;
+ sal_Bool bMoveRightDisabled;
- static BOOL bPreviousAllCheck;
- static USHORT nPreviousChecks;
- static USHORT nPreviousChecks2;
- static USHORT nPreviousFormulaChecks;
- static USHORT nPreviousMoveMode; // enum InsCellCmd
+ static sal_Bool bPreviousAllCheck;
+ static sal_uInt16 nPreviousChecks;
+ static sal_uInt16 nPreviousChecks2;
+ static sal_uInt16 nPreviousFormulaChecks;
+ static sal_uInt16 nPreviousMoveMode; // enum InsCellCmd
- void DisableChecks( BOOL bInsAllChecked = TRUE );
+ void DisableChecks( sal_Bool bInsAllChecked = sal_True );
void TestModes();
// Handler
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
index d0ae51329feb..718e6d107b9b 100644
--- a/sc/source/ui/inc/instbdlg.hxx
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -62,19 +62,20 @@ public:
virtual short Execute(); // ueberladen, um Dialog-Parent zu setzen
- BOOL GetTablesFromFile() { return aBtnFromFile.IsChecked(); }
- BOOL GetTablesAsLink() { return aBtnLink.IsChecked(); }
+ sal_Bool GetTablesFromFile() { return aBtnFromFile.IsChecked(); }
+ sal_Bool GetTablesAsLink() { return aBtnLink.IsChecked(); }
- const String* GetFirstTable( USHORT* pN = NULL );
- const String* GetNextTable( USHORT* pN = NULL );
+ const String* GetFirstTable( sal_uInt16* pN = NULL );
+ const String* GetNextTable( sal_uInt16* pN = NULL );
ScDocShell* GetDocShellTables() { return pDocShTables; }
- BOOL IsTableBefore() { return aBtnBefore.IsChecked(); }
+ sal_Bool IsTableBefore() { return aBtnBefore.IsChecked(); }
SCTAB GetTableCount() { return nTableCount;}
private:
+ FixedLine aFlPos;
RadioButton aBtnBefore;
RadioButton aBtnBehind;
- FixedLine aFlPos;
+ FixedLine aFlTable;
RadioButton aBtnNew;
RadioButton aBtnFromFile;
FixedText aFtCount;
@@ -85,7 +86,6 @@ private:
ScExpandedFixedText aFtPath;
PushButton aBtnBrowse;
CheckBox aBtnLink;
- FixedLine aFlTable;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
@@ -98,7 +98,7 @@ private:
SfxObjectShellRef aDocShTablesRef;
bool bMustClose;
- USHORT nSelTabIndex; // fuer GetFirstTable() / GetNextTable()
+ sal_uInt16 nSelTabIndex; // fuer GetFirstTable() / GetNextTable()
String aStrCurSelTable;
SCTAB nTableCount;
diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx
index f6e8946737d8..2f1c50828324 100644
--- a/sc/source/ui/inc/lbseldlg.hxx
+++ b/sc/source/ui/inc/lbseldlg.hxx
@@ -53,7 +53,7 @@ private:
public:
ScSelEntryDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList );
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index 8c37f0a5685d..2a5ab6a18ccb 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -85,7 +85,7 @@ public:
void InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh );
+ sal_uLong nRefresh );
virtual short Execute(); // overwritten to set dialog parent
@@ -93,7 +93,7 @@ public:
String GetFilter(); // may be empty
String GetOptions(); // filter options
String GetSource(); // separated by ";"
- ULONG GetRefresh(); // 0 if disabled
+ sal_uLong GetRefresh(); // 0 if disabled
};
#endif
diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx
index 76b5036b4000..25f182e74872 100644
--- a/sc/source/ui/inc/msgpool.hxx
+++ b/sc/source/ui/inc/msgpool.hxx
@@ -69,7 +69,7 @@ protected:
virtual ~ScMessagePool();
public:
- virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
+ virtual SfxMapUnit GetMetric( sal_uInt16 nWhich ) const;
};
diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx
index 1dedf6ae258d..c6e0e1b117e2 100644
--- a/sc/source/ui/inc/mtrindlg.hxx
+++ b/sc/source/ui/inc/mtrindlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
#include <vcl/field.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
@@ -41,11 +41,11 @@ class ScMetricInputDlg : public ModalDialog
{
public:
ScMetricInputDlg( Window* pParent,
- USHORT nResId, // Ableitung fuer jeden Dialog!
+ sal_uInt16 nResId, // Ableitung fuer jeden Dialog!
long nCurrent,
long nDefault,
FieldUnit eFUnit = FUNIT_MM,
- USHORT nDecimals = 2,
+ sal_uInt16 nDecimals = 2,
long nMaximum = 1000,
long nMinimum = 0,
long nFirst = 1,
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index e850d9bff41c..d563650fca05 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -32,7 +32,7 @@
#include "address.hxx"
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
@@ -48,14 +48,14 @@ public:
ScMoveTableDlg( Window* pParent, const String& rDefault );
~ScMoveTableDlg();
- USHORT GetSelectedDocument () const;
+ sal_uInt16 GetSelectedDocument () const;
SCTAB GetSelectedTable () const;
bool GetCopyTable () const;
bool GetRenameTable () const;
void GetTabNameString( String& rString ) const;
void SetForceCopyTable ();
- void EnableCopyTable (BOOL bFlag=TRUE);
- void EnableRenameTable (BOOL bFlag=TRUE);
+ void EnableCopyTable (sal_Bool bFlag=true);
+ void EnableRenameTable (sal_Bool bFlag=true);
private:
void ResetRenameInput();
@@ -85,7 +85,7 @@ private:
const String& mrDefaultName;
- USHORT nDocument;
+ sal_uInt16 nDocument;
SCTAB nTable;
bool bCopyTable:1;
bool bRenameTable:1;
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
index 852a3ce9c85c..1f494d685cb3 100644
--- a/sc/source/ui/inc/namecrea.hxx
+++ b/sc/source/ui/inc/namecrea.hxx
@@ -30,7 +30,7 @@
#define SC_NAMECREA_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include "scui_def.hxx"
@@ -46,9 +46,9 @@ protected:
CancelButton aCancelButton;
HelpButton aHelpButton;
public:
- ScNameCreateDlg( Window * pParent, USHORT nFlags );
+ ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags );
- USHORT GetFlags() const;
+ sal_uInt16 GetFlags() const;
};
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index f86dcc8d6bb9..2939c3caab0b 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -64,7 +64,7 @@ private:
PushButton aBtnAdd;
PushButton aBtnRemove;
MoreButton aBtnMore;
- BOOL bSaved;
+ sal_Bool bSaved;
const String aStrAdd; // "Hinzufuegen"
const String aStrModify; // "Aendern"
@@ -95,7 +95,7 @@ private:
protected:
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
public:
@@ -105,10 +105,10 @@ public:
~ScNameDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx
index 3c3547666f8f..c90c20904ffe 100644
--- a/sc/source/ui/inc/namepast.hxx
+++ b/sc/source/ui/inc/namepast.hxx
@@ -30,7 +30,7 @@
#define SC_NAMEPAST_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
@@ -51,7 +51,7 @@ protected:
HelpButton aHelpButton;
PushButton aInsListButton;
public:
- ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL bInsList=TRUE );
+ ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList=sal_True );
String GetSelectedName() const;
};
diff --git a/sc/source/ui/inc/navcitem.hxx b/sc/source/ui/inc/navcitem.hxx
index 90bef19cc410..7f03633061d2 100644
--- a/sc/source/ui/inc/navcitem.hxx
+++ b/sc/source/ui/inc/navcitem.hxx
@@ -40,11 +40,11 @@ class ScNavigatorDlg;
class ScNavigatorControllerItem : public SfxControllerItem
{
public:
- ScNavigatorControllerItem( USHORT nId,
+ ScNavigatorControllerItem( sal_uInt16 nId,
ScNavigatorDlg& rDlg,
SfxBindings& rBindings );
protected:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pItem );
private:
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 7d3559e3de9b..1e5fa665ad1b 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -94,7 +94,7 @@ private:
private:
const ScenarioEntry* GetSelectedEntry() const;
- void ExecuteScenarioSlot( USHORT nSlotId );
+ void ExecuteScenarioSlot( sal_uInt16 nSlotId );
void SelectScenario();
void EditScenario();
void DeleteScenario( bool bQueryBox );
@@ -151,7 +151,7 @@ protected:
private:
ScNavigatorDlg& rDlg;
SCCOL nCol;
- USHORT nKeyGroup;
+ sal_uInt16 nKeyGroup;
void EvalText ();
void ExecuteCol ();
@@ -210,7 +210,7 @@ public:
CommandToolBox( ScNavigatorDlg* pParent, const ResId& rResId );
~CommandToolBox();
- void Select( USHORT nId );
+ void Select( sal_uInt16 nId );
void UpdateButtons();
void InitImageList();
@@ -272,11 +272,11 @@ private:
long nListModeHeight;
long nInitListHeight;
NavListMode eListMode;
- USHORT nDropMode;
+ sal_uInt16 nDropMode;
SCCOL nCurCol;
SCROW nCurRow;
SCTAB nCurTab;
- BOOL bFirstBig;
+ sal_Bool bFirstBig;
ScNavigatorControllerItem** ppBoundItems;
@@ -296,7 +296,7 @@ private:
ScTabViewShell* GetTabViewShell() const;
ScNavigatorSettings* GetNavigatorSettings();
- BOOL GetViewData();
+ sal_Bool GetViewData();
void UpdateColumn ( const SCCOL* pCol = NULL );
void UpdateRow ( const SCROW* pRow = NULL );
@@ -305,12 +305,12 @@ private:
void GetDocNames(const String* pSelEntry = NULL);
- void SetListMode ( NavListMode eMode, BOOL bSetSize = TRUE );
- void ShowList ( BOOL bShow, BOOL bSetSize );
- void ShowScenarios ( BOOL bShow, BOOL bSetSize );
+ void SetListMode ( NavListMode eMode, sal_Bool bSetSize = sal_True );
+ void ShowList ( sal_Bool bShow, sal_Bool bSetSize );
+ void ShowScenarios ( sal_Bool bShow, sal_Bool bSetSize );
- void SetDropMode(USHORT nNew);
- USHORT GetDropMode() const { return nDropMode; }
+ void SetDropMode(sal_uInt16 nNew);
+ sal_uInt16 GetDropMode() const { return nDropMode; }
const String& GetStrDragMode() const { return aStrDragMode; }
const String& GetStrDisplay() const { return aStrDisplay; }
@@ -348,7 +348,7 @@ class ScNavigatorDialogWrapper: public SfxChildWindowContext
{
public:
ScNavigatorDialogWrapper( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo );
diff --git a/sc/source/ui/inc/navsett.hxx b/sc/source/ui/inc/navsett.hxx
index 3666a6be981a..6e4e85a10c39 100644
--- a/sc/source/ui/inc/navsett.hxx
+++ b/sc/source/ui/inc/navsett.hxx
@@ -38,21 +38,21 @@
class ScNavigatorSettings
{
private:
- ::std::vector< BOOL > maExpandedVec; /// Array of Booleans for expand state.
- USHORT mnRootSelected; /// Index of selected root entry.
- ULONG mnChildSelected; /// Index of selected child entry.
+ ::std::vector< sal_Bool > maExpandedVec; /// Array of Booleans for expand state.
+ sal_uInt16 mnRootSelected; /// Index of selected root entry.
+ sal_uLong mnChildSelected; /// Index of selected child entry.
public:
ScNavigatorSettings();
- inline void SetExpanded( USHORT nIndex, BOOL bExpand ) { maExpandedVec[ nIndex ] = bExpand; }
- inline BOOL IsExpanded( USHORT nIndex ) const { return maExpandedVec[ nIndex ]; }
+ inline void SetExpanded( sal_uInt16 nIndex, sal_Bool bExpand ) { maExpandedVec[ nIndex ] = bExpand; }
+ inline sal_Bool IsExpanded( sal_uInt16 nIndex ) const { return maExpandedVec[ nIndex ]; }
- inline void SetRootSelected( USHORT nIndex ) { mnRootSelected = nIndex; }
- inline USHORT GetRootSelected() const { return mnRootSelected; }
+ inline void SetRootSelected( sal_uInt16 nIndex ) { mnRootSelected = nIndex; }
+ inline sal_uInt16 GetRootSelected() const { return mnRootSelected; }
- inline void SetChildSelected( ULONG nIndex ) { mnChildSelected = nIndex; }
- inline ULONG GetChildSelected() const { return mnChildSelected; }
+ inline void SetChildSelected( sal_uLong nIndex ) { mnChildSelected = nIndex; }
+ inline sal_uLong GetChildSelected() const { return mnChildSelected; }
};
diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index 03626bfeafb7..01eeec8dbcd5 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -50,27 +50,27 @@ private:
Rectangle aVisRect;
Timer aTimer;
MapMode aMapMode;
- BOOL bLeft;
- BOOL bByKeyboard;
+ sal_Bool bLeft;
+ sal_Bool bByKeyboard;
Rectangle aRect;
SdrModel* pModel;
SdrObject* pObject;
- BOOL bVisible;
+ sal_Bool bVisible;
DECL_LINK( TimeHdl, Timer* );
public:
ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Window* pDiagonal,
ScDocument* pD, ScAddress aPos, const String& rUser,
- const MapMode& rMap, BOOL bLeftEdge, BOOL bForce, BOOL bKeyboard );
+ const MapMode& rMap, sal_Bool bLeftEdge, sal_Bool bForce, sal_Bool bKeyboard );
~ScNoteMarker();
void Draw();
void InvalidateWin();
ScAddress GetDocPos() const { return aDocPos; }
- BOOL IsByKeyboard() const { return bByKeyboard; }
+ sal_Bool IsByKeyboard() const { return bByKeyboard; }
};
diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx
index 809db33df06d..2f0b00c3e580 100644
--- a/sc/source/ui/inc/olinefun.hxx
+++ b/sc/source/ui/inc/olinefun.hxx
@@ -46,21 +46,21 @@ public:
ScOutlineDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
~ScOutlineDocFunc() {}
- BOOL MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi );
- BOOL RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi );
- BOOL RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi );
- BOOL AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+ sal_Bool MakeOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool RemoveOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool RemoveAllOutlines( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool AutoOutline( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
- BOOL SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool SelectLevel( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- BOOL ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi );
- BOOL HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+ sal_Bool ShowMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool HideMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
- BOOL ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
- BOOL HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool ShowOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
+ sal_Bool HideOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
};
diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx
index 266e67dd0999..e1dee0826d34 100644
--- a/sc/source/ui/inc/olinewin.hxx
+++ b/sc/source/ui/inc/olinewin.hxx
@@ -209,7 +209,7 @@ private:
long nLevelStart, long nEntryStart,
long nLevelEnd, long nEntryEnd );
/** Draws the specified image unpressed. */
- void DrawImageRel( long nLevelPos, long nEntryPos, USHORT nId );
+ void DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId );
/** Draws a pressed or unpressed border. */
void DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed );
diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
index f6c3a2212ca9..116097c30532 100644
--- a/sc/source/ui/inc/opredlin.hxx
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -69,7 +69,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
#endif
diff --git a/sc/source/ui/inc/optload.hxx b/sc/source/ui/inc/optload.hxx
index 26ffb04cb3be..14e1c4661903 100644
--- a/sc/source/ui/inc/optload.hxx
+++ b/sc/source/ui/inc/optload.hxx
@@ -58,7 +58,7 @@ public:
void SetDocument(ScDocument*);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index f81fbf05cd1f..c7a06213c067 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -63,7 +63,7 @@ protected:
struct ScOptConditionRow
{
String aLeftStr;
- USHORT nOperator;
+ sal_uInt16 nOperator;
String aRightStr;
ScOptConditionRow() : nOperator(0) {}
@@ -74,9 +74,9 @@ struct ScOptConditionRow
class ScOptSolverSave
{
String maObjective;
- BOOL mbMax;
- BOOL mbMin;
- BOOL mbValue;
+ sal_Bool mbMax;
+ sal_Bool mbMin;
+ sal_Bool mbValue;
String maTarget;
String maVariable;
std::vector<ScOptConditionRow> maConditions;
@@ -84,16 +84,16 @@ class ScOptSolverSave
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties;
public:
- ScOptSolverSave( const String& rObjective, BOOL bMax, BOOL bMin, BOOL bValue,
+ ScOptSolverSave( const String& rObjective, sal_Bool bMax, sal_Bool bMin, sal_Bool bValue,
const String& rTarget, const String& rVariable,
const std::vector<ScOptConditionRow>& rConditions,
const String& rEngine,
const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties );
const String& GetObjective() const { return maObjective; }
- BOOL GetMax() const { return mbMax; }
- BOOL GetMin() const { return mbMin; }
- BOOL GetValue() const { return mbValue; }
+ sal_Bool GetMax() const { return mbMax; }
+ sal_Bool GetMin() const { return mbMin; }
+ sal_Bool GetValue() const { return mbValue; }
const String& GetTarget() const { return maTarget; }
const String& GetVariable() const { return maVariable; }
const std::vector<ScOptConditionRow>& GetConditions() const { return maConditions; }
@@ -110,9 +110,9 @@ public:
~ScOptSolverDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedText maFtObjectiveCell;
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 4f9d493aac14..b109d2951eb0 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -106,7 +106,7 @@ private:
ScOutputType eType; // Bildschirm/Drucker ...
double nPPTX; // Pixel per Twips
double nPPTY;
-// USHORT nZoom; // Zoom-Faktor (Prozent) - fuer GetFont
+// sal_uInt16 nZoom; // Zoom-Faktor (Prozent) - fuer GetFont
Fraction aZoomX;
Fraction aZoomY;
@@ -117,61 +117,61 @@ private:
// #114135#
FmFormView* pDrawView; // SdrView to paint to
- BOOL bEditMode; // InPlace editierte Zelle - nicht ausgeben
+ sal_Bool bEditMode; // InPlace editierte Zelle - nicht ausgeben
SCCOL nEditCol;
SCROW nEditRow;
- BOOL bMetaFile; // Ausgabe auf Metafile (nicht in Pixeln!)
- BOOL bSingleGrid; // beim Gitter bChanged auswerten
+ sal_Bool bMetaFile; // Ausgabe auf Metafile (nicht in Pixeln!)
+ sal_Bool bSingleGrid; // beim Gitter bChanged auswerten
- BOOL bPagebreakMode; // Seitenumbruch-Vorschau
- BOOL bSolidBackground; // weiss statt transparent
+ sal_Bool bPagebreakMode; // Seitenumbruch-Vorschau
+ sal_Bool bSolidBackground; // weiss statt transparent
- BOOL bUseStyleColor;
- BOOL bForceAutoColor;
+ sal_Bool bUseStyleColor;
+ sal_Bool bForceAutoColor;
- BOOL bSyntaxMode; // Syntax-Highlighting
+ sal_Bool bSyntaxMode; // Syntax-Highlighting
Color* pValueColor;
Color* pTextColor;
Color* pFormulaColor;
Color aGridColor;
- BOOL bShowNullValues;
- BOOL bShowFormulas;
- BOOL bShowSpellErrors; // Spell-Errors in EditObjekten anzeigen
- BOOL bMarkClipped;
+ sal_Bool bShowNullValues;
+ sal_Bool bShowFormulas;
+ sal_Bool bShowSpellErrors; // Spell-Errors in EditObjekten anzeigen
+ sal_Bool bMarkClipped;
- BOOL bSnapPixel;
+ sal_Bool bSnapPixel;
- BOOL bAnyRotated; // intern
- BOOL bAnyClipped; // intern
- BOOL bTabProtected;
- BYTE nTabTextDirection; // EEHorizontalTextDirection values
- BOOL bLayoutRTL;
+ sal_Bool bAnyRotated; // intern
+ sal_Bool bAnyClipped; // intern
+ sal_Bool bTabProtected;
+ sal_uInt8 nTabTextDirection; // EEHorizontalTextDirection values
+ sal_Bool bLayoutRTL;
// #i74769# use SdrPaintWindow direct, remember it during BeginDrawLayers/EndDrawLayers
SdrPaintWindow* mpTargetPaintWindow;
// private methods
- BOOL GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
- SCCOL& rOverX, SCROW& rOverY, BOOL bVisRowChanged );
- BOOL IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY );
+ sal_Bool GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
+ SCCOL& rOverX, SCROW& rOverY, sal_Bool bVisRowChanged );
+ sal_Bool IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY );
void GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell );
- BOOL IsAvailable( SCCOL nX, SCROW nY );
+ sal_Bool IsAvailable( SCCOL nX, SCROW nY );
void GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY,
SCCOL nCellX, SCROW nCellY, long nNeeded,
const ScPatternAttr& rPattern,
- USHORT nHorJustify, bool bCellIsValue,
+ sal_uInt16 nHorJustify, bool bCellIsValue,
bool bBreak, bool bOverwrite,
OutputAreaParam& rParam );
void ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect,
long nLeftM, long nTopM, long nRightM, long nBottomM,
- BOOL bWidth, USHORT nOrient, long nAttrRotate, BOOL bPixelToLogic,
+ sal_Bool bWidth, sal_uInt16 nOrient, long nAttrRotate, sal_Bool bPixelToLogic,
long& rEngineWidth, long& rEngineHeight, long& rNeededPixel,
bool& rLeftClip, bool& rRightClip );
@@ -203,37 +203,37 @@ public:
// #114135#
void SetDrawView( FmFormView* pNew ) { pDrawView = pNew; }
- void SetSolidBackground( BOOL bSet ) { bSolidBackground = bSet; }
- void SetUseStyleColor( BOOL bSet ) { bUseStyleColor = bSet; }
+ void SetSolidBackground( sal_Bool bSet ) { bSolidBackground = bSet; }
+ void SetUseStyleColor( sal_Bool bSet ) { bUseStyleColor = bSet; }
void SetEditCell( SCCOL nCol, SCROW nRow );
- void SetSyntaxMode( BOOL bNewMode );
- void SetMetaFileMode( BOOL bNewMode );
- void SetSingleGrid( BOOL bNewMode );
+ void SetSyntaxMode( sal_Bool bNewMode );
+ void SetMetaFileMode( sal_Bool bNewMode );
+ void SetSingleGrid( sal_Bool bNewMode );
void SetGridColor( const Color& rColor );
- void SetMarkClipped( BOOL bSet );
- void SetShowNullValues ( BOOL bSet = TRUE );
- void SetShowFormulas ( BOOL bSet = TRUE );
- void SetShowSpellErrors( BOOL bSet = TRUE );
+ void SetMarkClipped( sal_Bool bSet );
+ void SetShowNullValues ( sal_Bool bSet = sal_True );
+ void SetShowFormulas ( sal_Bool bSet = sal_True );
+ void SetShowSpellErrors( sal_Bool bSet = sal_True );
void SetMirrorWidth( long nNew );
long GetScrW() const { return nScrW; }
long GetScrH() const { return nScrH; }
- void SetSnapPixel( BOOL bSet = TRUE );
+ void SetSnapPixel( sal_Bool bSet = sal_True );
- void DrawGrid( BOOL bGrid, BOOL bPage );
- void DrawStrings( BOOL bPixelToLogic = FALSE );
+ void DrawGrid( sal_Bool bGrid, sal_Bool bPage );
+ void DrawStrings( sal_Bool bPixelToLogic = false );
void DrawDocumentBackground();
void DrawBackground();
void DrawShadow();
- void DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom);
+ void DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom);
void DrawFrame();
// with logic MapMode set!
- void DrawEdit(BOOL bPixelToLogic);
+ void DrawEdit(sal_Bool bPixelToLogic);
void FindRotated();
- void DrawRotated(BOOL bPixelToLogic); // logisch
+ void DrawRotated(sal_Bool bPixelToLogic); // logisch
void DrawClear();
@@ -246,17 +246,17 @@ public:
void DrawingSingle(const sal_uInt16 nLayer);
void DrawSelectiveObjects(const sal_uInt16 nLayer);
- BOOL SetChangedClip(); // FALSE = nix
+ sal_Bool SetChangedClip(); // sal_False = nix
PolyPolygon GetChangedArea();
void FindChanged();
void SetPagebreakMode( ScPageBreakData* pPageData );
void DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, BOOL bHandle );
+ const Color& rColor, sal_Bool bHandle );
void DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, USHORT nType );
+ const Color& rColor, sal_uInt16 nType );
void DrawChangeTrack();
void DrawClipMarks();
diff --git a/sc/source/ui/inc/pagedata.hxx b/sc/source/ui/inc/pagedata.hxx
index 31ce7a5db38c..f0114ddb2101 100644
--- a/sc/source/ui/inc/pagedata.hxx
+++ b/sc/source/ui/inc/pagedata.hxx
@@ -45,8 +45,8 @@ private:
size_t nPagesY;
SCROW* pPageEndY;
long nFirstPage;
- BOOL bTopDown;
- BOOL bAutomatic;
+ sal_Bool bTopDown;
+ sal_Bool bAutomatic;
public:
ScPrintRangeData();
@@ -65,10 +65,10 @@ public:
void SetFirstPage( long nNew ) { nFirstPage = nNew; }
long GetFirstPage() const { return nFirstPage; }
- void SetTopDown( BOOL bSet ) { bTopDown = bSet; }
- BOOL IsTopDown() const { return bTopDown; }
- void SetAutomatic( BOOL bSet ) { bAutomatic = bSet; }
- BOOL IsAutomatic() const { return bAutomatic; }
+ void SetTopDown( sal_Bool bSet ) { bTopDown = bSet; }
+ sal_Bool IsTopDown() const { return bTopDown; }
+ void SetAutomatic( sal_Bool bSet ) { bAutomatic = bSet; }
+ sal_Bool IsAutomatic() const { return bAutomatic; }
};
class ScPageBreakData
@@ -85,7 +85,7 @@ public:
size_t GetCount() const { return nUsed; }
ScPrintRangeData& GetData(size_t i);
- BOOL IsEqual( const ScPageBreakData& rOther ) const;
+ sal_Bool IsEqual( const ScPageBreakData& rOther ) const;
void AddPages();
};
diff --git a/sc/source/ui/inc/parawin.hxx b/sc/source/ui/inc/parawin.hxx
index 36fac42a01ca..bacbc2c35078 100644
--- a/sc/source/ui/inc/parawin.hxx
+++ b/sc/source/ui/inc/parawin.hxx
@@ -61,10 +61,10 @@ private:
Link aFxLink;
Link aArgModifiedLink;
- ::std::vector<USHORT> aVisibleArgMapping;
+ ::std::vector<sal_uInt16> aVisibleArgMapping;
const ScFuncDesc* pFuncDesc;
ScAnyRefDlg* pMyParent;
- USHORT nArgs; // unsuppressed arguments
+ sal_uInt16 nArgs; // unsuppressed arguments
Font aFntBold;
Font aFntLight;
@@ -89,10 +89,10 @@ private:
ArgEdit aEdArg4;
formula::RefButton aRefBtn4;
ScrollBar aSlider;
- BOOL bRefMode;
+ sal_Bool bRefMode;
- USHORT nEdFocus;
- USHORT nActiveLine;
+ sal_uInt16 nEdFocus;
+ sal_uInt16 nActiveLine;
ArgInput aArgInput[4];
String aDefaultString;
@@ -109,7 +109,7 @@ protected:
virtual void ArgumentModified();
virtual void FxClick();
- void InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx,
+ void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx,
ArgEdit& rEdArg, formula::RefButton& rRefBtn);
void DelParaArray();
@@ -117,40 +117,40 @@ protected:
void SetArgumentText(const String& aText);
- void SetArgName (USHORT no,const String &aArg);
- void SetArgNameFont (USHORT no,const Font&);
- void SetArgVal (USHORT no,const String &aArg);
+ void SetArgName (sal_uInt16 no,const String &aArg);
+ void SetArgNameFont (sal_uInt16 no,const Font&);
+ void SetArgVal (sal_uInt16 no,const String &aArg);
- void HideParaLine(USHORT no);
- void ShowParaLine(USHORT no);
- void UpdateArgDesc( USHORT nArg );
- void UpdateArgInput( USHORT nOffset, USHORT i );
+ void HideParaLine(sal_uInt16 no);
+ void ShowParaLine(sal_uInt16 no);
+ void UpdateArgDesc( sal_uInt16 nArg );
+ void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i );
public:
ScParaWin(ScAnyRefDlg* pParent,Point aPos);
~ScParaWin();
void SetFunctionDesc(const ScFuncDesc* pFDesc);
- void SetArgumentOffset(USHORT nOffset);
+ void SetArgumentOffset(sal_uInt16 nOffset);
void SetEditDesc(const String& aText);
void UpdateParas();
void ClearAll();
- BOOL IsRefMode() {return bRefMode;}
- void SetRefMode(BOOL bFlag) {bRefMode=bFlag;}
+ sal_Bool IsRefMode() {return bRefMode;}
+ void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;}
- USHORT GetActiveLine();
- void SetActiveLine(USHORT no);
+ sal_uInt16 GetActiveLine();
+ void SetActiveLine(sal_uInt16 no);
formula::RefEdit* GetActiveEdit();
String GetActiveArgName();
- String GetArgument(USHORT no);
- void SetArgument(USHORT no, const String& aString);
+ String GetArgument(sal_uInt16 no);
+ void SetArgument(sal_uInt16 no, const String& aString);
void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont);
- void SetEdFocus(USHORT nEditLine); //Sichtbare Editzeilen
- USHORT GetSliderPos();
- void SetSliderPos(USHORT nSliderPos);
+ void SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen
+ sal_uInt16 GetSliderPos();
+ void SetSliderPos(sal_uInt16 nSliderPos);
void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; }
const Link& GetScrollHdl() const { return aScrollLink; }
diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx
index 6a57c9229eea..bb68e07b3891 100644
--- a/sc/source/ui/inc/pfiltdlg.hxx
+++ b/sc/source/ui/inc/pfiltdlg.hxx
@@ -97,14 +97,14 @@ private:
const String aStrRow;
const String aStrColumn;
- const USHORT nWhichQuery;
+ const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
ScQueryItem* pOutItem;
ScViewData* pViewData;
ScDocument* pDoc;
SCTAB nSrcTab;
- USHORT nFieldCount;
+ sal_uInt16 nFieldCount;
ComboBox* aValueEdArr[3];
ListBox* aFieldLbArr[3];
ListBox* aCondLbArr[3];
@@ -115,9 +115,9 @@ private:
private:
void Init ( const SfxItemSet& rArgSet );
void FillFieldLists ();
- void UpdateValueList ( USHORT nList );
- void ClearValueList ( USHORT nList );
- USHORT GetFieldSelPos ( SCCOL nField );
+ void UpdateValueList ( sal_uInt16 nList );
+ void ClearValueList ( sal_uInt16 nList );
+ sal_uInt16 GetFieldSelPos ( SCCOL nField );
// Handler:
DECL_LINK( LbSelectHdl, ListBox* );
diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx
index 9ab60717c635..b64e9753e43d 100644
--- a/sc/source/ui/inc/pfuncache.hxx
+++ b/sc/source/ui/inc/pfuncache.hxx
@@ -67,7 +67,7 @@ public:
void SetRanges(const ScRangeList& rNew) { aRanges = rNew; }
void SetOptions(const ScPrintOptions& rNew) { aOptions = rNew; }
- BOOL operator==(const ScPrintSelectionStatus& rOther) const
+ sal_Bool operator==(const ScPrintSelectionStatus& rOther) const
{ return eMode == rOther.eMode && aRanges == rOther.aRanges && aOptions == rOther.aOptions; }
ScPrintSelectionMode GetMode() const { return eMode; }
@@ -110,7 +110,7 @@ public:
const ScPrintSelectionStatus& rStatus );
~ScPrintFuncCache();
- BOOL IsSameSelection( const ScPrintSelectionStatus& rStatus ) const;
+ sal_Bool IsSameSelection( const ScPrintSelectionStatus& rStatus ) const;
void InitLocations( const ScMarkData& rMark, OutputDevice* pDev );
bool FindLocation( const ScAddress& rCell, ScPrintPageLocation& rLocation ) const;
diff --git a/sc/source/ui/inc/pntlock.hxx b/sc/source/ui/inc/pntlock.hxx
index 1633a160632d..d88d89d745d7 100644
--- a/sc/source/ui/inc/pntlock.hxx
+++ b/sc/source/ui/inc/pntlock.hxx
@@ -35,32 +35,32 @@ class ScPaintLockData
{
private:
ScRangeListRef xRangeList;
- USHORT nMode;
- USHORT nLevel;
- USHORT nDocLevel;
- USHORT nParts;
- BOOL bModified;
+ sal_uInt16 nMode;
+ sal_uInt16 nLevel;
+ sal_uInt16 nDocLevel;
+ sal_uInt16 nParts;
+ sal_Bool bModified;
public:
- ScPaintLockData(USHORT nNewMode);
+ ScPaintLockData(sal_uInt16 nNewMode);
~ScPaintLockData();
- void AddRange( const ScRange& rRange, USHORT nP );
+ void AddRange( const ScRange& rRange, sal_uInt16 nP );
- void SetModified() { bModified = TRUE; }
+ void SetModified() { bModified = sal_True; }
void IncLevel(sal_Bool bDoc)
{ if (bDoc) ++nDocLevel; else ++nLevel; }
void DecLevel(sal_Bool bDoc)
{ if (bDoc) --nDocLevel; else --nLevel; }
const ScRangeListRef& GetRangeList() const { return xRangeList; }
- USHORT GetParts() const { return nParts; }
- USHORT GetLevel(sal_Bool bDoc) const
+ sal_uInt16 GetParts() const { return nParts; }
+ sal_uInt16 GetLevel(sal_Bool bDoc) const
{ return bDoc ? nDocLevel : nLevel; }
- BOOL GetModified() const { return bModified; }
+ sal_Bool GetModified() const { return bModified; }
// fuer Wiederherstellen nach Reset
- void SetLevel(USHORT nNew, sal_Bool bDoc)
+ void SetLevel(sal_uInt16 nNew, sal_Bool bDoc)
{ if (bDoc) nDocLevel = nNew; else nLevel = nNew; }
};
diff --git a/sc/source/ui/inc/popmenu.hxx b/sc/source/ui/inc/popmenu.hxx
index ee5bb314f213..a7ee2d7bfd3e 100644
--- a/sc/source/ui/inc/popmenu.hxx
+++ b/sc/source/ui/inc/popmenu.hxx
@@ -35,15 +35,15 @@
class SC_DLLPUBLIC ScPopupMenu : public PopupMenu
{
private:
- USHORT nSel;
- BOOL bHit;
+ sal_uInt16 nSel;
+ sal_Bool bHit;
protected:
virtual void Select();
public:
- ScPopupMenu() : nSel(0),bHit(FALSE) {}
- ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(FALSE) {}
- USHORT GetSelected() const { return nSel; }
- BOOL WasHit() const { return bHit; }
+ ScPopupMenu() : nSel(0),bHit(false) {}
+ ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(false) {}
+ sal_uInt16 GetSelected() const { return nSel; }
+ sal_Bool WasHit() const { return bHit; }
};
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 870441a574c0..6988259526d0 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -41,11 +41,11 @@ class ScPreview : public Window
private:
// eingestellt:
long nPageNo; // Seite im Dokument
- USHORT nZoom; // eingestellter Zoom
+ sal_uInt16 nZoom; // eingestellter Zoom
Point aOffset; // positiv
// berechnet:
- BOOL bValid; // folgende Werte gueltig
+ sal_Bool bValid; // folgende Werte gueltig
SCTAB nTabCount;
SCTAB nTabsTested; // fuer wieviele Tabellen ist nPages gueltig?
long nPages[MAXTABCOUNT];
@@ -58,8 +58,8 @@ private:
Time aTime;
long nTotalPages;
Size aPageSize; // fuer GetOptimalZoom
- BOOL bStateValid;
- BOOL bLocationValid;
+ sal_Bool bStateValid;
+ sal_Bool bLocationValid;
ScPrintState aState;
ScPreviewLocationData* pLocationData; // stores table layout for accessibility API
FmFormView* pDrawView;
@@ -67,26 +67,26 @@ private:
SCTAB nCurTab;
// intern:
- BOOL bInPaint;
- BOOL bInGetState;
+ sal_Bool bInPaint;
+ sal_Bool bInGetState;
ScDocShell* pDocShell;
ScPreviewShell* pViewShell;
- BOOL bLeftRulerMove;
- BOOL bRightRulerMove;
- BOOL bTopRulerMove;
- BOOL bBottomRulerMove;
- BOOL bHeaderRulerMove;
- BOOL bFooterRulerMove;
-
- BOOL bLeftRulerChange;
- BOOL bRightRulerChange;
- BOOL bTopRulerChange;
- BOOL bBottomRulerChange;
- BOOL bHeaderRulerChange;
- BOOL bFooterRulerChange;
- BOOL bPageMargin;
- BOOL bColRulerMove;
+ sal_Bool bLeftRulerMove;
+ sal_Bool bRightRulerMove;
+ sal_Bool bTopRulerMove;
+ sal_Bool bBottomRulerMove;
+ sal_Bool bHeaderRulerMove;
+ sal_Bool bFooterRulerMove;
+
+ sal_Bool bLeftRulerChange;
+ sal_Bool bRightRulerChange;
+ sal_Bool bTopRulerChange;
+ sal_Bool bBottomRulerChange;
+ sal_Bool bHeaderRulerChange;
+ sal_Bool bFooterRulerChange;
+ sal_Bool bPageMargin;
+ sal_Bool bColRulerMove;
ScRange aPageArea;
long nRight[ MAXCOL+1 ];
long nLeftPosition;
@@ -104,7 +104,7 @@ private:
void UpdateDrawView();
void DoPrint( ScPreviewLocationData* pFillLocation );
- void InvalidateLocationData( ULONG nId );
+ void InvalidateLocationData( sal_uLong nId );
using Window::SetZoom;
@@ -127,18 +127,18 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void DataChanged(BOOL bNewTime = FALSE); // statt Invalidate rufen
+ void DataChanged(sal_Bool bNewTime = false); // statt Invalidate rufen
void DoInvalidate();
void SetXOffset( long nX );
void SetYOffset( long nY );
- void SetZoom(USHORT nNewZoom);
+ void SetZoom(sal_uInt16 nNewZoom);
void SetPageNo( long nPage );
- BOOL GetPageMargins()const { return bPageMargin; }
- void SetPageMargins( BOOL bVal ) { bPageMargin = bVal; }
- void DrawInvert( long nDragPos, USHORT nFlags );
- void DragMove( long nDragMovePos, USHORT nFlags );
+ sal_Bool GetPageMargins()const { return bPageMargin; }
+ void SetPageMargins( sal_Bool bVal ) { bPageMargin = bVal; }
+ void DrawInvert( long nDragPos, sal_uInt16 nFlags );
+ void DragMove( long nDragMovePos, sal_uInt16 nFlags );
const ScPreviewLocationData& GetLocationData();
@@ -146,19 +146,19 @@ public:
String GetPosString();
long GetPageNo() const { return nPageNo; }
- USHORT GetZoom() const { return nZoom; }
+ sal_uInt16 GetZoom() const { return nZoom; }
Point GetOffset() const { return aOffset; }
SCTAB GetTab() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTab; }
long GetTotalPages() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTotalPages; }
- BOOL AllTested() const { return bValid && nTabsTested >= nTabCount; }
+ sal_Bool AllTested() const { return bValid && nTabsTested >= nTabCount; }
- USHORT GetOptimalZoom(BOOL bWidthOnly);
+ sal_uInt16 GetOptimalZoom(sal_Bool bWidthOnly);
long GetFirstPage(SCTAB nTab);
void CalcAll() { CalcPages(MAXTAB); }
- void SetInGetState(BOOL bSet) { bInGetState = bSet; }
+ void SetInGetState(sal_Bool bSet) { bInGetState = bSet; }
DECL_STATIC_LINK( ScPreview, InvalidateHdl, void* );
static void StaticInvalidate();
diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx
index b706bdc6ca09..936803cd88c2 100644
--- a/sc/source/ui/inc/prevloc.hxx
+++ b/sc/source/ui/inc/prevloc.hxx
@@ -53,12 +53,12 @@ class ScPreviewLocationEntry;
struct ScPreviewColRowInfo
{
- BOOL bIsHeader;
+ sal_Bool bIsHeader;
SCCOLROW nDocIndex;
long nPixelStart;
long nPixelEnd;
- void Set( BOOL bHeader, SCCOLROW nIndex, long nStart, long nEnd )
+ void Set( sal_Bool bHeader, SCCOLROW nIndex, long nStart, long nEnd )
{
bIsHeader = bHeader;
nDocIndex = nIndex;
@@ -100,7 +100,7 @@ class ScPreviewLocationData
MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES];
Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES];
sal_uInt8 aDrawRangeId[SC_PREVIEW_MAXRANGES];
- USHORT nDrawRanges;
+ sal_uInt16 nDrawRanges;
SCTAB nPrintTab;
boost::ptr_list<ScPreviewLocationEntry> aEntries;
@@ -113,11 +113,11 @@ public:
void SetCellMapMode( const MapMode& rMapMode );
void SetPrintTab( SCTAB nNew );
void Clear();
- void AddCellRange( const Rectangle& rRect, const ScRange& rRange, BOOL bRepCol, BOOL bRepRow,
+ void AddCellRange( const Rectangle& rRect, const ScRange& rRange, sal_Bool bRepCol, sal_Bool bRepRow,
const MapMode& rDrawMap );
- void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, BOOL bRepCol );
- void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, BOOL bRepRow );
- void AddHeaderFooter( const Rectangle& rRect, BOOL bHeader, BOOL bLeft );
+ void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, sal_Bool bRepCol );
+ void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, sal_Bool bRepRow );
+ void AddHeaderFooter( const Rectangle& rRect, sal_Bool bHeader, sal_Bool bLeft );
void AddNoteMark( const Rectangle& rRect, const ScAddress& rPos );
void AddNoteText( const Rectangle& rRect, const ScAddress& rPos );
@@ -126,24 +126,24 @@ public:
// Get info on visible columns/rows in the visible area
void GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const;
- USHORT GetDrawRanges() const { return nDrawRanges; }
- void GetDrawRange( USHORT nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const;
+ sal_uInt16 GetDrawRanges() const { return nDrawRanges; }
+ void GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const;
- BOOL GetHeaderPosition( Rectangle& rHeaderRect ) const;
- BOOL GetFooterPosition( Rectangle& rFooterRect ) const;
- BOOL IsHeaderLeft() const;
- BOOL IsFooterLeft() const;
+ sal_Bool GetHeaderPosition( Rectangle& rHeaderRect ) const;
+ sal_Bool GetFooterPosition( Rectangle& rFooterRect ) const;
+ sal_Bool IsHeaderLeft() const;
+ sal_Bool IsFooterLeft() const;
- long GetNoteCountInRange( const Rectangle& rVisiblePixel, BOOL bNoteMarks ) const;
- BOOL GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, BOOL bNoteMarks,
+ long GetNoteCountInRange( const Rectangle& rVisiblePixel, sal_Bool bNoteMarks ) const;
+ sal_Bool GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, sal_Bool bNoteMarks,
ScAddress& rCellPos, Rectangle& rNoteRect ) const;
- Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, BOOL bNoteMarks,
+ Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, sal_Bool bNoteMarks,
const ScAddress& aCellPos) const;
// Check if any cells (including column/row headers) are in the visible area
- BOOL HasCellsInRange( const Rectangle& rVisiblePixel ) const;
+ sal_Bool HasCellsInRange( const Rectangle& rVisiblePixel ) const;
- BOOL GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const;
+ sal_Bool GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const;
// returns the rectangle where the EditEngine draws the text of a Header Cell
// if bColHeader is true it returns the rectangle of the header of the column in rCellPos
@@ -152,8 +152,8 @@ public:
Rectangle GetCellOutputRect(const ScAddress& rCellPos) const;
// Query the range and rectangle of the main (non-repeat) cell range.
- // Returns FALSE if not contained.
- BOOL GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const;
+ // Returns sal_False if not contained.
+ sal_Bool GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const;
};
#endif
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 861fba46d892..271a35260e99 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -58,7 +58,7 @@ class ScPreviewShell: public SfxViewShell
Window* pCorner;
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData; // ViewData
- BYTE nSourceDesignMode; // form design mode from TabView
+ sal_uInt8 nSourceDesignMode; // form design mode from TabView
SvxZoomType eZoom;
long nMaxVertPos;
@@ -67,11 +67,11 @@ class ScPreviewShell: public SfxViewShell
private:
void Construct( Window* pParent );
DECL_LINK(ScrollHandler, ScrollBar* );
- void DoScroll( USHORT nMode );
+ void DoScroll( sal_uInt16 nMode );
protected:
- virtual void Activate(BOOL bMDI);
- virtual void Deactivate(BOOL bMDI);
+ virtual void Activate(sal_Bool bMDI);
+ virtual void Deactivate(sal_Bool bMDI);
virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize );
@@ -82,11 +82,11 @@ protected:
virtual String GetDescription() const;
- virtual void WriteUserData(String &, BOOL bBrowse = FALSE);
- virtual void ReadUserData(const String &, BOOL bBrowse = FALSE);
+ virtual void WriteUserData(String &, sal_Bool bBrowse = false);
+ virtual void ReadUserData(const String &, sal_Bool bBrowse = false);
- virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
- virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
+ virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
public:
TYPEINFO();
@@ -102,7 +102,7 @@ public:
void InitStartTable(SCTAB nTab);
void UpdateScrollBars();
- BOOL ScrollCommand( const CommandEvent& rCEvt );
+ sal_Bool ScrollCommand( const CommandEvent& rCEvt );
void Execute( SfxRequest& rReq );
void GetState( SfxItemSet& rSet );
@@ -111,22 +111,18 @@ public:
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >
GetSourceData() const { return aSourceData; }
- BYTE GetSourceDesignMode() const { return nSourceDesignMode; }
+ sal_uInt8 GetSourceDesignMode() const { return nSourceDesignMode; }
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- virtual USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual PrintDialog* CreatePrintDialog( Window* pParent );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = false );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
- virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
void BroadcastAccessibility( const SfxHint &rHint );
- BOOL HasAccessibilityObjects();
+ sal_Bool HasAccessibilityObjects();
const ScPreviewLocationData& GetLocationData();
ScDocument* GetDocument();
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 41d33d693607..84f486999315 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -63,14 +63,14 @@ class FmFormView;
// Einstellungen fuer Kopf-/Fusszeilen
struct ScPrintHFParam
{
- BOOL bEnable;
- BOOL bDynamic;
- BOOL bShared;
+ sal_Bool bEnable;
+ sal_Bool bDynamic;
+ sal_Bool bShared;
long nHeight; // insgesamt (Hoehe+Abstand+Rahmen)
long nManHeight; // eingestellte Groesse (Min. bei dynamisch)
- USHORT nDistance;
- USHORT nLeft; // Raender
- USHORT nRight;
+ sal_uInt16 nDistance;
+ sal_uInt16 nLeft; // Raender
+ sal_uInt16 nRight;
const ScPageHFItem* pLeft;
const ScPageHFItem* pRight;
const SvxBoxItem* pBorder;
@@ -90,7 +90,7 @@ public:
MapMode aUserMapMode;
Paper ePaper;
Orientation eOrientation;
- USHORT nPaperBin;
+ sal_uInt16 nPaperBin;
};
struct ScPrintState // Variablen aus ScPrintFunc retten
@@ -100,7 +100,7 @@ struct ScPrintState // Variablen aus ScPrintFunc retten
SCROW nStartRow;
SCCOL nEndCol;
SCROW nEndRow;
- USHORT nZoom;
+ sal_uInt16 nZoom;
size_t nPagesX;
size_t nPagesY;
long nTabPages;
@@ -115,7 +115,7 @@ private:
SCROW nStartRow;
SCROW nEndRow;
size_t nPagesX;
- BOOL* pHidden;
+ sal_Bool* pHidden;
//! Anzahl wirklich sichtbarer cachen???
public:
@@ -133,7 +133,7 @@ public:
void SetPagesX(size_t nNew);
void SetHidden(size_t nX);
- BOOL IsHidden(size_t nX) const;
+ sal_Bool IsHidden(size_t nX) const;
size_t CountVisible() const;
};
@@ -151,10 +151,10 @@ private:
Point aSrcOffset; // Papier-1/100 mm
Point aOffset; // mit Faktor aus Seitenformat skaliert
- USHORT nManualZoom; // Zoom in Preview (Prozent)
- BOOL bClearWin; // Ausgabe vorher loeschen
- BOOL bUseStyleColor;
- BOOL bIsRender;
+ sal_uInt16 nManualZoom; // Zoom in Preview (Prozent)
+ sal_Bool bClearWin; // Ausgabe vorher loeschen
+ sal_Bool bUseStyleColor;
+ sal_Bool bIsRender;
SCTAB nPrintTab;
long nPageStart; // Offset fuer erste Seite
@@ -163,19 +163,19 @@ private:
const ScRange* pUserArea; // Selektion, wenn im Dialog eingestellt
const SfxItemSet* pParamSet; // eingestellte Vorlage
- BOOL bState; // aus State-struct erzeugt
+ sal_Bool bState; // aus State-struct erzeugt
// Parameter aus Vorlage:
- USHORT nLeftMargin;
- USHORT nTopMargin;
- USHORT nRightMargin;
- USHORT nBottomMargin;
- BOOL bCenterHor;
- BOOL bCenterVer;
- BOOL bLandscape;
- BOOL bSourceRangeValid;
-
- USHORT nPageUsage;
+ sal_uInt16 nLeftMargin;
+ sal_uInt16 nTopMargin;
+ sal_uInt16 nRightMargin;
+ sal_uInt16 nBottomMargin;
+ sal_Bool bCenterHor;
+ sal_Bool bCenterVer;
+ sal_Bool bLandscape;
+ sal_Bool bSourceRangeValid;
+
+ sal_uInt16 nPageUsage;
Size aPageSize; // Drucker-Twips
const SvxBoxItem* pBorderItem;
const SvxBrushItem* pBackgroundItem;
@@ -188,9 +188,9 @@ private:
ScPageAreaParam aAreaParam;
// berechnete Werte:
- USHORT nZoom;
- BOOL bPrintCurrentTable;
- BOOL bMultiArea;
+ sal_uInt16 nZoom;
+ sal_Bool bPrintCurrentTable;
+ sal_Bool bMultiArea;
long nTabPages;
long nTotalPages;
@@ -257,27 +257,27 @@ public:
~ScPrintFunc();
static void DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double nPrintFactor,
- const Rectangle& rBound, ScViewData* pViewData, BOOL bMetaFile );
+ const Rectangle& rBound, ScViewData* pViewData, sal_Bool bMetaFile );
void SetDrawView( FmFormView* pNew );
void SetOffset( const Point& rOfs );
- void SetManualZoom( USHORT nNewZoom );
+ void SetManualZoom( sal_uInt16 nNewZoom );
void SetDateTime( const Date& rDate, const Time& rTime );
- void SetClearFlag( BOOL bFlag );
- void SetUseStyleColor( BOOL bFlag );
- void SetRenderFlag( BOOL bFlag );
+ void SetClearFlag( sal_Bool bFlag );
+ void SetUseStyleColor( sal_Bool bFlag );
+ void SetRenderFlag( sal_Bool bFlag );
void SetExclusivelyDrawOleAndDrawObjects();//for printing selected objects without surrounding cell contents
- BOOL UpdatePages();
+ sal_Bool UpdatePages();
void ApplyPrintSettings(); // aus DoPrint() schon gerufen
long DoPrint( const MultiSelection& rPageRanges,
- /*long nStartPage, long nDisplayStart, BOOL bDoPrint,
+ /*long nStartPage, long nDisplayStart, sal_Bool bDoPrint,
SfxProgress* pProgress, ScPreviewLocationData* pLocationData );*/
- long nStartPage, long nDisplayStart, BOOL bDoPrint = TRUE,
+ long nStartPage, long nDisplayStart, sal_Bool bDoPrint = sal_True,
SfxProgress* pProgress = NULL, ScPreviewLocationData* pLocationData = NULL);
// Werte abfragen - sofort
@@ -292,32 +292,32 @@ public:
double GetScaleX() const { return nScaleX; }
double GetScaleY() const { return nScaleY; }
long GetTotalPages() const { return nTotalPages; }
- USHORT GetZoom() const { return nZoom; }
+ sal_uInt16 GetZoom() const { return nZoom; }
void ResetBreaks( SCTAB nTab );
void GetPrintState( ScPrintState& rState );
- BOOL GetLastSourceRange( ScRange& rRange ) const;
- USHORT GetLeftMargin() const{return nLeftMargin;}
- USHORT GetRightMargin() const{return nRightMargin;}
- USHORT GetTopMargin() const{return nTopMargin;}
- USHORT GetBottomMargin() const{return nBottomMargin;}
- void SetLeftMargin(USHORT nRulerLeftDistance){ nLeftMargin = nRulerLeftDistance; }
- void SetRightMargin(USHORT nRulerRightDistance){ nRightMargin = nRulerRightDistance; }
- void SetTopMargin(USHORT nRulerTopDistance){ nTopMargin = nRulerTopDistance; }
- void SetBottomMargin(USHORT nRulerBottomDistance){ nBottomMargin = nRulerBottomDistance; }
+ sal_Bool GetLastSourceRange( ScRange& rRange ) const;
+ sal_uInt16 GetLeftMargin() const{return nLeftMargin;}
+ sal_uInt16 GetRightMargin() const{return nRightMargin;}
+ sal_uInt16 GetTopMargin() const{return nTopMargin;}
+ sal_uInt16 GetBottomMargin() const{return nBottomMargin;}
+ void SetLeftMargin(sal_uInt16 nRulerLeftDistance){ nLeftMargin = nRulerLeftDistance; }
+ void SetRightMargin(sal_uInt16 nRulerRightDistance){ nRightMargin = nRulerRightDistance; }
+ void SetTopMargin(sal_uInt16 nRulerTopDistance){ nTopMargin = nRulerTopDistance; }
+ void SetBottomMargin(sal_uInt16 nRulerBottomDistance){ nBottomMargin = nRulerBottomDistance; }
ScPrintHFParam GetHeader(){return aHdr;}
ScPrintHFParam GetFooter(){return aFtr;}
private:
void Construct( const ScPrintOptions* pOptions );
void InitParam( const ScPrintOptions* pOptions );
- void CalcZoom( USHORT nRangeNo );
+ void CalcZoom( sal_uInt16 nRangeNo );
void CalcPages();
long CountPages();
long CountNotePages();
- BOOL AdjustPrintArea( BOOL bNew );
+ sal_Bool AdjustPrintArea( sal_Bool bNew );
Size GetDocPageSize();
@@ -327,31 +327,31 @@ private:
void InitModes();
- BOOL IsLeft( long nPageNo );
- BOOL IsMirror( long nPageNo );
+ sal_Bool IsLeft( long nPageNo );
+ sal_Bool IsMirror( long nPageNo );
void ReplaceFields( long nPageNo ); // aendert Text in pEditEngine
void MakeTableString(); // setzt aTableStr
void PrintPage( long nPageNo,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
void PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
long nScrX, long nScrY,
- BOOL bShLeft, BOOL bShTop, BOOL bShRight, BOOL bShBottom );
+ sal_Bool bShLeft, sal_Bool bShTop, sal_Bool bShRight, sal_Bool bShBottom );
void LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- long nScrX, long nScrY, BOOL bRepCol, BOOL bRepRow,
+ long nScrX, long nScrY, sal_Bool bRepCol, sal_Bool bRepRow,
ScPreviewLocationData& rLocationData );
void PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY );
void PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY );
void LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
- BOOL bRepCol, ScPreviewLocationData& rLocationData );
+ sal_Bool bRepCol, ScPreviewLocationData& rLocationData );
void LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
- BOOL bRepRow, ScPreviewLocationData& rLocationData );
- void PrintHF( long nPageNo, BOOL bHeader, long nStartY,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ sal_Bool bRepRow, ScPreviewLocationData& rLocationData );
+ void PrintHF( long nPageNo, sal_Bool bHeader, long nStartY,
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
- long PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData );
- long DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ long PrintNotes( long nPageNo, long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
+ long DoNotes( long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
void DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
const SvxBoxItem* pBorderData,
diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx
index f7c9f325c06b..ff3af449551e 100644
--- a/sc/source/ui/inc/privsplt.hxx
+++ b/sc/source/ui/inc/privsplt.hxx
@@ -38,7 +38,7 @@ class ScPrivatSplit : public Control
private:
Link aCtrModifiedLink;
- BOOL aMovingFlag;
+ sal_Bool aMovingFlag;
Pointer aWinPointer;
SC_SPLIT_DIRECTION eScSplit;
short nOldX;
@@ -53,7 +53,7 @@ class ScPrivatSplit : public Control
short nDeltaY;
using Control::ImplInitSettings;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx
index d2402bc02e32..b41293779b75 100644
--- a/sc/source/ui/inc/pvfundlg.hxx
+++ b/sc/source/ui/inc/pvfundlg.hxx
@@ -58,8 +58,8 @@ class ScDPFunctionListBox : public MultiListBox
public:
explicit ScDPFunctionListBox( Window* pParent, const ResId& rResId );
- void SetSelection( USHORT nFuncMask );
- USHORT GetSelection() const;
+ void SetSelection( sal_uInt16 nFuncMask );
+ sal_uInt16 GetSelection() const;
private:
void FillFunctionNames();
@@ -71,20 +71,20 @@ class ScDPFunctionDlg : public ModalDialog
{
typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > NameMapType;
public:
- explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVec& rLabelVec,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+ explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVector& rLabelVec,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
- USHORT GetFuncMask() const;
+ sal_uInt16 GetFuncMask() const;
::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const;
private:
- void Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+ void Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
const ::rtl::OUString& GetBaseFieldName(const ::rtl::OUString& rLayoutName) const;
const ::rtl::OUString& GetBaseItemName(const ::rtl::OUString& rLayoutName) const;
/** Searches for a listbox entry, starts search at specified position. */
- sal_uInt16 FindBaseItemPos( const String& rEntry, USHORT nStartPos ) const;
+ sal_uInt16 FindBaseItemPos( const String& rEntry, sal_uInt16 nStartPos ) const;
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( DblClickHdl, MultiListBox* );
@@ -111,7 +111,7 @@ private:
ScDPListBoxWrapper maLbTypeWrp; /// Wrapper for direct usage of API constants.
- const ScDPLabelDataVec& mrLabelVec; /// Data of all labels.
+ const ScDPLabelDataVector& mrLabelVec; /// Data of all labels.
bool mbEmptyItem; /// true = Empty base item in listbox.
};
@@ -121,15 +121,15 @@ class ScDPSubtotalDlg : public ModalDialog
{
public:
explicit ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields, bool bEnableLayout );
- USHORT GetFuncMask() const;
+ sal_uInt16 GetFuncMask() const;
void FillLabelData( ScDPLabelData& rLabelData ) const;
private:
- void Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+ void Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
DECL_LINK( DblClickHdl, MultiListBox* );
DECL_LINK( RadioClickHdl, RadioButton* );
@@ -174,7 +174,7 @@ private:
const ::rtl::OUString& GetFieldName(const ::rtl::OUString& rLayoutName) const;
/** Searches for a listbox entry, starts search at specified position. */
- sal_uInt16 FindListBoxEntry( const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) const;
+ sal_uInt16 FindListBoxEntry( const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) const;
DECL_LINK( RadioClickHdl, RadioButton* );
DECL_LINK( CheckHdl, CheckBox* );
@@ -221,7 +221,7 @@ private:
class ScDPShowDetailDlg : public ModalDialog
{
public:
- explicit ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient );
+ explicit ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient );
virtual short Execute();
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index 7b4dad83ee08..1b04a1445800 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -29,9 +29,8 @@
#ifndef SC_PVLAYDLG_HXX
#define SC_PVLAYDLG_HXX
-#include <vector>
#include <memory>
-#include <boost/shared_ptr.hpp>
+#include <vector>
#include <vcl/lstbox.hxx>
#include <vcl/scrbar.hxx>
@@ -40,35 +39,12 @@
#include "pivot.hxx"
#include "anyrefdg.hxx"
#include "fieldwnd.hxx"
-#include "formula/funcutl.hxx"
-
-/*==========================================================================*\
-
- Eine Instanz der Klasse ScPivotLayoutDlg ist ein (semi-)modaler
- Dialog, in dem mit der Maus Felder mit Spaltenueberschriften den
- drei Pivot-Kategorien "Spalte", "Zeile" und "Daten" zugeordnet
- werden koennen.
- Der Dialog erhaelt in der Struktur LabelData Informationen ueber
- diese Ueberschriften (Name, Art (Zahl/String) und Funktionsmaske).
- Weiterhin werden drei PivotFeld-Arrays uebergeben, mit denen die
- drei Kategorie-Fenster initialisiert werden. Ein Kategorie-Fenster
- wird durch eine Instanz der Klasse FieldWindow dargestellt. Ein
- solches Fenster ist fuer die Darstellung der Datenstrukturen am
- Schirm zustaendig. Es meldet Mausaktionen an den Dialog weiter und
- bietet entsprechende Methoden zur Veraenderung der Darstellung.
- Der Dialog sorgt fuer den Abgleich der interenen Datenstrukturen mit
- der Bildschirmdarstellung. Ein weiteres FieldWindow (Select) bietet
- alle Tabellenueberschriften zur Auswahl an, ist also "read-only".
-
-\*==========================================================================*/
-
-//============================================================================
+// ============================================================================
class ScViewData;
class ScDocument;
class ScRangeData;
-struct ScDPFuncData;
class ScDPObject;
//============================================================================
@@ -91,21 +67,25 @@ public:
virtual ~ScDPLayoutDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const { return bRefInputMode; }
+ virtual sal_Bool IsRefInputMode() const { return bRefInputMode; }
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void StateChanged( StateChangedType nStateChange );
void NotifyDoubleClick ( ScDPFieldType eType, size_t nFieldIndex );
PointerStyle NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex );
void NotifyMouseButtonUp ( const Point& rAt );
PointerStyle NotifyMouseMove ( const Point& rAt );
- void NotifyFieldFocus ( ScDPFieldType eType, BOOL bGotFocus );
+ void NotifyFieldFocus ( ScDPFieldType eType, sal_Bool bGotFocus );
void NotifyMoveFieldToEnd ( ScDPFieldType eToType );
void NotifyRemoveField ( ScDPFieldType eType, size_t nFieldIndex );
protected:
- virtual void Deactivate();
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual sal_Bool IsRefInputMode() const;
+ virtual void SetActive();
+ virtual sal_Bool Close();
private:
typedef boost::shared_ptr< ScDPFuncData > ScDPFuncDataRef;
@@ -157,7 +137,7 @@ private:
ScDPFieldType eDnDFromType;
size_t nDnDFromIndex;
- BOOL bIsDrag;
+ sal_Bool bIsDrag;
::formula::RefEdit* pEditActive;
@@ -198,8 +178,8 @@ private:
ScDPLabelData* GetLabelData ( SCsCOL nCol, size_t* pPos = NULL );
String GetLabelString ( SCsCOL nCol );
bool IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType );
- String GetFuncString ( USHORT& rFuncMask, BOOL bIsValue = TRUE );
- BOOL Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
+ String GetFuncString ( sal_uInt16& rFuncMask, sal_Bool bIsValue = true );
+ sal_Bool Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
void Remove ( ScDPFuncDataVec* pArr, size_t nAt );
void Insert ( ScDPFuncDataVec* pArr, const ScDPFuncData& rFData, size_t nAt );
diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx
index f24478b96c35..c02a06b9ffec 100644
--- a/sc/source/ui/inc/redcom.hxx
+++ b/sc/source/ui/inc/redcom.hxx
@@ -57,7 +57,7 @@ protected:
public:
ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
- ScDocShell *,ScChangeAction *,BOOL bPrevNext = FALSE);
+ ScDocShell *,ScChangeAction *,sal_Bool bPrevNext = false);
~ScRedComDialog();
short Execute();
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index f170fa7dc0e4..fc30485dbe92 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -37,7 +37,7 @@
class Class : public SfxChildWindow \
{ \
public: \
- Class( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); \
+ Class( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); \
SFX_DECL_CHILDWINDOW(Class); \
};
@@ -69,7 +69,7 @@ class ScAcceptChgDlgWrapper: public SfxChildWindow
{
public:
ScAcceptChgDlgWrapper( Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo* );
@@ -82,20 +82,20 @@ class ScSimpleRefDlgWrapper: public SfxChildWindow
{
public:
ScSimpleRefDlgWrapper( Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW(Class);
- static void SetDefaultPosSize(Point aPos, Size aSize, BOOL bSet=TRUE);
+ static void SetDefaultPosSize(Point aPos, Size aSize, sal_Bool bSet=sal_True);
virtual String GetRefString();
virtual void SetRefString(const String& rStr);
void SetCloseHdl( const Link& rLink );
void SetUnoLinks( const Link& rDone, const Link& rAbort,
const Link& rChange );
- void SetFlags( BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection );
- static void SetAutoReOpen(BOOL bFlag);
+ void SetFlags( sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection );
+ static void SetAutoReOpen(sal_Bool bFlag);
void StartRefInput();
};
@@ -106,13 +106,13 @@ class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow
bool m_bFreeWindowLock:1;
Window * m_pSavedWndParent;
public:
- ScValidityRefChildWin( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+ ScValidityRefChildWin( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW(ScValidityRefChildWin);
~ScValidityRefChildWin();
bool LockVisible( bool bLock ){ bool bVis = m_bVisibleLock; m_bVisibleLock = bLock; return bVis; }
bool LockFreeWindow( bool bLock ){ bool bFreeWindow = m_bFreeWindowLock; m_bFreeWindowLock = bLock; return bFreeWindow; }
void Hide(){ if( !m_bVisibleLock) SfxChildWindow::Hide(); }
- void Show( USHORT nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); }
+ void Show( sal_uInt16 nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); }
};
//==================================================================
diff --git a/sc/source/ui/inc/refundo.hxx b/sc/source/ui/inc/refundo.hxx
index 8abbd5155342..25de386d023e 100644
--- a/sc/source/ui/inc/refundo.hxx
+++ b/sc/source/ui/inc/refundo.hxx
@@ -61,7 +61,7 @@ public:
~ScRefUndoData();
void DeleteUnchanged( const ScDocument* pDoc );
- void DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst );
+ void DoUndo( ScDocument* pDoc, sal_Bool bUndoRefFirst );
};
diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx
index 7e6f08adc4f3..fed5f21e2b0e 100644
--- a/sc/source/ui/inc/rfindlst.hxx
+++ b/sc/source/ui/inc/rfindlst.hxx
@@ -38,11 +38,11 @@
struct ScRangeFindData
{
ScRange aRef;
- USHORT nFlags;
+ sal_uInt16 nFlags;
xub_StrLen nSelStart;
xub_StrLen nSelEnd;
- ScRangeFindData( const ScRange& rR, USHORT nF, xub_StrLen nS, xub_StrLen nE ) :
+ ScRangeFindData( const ScRange& rR, sal_uInt16 nF, xub_StrLen nS, xub_StrLen nE ) :
aRef(rR), nFlags(nF), nSelStart(nS), nSelEnd(nE) {}
};
@@ -56,12 +56,12 @@ public:
ScRangeFindList(const String& rName);
~ScRangeFindList();
- ULONG Count() const { return aEntries.Count(); }
+ sal_uLong Count() const { return aEntries.Count(); }
void Insert( ScRangeFindData* pNew ) { aEntries.Insert(pNew, LIST_APPEND); }
- ScRangeFindData* GetObject( ULONG nIndex ) const
+ ScRangeFindData* GetObject( sal_uLong nIndex ) const
{ return (ScRangeFindData*)aEntries.GetObject(nIndex); }
- void SetHidden( BOOL bSet ) { bHidden = bSet; }
+ void SetHidden( sal_Bool bSet ) { bHidden = bSet; }
const String& GetDocName() const { return aDocName; }
bool IsHidden() const { return bHidden; }
diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx
index fac5b33220e7..e9acea5c11aa 100644
--- a/sc/source/ui/inc/scendlg.hxx
+++ b/sc/source/ui/inc/scendlg.hxx
@@ -33,7 +33,7 @@
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <svtools/svmedit.hxx>
#include <svtools/ctrlbox.hxx>
@@ -42,14 +42,14 @@
class ScNewScenarioDlg : public ModalDialog
{
public:
- ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE );
+ ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit = false, sal_Bool bSheetProtected = false );
~ScNewScenarioDlg();
void SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
+ const Color& rColor, sal_uInt16 nFlags );
void GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const;
+ Color& rColor, sal_uInt16& rFlags ) const;
private:
FixedLine aFlName;
@@ -69,7 +69,7 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
const String aDefScenarioName;
- BOOL bIsEdit;
+ sal_Bool bIsEdit;
DECL_LINK( OkHdl, OKButton * );
DECL_LINK( EnableHdl, CheckBox * );
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index 5e512e3f8763..133d310c664e 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -40,9 +40,9 @@
class ScImportAsciiDlg : public ModalDialog
{
SvStream* mpDatStream;
- ULONG mnStreamPos;
- ULONG* mpRowPosArray;
- ULONG mnRowPosCount;
+ sal_uLong mnStreamPos;
+ sal_uLong* mpRowPosArray;
+ sal_uLong mnRowPosCount;
String maPreviewLine[ CSV_PREVIEW_LINES ];
@@ -117,9 +117,9 @@ private:
void SetupSeparatorCtrls();
- bool GetLine( ULONG nLine, String &rText );
+ bool GetLine( sal_uLong nLine, String &rText );
void UpdateVertical();
- inline bool Seek( ULONG nPos ); // synced to and from mnStreamPos
+ inline bool Seek( sal_uLong nPos ); // synced to and from mnStreamPos
DECL_LINK( CharSetHdl, SvxTextEncodingBox* );
DECL_LINK( FirstRowHdl, NumericField* );
@@ -131,7 +131,7 @@ private:
};
-inline bool ScImportAsciiDlg::Seek(ULONG nPos)
+inline bool ScImportAsciiDlg::Seek(sal_uLong nPos)
{
bool bSuccess = true;
if (nPos != mnStreamPos && mpDatStream)
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
index 69c5f5cb6bd8..00113dca3806 100644
--- a/sc/source/ui/inc/scuiautofmt.hxx
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -38,7 +38,7 @@ public:
ScDocument* pDoc );
~ScAutoFormatDlg();
- USHORT GetIndex() const { return nIndex; }
+ sal_uInt16 GetIndex() const { return nIndex; }
String GetCurrFormatName();
private:
@@ -69,9 +69,9 @@ private:
//------------------------
ScAutoFormat* pFormat;
const ScAutoFormatData* pSelFmtData;
- USHORT nIndex;
- BOOL bCoreDataChanged;
- BOOL bFmtInserted;
+ sal_uInt16 nIndex;
+ sal_Bool bCoreDataChanged;
+ sal_Bool bFmtInserted;
void Init ();
void UpdateChecks ();
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx
index 605dec3cd7f6..9a0de3c23f4c 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -40,12 +40,12 @@ class ScImportOptionsDlg : public ModalDialog
{
public:
ScImportOptionsDlg( Window* pParent,
- BOOL bAscii = TRUE,
+ sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const String* pStrTitle = NULL,
- BOOL bMultiByte = FALSE,
- BOOL bOnlyDbtoolsEncodings = FALSE,
- BOOL bImport = TRUE );
+ sal_Bool bMultiByte = false,
+ sal_Bool bOnlyDbtoolsEncodings = false,
+ sal_Bool bImport = sal_True );
~ScImportOptionsDlg();
@@ -59,17 +59,18 @@ private:
ComboBox aEdFieldSep;
FixedText aFtTextSep;
ComboBox aEdTextSep;
+ CheckBox aCbQuoteAll;
+ CheckBox aCbShown;
CheckBox aCbFixed;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- CheckBox aCbShown;
ScDelimiterTable* pFieldSepTab;
ScDelimiterTable* pTextSepTab;
private:
- USHORT GetCodeFromCombo( const ComboBox& rEd ) const;
+ sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const;
DECL_LINK( FixedWidthHdl, CheckBox* );
DECL_LINK( DoubleClickHdl, ListBox* );
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index 6c0d3768d7c3..b8c3e20b8136 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -60,7 +60,7 @@ class ScAccessibleEditObject;
class ScHFEditPage : public SfxTabPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
void SetNumType(SvxNumType eNumType);
@@ -68,9 +68,9 @@ public:
protected:
ScHFEditPage( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const SfxItemSet& rCoreSet,
- USHORT nWhich, bool bHeader );
+ sal_uInt16 nWhich, bool bHeader );
virtual ~ScHFEditPage();
private:
@@ -94,7 +94,7 @@ private:
FixedInfo aFtInfo;
ScPopupMenu aPopUpFile;
- USHORT nWhich;
+ sal_uInt16 nWhich;
String aCmdArr[6];
private:
@@ -120,7 +120,7 @@ class ScRightHeaderEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
@@ -132,7 +132,7 @@ class ScLeftHeaderEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
@@ -144,7 +144,7 @@ class ScRightFooterEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet );
@@ -156,7 +156,7 @@ class ScLeftFooterEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet );
diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
index c822ab267b1f..0c8ea64c4e0c 100644
--- a/sc/source/ui/inc/select.hxx
+++ b/sc/source/ui/inc/select.hxx
@@ -58,13 +58,13 @@ private:
ScViewData* pViewData;
ScViewSelectionEngine* pEngine;
- BOOL bAnchor;
- BOOL bStarted;
+ sal_Bool bAnchor;
+ sal_Bool bStarted;
ScAddress aAnchorPos;
ScSplitPos GetWhich();
- ULONG CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
+ sal_uLong CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll );
public:
@@ -73,17 +73,17 @@ public:
void SetSelectionEngine( ScViewSelectionEngine* pSelEngine );
void SetAnchor( SCCOL nPosX, SCROW nPosY );
- void SetAnchorFlag( BOOL bSet );
+ void SetAnchorFlag( sal_Bool bSet );
virtual void BeginDrag();
virtual void CreateAnchor();
virtual void DestroyAnchor();
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false );
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
- BOOL SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScroll );
+ sal_Bool SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Bool bScroll );
};
@@ -94,27 +94,27 @@ class ScHeaderFunctionSet : public FunctionSet // Spalten- / Zeilenkoep
{
private:
ScViewData* pViewData;
- BOOL bColumn; // Col- / Rowbar
+ sal_Bool bColumn; // Col- / Rowbar
ScSplitPos eWhich;
- BOOL bAnchor;
+ sal_Bool bAnchor;
SCCOLROW nCursorPos;
public:
ScHeaderFunctionSet( ScViewData* pNewViewData );
- void SetColumn( BOOL bSet );
+ void SetColumn( sal_Bool bSet );
void SetWhich( ScSplitPos eNew );
virtual void BeginDrag();
virtual void CreateAnchor();
virtual void DestroyAnchor();
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false );
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
- void SetAnchorFlag(BOOL bSet) { bAnchor = bSet; }
+ void SetAnchorFlag(sal_Bool bSet) { bAnchor = bSet; }
};
diff --git a/sc/source/ui/inc/seltrans.hxx b/sc/source/ui/inc/seltrans.hxx
index 4fda9372a05e..9b0f39a39873 100644
--- a/sc/source/ui/inc/seltrans.hxx
+++ b/sc/source/ui/inc/seltrans.hxx
@@ -67,7 +67,7 @@ public:
virtual ~ScSelectionTransferObj();
void ForgetView();
- BOOL StillValid();
+ sal_Bool StillValid();
ScTabView* GetView() const { return pView; }
ScTransferObj* GetCellData();
diff --git a/sc/source/ui/inc/servobj.hxx b/sc/source/ui/inc/servobj.hxx
index 975781f05169..b0bb345de3e9 100644
--- a/sc/source/ui/inc/servobj.hxx
+++ b/sc/source/ui/inc/servobj.hxx
@@ -55,7 +55,7 @@ private:
ScDocShell* pDocSh;
ScRange aRange;
String aItemStr;
- BOOL bRefreshListener;
+ sal_Bool bRefreshListener;
void Clear();
@@ -63,9 +63,9 @@ public:
ScServerObject( ScDocShell* pShell, const String& rItem );
virtual ~ScServerObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & rMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = false );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
void EndListeningAll();
diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx
index b4e2c1037509..90dd3e217031 100644
--- a/sc/source/ui/inc/shtabdlg.hxx
+++ b/sc/source/ui/inc/shtabdlg.hxx
@@ -39,11 +39,11 @@
class ScShowTabDlg : public ModalDialog
{
private:
+ FixedText aFtLbTitle;
::svtools::ToolTipMultiListBox aLb;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- FixedText aFtLbTitle;
DECL_LINK( DblClkHdl, void * );
@@ -54,14 +54,14 @@ public:
/** Sets dialog title, fixed text for listbox and help IDs. */
void SetDescription(
const String& rTitle, const String& rFixedText,
- ULONG nDlgHelpId, ULONG nLbHelpId );
+ const ::rtl::OString& nDlgHelpId, const rtl::OString& nLbHelpId );
/** Inserts a string into the ListBox. */
- void Insert( const String& rString, BOOL bSelected );
+ void Insert( const String& rString, sal_Bool bSelected );
- USHORT GetSelectEntryCount() const;
- String GetSelectEntry(USHORT nPos) const;
- USHORT GetSelectEntryPos(USHORT nPos) const;
+ sal_uInt16 GetSelectEntryCount() const;
+ String GetSelectEntry(sal_uInt16 nPos) const;
+ sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const;
};
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index eadc59d90470..4dcf023b2780 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -64,14 +64,14 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- BOOL bRefInputMode;
+ sal_Bool bRefInputMode;
ScRange theCurArea;
- BOOL bCloseFlag;
- BOOL bAutoReOpen;
- BOOL bCloseOnButtonUp;
- BOOL bSingleCell;
- BOOL bMultiSelection;
+ sal_Bool bCloseFlag;
+ sal_Bool bAutoReOpen;
+ sal_Bool bCloseOnButtonUp;
+ sal_Bool bSingleCell;
+ sal_Bool bMultiSelection;
void Init();
@@ -81,7 +81,7 @@ private:
protected:
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
public:
ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
@@ -90,9 +90,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
void StartRefInput();
@@ -104,9 +104,9 @@ public:
void SetUnoLinks( const Link& rDone, const Link& rAbort,
const Link& rChange );
- void SetFlags( BOOL bSetCloseOnButtonUp, BOOL bSetSingleCell, BOOL bSetMultiSelection );
+ void SetFlags( sal_Bool bSetCloseOnButtonUp, sal_Bool bSetSingleCell, sal_Bool bSetMultiSelection );
- void SetAutoReOpen(BOOL bFlag) {bAutoReOpen=bFlag;}
+ void SetAutoReOpen(sal_Bool bFlag) {bAutoReOpen=bFlag;}
};
diff --git a/sc/source/ui/inc/sizedev.hxx b/sc/source/ui/inc/sizedev.hxx
index eb7a251fdd86..d3cd5362b2b7 100644
--- a/sc/source/ui/inc/sizedev.hxx
+++ b/sc/source/ui/inc/sizedev.hxx
@@ -37,7 +37,7 @@ class ScDocShell;
class ScSizeDeviceProvider
{
OutputDevice* pDevice;
- BOOL bOwner;
+ sal_Bool bOwner;
double nPPTX;
double nPPTY;
MapMode aOldMapMode;
@@ -49,7 +49,7 @@ public:
OutputDevice* GetDevice() const { return pDevice; }
double GetPPTX() const { return nPPTX; }
double GetPPTY() const { return nPPTY; }
- BOOL IsPrinter() const { return !bOwner; }
+ sal_Bool IsPrinter() const { return !bOwner; }
};
#endif
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
index a7f4cf8cec0d..86eb96f15b70 100644
--- a/sc/source/ui/inc/solvrdlg.hxx
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -59,9 +59,9 @@ public:
~ScSolverDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlVariables;
@@ -87,7 +87,7 @@ private:
ScDocument* pDoc;
const SCTAB nCurTab;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
const String errMsgInvalidVar;
const String errMsgInvalidForm;
const String errMsgNoFormula;
@@ -96,7 +96,7 @@ private:
#ifdef _SOLVRDLG_CXX
void Init();
- BOOL CheckTargetValue( String& rStrVal );
+ sal_Bool CheckTargetValue( String& rStrVal );
void RaiseError( ScSolverErr eError );
DECL_LINK( BtnHdl, PushButton* );
diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx
index 7812b2a24499..1d6e01d02b25 100644
--- a/sc/source/ui/inc/sortdlg.hxx
+++ b/sc/source/ui/inc/sortdlg.hxx
@@ -51,21 +51,21 @@ public:
const SfxItemSet* pArgSet );
~ScSortDlg();
- void SetHeaders( BOOL bHeaders );
- void SetByRows ( BOOL bByRows );
- BOOL GetHeaders() const;
- BOOL GetByRows () const;
+ void SetHeaders( sal_Bool bHeaders );
+ void SetByRows ( sal_Bool bByRows );
+ sal_Bool GetHeaders() const;
+ sal_Bool GetByRows () const;
private:
- BOOL bIsHeaders;
- BOOL bIsByRows;
+ sal_Bool bIsHeaders;
+ sal_Bool bIsByRows;
};
-inline void ScSortDlg::SetHeaders( BOOL bHeaders ) { bIsHeaders = bHeaders; }
-inline void ScSortDlg::SetByRows ( BOOL bByRows ) { bIsByRows = bByRows; }
-inline BOOL ScSortDlg::GetHeaders() const { return bIsHeaders; }
-inline BOOL ScSortDlg::GetByRows () const { return bIsByRows; }
+inline void ScSortDlg::SetHeaders( sal_Bool bHeaders ) { bIsHeaders = bHeaders; }
+inline void ScSortDlg::SetByRows ( sal_Bool bByRows ) { bIsByRows = bByRows; }
+inline sal_Bool ScSortDlg::GetHeaders() const { return bIsHeaders; }
+inline sal_Bool ScSortDlg::GetByRows () const { return bIsByRows; }
class ScSortWarningDlg : public ModalDialog
{
diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx
index d525c62597f1..3639007655a9 100644
--- a/sc/source/ui/inc/spelldialog.hxx
+++ b/sc/source/ui/inc/spelldialog.hxx
@@ -52,7 +52,7 @@ class ScSpellDialogChildWindow : public ::svx::SpellDialogChildWindow
public:
SFX_DECL_CHILDWINDOW( ScSpellDialogChildWindow );
- explicit ScSpellDialogChildWindow( Window* pParent, USHORT nId,
+ explicit ScSpellDialogChildWindow( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
virtual ~ScSpellDialogChildWindow();
diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx
index e351c8ff2212..aae57483b8b6 100644
--- a/sc/source/ui/inc/spelleng.hxx
+++ b/sc/source/ui/inc/spelleng.hxx
@@ -121,7 +121,7 @@ public:
protected:
/** Callback from edit engine to check the next cell. */
- virtual BOOL SpellNextDocument();
+ virtual sal_Bool SpellNextDocument();
/** Returns true, if the current text contains a spelling error. */
virtual bool NeedsConversion();
@@ -155,7 +155,7 @@ public:
protected:
/** Callback from edit engine to convert the next cell. */
- virtual BOOL ConvertNextDocument();
+ virtual sal_Bool ConvertNextDocument();
/** Returns true, if the current text contains text to convert. */
virtual bool NeedsConversion();
diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
index af022443a80a..16630a099a41 100644
--- a/sc/source/ui/inc/strindlg.hxx
+++ b/sc/source/ui/inc/strindlg.hxx
@@ -32,7 +32,7 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include <layout/layout.hxx>
@@ -47,7 +47,7 @@ public:
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId );
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId );
~ScStringInputDlg();
void GetInputString( String& rString ) const;
diff --git a/sc/source/ui/inc/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx
index 6114da813f03..73fab86b8088 100644
--- a/sc/source/ui/inc/styledlg.hxx
+++ b/sc/source/ui/inc/styledlg.hxx
@@ -40,15 +40,15 @@ class ScStyleDlg : public SfxStyleDialog
public:
ScStyleDlg( Window* pParent,
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId );
+ sal_uInt16 nRscId );
~ScStyleDlg();
protected:
- virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+ virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage );
virtual const SfxItemSet* GetRefreshedSet();
private:
- USHORT nDlgRsc;
+ sal_uInt16 nDlgRsc;
};
diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx
index 56cf5691f57b..7c1870aa6cad 100644
--- a/sc/source/ui/inc/tabbgcolordlg.hxx
+++ b/sc/source/ui/inc/tabbgcolordlg.hxx
@@ -30,7 +30,8 @@
#define SC_TABBGCOLORDLG_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
#include <svtools/valueset.hxx>
//------------------------------------------------------------------------
@@ -42,7 +43,7 @@ public:
const String& rTitle,
const String& rTabBgColorNoColorText,
const Color& rDefaultColor,
- ULONG nHelpId );
+ const rtl::OString& nHelpId );
~ScTabBgColorDlg();
void GetSelectedColor( Color& rColor ) const;
@@ -65,7 +66,7 @@ private:
HelpButton aBtnHelp;
Color aTabBgColor;
const String aTabBgColorNoColorText;
- ULONG mnHelpId;
+ rtl::OString msHelpId;
void FillColorValueSets_Impl();
diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx
index c9892ecbceec..6e922fa00a29 100644
--- a/sc/source/ui/inc/tabcont.hxx
+++ b/sc/source/ui/inc/tabcont.hxx
@@ -46,13 +46,13 @@ class ScTabControl : public TabBar, public DropTargetHelper, public DragSourceHe
{
private:
ScViewData* pViewData;
- USHORT nMouseClickPageId; /// Last page ID after mouse button down/up
- USHORT nSelPageIdByMouse; /// Selected page ID, if selected with mouse
- BOOL bErrorShown;
+ sal_uInt16 nMouseClickPageId; /// Last page ID after mouse button down/up
+ sal_uInt16 nSelPageIdByMouse; /// Selected page ID, if selected with mouse
+ sal_Bool bErrorShown;
void DoDrag( const Region& rRegion );
- USHORT GetMaxId() const;
+ sal_uInt16 GetMaxId() const;
SCTAB GetPrivatDropPos(const Point& rPos );
protected:
@@ -79,9 +79,9 @@ public:
void UpdateInputContext();
void UpdateStatus();
- void ActivateView(BOOL bActivate);
+ void ActivateView(sal_Bool bActivate);
- void SetSheetLayoutRTL( BOOL bSheetRTL );
+ void SetSheetLayoutRTL( sal_Bool bSheetRTL );
};
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
index c0f06f060184..4f43614adde8 100644
--- a/sc/source/ui/inc/tabopdlg.hxx
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -60,10 +60,10 @@ public:
~ScTabOpDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const { return TRUE; }
+ virtual sal_Bool IsRefInputMode() const { return sal_True; }
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlVariables;
@@ -91,7 +91,7 @@ private:
ScDocument* pDoc;
const SCTAB nCurTab;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
const String errMsgNoFormula;
const String errMsgNoColRow;
const String errMsgWrongFormula;
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 22ddc43e52c2..cec2618541ac 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -40,8 +40,8 @@ class ScTabPageProtection : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rAttrSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreAttrs );
virtual void Reset ( const SfxItemSet& );
protected:
@@ -65,12 +65,12 @@ private:
FixedInfo aTxtHint2;
// aktueller Status:
- BOOL bTriEnabled; // wenn vorher Dont-Care
- BOOL bDontCare; // alles auf TriState
- BOOL bProtect; // einzelne Einstellungen ueber TriState sichern
- BOOL bHideForm;
- BOOL bHideCell;
- BOOL bHidePrint;
+ sal_Bool bTriEnabled; // wenn vorher Dont-Care
+ sal_Bool bDontCare; // alles auf TriState
+ sal_Bool bProtect; // einzelne Einstellungen ueber TriState sichern
+ sal_Bool bHideForm;
+ sal_Bool bHideCell;
+ sal_Bool bHidePrint;
// Handler:
DECL_LINK( ButtonClickHdl, TriStateBox* pBox );
diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx
index 9a369a0dd36f..23ba73b6b307 100644
--- a/sc/source/ui/inc/tabsplit.hxx
+++ b/sc/source/ui/inc/tabsplit.hxx
@@ -38,7 +38,7 @@ class ScTabSplitter : public Splitter
{
private:
ScViewData* pViewData;
- BOOL bFixed;
+ sal_Bool bFixed;
protected:
virtual void MouseMove( const MouseEvent& rMEvt );
@@ -52,7 +52,7 @@ public:
ScViewData* pData );
~ScTabSplitter();
- void SetFixed(BOOL bSet);
+ void SetFixed(sal_Bool bSet);
};
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index f331d93b61fd..7ca610e85453 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -71,14 +71,14 @@ class ScCornerButton : public Window
{
private:
ScViewData* pViewData;
- BOOL bAdd;
+ sal_Bool bAdd;
protected:
virtual void Paint( const Rectangle& rRect );
virtual void Resize();
virtual void MouseButtonDown( const MouseEvent& rMEvt );
public:
- ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional );
+ ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional );
~ScCornerButton();
virtual void StateChanged( StateChangedType nType );
@@ -107,7 +107,7 @@ private:
Size aFrameSize; // wie bei DoResize uebergeben
Point aBorderPos;
- BOOL bDrawSelMode; // nur Zeichenobjekte selektieren ?
+ sal_Bool bDrawSelMode; // nur Zeichenobjekte selektieren ?
FuPoor* pDrawActual;
FuPoor* pDrawOld;
@@ -135,21 +135,21 @@ private:
ScDocument* pBrushDocument; // cell formats for format paint brush
SfxItemSet* pDrawBrushSet; // drawing object attributes for paint brush
- BOOL bLockPaintBrush; // keep for more than one use?
+ sal_Bool bLockPaintBrush; // keep for more than one use?
Timer aScrollTimer;
ScGridWindow* pTimerWindow;
MouseEvent aTimerMEvt;
- ULONG nTipVisible;
+ sal_uLong nTipVisible;
- BOOL bDragging; // fuer Scrollbars
+ sal_Bool bDragging; // fuer Scrollbars
long nPrevDragPos;
- BOOL bIsBlockMode; // Block markieren
- BOOL bBlockNeg; // wird Markierung aufgehoben?
- BOOL bBlockCols; // werden ganze Spalten markiert?
- BOOL bBlockRows; // werden ganze Zeilen markiert?
+ sal_Bool bIsBlockMode; // Block markieren
+ sal_Bool bBlockNeg; // wird Markierung aufgehoben?
+ sal_Bool bBlockCols; // werden ganze Spalten markiert?
+ sal_Bool bBlockRows; // werden ganze Zeilen markiert?
SCCOL nBlockStartX;
SCCOL nBlockStartXOrig;
@@ -167,11 +167,11 @@ private:
double mfPendingTabBarWidth; // Tab bar width relative to frame window width.
- BOOL bMinimized;
- BOOL bInUpdateHeader;
- BOOL bInActivatePart;
- BOOL bInZoomUpdate;
- BOOL bMoveIsShift;
+ sal_Bool bMinimized;
+ sal_Bool bInUpdateHeader;
+ sal_Bool bInActivatePart;
+ sal_Bool bInZoomUpdate;
+ sal_Bool bMoveIsShift;
void Init();
@@ -189,8 +189,8 @@ private:
void UpdateVarZoom();
- static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, BOOL bLayoutRTL );
- static long GetScrollBarPos( ScrollBar& rScroll, BOOL bLayoutRTL );
+ static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL );
+ static long GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL );
void GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPageX, SCsROW& rPageY);
void GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
@@ -212,11 +212,11 @@ protected:
void GetBorderSize( SvBorder& rBorder, const Size& rSize );
void ResetDrawDragMode();
- BOOL IsDrawTextEdit() const;
- void DrawEnableAnim(BOOL bSet);
- //HMHvoid DrawShowMarkHdl(BOOL bShow);
+ sal_Bool IsDrawTextEdit() const;
+ void DrawEnableAnim(sal_Bool bSet);
+ //HMHvoid DrawShowMarkHdl(sal_Bool bShow);
- void MakeDrawView( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
+ void MakeDrawView( sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE );
void HideNoteMarker();
@@ -230,7 +230,7 @@ public:
void HideListBox();
- BOOL HasHintWindow() const { return pInputHintWindow != NULL; }
+ sal_Bool HasHintWindow() const { return pInputHintWindow != NULL; }
void RemoveHintWindow();
void TestHintWindow();
@@ -251,13 +251,13 @@ public:
/** Returns the pending tab bar width relative to the frame window width (0.0 ... 1.0). */
double GetPendingRelTabBarWidth() const;
- void DoResize( const Point& rOffset, const Size& rSize, BOOL bInner = FALSE );
- void RepeatResize( BOOL bUpdateFix = TRUE );
+ void DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner = false );
+ void RepeatResize( sal_Bool bUpdateFix = sal_True );
void UpdateFixPos();
Point GetGridOffset() const;
- BOOL IsDrawSelMode() const { return bDrawSelMode; }
- void SetDrawSelMode(BOOL bNew) { bDrawSelMode = bNew; }
+ sal_Bool IsDrawSelMode() const { return bDrawSelMode; }
+ void SetDrawSelMode(sal_Bool bNew) { bDrawSelMode = bNew; }
void SetDrawFuncPtr(FuPoor* pFuncPtr) { pDrawActual = pFuncPtr; }
void SetDrawFuncOldPtr(FuPoor* pFuncPtr) { pDrawOld = pFuncPtr; }
@@ -271,7 +271,7 @@ public:
ScPageBreakData* GetPageBreakData() { return pPageBreakData; }
ScHighlightRanges* GetHighlightRanges() { return pHighlightRanges; }
- void UpdatePageBreakData( BOOL bForcePaint = FALSE );
+ void UpdatePageBreakData( sal_Bool bForcePaint = false );
void DrawMarkRect( const Rectangle& rRect );
@@ -281,17 +281,18 @@ public:
ScViewFunctionSet* GetFunctionSet() { return &aFunctionSet; }
ScViewSelectionEngine* GetSelEngine() { return pSelEngine; }
- BOOL SelMouseButtonDown( const MouseEvent& rMEvt );
+ sal_Bool SelMouseButtonDown( const MouseEvent& rMEvt );
ScDrawView* GetScDrawView() { return pDrawView; }
SdrView* GetSdrView(); // gegen CLOKs
- BOOL IsMinimized() const { return bMinimized; }
+ sal_Bool IsMinimized() const { return bMinimized; }
- void TabChanged();
- void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
+ // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet
+ void TabChanged( bool bSameTabButMoved = false );
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll );
SC_DLLPUBLIC void RefreshZoom();
- void SetPagebreakMode( BOOL bSet );
+ void SetPagebreakMode( sal_Bool bSet );
void UpdateLayerLocks();
@@ -301,8 +302,8 @@ public:
void UpdateInputLine();
void InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType,
- BOOL bPaint = TRUE );
- void DoneRefMode( BOOL bContinue = FALSE );
+ sal_Bool bPaint = sal_True );
+ void DoneRefMode( sal_Bool bContinue = false );
void UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ );
void StopRefMode();
@@ -318,9 +319,9 @@ public:
void ActiveGrabFocus();
- void ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl );
+ void ClickCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bControl );
- SC_DLLPUBLIC void SetCursor( SCCOL nPosX, SCROW nPosY, BOOL bNew = FALSE );
+ SC_DLLPUBLIC void SetCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bNew = false );
SC_DLLPUBLIC void CellContentChanged();
void SelectionChanged();
@@ -348,10 +349,10 @@ public:
const ScSplitPos* pWhich = NULL );
SvxZoomType GetZoomType() const;
- void SetZoomType( SvxZoomType eNew, BOOL bAll );
- USHORT CalcZoom( SvxZoomType eType, USHORT nOldZoom );
+ void SetZoomType( SvxZoomType eNew, sal_Bool bAll );
+ sal_uInt16 CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom );
-// void CalcZoom( SvxZoomType eType, USHORT& rZoom, SCCOL& rCol, SCROW& rRow );
+// void CalcZoom( SvxZoomType eType, sal_uInt16& rZoom, SCCOL& rCol, SCROW& rRow );
sal_Bool HasPageFieldDataAtCursor() const;
void StartDataSelect();
@@ -363,39 +364,39 @@ public:
// MoveCursorEnd - links oben / benutzter Bereich
SC_DLLPUBLIC void MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
- BOOL bShift, BOOL bControl,
- BOOL bKeepOld = FALSE, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bControl,
+ sal_Bool bKeepOld = false, sal_Bool bKeepSel = false );
void MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
void MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
void MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
void MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
- void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
+ void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift );
- void MoveCursorEnter( BOOL bShift ); // Shift fuer Richtung (kein Markieren)
+ void MoveCursorEnter( sal_Bool bShift ); // Shift fuer Richtung (kein Markieren)
- BOOL MoveCursorKeyInput( const KeyEvent& rKeyEvent );
+ sal_Bool MoveCursorKeyInput( const KeyEvent& rKeyEvent );
- void FindNextUnprot( BOOL bShift, BOOL bInSelection = TRUE );
+ void FindNextUnprot( sal_Bool bShift, sal_Bool bInSelection = sal_True );
- SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
- void SelectNextTab( short nDir, BOOL bExtendSelection = FALSE );
+ SC_DLLPUBLIC void SetTabNo( SCTAB nTab, sal_Bool bNew = false, sal_Bool bExtendSelection = false );
+ void SelectNextTab( short nDir, sal_Bool bExtendSelection = false );
- void ActivateView( BOOL bActivate, BOOL bFirst );
+ void ActivateView( sal_Bool bActivate, sal_Bool bFirst );
void ActivatePart( ScSplitPos eWhich );
- BOOL IsInActivatePart() const { return bInActivatePart; }
+ sal_Bool IsInActivatePart() const { return bInActivatePart; }
void SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt );
void ResetTimer();
- void ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars = TRUE );
- void ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars = TRUE );
+ void ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars = sal_True );
+ void ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars = sal_True );
SC_DLLPUBLIC void ScrollLines( long nDeltaX, long nDeltaY ); // aktives
- BOOL ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
+ sal_Bool ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
void ScrollToObject( SdrObject* pDrawObj );
void MakeVisible( const Rectangle& rHMMRect );
@@ -413,7 +414,7 @@ public:
void PaintLeftArea( SCROW nStartRow, SCROW nEndRow );
void PaintLeft();
- BOOL PaintExtras();
+ sal_Bool PaintExtras();
void RecalcPPT();
@@ -444,25 +445,25 @@ public:
void InvalidateAttribs();
void MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW nRow );
- void KillEditView( BOOL bNoPaint );
+ void KillEditView( sal_Bool bNoPaint );
void UpdateEditView();
// Bloecke
- void SelectAll( BOOL bContinue = FALSE );
+ void SelectAll( sal_Bool bContinue = false );
void SelectAllTables();
void DeselectAllTables();
void MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bCols = FALSE, BOOL bRows = FALSE, BOOL bCellSelection = FALSE );
+ sal_Bool bCols = false, sal_Bool bRows = false, sal_Bool bCellSelection = false );
void InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bTestNeg = FALSE,
- BOOL bCols = FALSE, BOOL bRows = FALSE );
+ sal_Bool bTestNeg = false,
+ sal_Bool bCols = false, sal_Bool bRows = false );
void InitOwnBlockMode();
- void DoneBlockMode( BOOL bContinue = FALSE );
+ void DoneBlockMode( sal_Bool bContinue = false );
- BOOL IsBlockMode() const { return bIsBlockMode; }
+ sal_Bool IsBlockMode() const { return bIsBlockMode; }
void ExpandBlock(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode);
void ExpandBlockPage(SCsCOL nMovX, SCsROW nMovY);
@@ -470,47 +471,47 @@ public:
void MarkColumns();
void MarkRows();
- void MarkDataArea( BOOL bIncludeCursor = TRUE );
+ void MarkDataArea( sal_Bool bIncludeCursor = sal_True );
void MarkMatrixFormula();
void Unmark();
- void MarkRange( const ScRange& rRange, BOOL bSetCursor = TRUE, BOOL bContinue = FALSE );
+ void MarkRange( const ScRange& rRange, sal_Bool bSetCursor = sal_True, sal_Bool bContinue = false );
- BOOL IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
+ sal_Bool IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
void PaintMarks( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
- void PaintBlock( BOOL bReset = FALSE );
+ void PaintBlock( sal_Bool bReset = false );
void SetMarkData( const ScMarkData& rNew );
void MarkDataChanged();
- void LockModifiers( USHORT nModifiers );
- USHORT GetLockedModifiers() const;
- void ViewOptionsHasChanged( BOOL bHScrollChanged,
- BOOL bGraphicsChanged = FALSE);
+ void LockModifiers( sal_uInt16 nModifiers );
+ sal_uInt16 GetLockedModifiers() const;
+ void ViewOptionsHasChanged( sal_Bool bHScrollChanged,
+ sal_Bool bGraphicsChanged = false);
Point GetMousePosPixel();
void SnapSplitPos( Point& rScreenPosPixel );
- void FreezeSplitters( BOOL bFreeze );
+ void FreezeSplitters( sal_Bool bFreeze );
void RemoveSplit();
void SplitAtCursor();
- void SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer );
+ void SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer );
void InvalidateSplit();
- void ErrorMessage( USHORT nGlobStrId );
- Window* GetParentOrChild( USHORT nChildId );
+ void ErrorMessage( sal_uInt16 nGlobStrId );
+ Window* GetParentOrChild( sal_uInt16 nChildId );
- void EnableRefInput(BOOL bFlag=TRUE);
+ void EnableRefInput(sal_Bool bFlag=sal_True);
Window* GetFrameWin() const { return pFrameWin; }
- BOOL HasPaintBrush() const { return pBrushDocument || pDrawBrushSet; }
+ sal_Bool HasPaintBrush() const { return pBrushDocument || pDrawBrushSet; }
ScDocument* GetBrushDocument() const { return pBrushDocument; }
SfxItemSet* GetDrawBrushSet() const { return pDrawBrushSet; }
- BOOL IsPaintBrushLocked() const { return bLockPaintBrush; }
- void SetBrushDocument( ScDocument* pNew, BOOL bLock );
- void SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock );
+ sal_Bool IsPaintBrushLocked() const { return bLockPaintBrush; }
+ void SetBrushDocument( ScDocument* pNew, sal_Bool bLock );
+ void SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock );
void ResetBrushDocument();
};
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index b4685657f577..49fd72ea8106 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -101,15 +101,15 @@ enum ObjectSelectionType
class ScTabViewShell: public SfxViewShell, public ScDBFunc
{
private:
- static USHORT nInsertCtrlState;
- static USHORT nInsCellsCtrlState;
- static USHORT nInsObjCtrlState;
+ static sal_uInt16 nInsertCtrlState;
+ static sal_uInt16 nInsCellsCtrlState;
+ static sal_uInt16 nInsObjCtrlState;
SvxHtmlOptions aHTMLOpt;
ObjectSelectionType eCurOST;
- USHORT nDrawSfxId;
- USHORT nCtrlSfxId;
- USHORT nFormSfxId;
+ sal_uInt16 nDrawSfxId;
+ sal_uInt16 nCtrlSfxId;
+ sal_uInt16 nFormSfxId;
String sDrawCustom; // current custom shape type
ScDrawShell* pDrawShell;
ScDrawTextObjectBar* pDrawTextShell;
@@ -145,36 +145,36 @@ private:
ScNavigatorSettings* pNavSettings;
// used in first Activate
- BOOL bFirstActivate;
+ sal_Bool bFirstActivate;
- BOOL bActiveDrawSh;
- BOOL bActiveDrawTextSh;
- BOOL bActivePivotSh;
- BOOL bActiveAuditingSh;
- BOOL bActiveDrawFormSh;
- BOOL bActiveOleObjectSh;
- BOOL bActiveChartSh;
- BOOL bActiveGraphicSh;
- BOOL bActiveMediaSh;
- BOOL bActiveEditSh;
+ sal_Bool bActiveDrawSh;
+ sal_Bool bActiveDrawTextSh;
+ sal_Bool bActivePivotSh;
+ sal_Bool bActiveAuditingSh;
+ sal_Bool bActiveDrawFormSh;
+ sal_Bool bActiveOleObjectSh;
+ sal_Bool bActiveChartSh;
+ sal_Bool bActiveGraphicSh;
+ sal_Bool bActiveMediaSh;
+ sal_Bool bActiveEditSh;
- BOOL bFormShellAtTop; // does the FormShell need to be on top?
+ sal_Bool bFormShellAtTop; // does the FormShell need to be on top?
- BOOL bDontSwitch; // EditShell nicht abschalten
- BOOL bInFormatDialog; // fuer GetSelectionText
- BOOL bPrintSelected; // for result of SvxPrtQryBox
+ sal_Bool bDontSwitch; // EditShell nicht abschalten
+ sal_Bool bInFormatDialog; // fuer GetSelectionText
+ sal_Bool bPrintSelected; // for result of SvxPrtQryBox
- BOOL bReadOnly; // um Status-Aenderungen zu erkennen
+ sal_Bool bReadOnly; // um Status-Aenderungen zu erkennen
SbxObject* pScSbxObject;
- BOOL bChartAreaValid; // wenn Chart aufgezogen wird
+ sal_Bool bChartAreaValid; // wenn Chart aufgezogen wird
String aEditChartName;
ScRangeListRef aChartSource;
Rectangle aChartPos;
SCTAB nChartDestTab;
- USHORT nCurRefDlgId;
+ sal_uInt16 nCurRefDlgId;
SfxBroadcaster* pAccessibilityBroadcaster;
@@ -182,7 +182,7 @@ private:
String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
private:
- void Construct( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
+ void Construct( sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE );
SfxShell* GetMySubShell() const;
@@ -198,9 +198,9 @@ private:
DECL_LINK( HtmlOptionsHdl, void * );
protected:
- virtual void Activate(BOOL bMDI);
- virtual void Deactivate(BOOL bMDI);
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ virtual void Activate(sal_Bool bMDI);
+ virtual void Deactivate(sal_Bool bMDI);
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = false );
virtual void ShowCursor(bool bOn);
@@ -216,14 +216,14 @@ protected:
virtual Size GetOptimalSizePixel() const;
- virtual String GetSelectionText( BOOL bWholeWord );
- virtual BOOL HasSelection( BOOL bText ) const;
+ virtual String GetSelectionText( sal_Bool bWholeWord );
+ virtual sal_Bool HasSelection( sal_Bool bText ) const;
virtual String GetDescription() const;
- virtual void WriteUserData(String &, BOOL bBrowse = FALSE);
- virtual void ReadUserData(const String &, BOOL bBrowse = FALSE);
- virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
- virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void WriteUserData(String &, sal_Bool bBrowse = false);
+ virtual void ReadUserData(const String &, sal_Bool bBrowse = false);
+ virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
+ virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
virtual void UIDeactivated( SfxInPlaceClient* pClient );
@@ -253,10 +253,10 @@ public:
void ExecuteInputDirect();
ScInputHandler* GetInputHandler() const;
- void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE );
+ void UpdateInputHandler( sal_Bool bForce = false, sal_Bool bStopEditing = sal_True );
void UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust );
- BOOL TabKeyInput(const KeyEvent& rKEvt);
- BOOL SfxKeyInput(const KeyEvent& rKEvt);
+ sal_Bool TabKeyInput(const KeyEvent& rKEvt);
+ sal_Bool SfxKeyInput(const KeyEvent& rKEvt);
void SetActive();
@@ -303,32 +303,32 @@ public:
void GetDrawOptState(SfxItemSet &rSet);
- void SetDrawShell( BOOL bActive );
- void SetDrawTextShell( BOOL bActive );
+ void SetDrawShell( sal_Bool bActive );
+ void SetDrawTextShell( sal_Bool bActive );
- void SetPivotShell( BOOL bActive );
+ void SetPivotShell( sal_Bool bActive );
ScArea* GetPivotSource(){return pPivotSource;}
void SetPivotSource(ScArea* pSrc){pPivotSource=pSrc;}
void SetDialogDPObject( const ScDPObject* pObj );
const ScDPObject* GetDialogDPObject() const { return pDialogDPObject; }
- BOOL GetDontSwitch(){return bDontSwitch;}
- void SetDontSwitch(BOOL bFlag){bDontSwitch=bFlag;}
+ sal_Bool GetDontSwitch(){return bDontSwitch;}
+ void SetDontSwitch(sal_Bool bFlag){bDontSwitch=bFlag;}
- void SetAuditShell( BOOL bActive );
- void SetDrawFormShell( BOOL bActive );
- void SetEditShell(EditView* pView, BOOL bActive );
- void SetOleObjectShell( BOOL bActive );
- void SetChartShell( BOOL bActive );
- void SetGraphicShell( BOOL bActive );
- void SetMediaShell( BOOL bActive );
+ void SetAuditShell( sal_Bool bActive );
+ void SetDrawFormShell( sal_Bool bActive );
+ void SetEditShell(EditView* pView, sal_Bool bActive );
+ void SetOleObjectShell( sal_Bool bActive );
+ void SetChartShell( sal_Bool bActive );
+ void SetGraphicShell( sal_Bool bActive );
+ void SetMediaShell( sal_Bool bActive );
void SetDrawShellOrSub();
- void SetCurSubShell( ObjectSelectionType eOST, BOOL bForce = FALSE );
+ void SetCurSubShell( ObjectSelectionType eOST, sal_Bool bForce = false );
- void SetFormShellAtTop( BOOL bSet );
+ void SetFormShellAtTop( sal_Bool bSet );
ObjectSelectionType GetCurObjectSelectionType();
@@ -336,15 +336,15 @@ public:
void StopEditShell();
- BOOL IsDrawTextShell() const;
- BOOL IsAuditShell() const;
+ sal_Bool IsDrawTextShell() const;
+ sal_Bool IsAuditShell() const;
- void SetDrawTextUndo( SfxUndoManager* pUndoMgr );
+ void SetDrawTextUndo( ::svl::IUndoManager* pUndoMgr );
void FillFieldData( ScHeaderFieldData& rData );
void SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest );
- BOOL GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const;
+ sal_Bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const;
void SetEditChartName(const String& aStr){aEditChartName=aStr;}
@@ -353,27 +353,21 @@ public:
ScNavigatorSettings* GetNavigatorSettings();
// Drucken:
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- virtual USHORT SetPrinter( SfxPrinter* pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = false );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter,
+ sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false );
- virtual PrintDialog* CreatePrintDialog( Window* pParent );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog,
- BOOL bSilent, BOOL bIsAPI );
- virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
void ConnectObject( SdrOle2Obj* pObj );
- BOOL ActivateObject( SdrOle2Obj* pObj, long nVerb );
+ sal_Bool ActivateObject( SdrOle2Obj* pObj, long nVerb );
void DeactivateOle();
SC_DLLPUBLIC static ScTabViewShell* GetActiveViewShell();
SfxModelessDialog* CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW,
SfxChildWinInfo* pInfo,
- Window* pParent, USHORT nSlotId );
+ Window* pParent, sal_uInt16 nSlotId );
void UpdateOleZoom();
inline SbxObject* GetScSbxObject() const
@@ -384,15 +378,15 @@ public:
FmFormShell* GetFormShell() const { return pFormShell; }
void InsertURL( const String& rName, const String& rURL, const String& rTarget,
- USHORT nMode );
+ sal_uInt16 nMode );
void InsertURLButton( const String& rName, const String& rURL, const String& rTarget,
const Point* pInsPos = NULL );
void InsertURLField( const String& rName, const String& rURL, const String& rTarget );
- BOOL SelectObject( const String& rName );
+ sal_Bool SelectObject( const String& rName );
- void SetInFormatDialog(BOOL bFlag) {bInFormatDialog=bFlag;}
- BOOL IsInFormatDialog() {return bInFormatDialog;}
+ void SetInFormatDialog(sal_Bool bFlag) {bInFormatDialog=bFlag;}
+ sal_Bool IsInFormatDialog() {return bInFormatDialog;}
void ForceMove() { Move(); }
@@ -403,20 +397,20 @@ public:
void UpdateNumberFormatter ( ScDocument* pDoc,
const SvxNumberInfoItem& rInfoItem );
- void ExecuteCellFormatDlg ( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+ void ExecuteCellFormatDlg ( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
- BOOL GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
+ sal_Bool GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
void StartSimpleRefDialog( const String& rTitle, const String& rInitVal,
- BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection );
+ sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection );
void StopSimpleRefDialog();
- void SetCurRefDlgId( USHORT nNew );
+ void SetCurRefDlgId( sal_uInt16 nNew );
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
void BroadcastAccessibility( const SfxHint &rHint );
- BOOL HasAccessibilityObjects();
+ sal_Bool HasAccessibilityObjects();
bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash);
diff --git a/sc/source/ui/inc/tbinsert.hxx b/sc/source/ui/inc/tbinsert.hxx
index 7c0b0504d8c7..1910b2f7a081 100644
--- a/sc/source/ui/inc/tbinsert.hxx
+++ b/sc/source/ui/inc/tbinsert.hxx
@@ -33,20 +33,20 @@
class ScTbxInsertCtrl : public SfxToolBoxControl
{
- USHORT nLastSlotId;
+ sal_uInt16 nLastSlotId;
using SfxToolBoxControl::Select;
- virtual void Select( BOOL bMod1 = FALSE );
+ virtual void Select( sal_Bool bMod1 = false );
public:
SFX_DECL_TOOLBOX_CONTROL();
- ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
~ScTbxInsertCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
};
diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx
index 32581f1dc792..481801c14af4 100644
--- a/sc/source/ui/inc/tbzoomsliderctrl.hxx
+++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx
@@ -41,10 +41,10 @@ class ScZoomSliderControl: public SfxToolBoxControl
{
public:
SFX_DECL_TOOLBOX_CONTROL();
- ScZoomSliderControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ ScZoomSliderControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~ScZoomSliderControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual Window* CreateItemWindow( Window *pParent );
};
@@ -60,13 +60,13 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
- USHORT Offset2Zoom( long nOffset ) const;
- long Zoom2Offset( USHORT nZoom ) const;
+ sal_uInt16 Offset2Zoom( long nOffset ) const;
+ long Zoom2Offset( sal_uInt16 nZoom ) const;
void DoPaint( const Rectangle& rRect );
public:
ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom );
~ScZoomSliderWnd();
void UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem );
diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx
index 24b68650ce16..202409e00d7b 100644
--- a/sc/source/ui/inc/textdlgs.hxx
+++ b/sc/source/ui/inc/textdlgs.hxx
@@ -43,7 +43,7 @@ private:
const SfxItemSet& rOutAttrs;
const SfxObjectShell& rDocShell;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
@@ -60,7 +60,7 @@ class ScParagraphDlg : public SfxTabDialog
private:
const SfxItemSet& rOutAttrs;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr );
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 608670181f46..9ab7c107561b 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -46,8 +46,8 @@ class ScTpCalcOptions : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
@@ -83,7 +83,7 @@ private:
ScDocOptions* pOldOptions;
ScDocOptions* pLocalOptions;
- USHORT nWhichCalc;
+ sal_uInt16 nWhichCalc;
#ifdef _TPCALC_CXX
private:
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
index 54e29c534b46..70d043d5ddec 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -42,7 +42,7 @@ class ScTpCompatOptions : public SfxTabPage
public:
static SfxTabPage* Create (Window* pParent, const SfxItemSet& rCoreAttrs);
- virtual BOOL FillItemSet(SfxItemSet& rCoreAttrs);
+ virtual sal_Bool FillItemSet(SfxItemSet& rCoreAttrs);
virtual void Reset(const SfxItemSet& rCoreAttrs);
virtual int DeactivatePage(SfxItemSet* pSet = NULL);
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 4103bf8fae57..41746603c5f1 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -47,7 +47,7 @@ public:
static SfxTabPage* Create (Window* pParent, const SfxItemSet& rCoreSet);
// static USHORT* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet& rCoreSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rCoreSet);
virtual void Reset( const SfxItemSet& rCoreSet );
virtual int DeactivatePage(SfxItemSet* pSet = NULL);
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index 386015e0337c..171b1a56af90 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -30,7 +30,7 @@
#define SC_TPHF_HXX
-#include <svx/hdft2.hxx>
+#include <svx/hdft.hxx>
class ScStyleDlg;
@@ -42,16 +42,16 @@ public:
virtual ~ScHFPage();
virtual void Reset( const SfxItemSet& rSet );
- virtual BOOL FillItemSet( SfxItemSet& rOutSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rOutSet );
void SetPageStyle( const String& rName ) { aStrPageStyle = rName; }
void SetStyleDlg ( const ScStyleDlg* pDlg ) { pStyleDlg = pDlg; }
protected:
ScHFPage( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const SfxItemSet& rSet,
- USHORT nSetId );
+ sal_uInt16 nSetId );
virtual void ActivatePage();
virtual void DeactivatePage();
@@ -62,7 +62,7 @@ private:
PushButton aBtnEdit;
SfxItemSet aDataSet;
String aStrPageStyle;
- USHORT nPageUsage;
+ sal_uInt16 nPageUsage;
const ScStyleDlg* pStyleDlg;
#ifdef _TPHF_CXX
@@ -79,7 +79,7 @@ class ScHeaderPage : public ScHFPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScHeaderPage( Window* pParent, const SfxItemSet& rSet );
@@ -91,7 +91,7 @@ class ScFooterPage : public ScHFPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScFooterPage( Window* pParent, const SfxItemSet& rSet );
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index c9dfa06cc3b6..7c1a994e1080 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -109,7 +109,7 @@ private:
Timer aTimer;
ScPopupMenu* pPopupMenu;
Link aMLink;
- USHORT nSelected;
+ sal_uInt16 nSelected;
SC_DLLPRIVATE DECL_LINK( TimerHdl, Timer*);
@@ -127,7 +127,7 @@ public:
void SetPopupMenu(ScPopupMenu* pPopUp);
- USHORT GetSelected();
+ sal_uInt16 GetSelected();
void SetMenuHdl( const Link& rLink ) { aMLink = rLink; }
const Link& GetMenuHdl() const { return aMLink; }
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index bbd2f471c1e9..7aa00147fa64 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -46,8 +46,8 @@ class ScTpPrintOptions : public SfxTabPage
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rCoreSet );
+ static sal_uInt16* GetRanges();
+ virtual sal_Bool FillItemSet( SfxItemSet& rCoreSet );
virtual void Reset( const SfxItemSet& rCoreSet );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage( SfxItemSet* pSet = NULL );
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index f34d1236210a..8f22696c879d 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -62,8 +62,8 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
protected:
@@ -94,16 +94,16 @@ private:
String aStrColumn;
String aStrRow;
- const USHORT nWhichSort;
+ const sal_uInt16 nWhichSort;
ScSortDlg* pDlg;
ScViewData* pViewData;
const ScSortParam& rSortData;
SCCOLROW nFieldArr[SC_MAXFIELDS];
- USHORT nFieldCount;
+ sal_uInt16 nFieldCount;
SCCOL nFirstCol;
SCROW nFirstRow;
- BOOL bHasHeader;
- BOOL bSortByRows;
+ sal_Bool bHasHeader;
+ sal_Bool bSortByRows;
ListBox* aSortLbArr[3];
RadioButton* aDirBtnArr[3][2];
@@ -112,10 +112,10 @@ private:
#ifdef _TPSORT_CXX
private:
void Init ();
- void DisableField ( USHORT nField );
- void EnableField ( USHORT nField );
+ void DisableField ( sal_uInt16 nField );
+ void EnableField ( sal_uInt16 nField );
void FillFieldLists ();
- USHORT GetFieldSelPos ( SCCOLROW nField );
+ sal_uInt16 GetFieldSelPos ( SCCOLROW nField );
// Handler ------------------------
DECL_LINK( SelectHdl, ListBox * );
@@ -148,8 +148,8 @@ public:
#define SfxTabPage ::SfxTabPage
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
protected:
@@ -191,7 +191,7 @@ private:
String aStrNoName;
String aStrAreaLabel;
- const USHORT nWhichSort;
+ const sal_uInt16 nWhichSort;
const ScSortParam& rSortData;
ScViewData* pViewData;
ScDocument* pDoc;
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index 4016e682176b..46f6b7fdaf0e 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -48,7 +48,7 @@ private:
~ScDocStatPage();
protected:
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset ( const SfxItemSet& rSet );
private:
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index 1a2bd22c4a5b..049633ad40b6 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -48,16 +48,16 @@ class ScDocument;
class ScTpSubTotalGroup : public SfxTabPage
{
protected:
- ScTpSubTotalGroup( Window* pParent, USHORT nResId,
+ ScTpSubTotalGroup( Window* pParent, sal_uInt16 nResId,
const SfxItemSet& rArgSet );
public:
virtual ~ScTpSubTotalGroup();
- static USHORT* GetRanges ();
- BOOL DoReset ( USHORT nGroupNo,
+ static sal_uInt16* GetRanges ();
+ sal_Bool DoReset ( sal_uInt16 nGroupNo,
const SfxItemSet& rArgSet );
- BOOL DoFillItemSet ( USHORT nGroupNo,
+ sal_Bool DoFillItemSet ( sal_uInt16 nGroupNo,
SfxItemSet& rArgSet );
protected:
FixedText aFtGroup;
@@ -72,17 +72,17 @@ protected:
ScViewData* pViewData;
ScDocument* pDoc;
- const USHORT nWhichSubTotals;
+ const sal_uInt16 nWhichSubTotals;
const ScSubTotalParam& rSubTotalData;
SCCOL nFieldArr[SC_MAXFIELDS];
- const USHORT nFieldCount;
+ const sal_uInt16 nFieldCount;
private:
void Init ();
void FillListBoxes ();
- ScSubTotalFunc LbPosToFunc ( USHORT nPos );
- USHORT FuncToLbPos ( ScSubTotalFunc eFunc );
- USHORT GetFieldSelPos ( SCCOL nField );
+ ScSubTotalFunc LbPosToFunc ( sal_uInt16 nPos );
+ sal_uInt16 FuncToLbPos ( ScSubTotalFunc eFunc );
+ sal_uInt16 GetFieldSelPos ( SCCOL nField );
// Handler ------------------------
DECL_LINK( SelectHdl, ListBox * );
@@ -102,7 +102,7 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -119,7 +119,7 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -136,7 +136,7 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -152,10 +152,10 @@ protected:
public:
virtual ~ScTpSubTotalOptions();
- static USHORT* GetRanges ();
+ static sal_uInt16* GetRanges ();
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
private:
@@ -172,7 +172,7 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- const USHORT nWhichSubTotals;
+ const sal_uInt16 nWhichSubTotals;
const ScSubTotalParam& rSubTotalData;
private:
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index b1b988811d6e..d72b9f306e4e 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -58,8 +58,8 @@ class ScTablePage : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 2e277a14af8d..f627baa52225 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -47,8 +47,8 @@ class ScTpUserLists : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rAttrSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreAttrs );
virtual void Reset ( const SfxItemSet& rCoreAttrs );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
@@ -79,7 +79,7 @@ private:
const String aStrCopyFrom;
const String aStrCopyErr;
- const USHORT nWhichUserLists;
+ const sal_uInt16 nWhichUserLists;
ScUserList* pUserLists;
ScDocument* pDoc;
@@ -87,20 +87,20 @@ private:
ScRangeUtil* pRangeUtil;
String aStrSelectedArea;
- BOOL bModifyMode;
- BOOL bCancelMode;
- BOOL bCopyDone;
- USHORT nCancelPos;
+ sal_Bool bModifyMode;
+ sal_Bool bCancelMode;
+ sal_Bool bCopyDone;
+ sal_uInt16 nCancelPos;
#ifdef _TPUSRLST_CXX
private:
void Init ();
- USHORT UpdateUserListBox ();
- void UpdateEntries ( USHORT nList );
+ sal_uInt16 UpdateUserListBox ();
+ void UpdateEntries ( sal_uInt16 nList );
void MakeListStr ( String& rListStr );
void AddNewList ( const String& rEntriesStr );
- void RemoveList ( USHORT nList );
- void ModifyList ( USHORT nSelList,
+ void RemoveList ( sal_uInt16 nList );
+ void ModifyList ( sal_uInt16 nSelList,
const String& rEntriesStr );
void CopyListFromArea ( const ScRefAddress& rStartPos,
const ScRefAddress& rEndPos );
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 43a75433adda..68093f0ce0f5 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -100,7 +100,7 @@ class ScTpContentOptions : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -156,7 +156,7 @@ class ScTpLayoutOptions : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 5940d806b43c..2afa83c05cb6 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -59,10 +59,11 @@ private:
SCCOL nDragHandleX;
SCROW nDragHandleY;
SCTAB nVisibleTab;
- USHORT nDragSourceFlags;
- BOOL bDragWasInternal;
- BOOL bUsedForLink;
+ sal_uInt16 nDragSourceFlags;
+ sal_Bool bDragWasInternal;
+ sal_Bool bUsedForLink;
bool bHasFiltered; // if has filtered rows
+ bool bUseInApi; // to recognize clipboard content copied from API
void InitDocShell();
static void StripRefs( ScDocument* pDoc, SCCOL nStartX, SCROW nStartY,
@@ -70,7 +71,7 @@ private:
ScDocument* pDestDoc=0,
SCCOL nSubX=0, SCROW nSubY=0 );
static void PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor,
- const ScRange& rBlock, BOOL bMetaFile );
+ const ScRange& rBlock, sal_Bool bMetaFile );
static void GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol );
public:
@@ -90,8 +91,9 @@ public:
SCCOL GetDragHandleX() const { return nDragHandleX; }
SCROW GetDragHandleY() const { return nDragHandleY; }
SCTAB GetVisibleTab() const { return nVisibleTab; }
- USHORT GetDragSourceFlags() const { return nDragSourceFlags; }
+ sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; }
bool HasFilteredRows() const { return bHasFiltered; }
+ bool GetUseInApi() const { return bUseInApi; }
ScDocShell* GetSourceDocShell();
ScDocument* GetSourceDocument();
ScMarkData GetSourceMarkData();
@@ -100,12 +102,13 @@ public:
void SetDragHandlePos( SCCOL nX, SCROW nY );
void SetVisibleTab( SCTAB nNew );
void SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark );
- void SetDragSourceFlags( USHORT nFlags );
+ void SetDragSourceFlags( sal_uInt16 nFlags );
void SetDragWasInternal();
+ SC_DLLPUBLIC void SetUseInApi( bool bSet );
static SC_DLLPUBLIC ScTransferObj* GetOwnClipboard( Window* pUIWin );
- static SfxObjectShell* SetDrawClipDoc( BOOL bAnyOle ); // update ScGlobal::pDrawClipDocShellRef
+ static SfxObjectShell* SetDrawClipDoc( sal_Bool bAnyOle ); // update ScGlobal::pDrawClipDocShellRef
virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException );
static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
};
diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx
index fa8ba1abfc1f..c97c14143798 100644
--- a/sc/source/ui/inc/ui_pch.hxx
+++ b/sc/source/ui/inc/ui_pch.hxx
@@ -76,7 +76,7 @@
#include <vcl/outdev.hxx>
#include <vcl/pointr.hxx>
#include <vcl/ptrstyle.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/event.hxx>
#include <limits.h>
#include <tools/errinf.hxx>
@@ -202,7 +202,7 @@
#include <svl/stritem.hxx>
#include <collect.hxx>
#include <svx/svdsob.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdglue.hxx>
#include <svx/svdlayer.hxx>
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 4c6ae0914780..f35302c92901 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -56,7 +56,7 @@ class ScInputStatusItem : public SfxPoolItem
public:
TYPEINFO();
- ScInputStatusItem( USHORT nWhich,
+ ScInputStatusItem( sal_uInt16 nWhich,
const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
@@ -94,16 +94,16 @@ public:
class ScTablesHint : public SfxHint
{
- USHORT nId;
+ sal_uInt16 nId;
SCTAB nTab1;
SCTAB nTab2;
public:
TYPEINFO();
- ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2=0);
+ ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2=0);
~ScTablesHint();
- USHORT GetId() const { return nId; }
+ sal_uInt16 GetId() const { return nId; }
SCTAB GetTab1() const { return nTab1; }
SCTAB GetTab2() const { return nTab2; }
};
@@ -129,16 +129,16 @@ private:
class ScIndexHint : public SfxHint
{
- USHORT nId;
- USHORT nIndex;
+ sal_uInt16 nId;
+ sal_uInt16 nIndex;
public:
TYPEINFO();
- ScIndexHint(USHORT nNewId, USHORT nIdx);
+ ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx);
~ScIndexHint();
- USHORT GetId() const { return nId; }
- USHORT GetIndex() const { return nIndex; }
+ sal_uInt16 GetId() const { return nId; }
+ sal_uInt16 GetIndex() const { return nIndex; }
};
//----------------------------------------------------------------------------
@@ -148,10 +148,10 @@ class SC_DLLPUBLIC ScSortItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScSortItem( USHORT nWhich,
+ ScSortItem( sal_uInt16 nWhich,
ScViewData* ptrViewData,
const ScSortParam* pSortData );
- ScSortItem( USHORT nWhich,
+ ScSortItem( sal_uInt16 nWhich,
const ScSortParam* pSortData );
ScSortItem( const ScSortItem& rItem );
~ScSortItem();
@@ -159,7 +159,7 @@ public:
virtual String GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const;
ScViewData* GetViewData () const { return pViewData; }
const ScSortParam& GetSortData () const { return theSortData; }
@@ -176,10 +176,10 @@ class SC_DLLPUBLIC ScQueryItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScQueryItem( USHORT nWhich,
+ ScQueryItem( sal_uInt16 nWhich,
ScViewData* ptrViewData,
const ScQueryParam* pQueryData );
- ScQueryItem( USHORT nWhich,
+ ScQueryItem( sal_uInt16 nWhich,
const ScQueryParam* pQueryData );
ScQueryItem( const ScQueryItem& rItem );
~ScQueryItem();
@@ -191,13 +191,13 @@ public:
ScViewData* GetViewData () const { return pViewData; }
const ScQueryParam& GetQueryData() const { return theQueryData; }
- BOOL GetAdvancedQuerySource(ScRange& rSource) const;
+ sal_Bool GetAdvancedQuerySource(ScRange& rSource) const;
void SetAdvancedQuerySource(const ScRange* pSource);
private:
ScViewData* pViewData;
ScQueryParam theQueryData;
- BOOL bIsAdvanced;
+ sal_Bool bIsAdvanced;
ScRange aAdvSource;
};
@@ -208,10 +208,10 @@ class SC_DLLPUBLIC ScSubTotalItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScSubTotalItem( USHORT nWhich,
+ ScSubTotalItem( sal_uInt16 nWhich,
ScViewData* ptrViewData,
const ScSubTotalParam* pSubTotalData );
- ScSubTotalItem( USHORT nWhich,
+ ScSubTotalItem( sal_uInt16 nWhich,
const ScSubTotalParam* pSubTotalData );
ScSubTotalItem( const ScSubTotalItem& rItem );
~ScSubTotalItem();
@@ -219,7 +219,7 @@ public:
virtual String GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const;
ScViewData* GetViewData () const { return pViewData; }
const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; }
@@ -236,7 +236,7 @@ class SC_DLLPUBLIC ScUserListItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScUserListItem( USHORT nWhich );
+ ScUserListItem( sal_uInt16 nWhich );
ScUserListItem( const ScUserListItem& rItem );
~ScUserListItem();
@@ -258,7 +258,7 @@ class ScConsolidateItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScConsolidateItem( USHORT nWhich,
+ ScConsolidateItem( sal_uInt16 nWhich,
const ScConsolidateParam* pParam );
ScConsolidateItem( const ScConsolidateItem& rItem );
~ScConsolidateItem();
@@ -280,8 +280,8 @@ class ScPivotItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScPivotItem( USHORT nWhich, const ScDPSaveData* pData,
- const ScRange* pRange, BOOL bNew );
+ ScPivotItem( sal_uInt16 nWhich, const ScDPSaveData* pData,
+ const ScRange* pRange, sal_Bool bNew );
ScPivotItem( const ScPivotItem& rItem );
~ScPivotItem();
@@ -291,12 +291,12 @@ public:
const ScDPSaveData& GetData() const { return *pSaveData; }
const ScRange& GetDestRange() const { return aDestRange; }
- BOOL IsNewSheet() const { return bNewSheet; }
+ sal_Bool IsNewSheet() const { return bNewSheet; }
private:
ScDPSaveData* pSaveData;
ScRange aDestRange;
- BOOL bNewSheet;
+ sal_Bool bNewSheet;
};
//----------------------------------------------------------------------------
@@ -306,7 +306,7 @@ class ScSolveItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScSolveItem( USHORT nWhich,
+ ScSolveItem( sal_uInt16 nWhich,
const ScSolveParam* pParam );
ScSolveItem( const ScSolveItem& rItem );
~ScSolveItem();
@@ -328,7 +328,7 @@ class ScTabOpItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScTabOpItem( USHORT nWhich,
+ ScTabOpItem( sal_uInt16 nWhich,
const ScTabOpParam* pParam );
ScTabOpItem( const ScTabOpItem& rItem );
~ScTabOpItem();
@@ -350,7 +350,7 @@ class ScCondFrmtItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScCondFrmtItem( USHORT nWhich,
+ ScCondFrmtItem( sal_uInt16 nWhich,
//! const ScConditionalFormat* pCondFrmt );
const ScConditionalFormat& rCondFrmt );
ScCondFrmtItem( const ScCondFrmtItem& rItem );
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 385f0892f5c3..abc6770157e0 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -32,6 +32,7 @@
#include <svl/undo.hxx>
#include "global.hxx"
#include "address.hxx"
+#include "docsh.hxx"
class ScDocument;
class ScDocShell;
@@ -48,12 +49,16 @@ public:
ScSimpleUndo( ScDocShell* pDocSh );
virtual ~ScSimpleUndo();
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
protected:
ScDocShell* pDocShell;
SfxUndoAction* pDetectiveUndo;
+ bool IsPaintLocked() const { return pDocShell->IsPaintLocked(); }
+
+ bool SetViewMarkData( const ScMarkData& rMarkData );
+
void BeginUndo();
void EndUndo();
void BeginRedo();
@@ -85,7 +90,7 @@ protected:
// void BeginRedo();
void EndRedo();
- BOOL AdjustHeight();
+ sal_Bool AdjustHeight();
void ShowBlock();
};
@@ -155,16 +160,16 @@ public:
SfxUndoAction* GetWrappedUndo() { return pWrappedUndo; }
void ForgetWrappedUndo();
- virtual BOOL IsLinked();
- virtual void SetLinked( BOOL bIsLinked );
+ virtual sal_Bool IsLinked();
+ virtual void SetLinked( sal_Bool bIsLinked );
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
virtual String GetComment() const;
virtual String GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual sal_uInt16 GetId() const;
};
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index a6eb727a7554..d8617490219a 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -60,29 +60,29 @@ public:
ScUndoInsertCells( ScDocShell* pNewDocShell,
const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios,
InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData,
- BOOL bNewPartOfPaste );
+ sal_Bool bNewPartOfPaste );
virtual ~ScUndoInsertCells();
virtual void Undo();
virtual void Redo();
virtual void Repeat( SfxRepeatTarget& rTarget );
- virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const;
virtual String GetComment() const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
private:
ScRange aEffRange;
SCTAB nCount;
SCTAB* pTabs;
SCTAB* pScenarios;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
InsCellCmd eCmd;
- BOOL bPartOfPaste;
+ sal_Bool bPartOfPaste;
SfxUndoAction* pPasteUndo;
- void DoChange ( const BOOL bUndo );
+ void DoChange ( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -99,7 +99,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -108,11 +108,11 @@ private:
SCTAB nCount;
SCTAB* pTabs;
SCTAB* pScenarios;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
DelCellCmd eCmd;
- void DoChange ( const BOOL bUndo );
+ void DoChange ( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -122,7 +122,7 @@ class ScUndoDeleteMulti: public ScMoveUndo
public:
TYPEINFO();
ScUndoDeleteMulti( ScDocShell* pNewDocShell,
- BOOL bNewRows, BOOL bNeedsRefresh, SCTAB nNewTab,
+ sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab,
const SCCOLROW* pRng, SCCOLROW nRngCnt,
ScDocument* pUndoDocument, ScRefUndoData* pRefData );
virtual ~ScUndoDeleteMulti();
@@ -130,18 +130,18 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
- BOOL bRows;
- BOOL bRefresh;
+ sal_Bool bRows;
+ sal_Bool bRefresh;
SCTAB nTab;
SCCOLROW* pRanges;
SCCOLROW nRangeCnt;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void DoChange() const;
void SetChangeTrack();
@@ -162,7 +162,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -170,27 +170,27 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
ScRange aExtendedRange;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
struct ScUndoPasteOptions
{
- USHORT nFunction;
- BOOL bSkipEmpty;
- BOOL bTranspose;
- BOOL bAsLink;
+ sal_uInt16 nFunction;
+ sal_Bool bSkipEmpty;
+ sal_Bool bTranspose;
+ sal_Bool bAsLink;
InsCellCmd eMoveMode;
ScUndoPasteOptions() :
nFunction( PASTE_NOFUNC ),
- bSkipEmpty( FALSE ),
- bTranspose( FALSE ),
- bAsLink( FALSE ),
+ bSkipEmpty( false ),
+ bTranspose( false ),
+ bAsLink( false ),
eMoveMode( INS_NONE )
{}
};
@@ -204,16 +204,16 @@ public:
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
- BOOL bRedoIsFilled = TRUE,
+ sal_Bool bRedoIsFilled = sal_True,
const ScUndoPasteOptions* pOptions = NULL );
virtual ~ScUndoPaste();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -221,15 +221,15 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- USHORT nFlags;
+ sal_uInt16 nFlags;
ScRefUndoData* pRefUndoData;
ScRefUndoData* pRefRedoData;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- BOOL bRedoFilled;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_Bool bRedoFilled;
ScUndoPasteOptions aPasteOptions;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -239,27 +239,27 @@ class ScUndoDragDrop: public ScMoveUndo
public:
TYPEINFO();
ScUndoDragDrop( ScDocShell* pNewDocShell,
- const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut,
+ const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut,
ScDocument* pUndoDocument, ScRefUndoData* pRefData,
- BOOL bScenario );
+ sal_Bool bScenario );
virtual ~ScUndoDragDrop();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScRange aSrcRange;
ScRange aDestRange;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- BOOL bCut;
- BOOL bKeepScenarioFlags;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_Bool bCut;
+ sal_Bool bKeepScenarioFlags;
- void PaintArea( ScRange aRange, USHORT nExtFlags ) const;
+ void PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const;
void DoUndo( ScRange aRange ) const;
void SetChangeTrack();
@@ -273,14 +273,14 @@ public:
ScUndoDeleteContents( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
const ScRange& rRange,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
- USHORT nNewFlags, BOOL bObjects );
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
+ sal_uInt16 nNewFlags, sal_Bool bObjects );
virtual ~ScUndoDeleteContents();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -289,12 +289,12 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
SdrUndoAction* pDrawUndo; // geloeschte Objekte
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- USHORT nFlags;
- BOOL bMulti; // Mehrfachselektion
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_uInt16 nFlags;
+ sal_Bool bMulti; // Mehrfachselektion
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -307,14 +307,14 @@ public:
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti, SCTAB nSrc,
- USHORT nFlg, USHORT nFunc, BOOL bSkip, BOOL bLink );
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti, SCTAB nSrc,
+ sal_uInt16 nFlg, sal_uInt16 nFunc, sal_Bool bSkip, sal_Bool bLink );
virtual ~ScUndoFillTable();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -322,16 +322,16 @@ private:
ScRange aRange;
ScMarkData aMarkData;
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- USHORT nFlags;
- USHORT nFunction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_uInt16 nFlags;
+ sal_uInt16 nFunction;
SCTAB nSrcTab;
- BOOL bMulti; // Mehrfachselektion
- BOOL bSkipEmpty;
- BOOL bAsLink;
+ sal_Bool bMulti; // Mehrfachselektion
+ sal_Bool bSkipEmpty;
+ sal_Bool bAsLink;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -344,7 +344,7 @@ public:
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
const ScPatternAttr* pNewApply,
const SvxBoxItem* pNewOuter = NULL,
const SvxBoxInfoItem* pNewInner = NULL );
@@ -353,7 +353,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -363,12 +363,12 @@ private:
ScRange aRange;
ScEditDataArray aDataArray;
ScDocument* pUndoDoc;
- BOOL bMulti;
+ sal_Bool bMulti;
ScPatternAttr* pApplyPattern;
SvxBoxItem* pLineOuter;
SvxBoxInfoItem* pLineInner;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void ChangeEditData( const bool bUndo );
};
@@ -384,14 +384,14 @@ public:
ScDocument* pNewUndoDoc,
SCCOLROW nNewCnt, SCCOLROW* pNewRanges,
ScOutlineTable* pNewUndoTab,
- ScSizeMode eNewMode, USHORT nNewSizeTwips,
- BOOL bNewWidth );
+ ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips,
+ sal_Bool bNewWidth );
virtual ~ScUndoWidthOrHeight();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -405,8 +405,8 @@ private:
ScOutlineTable* pUndoTab;
SCCOLROW nRangeCnt;
SCCOLROW* pRanges;
- USHORT nNewSize;
- BOOL bWidth;
+ sal_uInt16 nNewSize;
+ sal_Bool bWidth;
ScSizeMode eMode;
SdrUndoAction* pDrawUndo;
};
@@ -422,13 +422,13 @@ public:
FillDir eNewFillDir,
FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd,
double fNewStartValue, double fNewStepValue, double fNewMaxValue,
- USHORT nMaxShIndex );
+ sal_uInt16 nMaxShIndex );
virtual ~ScUndoAutoFill();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -442,9 +442,9 @@ private:
double fStartValue;
double fStepValue;
double fMaxValue;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- USHORT nMaxSharedIndex;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_uInt16 nMaxSharedIndex;
void SetChangeTrack();
};
@@ -461,7 +461,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -482,21 +482,21 @@ public:
ScUndoAutoFormat( ScDocShell* pNewDocShell,
const ScRange& rRange, ScDocument* pNewUndoDoc,
const ScMarkData& rMark,
- BOOL bNewSize, USHORT nNewFormatNo );
+ sal_Bool bNewSize, sal_uInt16 nNewFormatNo );
virtual ~ScUndoAutoFormat();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScDocument* pUndoDoc; // geloeschte Daten
ScMarkData aMarkData;
- BOOL bSize;
- USHORT nFormatNo;
+ sal_Bool bSize;
+ sal_uInt16 nFormatNo;
};
@@ -514,7 +514,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -524,8 +524,8 @@ private:
String aUndoStr; // Daten bei Einfachmarkierung
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
SvxSearchItem* pSearchItem;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void SetChangeTrack();
};
@@ -543,13 +543,13 @@ public:
const ScRefAddress& rFormulaEnd,
const ScRefAddress& rRowCell,
const ScRefAddress& rColCell,
- BYTE nMode );
+ sal_uInt8 nMode );
virtual ~ScUndoTabOp();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -560,7 +560,7 @@ private:
ScRefAddress theFormulaEnd;
ScRefAddress theRowCell;
ScRefAddress theColCell;
- BYTE nMode;
+ sal_uInt8 nMode;
};
@@ -579,7 +579,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -589,8 +589,8 @@ private:
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
ScAddress aNewCursorPos;
ScDocument* pRedoDoc; // Blockmarkierung und neue Daten
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
ScConversionParam maConvParam; /// Conversion type and parameters.
void DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPos );
@@ -603,13 +603,13 @@ public:
TYPEINFO();
ScUndoRefConversion( ScDocShell* pNewDocShell,
const ScRange& aMarkRange, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, BOOL bNewMulti, USHORT nNewFlag);
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, sal_Bool bNewMulti, sal_uInt16 nNewFlag);
virtual ~ScUndoRefConversion();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -618,10 +618,10 @@ private:
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
ScRange aRange;
- BOOL bMulti;
- USHORT nFlags;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_Bool bMulti;
+ sal_uInt16 nFlags;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void DoChange( ScDocument* pRefDoc);
void SetChangeTrack();
@@ -639,7 +639,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -664,7 +664,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -690,10 +690,10 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
- virtual USHORT GetId() const;
+ virtual sal_uInt16 GetId() const;
private:
ScMarkData aMarkData;
@@ -701,7 +701,7 @@ private:
String aStyleName;
ScRange aRange;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
};
@@ -716,7 +716,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -739,7 +739,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -747,8 +747,8 @@ private:
ScDocument* pUndoDoc;
String aFormula;
formula::FormulaGrammar::AddressConvention eConv;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void SetChangeTrack();
};
@@ -762,13 +762,13 @@ public:
const String& rDoc,
const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefreshDelay );
+ sal_uLong nRefreshDelay );
virtual ~ScUndoInsertAreaLink();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -778,7 +778,7 @@ private:
String aOptions;
String aAreaName;
ScRange aRange;
- ULONG nRefreshDelay;
+ sal_uLong nRefreshDelay;
};
@@ -790,13 +790,13 @@ public:
const String& rDoc,
const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefreshDelay );
+ sal_uLong nRefreshDelay );
virtual ~ScUndoRemoveAreaLink();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -806,7 +806,7 @@ private:
String aOptions;
String aAreaName;
ScRange aRange;
- ULONG nRefreshDelay;
+ sal_uLong nRefreshDelay;
};
@@ -818,19 +818,19 @@ public:
const String& rOldD,
const String& rOldF, const String& rOldO,
const String& rOldA, const ScRange& rOldR,
- ULONG nOldRD,
+ sal_uLong nOldRD,
const String& rNewD,
const String& rNewF, const String& rNewO,
const String& rNewA, const ScRange& rNewR,
- ULONG nNewRD,
+ sal_uLong nNewRD,
ScDocument* pUndo, ScDocument* pRedo,
- BOOL bDoInsert );
+ sal_Bool bDoInsert );
virtual ~ScUndoUpdateAreaLink();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -847,11 +847,11 @@ private:
ScRange aNewRange;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- ULONG nOldRefresh;
- ULONG nNewRefresh;
- BOOL bWithInsert;
+ sal_uLong nOldRefresh;
+ sal_uLong nNewRefresh;
+ sal_Bool bWithInsert;
- void DoChange( const BOOL bUndo ) const;
+ void DoChange( const sal_Bool bUndo ) const;
};
@@ -860,20 +860,20 @@ class ScUndoIndent: public ScBlockUndo
public:
TYPEINFO();
ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, BOOL bIncrement );
+ ScDocument* pNewUndoDoc, sal_Bool bIncrement );
virtual ~ScUndoIndent();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
- BOOL bIsIncrement;
+ sal_Bool bIsIncrement;
};
@@ -888,7 +888,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -904,20 +904,20 @@ class ScUndoClearItems: public ScBlockUndo
public:
TYPEINFO();
ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, const USHORT* pW );
+ ScDocument* pNewUndoDoc, const sal_uInt16* pW );
virtual ~ScUndoClearItems();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
- USHORT* pWhich;
+ sal_uInt16* pWhich;
};
@@ -932,7 +932,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -954,7 +954,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -980,7 +980,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx
index 0def8a3d67ba..2ab9ab1a9cfa 100644
--- a/sc/source/ui/inc/undocell.hxx
+++ b/sc/source/ui/inc/undocell.hxx
@@ -52,13 +52,13 @@ public:
ScUndoCursorAttr( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
- const ScPatternAttr* pApplyPat, BOOL bAutomatic );
+ const ScPatternAttr* pApplyPat, sal_Bool bAutomatic );
virtual ~ScUndoCursorAttr();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -76,7 +76,7 @@ private:
ScPatternAttr* pApplyPattern;
::boost::shared_ptr<EditTextObject> pOldEditData;
::boost::shared_ptr<EditTextObject> pNewEditData;
- BOOL bIsAutomatic;
+ sal_Bool bIsAutomatic;
void DoChange( const ScPatternAttr* pWhichPattern, const ::boost::shared_ptr<EditTextObject>& pEditData ) const;
};
@@ -89,14 +89,14 @@ public:
ScUndoEnterData( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
SCTAB nNewCount, SCTAB* pNewTabs,
- ScBaseCell** ppOldData, BOOL* pHasForm, ULONG* pOldForm,
+ ScBaseCell** ppOldData, sal_Bool* pHasForm, sal_uLong* pOldForm,
const String& rNewStr, EditTextObject* pObj = NULL );
virtual ~ScUndoEnterData();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -104,10 +104,10 @@ private:
String aNewString;
SCTAB* pTabs;
ScBaseCell** ppOldCells;
- BOOL* pHasFormat;
- ULONG* pOldFormats;
+ sal_Bool* pHasFormat;
+ sal_uLong* pOldFormats;
EditTextObject* pNewEditData;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
SCCOL nCol;
SCROW nRow;
SCTAB nTab;
@@ -124,13 +124,13 @@ public:
TYPEINFO();
ScUndoEnterValue( ScDocShell* pNewDocShell,
const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, double nVal, BOOL bHeight );
+ ScBaseCell* pUndoCell, double nVal, sal_Bool bHeight );
virtual ~ScUndoEnterValue();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -138,8 +138,8 @@ private:
ScAddress aPos;
ScBaseCell* pOldCell;
double nValue;
- ULONG nEndChangeAction;
- BOOL bNeedHeight;
+ sal_uLong nEndChangeAction;
+ sal_Bool bNeedHeight;
void SetChangeTrack();
};
@@ -151,13 +151,13 @@ public:
TYPEINFO();
ScUndoPutCell( ScDocShell* pNewDocShell,
const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight );
+ ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, sal_Bool bHeight );
virtual ~ScUndoPutCell();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -165,8 +165,8 @@ private:
ScAddress aPos;
ScBaseCell* pOldCell;
ScBaseCell* pEnteredCell;
- ULONG nEndChangeAction;
- BOOL bNeedHeight;
+ sal_uLong nEndChangeAction;
+ sal_Bool bNeedHeight;
void SetChangeTrack();
};
@@ -178,13 +178,13 @@ public:
TYPEINFO();
ScUndoPageBreak( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
- BOOL bNewColumn, BOOL bNewInsert );
+ sal_Bool bNewColumn, sal_Bool bNewInsert );
virtual ~ScUndoPageBreak();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -192,10 +192,10 @@ private:
SCCOL nCol;
SCROW nRow;
SCTAB nTab;
- BOOL bColumn; // Spalten- oder Zeilenumbruch
- BOOL bInsert; // Einfuegen oder Loeschen
+ sal_Bool bColumn; // Spalten- oder Zeilenumbruch
+ sal_Bool bInsert; // Einfuegen oder Loeschen
- void DoChange( BOOL bInsert ) const;
+ void DoChange( sal_Bool bInsert ) const;
};
class ScUndoPrintZoom: public ScSimpleUndo
@@ -203,24 +203,24 @@ class ScUndoPrintZoom: public ScSimpleUndo
public:
TYPEINFO();
ScUndoPrintZoom( ScDocShell* pNewDocShell, SCTAB nT,
- USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP );
+ sal_uInt16 nOS, sal_uInt16 nOP, sal_uInt16 nNS, sal_uInt16 nNP );
virtual ~ScUndoPrintZoom();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
- USHORT nOldScale;
- USHORT nOldPages;
- USHORT nNewScale;
- USHORT nNewPages;
+ sal_uInt16 nOldScale;
+ sal_uInt16 nOldPages;
+ sal_uInt16 nNewScale;
+ sal_uInt16 nNewPages;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
};
class ScUndoThesaurus: public ScSimpleUndo
@@ -236,7 +236,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -248,9 +248,9 @@ private:
EditTextObject* pUndoTObject; // bei EditZelle
String aRedoStr;
EditTextObject* pRedoTObject;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
- void DoChange( BOOL bUndo, const String& rStr,
+ void DoChange( sal_Bool bUndo, const String& rStr,
const EditTextObject* pTObj );
void SetChangeTrack( ScBaseCell* pOldCell );
};
@@ -284,7 +284,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat( SfxRepeatTarget& rTarget );
- virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const;
virtual String GetComment() const;
@@ -312,7 +312,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat( SfxRepeatTarget& rTarget );
- virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const;
virtual String GetComment() const;
@@ -335,14 +335,14 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
- BOOL bIsDelete;
+ sal_Bool bIsDelete;
ScDetOpList* pOldList;
- USHORT nAction;
+ sal_uInt16 nAction;
ScAddress aPos;
SdrUndoAction* pDrawUndo;
};
@@ -359,7 +359,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -367,7 +367,7 @@ private:
ScRangeName* pOldRanges;
ScRangeName* pNewRanges;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
};
diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx
index 05e4b9eff433..2aebb30a0cc5 100644
--- a/sc/source/ui/inc/undodat.hxx
+++ b/sc/source/ui/inc/undodat.hxx
@@ -54,14 +54,14 @@ public:
TYPEINFO();
ScUndoDoOutline( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
- ScDocument* pNewUndoDoc, BOOL bNewColumns,
- USHORT nNewLevel, USHORT nNewEntry, BOOL bNewShow );
+ ScDocument* pNewUndoDoc, sal_Bool bNewColumns,
+ sal_uInt16 nNewLevel, sal_uInt16 nNewEntry, sal_Bool bNewShow );
virtual ~ScUndoDoOutline();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -70,10 +70,10 @@ private:
SCCOLROW nEnd;
SCTAB nTab;
ScDocument* pUndoDoc;
- BOOL bColumns;
- USHORT nLevel;
- USHORT nEntry;
- BOOL bShow;
+ sal_Bool bColumns;
+ sal_uInt16 nLevel;
+ sal_uInt16 nEntry;
+ sal_Bool bShow;
};
@@ -85,13 +85,13 @@ public:
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
ScOutlineTable* pNewUndoTab,
- BOOL bNewColumns, BOOL bNewMake );
+ sal_Bool bNewColumns, sal_Bool bNewMake );
virtual ~ScUndoMakeOutline();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -99,8 +99,8 @@ private:
ScAddress aBlockStart;
ScAddress aBlockEnd;
ScOutlineTable* pUndoTable;
- BOOL bColumns;
- BOOL bMake;
+ sal_Bool bColumns;
+ sal_Bool bMake;
};
@@ -111,13 +111,13 @@ public:
ScUndoOutlineLevel( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
- BOOL bNewColumns, USHORT nNewLevel );
+ sal_Bool bNewColumns, sal_uInt16 nNewLevel );
virtual ~ScUndoOutlineLevel();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -127,8 +127,8 @@ private:
SCTAB nTab;
ScDocument* pUndoDoc;
ScOutlineTable* pUndoTable;
- BOOL bColumns;
- USHORT nLevel;
+ sal_Bool bColumns;
+ sal_uInt16 nLevel;
};
@@ -140,13 +140,13 @@ public:
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
- BOOL bNewShow );
+ sal_Bool bNewShow );
virtual ~ScUndoOutlineBlock();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -155,7 +155,7 @@ private:
ScAddress aBlockEnd;
ScDocument* pUndoDoc;
ScOutlineTable* pUndoTable;
- BOOL bShow;
+ sal_Bool bShow;
};
@@ -172,7 +172,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -197,7 +197,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -223,7 +223,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -245,24 +245,24 @@ public:
TYPEINFO();
ScUndoSort( ScDocShell* pNewDocShell, SCTAB nNewTab,
const ScSortParam& rParam,
- BOOL bQuery, ScDocument* pNewUndoDoc,
+ sal_Bool bQuery, ScDocument* pNewUndoDoc,
ScDBCollection* pNewUndoDB, const ScRange* pDest = NULL );
virtual ~ScUndoSort();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
ScSortParam aSortParam;
- BOOL bRepeatQuery;
+ sal_Bool bRepeatQuery;
ScDocument* pUndoDoc;
ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich
- BOOL bDestArea;
+ sal_Bool bDestArea;
ScRange aDestRange;
};
@@ -274,13 +274,13 @@ public:
ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab,
const ScQueryParam& rParam, ScDocument* pNewUndoDoc,
ScDBCollection* pNewUndoDB, const ScRange* pOld,
- BOOL bSize, const ScRange* pAdvSrc );
+ sal_Bool bSize, const ScRange* pAdvSrc );
virtual ~ScUndoQuery();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -292,9 +292,9 @@ private:
ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich
ScRange aOldDest;
ScRange aAdvSource;
- BOOL bIsAdvanced;
- BOOL bDestArea;
- BOOL bDoSize;
+ sal_Bool bIsAdvanced;
+ sal_Bool bDestArea;
+ sal_Bool bDoSize;
};
@@ -302,20 +302,20 @@ class ScUndoAutoFilter: public ScDBFuncUndo
{
private:
String aDBName;
- BOOL bFilterSet;
+ sal_Bool bFilterSet;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
public:
TYPEINFO();
ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange,
- const String& rName, BOOL bSet );
+ const String& rName, sal_Bool bSet );
virtual ~ScUndoAutoFilter();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
};
@@ -332,7 +332,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -356,7 +356,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -370,7 +370,7 @@ private:
ScDBData* pUndoDBData;
ScDBData* pRedoDBData;
SCCOL nFormulaCols;
- BOOL bRedoFilled;
+ sal_Bool bRedoFilled;
};
@@ -389,7 +389,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -404,7 +404,7 @@ private:
ScDBCollection* pUndoDB;
ScRange aOldQuery;
ScRange aNewQuery;
- BOOL bQuerySize;
+ sal_Bool bQuerySize;
};
@@ -415,13 +415,13 @@ public:
ScUndoDataPilot( ScDocShell* pNewDocShell,
ScDocument* pOldDoc, ScDocument* pNewDoc,
const ScDPObject* pOldObj, const ScDPObject* pNewObj,
- BOOL bMove );
+ sal_Bool bMove );
virtual ~ScUndoDataPilot();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -430,7 +430,7 @@ private:
ScDocument* pNewUndoDoc;
ScDPObject* pOldDPObject;
ScDPObject* pNewDPObject;
- BOOL bAllowMove;
+ sal_Bool bAllowMove;
};
@@ -440,7 +440,7 @@ public:
TYPEINFO();
ScUndoConsolidate( ScDocShell* pNewDocShell,
const ScArea& rArea, const ScConsolidateParam& rPar,
- ScDocument* pNewUndoDoc, BOOL bReference,
+ ScDocument* pNewUndoDoc, sal_Bool bReference,
SCROW nInsCount, ScOutlineTable* pTab,
ScDBData* pData );
virtual ~ScUndoConsolidate();
@@ -448,7 +448,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -456,7 +456,7 @@ private:
ScArea aDestArea;
ScDocument* pUndoDoc;
ScConsolidateParam aParam;
- BOOL bInsRef;
+ sal_Bool bInsRef;
SCSIZE nInsertCount;
ScOutlineTable* pUndoTab;
ScDBData* pUndoData;
@@ -469,29 +469,29 @@ public:
TYPEINFO();
ScUndoChartData( ScDocShell* pNewDocShell,
const String& rName, const ScRange& rNew,
- BOOL bColHdr, BOOL bRowHdr, BOOL bAdd );
+ sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd );
ScUndoChartData( ScDocShell* pNewDocShell,
const String& rName, const ScRangeListRef& rNew,
- BOOL bColHdr, BOOL bRowHdr, BOOL bAdd );
+ sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd );
virtual ~ScUndoChartData();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
String aChartName;
ScRangeListRef aOldRangeListRef;
- BOOL bOldColHeaders;
- BOOL bOldRowHeaders;
+ sal_Bool bOldColHeaders;
+ sal_Bool bOldRowHeaders;
// ScRange aNewRange;
ScRangeListRef aNewRangeListRef;
- BOOL bNewColHeaders;
- BOOL bNewRowHeaders;
- BOOL bAddRange;
+ sal_Bool bNewColHeaders;
+ sal_Bool bNewRowHeaders;
+ sal_Bool bAddRange;
void Init();
};
@@ -506,16 +506,16 @@ public:
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
- BOOL bRedoIsFilled = TRUE
+ sal_Bool bRedoIsFilled = true
);
virtual ~ScUndoDataForm();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -523,14 +523,14 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- USHORT nFlags;
+ sal_uInt16 nFlags;
ScRefUndoData* pRefUndoData;
ScRefUndoData* pRefRedoData;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- BOOL bRedoFilled;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_Bool bRedoFilled;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx
index 565766e3bccb..f8f633a2dc7c 100644
--- a/sc/source/ui/inc/undodraw.hxx
+++ b/sc/source/ui/inc/undodraw.hxx
@@ -46,16 +46,16 @@ public:
SfxUndoAction* GetDrawUndo() { return pDrawUndo; }
void ForgetDrawUndo();
- virtual BOOL IsLinked();
- virtual void SetLinked( BOOL bIsLinked );
+ virtual sal_Bool IsLinked();
+ virtual void SetLinked( sal_Bool bIsLinked );
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
virtual String GetComment() const;
virtual String GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual sal_uInt16 GetId() const;
};
diff --git a/sc/source/ui/inc/undoolk.hxx b/sc/source/ui/inc/undoolk.hxx
index 132c0c1ac70c..9d34785ea1af 100644
--- a/sc/source/ui/inc/undoolk.hxx
+++ b/sc/source/ui/inc/undoolk.hxx
@@ -38,7 +38,7 @@ SdrUndoAction* GetSdrUndoAction ( ScDocument* pDoc );
void DoSdrUndoAction ( SdrUndoAction* pUndoAction, ScDocument* pDoc );
void RedoSdrUndoAction ( SdrUndoAction* pUndoAction );
void DeleteSdrUndoAction ( SdrUndoAction* pUndoAction );
-void EnableDrawAdjust ( ScDocument* pDoc, BOOL bEnable );
+void EnableDrawAdjust ( ScDocument* pDoc, sal_Bool bEnable );
diff --git a/sc/source/ui/inc/undostyl.hxx b/sc/source/ui/inc/undostyl.hxx
index 9e3b3ed9f87e..f5069ab031b0 100644
--- a/sc/source/ui/inc/undostyl.hxx
+++ b/sc/source/ui/inc/undostyl.hxx
@@ -79,7 +79,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
};
@@ -96,7 +96,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 3306925fc5d7..0c6bec3782af 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -65,23 +65,23 @@ public:
ScUndoInsertTab(
ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,
+ sal_Bool bApp,
const String& rNewName);
virtual ~ScUndoInsertTab();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
String sNewName;
SdrUndoAction* pDrawUndo;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
SCTAB nTab;
- BOOL bAppend;
+ sal_Bool bAppend;
void SetChangeTrack();
};
@@ -93,14 +93,14 @@ public:
ScUndoInsertTables(
ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,
+ sal_Bool bApp,
SvStrings *pNewNameList);
virtual ~ScUndoInsertTables();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -108,10 +108,10 @@ private:
SdrUndoAction* pDrawUndo;
SvStrings* pNameList;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
SCTAB nTab;
- BOOL bAppend;
+ sal_Bool bAppend;
void SetChangeTrack();
};
@@ -131,14 +131,14 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
std::vector<SCTAB> theTabs;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void SetChangeTrack();
};
@@ -158,7 +158,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -187,7 +187,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -197,7 +197,7 @@ private:
::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpOldNames;
::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpNewNames;
- void DoChange( BOOL bUndo ) const;
+ void DoChange( sal_Bool bUndo ) const;
};
@@ -216,7 +216,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -246,7 +246,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -265,14 +265,14 @@ public:
ScDocShell* pNewDocShell,
SCTAB nSrc, SCTAB nDest,
const String& rN, const String& rC,
- const Color& rCol, USHORT nF,
+ const Color& rCol, sal_uInt16 nF,
const ScMarkData& rMark );
virtual ~ScUndoMakeScenario();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -282,7 +282,7 @@ private:
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
ScMarkData aMarkData;
SdrUndoAction* pDrawUndo;
};
@@ -295,20 +295,20 @@ public:
ScUndoImportTab(
ScDocShell* pShell,
SCTAB nNewTab, SCTAB nNewCount,
- BOOL bNewLink );
+ sal_Bool bNewLink );
virtual ~ScUndoImportTab();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
SCTAB nCount;
- BOOL bLink;
+ sal_Bool bLink;
ScDocument* pRedoDoc;
SdrUndoAction* pDrawUndo;
@@ -328,7 +328,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -336,13 +336,13 @@ private:
String aDocName;
String aFltName;
String aOptions;
- ULONG nRefreshDelay;
- USHORT nCount;
+ sal_uLong nRefreshDelay;
+ sal_uInt16 nCount;
SCTAB* pTabs;
- BYTE* pModes;
+ sal_uInt8* pModes;
String* pTabNames;
- void DoChange( BOOL bLink ) const;
+ void DoChange( sal_Bool bLink ) const;
};
@@ -352,21 +352,21 @@ public:
TYPEINFO();
ScUndoShowHideTab(
ScDocShell* pShell,
- SCTAB nNewTab, BOOL bNewShow );
+ SCTAB nNewTab, sal_Bool bNewShow );
virtual ~ScUndoShowHideTab();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
- BOOL bShow;
+ sal_Bool bShow;
- void DoChange( BOOL bShow ) const;
+ void DoChange( sal_Bool bShow ) const;
};
// ============================================================================
@@ -382,7 +382,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -406,7 +406,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -429,7 +429,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -438,7 +438,7 @@ private:
ScPrintRangeSaver* pOldRanges;
ScPrintRangeSaver* pNewRanges;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
};
@@ -451,14 +451,14 @@ public:
const String& rON, const String& rNN,
const String& rOC, const String& rNC,
const Color& rOCol, const Color& rNCol,
- USHORT nOF, USHORT nNF );
+ sal_uInt16 nOF, sal_uInt16 nNF );
virtual ~ScUndoScenarioFlags();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -470,8 +470,8 @@ private:
String aNewComment;
Color aOldColor;
Color aNewColor;
- USHORT nOldFlags;
- USHORT nNewFlags;
+ sal_uInt16 nOldFlags;
+ sal_uInt16 nNewFlags;
};
@@ -488,7 +488,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -505,21 +505,21 @@ class ScUndoLayoutRTL : public ScSimpleUndo
{
public:
TYPEINFO();
- ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL );
+ ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewRTL );
virtual ~ScUndoLayoutRTL();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
- BOOL bRTL;
+ sal_Bool bRTL;
- void DoChange( BOOL bNew );
+ void DoChange( sal_Bool bNew );
};
#endif
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 050c54a00121..0ad2ac9c6df2 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -108,9 +108,9 @@ public:
inline ScTabViewShell * GetTabViewShell();
bool SetupRefDlg();
- bool RemoveRefDlg( BOOL bRestoreModal = TRUE );
+ bool RemoveRefDlg( sal_Bool bRestoreModal = sal_True );
- virtual void SetModal( BOOL bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); }
+ virtual void SetModal( sal_Bool bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); }
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc )
{
@@ -129,7 +129,7 @@ public:
DBG_ASSERT( false, "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" );
if ( IsInExecute() )
- EndDialog( FALSE );
+ EndDialog( false );
else if ( GetStyle() & WB_CLOSEABLE )
Close();
}
@@ -149,7 +149,7 @@ public:
(m_pHandler->*m_pRefInputStartPostHdl)( pEdit, pButton );
}
- virtual void RefInputDone( BOOL bForced = FALSE )
+ virtual void RefInputDone( sal_Bool bForced = false )
{
if( !CanInputDone( bForced ) )
return;
@@ -164,11 +164,11 @@ public:
(m_pHandler->*m_pRefInputDonePostHdl)();
}
- BOOL IsChildFocus();
+ sal_Bool IsChildFocus();
enum { SLOTID = SID_VALIDITY_REFERENCE };
- BOOL Close();
+ sal_Bool Close();
};
@@ -182,9 +182,9 @@ public:
virtual ~ScTPValidationValue();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rArgSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rArgSet );
virtual void Reset( const SfxItemSet& rArgSet );
private:
@@ -240,7 +240,7 @@ private:
void TidyListBoxes();
public:
- USHORT GetAllowEntryPos();
+ sal_uInt16 GetAllowEntryPos();
String GetMinText();
void SetupRefDlg();
void RemoveRefDlg();
@@ -271,8 +271,8 @@ public:
~ScTPValidationHelp();
static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -304,8 +304,8 @@ public:
~ScTPValidationError();
static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index f2e47ee9aeb1..83a15fc79b60 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -149,7 +149,7 @@ private:
bool bShowGrid; // per-sheet show grid-lines option.
- BOOL bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten
+ sal_Bool bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten
ScViewDataTable();
~ScViewDataTable();
@@ -220,14 +220,14 @@ private:
ScPasteFlags nPasteFlags;
ScSplitPos eEditActivePart; // the part that was active when edit mode was started
- BOOL bEditActive[4]; // aktiv?
- BOOL bActive; // aktives Fenster ?
- BOOL bIsRefMode; // Referenzeingabe
- BOOL bDelMarkValid; // nur gueltig bei SC_REFTYPE_FILL
- BYTE nFillMode; // Modus
- BOOL bPagebreak; // Seitenumbruch-Vorschaumodus
+ sal_Bool bEditActive[4]; // aktiv?
+ sal_Bool bActive; // aktives Fenster ?
+ sal_Bool bIsRefMode; // Referenzeingabe
+ sal_Bool bDelMarkValid; // nur gueltig bei SC_REFTYPE_FILL
+ sal_uInt8 nFillMode; // Modus
+ sal_Bool bPagebreak; // Seitenumbruch-Vorschaumodus
- BOOL bSelCtrlMouseClick; // special selection handling for ctrl-mouse-click
+ sal_Bool bSelCtrlMouseClick; // special selection handling for ctrl-mouse-click
SC_DLLPRIVATE DECL_LINK (EmptyEditHdl, EditStatus*);
SC_DLLPRIVATE DECL_LINK (EditEngineHdl, EditStatus*);
@@ -258,9 +258,9 @@ public:
Window* GetDialogParent(); // von tabvwsh weitergeleitet
Window* GetActiveWin(); // von View
ScDrawView* GetScDrawView(); // von View
- BOOL IsMinimized(); // von View
+ sal_Bool IsMinimized(); // von View
- void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE );
+ void UpdateInputHandler( sal_Bool bForce = false, sal_Bool bStopEditing = sal_True );
void WriteUserData(String& rData);
void ReadUserData(const String& rData);
@@ -271,8 +271,8 @@ public:
ScDocument* GetDocument() const;
- BOOL IsActive() const { return bActive; }
- void Activate(BOOL bActivate) { bActive = bActivate; }
+ sal_Bool IsActive() const { return bActive; }
+ void Activate(sal_Bool bActivate) { bActive = bActivate; }
void UpdateThis();
@@ -290,7 +290,7 @@ public:
SCROW GetPosY( ScVSplitPos eWhich ) const { return pThisTab->nPosY[eWhich]; }
SCCOL GetCurX() const { return pThisTab->nCurX; }
SCROW GetCurY() const { return pThisTab->nCurY; }
- BOOL HasOldCursor() const { return pThisTab->bOldCurValid; }
+ sal_Bool HasOldCursor() const { return pThisTab->bOldCurValid; }
SCCOL GetOldCurX() const;
SCROW GetOldCurY() const;
ScSplitMode GetHSplitMode() const { return pThisTab->eHSplitMode; }
@@ -299,7 +299,7 @@ public:
long GetVSplitPos() const { return pThisTab->nVSplitPos; }
SCCOL GetFixPosX() const { return pThisTab->nFixPosX; }
SCROW GetFixPosY() const { return pThisTab->nFixPosY; }
- BOOL IsPagebreakMode() const { return bPagebreak; }
+ sal_Bool IsPagebreakMode() const { return bPagebreak; }
bool IsPasteMode() const { return nPasteFlags & SC_PASTE_MODE; }
bool ShowPasteSource() const { return nPasteFlags & SC_PASTE_BORDER; }
@@ -315,16 +315,16 @@ public:
void SetVSplitPos( long nPos ) { pThisTab->nVSplitPos = nPos; }
void SetFixPosX( SCCOL nPos ) { pThisTab->nFixPosX = nPos; }
void SetFixPosY( SCROW nPos ) { pThisTab->nFixPosY = nPos; }
- void SetPagebreakMode( BOOL bSet );
+ void SetPagebreakMode( sal_Bool bSet );
void SetPasteMode ( ScPasteFlags nFlags ) { nPasteFlags = nFlags; }
- void SetZoomType( SvxZoomType eNew, BOOL bAll );
+ void SetZoomType( SvxZoomType eNew, sal_Bool bAll );
void SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs );
void SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs );
- void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll );
void RefreshZoom();
- void SetSelCtrlMouseClick( BOOL bTmp ) { bSelCtrlMouseClick = bTmp; }
+ void SetSelCtrlMouseClick( sal_Bool bTmp ) { bSelCtrlMouseClick = bTmp; }
SvxZoomType GetZoomType() const { return pThisTab->eZoomType; }
const Fraction& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
@@ -349,31 +349,31 @@ public:
ScMarkType GetSimpleArea( ScRange & rRange, ScMarkData & rNewMark ) const;
void GetMultiArea( ScRangeListRef& rRange ) const;
- BOOL SimpleColMarked();
- BOOL SimpleRowMarked();
+ sal_Bool SimpleColMarked();
+ sal_Bool SimpleRowMarked();
- BOOL IsMultiMarked();
+ sal_Bool IsMultiMarked();
void SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
void SetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- BYTE nMode );
+ sal_uInt8 nMode );
void GetFillData( SCCOL& rStartCol, SCROW& rStartRow,
SCCOL& rEndCol, SCROW& rEndRow );
void ResetFillMode();
- BOOL IsAnyFillMode() { return nFillMode != SC_FILL_NONE; }
- BOOL IsFillMode() { return nFillMode == SC_FILL_FILL; }
- BYTE GetFillMode() { return nFillMode; }
+ sal_Bool IsAnyFillMode() { return nFillMode != SC_FILL_NONE; }
+ sal_Bool IsFillMode() { return nFillMode == SC_FILL_FILL; }
+ sal_uInt8 GetFillMode() { return nFillMode; }
// TRUE: Zelle ist zusammengefasst
- BOOL GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix );
- BOOL GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
+ sal_Bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix );
+ sal_Bool GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
SCsCOL& rPosX, SCsROW& rPosY,
- BOOL bTestMerge = TRUE, BOOL bRepair = FALSE,
- BOOL bNextIfLarge = TRUE );
+ sal_Bool bTestMerge = sal_True, sal_Bool bRepair = false,
+ sal_Bool bNextIfLarge = sal_True );
void GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
- SCsCOL nPosX, SCsROW nPosY, BOOL& rLeft, BOOL& rTop );
+ SCsCOL nPosX, SCsROW nPosY, sal_Bool& rLeft, sal_Bool& rTop );
- BOOL IsRefMode() const { return bIsRefMode; }
+ sal_Bool IsRefMode() const { return bIsRefMode; }
ScRefType GetRefType() const { return eRefType; }
SCCOL GetRefStartX() const { return nRefStartX; }
SCROW GetRefStartY() const { return nRefStartY; }
@@ -382,7 +382,7 @@ public:
SCROW GetRefEndY() const { return nRefEndY; }
SCTAB GetRefEndZ() const { return nRefEndZ; }
- void SetRefMode( BOOL bNewMode, ScRefType eNewType )
+ void SetRefMode( sal_Bool bNewMode, ScRefType eNewType )
{ bIsRefMode = bNewMode; eRefType = eNewType; }
void SetRefStart( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
@@ -390,11 +390,11 @@ public:
void SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
{ nRefEndX = nNewX; nRefEndY = nNewY; nRefEndZ = nNewZ; }
- void ResetDelMark() { bDelMarkValid = FALSE; }
+ void ResetDelMark() { bDelMarkValid = false; }
void SetDelMark( const ScRange& rRange )
- { aDelRange = rRange; bDelMarkValid = TRUE; }
+ { aDelRange = rRange; bDelMarkValid = sal_True; }
- BOOL GetDelMark( ScRange& rRange ) const
+ sal_Bool GetDelMark( ScRange& rRange ) const
{ rRange = aDelRange; return bDelMarkValid; }
inline void GetMoveCursor( SCCOL& rCurX, SCROW& rCurY );
@@ -402,20 +402,20 @@ public:
const ScViewOptions& GetOptions() const { return *pOptions; }
void SetOptions( const ScViewOptions& rOpt );
- BOOL IsGridMode () const { return pOptions->GetOption( VOPT_GRID ); }
- void SetGridMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_GRID, bNewMode ); }
- BOOL IsSyntaxMode () const { return pOptions->GetOption( VOPT_SYNTAX ); }
- void SetSyntaxMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_SYNTAX, bNewMode ); }
- BOOL IsHeaderMode () const { return pOptions->GetOption( VOPT_HEADER ); }
- void SetHeaderMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HEADER, bNewMode ); }
- BOOL IsTabMode () const { return pOptions->GetOption( VOPT_TABCONTROLS ); }
- void SetTabMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_TABCONTROLS, bNewMode ); }
- BOOL IsVScrollMode () const { return pOptions->GetOption( VOPT_VSCROLL ); }
- void SetVScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_VSCROLL, bNewMode ); }
- BOOL IsHScrollMode () const { return pOptions->GetOption( VOPT_HSCROLL ); }
- void SetHScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HSCROLL, bNewMode ); }
- BOOL IsOutlineMode () const { return pOptions->GetOption( VOPT_OUTLINER ); }
- void SetOutlineMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_OUTLINER, bNewMode ); }
+ sal_Bool IsGridMode () const { return pOptions->GetOption( VOPT_GRID ); }
+ void SetGridMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_GRID, bNewMode ); }
+ sal_Bool IsSyntaxMode () const { return pOptions->GetOption( VOPT_SYNTAX ); }
+ void SetSyntaxMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_SYNTAX, bNewMode ); }
+ sal_Bool IsHeaderMode () const { return pOptions->GetOption( VOPT_HEADER ); }
+ void SetHeaderMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_HEADER, bNewMode ); }
+ sal_Bool IsTabMode () const { return pOptions->GetOption( VOPT_TABCONTROLS ); }
+ void SetTabMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_TABCONTROLS, bNewMode ); }
+ sal_Bool IsVScrollMode () const { return pOptions->GetOption( VOPT_VSCROLL ); }
+ void SetVScrollMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_VSCROLL, bNewMode ); }
+ sal_Bool IsHScrollMode () const { return pOptions->GetOption( VOPT_HSCROLL ); }
+ void SetHScrollMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_HSCROLL, bNewMode ); }
+ sal_Bool IsOutlineMode () const { return pOptions->GetOption( VOPT_OUTLINER ); }
+ void SetOutlineMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_OUTLINER, bNewMode ); }
void KillEditView();
void ResetEditView();
@@ -423,13 +423,13 @@ public:
ScEditEngineDefaulter* pNewEngine,
Window* pWin, SCCOL nNewX, SCROW nNewY );
void GetEditView( ScSplitPos eWhich, EditView*& rViewPtr, SCCOL& rCol, SCROW& rRow );
- BOOL HasEditView( ScSplitPos eWhich ) const
+ sal_Bool HasEditView( ScSplitPos eWhich ) const
{ return pEditView[eWhich] && bEditActive[eWhich]; }
EditView* GetEditView( ScSplitPos eWhich ) const
{ return pEditView[eWhich]; }
void EditGrowX();
- void EditGrowY( BOOL bInitial = FALSE );
+ void EditGrowY( sal_Bool bInitial = false );
ScSplitPos GetEditActivePart() const { return eEditActivePart; }
SCCOL GetEditViewCol() const { return nEditCol; }
@@ -440,25 +440,25 @@ public:
SCROW GetEditEndRow() const { return nEditEndRow; }
Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, Window* pWin,
- const ScPatternAttr* pPattern, BOOL bForceToTop );
+ const ScPatternAttr* pPattern, sal_Bool bForceToTop );
void SetTabNo( SCTAB nNewTab );
void SetActivePart( ScSplitPos eNewActive );
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
- BOOL bAllowNeg = FALSE ) const;
+ sal_Bool bAllowNeg = false ) const;
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const;
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const;
- SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHORT nScrSizeY = SC_SIZE_NONE ) const;
- SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHORT nScrSizeX = SC_SIZE_NONE ) const;
+ SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY = SC_SIZE_NONE ) const;
+ SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX = SC_SIZE_NONE ) const;
SCCOL VisibleCellsX( ScHSplitPos eWhichX ) const; // angezeigte komplette Zellen
SCROW VisibleCellsY( ScVSplitPos eWhichY ) const;
SCCOL PrevCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der vorgehenden Seite
SCROW PrevCellsY( ScVSplitPos eWhichY ) const;
- BOOL IsOle();
+ sal_Bool IsOle();
void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
void SetScreen( const Rectangle& rVisArea );
void SetScreenPos( const Point& rVisAreaStart );
@@ -478,8 +478,8 @@ public:
Point GetMousePosPixel();
- BOOL UpdateFixX(SCTAB nTab = MAXTAB+1);
- BOOL UpdateFixY(SCTAB nTab = MAXTAB+1);
+ sal_Bool UpdateFixX(SCTAB nTab = MAXTAB+1);
+ sal_Bool UpdateFixY(SCTAB nTab = MAXTAB+1);
SCCOL GetTabStartCol() const { return nTabStartCol; }
void SetTabStartCol(SCCOL nNew) { nTabStartCol = nNew; }
@@ -489,9 +489,9 @@ public:
const Size& GetScenButSize() const { return aScenButSize; }
void SetScenButSize(const Size& rNew) { aScenButSize = rNew; }
- BOOL IsSelCtrlMouseClick() { return bSelCtrlMouseClick; }
+ sal_Bool IsSelCtrlMouseClick() { return bSelCtrlMouseClick; }
- static inline long ToPixel( USHORT nTwips, double nFactor );
+ static inline long ToPixel( sal_uInt16 nTwips, double nFactor );
/** while (rScrY <= nEndPixels && rPosY <= nEndRow) add pixels of row
heights converted with nPPTY to rScrY, optimized for row height
@@ -515,7 +515,7 @@ public:
// ---------------------------------------------------------------------------
-inline long ScViewData::ToPixel( USHORT nTwips, double nFactor )
+inline long ScViewData::ToPixel( sal_uInt16 nTwips, double nFactor )
{
long nRet = (long)( nTwips * nFactor );
if ( !nRet && nTwips )
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 5aa485eb874e..9306cb8c3ad3 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -49,6 +49,7 @@ class SfxItemSet;
class SvxBorderLine;
class SvxBoxItem;
class SvxBoxInfoItem;
+class SfxStyleSheetBase;
class SfxStyleSheet;
class SfxPoolItem;
class EditTextObject;
@@ -75,7 +76,7 @@ class ScViewFunc : public ScTabView
private:
ScAddress aFormatSource; // fuer automatisches Erweitern von Formatierung
ScRange aFormatArea;
- BOOL bFormatValid;
+ sal_Bool bFormatValid;
public:
ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
@@ -85,192 +86,192 @@ public:
void GetSelectionFrame ( SvxBoxItem& rLineOuter,
SvxBoxInfoItem& rLineInner );
- BYTE GetSelectionScriptType();
+ sal_uInt8 GetSelectionScriptType();
- BOOL GetAutoSumArea(ScRangeList& rRangeList);
+ sal_Bool GetAutoSumArea(ScRangeList& rRangeList);
void EnterAutoSum(const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr);
bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue );
String GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
- BOOL bRecord = TRUE, const EditTextObject* pData = NULL );
+ sal_Bool bRecord = sal_True, const EditTextObject* pData = NULL );
void EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject* pData,
- BOOL bRecord = TRUE, BOOL bTestSimple = FALSE );
+ sal_Bool bRecord = sal_True, sal_Bool bTestSimple = false );
void EnterMatrix( const String& rString );
void EnterBlock( const String& rString, const EditTextObject* pData );
void EnterDataAtCursor( const String& rString ); //! nicht benutzt ?
- SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, BOOL bIncludeObjects = FALSE );
- SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc = NULL, BOOL bCut = FALSE, BOOL bApi = FALSE,
- BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE );
- SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL bCut = FALSE,
- BOOL bApi = FALSE, BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE );
+ SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, sal_Bool bIncludeObjects = false );
+ SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc = NULL, sal_Bool bCut = false, sal_Bool bApi = false,
+ sal_Bool bIncludeObjects = false, sal_Bool bStopEdit = true );
+ SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, sal_Bool bCut = false,
+ sal_Bool bApi = false, sal_Bool bIncludeObjects = false, sal_Bool bStopEdit = true );
ScTransferObj* CopyToTransferable();
- SC_DLLPUBLIC BOOL PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
- USHORT nFunction = PASTE_NOFUNC, BOOL bSkipEmpty = FALSE,
- BOOL bTranspose = FALSE, BOOL bAsLink = FALSE,
+ SC_DLLPUBLIC sal_Bool PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
+ sal_uInt16 nFunction = PASTE_NOFUNC, sal_Bool bSkipEmpty = false,
+ sal_Bool bTranspose = false, sal_Bool bAsLink = false,
InsCellCmd eMoveMode = INS_NONE,
- USHORT nUndoExtraFlags = IDF_NONE,
- BOOL bAllowDialogs = FALSE );
+ sal_uInt16 nUndoExtraFlags = IDF_NONE,
+ sal_Bool bAllowDialogs = false );
- void FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL bAsLink );
+ void FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink );
SC_DLLPUBLIC void PasteFromSystem();
- SC_DLLPUBLIC BOOL PasteFromSystem( ULONG nFormatId, BOOL bApi = FALSE );
+ SC_DLLPUBLIC sal_Bool PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi = false );
void PasteFromTransferable( const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable );
void PasteDraw();
void PasteDraw( const Point& rLogicPos, SdrModel* pModel,
- BOOL bGroup = FALSE, BOOL bSameDocClipboard = FALSE );
+ sal_Bool bGroup = false, sal_Bool bSameDocClipboard = false );
- BOOL PasteOnDrawObject( const ::com::sun::star::uno::Reference<
+ sal_Bool PasteOnDrawObject( const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
- SdrObject* pHitObj, BOOL bLink );
+ SdrObject* pHitObj, sal_Bool bLink );
- BOOL PasteDataFormat( ULONG nFormatId,
+ sal_Bool PasteDataFormat( sal_uLong nFormatId,
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL,
- BOOL bLink = FALSE, BOOL bAllowDialogs = FALSE );
+ sal_Bool bLink = false, sal_Bool bAllowDialogs = false );
- BOOL PasteFile( const Point&, const String&, BOOL bLink=FALSE );
- BOOL PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const ::rtl::OUString& = ::rtl::OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT );
- BOOL PasteBitmap( const Point&, const Bitmap& );
- BOOL PasteMetaFile( const Point&, const GDIMetaFile& );
- BOOL PasteGraphic( const Point& rPos, const Graphic& rGraphic,
+ sal_Bool PasteFile( const Point&, const String&, sal_Bool bLink=false );
+ sal_Bool PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const ::rtl::OUString& = ::rtl::OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT );
+ sal_Bool PasteBitmap( const Point&, const Bitmap& );
+ sal_Bool PasteMetaFile( const Point&, const GDIMetaFile& );
+ sal_Bool PasteGraphic( const Point& rPos, const Graphic& rGraphic,
const String& rFile, const String& rFilter );
- BOOL PasteBookmark( ULONG nFormatId,
+ sal_Bool PasteBookmark( sal_uLong nFormatId,
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY );
- BOOL PasteDDE( const ::com::sun::star::uno::Reference<
+ sal_Bool PasteDDE( const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable );
- BOOL ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic );
+ sal_Bool ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic );
void InsertBookmark( const String& rDescription, const String& rURL,
SCCOL nPosX, SCROW nPosY, const String* pTarget = NULL,
- BOOL bTryReplace = FALSE );
- BOOL HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
+ sal_Bool bTryReplace = false );
+ sal_Bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
long DropRequestHdl( Exchange* pExchange );
- BOOL MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- BOOL LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, BOOL bApi );
+ sal_Bool LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi );
- void CreateNames( USHORT nFlags );
- USHORT GetCreateNameFlags();
+ void CreateNames( sal_uInt16 nFlags );
+ sal_uInt16 GetCreateNameFlags();
void InsertNameList();
- BOOL InsertName( const String& rName, const String& rSymbol,
+ sal_Bool InsertName( const String& rName, const String& rSymbol,
const String& rType );
void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet,
- BOOL bRecord = TRUE );
+ sal_Bool bRecord = sal_True );
void ApplyAttr( const SfxPoolItem& rAttrItem );
void ApplySelectionPattern( const ScPatternAttr& rAttr,
- BOOL bRecord = TRUE,
- BOOL bCursorOnly = FALSE );
+ sal_Bool bRecord = sal_True,
+ sal_Bool bCursorOnly = false );
void ApplyPatternLines( const ScPatternAttr& rAttr,
const SvxBoxItem* pNewOuter,
- const SvxBoxInfoItem* pNewInner, BOOL bRecord = TRUE );
+ const SvxBoxInfoItem* pNewInner, sal_Bool bRecord = sal_True );
void ApplyUserItemSet( const SfxItemSet& rItemSet );
const SfxStyleSheet* GetStyleSheetFromMarked();
void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet,
- BOOL bRecord = TRUE );
- void RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet );
- void UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet );
+ sal_Bool bRecord = sal_True );
+ void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
+ void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
- void SetNumberFormat( short nFormatType, ULONG nAdd = 0 );
+ void SetNumberFormat( short nFormatType, sal_uLong nAdd = 0 );
void SetNumFmtByStr( const String& rCode );
- void ChangeNumFmtDecimals( BOOL bIncrement );
+ void ChangeNumFmtDecimals( sal_Bool bIncrement );
void SetConditionalFormat( const ScConditionalFormat& rNew );
void SetValidation( const ScValidationData& rNew );
- void ChangeIndent( BOOL bIncrement );
+ void ChangeIndent( sal_Bool bIncrement );
void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
void Protect( SCTAB nTab, const String& rPassword );
- BOOL Unprotect( SCTAB nTab, const String& rPassword );
+ sal_Bool Unprotect( SCTAB nTab, const String& rPassword );
- void DeleteCells( DelCellCmd eCmd, BOOL bRecord = TRUE );
- BOOL InsertCells( InsCellCmd eCmd, BOOL bRecord = TRUE, BOOL bPartOfPaste = FALSE );
- void DeleteMulti( BOOL bRows, BOOL bRecord = TRUE );
+ void DeleteCells( DelCellCmd eCmd, sal_Bool bRecord = sal_True );
+ sal_Bool InsertCells( InsCellCmd eCmd, sal_Bool bRecord = sal_True, sal_Bool bPartOfPaste = false );
+ void DeleteMulti( sal_Bool bRows, sal_Bool bRecord = sal_True );
- void DeleteContents( USHORT nFlags, BOOL bRecord = TRUE );
+ void DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord = sal_True );
- void SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
- ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE,
+ void SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True,
ScMarkData* pMarkData = NULL );
- void SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
- void ShowMarkedColumns( BOOL bShow, BOOL bRecord = TRUE );
- void ShowMarkedRows( BOOL bShow, BOOL bRecord = TRUE );
+ void SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
+ void ShowMarkedColumns( sal_Bool bShow, sal_Bool bRecord = sal_True );
+ void ShowMarkedRows( sal_Bool bShow, sal_Bool bRecord = sal_True );
- BOOL AdjustBlockHeight( BOOL bPaint = TRUE, ScMarkData* pMarkData = NULL );
- BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint = TRUE );
+ sal_Bool AdjustBlockHeight( sal_Bool bPaint = sal_True, ScMarkData* pMarkData = NULL );
+ sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint = sal_True );
- void ModifyCellSize( ScDirection eDir, BOOL bOptimal );
+ void ModifyCellSize( ScDirection eDir, sal_Bool bOptimal );
- SC_DLLPUBLIC void InsertPageBreak( BOOL bColumn, BOOL bRecord = TRUE,
+ SC_DLLPUBLIC void InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True,
const ScAddress* pPos = NULL,
- BOOL bSetModified = TRUE );
- SC_DLLPUBLIC void DeletePageBreak( BOOL bColumn, BOOL bRecord = TRUE,
+ sal_Bool bSetModified = sal_True );
+ SC_DLLPUBLIC void DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True,
const ScAddress* pPos = NULL,
- BOOL bSetModified = TRUE );
+ sal_Bool bSetModified = sal_True );
void RemoveManualBreaks();
- void SetPrintZoom(USHORT nScale, USHORT nPages);
+ void SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages);
void AdjustPrintZoom();
- BOOL TestMergeCells();
- BOOL TestRemoveMerge();
+ sal_Bool TestMergeCells();
+ sal_Bool TestRemoveMerge();
- BOOL MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord = TRUE, BOOL bCenter = FALSE );
- BOOL RemoveMerge( BOOL bRecord = TRUE );
+ sal_Bool MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord = true, sal_Bool bCenter = false );
+ sal_Bool RemoveMerge( sal_Bool bRecord = true );
- void FillSimple( FillDir eDir, BOOL bRecord = TRUE );
+ void FillSimple( FillDir eDir, sal_Bool bRecord = sal_True );
void FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
- double fStart, double fStep, double fMax, BOOL bRecord = TRUE );
+ double fStart, double fStep, double fMax, sal_Bool bRecord = sal_True );
void FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord = TRUE );
+ SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord = sal_True );
void FillCrossDblClick();
void TransliterateText( sal_Int32 nType );
ScAutoFormatData* CreateAutoFormatData();
- void AutoFormat( USHORT nFormatNo, BOOL bRecord = TRUE );
+ void AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord = sal_True );
void SearchAndReplace( const SvxSearchItem* pSearchItem,
- BOOL bAddUndo, BOOL bIsApi );
+ sal_Bool bAddUndo, sal_Bool bIsApi );
void Solve( const ScSolveParam& rParam );
- void TabOp( const ScTabOpParam& rParam, BOOL bRecord = TRUE );
+ void TabOp( const ScTabOpParam& rParam, sal_Bool bRecord = sal_True );
- BOOL InsertTable( const String& rName, SCTAB nTabNr, BOOL bRecord = TRUE );
- BOOL InsertTables(SvStrings *pNames, SCTAB nTab, SCTAB nCount, BOOL bRecord = TRUE);
+ sal_Bool InsertTable( const String& rName, SCTAB nTabNr, sal_Bool bRecord = sal_True );
+ sal_Bool InsertTables(SvStrings *pNames, SCTAB nTab, SCTAB nCount, sal_Bool bRecord = sal_True);
- BOOL AppendTable( const String& rName, BOOL bRecord = TRUE );
+ sal_Bool AppendTable( const String& rName, sal_Bool bRecord = sal_True );
- BOOL DeleteTable( SCTAB nTabNr, BOOL bRecord = TRUE );
- BOOL DeleteTables(const std::vector<SCTAB>& TheTabs, BOOL bRecord = TRUE );
+ sal_Bool DeleteTable( SCTAB nTabNr, sal_Bool bRecord = true );
+ sal_Bool DeleteTables(const std::vector<SCTAB>& TheTabs, sal_Bool bRecord = true );
- BOOL RenameTable( const String& rName, SCTAB nTabNr );
- void MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pNewTabName = NULL );
+ sal_Bool RenameTable( const String& rName, SCTAB nTabNr );
+ void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName = NULL );
void ImportTables( ScDocShell* pSrcShell,
SCTAB nCount, const SCTAB* pSrcTabs,
- BOOL bLink,SCTAB nTab);
+ sal_Bool bLink,SCTAB nTab);
bool SetTabBgColor( const Color& rColor, SCTAB nTabNr );
bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList );
@@ -280,13 +281,13 @@ public:
const String& rTabName );
void InsertAreaLink( const String& rFile,
const String& rFilter, const String& rOptions,
- const String& rSource, ULONG nRefresh );
+ const String& rSource, sal_uLong nRefresh );
void ShowTable( const String& rName );
void HideTable( SCTAB nTabNr );
void MakeScenario( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
+ const Color& rColor, sal_uInt16 nFlags );
void ExtendScenario();
void UseScenario( const String& rName );
@@ -298,22 +299,22 @@ public:
void InsertDraw();
void SetSelectionFrameLines( const SvxBorderLine* pLine,
- BOOL bColorOnly );
+ sal_Bool bColorOnly );
void SetNoteText( const ScAddress& rPos, const String& rNoteText );
void ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate );
- void DoRefConversion( BOOL bRecord = TRUE );
+ void DoRefConversion( sal_Bool bRecord = sal_True );
- void DoHangulHanjaConversion( BOOL bRecord = TRUE );
- void DoThesaurus( BOOL bRecord = TRUE );
+ void DoHangulHanjaConversion( sal_Bool bRecord = true );
+ void DoThesaurus( sal_Bool bRecord = true );
/** Generic implementation of sheet conversion functions. */
- void DoSheetConversion( const ScConversionParam& rParam, BOOL bRecord = TRUE );
+ void DoSheetConversion( const ScConversionParam& rParam, sal_Bool bRecord = sal_True );
- void SetPrintRanges( BOOL bEntireSheet,
+ void SetPrintRanges( sal_Bool bEntireSheet,
const String* pPrint,
const String* pRepCol, const String* pRepRow,
- BOOL bAddPrint );
+ sal_Bool bAddPrint );
void DetectiveAddPred();
void DetectiveDelPred();
@@ -332,8 +333,8 @@ public:
inline void HideNote() { ShowNote( false ); }
void EditNote();
- void ForgetFormatArea() { bFormatValid = FALSE; }
- BOOL SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix = NULL );
+ void ForgetFormatArea() { bFormatValid = false; }
+ sal_Bool SelectionEditable( sal_Bool* pOnlyNotBecauseOfMatrix = NULL );
// Amelia Wang
SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow ,
@@ -347,7 +348,7 @@ protected:
void UpdateLineAttrs( SvxBorderLine& rLine,
const SvxBorderLine* pDestLine,
const SvxBorderLine* pSrcLine,
- BOOL bColor );
+ sal_Bool bColor );
private:
@@ -359,12 +360,12 @@ private:
InsCellCmd eMoveMode, sal_uInt16 nCondFlags, sal_uInt16 nUndoFlags );
void PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData& rMark);
- USHORT GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula );
+ sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula );
void StartFormatArea();
- BOOL TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged );
+ sal_Bool TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged );
void DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
- BOOL bAttrChanged, BOOL bAddUndo );
+ sal_Bool bAttrChanged, sal_Bool bAddUndo );
void MarkAndJumpToRanges(const ScRangeList& rRanges);
};
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 20f61b334a5c..d01faeae35ff 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -53,21 +53,21 @@ enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS };
class ScViewUtil // static Methoden
{
public:
- static BOOL ExecuteCharMap( const SvxFontItem& rOldFont,
+ static sal_Bool ExecuteCharMap( const SvxFontItem& rOldFont,
SfxViewFrame& rFrame,
SvxFontItem& rNewFont,
String& rString );
- static BOOL IsActionShown( const ScChangeAction& rAction,
+ static sal_Bool IsActionShown( const ScChangeAction& rAction,
const ScChangeViewSettings& rSettings,
ScDocument& rDocument );
static void PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet,
- USHORT nWhichId, USHORT nScript );
+ sal_uInt16 nWhichId, sal_uInt16 nScript );
- static USHORT GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos );
+ static sal_uInt16 GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos );
- static sal_Int32 GetTransliterationType( USHORT nSlotID );
+ static sal_Int32 GetTransliterationType( sal_uInt16 nSlotID );
static bool HasFiltered( const ScRange& rRange, ScDocument* pDoc );
/** Fit a range to cover nRows number of unfiltered rows.
@@ -75,7 +75,7 @@ public:
static bool FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows );
static void UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc );
- static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId );
+ static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId );
/** Returns true, if the passed view shell is in full screen mode. */
static bool IsFullScreen( SfxViewShell& rViewShell );
@@ -103,7 +103,7 @@ private:
public:
ScUpdateRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
void SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
- BOOL GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
+ sal_Bool GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
};
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 61bcfeb4b045..ac3596d72e28 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -61,7 +61,7 @@
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute();
-inline void EnableDisable( Window& rWin, BOOL bEnable )
+inline void EnableDisable( Window& rWin, sal_Bool bEnable )
{
if (bEnable)
rWin.Enable();
@@ -82,9 +82,9 @@ ScRedlinData::ScRedlinData()
nInfo=RD_SPECIAL_NONE;
nActionNo=0;
pData=NULL;
- bDisabled=FALSE;
- bIsRejectable=FALSE;
- bIsAcceptable=FALSE;
+ bDisabled=false;
+ bIsRejectable=false;
+ bIsAcceptable=false;
nTable=SCTAB_MAX;
nCol=SCCOL_MAX;
nRow=SCROW_MAX;
@@ -95,9 +95,9 @@ ScRedlinData::~ScRedlinData()
nInfo=RD_SPECIAL_NONE;
nActionNo=0;
pData=NULL;
- bDisabled=FALSE;
- bIsRejectable=FALSE;
- bIsAcceptable=FALSE;
+ bDisabled=false;
+ bIsRejectable=false;
+ bIsAcceptable=false;
}
//============================================================================
@@ -129,15 +129,15 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
aStrEmpty ( ScResId( STR_EMPTY ))
{
FreeResource();
- bNoSelection=FALSE;
- bNeedsUpdate=FALSE;
- bIgnoreMsg=FALSE;
+ bNoSelection=false;
+ bNeedsUpdate=false;
+ bIgnoreMsg=false;
nAcceptCount=0;
nRejectCount=0;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
- bHasFilterEntry=FALSE;
- bUseColor=FALSE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
+ bHasFilterEntry=false;
+ bUseColor=false;
aReOpenTimer.SetTimeout(50);
aReOpenTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl ));
@@ -158,14 +158,14 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
pTPFilter->SetReadyHdl(LINK( this, ScAcceptChgDlg, FilterHandle ));
pTPFilter->SetRefHdl(LINK( this, ScAcceptChgDlg, RefHandle ));
pTPFilter->SetModifyHdl(LINK( this, ScAcceptChgDlg, FilterModified));
- pTPFilter->HideRange(FALSE);
+ pTPFilter->HideRange(false);
pTPView->InsertCalcHeader();
pTPView->SetRejectClickHdl( LINK( this, ScAcceptChgDlg,RejectHandle));
pTPView->SetAcceptClickHdl( LINK(this, ScAcceptChgDlg, AcceptHandle));
pTPView->SetRejectAllClickHdl( LINK( this, ScAcceptChgDlg,RejectAllHandle));
pTPView->SetAcceptAllClickHdl( LINK(this, ScAcceptChgDlg, AcceptAllHandle));
pTheView->SetCalcView();
- pTheView->SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ pTheView->SetStyle(pTheView->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
pTheView->SetExpandingHdl( LINK(this, ScAcceptChgDlg, ExpandingHandle));
pTheView->SetSelectHdl( LINK(this, ScAcceptChgDlg, SelectHandle));
pTheView->SetDeselectHdl( LINK(this, ScAcceptChgDlg, SelectHandle));
@@ -205,13 +205,13 @@ void ScAcceptChgDlg::ReInit(ScViewData* ptrViewData)
else
pDoc=NULL;
- bNoSelection=FALSE;
- bNeedsUpdate=FALSE;
- bIgnoreMsg=FALSE;
+ bNoSelection=false;
+ bNeedsUpdate=false;
+ bIgnoreMsg=false;
nAcceptCount=0;
nRejectCount=0;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
// don't call Init here (switching between views), just set link below
// (dialog is just hidden, not deleted anymore, when switching views)
@@ -241,7 +241,7 @@ void ScAcceptChgDlg::Init()
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
pTPFilter->ClearAuthors();
ScStrCollection aUserColl=pChanges->GetUserCollection();
- for(USHORT i=0;i<aUserColl.GetCount();i++)
+ for(sal_uInt16 i=0;i<aUserColl.GetCount();i++)
pTPFilter->InsertAuthor(aUserColl[i]->GetString());
}
@@ -256,7 +256,7 @@ void ScAcceptChgDlg::Init()
pTPFilter->SetFirstTime(aChangeViewSet.GetTheFirstDateTime());
pTPFilter->SetLastDate(aChangeViewSet.GetTheLastDateTime());
pTPFilter->SetLastTime(aChangeViewSet.GetTheLastDateTime());
- pTPFilter->SetDateMode((USHORT)aChangeViewSet.GetTheDateMode());
+ pTPFilter->SetDateMode((sal_uInt16)aChangeViewSet.GetTheDateMode());
pTPFilter->CheckComment(aChangeViewSet.HasComment());
pTPFilter->SetComment(aChangeViewSet.GetTheComment());
@@ -297,10 +297,10 @@ void ScAcceptChgDlg::ClearView()
{
nAcceptCount=0;
nRejectCount=0;
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
pTheView->Clear();
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
}
String* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType)
@@ -325,11 +325,11 @@ String* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType)
}
-BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
+sal_Bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
{
- if(pScChangeAction==NULL) return FALSE;
+ if(pScChangeAction==NULL) return false;
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -345,7 +345,7 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
if(eType==SC_CAT_CONTENT)
{
if(!pScChangeAction->IsDialogParent())
- pScChangeAction->GetDescription( aDesc, pDoc, TRUE);
+ pScChangeAction->GetDescription( aDesc, pDoc, true);
}
else
pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete());
@@ -365,13 +365,13 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
{
ScRange* pRangeEntry = aRangeList[ i ];
if (pRangeEntry->Intersects(aRef)) {
- bFlag = TRUE;
+ bFlag = true;
break;
}
}
}
else
- bFlag=TRUE;
+ bFlag=true;
}
return bFlag;
@@ -379,7 +379,7 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeAction,
ScChangeActionState /* eState */, SvLBoxEntry* pParent,
- BOOL bDelMaster,BOOL bDisabled,ULONG nPos)
+ sal_Bool bDelMaster,sal_Bool bDisabled,sal_uLong nPos)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
@@ -387,7 +387,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
SvLBoxEntry* pEntry=NULL;
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -415,13 +415,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
{
aString=aStrContentWithChild;
pNewData->nInfo=RD_SPECIAL_VISCONTENT;
- pNewData->bIsRejectable=FALSE;
- pNewData->bIsAcceptable=FALSE;
+ pNewData->bIsRejectable=false;
+ pNewData->bIsAcceptable=false;
}
else
{
aString=*MakeTypeString(eType);
- pScChangeAction->GetDescription( aDesc, pDoc, TRUE);
+ pScChangeAction->GetDescription( aDesc, pDoc, sal_True);
}
}
else
@@ -430,9 +430,9 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
if(bDelMaster)
{
- pScChangeAction->GetDescription( aDesc, pDoc,TRUE);
- pNewData->bDisabled=TRUE;
- pNewData->bIsRejectable=FALSE;
+ pScChangeAction->GetDescription( aDesc, pDoc,sal_True);
+ pNewData->bDisabled=sal_True;
+ pNewData->bIsRejectable=false;
}
else
pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete());
@@ -440,11 +440,11 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
}
aString+='\t';
- pScChangeAction->GetRefString(aRefStr, pDoc, TRUE);
+ pScChangeAction->GetRefString(aRefStr, pDoc, sal_True);
aString+=aRefStr;
aString+='\t';
- BOOL bIsGenerated;
+ sal_Bool bIsGenerated;
if(!pChanges->IsGenerated(pScChangeAction->GetActionNumber()))
{
@@ -455,13 +455,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
aString+=' ';
aString+=ScGlobal::pLocaleData->getTime(aDateTime);
aString+='\t';
- bIsGenerated=FALSE;
+ bIsGenerated=false;
}
else
{
aString+='\t';
aString+='\t';
- bIsGenerated=TRUE;
+ bIsGenerated=sal_True;
}
String aComment=pScChangeAction->GetComment();
@@ -486,16 +486,16 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
ScRange* pRangeEntry = aRangeList[ i ];
if( pRangeEntry->Intersects(aRef) )
{
- bHasFilterEntry=TRUE;
- bFlag=TRUE;
+ bHasFilterEntry=true;
+ bFlag=true;
break;
}
}
}
else if(!bIsGenerated)
{
- bHasFilterEntry=TRUE;
- bFlag=TRUE;
+ bHasFilterEntry=sal_True;
+ bFlag=sal_True;
}
}
}
@@ -525,18 +525,18 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChangeAction,
ScChangeActionState eState,SvLBoxEntry* pParent,
- BOOL bDelMaster,BOOL bDisabled,ULONG nPos)
+ sal_Bool bDelMaster,sal_Bool bDisabled,sal_uLong nPos)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pScChangeAction==NULL || pChanges==NULL) return NULL;
- BOOL bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
+ sal_Bool bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
SvLBoxEntry* pEntry=NULL;
- int bFlag=FALSE;
+ int bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -552,13 +552,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
if( pRangeEntry->Intersects(aRef) )
{
if( pScChangeAction->GetState()==eState )
- bFlag=TRUE;
+ bFlag=true;
break;
}
}
}
else if(pScChangeAction->GetState()==eState && !bIsGenerated)
- bFlag=TRUE;
+ bFlag=true;
}
if(bFlag)
@@ -587,13 +587,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
{
aString=aStrContentWithChild;
pNewData->nInfo=RD_SPECIAL_VISCONTENT;
- pNewData->bIsRejectable=FALSE;
- pNewData->bIsAcceptable=FALSE;
+ pNewData->bIsRejectable=false;
+ pNewData->bIsAcceptable=false;
}
else
{
aString=*MakeTypeString(eType);
- pScChangeAction->GetDescription( aDesc, pDoc, TRUE);
+ pScChangeAction->GetDescription( aDesc, pDoc, sal_True);
}
}
else
@@ -602,9 +602,9 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
if(bDelMaster)
{
- pScChangeAction->GetDescription( aDesc, pDoc,TRUE);
- pNewData->bDisabled=TRUE;
- pNewData->bIsRejectable=FALSE;
+ pScChangeAction->GetDescription( aDesc, pDoc,sal_True);
+ pNewData->bDisabled=sal_True;
+ pNewData->bIsRejectable=false;
}
else
pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete());
@@ -612,7 +612,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
}
aString+='\t';
- pScChangeAction->GetRefString(aRefStr, pDoc, TRUE);
+ pScChangeAction->GetRefString(aRefStr, pDoc, sal_True);
aString+=aRefStr;
aString+='\t';
@@ -651,16 +651,16 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
}
SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
- SvLBoxEntry* pParent, ULONG nSpecial)
+ SvLBoxEntry* pParent, sal_uLong nSpecial)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
SvLBoxEntry* pEntry=NULL;
if(pScChangeAction==NULL || pChanges==NULL) return NULL;
- BOOL bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
+ sal_Bool bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -675,13 +675,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
ScRange* pRangeEntry = aRangeList[ i ];
if( pRangeEntry->Intersects(aRef) )
{
- bFlag=TRUE;
+ bFlag=true;
break;
}
}
}
else if(!bIsGenerated)
- bFlag=TRUE;
+ bFlag=sal_True;
}
String aRefStr;
@@ -722,7 +722,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
aDesc+=a2String;
aString+='\t';
- pScChangeAction->GetRefString(aRefStr, pDoc, TRUE);
+ pScChangeAction->GetRefString(aRefStr, pDoc, sal_True);
aString+=aRefStr;
aString+='\t';
@@ -758,7 +758,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
pNewData->pData=(void *)pScChangeAction;
pNewData->nActionNo=pScChangeAction->GetActionNumber();
pNewData->bIsAcceptable=pScChangeAction->IsClickable();
- pNewData->bIsRejectable=FALSE;
+ pNewData->bIsRejectable=false;
pNewData->bDisabled=!pNewData->bIsAcceptable;
pNewData->aDateTime=aDateTime;
pNewData->nRow = aRef.aStart.Row();
@@ -767,7 +767,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
if(pTheView->IsValidComment(&aComment) && bFlag)
{
- bHasFilterEntry=TRUE;
+ bHasFilterEntry=sal_True;
pEntry=pTheView->InsertEntry(aString,pNewData,pParent);
}
else
@@ -781,7 +781,7 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt )
{
ClearView();
UpdateView();
- bNoSelection=FALSE;
+ bNoSelection=false;
}
return SfxModelessDialog::PreNotify(rNEvt);
@@ -790,16 +790,16 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt )
void ScAcceptChgDlg::UpdateView()
{
- bNeedsUpdate=FALSE;
+ bNeedsUpdate=false;
DateTime aDateTime;
SvLBoxEntry* pParent=NULL;
ScChangeTrack* pChanges=NULL;
const ScChangeAction* pScChangeAction=NULL;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
SetPointer(Pointer(POINTER_WAIT));
- pTheView->SetUpdateMode(FALSE);
- BOOL bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
+ pTheView->SetUpdateMode(false);
+ sal_Bool bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
pTPFilter->IsAuthor()||pTPFilter->IsComment();
bUseColor=bFilterFlag;
@@ -811,11 +811,11 @@ void ScAcceptChgDlg::UpdateView()
pScChangeAction=pChanges->GetFirst();
}
ScChangeActionTable ActionTable;
- BOOL bTheFlag=FALSE;
+ sal_Bool bTheFlag=false;
while(pScChangeAction!=NULL)
{
- bHasFilterEntry=FALSE;
+ bHasFilterEntry=false;
switch(pScChangeAction->GetState())
{
case SC_CAS_VIRGIN:
@@ -830,7 +830,7 @@ void ScAcceptChgDlg::UpdateView()
else
pParent=NULL;
- bTheFlag=TRUE;
+ bTheFlag=sal_True;
break;
case SC_CAS_ACCEPTED:
@@ -847,11 +847,11 @@ void ScAcceptChgDlg::UpdateView()
if(pParent!=NULL && pScChangeAction->IsDialogParent())
{
if(!bFilterFlag)
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(true);
else
{
- BOOL bTestFlag=bHasFilterEntry;
- bHasFilterEntry=FALSE;
+ sal_Bool bTestFlag=bHasFilterEntry;
+ bHasFilterEntry=false;
if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag)
pTheView->RemoveEntry(pParent);
}
@@ -861,7 +861,7 @@ void ScAcceptChgDlg::UpdateView()
}
if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) )
- bTheFlag=FALSE;
+ bTheFlag=false;
pTPView->EnableAccept(bTheFlag);
pTPView->EnableAcceptAll(bTheFlag);
@@ -873,16 +873,16 @@ void ScAcceptChgDlg::UpdateView()
pParent=pTheView->InsertEntry(
aStrAllAccepted, static_cast< RedlinData * >(NULL),
static_cast< SvLBoxEntry * >(NULL));
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(sal_True);
}
if(nRejectCount>0)
{
pParent=pTheView->InsertEntry(
aStrAllRejected, static_cast< RedlinData * >(NULL),
static_cast< SvLBoxEntry * >(NULL));
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(sal_True);
}
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
SetPointer(Pointer(POINTER_ARROW));
SvLBoxEntry* pEntry=pTheView->First();
if(pEntry!=NULL)
@@ -890,7 +890,7 @@ void ScAcceptChgDlg::UpdateView()
}
//----------------------------------------------------------------------------
-BOOL ScAcceptChgDlg::Close()
+sal_Bool ScAcceptChgDlg::Close()
{
return SfxModelessDialog::Close();
}
@@ -912,22 +912,22 @@ IMPL_LINK( ScAcceptChgDlg, MinSizeHandle, SvxAcceptChgCtr*, pCtr )
IMPL_LINK( ScAcceptChgDlg, RefHandle, SvxTPFilter*, EMPTYARG )
{
- USHORT nId =ScSimpleRefDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId =ScSimpleRefDlgWrapper::GetChildWindowId();
- ScSimpleRefDlgWrapper::SetDefaultPosSize(GetPosPixel(),GetSizePixel(),TRUE);
+ ScSimpleRefDlgWrapper::SetDefaultPosSize(GetPosPixel(),GetSizePixel(),sal_True);
- SC_MOD()->SetRefDialog( nId, TRUE );
+ SC_MOD()->SetRefDialog( nId, sal_True );
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
ScSimpleRefDlgWrapper* pWnd =(ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId );
if(pWnd!=NULL)
{
- USHORT nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId();
- pViewFrm->ShowChildWindow(nAcceptId,FALSE);
+ sal_uInt16 nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId();
+ pViewFrm->ShowChildWindow(nAcceptId,false);
pWnd->SetCloseHdl(LINK( this, ScAcceptChgDlg,RefInfoHandle));
pWnd->SetRefString(pTPFilter->GetRange());
- pWnd->SetAutoReOpen(FALSE);
+ pWnd->SetAutoReOpen(false);
Window* pWin=pWnd->GetWindow();
pWin->SetPosSizePixel(GetPosPixel(),GetSizePixel());
Hide();
@@ -939,9 +939,9 @@ IMPL_LINK( ScAcceptChgDlg, RefHandle, SvxTPFilter*, EMPTYARG )
IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, String*, pResult)
{
- USHORT nId;
+ sal_uInt16 nId;
- ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE);
+ ScSimpleRefDlgWrapper::SetAutoReOpen(true);
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if(pResult!=NULL)
@@ -961,12 +961,12 @@ IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, String*, pResult)
Invalidate();
}
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
- pViewFrm->ShowChildWindow( nId, TRUE );
+ pViewFrm->ShowChildWindow( nId, sal_True );
}
else
{
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
- pViewFrm->SetChildWindow( nId, FALSE );
+ pViewFrm->SetChildWindow( nId, false );
}
return 0;
}
@@ -987,7 +987,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef )
{
SetPointer(Pointer(POINTER_WAIT));
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pRef!=NULL)
@@ -1018,7 +1018,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef )
}
SetPointer(Pointer(POINTER_ARROW));
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
return 0;
}
IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
@@ -1026,7 +1026,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
SetPointer(Pointer(POINTER_WAIT));
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
if(pRef!=NULL)
{
SvLBoxEntry* pEntry=pTheView->FirstSelected();
@@ -1040,7 +1040,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
if(pScChangeAction->GetType()==SC_CAT_CONTENT)
{
if(pEntryData->nInfo==RD_SPECIAL_CONTENT)
- pChanges->SelectContent(pScChangeAction,TRUE);
+ pChanges->SelectContent(pScChangeAction,true);
else
pChanges->SelectContent(pScChangeAction);
}
@@ -1056,7 +1056,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
ClearView();
UpdateView();
}
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
return 0;
}
@@ -1103,7 +1103,7 @@ void ScAcceptChgDlg::AcceptFiltered()
IMPL_LINK( ScAcceptChgDlg, RejectAllHandle, SvxTPView*, EMPTYARG )
{
SetPointer(Pointer(POINTER_WAIT));
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pChanges!=NULL)
{
@@ -1124,7 +1124,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectAllHandle, SvxTPView*, EMPTYARG )
}
SetPointer(Pointer(POINTER_ARROW));
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
return 0;
}
@@ -1133,7 +1133,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG )
{
SetPointer(Pointer(POINTER_WAIT));
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pChanges!=NULL)
{
@@ -1149,7 +1149,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG )
ClearView();
UpdateView();
}
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
SetPointer(Pointer(POINTER_ARROW));
return 0;
@@ -1160,7 +1160,7 @@ IMPL_LINK( ScAcceptChgDlg, SelectHandle, SvxRedlinTable*, EMPTYARG )
if(!bNoSelection)
aSelectionTimer.Start();
- bNoSelection=FALSE;
+ bNoSelection=false;
return 0;
}
@@ -1188,12 +1188,12 @@ void ScAcceptChgDlg::GetDependents( const ScChangeAction* pScChangeAction,
aActionTable,pScChangeAction->IsMasterDelete());
}
-BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
+sal_Bool ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
{
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
ScRedlinData *pEntryData=(ScRedlinData *)(pParent->GetUserData());
const ScChangeAction* pScChangeAction = (ScChangeAction*) pEntryData->pData;
- BOOL bParentInserted = FALSE;
+ sal_Bool bParentInserted = false;
// If the parent is a MatrixOrigin then place it in the right order before
// the MatrixReferences. Also if it is the first content change at this
// position don't insert the first dependent MatrixReference as the special
@@ -1204,7 +1204,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
{
pActionTable->Insert( pScChangeAction->GetActionNumber(),
(ScChangeAction*) pScChangeAction );
- bParentInserted = TRUE;
+ bParentInserted = sal_True;
}
SvLBoxEntry* pEntry=NULL;
@@ -1216,18 +1216,18 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
pCChild=(const ScChangeActionContent*)pActionTable->Next();
}
- if(pCChild==NULL) return TRUE;
+ if(pCChild==NULL) return sal_True;
SvLBoxEntry* pOriginal=InsertChangeActionContent(pCChild,pParent,RD_SPECIAL_CONTENT);
if(pOriginal!=NULL)
{
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
ScRedlinData *pParentData=(ScRedlinData *)(pOriginal->GetUserData());
pParentData->pData=(void *)pScChangeAction;
pParentData->nActionNo=pScChangeAction->GetActionNumber();
pParentData->bIsAcceptable=pScChangeAction->IsRejectable(); // select old value
- pParentData->bIsRejectable=FALSE;
- pParentData->bDisabled=FALSE;
+ pParentData->bIsRejectable=false;
+ pParentData->bDisabled=false;
}
while(pCChild!=NULL)
{
@@ -1236,7 +1236,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
pEntry=InsertChangeActionContent(pCChild,pParent,RD_SPECIAL_NONE);
if(pEntry!=NULL)
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
}
pCChild=(const ScChangeActionContent*)pActionTable->Next();
}
@@ -1248,13 +1248,13 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
if(pEntry!=NULL)
{
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
ScRedlinData *pParentData=(ScRedlinData *)(pEntry->GetUserData());
pParentData->pData=(void *)pScChangeAction;
pParentData->nActionNo=pScChangeAction->GetActionNumber();
pParentData->bIsAcceptable=pScChangeAction->IsClickable();
- pParentData->bIsRejectable=FALSE;
- pParentData->bDisabled=FALSE;
+ pParentData->bIsRejectable=false;
+ pParentData->bDisabled=false;
}
}
@@ -1262,10 +1262,10 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
}
-BOOL ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent)
+sal_Bool ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
ScChangeActionState eState = SC_CAS_VIRGIN;
String aString=pTheView->GetEntryText( pParent);
@@ -1284,30 +1284,30 @@ BOOL ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent)
{
if(pScChangeAction->GetState()==eState &&
InsertFilteredAction(pScChangeAction,eState,pParent)!=NULL)
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
pScChangeAction=pScChangeAction->GetNext();
}
return bTheTestFlag;
}
-BOOL ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
+sal_Bool ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
SvLBoxEntry* pEntry=NULL;
const ScChangeAction* pChild=(const ScChangeAction*)pActionTable->First();
while(pChild!=NULL)
{
- pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,FALSE,TRUE);
+ pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,false,sal_True);
if(pEntry!=NULL)
{
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData());
- pEntryData->bIsRejectable=FALSE;
- pEntryData->bIsAcceptable=FALSE;
- pEntryData->bDisabled=TRUE;
+ pEntryData->bIsRejectable=false;
+ pEntryData->bIsAcceptable=false;
+ pEntryData->bDisabled=sal_True;
if(pChild->IsDialogParent())
Expand(pChanges,pChild,pEntry);
@@ -1316,11 +1316,11 @@ BOOL ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry*
}
return bTheTestFlag;
}
-BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
+sal_Bool ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
SvLBoxEntry* pEntry=NULL;
ScChangeActionTable aDelActionTable;
const ScChangeAction* pChild=(const ScChangeAction*)pActionTable->First();
@@ -1329,18 +1329,18 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
{
if(pScChangeAction!=pChild)
- pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,FALSE,TRUE);
+ pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,false,sal_True);
else
- pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,TRUE,TRUE);
+ pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,sal_True,sal_True);
if(pEntry!=NULL)
{
ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData());
- pEntryData->bIsRejectable=FALSE;
- pEntryData->bIsAcceptable=FALSE;
- pEntryData->bDisabled=TRUE;
+ pEntryData->bIsRejectable=false;
+ pEntryData->bIsAcceptable=false;
+ pEntryData->bDisabled=sal_True;
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
if ( pChild->IsDialogParent() )
Expand(pChanges,pChild,pEntry);
@@ -1350,10 +1350,10 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
return bTheTestFlag;
}
-BOOL ScAcceptChgDlg::Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
- SvLBoxEntry* pEntry,BOOL bFilter)
+sal_Bool ScAcceptChgDlg::Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
+ SvLBoxEntry* pEntry,sal_Bool bFilter)
{
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
if(pChanges!=NULL &&pEntry!=NULL &&pScChangeAction!=NULL)
{
@@ -1406,8 +1406,8 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable )
if(pEntry->HasChildsOnDemand())
{
- BOOL bTheTestFlag=TRUE;
- pEntry->EnableChildsOnDemand(FALSE);
+ sal_Bool bTheTestFlag=sal_True;
+ pEntry->EnableChildsOnDemand(false);
pTheView->RemoveEntry(pTheView->FirstChild(pEntry));
if(pEntryData!=NULL)
@@ -1449,32 +1449,32 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable )
}
}
SetPointer(Pointer(POINTER_ARROW));
- return (ULONG) TRUE;
+ return (sal_uLong) sal_True;
}
-void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
- ULONG nEndAction, ULONG /* nPos */)
+void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction,
+ sal_uLong nEndAction, sal_uLong /* nPos */)
{
if(pChanges!=NULL)
{
DateTime aDateTime;
SvLBoxEntry* pParent=NULL;
const ScChangeAction* pScChangeAction=NULL;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
SetPointer(Pointer(POINTER_WAIT));
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
ScChangeActionTable ActionTable;
- BOOL bTheFlag=FALSE;
+ sal_Bool bTheFlag=false;
- BOOL bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
+ sal_Bool bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
pTPFilter->IsAuthor()||pTPFilter->IsComment();
bUseColor=bFilterFlag;
- for(ULONG i=nStartAction;i<=nEndAction;i++)
+ for(sal_uLong i=nStartAction;i<=nEndAction;i++)
{
pScChangeAction=pChanges->GetAction(i);
if(pScChangeAction==NULL) continue;
@@ -1494,7 +1494,7 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
else
pParent=NULL;
- bTheFlag=TRUE;
+ bTheFlag=sal_True;
break;
case SC_CAS_ACCEPTED:
@@ -1511,11 +1511,11 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
if(pParent!=NULL && pScChangeAction->IsDialogParent())
{
if(!bFilterFlag)
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(true);
else
{
- BOOL bTestFlag=bHasFilterEntry;
- bHasFilterEntry=FALSE;
+ sal_Bool bTestFlag=bHasFilterEntry;
+ bHasFilterEntry=false;
if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag)
pTheView->RemoveEntry(pParent);
}
@@ -1525,22 +1525,22 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
}
if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) )
- bTheFlag=FALSE;
+ bTheFlag=false;
pTPView->EnableAccept(bTheFlag);
pTPView->EnableAcceptAll(bTheFlag);
pTPView->EnableReject(bTheFlag);
pTPView->EnableRejectAll(bTheFlag);
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
SetPointer(Pointer(POINTER_ARROW));
}
}
-void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction)
+void ScAcceptChgDlg::RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction)
{
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
SvLBoxEntry* pEntry=pTheView->GetCurEntry();
@@ -1549,26 +1549,26 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction)
if(pEntry!=NULL)
pEntryData=(ScRedlinData *)(pEntry->GetUserData());
- ULONG nAction=0;
+ sal_uLong nAction=0;
if(pEntryData!=NULL)
nAction=pEntryData->nActionNo;
if(nAction>=nStartAction && nAction<=nEndAction)
pTheView->SetCurEntry(pTheView->GetModel()->GetEntry(0));
- BOOL bRemove=FALSE;
+ sal_Bool bRemove=false;
// MUST do it backwards, don't delete parents before children and GPF
pEntry=pTheView->Last();
while(pEntry!=NULL)
{
- bRemove=FALSE;
+ bRemove=false;
pEntryData=(ScRedlinData *)(pEntry->GetUserData());
if(pEntryData!=NULL)
{
nAction=pEntryData->nActionNo;
- if(nStartAction<=nAction && nAction<=nEndAction) bRemove=TRUE;
+ if(nStartAction<=nAction && nAction<=nEndAction) bRemove=sal_True;
}
@@ -1579,33 +1579,33 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction)
pEntry=pPrevEntry;
}
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
}
-void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,ULONG nEndAction)
+void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction)
{
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
- ULONG nPos=LIST_APPEND;
+ sal_uLong nPos=LIST_APPEND;
- BOOL bRemove=FALSE;
+ sal_Bool bRemove=false;
SvLBoxEntry* pEntry=pTheView->First();
SvLBoxEntry* pNextEntry = (pEntry ? pTheView->NextSibling(pEntry) : NULL);
SvLBoxEntry* pLastEntry=NULL;
while(pEntry!=NULL)
{
- bRemove=FALSE;
+ bRemove=false;
ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData());
if(pEntryData!=NULL)
{
ScChangeAction* pScChangeAction=
(ScChangeAction*) pEntryData->pData;
- ULONG nAction=pScChangeAction->GetActionNumber();
+ sal_uLong nAction=pScChangeAction->GetActionNumber();
- if(nStartAction<=nAction && nAction<=nEndAction) bRemove=TRUE;
+ if(nStartAction<=nAction && nAction<=nEndAction) bRemove=sal_True;
}
if(bRemove)
@@ -1641,7 +1641,7 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,U
else
AppendChanges(pChgTrack,nStartAction,nEndAction);
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
}
@@ -1650,8 +1650,8 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
ScChangeTrackMsgQueue& aMsgQueue= pChgTrack->GetMsgQueue();
ScChangeTrackMsgInfo* pTrackInfo=aMsgQueue.Get();
- ULONG nStartAction;
- ULONG nEndAction;
+ sal_uLong nStartAction;
+ sal_uLong nEndAction;
while(pTrackInfo!=NULL)
{
@@ -1660,7 +1660,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
if(!bIgnoreMsg)
{
- bNoSelection=TRUE;
+ bNoSelection=sal_True;
switch(pTrackInfo->eMsgType)
{
@@ -1669,7 +1669,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
case SC_CTM_REMOVE: RemoveEntrys(nStartAction,nEndAction);
break;
case SC_CTM_PARENT:
- case SC_CTM_CHANGE: //bNeedsUpdate=TRUE;
+ case SC_CTM_CHANGE: //bNeedsUpdate=sal_True;
UpdateEntrys(pChgTrack,nStartAction,nEndAction);
break;
default:
@@ -1686,7 +1686,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
}
IMPL_LINK( ScAcceptChgDlg, ReOpenTimerHdl, Timer*, EMPTYARG )
{
- ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE);
+ ScSimpleRefDlgWrapper::SetAutoReOpen(sal_True);
aAcceptChgCtr.ShowFilterPage();
RefHandle(NULL);
@@ -1697,9 +1697,9 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
{
ScTabView* pTabView = pViewData->GetView();
- BOOL bAcceptFlag = TRUE;
- BOOL bRejectFlag = TRUE;
- BOOL bContMark = FALSE;
+ sal_Bool bAcceptFlag = sal_True;
+ sal_Bool bRejectFlag = sal_True;
+ sal_Bool bContMark = false;
pTabView->DoneBlockMode(); // clears old marking
SvLBoxEntry* pEntry = pTheView->FirstSelected();
@@ -1718,16 +1718,16 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
const ScBigRange& rBigRange = pScChangeAction->GetBigRange();
if( rBigRange.IsValid( pDoc ) && IsActive() )
{
- BOOL bSetCursor = !pTheView->NextSelected( pEntry );
+ sal_Bool bSetCursor = !pTheView->NextSelected( pEntry );
pTabView->MarkRange( rBigRange.MakeRange(), bSetCursor, bContMark );
- bContMark = TRUE;
+ bContMark = sal_True;
}
}
}
else
{
- bAcceptFlag = FALSE;
- bRejectFlag = FALSE;
+ bAcceptFlag = false;
+ bRejectFlag = false;
}
bAcceptEnableFlag = bAcceptFlag;
bRejectEnableFlag = bRejectFlag;
@@ -1736,7 +1736,7 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
}
ScChangeTrack* pChanges = pDoc->GetChangeTrack();
- BOOL bEnable = pDoc->IsDocEditable() && pChanges && !pChanges->IsProtected();
+ sal_Bool bEnable = pDoc->IsDocEditable() && pChanges && !pChanges->IsProtected();
pTPView->EnableAccept( bAcceptFlag && bEnable );
pTPView->EnableReject( bRejectFlag && bEnable );
@@ -1764,11 +1764,11 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
aPopup.Deactivate();
}
- USHORT nSortedCol= pTheView->GetSortedCol();
+ sal_uInt16 nSortedCol= pTheView->GetSortedCol();
if(nSortedCol!=0xFFFF)
{
- USHORT nItemId=nSortedCol+SC_SUB_SORT+1;
+ sal_uInt16 nItemId=nSortedCol+SC_SUB_SORT+1;
aPopup.CheckItem(nItemId);
@@ -1778,7 +1778,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
pSubMenu->CheckItem(nItemId);
}
- aPopup.EnableItem(SC_CHANGES_COMMENT,FALSE);
+ aPopup.EnableItem(SC_CHANGES_COMMENT,false);
if(pDoc->IsDocEditable() && pEntry!=NULL)
{
@@ -1792,7 +1792,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
}
}
- USHORT nCommand=aPopup.Execute( this, GetPointerPosPixel() );
+ sal_uInt16 nCommand=aPopup.Execute( this, GetPointerPosPixel() );
if(nCommand)
@@ -1807,14 +1807,14 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
ScChangeAction* pScChangeAction=
(ScChangeAction*) pEntryData->pData;
- pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,FALSE);
+ pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,false);
}
}
}
else
{
- BOOL bSortDir=pTheView->GetSortDirection();
- USHORT nDialogCol=nCommand-SC_SUB_SORT-1;
+ sal_Bool bSortDir=pTheView->GetSortDirection();
+ sal_uInt16 nDialogCol=nCommand-SC_SUB_SORT-1;
if(nSortedCol==nDialogCol) bSortDir=!bSortDir;
pTheView->SortByCol(nDialogCol,bSortDir);
/*
@@ -1864,13 +1864,13 @@ void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo)
if ( aStr.Len())
{
- USHORT nCount=(USHORT)aStr.ToInt32();
+ sal_uInt16 nCount=(sal_uInt16)aStr.ToInt32();
- for(USHORT i=0;i<nCount;i++)
+ for(sal_uInt16 i=0;i<nCount;i++)
{
xub_StrLen n1 = aStr.Search(';');
aStr.Erase(0, n1+1);
- pTheView->SetTab(i,(USHORT)aStr.ToInt32(),MAP_PIXEL);
+ pTheView->SetTab(i,(sal_uInt16)aStr.ToInt32(),MAP_PIXEL);
}
}
}
@@ -1882,11 +1882,11 @@ void ScAcceptChgDlg::FillInfo(SfxChildWinInfo& rInfo) const
SfxModelessDialog::FillInfo(rInfo);
rInfo.aExtraString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "AcceptChgDat:(" ));
- USHORT nCount=pTheView->TabCount();
+ sal_uInt16 nCount=pTheView->TabCount();
rInfo.aExtraString += String::CreateFromInt32(nCount);
rInfo.aExtraString += ';';
- for(USHORT i=0;i<nCount;i++)
+ for(sal_uInt16 i=0;i<nCount;i++)
{
rInfo.aExtraString += String::CreateFromInt32(pTheView->GetTab(i));
rInfo.aExtraString += ';';
@@ -1911,7 +1911,7 @@ void ScAcceptChgDlg::InitFilter()
pTheView->SetFilterComment(pTPFilter->IsComment());
utl::SearchParam aSearchParam( pTPFilter->GetComment(),
- utl::SearchParam::SRCH_REGEXP,FALSE,FALSE,FALSE );
+ utl::SearchParam::SRCH_REGEXP,false,false,false );
pTheView->SetCommentParams(&aSearchParam);
@@ -1985,8 +1985,8 @@ IMPL_LINK( ScAcceptChgDlg, ColCompareHdl, SvSortData*, pSortData )
if(pLeftItem != NULL && pRightItem != NULL)
{
- USHORT nLeftKind=pLeftItem->IsA();
- USHORT nRightKind=pRightItem->IsA();
+ sal_uInt16 nLeftKind=pLeftItem->IsA();
+ sal_uInt16 nRightKind=pRightItem->IsA();
if(nRightKind == SV_ITEM_ID_LBOXSTRING &&
nLeftKind == SV_ITEM_ID_LBOXSTRING )
diff --git a/sc/source/ui/miscdlgs/acredlin.src b/sc/source/ui/miscdlgs/acredlin.src
index 07ae0398134f..541959eb1d7b 100644
--- a/sc/source/ui/miscdlgs/acredlin.src
+++ b/sc/source/ui/miscdlgs/acredlin.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_CHANGES
{
OutputSize = TRUE ;
- HelpId = FID_CHG_ACCEPT ;
+ HelpId = CMD_FID_CHG_ACCEPT ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 282 , 142 ) ;
@@ -61,6 +61,7 @@ ModelessDialog RID_SCDLG_CHANGES
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_CHANGES:ED_ASSIGN";
Hide = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 119 ) ;
@@ -69,6 +70,7 @@ ModelessDialog RID_SCDLG_CHANGES
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CHANGES:RB_ASSIGN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 118 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index c7676c9166c6..2a3e02fa9eeb 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -71,8 +71,8 @@ ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindi
, pAccel( NULL )
, pHiddenMarks(NULL)
, nRefTab(0)
- , bHighLightRef( FALSE )
- , bAccInserted( FALSE )
+ , bHighLightRef( false )
+ , bAccInserted( false )
{
ScInputOptions aInputOption=SC_MOD()->GetInputOptions();
bEnableColorRef=aInputOption.GetRangeFinder();
@@ -86,14 +86,14 @@ ScFormulaReferenceHelper::~ScFormulaReferenceHelper()
// common cleanup for ScAnyRefDlg and ScFormulaDlg is done here
HideReference();
- enableInput( TRUE );
+ enableInput( sal_True );
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
if ( pInputHdl )
pInputHdl->ResetDelayTimer(); // stop the timer for disabling the input line
}
// -----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::enableInput( BOOL bEnable )
+void ScFormulaReferenceHelper::enableInput( sal_Bool bEnable )
{
TypeId aType(TYPE(ScDocShell));
ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType);
@@ -115,8 +115,8 @@ void ScFormulaReferenceHelper::enableInput( BOOL bEnable )
Window *pParent=pWin->GetParent();
if(pParent)
{
- pParent->EnableInput(bEnable,TRUE /* FALSE */);
- if(TRUE /*bChilds*/)
+ pParent->EnableInput(bEnable,sal_True /* sal_False */);
+ if(sal_True /*bChilds*/)
pViewSh->EnableRefInput(bEnable);
}
}
@@ -133,7 +133,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
{
if( bEnableColorRef )
{
- bHighLightRef=TRUE;
+ bHighLightRef=sal_True;
ScViewData* pViewData=ScDocShell::GetViewData();
if ( pViewData )
{
@@ -142,7 +142,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
ScRangeList aRangeList;
- pTabViewShell->DoneRefMode( FALSE );
+ pTabViewShell->DoneRefMode( false );
pTabViewShell->ClearHighlightRanges();
if( ParseWithNames( aRangeList, rStr, pDoc ) )
@@ -171,7 +171,7 @@ bool ScFormulaReferenceHelper::ParseWithNames( ScRangeList& rRanges, const Strin
ScRange aRange;
String aRangeStr( rStr.GetToken( nToken ) );
- USHORT nFlags = aRange.ParseAny( aRangeStr, pDoc, aDetails );
+ sal_uInt16 nFlags = aRange.ParseAny( aRangeStr, pDoc, aDetails );
if ( nFlags & SCA_VALID )
{
if ( (nFlags & SCA_TAB_3D) == 0 )
@@ -193,7 +193,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
{
if( /*!pRefEdit &&*/ bEnableColorRef)
{
- bHighLightRef=TRUE;
+ bHighLightRef=sal_True;
ScViewData* pViewData=ScDocShell::GetViewData();
if ( pViewData && pRefComp.get() )
{
@@ -208,17 +208,17 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
if(pTabViewShell!=NULL && pScTokA!=NULL)
{
- pTabViewShell->DoneRefMode( FALSE );
+ pTabViewShell->DoneRefMode( false );
pTabViewShell->ClearHighlightRanges();
pScTokA->Reset();
const ScToken* pToken = static_cast<const ScToken*>(pScTokA->GetNextReference());
- USHORT nIndex=0;
+ sal_uInt16 nIndex=0;
while(pToken!=NULL)
{
- BOOL bDoubleRef=(pToken->GetType()==formula::svDoubleRef);
+ sal_Bool bDoubleRef=(pToken->GetType()==formula::svDoubleRef);
if(pToken->GetType()==formula::svSingleRef || bDoubleRef)
@@ -250,7 +250,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
}
}
// -----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::HideReference( BOOL bDoneRefMode )
+void ScFormulaReferenceHelper::HideReference( sal_Bool bDoneRefMode )
{
ScViewData* pViewData=ScDocShell::GetViewData();
@@ -260,14 +260,14 @@ void ScFormulaReferenceHelper::HideReference( BOOL bDoneRefMode )
if(pTabViewShell!=NULL)
{
- // bDoneRefMode is FALSE when called from before SetReference.
+ // bDoneRefMode is sal_False when called from before SetReference.
// In that case, RefMode was just started and must not be ended now.
if ( bDoneRefMode )
- pTabViewShell->DoneRefMode( FALSE );
+ pTabViewShell->DoneRefMode( false );
pTabViewShell->ClearHighlightRanges();
}
- bHighLightRef=FALSE;
+ bHighLightRef=false;
}
}
// -----------------------------------------------------------------------------
@@ -318,9 +318,9 @@ void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit, formula::R
const ScRange* pRange = aRangeList.front();
pViewShell->SetTabNo( pRange->aStart.Tab() );
pViewShell->MoveCursorAbs( pRange->aStart.Col(),
- pRange->aStart.Row(), SC_FOLLOW_JUMP, FALSE, FALSE );
+ pRange->aStart.Row(), SC_FOLLOW_JUMP, false, false );
pViewShell->MoveCursorAbs( pRange->aEnd.Col(),
- pRange->aEnd.Row(), SC_FOLLOW_JUMP, TRUE, FALSE );
+ pRange->aEnd.Row(), SC_FOLLOW_JUMP, sal_True, false );
m_pDlg->SetReference( *pRange, pDoc );
}
}
@@ -343,7 +343,7 @@ void ScFormulaReferenceHelper::Init()
pRefCell.reset( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) );
pRefComp.reset( new ScCompiler( pDoc, aCursorPos) );
pRefComp->SetGrammar( pDoc->GetGrammar() );
- pRefComp->SetCompileForFAP(TRUE);
+ pRefComp->SetCompileForFAP(sal_True);
nRefTab = nTab;
}
@@ -360,20 +360,20 @@ IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel )
case KEY_ESCAPE:
if( pRefEdit )
pRefEdit->GrabFocus();
- m_pDlg->RefInputDone( TRUE );
+ m_pDlg->RefInputDone( sal_True );
break;
}
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::RefInputDone( BOOL bForced )
+void ScFormulaReferenceHelper::RefInputDone( sal_Bool bForced )
{
if ( CanInputDone( bForced ) )
{
if (bAccInserted) // Accelerator wieder abschalten
{
Application::RemoveAccel( pAccel.get() );
- bAccInserted = FALSE;
+ bAccInserted = false;
}
// Fenstertitel anpassen
@@ -393,8 +393,8 @@ void ScFormulaReferenceHelper::RefInputDone( BOOL bForced )
}
// Alle anderen: Show();
- USHORT nChildren = m_pWindow->GetChildCount();
- for ( USHORT i = 0; i < nChildren; i++ )
+ sal_uInt16 nChildren = m_pWindow->GetChildCount();
+ for ( sal_uInt16 i = 0; i < nChildren; i++ )
if (pHiddenMarks[i])
{
m_pWindow->GetChild(i)->GetWindow( WINDOW_CLIENT )->Show();
@@ -420,11 +420,11 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
sNewDialogText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " ));
// Alle Elemente ausser EditCell und Button verstecken
- USHORT nChildren = m_pWindow->GetChildCount();
- pHiddenMarks = new BOOL [nChildren];
- for (USHORT i = 0; i < nChildren; i++)
+ sal_uInt16 nChildren = m_pWindow->GetChildCount();
+ pHiddenMarks = new sal_Bool [nChildren];
+ for (sal_uInt16 i = 0; i < nChildren; i++)
{
- pHiddenMarks[i] = FALSE;
+ pHiddenMarks[i] = false;
Window* pWin = m_pWindow->GetChild(i);
pWin = pWin->GetWindow( WINDOW_CLIENT );
if (pWin == (Window*)pRefEdit)
@@ -435,7 +435,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
; // do nothing
else if (pWin->IsVisible())
{
- pHiddenMarks[i] = TRUE;
+ pHiddenMarks[i] = sal_True;
pWin->Hide();
}
}
@@ -487,7 +487,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
pAccel->SetSelectHdl( LINK( this, ScFormulaReferenceHelper, AccelSelectHdl ) );
}
Application::InsertAccel( pAccel.get() );
- bAccInserted = TRUE;
+ bAccInserted = true;
}
}
// -----------------------------------------------------------------------------
@@ -498,11 +498,11 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula
if( pRefEdit == pEdit ) // is this the active ref edit field?
{
pRefEdit->GrabFocus(); // before RefInputDone()
- m_pDlg->RefInputDone( TRUE ); // finish ref input
+ m_pDlg->RefInputDone( sal_True ); // finish ref input
}
else
{
- m_pDlg->RefInputDone( TRUE ); // another active ref edit?
+ m_pDlg->RefInputDone( sal_True ); // another active ref edit?
m_pDlg->RefInputStart( pEdit, pButton ); // start ref input
// pRefEdit might differ from pEdit after RefInputStart() (i.e. ScFormulaDlg)
if( pRefEdit )
@@ -511,11 +511,11 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula
}
}
// -----------------------------------------------------------------------------
-BOOL ScFormulaReferenceHelper::DoClose( USHORT nId )
+sal_Bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
{
SfxApplication* pSfxApp = SFX_APP();
- SetDispatcherLock( FALSE ); //! here and in dtor ?
+ SetDispatcherLock( false ); //! here and in dtor ?
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if ( pViewFrm && pViewFrm->HasChildWindow(FID_INPUTLINE_STATUS) )
@@ -539,17 +539,17 @@ BOOL ScFormulaReferenceHelper::DoClose( USHORT nId )
if (pMyDisp)
pMyViewFrm = pMyDisp->GetFrame();
}
- SC_MOD()->SetRefDialog( nId, FALSE, pMyViewFrm );
+ SC_MOD()->SetRefDialog( nId, false, pMyViewFrm );
pSfxApp->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if ( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(sal_True);
- return TRUE;
+ return sal_True;
}
-void ScFormulaReferenceHelper::SetDispatcherLock( BOOL bLock )
+void ScFormulaReferenceHelper::SetDispatcherLock( sal_Bool bLock )
{
// lock / unlock only the dispatchers of Calc documents
@@ -576,11 +576,11 @@ void ScFormulaReferenceHelper::SetDispatcherLock( BOOL bLock )
// -----------------------------------------------------------------------------
void ScFormulaReferenceHelper::ViewShellChanged(ScTabViewShell* /* pScViewShell */)
{
- enableInput( FALSE );
+ enableInput( false );
EnableSpreadsheets();
}
-void ScFormulaReferenceHelper::EnableSpreadsheets(BOOL bFlag, BOOL bChilds)
+void ScFormulaReferenceHelper::EnableSpreadsheets(sal_Bool bFlag, sal_Bool bChilds)
{
TypeId aType(TYPE(ScDocShell));
ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType);
@@ -602,7 +602,7 @@ void ScFormulaReferenceHelper::EnableSpreadsheets(BOOL bFlag, BOOL bChilds)
Window *pParent=pWin->GetParent();
if(pParent)
{
- pParent->EnableInput(bFlag,FALSE);
+ pParent->EnableInput(bFlag,false);
if(bChilds)
pViewSh->EnableRefInput(bFlag);
}
@@ -670,7 +670,7 @@ void lcl_HideAllReferences()
//----------------------------------------------------------------------------
ScRefHandler::ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW,
- Window* pParent, USHORT nResId*/, bool bBindRef )
+ Window* pParent, sal_uInt16 nResId*/, bool bBindRef )
: //SfxModelessDialog ( pB, pCW, pParent, ScResId( nResId ) ),
m_rWindow( rWindow ),
m_bInRefMode( false ),
@@ -679,7 +679,7 @@ ScRefHandler::ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow*
pActiveWin(NULL)
{
m_aHelper.SetWindow(/*this*/&m_rWindow);
- if(m_rWindow.GetHelpId()==0) //Hack, da im SfxModelessDialog die HelpId
+ if(m_rWindow.GetHelpId().getLength()==0) //Hack, da im SfxModelessDialog die HelpId
m_rWindow.SetHelpId(m_rWindow.GetUniqueId()); //fuer einen ModelessDialog entfernt und
//in eine UniqueId gewandelt wird, machen
//wir das an dieser Stelle rueckgaengig.
@@ -711,7 +711,7 @@ bool ScRefHandler::EnterRefMode()
{
pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() );
if( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(sal_True);
pParentDoc = pMyViewFrm->GetObjectShell();
}
}
@@ -728,13 +728,13 @@ bool ScRefHandler::EnterRefMode()
if ( pInputHdl )
pInputHdl->NotifyChange( NULL );
- m_aHelper.enableInput( FALSE );
+ m_aHelper.enableInput( false );
m_aHelper.EnableSpreadsheets();
m_aHelper.Init();
- m_aHelper.SetDispatcherLock( TRUE );
+ m_aHelper.SetDispatcherLock( true );
return m_bInRefMode = true;
}
@@ -753,12 +753,12 @@ bool ScRefHandler::LeaveRefMode()
lcl_HideAllReferences();
if( Dialog *pDlg = dynamic_cast<Dialog*>( static_cast<Window*>(*this) ) )
- pDlg->SetModalInputMode(FALSE);
- SetDispatcherLock( FALSE ); //! here and in DoClose ?
+ pDlg->SetModalInputMode(false);
+ SetDispatcherLock( false ); //! here and in DoClose ?
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(sal_True);
lcl_InvalidateWindows();
@@ -798,7 +798,7 @@ void ScRefHandler::SwitchToDocument()
//----------------------------------------------------------------------------
-BOOL ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0
+sal_Bool ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0
{
// default: allow only same document (overridden in function dialog)
String aCmpName;
@@ -811,20 +811,20 @@ BOOL ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be
//----------------------------------------------------------------------------
-BOOL ScRefHandler::IsRefInputMode() const
+sal_Bool ScRefHandler::IsRefInputMode() const
{
return m_rWindow.IsVisible(); // nur wer sichtbar ist kann auch Referenzen bekommen
}
//----------------------------------------------------------------------------
-BOOL ScRefHandler::DoClose( USHORT nId )
+sal_Bool ScRefHandler::DoClose( sal_uInt16 nId )
{
m_aHelper.DoClose(nId);
- return TRUE;
+ return sal_True;
}
-void ScRefHandler::SetDispatcherLock( BOOL bLock )
+void ScRefHandler::SetDispatcherLock( sal_Bool bLock )
{
m_aHelper.SetDispatcherLock( bLock );
}
@@ -845,11 +845,11 @@ void ScRefHandler::AddRefEntry()
//----------------------------------------------------------------------------
-BOOL ScRefHandler::IsTableLocked() const
+sal_Bool ScRefHandler::IsTableLocked() const
{
// per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------
@@ -881,7 +881,7 @@ INTRODUCE_TEMPLATE long ScRefHdlrImplBase<TWindow,bBindRef>::PreNotify( NotifyEv
{\
if( bBindRef || m_bInRefMode )\
{\
- USHORT nSwitch=rNEvt.GetType();\
+ sal_uInt16 nSwitch=rNEvt.GetType();\
if(nSwitch==EVENT_GETFOCUS)\
{\
pActiveWin=rNEvt.GetWindow();\
@@ -901,15 +901,15 @@ INTRODUCE_TEMPLATE void ScRefHdlrImplBase<TWindow,bBindRef>::StateChanged( State
{\
if(m_rWindow.IsVisible())\
{\
- m_aHelper.enableInput( FALSE );\
+ m_aHelper.enableInput( false );\
m_aHelper.EnableSpreadsheets();\
- m_aHelper.SetDispatcherLock( TRUE );\
+ m_aHelper.SetDispatcherLock( sal_True );\
aTimer.Start();\
}\
else\
{\
- m_aHelper.enableInput( TRUE );\
- m_aHelper.SetDispatcherLock( FALSE ); /*//! here and in DoClose ?*/\
+ m_aHelper.enableInput( sal_True );\
+ m_aHelper.SetDispatcherLock( false ); /*//! here and in DoClose ?*/\
}\
}\
}
@@ -933,7 +933,7 @@ bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const String& rStr, ScD
return m_aHelper.ParseWithNames( rRanges, rStr, pDoc );
}
// -----------------------------------------------------------------------------
-void ScRefHandler::HideReference( BOOL bDoneRefMode )
+void ScRefHandler::HideReference( sal_Bool bDoneRefMode )
{
m_aHelper.HideReference( bDoneRefMode );
}
@@ -948,7 +948,7 @@ void ScRefHandler::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pB
m_aHelper.ReleaseFocus( pEdit,pButton );
}
//----------------------------------------------------------------------------
-void ScRefHandler::RefInputDone( BOOL bForced )
+void ScRefHandler::RefInputDone( sal_Bool bForced )
{
m_aHelper.RefInputDone( bForced );
}
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index b3eff6dde692..3cc608c0c8d0 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -78,7 +78,7 @@ ScAutoFmtPreview::ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocume
aVD ( *this ),
aScriptedText ( aVD ),
xBreakIter ( pDoc->GetBreakIterator() ),
- bFitWidth ( FALSE ),
+ bFitWidth ( false ),
mbRTL ( false ),
aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ),
mnLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ),
@@ -121,7 +121,7 @@ void lcl_SetFontProperties(
rFont.SetItalic ( (FontItalic)rPostureItem.GetValue() );
}
-void ScAutoFmtPreview::MakeFonts( USHORT nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
+void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
{
if ( pCurData )
{
@@ -162,7 +162,7 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va
SETONALLFONTS( SetShadow, pShadowedItem->GetValue() )
SETONALLFONTS( SetColor, aColor )
SETONALLFONTS( SetSize, aFontSize )
- SETONALLFONTS( SetTransparent, TRUE )
+ SETONALLFONTS( SetTransparent, sal_True )
#undef SETONALLFONTS
}
@@ -170,9 +170,9 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va
//------------------------------------------------------------------------
-USHORT ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
+sal_uInt16 ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
{
- static const USHORT pnFmtMap[] =
+ static const sal_uInt16 pnFmtMap[] =
{
0, 1, 2, 1, 3,
4, 5, 6, 5, 7,
@@ -206,11 +206,11 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
//------------------------
String cellString;
- BOOL bNumFormat = pCurData->GetIncludeValueFormat();
- ULONG nNum;
+ sal_Bool bNumFormat = pCurData->GetIncludeValueFormat();
+ sal_uLong nNum;
double nVal;
Color* pDummy = NULL;
- USHORT nIndex = static_cast< USHORT >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
+ sal_uInt16 nIndex = static_cast< sal_uInt16 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
switch( nIndex )
{
@@ -249,7 +249,7 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
mknum:
if( bNumFormat )
{
- ScNumFormatAbbrev& rNumFormat = (ScNumFormatAbbrev&)pCurData->GetNumFormat( (USHORT) nNum );
+ ScNumFormatAbbrev& rNumFormat = (ScNumFormatAbbrev&)pCurData->GetNumFormat( (sal_uInt16) nNum );
nNum = rNumFormat.GetFormatIndex( *pNumFmt );
}
else
@@ -261,11 +261,11 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
if ( cellString.Len() > 0 )
{
Size aStrSize;
- USHORT nFmtIndex = GetFormatIndex( nCol, nRow );
+ sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow );
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
- USHORT nRightX = 0;
- BOOL bJustify = pCurData->GetIncludeJustify();
+ sal_uInt16 nRightX = 0;
+ sal_Bool bJustify = pCurData->GetIncludeJustify();
SvxHorJustifyItem aHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY );
SvxCellHorJustify eJustification;
@@ -318,21 +318,21 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
aStrSize = aScriptedText.GetTextSize();
}
- nRightX = (USHORT)( cellRect.GetWidth()
+ nRightX = (sal_uInt16)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
//-----------------------------
// vertikal (immer zentrieren):
//-----------------------------
- aPos.Y() += (mnRowHeight - (USHORT)aStrSize.Height()) / 2;
+ aPos.Y() += (mnRowHeight - (sal_uInt16)aStrSize.Height()) / 2;
//-----------
// horizontal
//-----------
if ( eJustification != SVX_HOR_JUSTIFY_STANDARD )
{
- USHORT nHorPos = (USHORT)
+ sal_uInt16 nHorPos = (sal_uInt16)
((cellRect.GetWidth()-aStrSize.Width())/2);
switch ( eJustification )
@@ -438,7 +438,7 @@ void ScAutoFmtPreview::Init()
SetBorderStyle( WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
maArray.SetUseDiagDoubleClipping( false );
- CalcCellArray( FALSE );
+ CalcCellArray( false );
CalcLineMap();
TypeId aType(TYPE(ScDocShell));
@@ -454,7 +454,7 @@ void ScAutoFmtPreview::Init()
//------------------------------------------------------------------------
-void ScAutoFmtPreview::CalcCellArray( BOOL bFitWidthP )
+void ScAutoFmtPreview::CalcCellArray( sal_Bool bFitWidthP )
{
maArray.SetXOffset( 2 );
maArray.SetAllColWidths( bFitWidthP ? mnDataColWidth2 : mnDataColWidth1 );
@@ -536,7 +536,7 @@ void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ )
Point aTmpPoint;
Rectangle aRect( aTmpPoint, aWndSize );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aVD.SetFont( aFont );
aVD.SetLineColor();
aVD.SetFillColor( aBackCol );
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 8f1e46b46ee5..6b3f694195fd 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -44,7 +44,7 @@
// struct ScConflictsListEntry
//=============================================================================
-bool ScConflictsListEntry::HasSharedAction( ULONG nSharedAction ) const
+bool ScConflictsListEntry::HasSharedAction( sal_uLong nSharedAction ) const
{
ScChangeActionList::const_iterator aEnd = maSharedActions.end();
for ( ScChangeActionList::const_iterator aItr = maSharedActions.begin(); aItr != aEnd; ++aItr )
@@ -58,7 +58,7 @@ bool ScConflictsListEntry::HasSharedAction( ULONG nSharedAction ) const
return false;
}
-bool ScConflictsListEntry::HasOwnAction( ULONG nOwnAction ) const
+bool ScConflictsListEntry::HasOwnAction( sal_uLong nOwnAction ) const
{
ScChangeActionList::const_iterator aEnd = maOwnActions.end();
for ( ScChangeActionList::const_iterator aItr = maOwnActions.begin(); aItr != aEnd; ++aItr )
@@ -77,7 +77,7 @@ bool ScConflictsListEntry::HasOwnAction( ULONG nOwnAction ) const
// class ScConflictsListHelper
//=============================================================================
-bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction )
+bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction )
{
ScConflictsList::const_iterator aEnd = rConflictsList.end();
for ( ScConflictsList::const_iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr )
@@ -91,7 +91,7 @@ bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, ULONG
return false;
}
-ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsList& rConflictsList, ULONG nSharedAction )
+ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsList& rConflictsList, sal_uLong nSharedAction )
{
ScConflictsList::iterator aEnd = rConflictsList.end();
for ( ScConflictsList::iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr )
@@ -105,7 +105,7 @@ ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsLi
return NULL;
}
-ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& rConflictsList, ULONG nOwnAction )
+ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& rConflictsList, sal_uLong nOwnAction )
{
ScConflictsList::iterator aEnd = rConflictsList.end();
for ( ScConflictsList::iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr )
@@ -165,8 +165,8 @@ void ScConflictsListHelper::TransformConflictsList( ScConflictsList& rConflictsL
// class ScConflictsFinder
//=============================================================================
-ScConflictsFinder::ScConflictsFinder( ScChangeTrack* pTrack, ULONG nStartShared, ULONG nEndShared,
- ULONG nStartOwn, ULONG nEndOwn, ScConflictsList& rConflictsList )
+ScConflictsFinder::ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared,
+ sal_uLong nStartOwn, sal_uLong nEndOwn, ScConflictsList& rConflictsList )
:mpTrack( pTrack )
,mnStartShared( nStartShared )
,mnEndShared( nEndShared )
@@ -216,7 +216,7 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct
return NULL;
}
-ScConflictsListEntry* ScConflictsFinder::GetEntry( ULONG nSharedAction, const ScChangeActionList& rOwnActions )
+ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions )
{
// try to get a list entry which already contains the shared action
ScConflictsListEntry* pEntry = ScConflictsListHelper::GetSharedActionEntry( mrConflictsList, nSharedAction );
@@ -460,7 +460,7 @@ ScConflictsDlg::ScConflictsDlg( Window* pParent, ScViewData* pViewData, ScDocume
aHeader += maStrTitleDate;
maLbConflicts.InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HIB_LEFT | HIB_LEFTIMAGE | HIB_VCENTER );
- maLbConflicts.SetWindowBits( WB_HASLINES | WB_CLIPCHILDREN | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL );
+ maLbConflicts.SetStyle( maLbConflicts.GetStyle() | WB_HASLINES | WB_CLIPCHILDREN | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL );
maLbConflicts.SetSelectionMode( MULTIPLE_SELECTION );
maLbConflicts.SetHighlightRange();
@@ -512,7 +512,7 @@ String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocumen
if ( pAction && pDoc )
{
String aDesc;
- pAction->GetDescription( aDesc, pDoc, TRUE, false );
+ pAction->GetDescription( aDesc, pDoc, sal_True, false );
aString += aDesc;
aString += '\t';
@@ -528,7 +528,7 @@ String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocumen
DateTime aDateTime = pAction->GetDateTime();
aString += ScGlobal::pLocaleData->getDate( aDateTime );
aString += ' ';
- aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE );
+ aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
aString += '\t';
}
@@ -552,7 +552,7 @@ void ScConflictsDlg::HandleListBoxSelection( bool bSelectHandle )
{
if ( bSelectHandle )
{
- maLbConflicts.SelectAll( FALSE );
+ maLbConflicts.SelectAll( false );
}
if ( !maLbConflicts.IsSelected( pRootEntry ) )
{
@@ -608,7 +608,7 @@ IMPL_LINK( ScConflictsDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
ScTabView* pTabView = mpViewData->GetView();
pTabView->DoneBlockMode();
- BOOL bContMark = FALSE;
+ sal_Bool bContMark = false;
SvLBoxEntry* pEntry = maLbConflicts.FirstSelected();
while ( pEntry )
{
@@ -624,9 +624,9 @@ IMPL_LINK( ScConflictsDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
const ScBigRange& rBigRange = ( static_cast< const ScChangeAction* >( pAction ) )->GetBigRange();
if ( rBigRange.IsValid( mpOwnDoc ) )
{
- BOOL bSetCursor = !maLbConflicts.NextSelected( pEntry );
+ sal_Bool bSetCursor = !maLbConflicts.NextSelected( pEntry );
pTabView->MarkRange( rBigRange.MakeRange(), bSetCursor, bContMark );
- bContMark = TRUE;
+ bContMark = sal_True;
}
}
}
@@ -681,9 +681,9 @@ void ScConflictsDlg::KeepAllHandler( bool bMine )
SetConflictAction( pRootEntry, eConflictAction );
pRootEntry = maLbConflicts.NextSibling( pRootEntry );
}
- maLbConflicts.SetUpdateMode( FALSE );
+ maLbConflicts.SetUpdateMode( false );
maLbConflicts.Clear();
- maLbConflicts.SetUpdateMode( TRUE );
+ maLbConflicts.SetUpdateMode( sal_True );
SetPointer( Pointer( POINTER_ARROW ) );
EndDialog( RET_OK );
}
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.src b/sc/source/ui/miscdlgs/conflictsdlg.src
index 2e7bb6b93503..dd127cebe24b 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.src
+++ b/sc/source/ui/miscdlgs/conflictsdlg.src
@@ -52,12 +52,14 @@ ModalDialog RID_SCDLG_CONFLICTS
};
PushButton BTN_KEEPMINE
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPMINE";
Pos = MAP_APPFONT ( 72 , 145 ) ;
Size = MAP_APPFONT ( 76 , 14 ) ;
Text [ en-US ] = "Keep ~Mine" ;
};
PushButton BTN_KEEPOTHER
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPOTHER";
Pos = MAP_APPFONT ( 190 , 145 ) ;
Size = MAP_APPFONT ( 76 , 14 ) ;
Text [ en-US ] = "Keep ~Other" ;
@@ -69,12 +71,14 @@ ModalDialog RID_SCDLG_CONFLICTS
};
PushButton BTN_KEEPALLMINE
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPALLMINE";
Pos = MAP_APPFONT ( 6 , 172 ) ;
Size = MAP_APPFONT ( 104 , 14 ) ;
Text [ en-US ] = "~Keep All Mine" ;
};
PushButton BTN_KEEPALLOTHERS
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPALLOTHERS";
Pos = MAP_APPFONT ( 116 , 172 ) ;
Size = MAP_APPFONT ( 104 , 14 ) ;
Text [ en-US ] = "Keep ~All Others" ;
diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx
index 8692c8be0b87..e2dea76b26aa 100644
--- a/sc/source/ui/miscdlgs/crdlg.cxx
+++ b/sc/source/ui/miscdlgs/crdlg.cxx
@@ -45,7 +45,7 @@
ScColOrRowDlg::ScColOrRowDlg( Window* pParent,
const String& rStrTitle,
const String& rStrLabel,
- BOOL bColDefault )
+ sal_Bool bColDefault )
: ModalDialog ( pParent, ScResId( RID_SCDLG_COLORROW ) ),
//
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 73f65e48e90f..49fbe93e017f 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -53,9 +53,9 @@
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute()
#define QUERYBOX(m) QueryBox(this,WinBits(WB_YES_NO|WB_DEF_YES),m).Execute()
-const ULONG nEntryDataCol = 0;
-const ULONG nEntryDataRow = 1;
-const ULONG nEntryDataDelim = 2;
+const sal_uLong nEntryDataCol = 0;
+const sal_uLong nEntryDataRow = 1;
+const sal_uLong nEntryDataDelim = 2;
//============================================================================
@@ -109,12 +109,15 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB,
pDoc ( ptrViewData->GetDocument() ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE )
+ bDlgLostFocus ( false )
{
xColNameRanges = pDoc->GetColNameRanges()->Clone();
xRowNameRanges = pDoc->GetRowNameRanges()->Clone();
Init();
FreeResource();
+
+ aRbAssign.SetAccessibleRelationMemberOf(&aEdAssign);
+ aRbAssign2.SetAccessibleRelationMemberOf(&aEdAssign);
}
@@ -196,8 +199,8 @@ void ScColRowNameRangesDlg::Init()
}
else
{
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
aEdAssign.SetText( EMPTY_STRING );
aEdAssign2.SetText( EMPTY_STRING );
}
@@ -229,22 +232,22 @@ void ScColRowNameRangesDlg::Init()
#*
#************************************************************************/
-void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef)
+void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,sal_Bool bRef)
{
theCurData = theCurArea = rLabelRange;
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
SCCOL nCol1 = theCurArea.aStart.Col();
SCCOL nCol2 = theCurArea.aEnd.Col();
SCROW nRow1 = theCurArea.aStart.Row();
SCROW nRow2 = theCurArea.aEnd.Row();
if ( (static_cast<SCCOLROW>(nCol2 - nCol1) >= nRow2 - nRow1) || (nCol1 == 0 && nCol2 == MAXCOL) )
{ // Spaltenkoepfe und Grenzfall gesamte Tabelle
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
if ( nRow2 == MAXROW )
{
if ( nRow1 == 0 )
- bValid = FALSE; // Grenzfall gesamte Tabelle
+ bValid = false; // Grenzfall gesamte Tabelle
else
{ // Head unten, Data oben
theCurData.aStart.SetRow( 0 );
@@ -259,8 +262,8 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef)
}
else
{ // Zeilenkoepfe
- aBtnRowHead.Check( TRUE );
- aBtnColHead.Check( FALSE );
+ aBtnRowHead.Check( sal_True );
+ aBtnColHead.Check( false );
if ( nCol2 == MAXCOL )
{ // Head rechts, Data links
theCurData.aStart.SetCol( 0 );
@@ -329,7 +332,7 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef)
#*
#************************************************************************/
-void ScColRowNameRangesDlg::AdjustColRowData( const ScRange& rDataRange,BOOL bRef)
+void ScColRowNameRangesDlg::AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef)
{
theCurData = rDataRange;
if ( aBtnColHead.IsChecked() )
@@ -416,9 +419,9 @@ void ScColRowNameRangesDlg::SetReference( const ScRange& rRef, ScDocument* /* pD
String aRefStr;
if ( pEdActive == &aEdAssign )
- SetColRowData( rRef, TRUE );
+ SetColRowData( rRef, sal_True );
else
- AdjustColRowData( rRef, TRUE );
+ AdjustColRowData( rRef, sal_True );
aBtnColHead.Enable();
aBtnRowHead.Enable();
aBtnAdd.Enable();
@@ -441,7 +444,7 @@ void ScColRowNameRangesDlg::SetReference( const ScRange& rRef, ScDocument* /* pD
#*
#************************************************************************/
-BOOL ScColRowNameRangesDlg::Close()
+sal_Bool ScColRowNameRangesDlg::Close()
{
return DoClose( ScColRowNameRangesDlgWrapper::GetChildWindowId() );
}
@@ -465,7 +468,7 @@ void ScColRowNameRangesDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -497,14 +500,14 @@ void ScColRowNameRangesDlg::SetActive()
void ScColRowNameRangesDlg::UpdateNames()
{
- aLbRange.SetUpdateMode( FALSE );
+ aLbRange.SetUpdateMode( false );
//-----------------------------------------------------------
aLbRange.Clear();
aRangeMap.clear();
aEdAssign.SetText( EMPTY_STRING );
size_t nCount, j;
- USHORT nPos; //@008 Hilfsvariable q eingefuegt
+ sal_uInt16 nPos; //@008 Hilfsvariable q eingefuegt
SCCOL nCol1;
SCROW nRow1; //Erweiterung fuer Bereichsnamen
@@ -611,7 +614,7 @@ void ScColRowNameRangesDlg::UpdateNames()
delete [] ppSortArray;
}
//-----------------------------------------------------------
- aLbRange.SetUpdateMode( TRUE );
+ aLbRange.SetUpdateMode( sal_True );
aLbRange.Invalidate();
}
@@ -631,14 +634,14 @@ void ScColRowNameRangesDlg::UpdateNames()
#*
#************************************************************************/
-void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, BOOL bColName )
+void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, sal_Bool bColName )
{
ScRangePair* pPair = NULL;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
if ( bFound )
{
@@ -682,7 +685,7 @@ void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, BOOL bColNam
#*
#************************************************************************/
-BOOL ScColRowNameRangesDlg::IsRefInputMode() const
+sal_Bool ScColRowNameRangesDlg::IsRefInputMode() const
{
return (pEdActive != NULL);
}
@@ -772,8 +775,8 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG )
{
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
ScRange aRange1, aRange2;
- BOOL bOk1;
- if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != FALSE
+ sal_Bool bOk1;
+ if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != false
&& ((aRange2.ParseAny( aNewData, pDoc, eConv ) & SCA_VALID) == SCA_VALID) )
{
theCurArea = aRange1;
@@ -800,8 +803,8 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG )
aBtnAdd.Disable();
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
aEdAssign2.SetText( EMPTY_STRING );
theCurArea = ScRange();
theCurData = theCurArea;
@@ -838,20 +841,20 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
{
String aRangeStr = aLbRange.GetSelectEntry();
- USHORT nSelectPos = aLbRange.GetSelectEntryPos();
- BOOL bColName =
- ((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
+ sal_uInt16 nSelectPos = aLbRange.GetSelectEntryPos();
+ sal_Bool bColName =
+ ((sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
if (itr == aRangeMap.end())
return 0;
const ScRange& rRange = itr->second;
ScRangePair* pPair = NULL;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
if ( bFound )
{
String aStrDelMsg = ScGlobal::GetRscString( STR_QUERY_DELENTRY );
@@ -869,7 +872,7 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
delete pPair;
UpdateNames();
- USHORT nCnt = aLbRange.GetEntryCount();
+ sal_uInt16 nCnt = aLbRange.GetEntryCount();
if ( nSelectPos >= nCnt )
{
if ( nCnt )
@@ -879,7 +882,7 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
}
aLbRange.SelectEntryPos( nSelectPos );
if ( nSelectPos &&
- (ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
+ (sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
aLbRange.SelectEntryPos( --nSelectPos ); // ---Zeile---
aLbRange.GrabFocus();
@@ -887,8 +890,8 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
theCurArea = theCurData = ScRange();
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
aEdAssign2.SetText( EMPTY_STRING );
Range1SelectHdl( 0 );
}
@@ -915,11 +918,11 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG )
{
- USHORT nSelectPos = aLbRange.GetSelectEntryPos();
- USHORT nCnt = aLbRange.GetEntryCount();
- USHORT nMoves = 0;
+ sal_uInt16 nSelectPos = aLbRange.GetSelectEntryPos();
+ sal_uInt16 nCnt = aLbRange.GetEntryCount();
+ sal_uInt16 nMoves = 0;
while ( nSelectPos < nCnt
- && (ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
+ && (sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
{ // skip Delimiter
++nMoves;
aLbRange.SelectEntryPos( ++nSelectPos );
@@ -945,8 +948,8 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG )
NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
if ( itr != aRangeMap.end() )
{
- BOOL bColName =
- ((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
+ sal_Bool bColName =
+ ((sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
UpdateRangeData( itr->second, bColName );
aBtnAdd.Disable();
aBtnRemove.Enable();
@@ -1001,14 +1004,14 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG )
IMPL_LINK( ScColRowNameRangesDlg, Range1DataModifyHdl, void *, EMPTYARG )
{
String aNewArea( aEdAssign.GetText() );
- BOOL bValid = FALSE;
+ sal_Bool bValid = false;
if ( aNewArea.Len() > 0 )
{
ScRange aRange;
if ( (aRange.ParseAny( aNewArea, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID) == SCA_VALID )
{
SetColRowData( aRange );
- bValid = TRUE;
+ bValid = sal_True;
}
}
if ( bValid )
@@ -1089,8 +1092,8 @@ IMPL_LINK( ScColRowNameRangesDlg, ColClickHdl, void *, EMPTYARG )
{
if ( !aBtnColHead.GetSavedValue() )
{
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
if ( theCurArea.aStart.Row() == 0 && theCurArea.aEnd.Row() == MAXROW )
{
theCurArea.aEnd.SetRow( MAXROW - 1 );
@@ -1127,8 +1130,8 @@ IMPL_LINK( ScColRowNameRangesDlg, RowClickHdl, void *, EMPTYARG )
{
if ( !aBtnRowHead.GetSavedValue() )
{
- aBtnRowHead.Check( TRUE );
- aBtnColHead.Check( FALSE );
+ aBtnRowHead.Check( sal_True );
+ aBtnColHead.Check( false );
if ( theCurArea.aStart.Col() == 0 && theCurArea.aEnd.Col() == MAXCOL )
{
theCurArea.aEnd.SetCol( MAXCOL - 1 );
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index ed9a01fa5ec6..10ef3a3b7dda 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -81,7 +81,7 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
nTab = pViewData->GetTabNo();
//if there is no selection
if ((nStartCol == nEndCol) && (nStartRow == nEndRow))
- bNoSelection = TRUE;
+ bNoSelection = true;
if (bNoSelection)
{
@@ -285,7 +285,7 @@ void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit)
{
if ( pEdit->IsModified() )
- aBtnRestore.Enable( TRUE );
+ aBtnRestore.Enable( true );
return 0;
}
@@ -295,7 +295,7 @@ IMPL_LINK( ScDataFormDlg, Impl_NewHdl, PushButton*, EMPTYARG )
ScDocShell* pDocSh = pViewData->GetDocShell();
if ( pDoc )
{
- sal_Bool bHasData = sal_False;
+ sal_Bool bHasData = false;
for(sal_uInt16 i = 0; i < aColLength; i++)
if (pEdits[i])
if ( pEdits[i]->GetText().Len() != 0 )
@@ -396,19 +396,19 @@ void ScDataFormDlg::SetButtonState()
{
if ( aCurrentRow > nEndRow )
{
- aBtnDelete.Enable( FALSE );
- aBtnLast.Enable( TRUE );
- aBtnNext.Enable( FALSE );
+ aBtnDelete.Enable( false );
+ aBtnLast.Enable( true );
+ aBtnNext.Enable( false );
}
else
{
- aBtnDelete.Enable( TRUE );
- aBtnNext.Enable( TRUE );
+ aBtnDelete.Enable( true );
+ aBtnNext.Enable( true );
}
if ( 1 == aCurrentRow )
- aBtnLast.Enable( FALSE );
+ aBtnLast.Enable( false );
- aBtnRestore.Enable( FALSE );
+ aBtnRestore.Enable( false );
if ( pEdits )
pEdits[0]->GrabFocus();
}
diff --git a/sc/source/ui/miscdlgs/delcldlg.cxx b/sc/source/ui/miscdlgs/delcldlg.cxx
index 2537db56ed42..a036dbf22a16 100644
--- a/sc/source/ui/miscdlgs/delcldlg.cxx
+++ b/sc/source/ui/miscdlgs/delcldlg.cxx
@@ -40,11 +40,11 @@
#include "miscdlgs.hrc"
-static BYTE nDelItemChecked=0;
+static sal_uInt8 nDelItemChecked=0;
//==================================================================
-ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove ) :
+ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DELCELL ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index 7ce7d492aa3a..d824067e24ba 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -42,15 +42,15 @@
//==================================================================
-BOOL ScDeleteContentsDlg::bPreviousAllCheck = FALSE;
-USHORT ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
+sal_Bool ScDeleteContentsDlg::bPreviousAllCheck = false;
+sal_uInt16 ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
IDF_NOTE | IDF_FORMULA |
IDF_VALUE);
//-----------------------------------------------------------------------
ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
- USHORT nCheckDefaults ) :
+ sal_uInt16 nCheckDefaults ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DELCONT ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
@@ -65,12 +65,12 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
- bObjectsDisabled( FALSE )
+ bObjectsDisabled( false )
{
if ( nCheckDefaults != 0 )
{
ScDeleteContentsDlg::nPreviousChecks = nCheckDefaults;
- ScDeleteContentsDlg::bPreviousAllCheck = FALSE;
+ ScDeleteContentsDlg::bPreviousAllCheck = false;
}
aBtnDelAll.Check ( ScDeleteContentsDlg::bPreviousAllCheck );
@@ -99,7 +99,7 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
//------------------------------------------------------------------------
-USHORT ScDeleteContentsDlg::GetDelContentsCmdBits() const
+sal_uInt16 ScDeleteContentsDlg::GetDelContentsCmdBits() const
{
ScDeleteContentsDlg::nPreviousChecks = 0;
@@ -127,7 +127,7 @@ USHORT ScDeleteContentsDlg::GetDelContentsCmdBits() const
//------------------------------------------------------------------------
-void ScDeleteContentsDlg::DisableChecks( BOOL bDelAllChecked )
+void ScDeleteContentsDlg::DisableChecks( sal_Bool bDelAllChecked )
{
if ( bDelAllChecked )
{
@@ -158,8 +158,8 @@ void ScDeleteContentsDlg::DisableChecks( BOOL bDelAllChecked )
void ScDeleteContentsDlg::DisableObjects()
{
- bObjectsDisabled = TRUE;
- aBtnDelObjects.Check(FALSE);
+ bObjectsDisabled = sal_True;
+ aBtnDelObjects.Check(false);
aBtnDelObjects.Disable();
}
diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx
index 2b544a1c5d7c..67b297c2a180 100644
--- a/sc/source/ui/miscdlgs/filldlg.cxx
+++ b/sc/source/ui/miscdlgs/filldlg.cxx
@@ -62,10 +62,20 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent,
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir )
+ sal_uInt16 nPossDir )
: ModalDialog ( pParent, ScResId( RID_SCDLG_FILLSERIES ) ),
+ aFtStartVal ( this, ScResId( FT_START_VALUE ) ),
+ aEdStartVal ( this, ScResId( ED_START_VALUES ) ),
+ aStartStrVal ( aStartStr),
+
+ aFtEndVal ( this, ScResId( FT_END_VALUE ) ),
+ aEdEndVal ( this, ScResId( ED_END_VALUES ) ),
+
+ aFtIncrement ( this, ScResId( FT_INCREMENT ) ),
+ aEdIncrement ( this, ScResId( ED_INCREMENT ) ),
+
aFlDirection ( this, ScResId( FL_DIRECTION ) ),
aBtnDown ( this, ScResId( BTN_BOTTOM ) ),
aBtnRight ( this, ScResId( BTN_RIGHT ) ),
@@ -84,14 +94,6 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent,
aBtnMonth ( this, ScResId( BTN_MONTH ) ),
aBtnYear ( this, ScResId( BTN_YEAR ) ),
- aFtStartVal ( this, ScResId( FT_START_VALUE ) ),
- aEdStartVal ( this, ScResId( ED_START_VALUES ) ),
- aStartStrVal ( aStartStr),
- aFtEndVal ( this, ScResId( FT_END_VALUE ) ),
- aEdEndVal ( this, ScResId( ED_END_VALUES ) ),
- aFtIncrement ( this, ScResId( FT_INCREMENT ) ),
- aEdIncrement ( this, ScResId( ED_INCREMENT ) ),
-
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
@@ -116,7 +118,7 @@ ScFillSeriesDlg::~ScFillSeriesDlg()
//----------------------------------------------------------------------------
-void ScFillSeriesDlg::SetEdStartValEnabled(BOOL bFlag)
+void ScFillSeriesDlg::SetEdStartValEnabled(sal_Bool bFlag)
{
bStartValFlag=bFlag;
if(bFlag)
@@ -133,7 +135,7 @@ void ScFillSeriesDlg::SetEdStartValEnabled(BOOL bFlag)
//----------------------------------------------------------------------------
-void ScFillSeriesDlg::Init( USHORT nPossDir )
+void ScFillSeriesDlg::Init( sal_uInt16 nPossDir )
{
aBtnOk.SetClickHdl ( LINK( this, ScFillSeriesDlg, OKHdl ) );
aBtnArithmetic.SetClickHdl ( LINK( this, ScFillSeriesDlg, DisableHdl ) );
@@ -222,7 +224,7 @@ void ScFillSeriesDlg::Init( USHORT nPossDir )
rDoc.GetFormatTable()->GetInputLineString( fEndVal, 0, aEndTxt );
aEdEndVal.SetText( aEndTxt );
- bStartValFlag=FALSE;
+ bStartValFlag=false;
aFlSep1.SetStyle( aFlSep1.GetStyle() | WB_VERT );
aFlSep2.SetStyle( aFlSep2.GetStyle() | WB_VERT );
@@ -231,15 +233,15 @@ void ScFillSeriesDlg::Init( USHORT nPossDir )
//----------------------------------------------------------------------------
-BOOL ScFillSeriesDlg::CheckStartVal()
+sal_Bool ScFillSeriesDlg::CheckStartVal()
{
- BOOL bValOk = FALSE;
+ sal_Bool bValOk = false;
String aStr( aEdStartVal.GetText() );
if ( aStr.Len() == 0 || aBtnAutoFill.IsChecked())
{
fStartVal = MAXDOUBLE;
- bValOk = TRUE;
+ bValOk = sal_True;
}
else
{
@@ -252,7 +254,7 @@ BOOL ScFillSeriesDlg::CheckStartVal()
//----------------------------------------------------------------------------
-BOOL ScFillSeriesDlg::CheckIncrementVal()
+sal_Bool ScFillSeriesDlg::CheckIncrementVal()
{
sal_uInt32 nKey = 0;
String aStr( aEdIncrement.GetText() );
@@ -263,15 +265,15 @@ BOOL ScFillSeriesDlg::CheckIncrementVal()
//----------------------------------------------------------------------------
-BOOL ScFillSeriesDlg::CheckEndVal()
+sal_Bool ScFillSeriesDlg::CheckEndVal()
{
- BOOL bValOk = FALSE;
+ sal_Bool bValOk = false;
String aStr( aEdEndVal.GetText() );
if ( aStr.Len() == 0 )
{
fEndVal = (fIncrement < 0) ? -MAXDOUBLE : MAXDOUBLE;
- bValOk = TRUE;
+ bValOk = sal_True;
}
else
{
@@ -342,21 +344,21 @@ IMPL_LINK( ScFillSeriesDlg, OKHdl, void *, EMPTYARG )
else if ( aBtnMonth.IsChecked() ) theFillDateCmd = FILL_MONTH;
else if ( aBtnYear.IsChecked() ) theFillDateCmd = FILL_YEAR;
- BOOL bAllOk = TRUE;
+ sal_Bool bAllOk = sal_True;
Edit* pEdWrong = NULL;
if ( !CheckStartVal() )
{
- bAllOk = FALSE;
+ bAllOk = false;
pEdWrong = &aEdStartVal;
}
else if ( !CheckIncrementVal() )
{
- bAllOk = FALSE;
+ bAllOk = false;
pEdWrong = &aEdIncrement;
}
else if ( !CheckEndVal() )
{
- bAllOk = FALSE;
+ bAllOk = false;
pEdWrong = &aEdEndVal;
}
if ( bAllOk )
diff --git a/sc/source/ui/miscdlgs/groupdlg.cxx b/sc/source/ui/miscdlgs/groupdlg.cxx
index 593a63934e03..eeda6abd96d9 100644
--- a/sc/source/ui/miscdlgs/groupdlg.cxx
+++ b/sc/source/ui/miscdlgs/groupdlg.cxx
@@ -43,9 +43,9 @@
//==================================================================
ScGroupDlg::ScGroupDlg( Window* pParent,
- USHORT nResId,
- BOOL bUngroup,
- BOOL bRows ) :
+ sal_uInt16 nResId,
+ sal_Bool bUngroup,
+ sal_Bool bRows ) :
ModalDialog ( pParent, ScResId( nResId ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
@@ -69,7 +69,7 @@ ScGroupDlg::ScGroupDlg( Window* pParent,
//------------------------------------------------------------------------
-BOOL ScGroupDlg::GetColsChecked() const
+sal_Bool ScGroupDlg::GetColsChecked() const
{
return aBtnCols.IsChecked();
}
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index c44833102bb7..5df31766517f 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -60,7 +60,7 @@
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute();
-inline void EnableDisable( Window& rWin, BOOL bEnable )
+inline void EnableDisable( Window& rWin, sal_Bool bEnable )
{
if (bEnable)
rWin.Enable();
@@ -103,16 +103,17 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind
aOkButton.SetClickHdl(LINK( this, ScHighlightChgDlg, OKBtnHdl));
aHighlightBox.SetClickHdl(LINK( this, ScHighlightChgDlg, HighLightHandle ));
aFilterCtr.SetRefHdl(LINK( this, ScHighlightChgDlg, RefHandle ));
- aFilterCtr.HideRange(FALSE);
+ aFilterCtr.HideRange(false);
aFilterCtr.Show();
- SetDispatcherLock( TRUE );
+ SetDispatcherLock( true );
Init();
}
+
ScHighlightChgDlg::~ScHighlightChgDlg()
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
}
void ScHighlightChgDlg::Init()
@@ -128,7 +129,7 @@ void ScHighlightChgDlg::Init()
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
aFilterCtr.ClearAuthors();
ScStrCollection aUserColl=pChanges->GetUserCollection();
- for(USHORT i=0;i<aUserColl.GetCount();i++)
+ for(sal_uInt16 i=0;i<aUserColl.GetCount();i++)
aFilterCtr.InsertAuthor(aUserColl[i]->GetString());
}
@@ -143,7 +144,7 @@ void ScHighlightChgDlg::Init()
aFilterCtr.SetFirstTime(aChangeViewSet.GetTheFirstDateTime());
aFilterCtr.SetLastDate(aChangeViewSet.GetTheLastDateTime());
aFilterCtr.SetLastTime(aChangeViewSet.GetTheLastDateTime());
- aFilterCtr.SetDateMode((USHORT)aChangeViewSet.GetTheDateMode());
+ aFilterCtr.SetDateMode((sal_uInt16)aChangeViewSet.GetTheDateMode());
aFilterCtr.CheckAuthor(aChangeViewSet.HasAuthor());
aFilterCtr.CheckComment(aChangeViewSet.HasComment());
aFilterCtr.SetComment(aChangeViewSet.GetTheComment());
@@ -170,7 +171,7 @@ void ScHighlightChgDlg::Init()
pRangeEntry->Format( aRefStr, ABS_DREF3D, pDoc );
aFilterCtr.SetRange(aRefStr);
}
- aFilterCtr.Enable(TRUE,TRUE);
+ aFilterCtr.Enable(sal_True,sal_True);
HighLightHandle(&aHighlightBox);
}
@@ -192,12 +193,12 @@ void ScHighlightChgDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
}
//----------------------------------------------------------------------------
-BOOL ScHighlightChgDlg::Close()
+sal_Bool ScHighlightChgDlg::Close()
{
return DoClose( ScHighlightChgDlgWrapper::GetChildWindowId() );
}
-void ScHighlightChgDlg::RefInputDone( BOOL bForced)
+void ScHighlightChgDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
if(bForced || !aRbAssign.IsVisible())
@@ -213,7 +214,7 @@ void ScHighlightChgDlg::SetActive()
{
}
-BOOL ScHighlightChgDlg::IsRefInputMode() const
+sal_Bool ScHighlightChgDlg::IsRefInputMode() const
{
return aEdAssign.IsVisible();
}
@@ -224,13 +225,13 @@ IMPL_LINK( ScHighlightChgDlg, HighLightHandle, CheckBox*, pCb )
{
if(aHighlightBox.IsChecked())
{
- aFilterCtr.Enable(TRUE,TRUE);
+ aFilterCtr.Enable(sal_True,sal_True);
aCbAccept.Enable();
aCbReject.Enable();
}
else
{
- aFilterCtr.Disable(TRUE);
+ aFilterCtr.Disable(sal_True);
aCbAccept.Disable();
aCbReject.Disable();
}
@@ -242,7 +243,7 @@ IMPL_LINK( ScHighlightChgDlg, RefHandle, SvxTPFilter*, pRef )
{
if(pRef!=NULL)
{
- SetDispatcherLock( TRUE );
+ SetDispatcherLock( true );
aEdAssign.Show();
aRbAssign.Show();
aEdAssign.SetText(aFilterCtr.GetRange());
diff --git a/sc/source/ui/miscdlgs/highred.src b/sc/source/ui/miscdlgs/highred.src
index 259afee9a5be..5c86c5863185 100644
--- a/sc/source/ui/miscdlgs/highred.src
+++ b/sc/source/ui/miscdlgs/highred.src
@@ -29,7 +29,7 @@
ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
{
OutputSize = TRUE ;
- HelpId = FID_CHG_ACCEPT ;
+ HelpId = CMD_FID_CHG_ACCEPT ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 318 , 148 ) ;
@@ -38,6 +38,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
// Dieser Dialog hat einen Cancel-Button !
CheckBox CB_HIGHLIGHT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_HIGHLIGHT_CHANGES:CB_HIGHLIGHT";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
TabStop = TRUE ;
@@ -51,6 +52,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
CheckBox CB_HIGHLIGHT_ACCEPT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_HIGHLIGHT_CHANGES:CB_HIGHLIGHT_ACCEPT";
Pos = MAP_APPFONT ( 12 , 118 ) ;
Size = MAP_APPFONT ( 246 , 10 ) ;
TabStop = TRUE ;
@@ -58,6 +60,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
CheckBox CB_HIGHLIGHT_REJECT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_HIGHLIGHT_CHANGES:CB_HIGHLIGHT_REJECT";
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 246 , 10 ) ;
TabStop = TRUE ;
@@ -84,6 +87,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_HIGHLIGHT_CHANGES:ED_ASSIGN";
Hide = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 119 ) ;
@@ -92,10 +96,11 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_HIGHLIGHT_CHANGES:RB_ASSIGN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 118 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
- TabStop = FALSE ;
+ TabStop = TRUE;
QuickHelpText [ en-US ] = "Minimize/Maximize" ;
};
Text [ en-US ] = "Show Changes" ;
diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx
index 32cba4161088..237d9423990c 100644
--- a/sc/source/ui/miscdlgs/inscldlg.cxx
+++ b/sc/source/ui/miscdlgs/inscldlg.cxx
@@ -40,11 +40,11 @@
#include "miscdlgs.hrc"
-static BYTE nInsItemChecked=0;
+static sal_uInt8 nInsItemChecked=0;
//==================================================================
-ScInsertCellDlg::ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove) :
+ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) :
ModalDialog ( pParent, ScResId( RID_SCDLG_INSCELL ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index a9eea25d9c58..0e2546f5db2f 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -42,18 +42,18 @@
//==================================================================
-BOOL ScInsertContentsDlg::bPreviousAllCheck = TRUE;
-USHORT ScInsertContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
+sal_Bool ScInsertContentsDlg::bPreviousAllCheck = sal_True;
+sal_uInt16 ScInsertContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
IDF_NOTE | IDF_FORMULA |
IDF_ATTRIB | IDF_OBJECTS);
-USHORT ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
-USHORT ScInsertContentsDlg::nPreviousChecks2 = 0;
-USHORT ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd
+sal_uInt16 ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
+sal_uInt16 ScInsertContentsDlg::nPreviousChecks2 = 0;
+sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd
//-----------------------------------------------------------------------
ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
- USHORT nCheckDefaults,
+ sal_uInt16 nCheckDefaults,
const String* pStrTitle )
: ModalDialog ( pParent, ScResId( RID_SCDLG_INSCONT ) ),
@@ -86,11 +86,11 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
- bOtherDoc ( FALSE ),
- bFillMode ( FALSE ),
- bChangeTrack ( FALSE ),
- bMoveDownDisabled( FALSE ),
- bMoveRightDisabled( FALSE )
+ bOtherDoc ( false ),
+ bFillMode ( false ),
+ bChangeTrack ( false ),
+ bMoveDownDisabled( false ),
+ bMoveRightDisabled( false )
{
if ( pStrTitle )
SetText( *pStrTitle );
@@ -98,7 +98,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
if ( nCheckDefaults != 0 )
{
ScInsertContentsDlg::nPreviousChecks = nCheckDefaults;
- ScInsertContentsDlg::bPreviousAllCheck = FALSE;
+ ScInsertContentsDlg::bPreviousAllCheck = false;
ScInsertContentsDlg::nPreviousChecks2 = 0;
}
@@ -120,18 +120,18 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
switch( ScInsertContentsDlg::nPreviousFormulaChecks )
{
- case PASTE_NOFUNC: aRbNoOp.Check(TRUE); break;
- case PASTE_ADD: aRbAdd.Check(TRUE); break;
- case PASTE_SUB: aRbSub.Check(TRUE); break;
- case PASTE_MUL: aRbMul.Check(TRUE); break;
- case PASTE_DIV: aRbDiv.Check(TRUE); break;
+ case PASTE_NOFUNC: aRbNoOp.Check(sal_True); break;
+ case PASTE_ADD: aRbAdd.Check(sal_True); break;
+ case PASTE_SUB: aRbSub.Check(sal_True); break;
+ case PASTE_MUL: aRbMul.Check(sal_True); break;
+ case PASTE_DIV: aRbDiv.Check(sal_True); break;
}
switch( ScInsertContentsDlg::nPreviousMoveMode )
{
- case INS_NONE: aRbMoveNone.Check(TRUE); break;
- case INS_CELLSDOWN: aRbMoveDown.Check(TRUE); break;
- case INS_CELLSRIGHT: aRbMoveRight.Check(TRUE); break;
+ case INS_NONE: aRbMoveNone.Check(sal_True); break;
+ case INS_CELLSDOWN: aRbMoveDown.Check(sal_True); break;
+ case INS_CELLSRIGHT: aRbMoveRight.Check(sal_True); break;
}
aBtnSkipEmptyCells.Check( ( ScInsertContentsDlg::nPreviousChecks2 & INS_CONT_NOEMPTY ) != 0);
@@ -152,7 +152,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
//------------------------------------------------------------------------
-USHORT ScInsertContentsDlg::GetInsContentsCmdBits() const
+sal_uInt16 ScInsertContentsDlg::GetInsContentsCmdBits() const
{
ScInsertContentsDlg::nPreviousChecks = 0;
@@ -192,7 +192,7 @@ InsCellCmd ScInsertContentsDlg::GetMoveMode()
//------------------------------------------------------------------------
-void ScInsertContentsDlg::DisableChecks( BOOL bInsAllChecked )
+void ScInsertContentsDlg::DisableChecks( sal_Bool bInsAllChecked )
{
if ( bInsAllChecked )
{
@@ -243,7 +243,7 @@ void ScInsertContentsDlg::TestModes()
aFlFrame.Disable();
aBtnInsAll.Disable();
- DisableChecks(TRUE);
+ DisableChecks(sal_True);
}
else
{
@@ -267,52 +267,52 @@ void ScInsertContentsDlg::TestModes()
}
}
-void ScInsertContentsDlg::SetOtherDoc( BOOL bSet )
+void ScInsertContentsDlg::SetOtherDoc( sal_Bool bSet )
{
if ( bSet != bOtherDoc )
{
bOtherDoc = bSet;
TestModes();
if ( bSet )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
-void ScInsertContentsDlg::SetFillMode( BOOL bSet )
+void ScInsertContentsDlg::SetFillMode( sal_Bool bSet )
{
if ( bSet != bFillMode )
{
bFillMode = bSet;
TestModes();
if ( bSet )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
-void ScInsertContentsDlg::SetChangeTrack( BOOL bSet )
+void ScInsertContentsDlg::SetChangeTrack( sal_Bool bSet )
{
if ( bSet != bChangeTrack )
{
bChangeTrack = bSet;
TestModes();
if ( bSet )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
void ScInsertContentsDlg::SetCellShiftDisabled( int nDisable )
{
- BOOL bDown = ((nDisable & SC_CELL_SHIFT_DISABLE_DOWN) != 0);
- BOOL bRight = ((nDisable & SC_CELL_SHIFT_DISABLE_RIGHT) != 0);
+ sal_Bool bDown = ((nDisable & SC_CELL_SHIFT_DISABLE_DOWN) != 0);
+ sal_Bool bRight = ((nDisable & SC_CELL_SHIFT_DISABLE_RIGHT) != 0);
if ( bDown != bMoveDownDisabled || bRight != bMoveRightDisabled )
{
bMoveDownDisabled = bDown;
bMoveRightDisabled = bRight;
TestModes();
if ( bMoveDownDisabled && aRbMoveDown.IsChecked() )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
if ( bMoveRightDisabled && aRbMoveRight.IsChecked() )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
@@ -354,7 +354,7 @@ ScInsertContentsDlg::~ScInsertContentsDlg()
}
}
-USHORT ScInsertContentsDlg::GetFormulaCmdBits() const
+sal_uInt16 ScInsertContentsDlg::GetFormulaCmdBits() const
{
ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
if(aRbAdd.IsChecked())
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 132ba4282e6a..3a3e0726705e 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -70,9 +70,10 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT
: ModalDialog ( pParent, ScResId( RID_SCDLG_INSERT_TABLE ) ),
//
+ aFlPos ( this, ScResId( FL_POSITION ) ),
aBtnBefore ( this, ScResId( RB_BEFORE ) ),
aBtnBehind ( this, ScResId( RB_BEHIND ) ),
- aFlPos ( this, ScResId( FL_POSITION ) ),
+ aFlTable ( this, ScResId( FL_TABLE ) ),
aBtnNew ( this, ScResId( RB_NEW ) ),
aBtnFromFile ( this, ScResId( RB_FROMFILE ) ),
aFtCount ( this, ScResId( FT_COUNT ) ),
@@ -83,7 +84,6 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT
aFtPath ( this, ScResId( FT_PATH ) ),
aBtnBrowse ( this, ScResId( BTN_BROWSE ) ),
aBtnLink ( this, ScResId( CB_LINK ) ),
- aFlTable ( this, ScResId( FL_TABLE ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
@@ -101,6 +101,7 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT
#endif /* ENABLE_LAYOUT */
Init_Impl( bFromFile );
FreeResource();
+ aLbTables.SetAccessibleName(aBtnFromFile.GetText());
}
//------------------------------------------------------------------------
@@ -226,7 +227,7 @@ void ScInsertTableDlg::SetFromTo_Impl()
void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
{
- aLbTables.SetUpdateMode( FALSE );
+ aLbTables.SetUpdateMode( false );
aLbTables.Clear();
if ( pSrcDoc )
@@ -241,7 +242,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
}
}
- aLbTables.SetUpdateMode( TRUE );
+ aLbTables.SetUpdateMode( sal_True );
if(aLbTables.GetEntryCount()==1)
aLbTables.SelectEntryPos(0);
@@ -249,7 +250,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
//------------------------------------------------------------------------
-const String* ScInsertTableDlg::GetFirstTable( USHORT* pN )
+const String* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN )
{
const String* pStr = NULL;
@@ -272,7 +273,7 @@ const String* ScInsertTableDlg::GetFirstTable( USHORT* pN )
//------------------------------------------------------------------------
-const String* ScInsertTableDlg::GetNextTable( USHORT* pN )
+const String* ScInsertTableDlg::GetNextTable( sal_uInt16* pN )
{
const String* pStr = NULL;
@@ -393,7 +394,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
if ( pDocShTables )
pDocShTables->DoClose(); // delete passiert beim Zuweisen auf die Ref
- pMed->UseInteractionHandler( TRUE ); // to enable the filter options dialog
+ pMed->UseInteractionHandler( sal_True ); // to enable the filter options dialog
pDocShTables = new ScDocShell;
aDocShTablesRef = pDocShTables;
@@ -403,7 +404,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
pDocShTables->DoLoad( pMed );
SetPointer( aOldPtr );
- ULONG nErr = pDocShTables->GetErrorCode();
+ sal_uLong nErr = pDocShTables->GetErrorCode();
if ( nErr )
ErrorHandler::HandleError( nErr ); // auch Warnings
diff --git a/sc/source/ui/miscdlgs/instbdlg.src b/sc/source/ui/miscdlgs/instbdlg.src
index 20d3049bb501..7c5b90731b05 100644
--- a/sc/source/ui/miscdlgs/instbdlg.src
+++ b/sc/source/ui/miscdlgs/instbdlg.src
@@ -28,6 +28,7 @@
#include "instbdlg.hrc"
ModalDialog RID_SCDLG_INSERT_TABLE
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_INSERT_TABLE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 274 , 190 ) ;
@@ -58,6 +59,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
RadioButton RB_BEFORE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_BEFORE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
TabStop = TRUE ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
RadioButton RB_BEHIND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_BEHIND";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
TabStop = TRUE ;
@@ -78,6 +81,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
RadioButton RB_NEW
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_NEW";
Pos = MAP_APPFONT ( 12 , 55 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
Text [ en-US ] = "~New sheet" ;
@@ -90,6 +94,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
NumericField NF_COUNT
{
+ HelpID = "sc:NumericField:RID_SCDLG_INSERT_TABLE:NF_COUNT";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 66 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -108,18 +113,21 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
Edit ED_TABNAME
{
+ HelpID = "sc:Edit:RID_SCDLG_INSERT_TABLE:ED_TABNAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 82 ) ;
Size = MAP_APPFONT ( 137 , 12 ) ;
};
RadioButton RB_FROMFILE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_FROMFILE";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
Text [ en-US ] = "~From file" ;
};
MultiListBox LB_TABLES
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_INSERT_TABLE:LB_TABLES";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 113 ) ;
@@ -128,12 +136,14 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
PushButton BTN_BROWSE
{
+ HelpID = "sc:PushButton:RID_SCDLG_INSERT_TABLE:BTN_BROWSE";
Pos = MAP_APPFONT ( 149 , 113 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Browse..." ;
};
CheckBox CB_LINK
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSERT_TABLE:CB_LINK";
Pos = MAP_APPFONT ( 149 , 131 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "Lin~k" ;
diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx
index 73681eb998f8..307e293384d6 100644
--- a/sc/source/ui/miscdlgs/lbseldlg.cxx
+++ b/sc/source/ui/miscdlgs/lbseldlg.cxx
@@ -45,7 +45,7 @@
//==================================================================
ScSelEntryDlg::ScSelEntryDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList ) :
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 93094b589776..baff23726e72 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -83,6 +83,9 @@ ScLinkedAreaDlg::ScLinkedAreaDlg( Window* pParent ) :
aLbRanges.SetSelectHdl( LINK( this, ScLinkedAreaDlg, RangeHdl ) );
aBtnReload.SetClickHdl( LINK( this, ScLinkedAreaDlg, ReloadHdl ) );
UpdateEnable();
+
+ aNfDelay.SetAccessibleName(aBtnReload.GetText());
+ aNfDelay.SetAccessibleRelationLabeledBy(&aBtnReload);
}
ScLinkedAreaDlg::~ScLinkedAreaDlg()
@@ -133,7 +136,7 @@ IMPL_LINK( ScLinkedAreaDlg, FileHdl, ComboBox*, EMPTYARG )
String aOptions;
// get filter name by looking at the file content (bWithContent = TRUE)
// Break operation if any error occurred inside.
- if (!ScDocumentLoader::GetFilterName( aEntered, aFilter, aOptions, TRUE, TRUE ))
+ if (!ScDocumentLoader::GetFilterName( aEntered, aFilter, aOptions, true, true ))
return 0;
// #i53241# replace HTML filter with DataQuery filter
@@ -166,11 +169,11 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter,
SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, rFile );
- ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, TRUE ); // with interaction
+ ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, sal_True ); // with interaction
pSourceShell = aLoader.GetDocShell();
if ( pSourceShell )
{
- ULONG nErr = pSourceShell->GetErrorCode();
+ sal_uLong nErr = pSourceShell->GetErrorCode();
if (nErr)
ErrorHandler::HandleError( nErr ); // including warnings
@@ -182,7 +185,7 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter,
void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh )
+ sal_uLong nRefresh )
{
LoadDocument( rFile, rFilter, rOptions );
if (pSourceShell)
@@ -202,7 +205,7 @@ void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilte
aLbRanges.SelectEntry( aRange );
}
- BOOL bDoRefresh = ( nRefresh != 0 );
+ sal_Bool bDoRefresh = ( nRefresh != 0 );
aBtnReload.Check( bDoRefresh );
if (bDoRefresh)
aNfDelay.SetValue( nRefresh );
@@ -251,13 +254,13 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
if (pSourceShell)
pSourceShell->DoClose(); // deleted when assigning aSourceRef
- pMed->UseInteractionHandler( TRUE ); // to enable the filter options dialog
+ pMed->UseInteractionHandler( sal_True ); // to enable the filter options dialog
pSourceShell = new ScDocShell;
aSourceRef = pSourceShell;
pSourceShell->DoLoad( pMed );
- ULONG nErr = pSourceShell->GetErrorCode();
+ sal_uLong nErr = pSourceShell->GetErrorCode();
if (nErr)
ErrorHandler::HandleError( nErr ); // including warnings
@@ -285,7 +288,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
void ScLinkedAreaDlg::UpdateSourceRanges()
{
- aLbRanges.SetUpdateMode( FALSE );
+ aLbRanges.SetUpdateMode( false );
aLbRanges.Clear();
if ( pSourceShell )
@@ -297,7 +300,7 @@ void ScLinkedAreaDlg::UpdateSourceRanges()
aLbRanges.InsertEntry( aName );
}
- aLbRanges.SetUpdateMode( TRUE );
+ aLbRanges.SetUpdateMode( sal_True );
if ( aLbRanges.GetEntryCount() == 1 )
aLbRanges.SelectEntryPos(0);
@@ -305,10 +308,10 @@ void ScLinkedAreaDlg::UpdateSourceRanges()
void ScLinkedAreaDlg::UpdateEnable()
{
- BOOL bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() );
+ sal_Bool bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() );
aBtnOk.Enable( bEnable );
- BOOL bReload = aBtnReload.IsChecked();
+ sal_Bool bReload = aBtnReload.IsChecked();
aNfDelay.Enable( bReload );
aFtSeconds.Enable( bReload );
}
@@ -346,8 +349,8 @@ String ScLinkedAreaDlg::GetOptions()
String ScLinkedAreaDlg::GetSource()
{
String aSource;
- USHORT nCount = aLbRanges.GetSelectEntryCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = aLbRanges.GetSelectEntryCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if (i > 0)
aSource.Append( (sal_Unicode) ';' );
@@ -356,10 +359,10 @@ String ScLinkedAreaDlg::GetSource()
return aSource;
}
-ULONG ScLinkedAreaDlg::GetRefresh()
+sal_uLong ScLinkedAreaDlg::GetRefresh()
{
if ( aBtnReload.IsChecked() )
- return sal::static_int_cast<ULONG>( aNfDelay.GetValue() );
+ return sal::static_int_cast<sal_uLong>( aNfDelay.GetValue() );
else
return 0; // disabled
}
diff --git a/sc/source/ui/miscdlgs/linkarea.src b/sc/source/ui/miscdlgs/linkarea.src
index 715d3fd20766..11780c2995fe 100644
--- a/sc/source/ui/miscdlgs/linkarea.src
+++ b/sc/source/ui/miscdlgs/linkarea.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_LINKAREA
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_LINKAREA";
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
@@ -58,6 +59,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
ComboBox CB_URL
{
+ HelpID = "sc:ComboBox:RID_SCDLG_LINKAREA:CB_URL";
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 174 , 80 ) ;
TabStop = TRUE ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
PushButton BTN_BROWSE
{
+ HelpID = "sc:PushButton:RID_SCDLG_LINKAREA:BTN_BROWSE";
Pos = MAP_APPFONT ( 190 , 14 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Text = "~..." ;
@@ -84,6 +87,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
MultiListBox LB_RANGES
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_LINKAREA:LB_RANGES";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 74 ) ;
@@ -92,6 +96,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
CheckBox BTN_RELOAD
{
+ HelpID = "sc:CheckBox:RID_SCDLG_LINKAREA:BTN_RELOAD";
Pos = MAP_APPFONT ( 12 , 168 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -99,6 +104,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
NumericField NF_DELAY
{
+ HelpID = "sc:NumericField:RID_SCDLG_LINKAREA:NF_DELAY";
Border = TRUE ;
Pos = MAP_APPFONT ( 113 , 166 ) ;
Size = MAP_APPFONT ( 32 , 12 ) ;
diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx
index 972fe37e5abe..d49e3c0a6b21 100644
--- a/sc/source/ui/miscdlgs/mtrindlg.cxx
+++ b/sc/source/ui/miscdlgs/mtrindlg.cxx
@@ -43,11 +43,11 @@
//==================================================================
ScMetricInputDlg::ScMetricInputDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
long nCurrent,
long nDefault,
FieldUnit eFUnit,
- USHORT nDecimals,
+ sal_uInt16 nDecimals,
long nMaximum,
long nMinimum,
long nFirst,
@@ -99,14 +99,14 @@ long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const
mit Nachkommastellen:
double nVal = aEdValue.GetValue( eUnit );
- USHORT nDecs = aEdValue.GetDecimalDigits();
+ sal_uInt16 nDecs = aEdValue.GetDecimalDigits();
double nFactor = 0.0;
- // static long ImpPower10( USHORT nDecs )
+ // static long ImpPower10( sal_uInt16 nDecs )
{
nFactor = 1.0;
- for ( USHORT i=0; i < nDecs; i++ )
+ for ( sal_uInt16 i=0; i < nDecs; i++ )
nFactor *= 10.0;
}
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 7afa05bda563..c2a4d2036c7f 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -104,7 +104,7 @@ ScMoveTableDlg::~ScMoveTableDlg()
//------------------------------------------------------------------------
-USHORT ScMoveTableDlg::GetSelectedDocument () const { return nDocument; }
+sal_uInt16 ScMoveTableDlg::GetSelectedDocument () const { return nDocument; }
SCTAB ScMoveTableDlg::GetSelectedTable () const { return nTable; }
@@ -124,7 +124,7 @@ void ScMoveTableDlg::SetForceCopyTable()
aBtnCopy.Disable();
}
-void ScMoveTableDlg::EnableCopyTable(BOOL bFlag)
+void ScMoveTableDlg::EnableCopyTable(sal_Bool bFlag)
{
if(bFlag)
aBtnCopy.Enable();
@@ -132,7 +132,7 @@ void ScMoveTableDlg::EnableCopyTable(BOOL bFlag)
aBtnCopy.Disable();
}
-void ScMoveTableDlg::EnableRenameTable(BOOL bFlag)
+void ScMoveTableDlg::EnableRenameTable(sal_Bool bFlag)
{
bRenameTable = bFlag;
aEdTabName.Enable(bFlag);
@@ -195,8 +195,8 @@ void ScMoveTableDlg::CheckNewTabName()
}
bool bFound = false;
- USHORT nLast = aLbTable.GetEntryCount() - 1;
- for ( USHORT i=0; i<=nLast; ++i )
+ sal_uInt16 nLast = aLbTable.GetEntryCount() - 1;
+ for ( sal_uInt16 i=0; i<=nLast; ++i )
{
if ( rNewName == aLbTable.GetEntry( i ) )
{
@@ -226,7 +226,7 @@ void ScMoveTableDlg::CheckNewTabName()
ScDocument* ScMoveTableDlg::GetSelectedDoc()
{
- USHORT nPos = aLbDoc.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbDoc.GetSelectEntryPos();
return static_cast<ScDocument*>(aLbDoc.GetEntryData(nPos));
}
@@ -238,8 +238,8 @@ void ScMoveTableDlg::Init()
aLbDoc.SetSelectHdl ( LINK( this, ScMoveTableDlg, SelHdl ) );
aBtnCopy.SetToggleHdl( LINK( this, ScMoveTableDlg, CheckBtnHdl ) );
aEdTabName.SetModifyHdl( LINK( this, ScMoveTableDlg, CheckNameHdl ) );
- aBtnMove.Check( TRUE );
- aBtnCopy.Check( FALSE );
+ aBtnMove.Check( true );
+ aBtnCopy.Check( false );
aEdTabName.Enable(false);
aFtWarn.SetControlBackground( Color( COL_YELLOW ) );
aFtWarn.Hide();
@@ -253,12 +253,12 @@ void ScMoveTableDlg::InitDocListBox()
{
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
ScDocShell* pScSh = NULL;
- USHORT nSelPos = 0;
- USHORT i = 0;
+ sal_uInt16 nSelPos = 0;
+ sal_uInt16 i = 0;
String aEntryName;
aLbDoc.Clear();
- aLbDoc.SetUpdateMode( FALSE );
+ aLbDoc.SetUpdateMode( false );
while ( pSh )
{
@@ -283,7 +283,7 @@ void ScMoveTableDlg::InitDocListBox()
pSh = SfxObjectShell::GetNext( *pSh );
}
- aLbDoc.SetUpdateMode( TRUE );
+ aLbDoc.SetUpdateMode( sal_True );
aLbDoc.InsertEntry( String( ScResId( STR_NEWDOC ) ) );
aLbDoc.SelectEntryPos( nSelPos );
}
@@ -301,10 +301,10 @@ IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, void *, pBtn )
IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
{
- USHORT nDocSel = aLbDoc.GetSelectEntryPos();
- USHORT nDocLast = aLbDoc.GetEntryCount()-1;
- USHORT nTabSel = aLbTable.GetSelectEntryPos();
- USHORT nTabLast = aLbTable.GetEntryCount()-1;
+ sal_uInt16 nDocSel = aLbDoc.GetSelectEntryPos();
+ sal_uInt16 nDocLast = aLbDoc.GetEntryCount()-1;
+ sal_uInt16 nTabSel = aLbTable.GetSelectEntryPos();
+ sal_uInt16 nTabLast = aLbTable.GetEntryCount()-1;
nDocument = (nDocSel != nDocLast) ? nDocSel : SC_DOC_NEW;
nTable = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND;
@@ -342,7 +342,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
String aName;
aLbTable.Clear();
- aLbTable.SetUpdateMode( FALSE );
+ aLbTable.SetUpdateMode( false );
if ( pDoc )
{
SCTAB nLast = pDoc->GetTableCount()-1;
@@ -353,7 +353,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
}
}
aLbTable.InsertEntry( ScGlobal::GetRscString(STR_MOVE_TO_END) );
- aLbTable.SetUpdateMode( TRUE );
+ aLbTable.SetUpdateMode( sal_True );
aLbTable.SelectEntryPos( 0 );
ResetRenameInput();
}
diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx
index 269ae78ad21f..ed7921c6f177 100644
--- a/sc/source/ui/miscdlgs/namecrea.cxx
+++ b/sc/source/ui/miscdlgs/namecrea.cxx
@@ -42,7 +42,7 @@
//==================================================================
-ScNameCreateDlg::ScNameCreateDlg( Window * pParent, USHORT nFlags )
+ScNameCreateDlg::ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags )
: ModalDialog( pParent, ScResId(RID_SCDLG_NAMES_CREATE) ),
aFixedLine ( this, ScResId( FL_FRAME ) ),
aTopBox ( this, ScResId( BTN_TOP ) ),
@@ -53,19 +53,19 @@ ScNameCreateDlg::ScNameCreateDlg( Window * pParent, USHORT nFlags )
aCancelButton ( this, ScResId( BTN_CANCEL ) ),
aHelpButton ( this, ScResId( BTN_HELP ) )
{
- aTopBox.Check ( (nFlags & NAME_TOP) ? TRUE : FALSE );
- aLeftBox.Check ( (nFlags & NAME_LEFT) ? TRUE : FALSE );
- aBottomBox.Check( (nFlags & NAME_BOTTOM)? TRUE : FALSE );
- aRightBox.Check ( (nFlags & NAME_RIGHT) ? TRUE : FALSE );
+ aTopBox.Check ( (nFlags & NAME_TOP) ? sal_True : false );
+ aLeftBox.Check ( (nFlags & NAME_LEFT) ? sal_True : false );
+ aBottomBox.Check( (nFlags & NAME_BOTTOM)? sal_True : false );
+ aRightBox.Check ( (nFlags & NAME_RIGHT) ? sal_True : false );
FreeResource();
}
//------------------------------------------------------------------
-USHORT ScNameCreateDlg::GetFlags() const
+sal_uInt16 ScNameCreateDlg::GetFlags() const
{
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
nResult |= aTopBox.IsChecked() ? NAME_TOP: 0 ;
nResult |= aLeftBox.IsChecked() ? NAME_LEFT: 0 ;
diff --git a/sc/source/ui/miscdlgs/namepast.cxx b/sc/source/ui/miscdlgs/namepast.cxx
index ea17b22bd4f2..1f28fc4a9258 100644
--- a/sc/source/ui/miscdlgs/namepast.cxx
+++ b/sc/source/ui/miscdlgs/namepast.cxx
@@ -43,7 +43,7 @@
//==================================================================
-ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL bInsList )
+ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList )
: ModalDialog( pParent, ScResId( RID_SCDLG_NAMES_PASTE ) ),
aLabelText ( this, ScResId( FT_LABEL ) ),
aNameList ( this, ScResId( LB_ENTRYLIST ) ),
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 233a028411f7..39becaf0990c 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -68,7 +68,7 @@ ScSolverProgressDialog::ScSolverProgressDialog( Window* pParent )
maFlButtons ( this, ScResId( FL_BUTTONS ) ),
maBtnOk ( this, ScResId( BTN_OK ) )
{
- maBtnOk.Enable(FALSE);
+ maBtnOk.Enable(false);
FreeResource();
}
@@ -160,7 +160,7 @@ void ScCursorRefEdit::KeyInput( const KeyEvent& rKEvt )
//----------------------------------------------------------------------------
-ScOptSolverSave::ScOptSolverSave( const String& rObjective, BOOL bMax, BOOL bMin, BOOL bValue,
+ScOptSolverSave::ScOptSolverSave( const String& rObjective, sal_Bool bMax, sal_Bool bMin, sal_Bool bValue,
const String& rTarget, const String& rVariable,
const std::vector<ScOptConditionRow>& rConditions,
const String& rEngine,
@@ -270,6 +270,19 @@ ScOptSolverDlg::ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
mpOperator[3] = &maLbOp4;
mpDelButton[3] = &maBtnDel4;
+ maRbMax.SetAccessibleRelationMemberOf(&maFtDirection);
+ maRbMin.SetAccessibleRelationMemberOf(&maFtDirection);
+ maRbValue.SetAccessibleRelationMemberOf(&maFtDirection);
+ maEdLeft2.SetAccessibleName(maFtCellRef.GetText());
+ maLbOp2.SetAccessibleName(maFtOperator.GetText());
+ maEdRight2.SetAccessibleName(maFtConstraint.GetText());
+ maEdLeft3.SetAccessibleName(maFtCellRef.GetText());
+ maLbOp3.SetAccessibleName(maFtOperator.GetText());
+ maEdRight3.SetAccessibleName(maFtConstraint.GetText());
+ maEdLeft4.SetAccessibleName(maFtCellRef.GetText());
+ maLbOp4.SetAccessibleName(maFtOperator.GetText());
+ maEdRight4.SetAccessibleName(maFtConstraint.GetText());
+
Init( aCursorPos );
FreeResource();
}
@@ -290,7 +303,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_DEL_ROWS ) );
uno::Reference<frame::XFrame> xFrame = GetBindings().GetActiveFrame();
- Image aDelNm = ::GetImage( xFrame, aSlotURL, FALSE );
+ Image aDelNm = ::GetImage( xFrame, aSlotURL, false );
for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
{
@@ -450,7 +463,7 @@ void ScOptSolverDlg::EnableButtons()
//----------------------------------------------------------------------------
-BOOL ScOptSolverDlg::Close()
+sal_Bool ScOptSolverDlg::Close()
{
return DoClose( ScOptSolverDlgWrapper::GetChildWindowId() );
}
@@ -495,7 +508,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
aStr = aName;
else // format cell/range reference
{
- USHORT nFmt = ( aAdr.Tab() == mnCurTab ) ? SCA_ABS : SCA_ABS_3D;
+ sal_uInt16 nFmt = ( aAdr.Tab() == mnCurTab ) ? SCA_ABS : SCA_ABS_3D;
if ( bSingle )
aAdr.Format( aStr, nFmt, pDocP, pDocP->GetAddressConvention() );
else
@@ -528,7 +541,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScOptSolverDlg::IsRefInputMode() const
+sal_Bool ScOptSolverDlg::IsRefInputMode() const
{
return mpEdActive != NULL;
}
@@ -542,7 +555,7 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn )
{
bool bSolve = ( pBtn == &maBtnSolve );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
bool bClose = true;
@@ -562,7 +575,7 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn )
else
{
// no solution -> dialog is kept open
- SetDispatcherLock( TRUE );
+ SetDispatcherLock( sal_True );
}
}
else if ( pBtn == &maBtnOpt )
@@ -627,7 +640,7 @@ IMPL_LINK( ScOptSolverDlg, DelBtnHdl, PushButton*, pBtn )
for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
if( pBtn == mpDelButton[nRow] )
{
- BOOL bHadFocus = pBtn->HasFocus();
+ sal_Bool bHadFocus = pBtn->HasFocus();
ReadConditions();
long nVecPos = nScrollPos + nRow;
@@ -770,7 +783,7 @@ bool ScOptSolverDlg::ParseRef( ScRange& rRange, const String& rInput, bool bAllo
{
ScRangeUtil aRangeUtil;
ScAddress::Details aDetails(mpDoc->GetAddressConvention(), 0, 0);
- USHORT nFlags = rRange.ParseAny( rInput, mpDoc, aDetails );
+ sal_uInt16 nFlags = rRange.ParseAny( rInput, mpDoc, aDetails );
if ( nFlags & SCA_VALID )
{
if ( (nFlags & SCA_TAB_3D) == 0 )
@@ -1020,7 +1033,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
{
ScAddress aCellPos;
ScUnoConversion::FillScAddress( aCellPos, aVariables[nVarPos] );
- aFunc.PutCell( aCellPos, new ScValueCell( aSolution[nVarPos] ), TRUE );
+ aFunc.PutCell( aCellPos, new ScValueCell( aSolution[nVarPos] ), sal_True );
}
mpDocShell->UnlockPaint();
}
@@ -1055,7 +1068,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
{
ScAddress aCellPos;
ScUnoConversion::FillScAddress( aCellPos, aVariables[nVarPos] );
- aFunc.PutCell( aCellPos, new ScValueCell( aOldValues[nVarPos] ), TRUE );
+ aFunc.PutCell( aCellPos, new ScValueCell( aOldValues[nVarPos] ), sal_True );
}
mpDocShell->UnlockPaint();
}
diff --git a/sc/source/ui/miscdlgs/protectiondlg.cxx b/sc/source/ui/miscdlgs/protectiondlg.cxx
index 4a8fbc15b4e7..90157f61f3ec 100644
--- a/sc/source/ui/miscdlgs/protectiondlg.cxx
+++ b/sc/source/ui/miscdlgs/protectiondlg.cxx
@@ -43,7 +43,7 @@ static const ScTableProtection::Option aOptions[] = {
ScTableProtection::SELECT_LOCKED_CELLS,
ScTableProtection::SELECT_UNLOCKED_CELLS,
};
-static const USHORT nOptionCount = SAL_N_ELEMENTS(aOptions);
+static const sal_uInt16 nOptionCount = SAL_N_ELEMENTS(aOptions);
ScTableProtectionDlg::ScTableProtectionDlg(Window* pParent) :
@@ -80,7 +80,7 @@ short ScTableProtectionDlg::Execute()
void ScTableProtectionDlg::SetDialogData(const ScTableProtection& rData)
{
- for (USHORT i = 0; i < nOptionCount; ++i)
+ for (sal_uInt16 i = 0; i < nOptionCount; ++i)
maOptionsListBox.CheckEntryPos(i, rData.isOptionEnabled(aOptions[i]));
}
@@ -91,7 +91,7 @@ void ScTableProtectionDlg::WriteData(ScTableProtection& rData) const
// We assume that the two password texts match.
rData.setPassword(maPassword1Edit.GetText());
- for (USHORT i = 0; i < nOptionCount; ++i)
+ for (sal_uInt16 i = 0; i < nOptionCount; ++i)
rData.setOption(aOptions[i], maOptionsListBox.IsChecked(i));
}
diff --git a/sc/source/ui/miscdlgs/protectiondlg.src b/sc/source/ui/miscdlgs/protectiondlg.src
index d009f824580b..aca43c6beeb3 100644
--- a/sc/source/ui/miscdlgs/protectiondlg.src
+++ b/sc/source/ui/miscdlgs/protectiondlg.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_TABPROTECTION
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_TABPROTECTION";
Text [ en-US ] = "Protect Sheet" ;
Size = MAP_APPFONT ( 220 , 135 ) ;
Moveable = TRUE ;
@@ -53,6 +54,7 @@ ModalDialog RID_SCDLG_TABPROTECTION
CheckBox BTN_PROTECT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_TABPROTECTION:BTN_PROTECT";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 150 , 10 );
@@ -69,6 +71,7 @@ ModalDialog RID_SCDLG_TABPROTECTION
Edit ED_PASSWORD1
{
+ HelpID = "sc:Edit:RID_SCDLG_TABPROTECTION:ED_PASSWORD1";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 56, 22 );
@@ -85,6 +88,7 @@ ModalDialog RID_SCDLG_TABPROTECTION
Edit ED_PASSWORD2
{
+ HelpID = "sc:Edit:RID_SCDLG_TABPROTECTION:ED_PASSWORD2";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 56, 39 );
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index cae6a64ce233..1aaf202e7a3f 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -41,12 +41,12 @@
//------------------------------------------------------------------------
ScRedComDialog::ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
- ScDocShell *pShell,ScChangeAction *pAction,BOOL bPrevNext)
+ ScDocShell *pShell,ScChangeAction *pAction,sal_Bool bPrevNext)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, TRUE );
+ pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, true );
DBG_ASSERT(pDlg, "Dialog creation failed!");
pDocShell=pShell;
pDlg->DontChangeAuthor();
@@ -116,8 +116,8 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction)
pDlg->SetText(aTitle);
aComment=pChangeAction->GetComment();
- BOOL bNext=FindNext(pChangeAction)!=NULL;
- BOOL bPrev=FindPrev(pChangeAction)!=NULL;
+ sal_Bool bNext=FindNext(pChangeAction)!=NULL;
+ sal_Bool bPrev=FindPrev(pChangeAction)!=NULL;
pDlg->EnableTravel(bNext,bPrev);
String aAuthor = pChangeAction->GetUser();
@@ -125,7 +125,7 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction)
DateTime aDT = pChangeAction->GetDateTime();
String aDate = ScGlobal::pLocaleData->getDate( aDT );
aDate += ' ';
- aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE );
+ aDate += ScGlobal::pLocaleData->getTime( aDT, false, false );
pDlg->ShowLastAuthor(aAuthor, aDate);
pDlg->SetNote(aComment);
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.src b/sc/source/ui/miscdlgs/retypepassdlg.src
index 2c3f93a6d6a0..0c9f11e46947 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.src
+++ b/sc/source/ui/miscdlgs/retypepassdlg.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_RETYPEPASS
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_RETYPEPASS";
Text [ en-US ] = "Re-type Password" ;
Size = MAP_APPFONT ( 260 , 165 ) ;
Moveable = TRUE ;
@@ -81,6 +82,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_DOC
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_DOC";
Pos = MAP_APPFONT ( 158, 59 );
Size = MAP_APPFONT ( 30, 14 );
@@ -113,6 +115,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET1
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET1";
Pos = MAP_APPFONT ( 158, 94 );
Size = MAP_APPFONT ( 30, 14 );
@@ -137,6 +140,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET2
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET2";
Pos = MAP_APPFONT ( 158, 110 );
Size = MAP_APPFONT ( 30, 14 );
@@ -161,6 +165,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET3
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET3";
Pos = MAP_APPFONT ( 158, 126 );
Size = MAP_APPFONT ( 30, 14 );
@@ -185,6 +190,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET4
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET4";
Pos = MAP_APPFONT ( 158, 142 );
Size = MAP_APPFONT ( 30, 14 );
@@ -228,6 +234,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
ModalDialog RID_SCDLG_RETYPEPASS_INPUT
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_RETYPEPASS_INPUT";
Text [ en-US ] = "Re-type Password" ;
Size = MAP_APPFONT ( 230 , 110 ) ;
Moveable = TRUE ;
@@ -254,6 +261,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
RadioButton BTN_RETYPE_PASSWORD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_RETYPEPASS_INPUT:BTN_RETYPE_PASSWORD";
Pos = MAP_APPFONT ( 11, 10 );
Size = MAP_APPFONT ( 150, 10 );
@@ -270,6 +278,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
Edit ED_PASSWORD1
{
+ HelpID = "sc:Edit:RID_SCDLG_RETYPEPASS_INPUT:ED_PASSWORD1";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 65, 29 );
@@ -286,6 +295,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
Edit ED_PASSWORD2
{
+ HelpID = "sc:Edit:RID_SCDLG_RETYPEPASS_INPUT:ED_PASSWORD2";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 65, 44 );
@@ -294,6 +304,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
CheckBox BTN_MATCH_OLD_PASSWORD
{
+ HelpID = "sc:CheckBox:RID_SCDLG_RETYPEPASS_INPUT:BTN_MATCH_OLD_PASSWORD";
Pos = MAP_APPFONT ( 20, 65 );
Size = MAP_APPFONT ( 150, 10 );
@@ -302,6 +313,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
RadioButton BTN_REMOVE_PASSWORD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_RETYPEPASS_INPUT:BTN_REMOVE_PASSWORD";
Pos = MAP_APPFONT ( 11, 90 );
Size = MAP_APPFONT ( 150, 10 );
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 943b965e7b69..9ed724c31063 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -50,7 +50,7 @@
#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include <comphelper/processfactory.hxx>
-
+#include <sfx2/sfxresid.hxx>
#include "sc.hrc"
#include "scmod.hxx"
#include "attrib.hxx"
@@ -102,8 +102,8 @@ ScAutoFormatDlg::ScAutoFormatDlg( Window* pParent,
pFormat ( pAutoFormat ),
pSelFmtData ( pSelFormatData ),
nIndex ( 0 ),
- bCoreDataChanged( FALSE ),
- bFmtInserted ( FALSE )
+ bCoreDataChanged( false ),
+ bFmtInserted ( false )
{
Init();
pWndPreview->NotifyChange( (*pFormat)[0] );
@@ -121,7 +121,7 @@ ScAutoFormatDlg::~ScAutoFormatDlg()
void ScAutoFormatDlg::Init()
{
- USHORT nCount;
+ sal_uInt16 nCount;
String aEntry;
aLbFormat .SetSelectHdl( LINK( this, ScAutoFormatDlg, SelFmtHdl ) );
@@ -149,7 +149,7 @@ void ScAutoFormatDlg::Init()
nCount = pFormat->GetCount();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
((*pFormat)[i])->GetName( aEntry );
aLbFormat.InsertEntry( aEntry );
@@ -169,7 +169,7 @@ void ScAutoFormatDlg::Init()
{
aBtnAdd.Disable();
aBtnRemove.Disable();
- bFmtInserted = TRUE;
+ bFmtInserted = sal_True;
}
}
@@ -220,7 +220,7 @@ IMPL_LINK_INLINE_END( ScAutoFormatDlg, DblClkHdl, void *, EMPTYARG )
IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn )
{
ScAutoFormatData* pData = (*pFormat)[nIndex];
- BOOL bCheck = ((CheckBox*)pBtn)->IsChecked();
+ sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked();
if ( pBtn == &aBtnNumFormat )
pData->SetIncludeValueFormat( bCheck );
@@ -238,7 +238,7 @@ IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
pWndPreview->NotifyChange( pData );
@@ -252,10 +252,10 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
{
if ( !bFmtInserted && pSelFmtData )
{
- String aStrStandard( ScResId(STR_STANDARD) );
+ String aStrStandard( SfxResId(STR_STANDARD) );
String aFormatName;
ScStringInputDlg* pDlg;
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
while ( !bOk )
{
@@ -263,7 +263,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
aStrTitle,
aStrLabel,
aFormatName,
- HID_SC_ADD_AUTOFMT );
+ HID_SC_ADD_AUTOFMT, HID_SC_AUTOFMT_NAME );
if ( pDlg->Execute() == RET_OK )
{
@@ -279,7 +279,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
if ( bFmtInserted )
{
- USHORT nAt = pFormat->IndexOf( pNewData );
+ sal_uInt16 nAt = pFormat->IndexOf( pNewData );
aLbFormat.InsertEntry( aFormatName, nAt );
aLbFormat.SelectEntry( aFormatName );
@@ -288,11 +288,11 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
+ bOk = sal_True;
}
else
delete pNewData;
@@ -301,7 +301,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
if ( !bFmtInserted )
{
- USHORT nRet = ErrorBox( this,
+ sal_uInt16 nRet = ErrorBox( this,
WinBits( WB_OK_CANCEL | WB_DEF_OK),
ScGlobal::GetRscString(STR_INVALID_AFNAME)
).Execute();
@@ -310,7 +310,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
@@ -342,7 +342,7 @@ IMPL_LINK( ScAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
pFormat->AtFree( nIndex ); // in der Core loeschen
@@ -359,7 +359,7 @@ IMPL_LINK( ScAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
while( !bOk )
{
@@ -370,12 +370,12 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
aStrRename,
aStrLabel,
aFormatName,
- HID_SC_REN_AFMT_DLG );
+ HID_SC_REN_AFMT_DLG, HID_SC_REN_AFMT_NAME );
if( pDlg->Execute() == RET_OK )
{
- BOOL bFmtRenamed = FALSE;
+ sal_Bool bFmtRenamed = false;
pDlg->GetInputString( aFormatName );
- USHORT n;
+ sal_uInt16 n;
if ( aFormatName.Len() > 0 )
{
@@ -401,29 +401,29 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
pFormat->Insert( pNewData);
- USHORT nCount = pFormat->GetCount();
+ sal_uInt16 nCount = pFormat->GetCount();
- aLbFormat.SetUpdateMode(FALSE);
+ aLbFormat.SetUpdateMode(false);
aLbFormat.Clear();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
((*pFormat)[i])->GetName( aEntry );
aLbFormat.InsertEntry( aEntry );
}
- aLbFormat.SetUpdateMode( TRUE);
+ aLbFormat.SetUpdateMode( sal_True);
aLbFormat.SelectEntry( aFormatName);
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
- bFmtRenamed = TRUE;
+ bOk = sal_True;
+ bFmtRenamed = sal_True;
}
}
if( !bFmtRenamed )
@@ -435,7 +435,7 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index b96a1ad73594..5b5492dccc8e 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -159,12 +159,12 @@ void ScShareDocumentDlg::UpdateView()
::rtl::OUString aDateStr = aDateTimeStr.getToken( 0, ' ', nIndex );
::rtl::OUString aTimeStr = aDateTimeStr.getToken( 0, ' ', nIndex );
nIndex = 0;
- USHORT nDay = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
- USHORT nMonth = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
- USHORT nYear = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
+ sal_uInt16 nDay = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
+ sal_uInt16 nMonth = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
+ sal_uInt16 nYear = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
nIndex = 0;
- USHORT nHours = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
- USHORT nMinutes = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
+ sal_uInt16 nHours = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
+ sal_uInt16 nMinutes = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
Date aDate( nDay, nMonth, nYear );
Time aTime( nHours, nMinutes );
DateTime aDateTime( aDate, aTime );
@@ -173,7 +173,7 @@ void ScShareDocumentDlg::UpdateView()
aString += '\t';
aString += ScGlobal::pLocaleData->getDate( aDateTime );
aString += ' ';
- aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE );
+ aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
maLbUsers.InsertEntry( aString, NULL );
}
@@ -229,7 +229,7 @@ void ScShareDocumentDlg::UpdateView()
aString += ScGlobal::pLocaleData->getDate( aDateTime );
aString += ' ';
- aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE );
+ aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
maLbUsers.InsertEntry( aString, NULL );
}
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.src b/sc/source/ui/miscdlgs/sharedocdlg.src
index fe55ee58c8e4..2accd0300bbd 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.src
+++ b/sc/source/ui/miscdlgs/sharedocdlg.src
@@ -30,7 +30,7 @@
ModalDialog RID_SCDLG_SHAREDOCUMENT
{
OutputSize = TRUE ;
- HelpId = SID_SHARE_DOC ;
+ HelpId = CMD_SID_SHARE_DOC ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 204 , 186 ) ;
Text [ en-US ] = "Share Document" ;
@@ -38,6 +38,7 @@ ModalDialog RID_SCDLG_SHAREDOCUMENT
Closeable = TRUE ;
CheckBox CB_SHARE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SHAREDOCUMENT:CB_SHARE";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 192 , 8 ) ;
Text [ en-US ] = "Share this spreadsheet with other users" ;
diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx
index 5cb89a26d32e..7e5ab24eb412 100644
--- a/sc/source/ui/miscdlgs/shtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/shtabdlg.cxx
@@ -46,11 +46,11 @@
ScShowTabDlg::ScShowTabDlg( Window* pParent ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_SHOW_TAB ) ),
+ aFtLbTitle ( this, ScResId( FT_LABEL ) ),
aLb ( this, ScResId( LB_ENTRYLIST ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
- aFtLbTitle ( this, ScResId( FT_LABEL ) )
+ aBtnHelp ( this, ScResId( BTN_HELP ) )
{
aLb.Clear();
aLb.SetDoubleClickHdl( LINK( this, ScShowTabDlg, DblClkHdl ) );
@@ -63,15 +63,15 @@ ScShowTabDlg::ScShowTabDlg( Window* pParent ) :
void ScShowTabDlg::SetDescription(
const String& rTitle, const String& rFixedText,
- ULONG nDlgHelpId, ULONG nLbHelpId )
+ const rtl::OString& rDlgHelpId, const rtl::OString& sLbHelpId )
{
SetText( rTitle );
aFtLbTitle.SetText( rFixedText );
- SetHelpId( nDlgHelpId );
- aLb.SetHelpId( nLbHelpId );
+ SetHelpId( rDlgHelpId );
+ aLb.SetHelpId( sLbHelpId );
}
-void ScShowTabDlg::Insert( const String& rString, BOOL bSelected )
+void ScShowTabDlg::Insert( const String& rString, sal_Bool bSelected )
{
aLb.InsertEntry( rString );
if( bSelected )
@@ -80,17 +80,17 @@ void ScShowTabDlg::Insert( const String& rString, BOOL bSelected )
//------------------------------------------------------------------------
-USHORT ScShowTabDlg::GetSelectEntryCount() const
+sal_uInt16 ScShowTabDlg::GetSelectEntryCount() const
{
return aLb.GetSelectEntryCount();
}
-String ScShowTabDlg::GetSelectEntry(USHORT nPos) const
+String ScShowTabDlg::GetSelectEntry(sal_uInt16 nPos) const
{
return aLb.GetSelectEntry(nPos);
}
-USHORT ScShowTabDlg::GetSelectEntryPos(USHORT nPos) const
+sal_uInt16 ScShowTabDlg::GetSelectEntryPos(sal_uInt16 nPos) const
{
return aLb.GetSelectEntryPos(nPos);
}
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index f39a9b1fb927..5d5a8ba468fd 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -81,22 +81,22 @@ ScSimpleRefDlg::ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
//
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
- bRefInputMode ( FALSE ),
- bAutoReOpen ( TRUE ),
- bCloseOnButtonUp( FALSE ),
- bSingleCell ( FALSE ),
- bMultiSelection ( FALSE )
+ bRefInputMode ( false ),
+ bAutoReOpen ( sal_True ),
+ bCloseOnButtonUp( false ),
+ bSingleCell ( false ),
+ bMultiSelection ( false )
{
// damit die Strings in der Resource bei den FixedTexten bleiben koennen:
Init();
FreeResource();
- SetDispatcherLock( TRUE ); // Modal-Modus einschalten
+ SetDispatcherLock( sal_True ); // Modal-Modus einschalten
}
//----------------------------------------------------------------------------
ScSimpleRefDlg::~ScSimpleRefDlg()
{
- SetDispatcherLock( FALSE ); // Modal-Modus einschalten
+ SetDispatcherLock( false ); // Modal-Modus einschalten
}
//----------------------------------------------------------------------------
@@ -117,7 +117,7 @@ void ScSimpleRefDlg::Init()
{
aBtnOk.SetClickHdl ( LINK( this, ScSimpleRefDlg, OkBtnHdl ) );
aBtnCancel.SetClickHdl ( LINK( this, ScSimpleRefDlg, CancelBtnHdl ) );
- bCloseFlag=FALSE;
+ bCloseFlag=false;
}
//----------------------------------------------------------------------------
@@ -160,10 +160,10 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScSimpleRefDlg::Close()
+sal_Bool ScSimpleRefDlg::Close()
{
CancelBtnHdl(&aBtnCancel);
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -178,9 +178,9 @@ void ScSimpleRefDlg::SetActive()
RefInputDone();
}
//------------------------------------------------------------------------
-BOOL ScSimpleRefDlg::IsRefInputMode() const
+sal_Bool ScSimpleRefDlg::IsRefInputMode() const
{
- return TRUE;
+ return sal_True;
}
String ScSimpleRefDlg::GetRefString() const
@@ -201,7 +201,7 @@ void ScSimpleRefDlg::SetUnoLinks( const Link& rDone, const Link& rAbort,
aChangeHdl = rChange;
}
-void ScSimpleRefDlg::SetFlags( BOOL bSetCloseOnButtonUp, BOOL bSetSingleCell, BOOL bSetMultiSelection )
+void ScSimpleRefDlg::SetFlags( sal_Bool bSetCloseOnButtonUp, sal_Bool bSetSingleCell, sal_Bool bSetMultiSelection )
{
bCloseOnButtonUp = bSetCloseOnButtonUp;
bSingleCell = bSetSingleCell;
@@ -217,10 +217,10 @@ void ScSimpleRefDlg::StartRefInput()
}
aRbAssign.DoRef();
- bCloseFlag=TRUE;
+ bCloseFlag=sal_True;
}
-void ScSimpleRefDlg::RefInputDone( BOOL bForced)
+void ScSimpleRefDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
if ( (bForced || bCloseOnButtonUp) && bCloseFlag )
@@ -231,7 +231,7 @@ void ScSimpleRefDlg::RefInputDone( BOOL bForced)
// ========
IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG )
{
- bAutoReOpen=FALSE;
+ bAutoReOpen=false;
String aResult=aEdAssign.GetText();
aCloseHdl.Call(&aResult);
Link aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose
@@ -243,7 +243,7 @@ IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG )
//------------------------------------------------------------------------
IMPL_LINK( ScSimpleRefDlg, CancelBtnHdl, void *, EMPTYARG )
{
- bAutoReOpen=FALSE;
+ bAutoReOpen=false;
String aResult=aEdAssign.GetText();
aCloseHdl.Call(NULL);
Link aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 4ed6eebb07cb..9927d5060306 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -77,7 +77,7 @@ class ScSolverOptionsString : public SvLBoxString
sal_Int32 mnIntValue;
public:
- ScSolverOptionsString( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) :
+ ScSolverOptionsString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) :
SvLBoxString( pEntry, nFlags, rStr ),
mbIsDouble( false ),
mfDoubleValue( 0.0 ),
@@ -90,10 +90,10 @@ public:
void SetDoubleValue( double fNew ) { mbIsDouble = true; mfDoubleValue = fNew; }
void SetIntValue( sal_Int32 nNew ) { mbIsDouble = false; mnIntValue = nNew; }
- virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry );
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
};
-void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* /* pEntry */ )
+void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* /* pEntry */ )
{
//! move position? (SvxLinguTabPage: aPos.X() += 20)
String aNormalStr( GetText() );
@@ -146,7 +146,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( Window* pParent,
maBtnEdit.SetClickHdl( LINK( this, ScSolverOptionsDialog, ButtonHdl ) );
- maLbSettings.SetWindowBits( WB_CLIPCHILDREN|WB_FORCE_MAKEVISIBLE );
+ maLbSettings.SetStyle( maLbSettings.GetStyle()|WB_CLIPCHILDREN|WB_FORCE_MAKEVISIBLE );
maLbSettings.SetHelpId( HID_SC_SOLVEROPTIONS_LB );
maLbSettings.SetHighlightRange();
@@ -175,7 +175,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( Window* pParent,
maProperties.realloc(0); // don't use options from different engine
}
if ( nSelect >= 0 ) // select in list box
- maLbEngine.SelectEntryPos( static_cast<USHORT>(nSelect) );
+ maLbEngine.SelectEntryPos( static_cast<sal_uInt16>(nSelect) );
if ( !maProperties.getLength() )
ReadFromComponent(); // fill maProperties from component (using maEngine)
@@ -208,8 +208,8 @@ const uno::Sequence<beans::PropertyValue>& ScSolverOptionsDialog::GetProperties(
SvLBoxEntry* pEntry = pModel->GetEntry(nEntryPos);
bool bHasData = false;
- USHORT nItemCount = pEntry->ItemCount();
- for (USHORT nItemPos=0; nItemPos<nItemCount && !bHasData; ++nItemPos)
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ for (sal_uInt16 nItemPos=0; nItemPos<nItemCount && !bHasData; ++nItemPos)
{
SvLBoxItem* pItem = pEntry->GetItem( nItemPos );
ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(pItem);
@@ -265,7 +265,7 @@ void ScSolverOptionsDialog::FillListBox()
// fill the list box
- maLbSettings.SetUpdateMode(FALSE);
+ maLbSettings.SetUpdateMode(false);
maLbSettings.Clear();
String sEmpty;
@@ -318,7 +318,7 @@ void ScSolverOptionsDialog::FillListBox()
pModel->Insert( pEntry );
}
- maLbSettings.SetUpdateMode(TRUE);
+ maLbSettings.SetUpdateMode(sal_True);
}
void ScSolverOptionsDialog::ReadFromComponent()
@@ -331,8 +331,8 @@ void ScSolverOptionsDialog::EditOption()
SvLBoxEntry* pEntry = maLbSettings.GetCurEntry();
if (pEntry)
{
- USHORT nItemCount = pEntry->ItemCount();
- for (USHORT nPos=0; nPos<nItemCount; ++nPos)
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ for (sal_uInt16 nPos=0; nPos<nItemCount; ++nPos)
{
SvLBoxItem* pItem = pEntry->GetItem( nPos );
ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(pItem);
@@ -381,7 +381,7 @@ IMPL_LINK( ScSolverOptionsDialog, SettingsDoubleClickHdl, SvTreeListBox*, EMPTYA
IMPL_LINK( ScSolverOptionsDialog, EngineSelectHdl, ListBox*, EMPTYARG )
{
- USHORT nSelectPos = maLbEngine.GetSelectEntryPos();
+ sal_uInt16 nSelectPos = maLbEngine.GetSelectEntryPos();
if ( nSelectPos < maImplNames.getLength() )
{
String aNewEngine( maImplNames[nSelectPos] );
@@ -397,14 +397,14 @@ IMPL_LINK( ScSolverOptionsDialog, EngineSelectHdl, ListBox*, EMPTYARG )
IMPL_LINK( ScSolverOptionsDialog, SettingsSelHdl, SvxCheckListBox*, EMPTYARG )
{
- BOOL bCheckbox = FALSE;
+ sal_Bool bCheckbox = false;
SvLBoxEntry* pEntry = maLbSettings.GetCurEntry();
if (pEntry)
{
SvLBoxItem* pItem = pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON);
if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXBUTTON )
- bCheckbox = TRUE;
+ bCheckbox = sal_True;
}
maBtnEdit.Enable( !bCheckbox );
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index d887b2a68cf6..a03daeb49fee 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -81,7 +81,7 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pDoc ( pDocument ),
nCurTab ( aCursorPos.Tab() ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
errMsgInvalidVar ( ScResId( STR_INVALIDVAR ) ),
errMsgInvalidForm ( ScResId( STR_INVALIDFORM ) ),
errMsgNoFormula ( ScResId( STR_NOFORMULA ) ),
@@ -89,6 +89,9 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
{
Init();
FreeResource();
+
+ aRBFormulaCell.SetAccessibleRelationMemberOf(&aFlVariables);
+ aRBVariableCell.SetAccessibleRelationMemberOf(&aFlVariables);
}
//----------------------------------------------------------------------------
@@ -128,7 +131,7 @@ void ScSolverDlg::Init()
//----------------------------------------------------------------------------
-BOOL ScSolverDlg::Close()
+sal_Bool ScSolverDlg::Close()
{
return DoClose( ScSolverDlgWrapper::GetChildWindowId() );
}
@@ -139,7 +142,7 @@ void ScSolverDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -161,7 +164,7 @@ void ScSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
String aStr;
ScAddress aAdr = rRef.aStart;
- USHORT nFmt = ( aAdr.Tab() == nCurTab )
+ sal_uInt16 nFmt = ( aAdr.Tab() == nCurTab )
? SCA_ABS
: SCA_ABS_3D;
@@ -205,14 +208,14 @@ void ScSolverDlg::RaiseError( ScSolverErr eError )
//----------------------------------------------------------------------------
-BOOL ScSolverDlg::IsRefInputMode() const
+sal_Bool ScSolverDlg::IsRefInputMode() const
{
return pEdActive != NULL;
}
//----------------------------------------------------------------------------
-BOOL ScSolverDlg::CheckTargetValue( String& rStrVal )
+sal_Bool ScSolverDlg::CheckTargetValue( String& rStrVal )
{
sal_uInt32 n1 = 0;
double n2;
@@ -235,8 +238,8 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn )
// 3. wurde ein korrekter Zielwert eingegeben
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- USHORT nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc, eConv );
- USHORT nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc, eConv );
+ sal_uInt16 nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc, eConv );
+ sal_uInt16 nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc, eConv );
if ( SCA_VALID == ( nRes1 & SCA_VALID ) )
{
@@ -257,7 +260,7 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn )
theTargetValStr );
ScSolveItem aOutItem( SCITEM_SOLVEDATA, &aOutParam );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_SOLVE,
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index 08180d069473..c33f4b53b43b 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -56,7 +56,7 @@ ScStringInputDlg::ScStringInputDlg( Window* pParent,
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId ) :
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_STRINPUT ) ),
//
aFtEditTitle ( this, ScResId( FT_LABEL ) ),
@@ -65,30 +65,12 @@ ScStringInputDlg::ScStringInputDlg( Window* pParent,
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) )
{
- SetHelpId( nHelpId );
+ SetHelpId( sHelpId );
SetText( rTitle );
aFtEditTitle.SetText( rEditTitle );
aEdInput.SetText( rDefault );
aEdInput.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
-
- // HelpId for Edit different for different uses
-
- if ( nHelpId == FID_TAB_APPEND )
- aEdInput.SetHelpId( HID_SC_APPEND_NAME );
- else if ( nHelpId == FID_TAB_RENAME )
- aEdInput.SetHelpId( HID_SC_RENAME_NAME );
- else if ( nHelpId == HID_SC_ADD_AUTOFMT )
- aEdInput.SetHelpId( HID_SC_AUTOFMT_NAME );
- else if ( nHelpId == HID_SC_REN_AFMT_DLG )
- aEdInput.SetHelpId( HID_SC_REN_AFMT_NAME );
- else if ( nHelpId == SID_RENAME_OBJECT )
- aEdInput.SetHelpId( HID_SC_RENAME_OBJECT );
- // #i68101#
- else if ( nHelpId == SID_TITLE_DESCRIPTION_OBJECT )
- aEdInput.SetHelpId( HID_SC_TITLE_DESCRIPTION_OBJECT );
- else
- DBG_ERRORFILE( "unknown ID" );
-
+ aEdInput.SetHelpId( sEditHelpId );
//-------------
FreeResource();
}
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 36e02ad43115..fec8ef51c2a5 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -57,7 +57,7 @@ ScTabBgColorDlg::ScTabBgColorDlg( Window* pParent,
const String& rTitle,
const String& rTabBgColorNoColorText,
const Color& rDefaultColor,
- ULONG nHelpId ) :
+ const rtl::OString& sHelpId ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_TAB_BG_COLOR ) ),
aBorderWin ( this, ScResId( TAB_BG_COLOR_CT_BORDER ) ),
aTabBgColorSet ( &aBorderWin, ScResId( TAB_BG_COLOR_SET_BGDCOLOR ), this ),
@@ -66,10 +66,10 @@ ScTabBgColorDlg::ScTabBgColorDlg( Window* pParent,
aBtnHelp ( this, ScResId( BTN_HELP ) ),
aTabBgColor ( rDefaultColor ),
aTabBgColorNoColorText ( rTabBgColorNoColorText ),
- mnHelpId ( nHelpId )
+ msHelpId ( sHelpId )
{
- SetHelpId( nHelpId );
+ SetHelpId( sHelpId );
this->SetText( rTitle );
this->SetStyle(GetStyle() | WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL | WB_SYSTEMWINDOW | WB_STANDALONE | WB_HIDE);
@@ -98,7 +98,7 @@ void ScTabBgColorDlg::FillColorValueSets_Impl()
::boost::scoped_ptr<XColorTable> pOwnColorTable; // locally instantiated in case the doc shell doesn't have one.
const Size aSize15x15 = Size( 15, 15 );
- USHORT nSelectedItem = 0;
+ sal_uInt16 nSelectedItem = 0;
DBG_ASSERT( pDocSh, "DocShell not found!" );
@@ -151,10 +151,10 @@ IMPL_LINK( ScTabBgColorDlg, TabBgColorDblClickHdl_Impl, ValueSet*, EMPTYARG )
Handler, called when color selection is changed
*/
{
- USHORT nItemId = aTabBgColorSet.GetSelectItemId();
+ sal_uInt16 nItemId = aTabBgColorSet.GetSelectItemId();
Color aColor = nItemId ? ( aTabBgColorSet.GetItemColor( nItemId ) ) : Color( COL_AUTO );
aTabBgColor = aColor;
- EndDialog( TRUE );
+ EndDialog( sal_True );
return 0;
}
@@ -163,10 +163,10 @@ IMPL_LINK( ScTabBgColorDlg, TabBgColorOKHdl_Impl, OKButton*, EMPTYARG )
// Handler, called when the OK button is pushed
- USHORT nItemId = aTabBgColorSet.GetSelectItemId();
+ sal_uInt16 nItemId = aTabBgColorSet.GetSelectItemId();
Color aColor = nItemId ? ( aTabBgColorSet.GetItemColor( nItemId ) ) : Color( COL_AUTO );
aTabBgColor = aColor;
- EndDialog( TRUE );
+ EndDialog( sal_True );
return 0;
}
@@ -183,10 +183,10 @@ void ScTabBgColorDlg::ScTabBgColorValueSet::KeyInput( const KeyEvent& rKEvt )
case KEY_SPACE:
case KEY_RETURN:
{
- USHORT nItemId = GetSelectItemId();
+ sal_uInt16 nItemId = GetSelectItemId();
const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) : Color( COL_AUTO );
aTabBgColorDlg->aTabBgColor = aColor;
- aTabBgColorDlg->EndDialog(TRUE);
+ aTabBgColorDlg->EndDialog(sal_True);
}
break;
}
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index ebb951652a4d..a42ddf505731 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -77,7 +77,7 @@ ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pDoc ( pDocument ),
nCurTab ( theFormulaCell.Tab() ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
errMsgNoFormula ( ScResId( STR_NOFORMULA ) ),
errMsgNoColRow ( ScResId( STR_NOCOLROW ) ),
errMsgWrongFormula ( ScResId( STR_WRONGFORMULA ) ),
@@ -128,7 +128,7 @@ void ScTabOpDlg::Init()
//----------------------------------------------------------------------------
-BOOL ScTabOpDlg::Close()
+sal_Bool ScTabOpDlg::Close()
{
return DoClose( ScTabOpDlgWrapper::GetChildWindowId() );
}
@@ -139,7 +139,7 @@ void ScTabOpDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -161,7 +161,7 @@ void ScTabOpDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
RefInputStart(pEdActive);
String aStr;
- USHORT nFmt = ( rRef.aStart.Tab() == nCurTab )
+ sal_uInt16 nFmt = ( rRef.aStart.Tab() == nCurTab )
? SCR_ABS
: SCR_ABS_3D;
@@ -237,10 +237,10 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError )
//----------------------------------------------------------------------------
-BOOL lcl_Parse( const String& rString, ScDocument* pDoc, SCTAB nCurTab,
+sal_Bool lcl_Parse( const String& rString, ScDocument* pDoc, SCTAB nCurTab,
ScRefAddress& rStart, ScRefAddress& rEnd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
if ( rString.Search(':') != STRING_NOTFOUND )
bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd, eConv );
@@ -259,8 +259,8 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn )
{
if ( pBtn == &aBtnOk )
{
- BYTE nMode = 3;
- USHORT nError = 0;
+ sal_uInt8 nMode = 3;
+ sal_uInt16 nError = 0;
// Zu ueberpruefen:
// 1. enthalten die Strings korrekte Tabellenkoordinaten/def.Namen?
@@ -325,7 +325,7 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn )
nMode );
ScTabOpItem aOutItem( SID_TABOP, &aOutParam );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_TABOP,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx
index 9dddb5997f5a..4048bdaa8ff7 100644
--- a/sc/source/ui/miscdlgs/textdlgs.cxx
+++ b/sc/source/ui/miscdlgs/textdlgs.cxx
@@ -66,7 +66,7 @@ ScCharDlg::ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
// -----------------------------------------------------------------------
-void ScCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void ScCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
@@ -112,7 +112,7 @@ ScParagraphDlg::ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) :
// -----------------------------------------------------------------------
-void ScParagraphDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void ScParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
switch( nId )
{
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 42a53c240247..18560d2c521a 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -67,24 +67,24 @@
struct SaveData
{
SaveData()
- : bCriteria(FALSE),bPrintArea(FALSE),
- bColHeader(FALSE),bRowHeader(FALSE),
- bDirty(FALSE) {}
+ : bCriteria(false),bPrintArea(false),
+ bColHeader(false),bRowHeader(false),
+ bDirty(false) {}
void Clear()
{
aStrSymbol.Erase();
bCriteria = bPrintArea =
- bColHeader = bRowHeader = FALSE;
- bDirty = TRUE;
+ bColHeader = bRowHeader = false;
+ bDirty = sal_True;
}
String aStrSymbol;
- BOOL bCriteria:1;
- BOOL bPrintArea:1;
- BOOL bColHeader:1;
- BOOL bRowHeader:1;
- BOOL bDirty:1;
+ sal_Bool bCriteria:1;
+ sal_Bool bPrintArea:1;
+ sal_Bool bColHeader:1;
+ sal_Bool bRowHeader:1;
+ sal_Bool bDirty:1;
};
static SaveData* pSaveObj = NULL;
@@ -95,7 +95,7 @@ static SaveData* pSaveObj = NULL;
pSaveObj->bPrintArea = aBtnPrintArea.IsChecked(); \
pSaveObj->bColHeader = aBtnColHeader.IsChecked(); \
pSaveObj->bRowHeader = aBtnRowHeader.IsChecked(); \
- pSaveObj->bDirty = TRUE;
+ pSaveObj->bDirty = sal_True;
#define RESTORE_DATA() \
if ( pSaveObj->bDirty ) \
@@ -105,7 +105,7 @@ static SaveData* pSaveObj = NULL;
aBtnPrintArea.Check( pSaveObj->bPrintArea ); \
aBtnColHeader.Check( pSaveObj->bColHeader ); \
aBtnRowHeader.Check( pSaveObj->bRowHeader ); \
- pSaveObj->bDirty = FALSE; \
+ pSaveObj->bDirty = false; \
}
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute();
@@ -142,7 +142,7 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aBtnRemove ( this, ScResId( BTN_REMOVE ) ),
aBtnMore ( this, ScResId( BTN_MORE ) ),
//
- bSaved (FALSE),
+ bSaved (false),
aStrAdd ( ScResId( STR_ADD ) ),
aStrModify ( ScResId( STR_MODIFY ) ),
errMsgInvalidSym( ScResId( STR_INVALIDSYMBOL ) ),
@@ -155,6 +155,8 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pSaveObj = new SaveData;
Init();
FreeResource();
+
+ aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign);
}
@@ -214,20 +216,20 @@ void ScNameDlg::Init()
UpdateChecks();
EdModifyHdl( 0 );
- bSaved=TRUE;
+ bSaved=sal_True;
SAVE_DATA()
//@BugID 54702
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
-BOOL ScNameDlg::IsRefInputMode() const
+sal_Bool ScNameDlg::IsRefInputMode() const
{
return aEdAssign.IsEnabled();
}
-void ScNameDlg::RefInputDone( BOOL bForced)
+void ScNameDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
EdModifyHdl(&aEdAssign);
@@ -252,7 +254,7 @@ void ScNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScNameDlg::Close()
+sal_Bool ScNameDlg::Close()
{
return DoClose( ScNameDlgWrapper::GetChildWindowId() );
}
@@ -314,8 +316,8 @@ void ScNameDlg::UpdateChecks()
void ScNameDlg::UpdateNames()
{
- aEdName.SetUpdateMode( FALSE );
- USHORT nNamePos = aEdName.GetTopEntry();
+ aEdName.SetUpdateMode( false );
+ sal_uInt16 nNamePos = aEdName.GetTopEntry();
aEdName.Clear();
aEdAssign.SetText( EMPTY_STRING );
@@ -336,7 +338,7 @@ void ScNameDlg::UpdateNames()
}
}
- aEdName.SetUpdateMode( TRUE );
+ aEdName.SetUpdateMode( true );
aEdName.SetTopEntry(nNamePos);
aEdName.Invalidate();
}
@@ -393,9 +395,9 @@ IMPL_LINK_INLINE_END( ScNameDlg, CancelBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG )
{
- BOOL bAdded = FALSE;
+ sal_Bool bAdded = false;
String aNewEntry = aEdName.GetText();
- USHORT nNamePos = aEdName.GetTopEntry();
+ sal_uInt16 nNamePos = aEdName.GetTopEntry();
aNewEntry.EraseLeadingChars( ' ' );
aNewEntry.EraseTrailingChars( ' ' );
@@ -444,7 +446,7 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG )
delete pNewEntry;
UpdateNames();
- bSaved=FALSE;
+ bSaved=false;
RESTORE_DATA()
aEdName.SetText(EMPTY_STRING);
aEdName.GrabFocus();
@@ -454,9 +456,9 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG )
aBtnRemove.Disable();
//@BugID 54702 raus mit dem Sch.
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
- bAdded = TRUE;
+ bAdded = sal_True;
}
else // theSymbol ungueltig
{
@@ -500,7 +502,7 @@ IMPL_LINK( ScNameDlg, RemoveBtnHdl, void *, EMPTYARG )
aLocalRangeName.erase(*pData);
UpdateNames();
UpdateChecks();
- bSaved=FALSE;
+ bSaved=false;
RESTORE_DATA()
theCurSel = Selection( 0, SELECTION_MAX );
aBtnAdd.SetText( aStrAdd );
@@ -537,7 +539,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
{
String theName = aEdName.GetText();
String theSymbol = aEdAssign.GetText();
- BOOL bNameFound = (COMBOBOX_ENTRY_NOTFOUND
+ sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND
!= aEdName.GetEntryPos( theName ));
if ( pEd == &aEdName )
@@ -552,7 +554,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
aEdAssign.Disable();
aRbAssign.Disable();
//@BugID 54702 raus mit dem Sch.
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
else
{
@@ -565,7 +567,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
if(!bSaved)
{
- bSaved=TRUE;
+ bSaved=sal_True;
SAVE_DATA()
}
NameSelectHdl( 0 );
@@ -576,7 +578,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
aBtnAdd.SetText( aStrAdd );
aBtnRemove.Disable();
- bSaved=FALSE;
+ bSaved=false;
RESTORE_DATA()
}
theSymbol = aEdAssign.GetText();
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index ef8705ff402e..90d83f861008 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -75,7 +75,7 @@ using namespace com::sun::star;
// Reihenfolge der Kategorien im Navigator -------------------------------------
-static USHORT pTypeList[SC_CONTENT_COUNT] =
+static sal_uInt16 pTypeList[SC_CONTENT_COUNT] =
{
SC_CONTENT_ROOT, // ROOT (0) muss vorne stehen
SC_CONTENT_TABLE,
@@ -88,7 +88,7 @@ static USHORT pTypeList[SC_CONTENT_COUNT] =
SC_CONTENT_DRAWING
};
-BOOL ScContentTree::bIsInDrag = FALSE;
+sal_Bool ScContentTree::bIsInDrag = false;
ScDocShell* ScContentTree::GetManualOrCurrent()
@@ -129,10 +129,10 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
SvTreeListBox ( pParent, rResId ),
aEntryImages ( ScResId( RID_IMAGELIST_NAVCONT ) ),
nRootType ( SC_CONTENT_ROOT ),
- bHiddenDoc ( FALSE ),
+ bHiddenDoc ( false ),
pHiddenDocument ( NULL )
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<SC_CONTENT_COUNT; i++)
pPosList[pTypeList[i]] = i; // invers zum suchen
@@ -145,13 +145,15 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
SetNodeDefaultImages();
SetDoubleClickHdl( LINK( this, ScContentTree, ContentDoubleClickHdl ) );
+
+ SetStyle( GetStyle() | WB_QUICK_SEARCH );
}
ScContentTree::~ScContentTree()
{
}
-void ScContentTree::InitRoot( USHORT nType )
+void ScContentTree::InitRoot( sal_uInt16 nType )
{
if ( !nType )
return;
@@ -165,8 +167,8 @@ void ScContentTree::InitRoot( USHORT nType )
const Image& rImage = aEntryImages.GetImage( nType );
String aName( ScResId( SCSTR_CONTENT_ROOT + nType ) );
// wieder an die richtige Position:
- USHORT nPos = nRootType ? 0 : pPosList[nType]-1;
- SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, FALSE, nPos );
+ sal_uInt16 nPos = nRootType ? 0 : pPosList[nType]-1;
+ SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, false, nPos );
pRootNodes[nType] = pNew;
}
@@ -174,11 +176,11 @@ void ScContentTree::InitRoot( USHORT nType )
void ScContentTree::ClearAll()
{
Clear();
- for (USHORT i=1; i<SC_CONTENT_COUNT; i++)
+ for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++)
InitRoot(i);
}
-void ScContentTree::ClearType(USHORT nType)
+void ScContentTree::ClearType(sal_uInt16 nType)
{
if (!nType)
ClearAll();
@@ -194,7 +196,7 @@ void ScContentTree::ClearType(USHORT nType)
}
}
-void ScContentTree::InsertContent( USHORT nType, const String& rValue )
+void ScContentTree::InsertContent( sal_uInt16 nType, const String& rValue )
{
if (nType >= SC_CONTENT_COUNT)
{
@@ -211,7 +213,7 @@ void ScContentTree::InsertContent( USHORT nType, const String& rValue )
}
}
-void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const
+void ScContentTree::GetEntryIndexes( sal_uInt16& rnRootIndex, sal_uLong& rnChildIndex, SvLBoxEntry* pEntry ) const
{
rnRootIndex = SC_CONTENT_ROOT;
rnChildIndex = SC_CONTENT_NOCHILD;
@@ -221,7 +223,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
SvLBoxEntry* pParent = GetParent( pEntry );
bool bFound = false;
- for( USHORT nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot )
+ for( sal_uInt16 nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot )
{
if( pEntry == pRootNodes[ nRoot ] )
{
@@ -234,7 +236,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
rnRootIndex = nRoot;
// search the entry in all child entries of the parent
- ULONG nEntry = 0;
+ sal_uLong nEntry = 0;
SvLBoxEntry* pIterEntry = FirstChild( pParent );
while( !bFound && pIterEntry )
{
@@ -252,10 +254,10 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
}
}
-ULONG ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const
+sal_uLong ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const
{
- USHORT nRoot;
- ULONG nChild;
+ sal_uInt16 nRoot;
+ sal_uLong nChild;
GetEntryIndexes( nRoot, nChild, pEntry );
return nChild;
}
@@ -266,8 +268,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName )
if (pDoc)
{
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- USHORT nCount = pDbNames->GetCount();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pDbNames->GetCount();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDBData* pData = (*pDbNames)[i];
if ( pData->GetName() == rDBName )
@@ -284,8 +286,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName )
IMPL_LINK( ScContentTree, ContentDoubleClickHdl, ScContentTree *, EMPTYARG )
{
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
SvLBoxEntry* pEntry = GetCurEntry();
GetEntryIndexes( nType, nChild, pEntry );
@@ -364,7 +366,7 @@ void ScContentTree::MouseButtonDown( const MouseEvent& rMEvt )
void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bUsed = FALSE;
+ sal_Bool bUsed = false;
const KeyCode aCode = rKEvt.GetKeyCode();
if (aCode.GetCode() == KEY_RETURN)
@@ -373,15 +375,15 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
case KEY_MOD1:
ToggleRoot(); // toggle root mode (as in Writer)
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case 0:
{
SvLBoxEntry* pEntry = GetCurEntry();
if( pEntry )
{
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
GetEntryIndexes( nType, nChild, pEntry );
if( (nType != SC_CONTENT_ROOT) && (nChild == SC_CONTENT_NOCHILD) )
@@ -396,7 +398,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
ContentDoubleClickHdl(0); // select content as if double clicked
}
- bUsed = TRUE;
+ bUsed = sal_True;
}
break;
}
@@ -428,7 +430,7 @@ void ScContentTree::DragFinished( sal_Int8 /* nAction */ )
void ScContentTree::Command( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
switch ( rCEvt.GetCommand() )
{
@@ -440,7 +442,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
Application::PostUserEvent( STATIC_LINK( this, ScContentTree, ExecDragHdl ) );
- bDone = TRUE;
+ bDone = sal_True;
break;
case COMMAND_CONTEXTMENU:
@@ -457,8 +459,8 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
ScPopupMenu aDocMenu;
aDocMenu.SetMenuFlags( aDocMenu.GetMenuFlags() | MENU_FLAG_NOAUTOMNEMONICS );
- USHORT i=0;
- USHORT nPos=0;
+ sal_uInt16 i=0;
+ sal_uInt16 nPos=0;
// geladene Dokumente
ScDocShell* pCurrentSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
@@ -501,13 +503,13 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
if ( aDropMenu.WasHit() ) // Drag-Drop Modus
{
- USHORT nId = aDropMenu.GetSelected();
+ sal_uInt16 nId = aDropMenu.GetSelected();
if ( nId >= RID_DROPMODE_URL && nId <= RID_DROPMODE_COPY )
pParentWindow->SetDropMode( nId - RID_DROPMODE_URL );
}
else if ( aDocMenu.WasHit() ) // angezeigtes Dokument
{
- USHORT nId = aDocMenu.GetSelected();
+ sal_uInt16 nId = aDocMenu.GetSelected();
String aName = aDocMenu.GetItemText(nId);
SelectDoc( aName );
}
@@ -521,14 +523,14 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvLBoxEntry* pEntry = GetEntry( aPos );
if ( pEntry )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
String aHelpText;
SvLBoxEntry* pParent = GetParent(pEntry);
if ( !pParent ) // Top-Level ?
@@ -536,23 +538,23 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
aHelpText = String::CreateFromInt32( GetChildCount(pEntry) );
aHelpText += ' ';
aHelpText += GetEntryText(pEntry);
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( pParent == pRootNodes[SC_CONTENT_NOTE] )
{
aHelpText = GetEntryText(pEntry); // Notizen als Help-Text
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( pParent == pRootNodes[SC_CONTENT_AREALINK] )
{
- ULONG nIndex = GetChildIndex(pEntry);
+ sal_uLong nIndex = GetChildIndex(pEntry);
if( nIndex != SC_CONTENT_NOCHILD )
{
const ScAreaLink* pLink = GetLink(nIndex);
if (pLink)
{
aHelpText = pLink->GetFile(); // Source-Datei als Help-Text
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -570,7 +572,7 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
Rectangle aItemRect( aPos, aSize );
Help::ShowQuickHelp( this, aItemRect, aHelpText );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -593,7 +595,7 @@ ScDocument* ScContentTree::GetSourceDocument()
return NULL;
}
-void ScContentTree::Refresh( USHORT nType )
+void ScContentTree::Refresh( sal_uInt16 nType )
{
if ( bHiddenDoc && !pHiddenDocument )
return; // anderes Dokument angezeigt
@@ -613,7 +615,7 @@ void ScContentTree::Refresh( USHORT nType )
if (!DrawNamesChanged(SC_CONTENT_DRAWING))
return;
- SetUpdateMode(FALSE);
+ SetUpdateMode(false);
ClearType( nType );
@@ -635,7 +637,7 @@ void ScContentTree::Refresh( USHORT nType )
GetLinkNames();
ApplySettings();
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
void ScContentTree::GetTableNames()
@@ -703,11 +705,11 @@ void ScContentTree::GetDbNames()
return;
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- USHORT nCount = pDbNames->GetCount();
+ sal_uInt16 nCount = pDbNames->GetCount();
if ( nCount > 0 )
{
String aStrNoName( ScGlobal::GetRscString(STR_DB_NONAME) );
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDBData* pData = (*pDbNames)[i];
String aStrName = pData->GetName();
@@ -717,7 +719,7 @@ void ScContentTree::GetDbNames()
}
}
-bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier )
+bool ScContentTree::IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier )
{
bool bRet = false;
switch ( nContentType )
@@ -737,7 +739,7 @@ bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier )
return bRet;
}
-void ScContentTree::GetDrawNames( USHORT nType )
+void ScContentTree::GetDrawNames( sal_uInt16 nType )
{
if ( nRootType && nRootType != nType ) // ausgeblendet ?
return;
@@ -805,8 +807,8 @@ void ScContentTree::GetLinkNames()
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -816,18 +818,18 @@ void ScContentTree::GetLinkNames()
}
}
-const ScAreaLink* ScContentTree::GetLink( ULONG nIndex )
+const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
return NULL;
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -870,13 +872,13 @@ void ScContentTree::GetNoteStrings()
}
}
-ScAddress ScContentTree::GetNotePos( ULONG nIndex )
+ScAddress ScContentTree::GetNotePos( sal_uLong nIndex )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
return ScAddress();
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
@@ -898,19 +900,19 @@ ScAddress ScContentTree::GetNotePos( ULONG nIndex )
return ScAddress();
}
-BOOL ScContentTree::NoteStringsChanged()
+sal_Bool ScContentTree::NoteStringsChanged()
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
- return FALSE;
+ return false;
SvLBoxEntry* pParent = pRootNodes[SC_CONTENT_NOTE];
if (!pParent)
- return FALSE;
+ return false;
SvLBoxEntry* pEntry = FirstChild( pParent );
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount && bEqual; nTab++)
{
@@ -921,11 +923,11 @@ BOOL ScContentTree::NoteStringsChanged()
if( const ScPostIt* pNote = pCell->GetNote() )
{
if ( !pEntry )
- bEqual = FALSE;
+ bEqual = false;
else
{
if ( lcl_NoteString( *pNote ) != GetEntryText(pEntry) )
- bEqual = FALSE;
+ bEqual = false;
pEntry = NextSibling( pEntry );
}
@@ -935,27 +937,27 @@ BOOL ScContentTree::NoteStringsChanged()
}
if ( pEntry )
- bEqual = FALSE; // kommt noch was
+ bEqual = false; // kommt noch was
return !bEqual;
}
-BOOL ScContentTree::DrawNamesChanged( USHORT nType )
+sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
- return FALSE;
+ return false;
SvLBoxEntry* pParent = pRootNodes[nType];
if (!pParent)
- return FALSE;
+ return false;
SvLBoxEntry* pEntry = FirstChild( pParent );
// iterate in flat mode for groups
SdrIterMode eIter = ( nType == SC_CONTENT_DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS;
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
SfxObjectShell* pShell = pDoc->GetDocumentShell();
if (pDrawLayer && pShell)
@@ -974,11 +976,11 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType )
if ( IsPartOfType( nType, pObject->GetObjIdentifier() ) )
{
if ( !pEntry )
- bEqual = FALSE;
+ bEqual = false;
else
{
if ( ScDrawLayer::GetVisibleName( pObject ) != GetEntryText(pEntry) )
- bEqual = FALSE;
+ bEqual = false;
pEntry = NextSibling( pEntry );
}
@@ -990,15 +992,15 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType )
}
if ( pEntry )
- bEqual = FALSE; // kommt noch was
+ bEqual = false; // kommt noch was
return !bEqual;
}
-BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange& rRange )
+sal_Bool lcl_GetRange( ScDocument* pDoc, sal_uInt16 nType, const String& rName, ScRange& rRange )
{
- BOOL bFound = FALSE;
- USHORT nPos;
+ sal_Bool bFound = false;
+ sal_uInt16 nPos;
if ( nType == SC_CONTENT_RANGENAME )
{
@@ -1021,22 +1023,22 @@ BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange&
SCROW nRow1, nRow2;
(*pList)[nPos]->GetArea(nTab,nCol1,nRow1,nCol2,nRow2);
rRange = ScRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
- bFound = TRUE;
+ bFound = sal_True;
}
}
return bFound;
}
-void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType, Window* pWin )
+void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, sal_uInt16 nType, Window* pWin )
{
ScDocument* pSrcDoc = pSrcShell->GetDocument();
ScDrawLayer* pModel = pSrcDoc->GetDrawLayer();
if (pModel)
{
- BOOL bOle = ( nType == SC_CONTENT_OLEOBJECT );
- BOOL bGraf = ( nType == SC_CONTENT_GRAPHIC );
- USHORT nDrawId = sal::static_int_cast<USHORT>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) );
+ sal_Bool bOle = ( nType == SC_CONTENT_OLEOBJECT );
+ sal_Bool bGraf = ( nType == SC_CONTENT_GRAPHIC );
+ sal_uInt16 nDrawId = sal::static_int_cast<sal_uInt16>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) );
SCTAB nTab = 0;
SdrObject* pObject = pModel->GetNamedObject( rName, nDrawId, nTab );
if (pObject)
@@ -1066,10 +1068,10 @@ void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType,
}
}
-void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlags, Window* pWin )
+void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_uInt16 nFlags, Window* pWin )
{
ScMarkData aMark;
- aMark.SelectTable( rRange.aStart.Tab(), TRUE );
+ aMark.SelectTable( rRange.aStart.Tab(), sal_True );
aMark.SetMarkArea( rRange );
ScDocument* pSrcDoc = pSrcShell->GetDocument();
@@ -1080,7 +1082,7 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
ScClipParam aClipParam(rRange, false);
pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aMark);
- // pClipDoc->ExtendMerge( rRange, TRUE );
+ // pClipDoc->ExtendMerge( rRange, sal_True );
TransferableObjectDescriptor aObjDesc;
pSrcShell->FillTransferableObjectDescriptor( aObjDesc );
@@ -1102,12 +1104,12 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag
void ScContentTree::DoDrag()
{
ScDocumentLoader* pDocLoader = NULL;
- bIsInDrag = TRUE;
+ bIsInDrag = sal_True;
ScModule* pScMod = SC_MOD();
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
SvLBoxEntry* pEntry = GetCurEntry();
GetEntryIndexes( nType, nChild, pEntry );
@@ -1135,11 +1137,11 @@ void ScContentTree::DoDrag()
}
}
- BOOL bDoLinkTrans = FALSE; // use ScLinkTransferObj
+ sal_Bool bDoLinkTrans = false; // use ScLinkTransferObj
String aLinkURL; // for ScLinkTransferObj
String aLinkText;
- USHORT nDropMode = pParentWindow->GetDropMode();
+ sal_uInt16 nDropMode = pParentWindow->GetDropMode();
switch ( nDropMode )
{
case SC_DROPMODE_URL:
@@ -1158,7 +1160,7 @@ void ScContentTree::DoDrag()
aLinkURL = aUrl;
aLinkText = aText;
}
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
}
break;
case SC_DROPMODE_LINK:
@@ -1171,12 +1173,12 @@ void ScContentTree::DoDrag()
{
case SC_CONTENT_TABLE:
pScMod->SetDragLink( aDocName, aText, EMPTY_STRING );
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
break;
case SC_CONTENT_RANGENAME:
case SC_CONTENT_DBAREA:
pScMod->SetDragLink( aDocName, EMPTY_STRING, aText );
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
break;
// other types cannot be linked
@@ -1245,7 +1247,7 @@ void ScContentTree::DoDrag()
}
}
- bIsInDrag = FALSE; // static Member
+ bIsInDrag = false; // static Member
delete pDocLoader; // falls Dokument zum Draggen geladen wurde
}
@@ -1259,19 +1261,19 @@ IMPL_STATIC_LINK(ScContentTree, ExecDragHdl, void*, EMPTYARG)
return 0;
}
-BOOL ScContentTree::LoadFile( const String& rUrl )
+sal_Bool ScContentTree::LoadFile( const String& rUrl )
{
String aDocName = rUrl;
xub_StrLen nPos = aDocName.Search('#');
if ( nPos != STRING_NOTFOUND )
aDocName.Erase(nPos); // nur der Name, ohne #...
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
String aFilter, aOptions;
ScDocumentLoader aLoader( aDocName, aFilter, aOptions );
if ( !aLoader.IsError() )
{
- bHiddenDoc = TRUE;
+ bHiddenDoc = sal_True;
aHiddenName = aDocName;
aHiddenTitle = aLoader.GetTitle();
pHiddenDocument = aLoader.GetDocument();
@@ -1290,16 +1292,16 @@ BOOL ScContentTree::LoadFile( const String& rUrl )
return bReturn;
}
-void ScContentTree::InitWindowBits( BOOL bButtons )
+void ScContentTree::InitWindowBits( sal_Bool bButtons )
{
- WinBits nFlags = WB_CLIPCHILDREN|WB_HSCROLL;
+ WinBits nFlags = GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL;
if (bButtons)
nFlags |= WB_HASBUTTONS|WB_HASBUTTONSATROOT;
- SetWindowBits( nFlags );
+ SetStyle( nFlags );
}
-void ScContentTree::SetRootType( USHORT nNew )
+void ScContentTree::SetRootType( sal_uInt16 nNew )
{
if ( nNew != nRootType )
{
@@ -1314,14 +1316,14 @@ void ScContentTree::SetRootType( USHORT nNew )
void ScContentTree::ToggleRoot() // nach Selektion
{
- USHORT nNew = SC_CONTENT_ROOT;
+ sal_uInt16 nNew = SC_CONTENT_ROOT;
if ( nRootType == SC_CONTENT_ROOT )
{
SvLBoxEntry* pEntry = GetCurEntry();
if (pEntry)
{
SvLBoxEntry* pParent = GetParent(pEntry);
- for (USHORT i=1; i<SC_CONTENT_COUNT; i++)
+ for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++)
if ( pEntry == pRootNodes[i] || pParent == pRootNodes[i] )
nNew = i;
}
@@ -1333,7 +1335,7 @@ void ScContentTree::ToggleRoot() // nach Selektion
void ScContentTree::ResetManualDoc()
{
aManualDoc.Erase();
- bHiddenDoc = FALSE;
+ bHiddenDoc = false;
ActiveDocChanged();
}
@@ -1396,7 +1398,7 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
if ( rName.Copy( nNotActiveStart ) == pParentWindow->aStrNotActive )
aRealName = rName.Copy( 0, nNotActiveStart );
- BOOL bLoaded = FALSE;
+ sal_Bool bLoaded = false;
// ist es ein normal geladenes Doc ?
@@ -1405,13 +1407,13 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
{
if ( pSh->ISA(ScDocShell) )
if ( pSh->GetTitle() == aRealName )
- bLoaded = TRUE;
+ bLoaded = sal_True;
pSh = SfxObjectShell::GetNext( *pSh );
}
if (bLoaded)
{
- bHiddenDoc = FALSE;
+ bHiddenDoc = false;
SetManualDoc(aRealName);
}
else if (aHiddenTitle.Len()) // verstecktes ausgewaehlt
@@ -1430,15 +1432,15 @@ void ScContentTree::ApplySettings()
const ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings();
if( pSettings )
{
- USHORT nRootSel = pSettings->GetRootSelected();
- ULONG nChildSel = pSettings->GetChildSelected();
+ sal_uInt16 nRootSel = pSettings->GetRootSelected();
+ sal_uLong nChildSel = pSettings->GetChildSelected();
- for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
+ for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
{
if( pRootNodes[ nEntry ] )
{
// expand
- BOOL bExp = pSettings->IsExpanded( nEntry );
+ sal_Bool bExp = pSettings->IsExpanded( nEntry );
if( bExp != IsExpanded( pRootNodes[ nEntry ] ) )
{
if( bExp )
@@ -1465,13 +1467,13 @@ void ScContentTree::StoreSettings() const
ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings();
if( pSettings )
{
- for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
+ for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
{
- BOOL bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] );
+ sal_Bool bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] );
pSettings->SetExpanded( nEntry, bExp );
}
- USHORT nRoot;
- ULONG nChild;
+ sal_uInt16 nRoot;
+ sal_uLong nChild;
GetEntryIndexes( nRoot, nChild, GetCurEntry() );
pSettings->SetRootSelected( nRoot );
pSettings->SetChildSelected( nChild );
diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx
index 83fe56cbedbe..3d30ddb74d94 100644
--- a/sc/source/ui/navipi/navcitem.cxx
+++ b/sc/source/ui/navipi/navcitem.cxx
@@ -46,7 +46,7 @@
//------------------------------------------------------------------------
-ScNavigatorControllerItem::ScNavigatorControllerItem( USHORT nIdP,
+ScNavigatorControllerItem::ScNavigatorControllerItem( sal_uInt16 nIdP,
ScNavigatorDlg& rDlg,
SfxBindings& rBindings )
: SfxControllerItem ( nIdP, rBindings ),
@@ -56,7 +56,7 @@ ScNavigatorControllerItem::ScNavigatorControllerItem( USHORT nIdP,
//------------------------------------------------------------------------
-void ScNavigatorControllerItem::StateChanged( USHORT /* nSID */, SfxItemState /* eState */,
+void ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemState /* eState */,
const SfxPoolItem* pItem )
{
switch( GetId() )
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 670cd0d02125..c2988f6826b0 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -114,7 +114,7 @@ long ColumnEdit::Notify( NotifyEvent& rNEvt )
{
long nHandled = SpinField::Notify( rNEvt );
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_KEYINPUT )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
@@ -406,7 +406,7 @@ CommandToolBox::~CommandToolBox()
//------------------------------------------------------------------------
-void CommandToolBox::Select( USHORT nSelId )
+void CommandToolBox::Select( sal_uInt16 nSelId )
{
// Modus umschalten ?
@@ -474,7 +474,7 @@ IMPL_LINK( CommandToolBox, ToolBoxDropdownClickHdl, ToolBox*, EMPTYARG )
ScPopupMenu aPop( ScResId( RID_POPUP_DROPMODE ) );
aPop.CheckItem( RID_DROPMODE_URL + rDlg.GetDropMode() );
aPop.Execute( this, GetItemRect(IID_DROPMODE), POPUPMENU_EXECUTE_DOWN );
- USHORT nId = aPop.GetSelected();
+ sal_uInt16 nId = aPop.GetSelected();
EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage)
@@ -501,17 +501,17 @@ void CommandToolBox::UpdateButtons()
// Umschalten-Button:
if ( eMode == NAV_LMODE_SCENARIOS || eMode == NAV_LMODE_NONE )
{
- EnableItem( IID_CHANGEROOT, FALSE );
- CheckItem( IID_CHANGEROOT, FALSE );
+ EnableItem( IID_CHANGEROOT, false );
+ CheckItem( IID_CHANGEROOT, false );
}
else
{
- EnableItem( IID_CHANGEROOT, TRUE );
- BOOL bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT;
+ EnableItem( IID_CHANGEROOT, sal_True );
+ sal_Bool bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT;
CheckItem( IID_CHANGEROOT, bRootSet );
}
- USHORT nImageId = 0;
+ sal_uInt16 nImageId = 0;
switch ( rDlg.nDropMode )
{
case SC_DROPMODE_URL: nImageId = RID_IMG_DROP_URL; break;
@@ -525,10 +525,10 @@ void CommandToolBox::InitImageList()
{
ImageList& rImgLst = rDlg.aCmdImageList;
- USHORT nCount = GetItemCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = GetItemCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
- USHORT nId = GetItemId(i);
+ sal_uInt16 nId = GetItemId(i);
SetItemImage( nId, rImgLst.GetImage( nId ) );
}
}
@@ -551,7 +551,7 @@ void CommandToolBox::DataChanged( const DataChangedEvent& rDCEvt )
//==================================================================
ScNavigatorSettings::ScNavigatorSettings() :
- maExpandedVec( SC_CONTENT_COUNT, FALSE ),
+ maExpandedVec( SC_CONTENT_COUNT, false ),
mnRootSelected( SC_CONTENT_ROOT ),
mnChildSelected( SC_CONTENT_NOCHILD )
{
@@ -567,7 +567,7 @@ SFX_IMPL_CHILDWINDOWCONTEXT( ScNavigatorDialogWrapper, SID_NAVIGATOR )
ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(
Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBind,
SfxChildWinInfo* /* pInfo */ ) :
SfxChildWindowContext( nId )
@@ -589,7 +589,7 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(
// deshalb muessen in Abhaengigkeit von der momentanen Groesse die
// Inhalte eingeblendet werden oder nicht
- BOOL bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL );
+ sal_Bool bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL );
NavListMode eNavMode = NAV_LMODE_NONE;
if (!bSmall)
{
@@ -603,12 +603,12 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(
eNavMode = NAV_LMODE_AREAS;
}
- // Die Groesse des Floats nicht neu setzen (FALSE bei SetListMode), damit der
+ // Die Groesse des Floats nicht neu setzen (sal_False bei SetListMode), damit der
// Navigator nicht aufgeklappt wird, wenn er minimiert war (#38872#).
- pNavigator->SetListMode( eNavMode, FALSE ); // FALSE: Groesse des Float nicht setzen
+ pNavigator->SetListMode( eNavMode, false ); // FALSE: Groesse des Float nicht setzen
- USHORT nCmdId;
+ sal_uInt16 nCmdId;
switch (eNavMode)
{
case NAV_LMODE_DOCS: nCmdId = IID_DOCS; break;
@@ -665,7 +665,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
nCurCol ( 0 ),
nCurRow ( 0 ),
nCurTab ( 0 ),
- bFirstBig ( FALSE )
+ bFirstBig ( false )
{
ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
nDropMode = rCfg.GetDragMode();
@@ -715,7 +715,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
aLbDocuments.Hide(); // bei NAV_LMODE_NONE gibts die nicht
- aLbEntries.InitWindowBits(TRUE);
+ aLbEntries.InitWindowBits(sal_True);
aLbEntries.SetSpaceBetweenEntries(0);
aLbEntries.SetSelectionMode( SINGLE_SELECTION );
@@ -724,7 +724,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
SV_DRAGDROP_ENABLE_TOP );
// war eine Kategorie als Root ausgewaehlt?
- USHORT nLastRoot = rCfg.GetRootType();
+ sal_uInt16 nLastRoot = rCfg.GetRootType();
if ( nLastRoot )
aLbEntries.SetRootType( nLastRoot );
@@ -744,6 +744,10 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
aContentTimer.SetTimeout( SC_CONTENT_TIMEOUT );
FreeResource();
+
+ aLbEntries.SetAccessibleRelationLabeledBy(&aLbEntries);
+ aTbxCmd.SetAccessibleRelationLabeledBy(&aTbxCmd);
+ aLbDocuments.SetAccessibleName(aStrActiveWin);
}
//------------------------------------------------------------------------
@@ -752,7 +756,7 @@ ScNavigatorDlg::~ScNavigatorDlg()
{
aContentTimer.Stop();
- USHORT i;
+ sal_uInt16 i;
for ( i=0; i<CTRL_ITEMS; i++ )
delete ppBoundItems[i];
@@ -828,18 +832,18 @@ void ScNavigatorDlg::DoResize()
// bei angedocktem Navigator wird das Fenster evtl. erst klein erzeugt,
// dann kommt ein Resize auf die wirkliche Groesse -> dann Inhalte einschalten
- BOOL bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL );
+ sal_Bool bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL );
if ( !bSmall && bFirstBig )
{
// Inhalte laut Config wieder einschalten
- bFirstBig = FALSE;
+ bFirstBig = false;
NavListMode eNavMode = NAV_LMODE_AREAS;
ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
NavListMode eLastMode = (NavListMode) rCfg.GetListMode();
if ( eLastMode == NAV_LMODE_SCENARIOS )
eNavMode = NAV_LMODE_SCENARIOS;
- SetListMode( eNavMode, FALSE ); // FALSE: Groesse des Float nicht setzen
+ SetListMode( eNavMode, false ); // FALSE: Groesse des Float nicht setzen
}
// auch wenn die Inhalte nicht sichtbar sind, die Groessen anpassen,
@@ -868,7 +872,7 @@ void ScNavigatorDlg::DoResize()
aWndScenarios.SetSizePixel( aNewSize );
aLbDocuments.SetSizePixel( aDocSize );
- BOOL bListMode = (eListMode != NAV_LMODE_NONE);
+ sal_Bool bListMode = (eListMode != NAV_LMODE_NONE);
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
if ( pFloat && bListMode )
nListModeHeight = nTotalHeight;
@@ -880,7 +884,7 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA(SfxSimpleHint) )
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId();
if ( nHintId == SC_HINT_DOCNAME_CHANGED )
{
@@ -934,7 +938,7 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA(SfxEventHint) )
{
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
if ( nEventId == SFX_EVENT_ACTIVATEDOC )
{
aLbEntries.ActiveDocChanged();
@@ -956,7 +960,7 @@ IMPL_LINK( ScNavigatorDlg, TimeHdl, Timer*, pTimer )
//------------------------------------------------------------------------
-void ScNavigatorDlg::SetDropMode(USHORT nNew)
+void ScNavigatorDlg::SetDropMode(sal_uInt16 nNew)
{
nDropMode = nNew;
aTbxCmd.UpdateButtons();
@@ -989,7 +993,7 @@ void ScNavigatorDlg::SetCurrentCell( SCCOL nColNo, SCROW nRowNo )
String aAddr;
aScAddress.Format( aAddr, SCA_ABS );
- BOOL bUnmark = FALSE;
+ sal_Bool bUnmark = false;
if ( GetViewData() )
bUnmark = !pViewData->GetMarkData().IsCellMarked( nColNo, nRowNo );
@@ -1089,7 +1093,7 @@ ScNavigatorSettings* ScNavigatorDlg::GetNavigatorSettings()
//------------------------------------------------------------------------
-BOOL ScNavigatorDlg::GetViewData()
+sal_Bool ScNavigatorDlg::GetViewData()
{
ScTabViewShell* pViewSh = GetTabViewShell();
pViewData = pViewSh ? pViewSh->GetViewData() : NULL;
@@ -1160,30 +1164,30 @@ void ScNavigatorDlg::UpdateAll()
//------------------------------------------------------------------------
-void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize )
+void ScNavigatorDlg::SetListMode( NavListMode eMode, sal_Bool bSetSize )
{
if ( eMode != eListMode )
{
if ( eMode != NAV_LMODE_NONE )
- bFirstBig = FALSE; // nicht mehr automatisch umschalten
+ bFirstBig = false; // nicht mehr automatisch umschalten
eListMode = eMode;
switch ( eMode )
{
case NAV_LMODE_NONE:
- ShowList( FALSE, bSetSize );
+ ShowList( false, bSetSize );
break;
case NAV_LMODE_AREAS:
case NAV_LMODE_DBAREAS:
case NAV_LMODE_DOCS:
aLbEntries.Refresh();
- ShowList( TRUE, bSetSize );
+ ShowList( sal_True, bSetSize );
break;
case NAV_LMODE_SCENARIOS:
- ShowScenarios( TRUE, bSetSize );
+ ShowScenarios( sal_True, bSetSize );
break;
}
@@ -1192,7 +1196,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize )
if ( eMode != NAV_LMODE_NONE )
{
ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
- rCfg.SetListMode( (USHORT) eMode );
+ rCfg.SetListMode( (sal_uInt16) eMode );
}
}
@@ -1202,7 +1206,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize )
//------------------------------------------------------------------------
-void ScNavigatorDlg::ShowList( BOOL bShow, BOOL bSetSize )
+void ScNavigatorDlg::ShowList( sal_Bool bShow, sal_Bool bSetSize )
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
Size aSize = GetParent()->GetOutputSizePixel();
@@ -1247,7 +1251,7 @@ void ScNavigatorDlg::ShowList( BOOL bShow, BOOL bSetSize )
//------------------------------------------------------------------------
-void ScNavigatorDlg::ShowScenarios( BOOL bShow, BOOL bSetSize )
+void ScNavigatorDlg::ShowScenarios( sal_Bool bShow, sal_Bool bSetSize )
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
Size aSize = GetParent()->GetOutputSizePixel();
@@ -1303,7 +1307,7 @@ void ScNavigatorDlg::ShowScenarios( BOOL bShow, BOOL bSetSize )
void ScNavigatorDlg::GetDocNames( const String* pManualSel )
{
aLbDocuments.Clear();
- aLbDocuments.SetUpdateMode( FALSE );
+ aLbDocuments.SetUpdateMode( false );
ScDocShell* pCurrentSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
@@ -1342,7 +1346,7 @@ void ScNavigatorDlg::GetDocNames( const String* pManualSel )
aSelEntry = aEntry;
}
- aLbDocuments.SetUpdateMode( TRUE );
+ aLbDocuments.SetUpdateMode( sal_True );
aLbDocuments.SelectEntry( aSelEntry );
}
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index d8733a2cfef2..48cc2fff6c6c 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -55,7 +55,7 @@ ScScenarioListBox::ScScenarioListBox( ScScenarioWindow& rParent ) :
mrParent( rParent )
{
Font aFont( GetFont() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( WEIGHT_LIGHT );
SetFont( aFont );
}
@@ -88,7 +88,7 @@ void ScScenarioListBox::UpdateEntries( List* pNewEntryList )
{
// sheet contains scenarios
DBG_ASSERT( pNewEntryList->Count() % 3 == 0, "ScScenarioListBox::UpdateEntries - wrong list size" );
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
String* pEntry = static_cast< String* >( pNewEntryList->First() );
while( pEntry )
{
@@ -107,7 +107,7 @@ void ScScenarioListBox::UpdateEntries( List* pNewEntryList )
InsertEntry( aEntry.maName, LISTBOX_APPEND );
pEntry = static_cast< String* >( pNewEntryList->Next() );
}
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
SetNoSelection();
mrParent.SetComment( EMPTY_STRING );
}
@@ -182,7 +182,7 @@ const ScScenarioListBox::ScenarioEntry* ScScenarioListBox::GetSelectedEntry() co
return (nPos < maEntries.size()) ? &maEntries[ nPos ] : 0;
}
-void ScScenarioListBox::ExecuteScenarioSlot( USHORT nSlotId )
+void ScScenarioListBox::ExecuteScenarioSlot( sal_uInt16 nSlotId )
{
if( SfxViewFrame* pViewFrm = SfxViewFrame::Current() )
{
@@ -221,7 +221,7 @@ ScScenarioWindow::ScScenarioWindow( Window* pParent,const String& aQH_List,
aEdComment ( this, WB_BORDER | WB_LEFT | WB_READONLY | WB_VSCROLL | WB_TABSTOP )
{
Font aFont( GetFont() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( WEIGHT_LIGHT );
aEdComment.SetFont( aFont );
aEdComment.SetMaxTextLen( 512 );
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 05e6fc3d855c..7648ec79cb4e 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -90,12 +90,12 @@ SfxTabPage* ScRedlineOptionsTabPage::Create( Window* pParent, const SfxItemSet&
return new ScRedlineOptionsTabPage( pParent, rSet );
}
-BOOL ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
+sal_Bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
{
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
- ULONG nNew=0;
- USHORT nPos=0;
+ sal_uLong nNew=0;
+ sal_uInt16 nPos=0;
nPos = aContentColorLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
@@ -154,7 +154,7 @@ BOOL ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
if (pDocSh)
pDocSh->PostPaintGridAll();
- return FALSE;
+ return false;
}
void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
@@ -166,12 +166,12 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
aInsertColorLB.InsertEntry(aAuthorStr);
aRemoveColorLB.InsertEntry(aAuthorStr);
- aContentColorLB.SetUpdateMode( FALSE);
- aMoveColorLB.SetUpdateMode( FALSE);
- aInsertColorLB.SetUpdateMode( FALSE);
- aRemoveColorLB.SetUpdateMode( FALSE);
+ aContentColorLB.SetUpdateMode( false);
+ aMoveColorLB.SetUpdateMode( false);
+ aInsertColorLB.SetUpdateMode( false);
+ aRemoveColorLB.SetUpdateMode( false);
- for( USHORT i = 0; i < pColorTbl->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
{
XColorEntry* pEntry = pColorTbl->GetColor( i );
Color aColor = pEntry->GetColor();
@@ -182,15 +182,15 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
aInsertColorLB.InsertEntry( aColor, sName );
aRemoveColorLB.InsertEntry( aColor, sName );
}
- aContentColorLB.SetUpdateMode( TRUE );
- aMoveColorLB.SetUpdateMode( TRUE );
- aInsertColorLB.SetUpdateMode( TRUE );
- aRemoveColorLB.SetUpdateMode( TRUE );
+ aContentColorLB.SetUpdateMode( sal_True );
+ aMoveColorLB.SetUpdateMode( sal_True );
+ aInsertColorLB.SetUpdateMode( sal_True );
+ aRemoveColorLB.SetUpdateMode( sal_True );
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
- ULONG nColor = aAppOptions.GetTrackContentColor();
+ sal_uLong nColor = aAppOptions.GetTrackContentColor();
if (nColor == COL_TRANSPARENT)
aContentColorLB.SelectEntryPos(0);
else
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 143cb41d4ea2..a969b311ddf7 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -56,7 +56,7 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pCalcOptRanges[] =
+static sal_uInt16 pCalcOptRanges[] =
{
SID_SCDOCOPTIONS,
SID_SCDOCOPTIONS,
@@ -125,7 +125,7 @@ void ScTpCalcOptions::Init()
//-----------------------------------------------------------------------
-USHORT* ScTpCalcOptions::GetRanges()
+sal_uInt16* ScTpCalcOptions::GetRanges()
{
return pCalcOptRanges;
}
@@ -141,7 +141,7 @@ SfxTabPage* ScTpCalcOptions::Create( Window* pParent, const SfxItemSet& rAttrSet
void ScTpCalcOptions::Reset( const SfxItemSet& /* rCoreAttrs */ )
{
- USHORT d,m,y;
+ sal_uInt16 d,m,y;
*pLocalOptions = *pOldOptions;
@@ -190,10 +190,10 @@ void ScTpCalcOptions::Reset( const SfxItemSet& /* rCoreAttrs */ )
//-----------------------------------------------------------------------
-BOOL ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{
// alle weiteren Optionen werden in den Handlern aktualisiert
- pLocalOptions->SetIterCount( (USHORT)aEdSteps.GetValue() );
+ pLocalOptions->SetIterCount( (sal_uInt16)aEdSteps.GetValue() );
pLocalOptions->SetIgnoreCase( !aBtnCase.IsChecked() );
pLocalOptions->SetCalcAsShown( aBtnCalc.IsChecked() );
pLocalOptions->SetMatchWholeCell( aBtnMatch.IsChecked() );
@@ -209,10 +209,10 @@ BOOL ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs )
if ( *pLocalOptions != *pOldOptions )
{
rCoreAttrs.Put( ScTpCalcItem( nWhichCalc, *pLocalOptions ) );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -285,13 +285,13 @@ IMPL_LINK( ScTpCalcOptions, CheckClickHdl, CheckBox*, pBtn )
{
if ( pBtn->IsChecked() )
{
- pLocalOptions->SetIter( TRUE );
+ pLocalOptions->SetIter( sal_True );
aFtSteps.Enable(); aEdSteps.Enable();
aFtEps .Enable(); aEdEps .Enable();
}
else
{
- pLocalOptions->SetIter( FALSE );
+ pLocalOptions->SetIter( false );
aFtSteps.Disable(); aEdSteps.Disable();
aFtEps .Disable(); aEdEps .Disable();
}
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index 26ab3f88361e..367180b5153a 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -59,7 +59,7 @@ SfxTabPage* ScTpCompatOptions::Create(Window *pParent, const SfxItemSet &rCoreAt
return new ScTpCompatOptions(pParent, rCoreAttrs);
}
-BOOL ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
+sal_Bool ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
{
ScOptionsUtil::KeyBindingType eKeyB = ScOptionsUtil::KEY_DEFAULT;
switch (maLbKeyBindings.GetSelectEntryPos())
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 38ca8a34aeae..c87183e6bb33 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -215,7 +215,7 @@ SfxTabPage* ScTpFormulaOptions::Create(Window* pParent, const SfxItemSet& rCoreS
return new ScTpFormulaOptions(pParent, rCoreSet);
}
-BOOL ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet)
+sal_Bool ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet)
{
::formula::FormulaGrammar::Grammar eGram = ::formula::FormulaGrammar::GRAM_DEFAULT;
switch (maLbFormulaSyntax.GetSelectEntryPos())
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index 31f913e23061..29fd59c5309b 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -42,7 +42,7 @@
// -----------------------------------------------------------------------
-static USHORT pPrintOptRanges[] =
+static sal_uInt16 pPrintOptRanges[] =
{
SID_SCPRINTOPTIONS,
SID_SCPRINTOPTIONS,
@@ -68,7 +68,7 @@ ScTpPrintOptions::~ScTpPrintOptions()
{
}
-USHORT* ScTpPrintOptions::GetRanges()
+sal_uInt16* ScTpPrintOptions::GetRanges()
{
return pPrintOptRanges;
}
@@ -93,7 +93,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
ScPrintOptions aOptions;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCPRINTOPTIONS, FALSE , &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCPRINTOPTIONS, false , &pItem))
aOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
else
{
@@ -101,9 +101,9 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
aOptions = SC_MOD()->GetPrintOptions();
}
- if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, FALSE , &pItem ) )
+ if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) )
{
- BOOL bChecked = ( (const SfxBoolItem*)pItem )->GetValue();
+ sal_Bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue();
aSelectedSheetsCB.Check( bChecked );
}
else
@@ -118,7 +118,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
// -----------------------------------------------------------------------
-BOOL ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{
rCoreAttrs.ClearItem( SID_PRINT_SELECTEDSHEET );
@@ -135,11 +135,11 @@ BOOL ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{
rCoreAttrs.Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, aSelectedSheetsCB.IsChecked() ) );
}
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return false;
}
}
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index af0cb875409c..6761f313e38c 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -56,7 +56,7 @@
#define CR (sal_Unicode)13
#define LF (sal_Unicode)10
-static USHORT pUserListsRanges[] =
+static sal_uInt16 pUserListsRanges[] =
{
SID_SCUSERLISTS,
SID_SCUSERLISTS,
@@ -99,9 +99,9 @@ ScTpUserLists::ScTpUserLists( Window* pParent,
pDoc ( NULL ),
pViewData ( NULL ),
pRangeUtil ( new ScRangeUtil ),
- bModifyMode ( FALSE ),
- bCancelMode ( FALSE ),
- bCopyDone ( FALSE ),
+ bModifyMode ( false ),
+ bCancelMode ( false ),
+ bCopyDone ( false ),
nCancelPos ( 0 )
{
SetExchangeSupport();
@@ -167,7 +167,7 @@ void ScTpUserLists::Init()
// -----------------------------------------------------------------------
-USHORT* ScTpUserLists::GetRanges()
+sal_uInt16* ScTpUserLists::GetRanges()
{
return pUserListsRanges;
}
@@ -230,7 +230,7 @@ void ScTpUserLists::Reset( const SfxItemSet& rCoreAttrs )
// -----------------------------------------------------------------------
-BOOL ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs )
{
// Modifikationen noch nicht uebernommen?
// -> Click auf Add-Button simulieren
@@ -242,18 +242,18 @@ BOOL ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs )
GetItemSet().Get( nWhichUserLists );
ScUserList* pCoreList = rUserListItem.GetUserList();
- BOOL bDataModified = FALSE;
+ sal_Bool bDataModified = false;
if ( (pUserLists == NULL) && (pCoreList == NULL) )
{
- bDataModified = FALSE;
+ bDataModified = false;
}
else if ( pUserLists != NULL )
{
if ( pCoreList != NULL )
bDataModified = (*pUserLists != *pCoreList);
else
- bDataModified = TRUE;
+ bDataModified = sal_True;
}
if ( bDataModified )
@@ -281,7 +281,7 @@ int ScTpUserLists::DeactivatePage( SfxItemSet* pSetP )
// -----------------------------------------------------------------------
-USHORT ScTpUserLists::UpdateUserListBox()
+sal_uInt16 ScTpUserLists::UpdateUserListBox()
{
aLbLists.Clear();
@@ -289,12 +289,12 @@ USHORT ScTpUserLists::UpdateUserListBox()
//----------------------------------------------------------
- USHORT nCount = pUserLists->GetCount();
+ sal_uInt16 nCount = pUserLists->GetCount();
String aEntry;
if ( nCount > 0 )
{
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
aEntry = (*pUserLists)[i]->GetString();
DBG_ASSERT( aEntry.Len() > 0, "Empty UserList-entry :-/" );
@@ -307,7 +307,7 @@ USHORT ScTpUserLists::UpdateUserListBox()
// -----------------------------------------------------------------------
-void ScTpUserLists::UpdateEntries( USHORT nList )
+void ScTpUserLists::UpdateEntries( sal_uInt16 nList )
{
if ( !pUserLists ) return;
@@ -316,10 +316,10 @@ void ScTpUserLists::UpdateEntries( USHORT nList )
if ( nList < pUserLists->GetCount() )
{
ScUserListData* pList = (*pUserLists)[nList];
- USHORT nSubCount = pList->GetSubCount();
+ sal_uInt16 nSubCount = pList->GetSubCount();
String aEntryListStr;
- for ( USHORT i=0; i<nSubCount; i++ )
+ for ( sal_uInt16 i=0; i<nSubCount; i++ )
{
if ( i!=0 )
aEntryListStr += CR;
@@ -413,8 +413,8 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
SCROW nStartRow = rStartPos.Row();
SCCOL nEndCol = rEndPos.Col();
SCROW nEndRow = rEndPos.Row();
- USHORT nCellDir = SCRET_COLS;
- BOOL bValueIgnored = FALSE;
+ sal_uInt16 nCellDir = SCRET_COLS;
+ sal_Bool bValueIgnored = false;
if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) )
{
@@ -447,7 +447,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
}
}
else
- bValueIgnored = TRUE;
+ bValueIgnored = sal_True;
}
if ( aStrList.Len() > 0 )
AddNewList( aStrList );
@@ -471,7 +471,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
}
}
else
- bValueIgnored = TRUE;
+ bValueIgnored = sal_True;
}
if ( aStrList.Len() > 0 )
AddNewList( aStrList );
@@ -487,13 +487,13 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
//----------------------------------------------------------
- bCopyDone = TRUE;
+ bCopyDone = sal_True;
}
// -----------------------------------------------------------------------
-void ScTpUserLists::ModifyList( USHORT nSelList,
+void ScTpUserLists::ModifyList( sal_uInt16 nSelList,
const String& rEntriesStr )
{
if ( !pUserLists ) return;
@@ -509,7 +509,7 @@ void ScTpUserLists::ModifyList( USHORT nSelList,
// -----------------------------------------------------------------------
-void ScTpUserLists::RemoveList( USHORT nList )
+void ScTpUserLists::RemoveList( sal_uInt16 nList )
{
if ( pUserLists ) pUserLists->AtFree( nList );
}
@@ -522,7 +522,7 @@ IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb )
{
if ( pLb == &aLbLists )
{
- USHORT nSelPos = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aLbLists.GetSelectEntryPos();
if ( nSelPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( !aFtEntries.IsEnabled() ) aFtEntries.Enable();
@@ -565,7 +565,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
aEdCopyFrom.Disable();
}
aBtnNew.SetText( aStrCancel );
- bCancelMode = TRUE;
+ bCancelMode = sal_True;
}
else // if ( bCancelMode )
{
@@ -592,8 +592,8 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
aEdCopyFrom.Enable();
}
aBtnNew.SetText( aStrNew );
- bCancelMode = FALSE;
- bModifyMode = FALSE;
+ bCancelMode = false;
+ bModifyMode = false;
}
}
else if ( pBtn == &aBtnAdd )
@@ -625,11 +625,11 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
aBtnAdd.Disable();
aBtnRemove.Enable();
aBtnNew.SetText( aStrNew );
- bCancelMode = FALSE;
+ bCancelMode = false;
}
else // if ( bModifyMode )
{
- USHORT nSelList = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nSelList = aLbLists.GetSelectEntryPos();
DBG_ASSERT( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" );
@@ -645,8 +645,8 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
LbSelectHdl( &aLbLists );
}
- aBtnNew.SetText( aStrNew ); bCancelMode = FALSE;
- aBtnAdd.SetText( aStrAdd ); bModifyMode = FALSE;
+ aBtnNew.SetText( aStrNew ); bCancelMode = false;
+ aBtnAdd.SetText( aStrAdd ); bModifyMode = false;
aBtnAdd.Disable();
aBtnRemove.Enable();
aFtLists.Enable();
@@ -664,7 +664,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
if ( aLbLists.GetEntryCount() > 0 )
{
- USHORT nRemovePos = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nRemovePos = aLbLists.GetSelectEntryPos();
String aMsg ( aStrQueryRemove.GetToken( 0, '#' ) );
aMsg += aLbLists.GetEntry( nRemovePos );
@@ -716,7 +716,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
ScRefAddress theStartPos;
ScRefAddress theEndPos;
String theAreaStr( aEdCopyFrom.GetText() );
- BOOL bAreaOk = FALSE;
+ sal_Bool bAreaOk = false;
if ( theAreaStr.Len() > 0 )
{
@@ -783,8 +783,8 @@ IMPL_LINK( ScTpUserLists, EdEntriesModHdl, MultiLineEdit*, pEd )
{
if ( !bCancelMode && !bModifyMode )
{
- aBtnNew.SetText( aStrCancel ); bCancelMode = TRUE;
- aBtnAdd.SetText( aStrModify ); bModifyMode = TRUE;
+ aBtnNew.SetText( aStrCancel ); bCancelMode = sal_True;
+ aBtnAdd.SetText( aStrModify ); bModifyMode = sal_True;
aBtnAdd.Enable();
aBtnRemove.Disable();
aFtLists.Disable();
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 005824580fd4..79ec3116762f 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -141,9 +141,9 @@ SfxTabPage* ScTpContentOptions::Create( Window* pParent,
return new ScTpContentOptions(pParent, rCoreSet);
}
-BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if( aFormulaCB .GetSavedValue() != aFormulaCB .IsChecked() ||
aNilCB .GetSavedValue() != aNilCB .IsChecked() ||
aAnnotCB .GetSavedValue() != aAnnotCB .IsChecked() ||
@@ -168,17 +168,17 @@ BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
pLocalOptions->SetGridColor( aColorLB.GetSelectEntryColor(),
aColorLB.GetSelectEntry() );
rCoreSet.Put(ScTpViewItem(SID_SCVIEWOPTIONS, *pLocalOptions));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aRangeFindCB.GetSavedValue() != aRangeFindCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_RANGEFINDER, aRangeFindCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aSyncZoomCB.GetSavedValue() != aSyncZoomCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_OPT_SYNCZOOM, aSyncZoomCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
@@ -188,7 +188,7 @@ BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCVIEWOPTIONS, FALSE , &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCVIEWOPTIONS, false , &pItem))
pLocalOptions = new ScViewOptions(
((const ScTpViewItem*)pItem)->GetViewOptions() );
else
@@ -200,9 +200,9 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
aAnchorCB .Check(pLocalOptions->GetOption(VOPT_ANCHOR));
aClipMarkCB .Check(pLocalOptions->GetOption(VOPT_CLIPMARKS));
- aObjGrfLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_OLE) );
- aDiagramLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_CHART) );
- aDrawLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_DRAW) );
+ aObjGrfLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_OLE) );
+ aDiagramLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_CHART) );
+ aDrawLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_DRAW) );
aRowColHeaderCB.Check( pLocalOptions->GetOption(VOPT_HEADER) );
aHScrollCB .Check( pLocalOptions->GetOption(VOPT_HSCROLL) );
@@ -217,9 +217,9 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
aHandleCB.Check( !pLocalOptions->GetOption(VOPT_SOLIDHANDLES) ); // inverted
aBigHandleCB.Check( pLocalOptions->GetOption(VOPT_BIGHANDLES) );
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_RANGEFINDER, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_RANGEFINDER, false, &pItem))
aRangeFindCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_OPT_SYNCZOOM, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_OPT_SYNCZOOM, false, &pItem))
aSyncZoomCB.Check(((const SfxBoolItem*)pItem)->GetValue());
aRangeFindCB.SaveValue();
@@ -250,7 +250,7 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
void ScTpContentOptions::ActivatePage( const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_SCVIEWOPTIONS, FALSE , &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_SCVIEWOPTIONS, false , &pItem))
*pLocalOptions = ((const ScTpViewItem*)pItem)->GetViewOptions();
}
@@ -263,7 +263,7 @@ int ScTpContentOptions::DeactivatePage( SfxItemSet* pSetP )
IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb )
{
- USHORT nSelPos = pLb->GetSelectEntryPos();
+ sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
ScVObjMode eMode = ScVObjMode(nSelPos);
ScVObjType eType = VOBJ_TYPE_OLE;
@@ -280,7 +280,7 @@ IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb )
IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn )
{
ScViewOption eOption = VOPT_FORMULAS;
- BOOL bChecked = pBtn->IsChecked();
+ sal_Bool bChecked = pBtn->IsChecked();
if ( &aFormulaCB == pBtn ) eOption = VOPT_FORMULAS;
else if ( &aNilCB == pBtn ) eOption = VOPT_NULLVALS;
@@ -310,7 +310,7 @@ IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn )
void ScTpContentOptions::InitGridOpt()
{
- BOOL bGrid = pLocalOptions->GetOption( VOPT_GRID );
+ sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID );
aGridCB.Check( bGrid );
@@ -342,7 +342,7 @@ void ScTpContentOptions::InitGridOpt()
//------------------------------------------------------
- aColorLB.SetUpdateMode( FALSE );
+ aColorLB.SetUpdateMode( false );
// Eintraege aus der Colortable
@@ -360,7 +360,7 @@ void ScTpContentOptions::InitGridOpt()
aColorLB.GetEntryPos( aStdCol ) )
aColorLB.InsertEntry( aStdCol, ScGlobal::GetRscString( STR_GRIDCOLOR ) );
- aColorLB.SetUpdateMode( TRUE );
+ aColorLB.SetUpdateMode( sal_True );
Invalidate();
}
@@ -369,7 +369,7 @@ void ScTpContentOptions::InitGridOpt()
String aName;
Color aCol = pLocalOptions->GetGridColor( &aName );
- USHORT nSelPos = aColorLB.GetEntryPos( aCol );
+ sal_uInt16 nSelPos = aColorLB.GetEntryPos( aCol );
if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
aColorLB.SelectEntryPos( nSelPos );
@@ -379,7 +379,7 @@ void ScTpContentOptions::InitGridOpt()
IMPL_LINK( ScTpContentOptions, GridHdl, CheckBox*, pBox )
{
- BOOL bChecked = pBox->IsChecked();
+ sal_Bool bChecked = pBox->IsChecked();
aColorFT.Enable(bChecked);
aColorLB.Enable(bChecked);
pLocalOptions->SetOption( VOPT_GRID, bChecked );
@@ -422,7 +422,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent,
aAlignCB.SetClickHdl(LINK(this, ScTpLayoutOptions, AlignHdl));
- for ( USHORT i = 0; i < aUnitArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnitArr.Count(); ++i )
{
String sMetric = aUnitArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aUnitArr.GetValue( i );
@@ -436,7 +436,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent,
case FUNIT_INCH:
{
// nur diese Metriken benutzen
- USHORT nPos = aUnitLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aUnitLB.InsertEntry( sMetric );
aUnitLB.SetEntryData( nPos, (void*)(long)eFUnit );
}
break;
@@ -464,23 +464,23 @@ SfxTabPage* ScTpLayoutOptions::Create( Window* pParent,
return pNew;
}
-BOOL ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
{
- BOOL bRet = TRUE;
- const USHORT nMPos = aUnitLB.GetSelectEntryPos();
+ sal_Bool bRet = sal_True;
+ const sal_uInt16 nMPos = aUnitLB.GetSelectEntryPos();
if ( nMPos != aUnitLB.GetSavedValue() )
{
- USHORT nFieldUnit = (USHORT)(long)aUnitLB.GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aUnitLB.GetEntryData( nMPos );
rCoreSet.Put( SfxUInt16Item( SID_ATTR_METRIC,
- (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
if(aTabMF.GetText() != aTabMF.GetSavedValue())
{
rCoreSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
- sal::static_int_cast<UINT16>( aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)) )));
- bRet = TRUE;
+ sal::static_int_cast<sal_uInt16>( aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)) )));
+ bRet = sal_True;
}
ScLkUpdMode nSet=LM_ALWAYS;
@@ -502,55 +502,55 @@ BOOL ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
aAppOptions.SetLinkMode(nSet );
SC_MOD()->SetAppOptions(aAppOptions);
- bRet = TRUE;
+ bRet = sal_True;
}
if(aAlignCB.GetSavedValue() != aAlignCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_SELECTION, aAlignCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aAlignLB.GetSavedValue() != aAlignLB.GetSelectEntryPos())
{
rCoreSet.Put(SfxUInt16Item(SID_SC_INPUT_SELECTIONPOS, aAlignLB.GetSelectEntryPos()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aEditModeCB.GetSavedValue() != aEditModeCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_EDITMODE, aEditModeCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aFormatCB.GetSavedValue() != aFormatCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_FMT_EXPAND, aFormatCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aExpRefCB.GetSavedValue() != aExpRefCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_REF_EXPAND, aExpRefCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aMarkHdrCB.GetSavedValue() != aMarkHdrCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_MARK_HEADER, aMarkHdrCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aTextFmtCB.GetSavedValue() != aTextFmtCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_TEXTWYSIWYG, aTextFmtCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if( aReplWarnCB.GetSavedValue() != aReplWarnCB.IsChecked() )
{
rCoreSet.Put( SfxBoolItem( SID_SC_INPUT_REPLCELLSWARN, aReplWarnCB.IsChecked() ) );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -564,7 +564,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet.Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
- for ( USHORT i = 0; i < aUnitLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnitLB.GetEntryCount(); ++i )
{
if ( (FieldUnit)(long)aUnitLB.GetEntryData( i ) == eFieldUnit )
{
@@ -577,7 +577,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
aUnitLB.SaveValue();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem))
aTabMF.SetValue(aTabMF.Normalize(((SfxUInt16Item*)pItem)->GetValue()), FUNIT_TWIP);
aTabMF.SaveValue();
@@ -607,29 +607,29 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
// added to avoid warnings
}
}
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTION, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTION, false, &pItem))
aAlignCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTIONPOS, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTIONPOS, false, &pItem))
aAlignLB.SelectEntryPos(((const SfxUInt16Item*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_EDITMODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_EDITMODE, false, &pItem))
aEditModeCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_FMT_EXPAND, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_FMT_EXPAND, false, &pItem))
aFormatCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_REF_EXPAND, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_REF_EXPAND, false, &pItem))
aExpRefCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_MARK_HEADER, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_MARK_HEADER, false, &pItem))
aMarkHdrCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_TEXTWYSIWYG, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_TEXTWYSIWYG, false, &pItem))
aTextFmtCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_REPLCELLSWARN, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_REPLCELLSWARN, false, &pItem ) )
aReplWarnCB.Check( ( (const SfxBoolItem*)pItem)->GetValue() );
aAlignCB .SaveValue();
@@ -661,7 +661,7 @@ int ScTpLayoutOptions::DeactivatePage( SfxItemSet* pSetP )
IMPL_LINK(ScTpLayoutOptions, MetricHdl, ListBox*, EMPTYARG)
{
- const USHORT nMPos = aUnitLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aUnitLB.GetSelectEntryPos();
if(nMPos != USHRT_MAX)
{
FieldUnit eFieldUnit = (FieldUnit)(long)aUnitLB.GetEntryData( nMPos );
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 578f488f6529..7b73e7e56599 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -56,16 +56,16 @@
// STATIC DATA ---------------------------------------------------------------
// List box positions for print range (PR)
-const USHORT SC_AREASDLG_PR_NONE = 0;
-const USHORT SC_AREASDLG_PR_ENTIRE = 1;
-const USHORT SC_AREASDLG_PR_USER = 2;
-const USHORT SC_AREASDLG_PR_SELECT = 3;
-const USHORT SC_AREASDLG_PR_OFFSET = 4;
+const sal_uInt16 SC_AREASDLG_PR_NONE = 0;
+const sal_uInt16 SC_AREASDLG_PR_ENTIRE = 1;
+const sal_uInt16 SC_AREASDLG_PR_USER = 2;
+const sal_uInt16 SC_AREASDLG_PR_SELECT = 3;
+const sal_uInt16 SC_AREASDLG_PR_OFFSET = 4;
// List box positions for repeat ranges (RR)
-const USHORT SC_AREASDLG_RR_NONE = 0;
-const USHORT SC_AREASDLG_RR_USER = 1;
-const USHORT SC_AREASDLG_RR_OFFSET = 2;
+const sal_uInt16 SC_AREASDLG_RR_NONE = 0;
+const sal_uInt16 SC_AREASDLG_RR_USER = 1;
+const sal_uInt16 SC_AREASDLG_RR_OFFSET = 2;
//============================================================================
@@ -89,7 +89,7 @@ void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIs
#if 0
// this method is useful when debugging address flags.
-static void printAddressFlags(USHORT nFlag)
+static void printAddressFlags(sal_uInt16 nFlag)
{
if ((nFlag & SCA_COL_ABSOLUTE ) == SCA_COL_ABSOLUTE ) printf("SCA_COL_ABSOLUTE \n");
if ((nFlag & SCA_ROW_ABSOLUTE ) == SCA_ROW_ABSOLUTE ) printf("SCA_ROW_ABSOLUTE \n");
@@ -122,18 +122,18 @@ static void printAddressFlags(USHORT nFlag)
ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent )
: ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_AREAS),
//
- aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ),
aFlPrintArea ( this, ScResId( FL_PRINTAREA ) ),
+ aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ),
aEdPrintArea ( this, this, ScResId( ED_PRINTAREA ) ),
aRbPrintArea ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, this ),
//
- aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ),
aFlRepeatRow ( this, ScResId( FL_REPEATROW ) ),
+ aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ),
aEdRepeatRow ( this, this, ScResId( ED_REPEATROW ) ),
aRbRepeatRow ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, this ),
//
- aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ),
aFlRepeatCol ( this, ScResId( FL_REPEATCOL ) ),
+ aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ),
aEdRepeatCol ( this, this, ScResId( ED_REPEATCOL ) ),
aRbRepeatCol ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, this ),
//
@@ -141,7 +141,7 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window*
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
//
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
pRefInputEdit ( &aEdPrintArea ),
pDoc ( NULL ),
pViewData ( NULL ),
@@ -176,10 +176,10 @@ ScPrintAreasDlg::~ScPrintAreasDlg()
// Extra-Data an ListBox-Entries abraeumen
ListBox* pLb[3] = { &aLbPrintArea, &aLbRepeatRow, &aLbRepeatCol };
- for ( USHORT i=0; i<3; i++ )
+ for ( sal_uInt16 i=0; i<3; i++ )
{
- USHORT nCount = pLb[i]->GetEntryCount();
- for ( USHORT j=0; j<nCount; j++ )
+ sal_uInt16 nCount = pLb[i]->GetEntryCount();
+ for ( sal_uInt16 j=0; j<nCount; j++ )
delete (String*)pLb[i]->GetEntryData(j);
}
}
@@ -187,7 +187,7 @@ ScPrintAreasDlg::~ScPrintAreasDlg()
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::Close()
+sal_Bool ScPrintAreasDlg::Close()
{
return DoClose( ScPrintAreasDlgWrapper::GetChildWindowId() );
}
@@ -195,12 +195,12 @@ BOOL ScPrintAreasDlg::Close()
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::IsTableLocked() const
+sal_Bool ScPrintAreasDlg::IsTableLocked() const
{
// Druckbereiche gelten pro Tabelle, darum macht es keinen Sinn,
// bei der Eingabe die Tabelle umzuschalten
- return TRUE;
+ return sal_True;
}
@@ -230,7 +230,7 @@ void ScPrintAreasDlg::SetReference( const ScRange& rRef, ScDocument* /* pDoc */
}
else
{
- BOOL bRow = ( &aEdRepeatRow == pRefInputEdit );
+ sal_Bool bRow = ( &aEdRepeatRow == pRefInputEdit );
lcl_GetRepeatRangeString(&rRef, pDoc, bRow, aStr);
pRefInputEdit->SetRefString( aStr );
}
@@ -263,7 +263,7 @@ void ScPrintAreasDlg::AddRefEntry()
void ScPrintAreasDlg::Deactivate()
{
- bDlgLostFocus = TRUE;
+ bDlgLostFocus = sal_True;
}
@@ -273,7 +273,7 @@ void ScPrintAreasDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if ( pRefInputEdit )
{
@@ -320,8 +320,8 @@ void ScPrintAreasDlg::Impl_Reset()
String aOne;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
- USHORT nRangeCount = pDoc->GetPrintRangeCount( nCurTab );
- for (USHORT i=0; i<nRangeCount; i++)
+ sal_uInt16 nRangeCount = pDoc->GetPrintRangeCount( nCurTab );
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
const ScRange* pPrintRange = pDoc->GetPrintRange( nCurTab, i );
if (pPrintRange)
@@ -360,10 +360,10 @@ void ScPrintAreasDlg::Impl_Reset()
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
+sal_Bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
{
String aRangeStr = pEd->GetText();
- BOOL bDataChanged = (pEd->GetSavedValue() != aRangeStr);
+ sal_Bool bDataChanged = (pEd->GetSavedValue() != aRangeStr);
if ( (aRangeStr.Len() > 0) && &aEdPrintArea != pEd )
{
@@ -381,18 +381,18 @@ BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::Impl_CheckRefStrings()
+sal_Bool ScPrintAreasDlg::Impl_CheckRefStrings()
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
String aStrPrintArea = aEdPrintArea.GetText();
String aStrRepeatRow = aEdRepeatRow.GetText();
String aStrRepeatCol = aEdRepeatCol.GetText();
- BOOL bPrintAreaOk = TRUE;
+ sal_Bool bPrintAreaOk = sal_True;
if ( aStrPrintArea.Len() )
{
- const USHORT nValidAddr = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL;
- const USHORT nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2;
+ const sal_uInt16 nValidAddr = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL;
+ const sal_uInt16 nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
@@ -402,21 +402,21 @@ BOOL ScPrintAreasDlg::Impl_CheckRefStrings()
for ( xub_StrLen i = 0; i < nSepCount && bPrintAreaOk; ++i )
{
String aOne = aStrPrintArea.GetToken(i, sep);
- USHORT nResult = aRange.Parse( aOne, pDoc, eConv );
+ sal_uInt16 nResult = aRange.Parse( aOne, pDoc, eConv );
if ((nResult & nValidRange) != nValidRange)
{
- USHORT nAddrResult = aAddr.Parse( aOne, pDoc, eConv );
+ sal_uInt16 nAddrResult = aAddr.Parse( aOne, pDoc, eConv );
if ((nAddrResult & nValidAddr) != nValidAddr)
- bPrintAreaOk = FALSE;
+ bPrintAreaOk = false;
}
}
}
- BOOL bRepeatRowOk = (aStrRepeatRow.Len() == 0);
+ sal_Bool bRepeatRowOk = (aStrRepeatRow.Len() == 0);
if ( !bRepeatRowOk )
bRepeatRowOk = lcl_CheckRepeatString(aStrRepeatRow, pDoc, true, NULL);
- BOOL bRepeatColOk = (aStrRepeatCol.Len() == 0);
+ sal_Bool bRepeatColOk = (aStrRepeatCol.Len() == 0);
if ( !bRepeatColOk )
bRepeatColOk = lcl_CheckRepeatString(aStrRepeatCol, pDoc, false, NULL);
@@ -453,7 +453,7 @@ void ScPrintAreasDlg::Impl_FillLists()
//------------------------------------------------------
ScRange aRange;
String aStrRange;
- BOOL bSimple = TRUE;
+ sal_Bool bSimple = sal_True;
if ( pViewData )
bSimple = (pViewData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE);
@@ -465,7 +465,7 @@ void ScPrintAreasDlg::Impl_FillLists()
else
{
ScRangeListRef aList( new ScRangeList );
- pViewData->GetMarkData().FillRangeListWithMarks( aList, FALSE );
+ pViewData->GetMarkData().FillRangeListWithMarks( aList, false );
aList->Format( aStrRange, SCR_ABS, pDoc, eConv );
}
@@ -529,7 +529,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
{
if ( Impl_CheckRefStrings() )
{
- BOOL bDataChanged = FALSE;
+ sal_Bool bDataChanged = false;
String aStr;
SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr );
SfxStringItem aRepeatRow( FN_PARAM_2, aStr );
@@ -540,7 +540,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
//-------------------------
// first try the list box, if "Entite sheet" is selected
- BOOL bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
+ sal_Bool bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
SfxBoolItem aEntireSheet( FN_PARAM_4, bEntireSheet );
bDataChanged = bEntireSheet != pDoc->IsPrintEntireSheet( nCurTab );
@@ -562,7 +562,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
if ( bDataChanged )
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_CHANGE_PRINTAREA,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -610,13 +610,13 @@ IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr )
IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb )
{
- USHORT nSelPos = pLb->GetSelectEntryPos();
+ sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
Edit* pEd = NULL;
// list box positions of specific entries, default to "repeat row/column" list boxes
- USHORT nAllSheetPos = SC_AREASDLG_RR_NONE;
- USHORT nUserDefPos = SC_AREASDLG_RR_USER;
- USHORT nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
+ sal_uInt16 nAllSheetPos = SC_AREASDLG_RR_NONE;
+ sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER;
+ sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
// find edit field for list box, and list box positions
if( pLb == &aLbPrintArea )
@@ -652,8 +652,8 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
ListBox* pLb = NULL;
// list box positions of specific entries, default to "repeat row/column" list boxes
- USHORT nUserDefPos = SC_AREASDLG_RR_USER;
- USHORT nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
+ sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER;
+ sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
if( pEd == &aEdPrintArea )
{
@@ -669,16 +669,16 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
return 0;
// set list box selection according to edit field
- USHORT nEntryCount = pLb->GetEntryCount();
+ sal_uInt16 nEntryCount = pLb->GetEntryCount();
String aStrEd( pEd->GetText() );
String aEdUpper = aStrEd;
aEdUpper.ToUpperAscii();
if ( (nEntryCount > nFirstCustomPos) && aStrEd.Len() > 0 )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
String* pSymbol = NULL;
- USHORT i;
+ sal_uInt16 i;
for ( i=nFirstCustomPos; i<nEntryCount && !bFound; i++ )
{
@@ -711,7 +711,7 @@ bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal )
String aStr = rStr;
xub_StrLen nLen = aStr.Len();
SCCOLROW nNum = 0;
- BOOL bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) );
+ sal_Bool bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) );
if ( bStrOk )
{
@@ -726,7 +726,7 @@ bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal )
{
sal_Int32 n = aStr.ToInt32();
- if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) != FALSE )
+ if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) != false )
nNum = static_cast<SCCOLROW>(n - 1);
}
}
@@ -893,7 +893,7 @@ void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIs
const ScAddress& rStart = pRange->aStart;
const ScAddress& rEnd = pRange->aEnd;
- const USHORT nFmt = bIsRow ? (SCA_VALID_ROW | SCA_ROW_ABSOLUTE) : (SCA_VALID_COL | SCA_COL_ABSOLUTE);
+ const sal_uInt16 nFmt = bIsRow ? (SCA_VALID_ROW | SCA_ROW_ABSOLUTE) : (SCA_VALID_COL | SCA_COL_ABSOLUTE);
String aTmpStr;
rStart.Format(aTmpStr, nFmt, pDoc, eConv);
rStr += aTmpStr;
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 8ba49db77dfc..798cf65f85bc 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -65,7 +65,7 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP,
Window* pParent,
const SfxItemSet& rCoreSet,
const String& rPageStyle,
- USHORT nResIdP )
+ sal_uInt16 nResIdP )
: SfxTabDialog( pFrameP, pParent, ScResId( nResIdP ), &rCoreSet )
{
eNumType = ((const SvxPageItem&)rCoreSet.Get(ATTR_PAGE)).GetNumType();
@@ -135,7 +135,7 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP,
rCoreSet.Get(
rCoreSet.GetPool()->GetWhich(SID_ATTR_PAGE) );
- BOOL bRightPage = ( SVX_PAGE_LEFT !=
+ sal_Bool bRightPage = ( SVX_PAGE_LEFT !=
SvxPageUsage(rPageItem.GetPageUsage()) );
if ( bRightPage )
@@ -147,13 +147,13 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP,
{
// #69193a# respect "shared" setting
- BOOL bShareHeader = IS_SHARE_HEADER(rCoreSet);
+ sal_Bool bShareHeader = IS_SHARE_HEADER(rCoreSet);
if ( bShareHeader )
AddTabPage( 1, ScRightHeaderEditPage::Create, NULL );
else
AddTabPage( 1, ScLeftHeaderEditPage::Create, NULL );
- BOOL bShareFooter = IS_SHARE_FOOTER(rCoreSet);
+ sal_Bool bShareFooter = IS_SHARE_FOOTER(rCoreSet);
if ( bShareFooter )
AddTabPage( 2, ScRightFooterEditPage::Create, NULL );
else
@@ -174,7 +174,7 @@ ScHFEditDlg::~ScHFEditDlg()
// -----------------------------------------------------------------------
-void ScHFEditDlg::PageCreated( USHORT /* nId */, SfxTabPage& rPage )
+void ScHFEditDlg::PageCreated( sal_uInt16 /* nId */, SfxTabPage& rPage )
{
// kann ja nur ne ScHFEditPage sein...
diff --git a/sc/source/ui/pagedlg/hfedtdlg.src b/sc/source/ui/pagedlg/hfedtdlg.src
index b82497877763..bcfdef66b613 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.src
+++ b/sc/source/ui/pagedlg/hfedtdlg.src
@@ -70,13 +70,13 @@ TabDialog RID_SCDLG_HFED_HEADER
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
};
};
@@ -102,13 +102,13 @@ TabDialog RID_SCDLG_HFED_FOOTER
{
Identifier = 1 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 2 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -137,25 +137,25 @@ TabDialog RID_SCDLG_HFEDIT_ALL
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
PageItem
{
Identifier = 3 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 4 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -181,19 +181,19 @@ TabDialog RID_SCDLG_HFEDIT_SHDR
{
Identifier = 1 ;
HEADER
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 3 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -219,19 +219,19 @@ TabDialog RID_SCDLG_HFEDIT_SFTR
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
PageItem
{
Identifier = 3 ;
FOOTER
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
};
};
@@ -257,13 +257,13 @@ TabDialog RID_SCDLG_HFEDIT
{
Identifier = 1 ;
HEADER
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
FOOTER
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
};
};
@@ -289,13 +289,13 @@ TabDialog RID_SCDLG_HFEDIT_HEADER
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
};
};
@@ -321,13 +321,13 @@ TabDialog RID_SCDLG_HFEDIT_FOOTER
{
Identifier = 1 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 2 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -353,7 +353,7 @@ TabDialog RID_SCDLG_HFEDIT_RIGHTHEADER
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
};
};
@@ -379,7 +379,7 @@ TabDialog RID_SCDLG_HFEDIT_LEFTHEADER
{
Identifier = 1 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
};
};
@@ -405,7 +405,7 @@ TabDialog RID_SCDLG_HFEDIT_RIGHTFOOTER
{
Identifier = 1 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
};
};
@@ -431,7 +431,7 @@ TabDialog RID_SCDLG_HFEDIT_LEFTFOOTER
{
Identifier = 1 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
diff --git a/sc/source/ui/pagedlg/pagedlg.src b/sc/source/ui/pagedlg/pagedlg.src
index d02432d94cd9..0a56d70f966a 100644
--- a/sc/source/ui/pagedlg/pagedlg.src
+++ b/sc/source/ui/pagedlg/pagedlg.src
@@ -60,6 +60,7 @@ ModelessDialog RID_SCDLG_AREAS
};
ListBox LB_PRINTAREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_PRINTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
@@ -74,12 +75,14 @@ ModelessDialog RID_SCDLG_AREAS
};
Edit ED_PRINTAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_PRINTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 14 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
};
ImageButton RB_PRINTAREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_PRINTAREA";
Pos = MAP_APPFONT ( 239 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -93,6 +96,7 @@ ModelessDialog RID_SCDLG_AREAS
};
ListBox LB_REPEATROW
{
+ HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_REPEATROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
@@ -105,12 +109,14 @@ ModelessDialog RID_SCDLG_AREAS
};
Edit ED_REPEATROW
{
+ HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_REPEATROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 43 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
};
ImageButton RB_REPEATROW
{
+ HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_REPEATROW";
Pos = MAP_APPFONT ( 239 , 42 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -124,6 +130,7 @@ ModelessDialog RID_SCDLG_AREAS
};
ListBox LB_REPEATCOL
{
+ HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_REPEATCOL";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 72 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
@@ -136,12 +143,14 @@ ModelessDialog RID_SCDLG_AREAS
};
Edit ED_REPEATCOL
{
+ HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_REPEATCOL";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 72 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
};
ImageButton RB_REPEATCOL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_REPEATCOL";
Pos = MAP_APPFONT ( 239 , 71 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -158,6 +167,7 @@ TabPage RID_SCPAGE_TABLE
Size = MAP_APPFONT ( 260 , 185 ) ;
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_HEADER";
Pos = MAP_APPFONT ( 12 , 73 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Column and row headers" ;
@@ -165,6 +175,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_GRID
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_GRID";
Pos = MAP_APPFONT ( 12 , 87 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Grid" ;
@@ -172,6 +183,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_NOTES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_NOTES";
Pos = MAP_APPFONT ( 12 , 101 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Comments" ;
@@ -179,6 +191,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_OBJECTS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_OBJECTS";
Pos = MAP_APPFONT ( 12 , 115 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Objects/graphics" ;
@@ -186,6 +199,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_CHARTS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_CHARTS";
Pos = MAP_APPFONT ( 160 , 73 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "Ch~arts" ;
@@ -193,6 +207,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_DRAWINGS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_DRAWINGS";
Pos = MAP_APPFONT ( 160 , 87 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "~Drawing objects" ;
@@ -200,6 +215,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_FORMULAS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_FORMULAS";
Pos = MAP_APPFONT ( 160 , 101 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
@@ -207,6 +223,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_NULLVALS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_NULLVALS";
Pos = MAP_APPFONT ( 160 , 115 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "Zero ~values" ;
@@ -220,6 +237,7 @@ TabPage RID_SCPAGE_TABLE
};
RadioButton BTN_TOPDOWN
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_TABLE:BTN_TOPDOWN";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Top to bottom, then right" ;
@@ -227,6 +245,7 @@ TabPage RID_SCPAGE_TABLE
};
RadioButton BTN_LEFTRIGHT
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_TABLE:BTN_LEFTRIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Left to right, then down" ;
@@ -249,6 +268,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_PAGENO
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_PAGENO";
Pos = MAP_APPFONT ( 12 , 46 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "First ~page number" ;
@@ -256,6 +276,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_PAGENO
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_PAGENO";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 44 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -280,6 +301,7 @@ TabPage RID_SCPAGE_TABLE
};
ListBox LB_SCALEMODE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_TABLE:LB_SCALEMODE";
Border = TRUE;
Pos = MAP_APPFONT( 12, 155 );
Size = MAP_APPFONT( 124, 60 );
@@ -293,6 +315,7 @@ TabPage RID_SCPAGE_TABLE
};
MetricField ED_SCALEALL
{
+ HelpID = "sc:MetricField:RID_SCPAGE_TABLE:ED_SCALEALL";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 155 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -309,6 +332,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_SCALEPAGEWIDTH
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGEWIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 144 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -322,6 +346,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_SCALEPAGEHEIGHT
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGEHEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 160 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -335,6 +360,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_SCALEPAGENUM
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGENUM";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 155 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 3d57d39bbe17..dd47ce988480 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -69,19 +69,19 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT,
+static sal_uInt16 pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT,
SID_SCATTR_PAGE_HEADERRIGHT,
0 };
-static USHORT pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT,
+static sal_uInt16 pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT,
SID_SCATTR_PAGE_FOOTERRIGHT,
0 };
-static USHORT pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT,
+static sal_uInt16 pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT,
SID_SCATTR_PAGE_HEADERLEFT,
0 };
-static USHORT pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT,
+static sal_uInt16 pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT,
SID_SCATTR_PAGE_FOOTERLEFT,
0 };
@@ -94,9 +94,9 @@ static ScEditWindow* pActiveEdWnd = NULL;
//
ScHFEditPage::ScHFEditPage( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const SfxItemSet& rCoreAttrs,
- USHORT nWhichId,
+ sal_uInt16 nWhichId,
bool bHeader )
: SfxTabPage ( pParent, ScResId( nResId ), rCoreAttrs ),
@@ -208,7 +208,7 @@ void ScHFEditPage::Reset( const SfxItemSet& rCoreSet )
// -----------------------------------------------------------------------
-BOOL ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet )
{
ScPageHFItem aItem( nWhich );
EditTextObject* pLeft = aWndLeft .CreateTextObject();
@@ -224,7 +224,7 @@ BOOL ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet )
rCoreSet.Put( aItem );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -336,7 +336,7 @@ void ScHFEditPage::InitPreDefinedList()
void ScHFEditPage::InsertToDefinedList()
{
- USHORT nCount = maLbDefined.GetEntryCount();
+ sal_uInt16 nCount = maLbDefined.GetEntryCount();
if(nCount == eEntryCount)
{
String aCustomizedEntry(ScGlobal::GetRscString( STR_HF_CUSTOMIZED ) );
@@ -347,7 +347,7 @@ void ScHFEditPage::InsertToDefinedList()
void ScHFEditPage::RemoveFromDefinedList()
{
- USHORT nCount = maLbDefined.GetEntryCount();
+ sal_uInt16 nCount = maLbDefined.GetEntryCount();
if(nCount > eEntryCount )
maLbDefined.RemoveEntry( nCount-1);
}
@@ -374,8 +374,8 @@ void ScHFEditPage::SetSelectDefinedList()
bool bFound = false;
- USHORT i;
- USHORT nCount = maLbDefined.GetEntryCount();
+ sal_uInt16 i;
+ sal_uInt16 nCount = maLbDefined.GetEntryCount();
for(i = 0; i < nCount && !bFound; i++)
{
switch(static_cast<ScHFEntryId>(i))
@@ -542,7 +542,7 @@ void ScHFEditPage::SetSelectDefinedList()
if(eSelectEntry == eEntryCount)
InsertToDefinedList();
- maLbDefined.SelectEntryPos( sal::static_int_cast<USHORT>( eSelectEntry ) );
+ maLbDefined.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eSelectEntry ) );
}
bool ScHFEditPage::IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj)
@@ -925,7 +925,7 @@ ScRightHeaderEditPage::ScRightHeaderEditPage( Window* pParent, const SfxItemSet&
// -----------------------------------------------------------------------
-USHORT* ScRightHeaderEditPage::GetRanges()
+sal_uInt16* ScRightHeaderEditPage::GetRanges()
{ return pPageRightHeaderRanges; }
// -----------------------------------------------------------------------
@@ -945,7 +945,7 @@ ScLeftHeaderEditPage::ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& r
// -----------------------------------------------------------------------
-USHORT* ScLeftHeaderEditPage::GetRanges()
+sal_uInt16* ScLeftHeaderEditPage::GetRanges()
{ return pPageLeftHeaderRanges; }
// -----------------------------------------------------------------------
@@ -964,7 +964,7 @@ ScRightFooterEditPage::ScRightFooterEditPage( Window* pParent, const SfxItemSet&
// -----------------------------------------------------------------------
-USHORT* ScRightFooterEditPage::GetRanges()
+sal_uInt16* ScRightFooterEditPage::GetRanges()
{ return pPageRightFooterRanges; }
// -----------------------------------------------------------------------
@@ -983,7 +983,7 @@ ScLeftFooterEditPage::ScLeftFooterEditPage( Window* pParent, const SfxItemSet& r
// -----------------------------------------------------------------------
-USHORT* ScLeftFooterEditPage::GetRanges()
+sal_uInt16* ScLeftFooterEditPage::GetRanges()
{ return pPageLeftFooterRanges; }
// -----------------------------------------------------------------------
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 7e536683f4ff..824d64a0e287 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -60,15 +60,15 @@
// class ScHFPage
//==================================================================
-ScHFPage::ScHFPage( Window* pParent, USHORT nResId,
- const SfxItemSet& rSet, USHORT nSetId )
+ScHFPage::ScHFPage( Window* pParent, sal_uInt16 nResId,
+ const SfxItemSet& rSet, sal_uInt16 nSetId )
: SvxHFPage ( pParent, nResId, rSet, nSetId ),
aBtnEdit ( this, ScResId( RID_SCBTN_HFEDIT ) ),
aDataSet ( *rSet.GetPool(),
ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
ATTR_PAGE, ATTR_PAGE, 0 ),
- nPageUsage ( (USHORT)SVX_PAGE_ALL ),
+ nPageUsage ( (sal_uInt16)SVX_PAGE_ALL ),
pStyleDlg ( NULL )
{
SetExchangeSupport();
@@ -101,6 +101,8 @@ ScHFPage::ScHFPage( Window* pParent, USHORT nResId,
aBtnEdit.SetHelpId( HID_SC_HEADER_EDIT );
else
aBtnEdit.SetHelpId( HID_SC_FOOTER_EDIT );
+
+ aBtnEdit.SetAccessibleRelationMemberOf(&aFrm);
}
//------------------------------------------------------------------
@@ -119,9 +121,9 @@ void ScHFPage::Reset( const SfxItemSet& rSet )
//------------------------------------------------------------------
-BOOL ScHFPage::FillItemSet( SfxItemSet& rOutSet )
+sal_Bool ScHFPage::FillItemSet( SfxItemSet& rOutSet )
{
- BOOL bResult = SvxHFPage::FillItemSet( rOutSet );
+ sal_Bool bResult = SvxHFPage::FillItemSet( rOutSet );
if ( nId == SID_ATTR_PAGE_HEADERSET )
{
@@ -141,7 +143,7 @@ BOOL ScHFPage::FillItemSet( SfxItemSet& rOutSet )
void ScHFPage::ActivatePage( const SfxItemSet& rSet )
{
- USHORT nPageWhich = GetWhich( SID_ATTR_PAGE );
+ sal_uInt16 nPageWhich = GetWhich( SID_ATTR_PAGE );
const SvxPageItem& rPageItem = (const SvxPageItem&)
rSet.Get(nPageWhich);
@@ -219,7 +221,7 @@ IMPL_LINK( ScHFPage, HFEditHdl, void*, EMPTYARG )
if ( aCntSharedBox.IsEnabled()
&& !aCntSharedBox.IsChecked() )
{
- USHORT nResId = ( nId == SID_ATTR_PAGE_HEADERSET )
+ sal_uInt16 nResId = ( nId == SID_ATTR_PAGE_HEADERSET )
? RID_SCDLG_HFED_HEADER
: RID_SCDLG_HFED_FOOTER;
@@ -238,7 +240,7 @@ IMPL_LINK( ScHFPage, HFEditHdl, void*, EMPTYARG )
{
String aText;
SfxSingleTabDialog* pDlg = new SfxSingleTabDialog( this, aDataSet, 42 );
- BOOL bRightPage = aCntSharedBox.IsChecked()
+ sal_Bool bRightPage = aCntSharedBox.IsChecked()
|| ( SVX_PAGE_LEFT != SvxPageUsage(nPageUsage) );
if ( nId == SID_ATTR_PAGE_HEADERSET )
@@ -298,7 +300,7 @@ SfxTabPage* ScHeaderPage::Create( Window* pParent, const SfxItemSet& rCoreSet )
//------------------------------------------------------------------
-USHORT* ScHeaderPage::GetRanges()
+sal_uInt16* ScHeaderPage::GetRanges()
{
return SvxHeaderPage::GetRanges();
}
@@ -321,7 +323,7 @@ SfxTabPage* ScFooterPage::Create( Window* pParent, const SfxItemSet& rCoreSet )
//------------------------------------------------------------------
-USHORT* ScFooterPage::GetRanges()
+sal_uInt16* ScFooterPage::GetRanges()
{
return SvxHeaderPage::GetRanges();
}
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 7769f39bcd30..3a8730b5b09b 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -95,7 +95,7 @@ ScEditWindow::ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLo
eLocation(eLoc),
pAcc(NULL)
{
- EnableRTL(FALSE);
+ EnableRTL(false);
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
Color aBgColor = rStyleSettings.GetWindowColor();
@@ -107,7 +107,7 @@ ScEditWindow::ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLo
Size aSize( GetOutputSize() );
aSize.Height() *= 4;
- pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE );
+ pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True );
pEdEngine->SetPaperSize( aSize );
pEdEngine->SetRefDevice( this );
@@ -159,8 +159,8 @@ EditTextObject* ScEditWindow::CreateTextObject()
// (GetAttribs beim Format-Dialog-Aufruf gibt immer gesetzte Items zurueck)
const SfxItemSet& rEmpty = pEdEngine->GetEmptyItemSet();
- USHORT nParCnt = pEdEngine->GetParagraphCount();
- for (USHORT i=0; i<nParCnt; i++)
+ sal_uInt16 nParCnt = pEdEngine->GetParagraphCount();
+ for (sal_uInt16 i=0; i<nParCnt; i++)
pEdEngine->SetParaAttribs( i, rEmpty );
return pEdEngine->CreateTextObject();
@@ -212,7 +212,7 @@ void ScEditWindow::SetCharAttriutes()
if ( pDocSh && pViewSh )
{
- if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(TRUE);
+ if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(sal_True);
SfxItemSet aSet( pEdView->GetAttribs() );
@@ -230,7 +230,7 @@ void ScEditWindow::SetCharAttriutes()
pEdView->SetAttribs( aSet );
}
- if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(FALSE);
+ if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(false);
delete pDlg;
}
}
@@ -279,7 +279,7 @@ void ScEditWindow::MouseButtonUp( const MouseEvent& rMEvt )
void ScEditWindow::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nKey = rKEvt.GetKeyCode().GetModifier()
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetModifier()
+ rKEvt.GetKeyCode().GetCode();
if ( nKey == KEY_TAB || nKey == KEY_TAB + KEY_SHIFT )
@@ -362,7 +362,7 @@ ScExtIButton::ScExtIButton(Window* pParent, const ResId& rResId )
{
nSelected=0;
aTimer.SetTimeout(600);
- SetDropDown( TRUE);
+ SetDropDown( true);
}
void ScExtIButton::SetPopupMenu(ScPopupMenu* pPopUp)
@@ -370,7 +370,7 @@ void ScExtIButton::SetPopupMenu(ScPopupMenu* pPopUp)
pPopupMenu=pPopUp;
}
-USHORT ScExtIButton::GetSelected()
+sal_uInt16 ScExtIButton::GetSelected()
{
return nSelected;
}
@@ -405,7 +405,7 @@ void ScExtIButton::StartPopup()
if(pPopupMenu!=NULL)
{
- SetPressed( TRUE );
+ SetPressed( sal_True );
EndSelection();
Point aPoint(0,0);
aPoint.Y()=GetOutputSizePixel().Height();
@@ -416,13 +416,13 @@ void ScExtIButton::StartPopup()
{
aMLink.Call(this);
}
- SetPressed( FALSE);
+ SetPressed( false);
}
}
long ScExtIButton::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nSwitch=rNEvt.GetType();
+ sal_uInt16 nSwitch=rNEvt.GetType();
if(nSwitch==EVENT_MOUSEBUTTONUP)
{
MouseButtonUp(*rNEvt.GetMouseEvent());
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 56a37f438717..59d58f2913db 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -71,38 +71,38 @@ sal_Int64 EmptyNumericField::GetValue() const
// STATIC DATA -----------------------------------------------------------
-static USHORT pPageTableRanges[] =
+static sal_uInt16 pPageTableRanges[] =
{
ATTR_PAGE_NOTES, ATTR_PAGE_FIRSTPAGENO,
0
};
-BOOL lcl_PutVObjModeItem( USHORT nWhich,
+sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const CheckBox& rBtn );
-BOOL lcl_PutScaleItem( USHORT nWhich,
+sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const SpinField& rEd,
- UINT16 nValue );
+ sal_uInt16 nValue );
-BOOL lcl_PutScaleItem2( USHORT nWhich,
+sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const NumericField& rEd1,
const NumericField& rEd2 );
-BOOL lcl_PutBoolItem( USHORT nWhich,
+sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
- BOOL bIsChecked,
- BOOL bSavedValue );
+ sal_Bool bIsChecked,
+ sal_Bool bSavedValue );
//------------------------------------------------------------------------
@@ -110,9 +110,9 @@ BOOL lcl_PutBoolItem( USHORT nWhich,
#define PAGEDIR_HDL LINK(this,ScTablePage,PageDirHdl)
#define SCALE_HDL LINK(this,ScTablePage,ScaleHdl)
-#define WAS_DEFAULT(w,s) (SFX_ITEM_DEFAULT==(s).GetItemState((w),TRUE))
+#define WAS_DEFAULT(w,s) (SFX_ITEM_DEFAULT==(s).GetItemState((w),sal_True))
#define GET_BOOL(sid,set) ((const SfxBoolItem&)((set).Get(GetWhich((sid))))).GetValue()
-#define GET_USHORT(sid,set) (USHORT)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue()
+#define GET_USHORT(sid,set) (sal_uInt16)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue()
#define GET_SHOW(sid,set) ( ScVObjMode( ((const ScViewObjectModeItem&)((set).Get(GetWhich((sid))))).GetValue() ) \
== VOBJ_MODE_SHOW )
@@ -161,6 +161,9 @@ ScTablePage::ScTablePage( Window* pParent, const SfxItemSet& rCoreAttrs ) :
aBmpPageDir.SetOutputSizePixel( aBmpSize );
FreeResource();
+
+ aEdPageNo.SetAccessibleName(aBtnPageNo.GetText());
+ aEdPageNo.SetAccessibleRelationLabeledBy(&aBtnPageNo);
}
// -----------------------------------------------------------------------
@@ -179,7 +182,7 @@ ScTablePage::~ScTablePage()
//------------------------------------------------------------------------
-USHORT* ScTablePage::GetRanges()
+sal_uInt16* ScTablePage::GetRanges()
{
return pPageTableRanges;
}
@@ -195,11 +198,11 @@ SfxTabPage* ScTablePage::Create( Window* pParent, const SfxItemSet& rCoreSet )
void ScTablePage::Reset( const SfxItemSet& rCoreSet )
{
- BOOL bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet );
- USHORT nWhich = 0;
+ sal_Bool bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet );
+ sal_uInt16 nWhich = 0;
//-----------
- // BOOL-Flags
+ // sal_Bool-Flags
//-----------
aBtnNotes .Check( GET_BOOL(SID_SCATTR_PAGE_NOTES,rCoreSet) );
aBtnGrid .Check( GET_BOOL(SID_SCATTR_PAGE_GRID,rCoreSet) );
@@ -212,7 +215,7 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
//------------------
// Erste Druckseite:
//------------------
- USHORT nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,rCoreSet);
+ sal_uInt16 nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,rCoreSet);
aBtnPageNo.Check( nPage != 0 );
aEdPageNo.SetValue( (nPage != 0) ? nPage : 1 );
PageNoHdl( NULL );
@@ -229,20 +232,20 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
//------------
nWhich = GetWhich(SID_SCATTR_PAGE_SCALE);
- if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE )
{
- USHORT nScale = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
+ sal_uInt16 nScale = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
if( nScale > 0 )
aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_PERCENT );
aEdScaleAll.SetValue( (nScale > 0) ? nScale : 100 );
}
nWhich = GetWhich(SID_SCATTR_PAGE_SCALETO);
- if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE )
{
const ScPageScaleToItem& rItem = static_cast< const ScPageScaleToItem& >( rCoreSet.Get( nWhich ) );
- USHORT nWidth = rItem.GetWidth();
- USHORT nHeight = rItem.GetHeight();
+ sal_uInt16 nWidth = rItem.GetWidth();
+ sal_uInt16 nHeight = rItem.GetHeight();
/* width==0 and height==0 is invalid state, used as "not selected".
Dialog shows width=height=1 then. */
@@ -254,9 +257,9 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
}
nWhich = GetWhich(SID_SCATTR_PAGE_SCALETOPAGES);
- if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE )
{
- USHORT nPages = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
+ sal_uInt16 nPages = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
if( nPages > 0 )
aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_TO_PAGES );
aEdScalePageNum.SetValue( (nPages > 0) ? nPages : 1 );
@@ -295,14 +298,14 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
// -----------------------------------------------------------------------
-BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
{
const SfxItemSet& rOldSet = GetItemSet();
- USHORT nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO);
- BOOL bDataChanged = FALSE;
+ sal_uInt16 nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO);
+ sal_Bool bDataChanged = false;
//-----------
- // BOOL-Flags
+ // sal_Bool-Flags
//-----------
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NOTES),
@@ -338,7 +341,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
//------------------
// Erste Druckseite:
//------------------
- BOOL bUseValue = aBtnPageNo.IsChecked();
+ sal_Bool bUseValue = aBtnPageNo.IsChecked();
if ( WAS_DEFAULT(nWhichPageNo,rOldSet)
&& ( (!bUseValue && bUseValue == aBtnPageNo.GetSavedValue())
@@ -349,12 +352,12 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
}
else
{
- UINT16 nPage = (UINT16)( aBtnPageNo.IsChecked()
+ sal_uInt16 nPage = (sal_uInt16)( aBtnPageNo.IsChecked()
? aEdPageNo.GetValue()
: 0 );
rCoreSet.Put( SfxUInt16Item( nWhichPageNo, nPage ) );
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
//-------------------
@@ -383,7 +386,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALE),
rCoreSet, rOldSet,
aLbScaleMode, SC_TPTABLE_SCALE_PERCENT,
- aEdScaleAll, (UINT16)aEdScaleAll.GetValue() );
+ aEdScaleAll, (sal_uInt16)aEdScaleAll.GetValue() );
bDataChanged |= lcl_PutScaleItem2( GetWhich(SID_SCATTR_PAGE_SCALETO),
rCoreSet, rOldSet,
@@ -393,7 +396,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALETOPAGES),
rCoreSet, rOldSet,
aLbScaleMode, SC_TPTABLE_SCALE_TO_PAGES,
- aEdScalePageNum, (UINT16)aEdScalePageNum.GetValue() );
+ aEdScalePageNum, (sal_uInt16)aEdScalePageNum.GetValue() );
return bDataChanged;
}
@@ -471,13 +474,13 @@ IMPL_LINK( ScTablePage, ScaleHdl, ListBox*, EMPTYARG )
// Hilfsfunktionen fuer FillItemSet:
//========================================================================
-BOOL lcl_PutBoolItem( USHORT nWhich,
+sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
- BOOL bIsChecked,
- BOOL bSavedValue )
+ sal_Bool bIsChecked,
+ sal_Bool bSavedValue )
{
- BOOL bDataChanged = ( bSavedValue == bIsChecked
+ sal_Bool bDataChanged = ( bSavedValue == bIsChecked
&& WAS_DEFAULT(nWhich,rOldSet) );
if ( bDataChanged )
@@ -490,13 +493,13 @@ BOOL lcl_PutBoolItem( USHORT nWhich,
//------------------------------------------------------------------------
-BOOL lcl_PutVObjModeItem( USHORT nWhich,
+sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const CheckBox& rBtn )
{
- BOOL bIsChecked = rBtn.IsChecked();
- BOOL bDataChanged = ( rBtn.GetSavedValue() == bIsChecked
+ sal_Bool bIsChecked = rBtn.IsChecked();
+ sal_Bool bDataChanged = ( rBtn.GetSavedValue() == bIsChecked
&& WAS_DEFAULT(nWhich,rOldSet) );
if ( bDataChanged )
@@ -511,16 +514,16 @@ BOOL lcl_PutVObjModeItem( USHORT nWhich,
//------------------------------------------------------------------------
-BOOL lcl_PutScaleItem( USHORT nWhich,
+sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const SpinField& rEd,
- UINT16 nValue )
+ sal_uInt16 nValue )
{
- BOOL bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
- BOOL bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
+ sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
+ sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
(rEd.GetSavedValue() != rEd.GetText()) ||
!WAS_DEFAULT( nWhich, rOldSet );
@@ -533,18 +536,18 @@ BOOL lcl_PutScaleItem( USHORT nWhich,
}
-BOOL lcl_PutScaleItem2( USHORT nWhich,
+sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const NumericField& rEd1,
const NumericField& rEd2 )
{
- UINT16 nValue1 = (UINT16)rEd1.GetValue();
- UINT16 nValue2 = (UINT16)rEd2.GetValue();
- BOOL bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
- BOOL bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
+ sal_uInt16 nValue1 = (sal_uInt16)rEd1.GetValue();
+ sal_uInt16 nValue2 = (sal_uInt16)rEd2.GetValue();
+ sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
+ sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
(rEd1.GetSavedValue() != rEd1.GetText()) ||
(rEd2.GetSavedValue() != rEd2.GetText()) ||
!WAS_DEFAULT( nWhich, rOldSet );
diff --git a/sc/source/ui/src/attrdlg.src b/sc/source/ui/src/attrdlg.src
index bcdf62261fc2..d228a0cb03cb 100644
--- a/sc/source/ui/src/attrdlg.src
+++ b/sc/source/ui/src/attrdlg.src
@@ -109,6 +109,7 @@ TabPage RID_SCPAGE_PROTECTION
Size = MAP_APPFONT ( 260 , 185 ) ;
TriStateBox BTN_PROTECTED
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_PROTECTED";
Pos = MAP_APPFONT ( 22 , 28 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Protected" ;
@@ -116,6 +117,7 @@ TabPage RID_SCPAGE_PROTECTION
};
TriStateBox BTN_HIDE_FORMULAR
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_HIDE_FORMULAR";
Pos = MAP_APPFONT ( 22 , 42 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Hide ~formula" ;
@@ -123,6 +125,7 @@ TabPage RID_SCPAGE_PROTECTION
};
TriStateBox BTN_HIDE_ALL
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_HIDE_ALL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Hide ~all" ;
@@ -143,6 +146,7 @@ TabPage RID_SCPAGE_PROTECTION
};
TriStateBox BTN_HIDE_PRINT
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_HIDE_PRINT";
Pos = MAP_APPFONT ( 12 , 87 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Hide ~when printing" ;
diff --git a/sc/source/ui/src/autofmt.src b/sc/source/ui/src/autofmt.src
index b000de47914f..b6405c9d8c91 100644
--- a/sc/source/ui/src/autofmt.src
+++ b/sc/source/ui/src/autofmt.src
@@ -30,7 +30,7 @@
ModalDialog RID_SCDLG_AUTOFORMAT
{
OutputSize = TRUE ;
- HelpId = SID_AUTOFORMAT ;
+ HelpId = CMD_SID_AUTOFORMAT ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 312 , 121 ) ;
Text [ en-US ] = "AutoFormat" ;
@@ -38,6 +38,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
Closeable = FALSE ;
ListBox LB_FORMAT
{
+ HelpID = "sc:ListBox:RID_SCDLG_AUTOFORMAT:LB_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 101 ) ;
@@ -57,6 +58,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_ADJUST
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_ADJUST";
Hide = TRUE ;
Pos = MAP_APPFONT ( 172 , 146 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_BORDER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_BORDER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -73,6 +76,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_FONT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_FONT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 93 , 132 ) ;
Size = MAP_APPFONT ( 73 , 10 ) ;
@@ -81,6 +85,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_PATTERN
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_PATTERN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 93 , 146 ) ;
Size = MAP_APPFONT ( 73 , 10 ) ;
@@ -89,6 +94,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_ALIGNMENT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_ALIGNMENT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 172 , 132 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -97,6 +103,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_NUMFORMAT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_NUMFORMAT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -125,6 +132,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_AUTOFORMAT:BTN_MORE";
Pos = MAP_APPFONT ( 256 , 101 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -133,6 +141,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_AUTOFORMAT:BTN_ADD";
Pos = MAP_APPFONT ( 256 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add..." ;
@@ -140,6 +149,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_AUTOFORMAT:BTN_REMOVE";
Pos = MAP_APPFONT ( 256 , 81 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
diff --git a/sc/source/ui/src/condfrmt.src b/sc/source/ui/src/condfrmt.src
index cacfef8298e6..accbbbc8a654 100644
--- a/sc/source/ui/src/condfrmt.src
+++ b/sc/source/ui/src/condfrmt.src
@@ -38,6 +38,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
Hide = TRUE ;
CheckBox CBX_COND1
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONDFORMAT:CBX_COND1";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -45,6 +46,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND1_1
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND1_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 19 ) ;
Size = MAP_APPFONT ( 48 , 40 ) ;
@@ -58,6 +60,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND1_2
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND1_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 19 ) ;
Size = MAP_APPFONT ( 62 , 88 ) ;
@@ -79,6 +82,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND1_1
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND1_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 19 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -86,6 +90,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND1_1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND1_1";
Pos = MAP_APPFONT ( 167 , 18 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -100,6 +105,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND1_2
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND1_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 199 , 19 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -107,6 +113,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND1_2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND1_2";
Pos = MAP_APPFONT ( 242 , 18 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -121,6 +128,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND1_TEMPLATE
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND1_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 35 ) ;
Size = MAP_APPFONT ( 62 , 80 ) ;
@@ -130,6 +138,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
PushButton BTN_COND1_NEW
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONDFORMAT:BTN_COND1_NEW";
Pos = MAP_APPFONT ( 124 , 34 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -142,6 +151,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
CheckBox CBX_COND2
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONDFORMAT:CBX_COND2";
Pos = MAP_APPFONT ( 6 , 60 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -149,6 +159,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND2_1
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND2_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 73 ) ;
Size = MAP_APPFONT ( 48 , 40 ) ;
@@ -162,6 +173,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND2_2
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND2_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 73 ) ;
Size = MAP_APPFONT ( 62 , 88 ) ;
@@ -183,6 +195,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND2_1
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND2_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 73 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -190,6 +203,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND2_1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND2_1";
Pos = MAP_APPFONT ( 167 , 72 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -204,6 +218,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND2_2
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND2_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 199 , 73 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -211,6 +226,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND2_2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND2_2";
Pos = MAP_APPFONT ( 242 , 72 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -225,6 +241,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND2_TEMPLATE
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND2_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 89 ) ;
Size = MAP_APPFONT ( 62 , 80 ) ;
@@ -234,6 +251,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
PushButton BTN_COND2_NEW
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONDFORMAT:BTN_COND2_NEW";
Pos = MAP_APPFONT ( 124 , 88 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -246,6 +264,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
CheckBox CBX_COND3
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONDFORMAT:CBX_COND3";
Pos = MAP_APPFONT ( 6 , 114 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -253,6 +272,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND3_1
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND3_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 127 ) ;
Size = MAP_APPFONT ( 48 , 40 ) ;
@@ -266,6 +286,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND3_2
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND3_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 127 ) ;
Size = MAP_APPFONT ( 62 , 88 ) ;
@@ -287,6 +308,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND3_1
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND3_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 127 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -294,6 +316,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND3_1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND3_1";
Pos = MAP_APPFONT ( 167 , 126 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -308,6 +331,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND3_2
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND3_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 199 , 127 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -315,6 +339,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND3_2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND3_2";
Pos = MAP_APPFONT ( 242 , 126 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -329,6 +354,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND3_TEMPLATE
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND3_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 143 ) ;
Size = MAP_APPFONT ( 62 , 80 ) ;
@@ -338,6 +364,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
PushButton BTN_COND3_NEW
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONDFORMAT:BTN_COND3_NEW";
Pos = MAP_APPFONT ( 124 , 142 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/crnrdlg.src b/sc/source/ui/src/crnrdlg.src
index f3560abede75..29ed6772d896 100644
--- a/sc/source/ui/src/crnrdlg.src
+++ b/sc/source/ui/src/crnrdlg.src
@@ -43,6 +43,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
ListBox LB_RANGE
{
+ HelpID = "sc:ListBox:RID_SCDLG_COLROWNAMERANGES:LB_RANGE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 179 , 85 ) ;
TabStop = TRUE ;
@@ -51,6 +52,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
Edit ED_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_COLROWNAMERANGES:ED_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 165 , 12 ) ;
@@ -58,6 +60,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
ImageButton RB_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_COLROWNAMERANGES:RB_AREA";
Pos = MAP_APPFONT ( 179 , 104 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -65,6 +68,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
RadioButton BTN_COLHEAD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLROWNAMERANGES:BTN_COLHEAD";
Pos = MAP_APPFONT ( 20 , 121 ) ;
Size = MAP_APPFONT ( 171 , 10 ) ;
TabStop = TRUE ;
@@ -72,6 +76,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
RadioButton BTN_ROWHEAD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLROWNAMERANGES:BTN_ROWHEAD";
Pos = MAP_APPFONT ( 20 , 135 ) ;
Size = MAP_APPFONT ( 171 , 10 ) ;
TabStop = TRUE ;
@@ -85,6 +90,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
Edit ED_DATA
{
+ HelpID = "sc:Edit:RID_SCDLG_COLROWNAMERANGES:ED_DATA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 162 ) ;
Size = MAP_APPFONT ( 165 , 12 ) ;
@@ -92,6 +98,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
ImageButton RB_DATA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_COLROWNAMERANGES:RB_DATA";
Pos = MAP_APPFONT ( 179 , 161 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -111,6 +118,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_COLROWNAMERANGES:BTN_ADD";
Pos = MAP_APPFONT ( 200 , 104 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -119,6 +127,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_COLROWNAMERANGES:BTN_REMOVE";
Pos = MAP_APPFONT ( 200 , 122 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
diff --git a/sc/source/ui/src/dbnamdlg.src b/sc/source/ui/src/dbnamdlg.src
index c88491341310..88454229b5d4 100644
--- a/sc/source/ui/src/dbnamdlg.src
+++ b/sc/source/ui/src/dbnamdlg.src
@@ -28,7 +28,7 @@
ModelessDialog RID_SCDLG_DBNAMES
{
OutputSize = TRUE ;
- HelpId = SID_DEFINE_DBNAME ;
+ HelpId = CMD_SID_DEFINE_DBNAME ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 222 , 142 ) ;
@@ -43,6 +43,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
ComboBox ED_NAME
{
+ HelpID = "sc:ComboBox:RID_SCDLG_DBNAMES:ED_NAME";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 145 , 92 ) ;
TabStop = TRUE ;
@@ -56,6 +57,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
Edit ED_DBAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_DBNAMES:ED_DBAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 123 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
@@ -63,6 +65,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
ImageButton RB_DBAREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_DBNAMES:RB_DBAREA";
Pos = MAP_APPFONT ( 145 , 122 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -77,6 +80,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_HEADER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 153 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -85,6 +89,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_SIZE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_SIZE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 167 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -93,6 +98,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_FORMAT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_FORMAT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 181 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -101,6 +107,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_STRIPDATA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_STRIPDATA";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 195 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -135,6 +142,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_DBNAMES:BTN_ADD";
Pos = MAP_APPFONT ( 166 , 74 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -143,6 +151,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_DBNAMES:BTN_REMOVE";
Pos = MAP_APPFONT ( 166 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -156,6 +165,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_DBNAMES:BTN_MORE";
Pos = MAP_APPFONT ( 166 , 122 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/filter.src b/sc/source/ui/src/filter.src
index 52ce38db1516..ed501b782a8d 100644
--- a/sc/source/ui/src/filter.src
+++ b/sc/source/ui/src/filter.src
@@ -28,7 +28,7 @@
ModelessDialog RID_SCDLG_FILTER
{
OutputSize = TRUE ;
- HelpId = SID_FILTER ;
+ HelpId = CMD_SID_FILTER ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 279 , 121 ) ;
@@ -61,6 +61,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP1
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -74,6 +75,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP2
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -87,6 +89,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP3
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP3";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -100,6 +103,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP4
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP4";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 73 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -113,6 +117,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD1
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD1";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -121,6 +126,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD2
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -129,6 +135,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD3
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD3";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -137,6 +144,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD4
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD4";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 73 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -145,6 +153,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND1
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND1";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 25 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -172,6 +181,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND2
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND2";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 41 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -199,6 +209,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND3
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND3";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 57 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -226,6 +237,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND4
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND4";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 73 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -253,6 +265,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL1
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL1";
Pos = MAP_APPFONT ( 201 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -260,6 +273,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL2
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL2";
Pos = MAP_APPFONT ( 201 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -267,6 +281,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL3
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL3";
Pos = MAP_APPFONT ( 201 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -274,6 +289,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL4
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL4";
Pos = MAP_APPFONT ( 201 , 73 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -295,6 +311,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_CASE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 130 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -303,6 +320,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_REGEXP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_REGEXP";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 130 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
@@ -311,6 +329,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_HEADER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 144 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -319,6 +338,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_UNIQUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_UNIQUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 144 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
@@ -327,6 +347,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_COPY_RESULT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_COPY_RESULT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 158 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -335,6 +356,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_DEST_PERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_DEST_PERS";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 158 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
@@ -343,6 +365,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COPY_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 21 , 170 ) ;
@@ -352,6 +375,7 @@ ModelessDialog RID_SCDLG_FILTER
};
Edit ED_COPY_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_FILTER:ED_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 136 , 170 ) ;
@@ -360,6 +384,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ImageButton RB_COPY_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_FILTER:RB_COPY_AREA";
Pos = MAP_APPFONT ( 248 , 169 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -407,6 +432,7 @@ ModelessDialog RID_SCDLG_FILTER
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_FILTER:BTN_MORE";
Pos = MAP_APPFONT ( 6 , 101 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -423,7 +449,7 @@ ModelessDialog RID_SCDLG_FILTER
ModelessDialog RID_SCDLG_SPEC_FILTER
{
OutputSize = TRUE ;
- HelpId = SID_SPECIAL_FILTER ;
+ HelpId = CMD_SID_SPECIAL_FILTER ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 278 , 83 ) ;
@@ -438,6 +464,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ListBox LB_CRITERIA_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_SPEC_FILTER:LB_CRITERIA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -446,6 +473,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
Edit ED_CRITERIA_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_SPEC_FILTER:ED_CRITERIA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 14 ) ;
Size = MAP_APPFONT ( 99 , 12 ) ;
@@ -453,6 +481,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ImageButton RB_CRITERIA_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_CRITERIA_AREA";
Pos = MAP_APPFONT ( 201 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -460,6 +489,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_CASE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -468,6 +498,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_REGEXP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_REGEXP";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 43 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
@@ -476,6 +507,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_HEADER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -484,6 +516,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_UNIQUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_UNIQUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 57 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
@@ -492,6 +525,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_COPY_RESULT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_COPY_RESULT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 71 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -500,6 +534,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_DEST_PERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_DEST_PERS";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 71 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
@@ -508,6 +543,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ListBox LB_COPY_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_SPEC_FILTER:LB_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 20 , 83 ) ;
@@ -517,6 +553,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
Edit ED_COPY_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_SPEC_FILTER:ED_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 100 , 83 ) ;
@@ -525,6 +562,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ImageButton RB_COPY_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_COPY_AREA";
Pos = MAP_APPFONT ( 201 , 82 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -573,6 +611,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_SPEC_FILTER:BTN_MORE";
Pos = MAP_APPFONT ( 223 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -617,6 +656,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_OP1
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_OP1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -630,6 +670,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_OP2
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_OP2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -643,6 +684,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_FIELD1
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_FIELD1";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -651,6 +693,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_FIELD2
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_FIELD2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -659,6 +702,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_FIELD3
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_FIELD3";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -667,6 +711,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_COND1
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_COND1";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 25 ) ;
Size = MAP_APPFONT ( 47 , 65 ) ;
@@ -684,6 +729,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_COND2
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_COND2";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 41 ) ;
Size = MAP_APPFONT ( 47 , 65 ) ;
@@ -701,6 +747,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_COND3
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_COND3";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 57 ) ;
Size = MAP_APPFONT ( 47 , 65 ) ;
@@ -718,6 +765,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ComboBox ED_VAL1
{
+ HelpID = "sc:ComboBox:RID_SCDLG_PIVOTFILTER:ED_VAL1";
Pos = MAP_APPFONT ( 173 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -725,6 +773,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ComboBox ED_VAL2
{
+ HelpID = "sc:ComboBox:RID_SCDLG_PIVOTFILTER:ED_VAL2";
Pos = MAP_APPFONT ( 173 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -732,6 +781,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ComboBox ED_VAL3
{
+ HelpID = "sc:ComboBox:RID_SCDLG_PIVOTFILTER:ED_VAL3";
Pos = MAP_APPFONT ( 173 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -745,6 +795,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTFILTER:BTN_CASE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 221 , 10 ) ;
@@ -753,6 +804,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
CheckBox BTN_REGEXP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTFILTER:BTN_REGEXP";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 221 , 10 ) ;
@@ -761,6 +813,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
CheckBox BTN_UNIQUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTFILTER:BTN_UNIQUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 221 , 10 ) ;
@@ -810,6 +863,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_PIVOTFILTER:BTN_MORE";
Pos = MAP_APPFONT ( 242 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -818,3 +872,23 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
};
+String STR_COPY_AREA_TO
+{
+ Text [ en-US ] = "Copy results to" ;
+};
+String RID_FILTER_OPERATOR
+{
+ Text [ en-US ] = "Operator" ;
+};
+String RID_FILTER_FIELDNAME
+{
+ Text [ en-US ] = "Field Name" ;
+};
+String RID_FILTER_CONDITION
+{
+ Text [ en-US ] = "Condition" ;
+};
+String RID_FILTER_VALUE
+{
+ Text [ en-US ] = "Value" ;
+};
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 9c5caaee81d1..387b3ba14895 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -199,15 +199,15 @@ Resource RID_GLOBSTR
};
String STR_UNDO_PIVOT_NEW
{
- Text [ en-US ] = "Create DataPilot Table" ;
+ Text [ en-US ] = "Create pivot table" ;
};
String STR_UNDO_PIVOT_MODIFY
{
- Text [ en-US ] = "Edit DataPilot Table" ;
+ Text [ en-US ] = "Edit pivot table" ;
};
String STR_UNDO_PIVOT_DELETE
{
- Text [ en-US ] = "Delete DataPilot Table" ;
+ Text [ en-US ] = "Delete pivot table" ;
};
String STR_UNDO_CONSOLIDATE
{
@@ -523,7 +523,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_NODATA
{
- Text [ en-US ] = "The DataPilot table must contain at least one entry." ;
+ Text [ en-US ] = "The pivot table must contain at least one entry." ;
};
String STR_PIVOT_MOVENOTALLOWED
{
@@ -531,11 +531,11 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_ERROR
{
- Text [ en-US ] = "Error creating the Data Pilot Table." ;
+ Text [ en-US ] = "Error creating the pivot table." ;
};
String STR_PIVOT_OVERLAP
{
- Text [ en-US ] = "DataPilot tables can not overlap." ;
+ Text [ en-US ] = "Pivot tables can not overlap." ;
};
String STR_PIVOT_NOTEMPTY
{
@@ -547,7 +547,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_PROGRESS
{
- Text [ en-US ] = "Create DataPilot Table" ;
+ Text [ en-US ] = "Create Pivot Table" ;
};
String STR_PIVOT_TOTAL
{
@@ -695,7 +695,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_TABLE
{
- Text [ en-US ] = "DataPilot" ;
+ Text [ en-US ] = "Pivot Table" ;
};
// Text strings for captions of subtotal functions.
String STR_FUN_TEXT_SUM
@@ -740,7 +740,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_NOTFOUND
{
- Text [ en-US ] = "No DataPilot table found at this position." ;
+ Text [ en-US ] = "No pivot table found at this position." ;
};
String STR_EMPTYDATA
{
@@ -1039,7 +1039,7 @@ Resource RID_GLOBSTR
};
String STR_EXPORT_ASCII
{
- Text [ en-US ] = "Export of text files" ;
+ Text [ en-US ] = "Export Text File" ;
};
String STR_IMPORT_LOTUS
{
@@ -1472,27 +1472,27 @@ Resource RID_GLOBSTR
// Templates for data pilot tables.
String STR_PIVOT_STYLE_INNER
{
- Text [ en-US ] = "DataPilot Value" ;
+ Text [ en-US ] = "Pivot Table Value" ;
};
String STR_PIVOT_STYLE_RESULT
{
- Text [ en-US ] = "DataPilot Result" ;
+ Text [ en-US ] = "Pivot Table Result" ;
};
String STR_PIVOT_STYLE_CATEGORY
{
- Text [ en-US ] = "DataPilot Category" ;
+ Text [ en-US ] = "Pivot Table Category" ;
};
String STR_PIVOT_STYLE_TITLE
{
- Text [ en-US ] = "DataPilot Title" ;
+ Text [ en-US ] = "Pivot Table Title" ;
};
String STR_PIVOT_STYLE_FIELDNAME
{
- Text [ en-US ] = "DataPilot Field" ;
+ Text [ en-US ] = "Pivot Table Field" ;
};
String STR_PIVOT_STYLE_TOP
{
- Text [ en-US ] = "DataPilot Corner" ;
+ Text [ en-US ] = "Pivot Table Corner" ;
};
String STR_OPERATION_FILTER
{
@@ -1665,7 +1665,7 @@ Resource RID_GLOBSTR
String STR_ERR_DATAPILOT_INPUT
{
- Text[ en-US ] = "You cannot change this part of the DataPilot table.";
+ Text[ en-US ] = "You cannot change this part of the pivot table.";
};
String STR_RECALC_MANUAL
@@ -1801,7 +1801,7 @@ Resource RID_GLOBSTR
};
String STR_ERR_DATAPILOTSOURCE
{
- Text [ en-US ] = "DataPilot source data is invalid.";
+ Text [ en-US ] = "Pivot table source data is invalid.";
};
String STR_PIVOT_FIRSTROWEMPTYERR
{
@@ -1809,7 +1809,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_ONLYONEROWERR
{
- Text [ en-US ] = "DataPilot table needs at least two rows of data to create or refresh." ;
+ Text [ en-US ] = "Pivot table needs at least two rows of data to create or refresh." ;
};
String STR_OPTIONS_WARN_SEPARATORS
{
diff --git a/sc/source/ui/src/hdrcont.src b/sc/source/ui/src/hdrcont.src
index 5162b5976091..d84a868dc9b4 100644
--- a/sc/source/ui/src/hdrcont.src
+++ b/sc/source/ui/src/hdrcont.src
@@ -32,7 +32,7 @@
MenuItem\
{\
Identifier = FID_CELL_FORMAT ; \
- HelpId = FID_CELL_FORMAT ; \
+ HelpId = CMD_FID_CELL_FORMAT ; \
Text [ en-US ] = "~Format Cells..." ; \
};
@@ -41,13 +41,13 @@
MenuItem\
{\
Identifier = SID_CUT ; \
- HelpId = SID_CUT ; \
+ HelpId = CMD_SID_CUT ; \
Text [ en-US ] = "Cu~t" ; \
};\
MenuItem\
{\
Identifier = SID_COPY ; \
- HelpId = SID_COPY ; \
+ HelpId = CMD_SID_COPY ; \
Text [ en-US ] = "~Copy" ; \
};\
MenuItem\
@@ -106,13 +106,13 @@ Menu RID_POPUP_ROWHEADER
MenuItem
{
Identifier = FID_ROW_HIDE ;
- HelpId = FID_ROW_HIDE ;
+ HelpId = CMD_FID_ROW_HIDE ;
Text [ en-US ] = "~Hide" ;
};
MenuItem
{
Identifier = FID_ROW_SHOW ;
- HelpId = FID_ROW_SHOW ;
+ HelpId = CMD_FID_ROW_SHOW ;
Text [ en-US ] = "~Show" ;
};
//------------------------------
@@ -122,7 +122,7 @@ Menu RID_POPUP_ROWHEADER
MenuItem
{
Identifier = SID_PASTE_SPECIAL ;
- HelpId = SID_PASTE_SPECIAL ;
+ HelpId = CMD_SID_PASTE_SPECIAL ;
Text [ en-US ] = "P~aste Special..." ;
};
};
@@ -141,13 +141,13 @@ Menu RID_POPUP_COLHEADER
MenuItem
{
Identifier = FID_COL_WIDTH ;
- HelpId = FID_COL_WIDTH ;
+ HelpId = CMD_FID_COL_WIDTH ;
Text [ en-US ] = "Col~umn Width..." ;
};
MenuItem
{
Identifier = FID_COL_OPT_WIDTH ;
- HelpId = FID_COL_OPT_WIDTH ;
+ HelpId = CMD_FID_COL_OPT_WIDTH ;
Text [ en-US ] = "O~ptimal Column Width..." ;
};
//------------------------------
@@ -177,13 +177,13 @@ Menu RID_POPUP_COLHEADER
MenuItem
{
Identifier = FID_COL_HIDE ;
- HelpId = FID_COL_HIDE ;
+ HelpId = CMD_FID_COL_HIDE ;
Text [ en-US ] = "~Hide" ;
};
MenuItem
{
Identifier = FID_COL_SHOW ;
- HelpId = FID_COL_SHOW ;
+ HelpId = CMD_FID_COL_SHOW ;
Text [ en-US ] = "~Show" ;
};
//------------------------------
@@ -193,7 +193,7 @@ Menu RID_POPUP_COLHEADER
MenuItem
{
Identifier = SID_PASTE_SPECIAL ;
- HelpId = SID_PASTE_SPECIAL ;
+ HelpId = CMD_SID_PASTE_SPECIAL ;
Text [ en-US ] = "Paste ~Special..." ;
};
};
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index 6da360c708dd..531970af1072 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -30,7 +30,7 @@
ModalDialog RID_SCDLG_DELCELL
{
OutputSize = TRUE ;
- HelpId = FID_DELETE_CELL ;
+ HelpId = CMD_FID_DELETE_CELL ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 191 , 70 ) ;
Text [ en-US ] = "Delete Cells" ;
@@ -57,6 +57,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_DELCOLS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_DELCOLS";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Delete entire ~column(s)" ;
@@ -64,6 +65,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_DELROWS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_DELROWS";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Delete entire ~row(s)" ;
@@ -71,6 +73,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_CELLSLEFT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_CELLSLEFT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~left" ;
@@ -78,6 +81,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_CELLSUP
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_CELLSUP";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~up" ;
@@ -94,7 +98,7 @@ ModalDialog RID_SCDLG_DELCELL
ModalDialog RID_SCDLG_INSCELL
{
OutputSize = TRUE ;
- HelpId = FID_INS_CELL ;
+ HelpId = CMD_FID_INS_CELL ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 191 , 70 ) ;
Text [ en-US ] = "Insert Cells" ;
@@ -121,6 +125,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_INSCOLS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSCOLS";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Entire ~column" ;
@@ -128,6 +133,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_INSROWS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSROWS";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Entire ro~w" ;
@@ -135,6 +141,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_CELLSRIGHT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSRIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~right" ;
@@ -142,6 +149,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_CELLSDOWN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSDOWN";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~down" ;
@@ -158,7 +166,7 @@ ModalDialog RID_SCDLG_INSCELL
ModalDialog RID_SCDLG_DELCONT
{
OutputSize = TRUE ;
- HelpId = SID_DELETE ;
+ HelpId = CMD_SID_DELETE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 161 , 130 ) ;
Text [ en-US ] = "Delete Contents" ;
@@ -185,6 +193,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELALL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Delete ~all" ;
@@ -192,6 +201,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELSTRINGS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELSTRINGS";
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Text" ;
@@ -199,6 +209,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELNUMBERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELNUMBERS";
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Numbers" ;
@@ -206,6 +217,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELDATETIME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELDATETIME";
Pos = MAP_APPFONT ( 12 , 58 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Date & time" ;
@@ -213,6 +225,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELFORMULAS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELFORMULAS";
Pos = MAP_APPFONT ( 12 , 72 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
@@ -220,6 +233,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELATTRS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELATTRS";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "For~mats" ;
@@ -227,6 +241,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELNOTES
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELNOTES";
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Comments" ;
@@ -234,6 +249,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELOBJECTS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELOBJECTS";
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Objects" ;
@@ -251,7 +267,7 @@ ModalDialog RID_SCDLG_DELCONT
ModalDialog RID_SCDLG_INSCONT
{
OutputSize = TRUE ;
- HelpId = FID_INS_CELL_CONTENTS ;
+ HelpId = CMD_FID_INS_CELL_CONTENTS ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 187 ) ;
Text [ en-US ] = "Paste Special" ;
@@ -278,6 +294,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSALL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Paste all" ;
@@ -285,6 +302,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSSTRINGS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSSTRINGS";
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "Te~xt" ;
@@ -292,6 +310,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSNUMBERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSNUMBERS";
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Numbers" ;
@@ -299,6 +318,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSDATETIME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSDATETIME";
Pos = MAP_APPFONT ( 12 , 58 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Date & time" ;
@@ -306,6 +326,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSFORMULAS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSFORMULAS";
Pos = MAP_APPFONT ( 12 , 72 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
@@ -313,6 +334,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSATTRS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSATTRS";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "For~mats" ;
@@ -320,6 +342,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSOBJECTS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSOBJECTS";
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Objects" ;
@@ -327,6 +350,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSNOTES
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSNOTES";
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Comments" ;
@@ -340,30 +364,35 @@ ModalDialog RID_SCDLG_INSCONT
};
RadioButton BTN_OP_NOOP
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_NOOP";
Pos = MAP_APPFONT ( 111 , 14 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Non~e" ;
};
RadioButton BTN_OP_ADD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_ADD";
Pos = MAP_APPFONT ( 111 , 30 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Add" ;
};
RadioButton BTN_OP_SUB
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_SUB";
Pos = MAP_APPFONT ( 111 , 44 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Subtract" ;
};
RadioButton BTN_OP_MUL
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_MUL";
Pos = MAP_APPFONT ( 111 , 58 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Multipl~y" ;
};
RadioButton BTN_OP_DIV
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_DIV";
Pos = MAP_APPFONT ( 111 , 72 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Di~vide" ;
@@ -376,18 +405,21 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_SKIP_EMPTY
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_SKIP_EMPTY";
Pos = MAP_APPFONT ( 12 , 141 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "S~kip empty cells" ;
};
CheckBox BTN_TRANSPOSE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_TRANSPOSE";
Pos = MAP_APPFONT ( 12 , 155 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Transpose" ;
};
CheckBox BTN_LINK
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_LINK";
Pos = MAP_APPFONT ( 12 , 169 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Link" ;
@@ -400,18 +432,21 @@ ModalDialog RID_SCDLG_INSCONT
};
RadioButton BTN_MV_NONE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_MV_NONE";
Pos = MAP_APPFONT ( 111 , 141 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Don't sh~ift" ;
};
RadioButton BTN_MV_DOWN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_MV_DOWN";
Pos = MAP_APPFONT ( 111 , 155 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Do~wn" ;
};
RadioButton BTN_MV_RIGHT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_MV_RIGHT";
Pos = MAP_APPFONT ( 111 , 169 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Right" ;
@@ -437,7 +472,7 @@ ModalDialog RID_SCDLG_INSCONT
ModalDialog RID_SCDLG_MOVETAB
{
OutputSize = TRUE ;
- HelpId = FID_TAB_MOVE ;
+ HelpId = CMD_FID_TAB_MOVE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 158 , 236 ) ;
Text [ en-US ] = "Move/Copy Sheet" ;
@@ -501,6 +536,7 @@ ModalDialog RID_SCDLG_MOVETAB
};
ListBox LB_DEST
{
+ HelpID = "sc:ListBox:RID_SCDLG_MOVETAB:LB_DEST";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 65 ) ;
Size = MAP_APPFONT ( 134 , 60 ) ;
@@ -515,6 +551,7 @@ ModalDialog RID_SCDLG_MOVETAB
};
ListBox LB_INSERT
{
+ HelpID = "sc:ListBox:RID_SCDLG_MOVETAB:LB_INSERT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 93 ) ;
Size = MAP_APPFONT ( 134 , 62 ) ;
@@ -569,6 +606,7 @@ ModalDialog RID_SCDLG_MOVETAB
ModalDialog RID_SCDLG_STRINPUT
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_STRINPUT";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 178 , 63 ) ;
@@ -595,6 +633,7 @@ ModalDialog RID_SCDLG_STRINPUT
};
Edit ED_INPUT
{
+ HelpID = "sc:Edit:RID_SCDLG_STRINPUT:ED_INPUT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
@@ -609,6 +648,7 @@ ModalDialog RID_SCDLG_STRINPUT
ModalDialog RID_SCDLG_TAB_BG_COLOR
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_TAB_BG_COLOR";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 118 , 167 ) ;
@@ -656,7 +696,7 @@ ModalDialog RID_SCDLG_COL_MAN
{
Text [ en-US ] = "Column Width" ;
- HelpId = FID_COL_WIDTH ;
+ HelpId = CMD_FID_COL_WIDTH ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -689,6 +729,7 @@ ModalDialog RID_SCDLG_COL_MAN
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_COL_MAN:ED_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
Size = MAP_APPFONT ( 70 , 12 ) ;
@@ -698,6 +739,7 @@ ModalDialog RID_SCDLG_COL_MAN
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_COL_MAN:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -710,7 +752,7 @@ ModalDialog RID_SCDLG_COL_OPT
{
Text [ en-US ] = "Optimal Column Width" ;
- HelpId = FID_COL_OPT_WIDTH ;
+ HelpId = CMD_FID_COL_OPT_WIDTH ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -743,6 +785,7 @@ ModalDialog RID_SCDLG_COL_OPT
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_COL_OPT:ED_VALUE";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
@@ -753,6 +796,7 @@ ModalDialog RID_SCDLG_COL_OPT
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_COL_OPT:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -765,7 +809,7 @@ ModalDialog RID_SCDLG_ROW_MAN
{
Text [ en-US ] = "Row Height" ;
- HelpId = FID_ROW_HEIGHT ;
+ HelpId = CMD_FID_ROW_HEIGHT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -798,6 +842,7 @@ ModalDialog RID_SCDLG_ROW_MAN
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_ROW_MAN:ED_VALUE";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
@@ -808,6 +853,7 @@ ModalDialog RID_SCDLG_ROW_MAN
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ROW_MAN:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -820,7 +866,7 @@ ModalDialog RID_SCDLG_ROW_OPT
{
Text [ en-US ] = "Optimal Row Height" ;
- HelpId = FID_ROW_OPT_HEIGHT ;
+ HelpId = CMD_FID_ROW_OPT_HEIGHT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -853,6 +899,7 @@ ModalDialog RID_SCDLG_ROW_OPT
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_ROW_OPT:ED_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
Size = MAP_APPFONT ( 70 , 12 ) ;
@@ -862,6 +909,7 @@ ModalDialog RID_SCDLG_ROW_OPT
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ROW_OPT:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -876,7 +924,7 @@ ModalDialog RID_SCDLG_ROW_OPT
ModalDialog RID_SCDLG_SELECTDB
{
- HelpId = SID_SELECT_DB ;
+ HelpId = CMD_SID_SELECT_DB ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 168 , 100 ) ;
@@ -921,7 +969,7 @@ ModalDialog RID_SCDLG_SELECTDB
ModalDialog RID_SCDLG_SHOW_TAB
{
- HelpId = FID_TABLE_SHOW ;
+ HelpId = CMD_FID_TABLE_SHOW ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 168 , 100 ) ;
@@ -949,6 +997,7 @@ ModalDialog RID_SCDLG_SHOW_TAB
};
MultiListBox LB_ENTRYLIST
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_SHOW_TAB:LB_ENTRYLIST";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 19 ) ;
@@ -968,7 +1017,7 @@ ModalDialog RID_SCDLG_SHOW_TAB
ModalDialog RID_SCDLG_FILLSERIES
{
OutputSize = TRUE ;
- HelpId = FID_FILL_SERIES ;
+ HelpId = CMD_FID_FILL_SERIES ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 290 , 122 ) ;
Text [ en-US ] = "Fill Series" ;
@@ -976,6 +1025,7 @@ ModalDialog RID_SCDLG_FILLSERIES
Closeable = FALSE ;
RadioButton BTN_DAY
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DAY";
Pos = MAP_APPFONT ( 159 , 14 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "Da~y" ;
@@ -983,6 +1033,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_DAY_OF_WEEK
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DAY_OF_WEEK";
Pos = MAP_APPFONT ( 159 , 28 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "~Weekday" ;
@@ -990,6 +1041,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_MONTH
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_MONTH";
Pos = MAP_APPFONT ( 159 , 42 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "~Month" ;
@@ -997,6 +1049,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_YEAR
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_YEAR";
Pos = MAP_APPFONT ( 159 , 56 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "Y~ear" ;
@@ -1010,6 +1063,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_RIGHT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_RIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Right" ;
@@ -1017,6 +1071,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_LEFT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_LEFT";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Left" ;
@@ -1024,6 +1079,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_TOP
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_TOP";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Up" ;
@@ -1031,6 +1087,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_BOTTOM
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_BOTTOM";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Down" ;
@@ -1044,6 +1101,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_ARITHMETIC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_ARITHMETIC";
Pos = MAP_APPFONT ( 78 , 14 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "Li~near" ;
@@ -1051,6 +1109,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_GEOMETRIC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_GEOMETRIC";
Pos = MAP_APPFONT ( 78 , 28 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "~Growth" ;
@@ -1058,6 +1117,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_DATE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DATE";
Pos = MAP_APPFONT ( 78 , 42 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "Da~te" ;
@@ -1065,6 +1125,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_AUTOFILL
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_AUTOFILL";
Pos = MAP_APPFONT ( 78 , 56 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "~AutoFill" ;
@@ -1094,6 +1155,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
Edit ED_START_VALUES
{
+ HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_START_VALUES";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 72 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
@@ -1107,6 +1169,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
Edit ED_END_VALUES
{
+ HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_END_VALUES";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 88 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
@@ -1120,6 +1183,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
Edit ED_INCREMENT
{
+ HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_INCREMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 104 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
@@ -1160,6 +1224,7 @@ ModalDialog RID_SCDLG_FILLSERIES
ModalDialog RID_SCDLG_GROUP
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_GROUP";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 148 , 63 ) ;
@@ -1220,13 +1285,14 @@ ModalDialog RID_SCDLG_GROUP
};
// Ableitungen
-ModalDialog RID_SCDLG_GRP_MAKE < RID_SCDLG_GROUP { HelpId = SID_OUTLINE_MAKE ; };
-ModalDialog RID_SCDLG_GRP_KILL < RID_SCDLG_GROUP { HelpId = SID_OUTLINE_REMOVE ; };
+ModalDialog RID_SCDLG_GRP_MAKE < RID_SCDLG_GROUP { HelpId = CMD_SID_OUTLINE_MAKE ; };
+ModalDialog RID_SCDLG_GRP_KILL < RID_SCDLG_GROUP { HelpId = CMD_SID_OUTLINE_REMOVE ; };
// RID_SCDLG_COLORROW wird nur in der Optionen-Sortierlisten-Seite benutzt
ModalDialog RID_SCDLG_COLORROW
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_COLORROW";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 148 , 63 ) ;
@@ -1253,6 +1319,7 @@ ModalDialog RID_SCDLG_COLORROW
};
RadioButton BTN_GROUP_ROWS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLORROW:BTN_GROUP_ROWS";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 71 , 10 ) ;
TXT_ROWS
@@ -1260,6 +1327,7 @@ ModalDialog RID_SCDLG_COLORROW
};
RadioButton BTN_GROUP_COLS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLORROW:BTN_GROUP_COLS";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 71 , 10 ) ;
TXT_COLS
@@ -1276,11 +1344,12 @@ ModalDialog RID_SCDLG_NAMES_CREATE
{
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = FID_USE_NAME ;
+ HelpID = CMD_FID_USE_NAME ;
Size = MAP_APPFONT ( 174 , 72 ) ;
Moveable = TRUE ;
CheckBox BTN_TOP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_TOP";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1288,6 +1357,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
};
CheckBox BTN_LEFT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_LEFT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1295,6 +1365,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
};
CheckBox BTN_BOTTOM
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_BOTTOM";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1302,6 +1373,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
};
CheckBox BTN_RIGHT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_RIGHT";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1338,7 +1410,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
ModalDialog RID_SCDLG_NAMES_PASTE
{
OutputSize = TRUE ;
- HelpId = FID_INSERT_NAME ;
+ HelpId = CMD_FID_INSERT_NAME ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 228 , 85 ) ;
Moveable = TRUE ;
@@ -1350,6 +1422,7 @@ ModalDialog RID_SCDLG_NAMES_PASTE
};
ListBox LB_ENTRYLIST
{
+ HelpID = "sc:ListBox:RID_SCDLG_NAMES_PASTE:LB_ENTRYLIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 160 , 65 ) ;
@@ -1378,6 +1451,7 @@ ModalDialog RID_SCDLG_NAMES_PASTE
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_NAMES_PASTE:BTN_ADD";
Pos = MAP_APPFONT ( 172 , 66 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -1388,18 +1462,21 @@ ModalDialog RID_SCDLG_NAMES_PASTE
ModalDialog RID_SCDLG_CHARTCOLROW
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_CHARTCOLROW";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 191 , 63 ) ;
Moveable = TRUE ;
CheckBox 1
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:1";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "First ~column as label" ;
};
CheckBox 2
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:2";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "First ~row as label" ;
diff --git a/sc/source/ui/src/namedlg.src b/sc/source/ui/src/namedlg.src
index 079144ca4631..ab8cd31088e8 100644
--- a/sc/source/ui/src/namedlg.src
+++ b/sc/source/ui/src/namedlg.src
@@ -29,7 +29,7 @@
ModelessDialog RID_SCDLG_NAMES
{
OutputSize = TRUE ;
- HelpId = FID_DEFINE_NAME ;
+ HelpId = CMD_FID_DEFINE_NAME ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 222 , 142 ) ;
@@ -56,6 +56,7 @@ ModelessDialog RID_SCDLG_NAMES
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_NAMES:BTN_ADD";
Pos = MAP_APPFONT ( 166 , 74 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -64,6 +65,7 @@ ModelessDialog RID_SCDLG_NAMES
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_NAMES:BTN_REMOVE";
Pos = MAP_APPFONT ( 166 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -77,6 +79,7 @@ ModelessDialog RID_SCDLG_NAMES
};
ComboBox ED_NAME
{
+ HelpID = "sc:ComboBox:RID_SCDLG_NAMES:ED_NAME";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 145 , 92 ) ;
TabStop = TRUE ;
@@ -91,6 +94,7 @@ ModelessDialog RID_SCDLG_NAMES
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_NAMES:ED_ASSIGN";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 123 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
@@ -98,6 +102,7 @@ ModelessDialog RID_SCDLG_NAMES
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_NAMES:RB_ASSIGN";
Pos = MAP_APPFONT ( 145 , 122 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -105,6 +110,7 @@ ModelessDialog RID_SCDLG_NAMES
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_NAMES:BTN_MORE";
Pos = MAP_APPFONT ( 166 , 122 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -119,6 +125,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_PRINTAREA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_PRINTAREA";
Pos = MAP_APPFONT ( 12 , 153 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Print range" ;
@@ -126,6 +133,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_CRITERIA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_CRITERIA";
Pos = MAP_APPFONT ( 12 , 167 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Filter" ;
@@ -133,6 +141,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_ROWHEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_ROWHEADER";
Pos = MAP_APPFONT ( 75 , 167 ) ;
Size = MAP_APPFONT ( 82 , 10 ) ;
Text [ en-US ] = "Repeat ~row" ;
@@ -140,6 +149,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_COLHEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_COLHEADER";
Pos = MAP_APPFONT ( 75 , 153 ) ;
Size = MAP_APPFONT ( 82 , 10 ) ;
Text [ en-US ] = "Repeat ~column" ;
diff --git a/sc/source/ui/src/opredlin.src b/sc/source/ui/src/opredlin.src
index 86a5fc6498d4..fc29e8b0a0a1 100644
--- a/sc/source/ui/src/opredlin.src
+++ b/sc/source/ui/src/opredlin.src
@@ -35,7 +35,7 @@ TabPage RID_SCPAGE_OPREDLINE
Size = MAP_APPFONT ( 260 , 185 ) ;
FixedText FT_CONTENT
{
- HelpID = 1 ;
+ HelpID = HID_SCPAGE_OPREDLINBE_FT_CONTENT ;
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Chan~ges" ;
@@ -66,6 +66,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_CONTENT
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_CONTENT";
Pos = MAP_APPFONT ( 90 , 14 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
@@ -73,6 +74,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_REMOVE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_REMOVE";
Pos = MAP_APPFONT ( 90 , 30 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
@@ -80,6 +82,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_INSERT
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_INSERT";
Pos = MAP_APPFONT ( 90 , 46 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
@@ -87,6 +90,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_MOVE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_MOVE";
Pos = MAP_APPFONT ( 90 , 62 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index 65bba2a68846..f69d0febff4f 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -41,6 +41,7 @@ TabPage RID_SCPAGE_CALC
Size = MAP_APPFONT ( 260 , 185 ) ;
CheckBox BTN_ITERATE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_ITERATE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Iterations" ;
@@ -60,6 +61,7 @@ TabPage RID_SCPAGE_CALC
};
NumericField ED_STEPS
{
+ HelpID = "sc:NumericField:RID_SCPAGE_CALC:ED_STEPS";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 26 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
@@ -70,6 +72,7 @@ TabPage RID_SCPAGE_CALC
};
Edit ED_EPS
{
+ HelpID = "sc:Edit:RID_SCPAGE_CALC:ED_EPS";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 42 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
@@ -82,6 +85,7 @@ TabPage RID_SCPAGE_CALC
};
RadioButton BTN_DATESTD
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_CALC:BTN_DATESTD";
Pos = MAP_APPFONT ( 139 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "12/30/1899 (defa~ult)" ;
@@ -89,6 +93,7 @@ TabPage RID_SCPAGE_CALC
};
RadioButton BTN_DATESC10
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_CALC:BTN_DATESC10";
Pos = MAP_APPFONT ( 139 , 28 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "01/01/1900 (Star~Calc 1.0)" ;
@@ -96,6 +101,7 @@ TabPage RID_SCPAGE_CALC
};
RadioButton BTN_DATE1904
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_CALC:BTN_DATE1904";
Pos = MAP_APPFONT ( 139 , 42 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~01/01/1904" ;
@@ -114,36 +120,42 @@ TabPage RID_SCPAGE_CALC
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_CASE";
Pos = MAP_APPFONT ( 12 , 77 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Text [ en-US ] = "Case se~nsitive" ;
};
CheckBox BTN_CALC
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_CALC";
Pos = MAP_APPFONT ( 12 , 91 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Precision as shown" ;
};
CheckBox BTN_MATCH
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_MATCH";
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Search criteria = and <> must apply to ~whole cells" ;
};
CheckBox BTN_REGEX
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_REGEX";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Enable regular expressions in formulas" ;
};
CheckBox BTN_LOOKUP
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_LOOKUP";
Pos = MAP_APPFONT ( 12 , 133 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Automatically find column and row labels " ;
};
CheckBox BTN_GENERAL_PREC
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_GENERAL_PREC";
Pos = MAP_APPFONT ( 12 , 147 ) ;
Size = MAP_APPFONT ( 164 , 10 ) ;
Text [ en-US ] = "~Limit decimals for general number format" ;
@@ -157,6 +169,7 @@ TabPage RID_SCPAGE_CALC
};
NumericField ED_PREC
{
+ HelpID = "sc:NumericField:RID_SCPAGE_CALC:ED_PREC";
Border = TRUE ;
Pos = MAP_APPFONT ( 226 , 145 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
@@ -330,6 +343,7 @@ TabPage RID_SCPAGE_USERLISTS
};
ListBox LB_LISTS
{
+ HelpID = "sc:ListBox:RID_SCPAGE_USERLISTS:LB_LISTS";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 15 ) ;
Size = MAP_APPFONT ( 93 , 148 ) ;
@@ -342,6 +356,7 @@ TabPage RID_SCPAGE_USERLISTS
};
MultiLineEdit ED_ENTRIES
{
+ HelpID = "sc:MultiLineEdit:RID_SCPAGE_USERLISTS:ED_ENTRIES";
Border = TRUE ;
Pos = MAP_APPFONT ( 105 , 15 ) ;
Size = MAP_APPFONT ( 93 , 148 ) ;
@@ -350,6 +365,7 @@ TabPage RID_SCPAGE_USERLISTS
};
Edit ED_COPYFROM
{
+ HelpID = "sc:Edit:RID_SCPAGE_USERLISTS:ED_COPYFROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 167 ) ;
Size = MAP_APPFONT ( 128 , 12 ) ;
@@ -362,12 +378,14 @@ TabPage RID_SCPAGE_USERLISTS
};
PushButton BTN_NEW
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_NEW";
Pos = MAP_APPFONT ( 204 , 15 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~New" ;
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_ADD";
Pos = MAP_APPFONT ( 204 , 36 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -375,12 +393,14 @@ TabPage RID_SCPAGE_USERLISTS
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_REMOVE";
Pos = MAP_APPFONT ( 204 , 54 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
};
PushButton BTN_COPY
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_COPY";
Pos = MAP_APPFONT ( 204 , 166 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Copy" ;
@@ -428,6 +448,7 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_GRID
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_GRID";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Grid lines" ;
@@ -440,6 +461,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_COLOR
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_COLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 26 ) ;
Size = MAP_APPFONT ( 70 , 86 ) ;
@@ -448,24 +470,28 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_PAGEBREAKS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_PAGEBREAKS";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Page breaks" ;
};
CheckBox CB_GUIDELINE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_GUIDELINE";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Guides ~while moving";
};
CheckBox CB_HANDLES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_HANDLES";
Pos = MAP_APPFONT ( 12 , 70 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Simple handles";
};
CheckBox CB_BIGHANDLES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_BIGHANDLES";
Pos = MAP_APPFONT ( 12 , 84 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Large handles";
@@ -483,42 +509,49 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_FORMULA
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_FORMULA";
Pos = MAP_APPFONT ( 139 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
};
CheckBox CB_NIL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_NIL";
Pos = MAP_APPFONT ( 139 , 27 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Zero val~ues" ;
};
CheckBox CB_ANNOT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_ANNOT";
Pos = MAP_APPFONT ( 139 , 40 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Comment indicator" ;
};
CheckBox CB_VALUE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_VALUE";
Pos = MAP_APPFONT ( 139 , 53 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Value h~ighlighting" ;
};
CheckBox CB_ANCHOR
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_ANCHOR";
Pos = MAP_APPFONT ( 139 , 66 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Anchor" ;
};
CheckBox CB_CLIP
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_CLIP";
Pos = MAP_APPFONT ( 139 , 79 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Te~xt overflow" ;
};
CheckBox CB_RFIND
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_RFIND";
Pos = MAP_APPFONT ( 139 , 92 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Show references in color" ;
@@ -537,6 +570,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_OBJGRF
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_OBJGRF";
Pos = MAP_APPFONT ( 84 , 111 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
Border = TRUE ;
@@ -555,6 +589,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_DIAGRAM
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_DIAGRAM";
Pos = MAP_APPFONT ( 84 , 127 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
Border = TRUE ;
@@ -574,6 +609,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_DRAW
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_DRAW";
Pos = MAP_APPFONT ( 84 , 143 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
Border = TRUE ;
@@ -593,6 +629,7 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_SYNCZOOM
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_SYNCZOOM";
Pos = MAP_APPFONT ( 12 , 171 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "S~ynchronize sheets" ;
@@ -610,30 +647,35 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_ROWCOLHEADER
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_ROWCOLHEADER";
Pos = MAP_APPFONT ( 139 , 119 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Colu~mn/row headers" ;
};
CheckBox CB_HSCROLL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_HSCROLL";
Pos = MAP_APPFONT ( 139 , 132 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Hori~zontal scroll bar" ;
};
CheckBox CB_VSCROLL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_VSCROLL";
Pos = MAP_APPFONT ( 139 , 145 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Vertical scroll bar" ;
};
CheckBox CB_TBLREG
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_TBLREG";
Pos = MAP_APPFONT ( 139 , 158 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Sh~eet tabs" ;
};
CheckBox CB_OUTLINE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_OUTLINE";
Pos = MAP_APPFONT ( 139 , 171 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Outline symbols" ;
@@ -668,6 +710,7 @@ TabPage RID_SCPAGE_LAYOUT
};
ListBox LB_UNIT
{
+ HelpID = "sc:ListBox:RID_SCPAGE_LAYOUT:LB_UNIT";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 14 ) ;
Size = MAP_APPFONT ( 46 , 52 ) ;
@@ -696,6 +739,7 @@ TabPage RID_SCPAGE_LAYOUT
};
MetricField MF_TAB
{
+ HelpID = "sc:MetricField:RID_SCPAGE_LAYOUT:MF_TAB";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 30 ) ;
Size = MAP_APPFONT ( 46 , 12 ) ;
@@ -729,6 +773,7 @@ TabPage RID_SCPAGE_LAYOUT
};
RadioButton RB_ALWAYS
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_LAYOUT:RB_ALWAYS";
Pos = MAP_APPFONT ( 139 , 25 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
TabStop = TRUE ;
@@ -736,6 +781,7 @@ TabPage RID_SCPAGE_LAYOUT
};
RadioButton RB_REQUEST
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_LAYOUT:RB_REQUEST";
Pos = MAP_APPFONT ( 139 , 39 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
TabStop = TRUE ;
@@ -743,6 +789,7 @@ TabPage RID_SCPAGE_LAYOUT
};
RadioButton RB_NEVER
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_LAYOUT:RB_NEVER";
Pos = MAP_APPFONT ( 139 , 53 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
TabStop = TRUE ;
@@ -756,12 +803,14 @@ TabPage RID_SCPAGE_LAYOUT
};
CheckBox CB_ALIGN
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_ALIGN";
Pos = MAP_APPFONT ( 12 , 82 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "Press Enter to ~move selection" ;
};
ListBox LB_ALIGN
{
+ HelpID = "sc:ListBox:RID_SCPAGE_LAYOUT:LB_ALIGN";
Pos = MAP_APPFONT ( 191 , 80 ) ;
Size = MAP_APPFONT ( 60 , 60 ) ;
Border = TRUE ;
@@ -777,36 +826,42 @@ TabPage RID_SCPAGE_LAYOUT
};
CheckBox CB_EDITMODE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_EDITMODE";
Pos = MAP_APPFONT ( 12 , 96 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Press Enter to switch to ~edit mode" ;
};
CheckBox CB_FORMAT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_FORMAT";
Pos = MAP_APPFONT ( 12 , 110 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Expand ~formatting" ;
};
CheckBox CB_EXPREF
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_EXPREF";
Pos = MAP_APPFONT ( 12 , 124 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Expand ~references when new columns/rows are inserted" ;
};
CheckBox CB_MARKHDR
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_MARKHDR";
Pos = MAP_APPFONT ( 12 , 138 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Highlight sele~ction in column/row headers" ;
};
CheckBox CB_TEXTFMT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_TEXTFMT";
Pos = MAP_APPFONT ( 12 , 152 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Use printer metrics for text formatting";
};
CheckBox CB_REPLWARN
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_REPLWARN";
Pos = MAP_APPFONT ( 12 , 166 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Show overwrite ~warning when pasting data";
@@ -834,6 +889,7 @@ TabPage RID_SCPAGE_PRINT
};
CheckBox BTN_SKIPEMPTYPAGES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_PRINT:BTN_SKIPEMPTYPAGES";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Suppress output of empty pages";
@@ -846,6 +902,7 @@ TabPage RID_SCPAGE_PRINT
};
CheckBox BTN_SELECTEDSHEETS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_PRINT:BTN_SELECTEDSHEETS";
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Print only selected sheets";
diff --git a/sc/source/ui/src/optsolver.src b/sc/source/ui/src/optsolver.src
index 5ce6fa724475..e5954f51f0cd 100644
--- a/sc/source/ui/src/optsolver.src
+++ b/sc/source/ui/src/optsolver.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_OPTSOLVER
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_OPTSOLVER ;
+ HelpId = CMD_SID_OPENDLG_OPTSOLVER ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 230 , 210 ) ;
@@ -46,6 +46,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_OBJECTIVECELL
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_OBJECTIVECELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 67 , 6 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
@@ -53,6 +54,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_OBJECTIVECELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_OBJECTIVECELL";
Pos = MAP_APPFONT ( 199 , 5 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -67,6 +69,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
RadioButton RB_MAX
{
+ HelpID = "sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_MAX";
Pos = MAP_APPFONT ( 67 , 24 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Maximum" ;
@@ -74,6 +77,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
RadioButton RB_MIN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_MIN";
Pos = MAP_APPFONT ( 67 , 38 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Minimum" ;
@@ -81,6 +85,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
RadioButton RB_VALUE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_VALUE";
Pos = MAP_APPFONT ( 67 , 52 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "Value of" ;
@@ -88,6 +93,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_TARGET
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_TARGET";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 50 ) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
@@ -95,6 +101,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_TARGET
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_TARGET";
Pos = MAP_APPFONT ( 199 , 49 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -109,6 +116,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_VARIABLECELLS
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_VARIABLECELLS";
Border = TRUE ;
Pos = MAP_APPFONT ( 67 , 66 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
@@ -116,6 +124,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_VARIABLECELLS
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_VARIABLECELLS";
Pos = MAP_APPFONT ( 199 , 65 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -150,6 +159,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT1
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -157,6 +167,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT1";
Pos = MAP_APPFONT ( 67 , 113 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -164,6 +175,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP1
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP1";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 114 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -180,6 +192,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT1
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT1";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 114 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -187,6 +200,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT1";
Pos = MAP_APPFONT ( 183 , 113 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -194,6 +208,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE1";
Pos = MAP_APPFONT ( 199 , 113 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -203,6 +218,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT2
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 129 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -210,6 +226,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT2";
Pos = MAP_APPFONT ( 67 , 128 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -217,6 +234,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP2
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP2";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 129 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -233,6 +251,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT2
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT2";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 129 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -240,6 +259,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT2";
Pos = MAP_APPFONT ( 183 , 128 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -247,6 +267,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE2";
Pos = MAP_APPFONT ( 199 , 128 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -256,6 +277,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT3
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT3";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 144 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -263,6 +285,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT3
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT3";
Pos = MAP_APPFONT ( 67 , 143 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -270,6 +293,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP3
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP3";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 144 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -286,6 +310,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT3
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT3";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 144 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -293,6 +318,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT3
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT3";
Pos = MAP_APPFONT ( 183 , 143 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -300,6 +326,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE3
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE3";
Pos = MAP_APPFONT ( 199 , 143 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -309,6 +336,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT4
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT4";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 159 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -316,6 +344,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT4
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT4";
Pos = MAP_APPFONT ( 67 , 158 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -323,6 +352,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP4
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP4";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 159 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -339,6 +369,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT4
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT4";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 159 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -346,6 +377,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT4
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT4";
Pos = MAP_APPFONT ( 183 , 158 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -353,6 +385,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE4
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE4";
Pos = MAP_APPFONT ( 199 , 158 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -375,6 +408,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
PushButton BTN_OPTIONS
{
+ HelpID = "sc:PushButton:RID_SCDLG_OPTSOLVER:BTN_OPTIONS";
Pos = MAP_APPFONT ( 6 , 190 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -395,6 +429,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
PushButton BTN_SOLVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_OPTSOLVER:BTN_SOLVE";
Pos = MAP_APPFONT ( 174 , 190 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src
index 065b05ff0fe9..f12667ebf818 100644
--- a/sc/source/ui/src/popup.src
+++ b/sc/source/ui/src/popup.src
@@ -52,7 +52,7 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = FID_CELL_FORMAT ;
- HelpId = FID_CELL_FORMAT ;
+ HelpId = CMD_FID_CELL_FORMAT ;
Text [ en-US ] = "~Format Cells..." ;
};
//------------------------------
@@ -61,19 +61,19 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = FID_INS_CELL ;
- HelpId = FID_INS_CELL ;
+ HelpId = CMD_FID_INS_CELL ;
Text [ en-US ] = "~Insert..." ;
};
MenuItem
{
Identifier = FID_DELETE_CELL ;
- HelpId = FID_DELETE_CELL ;
+ HelpId = CMD_FID_DELETE_CELL ;
Text [ en-US ] = "De~lete..." ;
};
MenuItem
{
Identifier = SID_DELETE ;
- HelpId = SID_DELETE ;
+ HelpId = CMD_SID_DELETE ;
Text [ en-US ] = "Delete C~ontents..." ;
};
//------------------------------
@@ -82,19 +82,19 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = SID_INSERT_POSTIT ;
- HelpId = SID_INSERT_POSTIT ;
+ HelpId = CMD_SID_INSERT_POSTIT ;
Text [ en-US ] = "Insert Co~mment" ;
};
MenuItem
{
Identifier = SID_DELETE_NOTE ;
- HelpId = SID_DELETE_NOTE ;
+ HelpId = CMD_SID_DELETE_NOTE ;
Text [ en-US ] = "D~elete Comment" ;
};
MenuItem
{
Identifier = FID_NOTE_VISIBLE ;
- HelpId = FID_NOTE_VISIBLE ;
+ HelpId = CMD_FID_NOTE_VISIBLE ;
Text [ en-US ] = "Sho~w Comment" ;
};
//------------------------------
@@ -104,27 +104,27 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = SID_CUT ;
- HelpId = SID_CUT ;
+ HelpId = CMD_SID_CUT ;
Text [ en-US ] = "Cu~t" ;
};
MenuItem
{
Identifier = SID_COPY ;
- HelpId = SID_COPY ;
+ HelpId = CMD_SID_COPY ;
Text [ en-US ] = "~Copy" ;
};
MenuItem
{
Identifier = SID_PASTE ;
- HelpID = SID_PASTE ;
+ HelpID = CMD_SID_PASTE ;
Text [ en-US ] = "~Paste" ;
};
MenuItem
{
Identifier = SID_PASTE_SPECIAL ;
- HelpId = SID_PASTE_SPECIAL ;
+ HelpId = CMD_SID_PASTE_SPECIAL ;
Text [ en-US ] = "P~aste Special..." ;
};
//------------------------------
@@ -133,7 +133,7 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = SID_DATA_SELECT ;
- HelpId = SID_DATA_SELECT ;
+ HelpId = CMD_SID_DATA_SELECT ;
Text [ en-US ] = "~Selection List..." ;
};
};
@@ -151,49 +151,49 @@ Menu RID_POPUP_TAB
MenuItem
{
Identifier = FID_INS_TABLE ;
- HelpId = FID_INS_TABLE ;
+ HelpId = CMD_FID_INS_TABLE ;
Text [ en-US ] = "~Insert Sheet..." ;
};
MenuItem
{
Identifier = FID_DELETE_TABLE ;
- HelpId = FID_DELETE_TABLE ;
+ HelpId = CMD_FID_DELETE_TABLE ;
Text [ en-US ] = "~Delete Sheet..." ;
};
MenuItem
{
Identifier = FID_TAB_MENU_RENAME ;
- HelpId = FID_TAB_MENU_RENAME ;
+ HelpId = CMD_FID_TAB_MENU_RENAME ;
Text [ en-US ] = "~Rename Sheet..." ;
};
MenuItem
{
Identifier = FID_TAB_MOVE ;
- HelpId = FID_TAB_MOVE ;
+ HelpId = CMD_FID_TAB_MOVE ;
Text [ en-US ] = "~Move/Copy Sheet..." ;
};
MenuItem
{
Identifier = FID_TAB_SELECTALL ;
- HelpId = FID_TAB_SELECTALL ;
+ HelpId = CMD_FID_TAB_SELECTALL ;
Text [ en-US ] = "Select All S~heets" ;
};
MenuItem
{
Identifier = FID_TAB_DESELECTALL ;
- HelpId = FID_TAB_DESELECTALL ;
+ HelpId = CMD_FID_TAB_DESELECTALL ;
Text [ en-US ] = "D~eselect All Sheets" ;
};
MenuItem
{
Identifier = FID_TAB_RTL ;
- HelpId = FID_TAB_RTL ;
+ HelpId = CMD_FID_TAB_RTL ;
Text [ en-US ] = "S~heet Right-To-Left" ;
};
MenuItem
{
Identifier = FID_TAB_EVENTS ;
- HelpId = FID_TAB_EVENTS ;
+ HelpId = CMD_FID_TAB_EVENTS ;
Text [ en-US ] = "Sheet E~vents..." ;
};
//------------------------------
@@ -202,7 +202,7 @@ Menu RID_POPUP_TAB
MenuItem
{
Identifier = FID_TAB_MENU_SET_TAB_BG_COLOR ;
- HelpId = FID_TAB_MENU_SET_TAB_BG_COLOR ;
+ HelpId = CMD_FID_TAB_MENU_SET_TAB_BG_COLOR ;
Text [ en-US ] = "~Tab Color..." ;
};
};
@@ -210,7 +210,7 @@ Menu RID_POPUP_TAB
String RID_POPUP_PIVOT
{
- Text [ en-US ] = "DataPilot pop-up menu" ;
+ Text [ en-US ] = "Pivot table pop-up menu" ;
};
Menu RID_POPUP_PIVOT
@@ -220,25 +220,25 @@ Menu RID_POPUP_PIVOT
MenuItem
{
Identifier = SID_OPENDLG_PIVOTTABLE ;
- HelpId = SID_OPENDLG_PIVOTTABLE ;
- Text [ en-US ] = "~Start..." ;
+ HelpId = CMD_SID_OPENDLG_PIVOTTABLE ;
+ Text [ en-US ] = "~Edit Layout..." ;
};
MenuItem
{
Identifier = SID_PIVOT_RECALC ;
- HelpId = SID_PIVOT_RECALC ;
+ HelpId = CMD_SID_PIVOT_RECALC ;
Text [ en-US ] = "~Refresh" ;
};
MenuItem
{
Identifier = SID_DP_FILTER ;
- HelpId = SID_DP_FILTER ;
+ HelpId = CMD_SID_DP_FILTER ;
Text [ en-US ] = "~Filter..." ;
};
MenuItem
{
Identifier = SID_PIVOT_KILL ;
- HelpId = SID_PIVOT_KILL ;
+ HelpId = CMD_SID_PIVOT_KILL ;
Text [ en-US ] = "~Delete" ;
};
};
@@ -256,32 +256,32 @@ Menu RID_POPUP_PREVIEW
MenuItem
{
Identifier = SID_PREVIEW_PREVIOUS ;
- HelpId = SID_PREVIEW_PREVIOUS ;
+ HelpId = CMD_SID_PREVIEW_PREVIOUS ;
Text [ en-US ] = "~Previous Page" ;
};
MenuItem
{
Identifier = SID_PREVIEW_NEXT ;
- HelpId = SID_PREVIEW_NEXT ;
+ HelpId = CMD_SID_PREVIEW_NEXT ;
Text [ en-US ] = "~Next Page" ;
};
MenuItem
{
Identifier = SID_FORMATPAGE ;
- HelpId = SID_FORMATPAGE ;
+ HelpId = CMD_SID_FORMATPAGE ;
Text [ en-US ] = "Pa~ge Layout..." ;
};
MenuItem
{
Identifier = SID_CLOSEWIN ;
- HelpId = SID_CLOSEWIN ;
+ HelpId = CMD_SID_CLOSEWIN ;
Text [ en-US ] = "~Close" ;
};
MenuItem { Separator = TRUE; };
MenuItem
{
Identifier = SID_PREVIEW_CLOSE ;
- HelpId = SID_PRINTPREVIEW ;
+ HelpId = CMD_SID_PRINTPREVIEW ;
Text [ en-US ] = "Close Pre~view" ;
};
};
@@ -300,7 +300,7 @@ Menu RID_POPUP_EDIT
MenuItem
{
Identifier = SID_CELL_FORMAT_RESET ;
- HelpId = SID_CELL_FORMAT_RESET ;
+ HelpId = CMD_SID_CELL_FORMAT_RESET ;
Text [ en-US ] = "~Default" ;
};
//------------------------------
@@ -324,7 +324,7 @@ Menu RID_POPUP_EDIT
{
Text [ en-US ] = "Style" ;
Identifier = RID_MN_FORMAT_STYLE ;
- HelpID = RID_MN_FORMAT_STYLE ;
+ HelpID = HID_MN_FORMAT_STYLE ;
SubMenu = Menu
{
ItemList =
@@ -348,7 +348,7 @@ Menu RID_POPUP_EDIT
MenuItem
{
Identifier = SID_ULINE_VAL_DOUBLE ;
- HelpID = SID_ULINE_VAL_DOUBLE ;
+ HelpID = CMD_SID_ULINE_VAL_DOUBLE ;
Text [ en-US ] = "Do~uble Underline" ;
};
MenuItem
@@ -370,13 +370,13 @@ Menu RID_POPUP_EDIT
MenuItem
{
Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
+ HelpID = CMD_SID_SET_SUPER_SCRIPT ;
Text [ en-US ] = "Su~perscript" ;
};
MenuItem
{
Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
+ HelpID = CMD_SID_SET_SUB_SCRIPT ;
Text [ en-US ] = "Su~bscript" ;
};
};
@@ -412,37 +412,37 @@ Menu RID_POPUP_AUDIT
MenuItem
{
Identifier = SID_FILL_ADD_PRED ;
- HelpId = SID_FILL_ADD_PRED ;
+ HelpId = CMD_SID_FILL_ADD_PRED ;
Text [ en-US ] = "Trace ~Precedent" ;
};
MenuItem
{
Identifier = SID_FILL_DEL_PRED ;
- HelpId = SID_FILL_DEL_PRED ;
+ HelpId = CMD_SID_FILL_DEL_PRED ;
Text [ en-US ] = "~Remove Precedent" ;
};
MenuItem
{
Identifier = SID_FILL_ADD_SUCC ;
- HelpId = SID_FILL_ADD_SUCC ;
+ HelpId = CMD_SID_FILL_ADD_SUCC ;
Text [ en-US ] = "~Trace Dependent" ;
};
MenuItem
{
Identifier = SID_FILL_DEL_SUCC ;
- HelpId = SID_FILL_DEL_SUCC ;
+ HelpId = CMD_SID_FILL_DEL_SUCC ;
Text [ en-US ] = "Remove Dependent" ;
};
MenuItem
{
Identifier = SID_DETECTIVE_DEL_ALL ;
- HelpId = SID_DETECTIVE_DEL_ALL ;
+ HelpId = CMD_SID_DETECTIVE_DEL_ALL ;
Text [ en-US ] = "Remove ~All Traces" ;
};
MenuItem
{
Identifier = SID_FILL_NONE ;
- HelpId = SID_FILL_NONE ;
+ HelpId = CMD_SID_FILL_NONE ;
Text [ en-US ] = "Exit Fill Mode" ;
};
};
@@ -460,7 +460,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = SID_CELL_FORMAT_RESET ;
- HelpId = SID_CELL_FORMAT_RESET ;
+ HelpId = CMD_SID_CELL_FORMAT_RESET ;
Text [ en-US ] = "~Default" ;
};
//------------------------------
@@ -469,7 +469,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = FID_CELL_FORMAT ;
- HelpId = FID_CELL_FORMAT ;
+ HelpId = CMD_FID_CELL_FORMAT ;
Text [ en-US ] = "~Format Cells..." ;
};
//------------------------------
@@ -478,25 +478,25 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = FID_INS_ROWBRK ;
- HelpId = FID_INS_ROWBRK ;
+ HelpId = CMD_FID_INS_ROWBRK ;
Text [ en-US ] = "Insert ~Row Break" ;
};
MenuItem
{
Identifier = FID_INS_COLBRK ;
- HelpId = FID_INS_COLBRK ;
+ HelpId = CMD_FID_INS_COLBRK ;
Text [ en-US ] = "Insert ~Column Break" ;
};
MenuItem
{
Identifier = FID_DEL_MANUALBREAKS ;
- HelpId = FID_DEL_MANUALBREAKS ;
+ HelpId = CMD_FID_DEL_MANUALBREAKS ;
Text [ en-US ] = "Delete All Manual Breaks" ;
};
MenuItem
{
Identifier = FID_RESET_PRINTZOOM ;
- HelpId = FID_RESET_PRINTZOOM ;
+ HelpId = CMD_FID_RESET_PRINTZOOM ;
Text [ en-US ] = "Reset Scale" ;
};
//------------------------------
@@ -505,19 +505,19 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = SID_DEFINE_PRINTAREA ;
- HelpId = SID_DEFINE_PRINTAREA ;
+ HelpId = CMD_SID_DEFINE_PRINTAREA ;
Text [ en-US ] = "Define Print Range" ;
};
MenuItem
{
Identifier = SID_ADD_PRINTAREA ;
- HelpId = SID_ADD_PRINTAREA ;
+ HelpId = CMD_SID_ADD_PRINTAREA ;
Text [ en-US ] = "Add Print Range" ;
};
MenuItem
{
Identifier = SID_DELETE_PRINTAREA ;
- HelpId = SID_DELETE_PRINTAREA ;
+ HelpId = CMD_SID_DELETE_PRINTAREA ;
Text [ en-US ] = "Undo Print Range" ;
};
//------------------------------
@@ -526,7 +526,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = SID_FORMATPAGE ;
- HelpId = SID_FORMATPAGE ;
+ HelpId = CMD_SID_FORMATPAGE ;
Text [ en-US ] = "Page Format..." ;
};
//------------------------------
@@ -535,7 +535,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = FID_NOTE_VISIBLE ;
- HelpId = FID_NOTE_VISIBLE ;
+ HelpId = CMD_FID_NOTE_VISIBLE ;
Text [ en-US ] = "Sho~w Comment" ;
};
};
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index 2f5a2d8c88fb..4f99f90b8437 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -72,7 +72,8 @@
*/
// Hack:
-#define U2S(x) ((x)-HID_START)
+//#define U2S(x) ((x)-HID_START)
+#define U2S(x) x
// Macro U2S: unsigned to signed
// is needed because the resource compiler only knows signed short int in
// ExtraData, but the HID_XXX are unsigned and exceed 32k. Code reading the
@@ -7893,7 +7894,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
{
String 1 // Description
{
- Text [ en-US ] = "Extracts value(s) from a DataPilot table.";
+ Text [ en-US ] = "Extracts value(s) from a pivot table.";
};
ExtraData =
{
@@ -7909,15 +7910,15 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
};
String 3 // Description of Parameter 1
{
- Text [ en-US ] = "The name of the data pilot field to extract.";
+ Text [ en-US ] = "The name of the pivot table field to extract.";
};
String 4 // Name of Parameter 2
{
- Text [ en-US ] = "DataPilot";
+ Text [ en-US ] = "Pivot Table";
};
String 5 // Description of Parameter 2
{
- Text [ en-US ] = "A reference to a cell or range in the DataPilot table.";
+ Text [ en-US ] = "A reference to a cell or range in the pivot table.";
};
String 6 // Name of Parameter 3
{
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index ac1458b66a61..eac7f317be6a 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -146,7 +146,7 @@ String SCSTR_PREVIEWSHELL
String SCSTR_PIVOTSHELL
{
- Text [ en-US ] = "Data Pilot Tables" ;
+ Text [ en-US ] = "Pivot Tables" ;
};
String SCSTR_AUDITSHELL
@@ -626,11 +626,6 @@ String STR_REPLCELLSWARN
Text [ en-US ] = "You are pasting data into cells that already contain data.\nDo you really want to overwrite the existing data?";
};
-String STR_PRINT_NOTHING
-{
- Text [ en-US ] = "There is nothing to print. The selected print range or sheet is empty.";
-};
-
String SCSTR_ALLFILTER
{
Text [ en-US ] = "All";
@@ -778,17 +773,17 @@ String STR_ACC_EDITCELL_DESCR
String STR_ACC_DATAPILOT_ROW_DESCR
{
- Text [ en-US ] = "Fields that you drop here will be displayed as rows in the final DataPilot table.";
+ Text [ en-US ] = "Fields that you drop here will be displayed as rows in the final pivot table.";
};
String STR_ACC_DATAPILOT_COL_DESCR
{
- Text [ en-US ] = "Fields that you drop here will be displayed as columns in the final DataPilot table.";
+ Text [ en-US ] = "Fields that you drop here will be displayed as columns in the final pivot table.";
};
String STR_ACC_DATAPILOT_DATA_DESCR
{
- Text [ en-US ] = "Fields that you drop here will be used for calculations in the final DataPilot table.";
+ Text [ en-US ] = "Fields that you drop here will be used for calculations in the final pivot table.";
};
String STR_ACC_DATAPILOT_SEL_DESCR
@@ -811,6 +806,23 @@ String RID_SCSTR_ONCLICK
Text [ en-US ] = "Mouse button pressed";
};
+String STR_ACC_TOOLBAR_FORMULA
+{
+ Text [ en-US ] = "Formula Tool Bar";
+};
+String STR_ACC_DOC_SPREADSHEET
+{
+ Text [ en-US ] = "%PRODUCTNAME Spreadsheets";
+};
+String STR_ACC_DOC_SPREADSHEET_READONLY
+{
+ Text [ en-US ] = "(read-only)";
+};
+String STR_ACC_DOC_PREVIEW_SUFFIX
+{
+ Text [ en-US ] = "(Preview mode)";
+};
+
String SCSTR_MOREBTN_MOREOPTIONS
{
Text [ en-US ] = "More ~Options";
@@ -827,22 +839,13 @@ StringArray SCSTR_PRINT_OPTIONS
{
< "Pages"; >;
< "~Include output of empty pages"; >;
- < "If checked empty pages that have no cell contents or draw objects are not printed."; >;
- < "Sheets"; >;
- < "Print ~only selected sheets"; >;
- < "If checked only contents from selected sheets are printed, even if you specify a wider range in the Format - Print Ranges dialog. Content from sheets that are not selected will not be printed."; >;
< "Print content"; >;
< "~All sheets"; >;
- < "The printout will be created from all sheets in the document."; >;
< "~Selected sheets"; >;
- < "The printout will be created only from the currently selected sheets."; >;
< "Selected cells"; >;
- < "The printout will be created only from the currently selected cells."; >;
< "Thereof print"; >;
< "All ~pages"; >;
- < "Print all pages of the printable content."; >;
< "Pa~ges"; >;
- < "Print only some pages of the printable content."; >;
< "%PRODUCTNAME %s"; >;
};
};
diff --git a/sc/source/ui/src/simpref.src b/sc/source/ui/src/simpref.src
index 2c8dfd665fcb..ce8c51318347 100644
--- a/sc/source/ui/src/simpref.src
+++ b/sc/source/ui/src/simpref.src
@@ -43,6 +43,7 @@ ModelessDialog RID_SCDLG_SIMPLEREF
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_SIMPLEREF:ED_ASSIGN";
Border = TRUE ;
Pos = MAP_APPFONT ( 48 , 6 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
@@ -51,6 +52,7 @@ ModelessDialog RID_SCDLG_SIMPLEREF
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SIMPLEREF:RB_ASSIGN";
Pos = MAP_APPFONT ( 142 , 5 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
diff --git a/sc/source/ui/src/solveroptions.src b/sc/source/ui/src/solveroptions.src
index 87c75277f413..106382fb9c79 100644
--- a/sc/source/ui/src/solveroptions.src
+++ b/sc/source/ui/src/solveroptions.src
@@ -42,6 +42,7 @@ ModalDialog RID_SCDLG_SOLVEROPTIONS
};
ListBox LB_ENGINE
{
+ HelpID = "sc:ListBox:RID_SCDLG_SOLVEROPTIONS:LB_ENGINE";
Border = TRUE ;
Pos = MAP_APPFONT ( 67 , 6 ) ;
Size = MAP_APPFONT ( 145 , 90 ) ;
@@ -63,6 +64,7 @@ ModalDialog RID_SCDLG_SOLVEROPTIONS
};
PushButton BTN_EDIT
{
+ HelpID = "sc:PushButton:RID_SCDLG_SOLVEROPTIONS:BTN_EDIT";
Pos = MAP_APPFONT ( 6 , 108 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -111,6 +113,7 @@ ModalDialog RID_SCDLG_SOLVER_INTEGER
};
NumericField NF_VALUE
{
+ HelpID = "sc:NumericField:RID_SCDLG_SOLVER_INTEGER:NF_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 27 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -160,6 +163,7 @@ ModalDialog RID_SCDLG_SOLVER_DOUBLE
};
Edit ED_VALUE
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER_DOUBLE:ED_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 27 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
diff --git a/sc/source/ui/src/solvrdlg.src b/sc/source/ui/src/solvrdlg.src
index c90d746675aa..b1513ec8c2e1 100644
--- a/sc/source/ui/src/solvrdlg.src
+++ b/sc/source/ui/src/solvrdlg.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_SOLVER
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_SOLVE ;
+ HelpId = CMD_SID_OPENDLG_SOLVE ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 222 , 64 ) ;
@@ -45,6 +45,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
Edit ED_FORMULACELL
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER:ED_FORMULACELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 64 , 14 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
@@ -52,6 +53,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
ImageButton RB_FORMULACELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SOLVER:RB_FORMULACELL";
Pos = MAP_APPFONT ( 145 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -65,6 +67,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
Edit ED_TARGETVAL
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER:ED_TARGETVAL";
Border = TRUE ;
Pos = MAP_APPFONT ( 64 , 30 ) ;
Size = MAP_APPFONT ( 93 , 12 ) ;
@@ -78,6 +81,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
Edit ED_VARCELL
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER:ED_VARCELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 64 , 46 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
@@ -85,6 +89,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
ImageButton RB_VARCELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SOLVER:RB_VARCELL";
Pos = MAP_APPFONT ( 145 , 45 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
diff --git a/sc/source/ui/src/sortdlg.src b/sc/source/ui/src/sortdlg.src
index 3eb7e43585d0..9dd8b6f17d29 100644
--- a/sc/source/ui/src/sortdlg.src
+++ b/sc/source/ui/src/sortdlg.src
@@ -34,6 +34,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
Size = MAP_APPFONT ( 260 , 185 ) ;
ListBox LB_SORT1
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 19 ) ;
Size = MAP_APPFONT ( 154 , 90 ) ;
@@ -42,6 +43,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_UP1
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP1";
Pos = MAP_APPFONT ( 172 , 14 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "~Ascending" ;
@@ -49,6 +51,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_DOWN1
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN1";
Pos = MAP_APPFONT ( 172 , 28 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "~Descending" ;
@@ -62,6 +65,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
ListBox LB_SORT2
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 60 ) ;
Size = MAP_APPFONT ( 154 , 90 ) ;
@@ -70,6 +74,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_UP2
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP2";
Pos = MAP_APPFONT ( 172 , 55 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "A~scending" ;
@@ -77,6 +82,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_DOWN2
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN2";
Pos = MAP_APPFONT ( 172 , 69 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "D~escending" ;
@@ -90,6 +96,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
ListBox LB_SORT3
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT3";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 101 ) ;
Size = MAP_APPFONT ( 154 , 90 ) ;
@@ -98,6 +105,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_UP3
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP3";
Pos = MAP_APPFONT ( 172 , 96 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "As~cending" ;
@@ -105,6 +113,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_DOWN3
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN3";
Pos = MAP_APPFONT ( 172 , 110 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "Desce~nding" ;
@@ -127,6 +136,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
Size = MAP_APPFONT ( 260 , 185 ) ;
CheckBox BTN_CASESENSITIVE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_CASESENSITIVE";
Pos = MAP_APPFONT ( 12 , 6 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ en-US ] = "Case ~sensitive" ;
@@ -134,6 +144,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
CheckBox BTN_LABEL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_LABEL";
Pos = MAP_APPFONT ( 12 , 20 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -148,6 +159,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
CheckBox BTN_FORMATS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_FORMATS";
Pos = MAP_APPFONT ( 12 , 34 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ en-US ] = "Include ~formats" ;
@@ -155,6 +167,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
CheckBox BTN_NATURALSORT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_COPYRESULT";
Pos = MAP_APPFONT ( 12 , 48 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ de ] = "Enable ~natural sort" ;
@@ -173,6 +186,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_OUTAREA
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_OUTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 73 ) ;
Size = MAP_APPFONT ( 93 , 90 ) ;
@@ -181,6 +195,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
Edit ED_OUTAREA
{
+ HelpID = "sc:Edit:RID_SCPAGE_SORT_OPTIONS:ED_OUTAREA";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 119 , 73 ) ;
@@ -196,6 +211,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_SORT_USER
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_SORT_USER";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 100 ) ;
@@ -211,6 +227,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_LANGUAGE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_LANGUAGE";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 129 ) ;
Size = MAP_APPFONT ( 101 , 90 ) ;
@@ -226,6 +243,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_ALGORITHM
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_ALGORITHM";
Border = TRUE ;
Pos = MAP_APPFONT ( 119 , 129 ) ;
Size = MAP_APPFONT ( 132 , 90 ) ;
@@ -311,6 +329,7 @@ TabDialog RID_SCDLG_SORT
ModalDialog RID_SCDLG_SORT_WARNING
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_SORT_WARNING";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 180 , 91 ) ;
@@ -333,6 +352,7 @@ ModalDialog RID_SCDLG_SORT_WARNING
};
PushButton BTN_EXTSORT
{
+ HelpID = "sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_EXTSORT";
Pos = MAP_APPFONT ( 6 , 39 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
TabStop = TRUE ;
@@ -341,6 +361,7 @@ ModalDialog RID_SCDLG_SORT_WARNING
};
PushButton BTN_CURSORT
{
+ HelpID = "sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_CURSORT";
Pos = MAP_APPFONT ( 70 , 39 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/subtdlg.src b/sc/source/ui/src/subtdlg.src
index bca1d57b32f5..7f3d01e7d99b 100644
--- a/sc/source/ui/src/subtdlg.src
+++ b/sc/source/ui/src/subtdlg.src
@@ -41,6 +41,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_PAGEBREAK
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_PAGEBREAK";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Page break between groups" ;
@@ -48,6 +49,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_CASE";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Case sensitive" ;
@@ -55,6 +57,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_SORT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_SORT";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Pre-~sort area according to groups" ;
@@ -62,6 +65,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_FORMATS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_FORMATS";
Pos = MAP_APPFONT ( 12 , 101 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "I~nclude formats" ;
@@ -69,6 +73,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_USERDEF
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_USERDEF";
Pos = MAP_APPFONT ( 12 , 115 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "C~ustom sort order" ;
@@ -76,6 +81,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
ListBox LB_USERDEF
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SUBT_OPTIONS:LB_USERDEF";
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 127 ) ;
Size = MAP_APPFONT ( 231 , 90 ) ;
@@ -84,6 +90,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
RadioButton BTN_ASCENDING
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SUBT_OPTIONS:BTN_ASCENDING";
Pos = MAP_APPFONT ( 12 , 69 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Ascending" ;
@@ -91,6 +98,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
RadioButton BTN_DESCENDING
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SUBT_OPTIONS:BTN_DESCENDING";
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "D~escending" ;
diff --git a/sc/source/ui/src/tabopdlg.src b/sc/source/ui/src/tabopdlg.src
index e4f99ab59596..d2c74783df8d 100644
--- a/sc/source/ui/src/tabopdlg.src
+++ b/sc/source/ui/src/tabopdlg.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_TABOP
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_TABOP ;
+ HelpId = CMD_SID_OPENDLG_TABOP ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 240 , 64 ) ;
@@ -45,12 +45,14 @@ ModelessDialog RID_SCDLG_TABOP
};
Edit ED_FORMULARANGE
{
+ HelpID = "sc:Edit:RID_SCDLG_TABOP:ED_FORMULARANGE";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 14 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
};
ImageButton RB_FORMULARANGE
{
+ HelpID = "sc:ImageButton:RID_SCDLG_TABOP:RB_FORMULARANGE";
Pos = MAP_APPFONT ( 163 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -64,12 +66,14 @@ ModelessDialog RID_SCDLG_TABOP
};
Edit ED_ROWCELL
{
+ HelpID = "sc:Edit:RID_SCDLG_TABOP:ED_ROWCELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 30 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
};
ImageButton RB_ROWCELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_TABOP:RB_ROWCELL";
Pos = MAP_APPFONT ( 163 , 29 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -83,12 +87,14 @@ ModelessDialog RID_SCDLG_TABOP
};
Edit ED_COLCELL
{
+ HelpID = "sc:Edit:RID_SCDLG_TABOP:ED_COLCELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 46 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
};
ImageButton RB_COLCELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_TABOP:RB_COLCELL";
Pos = MAP_APPFONT ( 163 , 45 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 9efefdf6a460..6a596b1d2eb0 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -59,12 +59,12 @@
ScStyleDlg::ScStyleDlg( Window* pParent,
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId )
+ sal_uInt16 nRscId )
: SfxStyleDialog ( pParent,
ScResId( nRscId ),
rStyleBase,
- FALSE ),
+ false ),
nDlgRsc ( nRscId )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -137,7 +137,7 @@ ScStyleDlg::~ScStyleDlg()
// -----------------------------------------------------------------------
-void ScStyleDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage )
+void ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
if ( nDlgRsc == RID_SCDLG_STYLES_PAR )
{
@@ -179,7 +179,7 @@ void ScStyleDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage )
switch ( nPageId )
{
case TP_PAGE_STD:
- aSet.Put (SfxAllEnumItem((const USHORT)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_CENTER));
+ aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_CENTER));
rTabPage.PageCreated(aSet);
break;
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index 56eb56508336..fab15bd8a996 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -74,7 +74,7 @@ ScDataObject* ScAreaLinkSaver::Clone() const
return new ScAreaLinkSaver( *this );
}
-BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
+sal_Bool ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
{
return ( aFileName == rCompare.GetFile() &&
aFilterName == rCompare.GetFilter() &&
@@ -83,7 +83,7 @@ BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
nRefresh == rCompare.GetRefreshDelay() );
}
-BOOL ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
+sal_Bool ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
{
return ( IsEqualSource( rCompare ) &&
aDestArea == rCompare.GetDestArea() );
@@ -105,11 +105,11 @@ void ScAreaLinkSaver::InsertNewLink( ScDocument* pDoc ) const
{
ScAreaLink* pLink = new ScAreaLink( pObjSh, aFileName, aFilterName, aOptions,
aSourceArea, aDestArea.aStart, nRefresh );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aDestArea );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName, &aSourceArea );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
}
}
@@ -133,7 +133,7 @@ ScDataObject* ScAreaLinkSaveCollection::Clone() const
return new ScAreaLinkSaveCollection( *this );
}
-BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
+sal_Bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
{
// IsEqual can be checked in sequence.
// Neither ref-update nor removing links will change the order.
@@ -141,31 +141,31 @@ BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
sfx2::LinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager();
if (pLinkManager)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
{
if ( nPos >= GetCount() || !(*this)[nPos]->IsEqual( *(ScAreaLink*)pBase ) )
- return FALSE;
+ return false;
++nPos;
}
}
if ( nPos < GetCount() )
- return FALSE; // fewer links in the document than in the save collection
+ return false; // fewer links in the document than in the save collection
}
- return TRUE;
+ return sal_True;
}
ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScAreaLinkSaver& rSaver )
{
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if ( pBase->ISA(ScAreaLink) &&
@@ -188,8 +188,8 @@ void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc ) const
if (pLinkManager)
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nSaveCount = GetCount();
- for (USHORT nPos=0; nPos<nSaveCount; nPos++)
+ sal_uInt16 nSaveCount = GetCount();
+ for (sal_uInt16 nPos=0; nPos<nSaveCount; nPos++)
{
ScAreaLinkSaver* pSaver = (*this)[nPos];
ScAreaLink* pLink = lcl_FindLink( rLinks, *pSaver );
@@ -209,8 +209,8 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum
if (pLinkManager)
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index 3763dfc89f05..0376f7c7a9c4 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -167,7 +167,7 @@ void ScRefUndoData::DeleteUnchanged( const ScDocument* pDoc )
}
}
-void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
+void ScRefUndoData::DoUndo( ScDocument* pDoc, sal_Bool bUndoRefFirst )
{
if (pDBCollection)
pDoc->SetDBCollection( new ScDBCollection(*pDBCollection) );
@@ -196,8 +196,8 @@ void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
if (pDBCollection || pRangeName)
{
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
pDoc->CompileAll();
pDoc->SetDirty();
pDoc->SetAutoCalc( bOldAutoCalc );
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 609c2eb05924..7f3e5f8e094b 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -67,14 +67,14 @@ ScSimpleUndo::~ScSimpleUndo()
delete pDetectiveUndo;
}
-BOOL ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
+sal_Bool ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
{
// Zu jeder Undo-Action kann eine SdrUndoGroup fuer das Aktualisieren
// der Detektiv-Pfeile gehoeren.
// DetectiveRefresh kommt immer hinterher, die SdrUndoGroup ist in
// eine ScUndoDraw Action verpackt.
// Nur beim automatischen Aktualisieren wird AddUndoAction mit
- // bTryMerg=TRUE gerufen.
+ // bTryMerg=sal_True gerufen.
if ( !pDetectiveUndo && pNextAction->ISA(ScUndoDraw) )
{
@@ -84,15 +84,15 @@ BOOL ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
ScUndoDraw* pCalcUndo = (ScUndoDraw*)pNextAction;
pDetectiveUndo = pCalcUndo->GetDrawUndo();
pCalcUndo->ForgetDrawUndo();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScSimpleUndo::BeginUndo()
{
- pDocShell->SetInUndo( TRUE );
+ pDocShell->SetInUndo( sal_True );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -115,12 +115,12 @@ void ScSimpleUndo::EndUndo()
pViewShell->ShowAllCursors();
}
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScSimpleUndo::BeginRedo()
{
- pDocShell->SetInUndo( TRUE ); //! eigenes Flag fuer Redo?
+ pDocShell->SetInUndo( sal_True ); //! eigenes Flag fuer Redo?
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -142,7 +142,7 @@ void ScSimpleUndo::EndRedo()
pViewShell->ShowAllCursors();
}
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScSimpleUndo::ShowTable( SCTAB nTab )
@@ -185,7 +185,7 @@ ScBlockUndo::~ScBlockUndo()
void ScBlockUndo::BeginUndo()
{
ScSimpleUndo::BeginUndo();
- EnableDrawAdjust( pDocShell->GetDocument(), FALSE );
+ EnableDrawAdjust( pDocShell->GetDocument(), false );
}
void ScBlockUndo::EndUndo()
@@ -193,7 +193,7 @@ void ScBlockUndo::EndUndo()
if (eMode == SC_UNDO_AUTOHEIGHT)
AdjustHeight();
- EnableDrawAdjust( pDocShell->GetDocument(), TRUE );
+ EnableDrawAdjust( pDocShell->GetDocument(), sal_True );
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
ShowBlock();
@@ -209,7 +209,7 @@ void ScBlockUndo::EndRedo()
ScSimpleUndo::EndRedo();
}
-BOOL ScBlockUndo::AdjustHeight()
+sal_Bool ScBlockUndo::AdjustHeight()
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -233,9 +233,9 @@ BOOL ScBlockUndo::AdjustHeight()
nPPTY = ScGlobal::nScreenPPTY;
}
- BOOL bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(),
+ sal_Bool bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(),
/*!*/ aBlockRange.aStart.Tab(), 0, &aVirtDev,
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
if (bRet)
pDocShell->PostPaint( 0, aBlockRange.aStart.Row(), aBlockRange.aStart.Tab(),
@@ -247,12 +247,15 @@ BOOL ScBlockUndo::AdjustHeight()
void ScBlockUndo::ShowBlock()
{
+ if ( IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
ShowTable( aBlockRange ); // bei mehreren Tabs im Range ist jede davon gut
pViewShell->MoveCursorAbs( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
ScRange aRange = aBlockRange;
aRange.aStart.SetTab( nTab );
@@ -290,7 +293,7 @@ void ScMoveUndo::UndoRef()
{
ScDocument* pDoc = pDocShell->GetDocument();
ScRange aRange(0,0,0, MAXCOL,MAXROW,pRefUndoDoc->GetTableCount()-1);
- pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, FALSE, pDoc, NULL, FALSE );
+ pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, false, pDoc, NULL, false );
if (pRefUndoData)
pRefUndoData->DoUndo( pDoc, (eMode == SC_UNDO_REFFIRST) );
// HACK: ScDragDropUndo ist der einzige mit REFFIRST.
@@ -302,7 +305,7 @@ void ScMoveUndo::BeginUndo()
{
ScSimpleUndo::BeginUndo();
- EnableDrawAdjust( pDocShell->GetDocument(), FALSE );
+ EnableDrawAdjust( pDocShell->GetDocument(), false );
if (pRefUndoDoc && eMode == SC_UNDO_REFFIRST)
UndoRef();
@@ -315,7 +318,7 @@ void ScMoveUndo::EndUndo()
if (pRefUndoDoc && eMode == SC_UNDO_REFLAST)
UndoRef();
- EnableDrawAdjust( pDocShell->GetDocument(), TRUE );
+ EnableDrawAdjust( pDocShell->GetDocument(), sal_True );
ScSimpleUndo::EndUndo();
}
@@ -354,7 +357,7 @@ void ScDBFuncUndo::EndUndo()
if ( pAutoDBRange )
{
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -389,7 +392,7 @@ void ScDBFuncUndo::BeginRedo()
{
// move the database range to this function's position again (see ScDocShell::GetDBData)
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -412,8 +415,8 @@ void ScDBFuncUndo::BeginRedo()
aOriginalRange.aStart.Col(), aOriginalRange.aStart.Row(),
aOriginalRange.aEnd.Col(), aOriginalRange.aEnd.Row() );
- pNoNameData->SetByRow( TRUE );
- pNoNameData->SetAutoFilter( FALSE );
+ pNoNameData->SetByRow( sal_True );
+ pNoNameData->SetAutoFilter( false );
// header is always set with the operation in redo
}
}
@@ -459,7 +462,7 @@ String ScUndoWrapper::GetRepeatComment(SfxRepeatTarget& rTarget) const
return String();
}
-USHORT ScUndoWrapper::GetId() const
+sal_uInt16 ScUndoWrapper::GetId() const
{
if (pWrappedUndo)
return pWrappedUndo->GetId();
@@ -467,26 +470,26 @@ USHORT ScUndoWrapper::GetId() const
return 0;
}
-BOOL ScUndoWrapper::IsLinked()
+sal_Bool ScUndoWrapper::IsLinked()
{
if (pWrappedUndo)
return pWrappedUndo->IsLinked();
else
- return FALSE;
+ return false;
}
-void ScUndoWrapper::SetLinked( BOOL bIsLinked )
+void ScUndoWrapper::SetLinked( sal_Bool bIsLinked )
{
if (pWrappedUndo)
pWrappedUndo->SetLinked(bIsLinked);
}
-BOOL ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
{
if (pWrappedUndo)
return pWrappedUndo->Merge(pNextAction);
else
- return FALSE;
+ return false;
}
void ScUndoWrapper::Undo()
@@ -507,12 +510,12 @@ void ScUndoWrapper::Repeat(SfxRepeatTarget& rTarget)
pWrappedUndo->Repeat(rTarget);
}
-BOOL ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (pWrappedUndo)
return pWrappedUndo->CanRepeat(rTarget);
else
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index a670f067c8d8..0e59c0a35f92 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -106,7 +106,7 @@ TYPEINIT1(ScUndoBorder, ScBlockUndo);
ScUndoInsertCells::ScUndoInsertCells( ScDocShell* pNewDocShell,
const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios,
InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData,
- BOOL bNewPartOfPaste ) :
+ sal_Bool bNewPartOfPaste ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ),
aEffRange( rRange ),
nCount( nNewCount ),
@@ -143,7 +143,7 @@ String ScUndoInsertCells::GetComment() const
return ScGlobal::GetRscString( pPasteUndo ? STR_UNDO_PASTE : STR_UNDO_INSERTCELLS );
}
-BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
{
// If a paste undo action has already been added, append (detective) action there.
if ( pPasteUndo )
@@ -160,7 +160,7 @@ BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
pPasteUndo = pWrappedAction;
pWrapper->ForgetWrappedUndo(); // pWrapper is deleted by UndoManager
- return TRUE;
+ return sal_True;
}
}
@@ -180,7 +180,7 @@ void ScUndoInsertCells::SetChangeTrack()
nEndChangeAction = 0;
}
-void ScUndoInsertCells::DoChange( const BOOL bUndo )
+void ScUndoInsertCells::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB i;
@@ -238,13 +238,13 @@ void ScUndoInsertCells::DoChange( const BOOL bUndo )
{
SCCOL nEndCol = aWorkRange.aEnd.Col();
SCROW nEndRow = aWorkRange.aEnd.Row();
- pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE );
+ pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True );
}
}
//? Undo fuer herausgeschobene Attribute ?
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
switch (eCmd)
{
@@ -301,7 +301,7 @@ void ScUndoInsertCells::Undo()
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -309,7 +309,7 @@ void ScUndoInsertCells::Redo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
if ( pPasteUndo )
@@ -328,11 +328,11 @@ void ScUndoInsertCells::Repeat(SfxRepeatTarget& rTarget)
pPasteUndo->Repeat( rTarget );
}
else
- ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, sal_True );
}
}
-BOOL ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -391,7 +391,7 @@ void ScUndoDeleteCells::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoDeleteCells::DoChange( const BOOL bUndo )
+void ScUndoDeleteCells::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB i;
@@ -442,7 +442,7 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo )
for( i=0; i<nCount && bUndo; i++ )
{
pRefUndoDoc->CopyToDocument( aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i],
- IDF_ALL | IDF_NOCAPTIONS, FALSE, pDoc );
+ IDF_ALL | IDF_NOCAPTIONS, false, pDoc );
}
ScRange aWorkRange( aEffRange );
@@ -474,12 +474,12 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo )
SCCOL nEndCol = aWorkRange.aEnd.Col();
SCROW nEndRow = aWorkRange.aEnd.Row();
- pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE );
+ pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True );
}
}
// Zeichnen
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
switch (eCmd)
{
case DEL_DELROWS:
@@ -533,7 +533,7 @@ void ScUndoDeleteCells::Undo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -552,7 +552,7 @@ void ScUndoDeleteCells::Redo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginRedo();
- DoChange( FALSE);
+ DoChange( false);
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -564,10 +564,10 @@ void ScUndoDeleteCells::Redo()
void ScUndoDeleteCells::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, sal_True );
}
-BOOL ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -579,7 +579,7 @@ BOOL ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoDeleteMulti::ScUndoDeleteMulti( ScDocShell* pNewDocShell,
- BOOL bNewRows, BOOL bNeedsRefresh, SCTAB nNewTab,
+ sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab,
const SCCOLROW* pRng, SCCOLROW nRngCnt,
ScDocument* pUndoDocument, ScRefUndoData* pRefData ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ),
@@ -607,7 +607,7 @@ void ScUndoDeleteMulti::DoChange() const
{
SCCOL nStartCol;
SCROW nStartRow;
- USHORT nPaint;
+ sal_uInt16 nPaint;
if (bRows)
{
nStartCol = 0;
@@ -627,7 +627,7 @@ void ScUndoDeleteMulti::DoChange() const
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True );
}
pDocShell->PostPaint( nStartCol, nStartRow, nTab, MAXCOL, MAXROW, nTab, nPaint );
@@ -666,7 +666,7 @@ void ScUndoDeleteMulti::SetChangeTrack()
aRange.aStart.SetCol( static_cast<SCCOL>(nStart) );
aRange.aEnd.SetCol( static_cast<SCCOL>(nEnd) );
}
- ULONG nDummyStart;
+ sal_uLong nDummyStart;
pChangeTrack->AppendDeleteRange( aRange, pRefUndoDoc,
nDummyStart, nEndChangeAction );
}
@@ -702,10 +702,10 @@ void ScUndoDeleteMulti::Undo()
SCCOLROW nStart = *(pOneRange++);
SCCOLROW nEnd = *(pOneRange++);
if (bRows)
- pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,FALSE,pDoc );
+ pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,false,pDoc );
else
pRefUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab,
- static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,FALSE,pDoc );
+ static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,false,pDoc );
}
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
@@ -757,10 +757,10 @@ void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget)
{
// DeleteCells, falls einfache Selektion
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, sal_True );
}
-BOOL ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -802,13 +802,13 @@ void ScUndoCut::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoCut::DoChange( const BOOL bUndo )
+void ScUndoCut::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
// do not undo/redo objects and note captions, they are handled via drawing undo
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
if (bUndo) // nur bei Undo
{
@@ -817,7 +817,7 @@ void ScUndoCut::DoChange( const BOOL bUndo )
ScRange aCopyRange = aExtendedRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, false, pDoc );
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
@@ -845,7 +845,7 @@ void ScUndoCut::DoChange( const BOOL bUndo )
void ScUndoCut::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -853,19 +853,19 @@ void ScUndoCut::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
}
void ScUndoCut::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, sal_True );
}
-BOOL ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -881,10 +881,10 @@ ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData,
void* /* pFill1 */, void* /* pFill2 */, void* /* pFill3 */,
- BOOL bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
+ sal_Bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -933,20 +933,20 @@ void ScUndoPaste::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoPaste::DoChange( const BOOL bUndo )
+void ScUndoPaste::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
// RefUndoData for redo is created before first undo
// (with DeleteUnchanged after the DoUndo call)
- BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
+ sal_Bool bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
if ( bCreateRedoData )
pRefRedoData = new ScRefUndoData( pDoc );
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// fuer Undo immer alle oder keine Inhalte sichern
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -955,7 +955,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
// do not undo/redo objects and note captions, they are handled via drawing undo
(nUndoFlags &= ~IDF_OBJECTS) |= IDF_NOCAPTIONS;
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -967,8 +967,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
if (!pRedoDoc)
{
- BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
- BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
+ sal_Bool bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
+ sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
@@ -978,11 +978,11 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pRedoDoc );
- bRedoFilled = TRUE;
+ pDoc->CopyToDocument( aCopyRange, nUndoFlags, false, pRedoDoc );
+ bRedoFilled = sal_True;
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
aMarkData.MarkToMulti();
@@ -997,21 +997,21 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
aTabSelectRange.aStart.SetTab( nFirstSelected );
aTabSelectRange.aEnd.SetTab( nFirstSelected );
- pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
for (nTab=0; nTab<nTabCount; nTab++)
if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab))
{
aTabSelectRange.aStart.SetTab( nTab );
aTabSelectRange.aEnd.SetTab( nTab );
- pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
}
}
if (pWorkRefData)
{
- pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
+ pWorkRefData->DoUndo( pDoc, sal_True ); // sal_True = bSetChartRangeLists for SetChartListenerCollection
if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
- bPaintAll = TRUE;
+ bPaintAll = sal_True;
}
if ( bCreateRedoData && pRefRedoData )
@@ -1021,13 +1021,13 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
aTabSelectRange.aStart.SetTab( nFirstSelected );
aTabSelectRange.aEnd.SetTab( nFirstSelected );
- pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
for (nTab=0; nTab<nTabCount; nTab++)
if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab))
{
aTabSelectRange.aStart.SetTab( nTab );
aTabSelectRange.aEnd.SetTab( nTab );
- pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
}
}
@@ -1041,8 +1041,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
SetChangeTrack();
ScRange aDrawRange( aBlockRange );
- pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
- USHORT nPaint = PAINT_GRID;
+ pDoc->ExtendMerge( aDrawRange, sal_True ); // only needed for single sheet (text/rtf etc.)
+ sal_uInt16 nPaint = PAINT_GRID;
if (bPaintAll)
{
aDrawRange.aStart.SetCol(0);
@@ -1051,7 +1051,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
aDrawRange.aEnd.SetRow(MAXROW);
nPaint |= PAINT_TOP | PAINT_LEFT;
/*A*/ if (pViewShell)
- pViewShell->AdjustBlockHeight(FALSE);
+ pViewShell->AdjustBlockHeight(false);
}
else
{
@@ -1065,7 +1065,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
nPaint |= PAINT_LEFT;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
+/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
@@ -1089,7 +1089,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
void ScUndoPaste::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
ShowTable( aBlockRange );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -1099,9 +1099,9 @@ void ScUndoPaste::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
}
@@ -1119,12 +1119,12 @@ void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget)
pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(),
aPasteOptions.nFunction, aPasteOptions.bSkipEmpty, aPasteOptions.bTranspose,
aPasteOptions.bAsLink, aPasteOptions.eMoveMode, IDF_NONE,
- TRUE ); // allow warning dialog
+ sal_True ); // allow warning dialog
}
}
}
-BOOL ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1136,8 +1136,8 @@ BOOL ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell,
- const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut,
- ScDocument* pUndoDocument, ScRefUndoData* pRefData, BOOL bScenario ) :
+ const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut,
+ ScDocument* pUndoDocument, ScRefUndoData* pRefData, sal_Bool bScenario ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFFIRST ),
aSrcRange( rRange ),
bCut( bNewCut ),
@@ -1148,7 +1148,7 @@ ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell,
aDestEnd.IncCol(aSrcRange.aEnd.Col() - aSrcRange.aStart.Col());
aDestEnd.IncTab(aSrcRange.aEnd.Tab() - aSrcRange.aStart.Tab());
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
// find number of non-filtered rows
@@ -1196,9 +1196,9 @@ void ScUndoDragDrop::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const
+void ScUndoDragDrop::PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const
{
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1211,7 +1211,7 @@ void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const
aRange.aStart.Tab(), 0, &aVirtDev,
pViewData->GetPPTX(), pViewData->GetPPTY(),
pViewData->GetZoomX(), pViewData->GetZoomY(),
- FALSE ) )
+ false ) )
{
aRange.aStart.SetCol(0);
aRange.aEnd.SetCol(MAXCOL);
@@ -1258,16 +1258,16 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) const
ScRange aPaintRange = aRange;
pDoc->ExtendMerge( aPaintRange ); // before deleting
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aPaintRange );
// do not undo objects and note captions, they are handled via drawing undo
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pDoc->DeleteAreaTab( aRange, nUndoFlags );
- pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, FALSE, pDoc );
+ pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, false, pDoc );
if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) )
- pDoc->ExtendMerge( aRange, TRUE );
+ pDoc->ExtendMerge( aRange, sal_True );
aPaintRange.aEnd.SetCol( Max( aPaintRange.aEnd.Col(), aRange.aEnd.Col() ) );
aPaintRange.aEnd.SetRow( Max( aPaintRange.aEnd.Row(), aRange.aEnd.Row() ) );
@@ -1293,10 +1293,10 @@ void ScUndoDragDrop::Redo()
ScDocument* pDoc = pDocShell->GetDocument();
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
// do not undo/redo objects and note captions, they are handled via drawing undo
- USHORT nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
/* TODO: Redoing note captions is quite tricky due to the fact that a
helper clip document is used. While (re-)pasting the contents to the
@@ -1314,7 +1314,7 @@ void ScUndoDragDrop::Redo()
SCTAB nTab;
ScMarkData aSourceMark;
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
- aSourceMark.SelectTable( nTab, TRUE );
+ aSourceMark.SelectTable( nTab, sal_True );
// do not clone objects and note captions into clipdoc (see above)
ScClipParam aClipParam(aSrcRange, bCut);
@@ -1324,7 +1324,7 @@ void ScUndoDragDrop::Redo()
{
ScRange aSrcPaintRange = aSrcRange;
pDoc->ExtendMerge( aSrcPaintRange ); // before deleting
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aSrcPaintRange );
pDoc->DeleteAreaTab( aSrcRange, nRedoFlags );
PaintArea( aSrcPaintRange, nExtFlags );
@@ -1332,11 +1332,11 @@ void ScUndoDragDrop::Redo()
ScMarkData aDestMark;
for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++)
- aDestMark.SelectTable( nTab, TRUE );
+ aDestMark.SelectTable( nTab, sal_True );
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
// TODO: restore old note captions instead of cloning new captions...
- pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, TRUE, FALSE, bIncludeFiltered );
+ pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, sal_True, false, bIncludeFiltered );
if (bCut)
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
@@ -1345,14 +1345,14 @@ void ScUndoDragDrop::Redo()
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
- pDocShell->GetDocFunc().UnmergeCells( aDestRange, FALSE, TRUE );
+ pDocShell->GetDocFunc().UnmergeCells( aDestRange, false, sal_True );
for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++)
{
SCCOL nEndCol = aDestRange.aEnd.Col();
SCROW nEndRow = aDestRange.aEnd.Row();
pDoc->ExtendMerge( aDestRange.aStart.Col(), aDestRange.aStart.Row(),
- nEndCol, nEndRow, nTab, TRUE );
+ nEndCol, nEndRow, nTab, sal_True );
PaintArea( ScRange( aDestRange.aStart.Col(), aDestRange.aStart.Row(), nTab,
nEndCol, nEndRow, nTab ), 0 );
}
@@ -1363,7 +1363,7 @@ void ScUndoDragDrop::Redo()
ShowTable( aDestRange.aStart.Tab() );
RedoSdrUndoAction( pDrawUndo ); //! include in ScBlockUndo?
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -1373,9 +1373,9 @@ void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
@@ -1409,7 +1409,7 @@ void ScUndoListNames::DoChange( ScDocument* pSrcDoc ) const
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aBlockRange, IDF_ALL );
- pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, FALSE, pDoc );
+ pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, false, pDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1437,7 +1437,7 @@ void ScUndoListNames::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->InsertNameList();
}
-BOOL ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1490,10 +1490,10 @@ void ScUndoUseScenario::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteSelection( IDF_ALL, aMarkData );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL, sal_True, pDoc, &aMarkData );
// Szenario-Tabellen
- BOOL bFrame = FALSE;
+ sal_Bool bFrame = false;
SCTAB nTab = aRange.aStart.Tab();
SCTAB nEndTab = nTab;
while ( pUndoDoc->HasTable(nEndTab+1) && pUndoDoc->IsScenario(nEndTab+1) )
@@ -1503,19 +1503,19 @@ void ScUndoUseScenario::Undo()
// Flags immer
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pUndoDoc->GetScenarioData( i, aComment, aColor, nScenFlags );
pDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
- BOOL bActive = pUndoDoc->IsActiveScenario( i );
+ sal_Bool bActive = pUndoDoc->IsActiveScenario( i );
pDoc->SetActiveScenario( i, bActive );
// Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
{
pDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, i, IDF_ALL );
- pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,false, pDoc );
}
if ( nScenFlags & SC_SCENARIO_SHOWFRAME )
- bFrame = TRUE;
+ bFrame = sal_True;
}
// Wenn sichtbare Rahmen, dann alles painten
@@ -1545,7 +1545,7 @@ void ScUndoUseScenario::Redo()
pViewShell->InitOwnBlockMode();
}
- pDocShell->UseScenario( nTab, aName, FALSE );
+ pDocShell->UseScenario( nTab, aName, false );
EndRedo();
}
@@ -1559,14 +1559,14 @@ void ScUndoUseScenario::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (rTarget.ISA(ScTabViewTarget))
{
ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData();
return !pViewData->GetDocument()->IsScenario( pViewData->GetTabNo() );
}
- return FALSE;
+ return false;
}
@@ -1600,19 +1600,17 @@ String ScUndoSelectionStyle::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_APPLYCELLSTYLE );
}
-void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
+void ScUndoSelectionStyle::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aWorkRange( aRange );
if ( pDoc->HasAttrib( aWorkRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
if (bUndo) // bei Undo alte Daten wieder reinschubsen
@@ -1621,7 +1619,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
ScRange aCopyRange = aWorkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
}
else // bei Redo Style wieder zuweisen
{
@@ -1638,6 +1636,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aWorkRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -1647,14 +1646,14 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
void ScUndoSelectionStyle::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoSelectionStyle::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1673,16 +1672,16 @@ void ScUndoSelectionStyle::Repeat(SfxRepeatTarget& rTarget)
}
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
- rViewShell.SetStyleSheetToMarked( pStyleSheet, TRUE );
+ rViewShell.SetStyleSheetToMarked( pStyleSheet, sal_True );
}
}
-BOOL ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
-USHORT ScUndoSelectionStyle::GetId() const
+sal_uInt16 ScUndoSelectionStyle::GetId() const
{
return STR_UNDO_APPLYCELLSTYLE;
}
@@ -1730,7 +1729,7 @@ void ScUndoEnterMatrix::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aBlockRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1773,7 +1772,7 @@ void ScUndoEnterMatrix::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1793,7 +1792,7 @@ ScRange lcl_GetMultiMarkRange( const ScMarkData& rMark )
}
ScUndoIndent::ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, BOOL bIncrement ) :
+ ScDocument* pNewUndoDoc, sal_Bool bIncrement ) :
ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -1808,7 +1807,7 @@ ScUndoIndent::~ScUndoIndent()
String ScUndoIndent::GetComment() const
{
- USHORT nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
+ sal_uInt16 nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
return ScGlobal::GetRscString( nId );
}
@@ -1821,7 +1820,7 @@ void ScUndoIndent::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1844,7 +1843,7 @@ void ScUndoIndent::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->ChangeIndent( bIsIncrement );
}
-BOOL ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1882,7 +1881,7 @@ void ScUndoTransliterate::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1905,7 +1904,7 @@ void ScUndoTransliterate::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->TransliterateText( nTransliterationType );
}
-BOOL ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1916,7 +1915,7 @@ BOOL ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, const USHORT* pW ) :
+ ScDocument* pNewUndoDoc, const sal_uInt16* pW ) :
ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -1924,11 +1923,11 @@ ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData&
{
DBG_ASSERT( pW, "ScUndoClearItems: Which-Pointer ist 0" );
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while ( pW[nCount] )
++nCount;
- pWhich = new USHORT[nCount+1];
- for (USHORT i=0; i<=nCount; i++)
+ pWhich = new sal_uInt16[nCount+1];
+ for (sal_uInt16 i=0; i<=nCount; i++)
pWhich[i] = pW[i];
}
@@ -1948,7 +1947,7 @@ void ScUndoClearItems::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1971,11 +1970,11 @@ void ScUndoClearItems::Repeat(SfxRepeatTarget& rTarget)
{
ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData();
ScDocFunc aFunc(*pViewData->GetDocShell());
- aFunc.ClearItems( pViewData->GetMarkData(), pWhich, FALSE );
+ aFunc.ClearItems( pViewData->GetMarkData(), pWhich, false );
}
}
-BOOL ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2010,9 +2009,9 @@ void ScUndoRemoveBreaks::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pDoc );
if (pViewShell)
- pViewShell->UpdatePageBreakData( TRUE );
+ pViewShell->UpdatePageBreakData( sal_True );
pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
EndUndo();
@@ -2028,7 +2027,7 @@ void ScUndoRemoveBreaks::Redo()
pDoc->RemoveManualBreaks(nTab);
pDoc->UpdatePageBreaks(nTab);
if (pViewShell)
- pViewShell->UpdatePageBreakData( TRUE );
+ pViewShell->UpdatePageBreakData( sal_True );
pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
EndRedo();
@@ -2043,7 +2042,7 @@ void ScUndoRemoveBreaks::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2087,7 +2086,7 @@ void ScUndoRemoveMerge::Undo()
// There is no need to extend merge area because it's already been extended.
ScRange aRange = maOption.getSingleRange(*itr);
pDoc->DeleteAreaTab(aRange, IDF_ATTRIB);
- pUndoDoc->CopyToDocument(aRange, IDF_ATTRIB, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aRange, IDF_ATTRIB, false, pDoc);
bool bDidPaint = false;
if ( pViewShell )
@@ -2132,11 +2131,11 @@ void ScUndoRemoveMerge::Redo()
maOption.mnEndCol, maOption.mnEndRow, nTab,
SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge(aRange, TRUE, FALSE);
+ pDoc->ExtendMerge(aRange, true, false);
// Paint
- BOOL bDidPaint = FALSE;
+ sal_Bool bDidPaint = false;
if ( pViewShell )
{
pViewShell->SetTabNo(nTab);
@@ -2155,7 +2154,7 @@ void ScUndoRemoveMerge::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->RemoveMerge();
}
-BOOL ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2222,8 +2221,8 @@ void ScUndoBorder::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( *pRanges, FALSE );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ aMarkData.MarkFromRangeList( *pRanges, false );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -2242,7 +2241,7 @@ void ScUndoBorder::Redo()
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
pDoc->ApplySelectionFrame( aMark, pOuter, pInner );
}
@@ -2257,9 +2256,9 @@ void ScUndoBorder::Repeat(SfxRepeatTarget& /* rTarget */)
//! spaeter (wenn die Funktion aus cellsuno nach docfunc gewandert ist)
}
-BOOL ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // s.o.
+ return false; // s.o.
}
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index fd5965acda0d..208a10d437cc 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -68,7 +68,7 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab,
ScDocument* pNewUndoDoc, SCCOLROW nNewCnt, SCCOLROW* pNewRanges,
ScOutlineTable* pNewUndoTab,
- ScSizeMode eNewMode, USHORT nNewSizeTwips, BOOL bNewWidth ) :
+ ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, sal_Bool bNewWidth ) :
ScSimpleUndo( pNewDocShell ),
aMarkData( rMark ),
nStart( nNewStart ),
@@ -114,18 +114,13 @@ void ScUndoWidthOrHeight::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
SCCOLROW nPaintStart = nStart > 0 ? nStart-1 : static_cast<SCCOLROW>(0);
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
+ if ( SetViewMarkData( aMarkData ) )
nPaintStart = 0; // paint all, because of changed selection
- }
}
//! outlines from all tables?
@@ -141,14 +136,14 @@ void ScUndoWidthOrHeight::Undo()
{
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE,
- FALSE, pDoc );
+ false, pDoc );
pDoc->UpdatePageBreaks( nTab );
pDocShell->PostPaint( static_cast<SCCOL>(nPaintStart), 0, nTab,
MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_TOP );
}
else // Height
{
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
pDocShell->PostPaint( 0, nPaintStart, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_LEFT );
}
@@ -156,6 +151,7 @@ void ScUndoWidthOrHeight::Undo()
DoSdrUndoAction( pDrawUndo, pDoc );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->UpdateScrollBars();
@@ -172,19 +168,14 @@ void ScUndoWidthOrHeight::Redo()
{
BeginRedo();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
-
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
- bPaintAll = TRUE; // paint all, because of changed selection
- }
+ if ( SetViewMarkData( aMarkData ) )
+ bPaintAll = sal_True; // paint all, because of changed selection
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -192,7 +183,7 @@ void ScUndoWidthOrHeight::Redo()
pViewShell->SetTabNo( nStartTab );
// SetWidthOrHeight aendert aktuelle Tabelle !
- pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData );
+ pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, false, true, &aMarkData );
}
// paint grid if selection was changed directly at the MarkData
@@ -205,10 +196,10 @@ void ScUndoWidthOrHeight::Redo()
void ScUndoWidthOrHeight::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, sal_True );
}
-BOOL ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index eb3987ff42d9..446e3dede1c6 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -95,8 +95,8 @@ TYPEINIT1(ScUndoUpdateAreaLink, SfxUndoAction);
ScUndoDeleteContents::ScUndoDeleteContents(
ScDocShell* pNewDocShell,
const ScMarkData& rMark, const ScRange& rRange,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
- USHORT nNewFlags, BOOL bObjects )
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
+ sal_uInt16 nNewFlags, sal_Bool bObjects )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -147,19 +147,17 @@ void ScUndoDeleteContents::SetChangeTrack()
//----------------------------------------------------------------------------
-void ScUndoDeleteContents::DoChange( const BOOL bUndo )
+void ScUndoDeleteContents::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if (bUndo) // nur Undo
{
- USHORT nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren
+ sal_uInt16 nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren
if (nFlags & IDF_CONTENTS) // (es sind nur die richtigen ins UndoDoc kopiert worden)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -191,13 +189,14 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo )
aMarkData.MarkToMulti();
RedoSdrUndoAction( pDrawUndo );
// do not delete objects and note captions, they have been removed via drawing undo
- USHORT nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pDoc->DeleteSelection( nRedoFlags, aMarkData );
aMarkData.MarkToSimple();
SetChangeTrack();
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -215,7 +214,7 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo )
void ScUndoDeleteContents::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
// #i97876# Spreadsheet data changes are not notified
@@ -234,7 +233,7 @@ void ScUndoDeleteContents::Undo()
void ScUndoDeleteContents::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
// #i97876# Spreadsheet data changes are not notified
@@ -253,13 +252,13 @@ void ScUndoDeleteContents::Redo()
void ScUndoDeleteContents::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -277,8 +276,8 @@ ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti, SCTAB nSrc,
- USHORT nFlg, USHORT nFunc, BOOL bSkip, BOOL bLink )
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti, SCTAB nSrc,
+ sal_uInt16 nFlg, sal_uInt16 nFunc, sal_Bool bSkip, sal_Bool bLink )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -320,7 +319,7 @@ void ScUndoFillTable::SetChangeTrack()
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
ScRange aWorkRange(aRange);
nStartChangeAction = 0;
- ULONG nTmpAction;
+ sal_uLong nTmpAction;
for ( SCTAB i = 0; i < nTabCount; i++ )
{
if (i != nSrcTab && aMarkData.GetTableSelect(i))
@@ -341,13 +340,11 @@ void ScUndoFillTable::SetChangeTrack()
//----------------------------------------------------------------------------
-void ScUndoFillTable::DoChange( const BOOL bUndo )
+void ScUndoFillTable::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
if (bUndo) // nur Undo
{
@@ -382,6 +379,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo )
// CellContentChanged kommt mit der Markierung
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -398,7 +396,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo )
void ScUndoFillTable::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -408,7 +406,7 @@ void ScUndoFillTable::Undo()
void ScUndoFillTable::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -424,7 +422,7 @@ void ScUndoFillTable::Repeat(SfxRepeatTarget& rTarget)
//----------------------------------------------------------------------------
-BOOL ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -441,7 +439,7 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
const ScPatternAttr* pNewApply,
const SvxBoxItem* pNewOuter, const SvxBoxInfoItem* pNewInner )
//
@@ -491,19 +489,17 @@ ScEditDataArray* ScUndoSelectionAttr::GetDataArray()
//----------------------------------------------------------------------------
-void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
+void ScUndoSelectionAttr::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aEffRange( aRange );
if ( pDoc->HasAttrib( aEffRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
pDoc->ExtendMerge( aEffRange );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aEffRange );
ChangeEditData(bUndo);
@@ -526,6 +522,7 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
pDoc->ApplySelectionFrame( aMarkData, pLineOuter, pLineInner );
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aEffRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -556,7 +553,7 @@ void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
void ScUndoSelectionAttr::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -566,7 +563,7 @@ void ScUndoSelectionAttr::Undo()
void ScUndoSelectionAttr::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -579,16 +576,16 @@ void ScUndoSelectionAttr::Repeat(SfxRepeatTarget& rTarget)
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (pLineOuter)
- rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, TRUE );
+ rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, sal_True );
else
- rViewShell.ApplySelectionPattern( *pApplyPattern, TRUE );
+ rViewShell.ApplySelectionPattern( *pApplyPattern, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -606,7 +603,7 @@ ScUndoAutoFill::ScUndoAutoFill( ScDocShell* pNewDocShell,
ScDocument* pNewUndoDoc, const ScMarkData& rMark,
FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd,
double fNewStartValue, double fNewStepValue, double fNewMaxValue,
- USHORT nMaxShIndex )
+ sal_uInt16 nMaxShIndex )
//
: ScBlockUndo( pNewDocShell, rRange, SC_UNDO_AUTOHEIGHT ),
//
@@ -687,12 +684,12 @@ void ScUndoAutoFill::Undo()
aWorkRange.aStart.SetTab(nTab);
aWorkRange.aEnd.SetTab(nTab);
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
pDoc->DeleteAreaTab( aWorkRange, IDF_AUTOFILL );
- pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, false, pDoc );
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags );
}
}
@@ -791,17 +788,17 @@ void ScUndoAutoFill::Repeat(SfxRepeatTarget& rTarget)
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (eFillCmd==FILL_SIMPLE)
- rViewShell.FillSimple( eFillDir, TRUE );
+ rViewShell.FillSimple( eFillDir, sal_True );
else
rViewShell.FillSeries( eFillDir, eFillCmd, eFillDateCmd,
- fStartValue, fStepValue, fMaxValue, TRUE );
+ fStartValue, fStepValue, fMaxValue, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -891,7 +888,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const
if (bUndo && mpUndoDoc)
{
pDoc->DeleteAreaTab( aRange, IDF_CONTENTS|IDF_NOCAPTIONS );
- mpUndoDoc->CopyToDocument( aRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ mpUndoDoc->CopyToDocument( aRange, IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
}
// redo -> merge contents again
@@ -949,15 +946,15 @@ void ScUndoMerge::Repeat(SfxRepeatTarget& rTarget)
if (rTarget.ISA(ScTabViewTarget))
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
- BOOL bCont = FALSE;
- rViewShell.MergeCells( FALSE, bCont, TRUE );
+ sal_Bool bCont = false;
+ rViewShell.MergeCells( false, bCont, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -972,7 +969,7 @@ BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoAutoFormat::ScUndoAutoFormat( ScDocShell* pNewDocShell,
const ScRange& rRange, ScDocument* pNewUndoDoc,
- const ScMarkData& rMark, BOOL bNewSize, USHORT nNewFormatNo )
+ const ScMarkData& rMark, sal_Bool bNewSize, sal_uInt16 nNewFormatNo )
//
: ScBlockUndo( pNewDocShell, rRange, bNewSize ? SC_UNDO_MANUALHEIGHT : SC_UNDO_AUTOHEIGHT ),
//
@@ -1010,7 +1007,7 @@ void ScUndoAutoFormat::Undo()
// Attribute
// pDoc->DeleteAreaTab( aBlockRange, IDF_ATTRIB );
-// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, FALSE, pDoc );
+// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_False, pDoc );
SCTAB nTabCount = pDoc->GetTableCount();
pDoc->DeleteArea( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(),
@@ -1019,7 +1016,7 @@ void ScUndoAutoFormat::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pDoc, &aMarkData );
// Zellhoehen und -breiten (IDF_NONE)
if (bSize)
@@ -1032,9 +1029,9 @@ void ScUndoAutoFormat::Undo()
SCTAB nEndZ = aBlockRange.aEnd.Tab();
pUndoDoc->CopyToDocument( nStartX, 0, 0, nEndX, MAXROW, nTabCount-1,
- IDF_NONE, FALSE, pDoc, &aMarkData );
+ IDF_NONE, false, pDoc, &aMarkData );
pUndoDoc->CopyToDocument( 0, nStartY, 0, MAXCOL, nEndY, nTabCount-1,
- IDF_NONE, FALSE, pDoc, &aMarkData );
+ IDF_NONE, false, pDoc, &aMarkData );
pDocShell->PostPaint( 0, 0, nStartZ, MAXCOL, MAXROW, nEndZ,
PAINT_GRID | PAINT_LEFT | PAINT_TOP, SC_PF_LINES );
}
@@ -1084,7 +1081,7 @@ void ScUndoAutoFormat::Redo()
nPPTY = ScGlobal::nScreenPPTY;
}
- BOOL bFormula = FALSE; //! merken
+ sal_Bool bFormula = false; //! merken
for (SCTAB nTab=nStartZ; nTab<=nEndZ; nTab++)
{
@@ -1096,22 +1093,22 @@ void ScUndoAutoFormat::Redo()
// wie SC_SIZE_VISOPT
for (SCROW nRow=nStartY; nRow<=nEndY; nRow++)
{
- BYTE nOld = pDoc->GetRowFlags(nRow,nTab);
+ sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab);
bool bHidden = pDoc->RowHidden(nRow, nTab);
if ( !bHidden && ( nOld & CR_MANUALSIZE ) )
pDoc->SetRowFlags( nRow, nTab, nOld & ~CR_MANUALSIZE );
}
pDoc->SetOptimalHeight( nStartY, nEndY, nTab, 0, &aVirtDev,
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
for (SCCOL nCol=nStartX; nCol<=nEndX; nCol++)
if (!pDoc->ColHidden(nCol, nTab))
{
- USHORT nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab,
+ sal_uInt16 nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab,
&aVirtDev, nPPTX, nPPTY, aZoomX, aZoomY, bFormula,
&aDestMark );
pDoc->SetColWidth( nCol, nTab, nThisSize );
- pDoc->ShowCol( nCol, nTab, TRUE );
+ pDoc->ShowCol( nCol, nTab, sal_True );
}
}
@@ -1131,13 +1128,13 @@ void ScUndoAutoFormat::Redo()
void ScUndoAutoFormat::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1229,8 +1226,7 @@ void ScUndoReplace::Undo()
DBG_ASSERT(pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL,
"ScUndoReplace:: Falscher Modus");
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
//! markierte Tabellen
//! Bereich merken ?
@@ -1238,10 +1234,10 @@ void ScUndoReplace::Undo()
// Undo-Dokument hat keine Zeilen-/Spalten-Infos, also mit bColRowFlags = FALSE
// kopieren, um Outline-Gruppen nicht kaputtzumachen.
- USHORT nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
+ sal_uInt16 nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
pUndoDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, MAXTAB,
- nUndoFlags, FALSE, pDoc, NULL, FALSE ); // ohne Row-Flags
+ nUndoFlags, false, pDoc, NULL, false ); // ohne Row-Flags
pDocShell->PostPaintGridAll();
}
else if (pSearchItem->GetPattern() &&
@@ -1252,12 +1248,12 @@ void ScUndoReplace::Undo()
pSearchItem->SetReplaceString(aTempStr);
pDoc->ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- aMarkData, TRUE);
+ aMarkData, sal_True);
pSearchItem->SetReplaceString(pSearchItem->GetSearchString());
pSearchItem->SetSearchString(aTempStr);
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
pDocShell->PostPaintGridAll();
}
else if (pSearchItem->GetCellType() == SVX_SEARCHIN_NOTE)
@@ -1268,7 +1264,7 @@ void ScUndoReplace::Undo()
pNote->SetText( aCursorPos, aUndoStr );
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
}
else
{
@@ -1279,7 +1275,7 @@ void ScUndoReplace::Undo()
pDoc->SetString( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aUndoStr );
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
pDocShell->PostPaintGridAll();
}
@@ -1302,14 +1298,14 @@ void ScUndoReplace::Redo()
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
if (pUndoDoc)
{
if (pViewShell)
{
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
- pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE );
+ pViewShell->SearchAndReplace( pSearchItem, false, sal_True );
}
}
else if (pSearchItem->GetPattern() &&
@@ -1317,12 +1313,12 @@ void ScUndoReplace::Redo()
{
pDoc->ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- aMarkData, TRUE);
+ aMarkData, sal_True);
pDocShell->PostPaintGridAll();
}
else
if (pViewShell)
- pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE );
+ pViewShell->SearchAndReplace( pSearchItem, false, sal_True );
SetChangeTrack();
@@ -1335,13 +1331,13 @@ void ScUndoReplace::Redo()
void ScUndoReplace::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, TRUE, FALSE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, sal_True, false );
}
//----------------------------------------------------------------------------
-BOOL ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1361,7 +1357,7 @@ ScUndoTabOp::ScUndoTabOp( ScDocShell* pNewDocShell,
const ScRefAddress& rFormulaEnd,
const ScRefAddress& rRowCell,
const ScRefAddress& rColCell,
- BYTE nMd )
+ sal_uInt8 nMd )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -1400,12 +1396,12 @@ void ScUndoTabOp::Undo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aRange );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aRange );
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aRange,IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
pDocShell->PostPaint( aRange, PAINT_GRID, nExtFlags );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1430,7 +1426,7 @@ void ScUndoTabOp::Redo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->TabOp( aParam, FALSE);
+ pViewShell->TabOp( aParam, false);
EndRedo();
}
@@ -1445,9 +1441,9 @@ void ScUndoTabOp::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1530,14 +1526,12 @@ void ScUndoConversion::DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPo
ScDocument* pDoc = pDocShell->GetDocument();
ShowTable( rCursorPos.Tab() );
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
SCTAB nTabCount = pDoc->GetTableCount();
// Undo/Redo-doc has only selected tables
- BOOL bMulti = aMarkData.IsMultiMarked();
+ sal_Bool bMulti = aMarkData.IsMultiMarked();
pRefDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, nTabCount-1,
IDF_CONTENTS, bMulti, pDoc, &aMarkData );
@@ -1579,13 +1573,13 @@ void ScUndoConversion::Redo()
void ScUndoConversion::Repeat( SfxRepeatTarget& rTarget )
{
if( rTarget.ISA( ScTabViewTarget ) )
- ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
{
return rTarget.ISA( ScTabViewTarget );
}
@@ -1600,7 +1594,7 @@ BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoRefConversion::ScUndoRefConversion( ScDocShell* pNewDocShell,
const ScRange& aMarkRange, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, BOOL bNewMulti, USHORT nNewFlag) :
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, sal_Bool bNewMulti, sal_uInt16 nNewFlag) :
ScSimpleUndo( pNewDocShell ),
aMarkData ( rMark ),
pUndoDoc ( pNewUndoDoc ),
@@ -1639,9 +1633,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
ShowTable(aRange);
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aCopyRange = aRange;
SCTAB nTabCount = pDoc->GetTableCount();
@@ -1650,6 +1642,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
pRefDoc->CopyToDocument( aCopyRange, nFlags, bMulti, pDoc, &aMarkData );
pDocShell->PostPaint( aRange, PAINT_GRID);
pDocShell->PostDataChanged();
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
pViewShell->CellContentChanged();
}
@@ -1679,7 +1672,7 @@ void ScUndoRefConversion::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->DoRefConversion();
}
-BOOL ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1724,11 +1717,11 @@ void ScUndoRefreshLink::Undo()
{
BeginUndo();
- BOOL bMakeRedo = !pRedoDoc;
+ sal_Bool bMakeRedo = !pRedoDoc;
if (bMakeRedo)
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nCount; nTab++)
@@ -1738,11 +1731,11 @@ void ScUndoRefreshLink::Undo()
if (bMakeRedo)
{
if (bFirst)
- pRedoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pRedoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
else
- pRedoDoc->AddUndoTab( nTab, nTab, TRUE, TRUE );
- bFirst = FALSE;
- pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pRedoDoc);
+ pRedoDoc->AddUndoTab( nTab, nTab, true, true );
+ bFirst = false;
+ pDoc->CopyToDocument(aRange, IDF_ALL, false, pRedoDoc);
pRedoDoc->SetLink( nTab,
pDoc->GetLinkMode(nTab),
pDoc->GetLinkDoc(nTab),
@@ -1753,7 +1746,7 @@ void ScUndoRefreshLink::Undo()
}
pDoc->DeleteAreaTab( aRange,IDF_ALL );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL, false, pDoc );
pDoc->SetLink( nTab, pUndoDoc->GetLinkMode(nTab), pUndoDoc->GetLinkDoc(nTab),
pUndoDoc->GetLinkFlt(nTab), pUndoDoc->GetLinkOpt(nTab),
pUndoDoc->GetLinkTab(nTab),
@@ -1782,7 +1775,7 @@ void ScUndoRefreshLink::Redo()
ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab);
pDoc->DeleteAreaTab( aRange, IDF_ALL );
- pRedoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aRange, IDF_ALL, false, pDoc );
pDoc->SetLink( nTab,
pRedoDoc->GetLinkMode(nTab),
pRedoDoc->GetLinkDoc(nTab),
@@ -1808,9 +1801,9 @@ void ScUndoRefreshLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1821,8 +1814,8 @@ ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const String& rDo
const String& rSrc, const ScRange& rDest )
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -1846,7 +1839,7 @@ ScUndoInsertAreaLink::ScUndoInsertAreaLink( ScDocShell* pShell,
const String& rDoc,
const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefresh )
+ sal_uLong nRefresh )
//
: ScSimpleUndo ( pShell ),
//
@@ -1900,11 +1893,11 @@ void ScUndoInsertAreaLink::Redo()
ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions,
aAreaName, aRange.aStart, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aRange );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
@@ -1920,9 +1913,9 @@ void ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1936,7 +1929,7 @@ BOOL ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoRemoveAreaLink::ScUndoRemoveAreaLink( ScDocShell* pShell,
const String& rDoc, const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefresh )
+ sal_uLong nRefresh )
//
: ScSimpleUndo ( pShell ),
//
@@ -1974,11 +1967,11 @@ void ScUndoRemoveAreaLink::Undo()
ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions,
aAreaName, aRange.aStart, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aRange );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
@@ -2010,9 +2003,9 @@ void ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -2025,10 +2018,10 @@ BOOL ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell,
const String& rOldD, const String& rOldF, const String& rOldO,
- const String& rOldA, const ScRange& rOldR, ULONG nOldRD,
+ const String& rOldA, const ScRange& rOldR, sal_uLong nOldRD,
const String& rNewD, const String& rNewF, const String& rNewO,
- const String& rNewA, const ScRange& rNewR, ULONG nNewRD,
- ScDocument* pUndo, ScDocument* pRedo, BOOL bDoInsert )
+ const String& rNewA, const ScRange& rNewR, sal_uLong nNewRD,
+ ScDocument* pUndo, ScDocument* pRedo, sal_Bool bDoInsert )
//
: ScSimpleUndo( pShell ),
//
@@ -2071,7 +2064,7 @@ String ScUndoUpdateAreaLink::GetComment() const
//----------------------------------------------------------------------------
-void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
+void ScUndoUpdateAreaLink::DoChange( const sal_Bool bUndo ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -2085,13 +2078,13 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
{
pDoc->FitBlock( aNewRange, aOldRange );
pDoc->DeleteAreaTab( aOldRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
}
else
@@ -2100,18 +2093,18 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
{
pDoc->FitBlock( aOldRange, aNewRange );
pDoc->DeleteAreaTab( aNewRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
}
ScRange aWorkRange( aNewRange.aStart, ScAddress( nEndX, nEndY, nEndZ ) );
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
// Paint
@@ -2145,7 +2138,7 @@ void ScUndoUpdateAreaLink::Undo()
pLink->SetRefreshDelay( nOldRefresh );
}
- DoChange(TRUE);
+ DoChange(sal_True);
}
@@ -2164,7 +2157,7 @@ void ScUndoUpdateAreaLink::Redo()
pLink->SetRefreshDelay( nNewRefresh );
}
- DoChange(FALSE);
+ DoChange(false);
}
@@ -2178,9 +2171,9 @@ void ScUndoUpdateAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index a57b0b137a9d..9743cf42c193 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -80,7 +80,7 @@ TYPEINIT1(ScUndoRangeNames, ScSimpleUndo);
ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
- const ScPatternAttr* pApplyPat, BOOL bAutomatic ) :
+ const ScPatternAttr* pApplyPat, sal_Bool bAutomatic ) :
ScSimpleUndo( pNewDocShell ),
nCol( nNewCol ),
nRow( nNewRow ),
@@ -107,7 +107,7 @@ String ScUndoCursorAttr::GetComment() const
{
//! eigener Text fuer automatische Attributierung
- USHORT nId = STR_UNDO_CURSORATTR; // "Attribute"
+ sal_uInt16 nId = STR_UNDO_CURSORATTR; // "Attribute"
return ScGlobal::GetRscString( nId );
}
@@ -120,7 +120,7 @@ void ScUndoCursorAttr::SetEditData( EditTextObject* pOld, EditTextObject* pNew )
void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const shared_ptr<EditTextObject>& pEditData ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->SetPattern( nCol, nRow, nTab, *pWhichPattern, TRUE );
+ pDoc->SetPattern( nCol, nRow, nTab, *pWhichPattern, true );
ScBaseCell* pCell;
pDoc->GetCell(nCol, nRow, nTab, pCell);
@@ -131,16 +131,16 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
pViewShell->AdjustBlockHeight();
}
const SfxItemSet& rApplySet = pApplyPattern->GetItemSet();
- BOOL bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, TRUE ) != SFX_ITEM_DEFAULT ||
- rApplySet.GetItemState( ATTR_CONDITIONAL, TRUE ) != SFX_ITEM_DEFAULT );
- BOOL bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, TRUE ) != SFX_ITEM_DEFAULT );
+ sal_Bool bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, sal_True ) != SFX_ITEM_DEFAULT ||
+ rApplySet.GetItemState( ATTR_CONDITIONAL, sal_True ) != SFX_ITEM_DEFAULT );
+ sal_Bool bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) != SFX_ITEM_DEFAULT );
- USHORT nFlags = SC_PF_TESTMERGE;
+ sal_uInt16 nFlags = SC_PF_TESTMERGE;
if (bPaintExt)
nFlags |= SC_PF_LINES;
if (bPaintRows)
@@ -179,7 +179,7 @@ void ScUndoCursorAttr::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->ApplySelectionPattern( *pApplyPattern );
}
-BOOL ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -193,7 +193,7 @@ BOOL ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
SCTAB nNewCount, SCTAB* pNewTabs, ScBaseCell** ppOldData,
- BOOL* pHasForm, ULONG* pOldForm,
+ sal_Bool* pHasForm, sal_uLong* pOldForm,
const String& rNewStr, EditTextObject* pObj ) :
ScSimpleUndo( pNewDocShell ),
aNewString( rNewStr ),
@@ -212,7 +212,7 @@ ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell,
ScUndoEnterData::~ScUndoEnterData()
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (ppOldCells[i])
ppOldCells[i]->Delete();
delete[] ppOldCells;
@@ -233,14 +233,14 @@ void ScUndoEnterData::DoChange() const
{
// Zeilenhoehe anpassen
//! nur wenn noetig (alte oder neue EditZelle, oder Attribute) ??
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
pDocShell->AdjustRowHeight( nRow, nRow, pTabs[i] );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
}
pDocShell->PostDataChanged();
@@ -253,10 +253,10 @@ void ScUndoEnterData::SetChangeTrack()
{
nEndChangeAction = pChangeTrack->GetActionMax() + 1;
ScAddress aPos( nCol, nRow, nTab );
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
aPos.SetTab( pTabs[i] );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if ( pHasFormat && pOldFormats )
{
if ( pHasFormat[i] )
@@ -276,7 +276,7 @@ void ScUndoEnterData::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScBaseCell* pNewCell = ppOldCells[i] ? ppOldCells[i]->CloneWithoutNote( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0;
pDoc->PutCell( nCol, nRow, pTabs[i], pNewCell );
@@ -290,14 +290,14 @@ void ScUndoEnterData::Undo()
{
ScPatternAttr aPattern( *pDoc->GetPattern( nCol, nRow, pTabs[i] ) );
aPattern.GetItemSet().ClearItem( ATTR_VALUE_FORMAT );
- pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, TRUE );
+ pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, sal_True );
}
}
pDocShell->PostPaintCell( nCol, nRow, pTabs[i] );
}
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
- if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<ULONG>(nCount) )
+ if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<sal_uLong>(nCount) )
pChangeTrack->Undo( nEndChangeAction - nCount + 1, nEndChangeAction );
DoChange();
@@ -308,7 +308,7 @@ void ScUndoEnterData::Undo()
if ( pModelObj && pModelObj->HasChangesListeners() )
{
ScRangeList aChangeRanges;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) );
}
@@ -321,7 +321,7 @@ void ScUndoEnterData::Redo()
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if (pNewEditData)
pDoc->PutCell( nCol, nRow, pTabs[i], new ScEditCell( pNewEditData,
@@ -341,7 +341,7 @@ void ScUndoEnterData::Redo()
if ( pModelObj && pModelObj->HasChangesListeners() )
{
ScRangeList aChangeRanges;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) );
}
@@ -358,7 +358,7 @@ void ScUndoEnterData::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -370,7 +370,7 @@ BOOL ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoEnterValue::ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, double nVal, BOOL bHeight ) :
+ ScBaseCell* pUndoCell, double nVal, sal_Bool bHeight ) :
ScSimpleUndo( pNewDocShell ),
aPos ( rNewPos ),
pOldCell ( pUndoCell ),
@@ -442,9 +442,9 @@ void ScUndoEnterValue::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -454,7 +454,7 @@ BOOL ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
//
ScUndoPutCell::ScUndoPutCell( ScDocShell* pNewDocShell, const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight ) :
+ ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, sal_Bool bHeight ) :
ScSimpleUndo( pNewDocShell ),
aPos ( rNewPos ),
pOldCell ( pUndoCell ),
@@ -531,9 +531,9 @@ void ScUndoPutCell::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -544,7 +544,7 @@ BOOL ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoPageBreak::ScUndoPageBreak( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
- BOOL bNewColumn, BOOL bNewInsert ) :
+ sal_Bool bNewColumn, sal_Bool bNewInsert ) :
ScSimpleUndo( pNewDocShell ),
nCol( nNewCol ),
nRow( nNewRow ),
@@ -572,19 +572,19 @@ String ScUndoPageBreak::GetComment() const
) );
}
-void ScUndoPageBreak::DoChange( BOOL bInsertP ) const
+void ScUndoPageBreak::DoChange( sal_Bool bInsertP ) const
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
if (bInsertP)
- pViewShell->InsertPageBreak(bColumn, FALSE);
+ pViewShell->InsertPageBreak(bColumn, false);
else
- pViewShell->DeletePageBreak(bColumn, FALSE);
+ pViewShell->DeletePageBreak(bColumn, false);
pDocShell->GetDocument()->InvalidatePageBreaks(nTab);
}
@@ -611,13 +611,13 @@ void ScUndoPageBreak::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bInsert)
- rViewShell.InsertPageBreak(bColumn, TRUE);
+ rViewShell.InsertPageBreak(bColumn, sal_True);
else
- rViewShell.DeletePageBreak(bColumn, TRUE);
+ rViewShell.DeletePageBreak(bColumn, sal_True);
}
}
-BOOL ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -628,7 +628,7 @@ BOOL ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoPrintZoom::ScUndoPrintZoom( ScDocShell* pNewDocShell,
- SCTAB nT, USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP ) :
+ SCTAB nT, sal_uInt16 nOS, sal_uInt16 nOP, sal_uInt16 nNS, sal_uInt16 nNP ) :
ScSimpleUndo( pNewDocShell ),
nTab( nT ),
nOldScale( nOS ),
@@ -647,10 +647,10 @@ String ScUndoPrintZoom::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_PRINTSCALE );
}
-void ScUndoPrintZoom::DoChange( BOOL bUndo )
+void ScUndoPrintZoom::DoChange( sal_Bool bUndo )
{
- USHORT nScale = bUndo ? nOldScale : nNewScale;
- USHORT nPages = bUndo ? nOldPages : nNewPages;
+ sal_uInt16 nScale = bUndo ? nOldScale : nNewScale;
+ sal_uInt16 nPages = bUndo ? nOldPages : nNewPages;
ScDocument* pDoc = pDocShell->GetDocument();
String aStyleName = pDoc->GetPageStyle( nTab );
@@ -671,14 +671,14 @@ void ScUndoPrintZoom::DoChange( BOOL bUndo )
void ScUndoPrintZoom::Undo()
{
BeginUndo();
- DoChange(TRUE);
+ DoChange(sal_True);
EndUndo();
}
void ScUndoPrintZoom::Redo()
{
BeginRedo();
- DoChange(FALSE);
+ DoChange(false);
EndRedo();
}
@@ -692,7 +692,7 @@ void ScUndoPrintZoom::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -751,7 +751,7 @@ void ScUndoThesaurus::SetChangeTrack( ScBaseCell* pOldCell )
nEndChangeAction = 0;
}
-void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
+void ScUndoThesaurus::DoChange( sal_Bool bUndo, const String& rStr,
const EditTextObject* pTObj )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -760,7 +760,7 @@ void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
}
if (pTObj)
@@ -798,7 +798,7 @@ void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
void ScUndoThesaurus::Undo()
{
BeginUndo();
- DoChange( TRUE, aUndoStr, pUndoTObject );
+ DoChange( sal_True, aUndoStr, pUndoTObject );
ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
if ( pChangeTrack )
pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
@@ -808,17 +808,17 @@ void ScUndoThesaurus::Undo()
void ScUndoThesaurus::Redo()
{
BeginRedo();
- DoChange( FALSE, aRedoStr, pRedoTObject );
+ DoChange( false, aRedoStr, pRedoTObject );
EndRedo();
}
void ScUndoThesaurus::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( sal_True );
}
-BOOL ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -883,9 +883,9 @@ void ScUndoReplaceNote::Repeat( SfxRepeatTarget& /*rTarget*/ )
{
}
-BOOL ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
+sal_Bool ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
{
- return FALSE;
+ return false;
}
String ScUndoReplaceNote::GetComment() const
@@ -955,9 +955,9 @@ void ScUndoShowHideNote::Repeat( SfxRepeatTarget& /*rTarget*/ )
{
}
-BOOL ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
+sal_Bool ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
{
- return FALSE;
+ return false;
}
String ScUndoShowHideNote::GetComment() const
@@ -983,7 +983,7 @@ ScUndoDetective::ScUndoDetective( ScDocShell* pNewDocShell,
bIsDelete = ( pOperation == NULL );
if (!bIsDelete)
{
- nAction = (USHORT) pOperation->GetOperation();
+ nAction = (sal_uInt16) pOperation->GetOperation();
aPos = pOperation->GetPos();
}
}
@@ -996,7 +996,7 @@ ScUndoDetective::~ScUndoDetective()
String ScUndoDetective::GetComment() const
{
- USHORT nId = STR_UNDO_DETDELALL;
+ sal_uInt16 nId = STR_UNDO_DETDELALL;
if ( !bIsDelete )
switch ( (ScDetOpType) nAction )
{
@@ -1030,7 +1030,7 @@ void ScUndoDetective::Undo()
ScDetOpList* pList = pDoc->GetDetOpList();
if (pList && pList->Count())
{
- USHORT nPos = pList->Count() - 1;
+ sal_uInt16 nPos = pList->Count() - 1;
ScDetOpData* pData = (*pList)[nPos];
if ( pData->GetOperation() == (ScDetOpType) nAction && pData->GetPos() == aPos )
pList->DeleteAndDestroy( nPos, 1 );
@@ -1073,9 +1073,9 @@ void ScUndoDetective::Repeat(SfxRepeatTarget& /* rTarget */)
// hammanich
}
-BOOL ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -1102,17 +1102,17 @@ String ScUndoRangeNames::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_RANGENAMES );
}
-void ScUndoRangeNames::DoChange( BOOL bUndo )
+void ScUndoRangeNames::DoChange( sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( sal_True ); // CreateFormulaString
if ( bUndo )
pDoc->SetRangeName( new ScRangeName( *pOldRanges ) );
else
pDoc->SetRangeName( new ScRangeName( *pNewRanges ) );
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( false ); // CompileFormulaString
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
}
@@ -1120,14 +1120,14 @@ void ScUndoRangeNames::DoChange( BOOL bUndo )
void ScUndoRangeNames::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoRangeNames::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1136,9 +1136,9 @@ void ScUndoRangeNames::Repeat(SfxRepeatTarget& /* rTarget */)
// hammanich
}
-BOOL ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 83d37fda9e62..dc23ff8f6aeb 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -85,8 +85,8 @@ TYPEINIT1(ScUndoDataForm, SfxUndoAction); // amelia
ScUndoDoOutline::ScUndoDoOutline( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
- ScDocument* pNewUndoDoc, BOOL bNewColumns,
- USHORT nNewLevel, USHORT nNewEntry, BOOL bNewShow ) :
+ ScDocument* pNewUndoDoc, sal_Bool bNewColumns,
+ sal_uInt16 nNewLevel, sal_uInt16 nNewEntry, sal_Bool bNewShow ) :
ScSimpleUndo( pNewDocShell ),
nStart( nNewStart ),
nEnd( nNewEnd ),
@@ -127,17 +127,17 @@ void ScUndoDoOutline::Undo()
// inverse Funktion ausfuehren
if (bShow)
- pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE, FALSE );
+ pViewShell->HideOutline( bColumns, nLevel, nEntry, false, false );
else
- pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE, FALSE );
+ pViewShell->ShowOutline( bColumns, nLevel, nEntry, false, false );
// Original Spalten-/Zeilenstatus
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
@@ -159,9 +159,9 @@ void ScUndoDoOutline::Redo()
pViewShell->SetTabNo( nTab );
if (bShow)
- pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE );
+ pViewShell->ShowOutline( bColumns, nLevel, nEntry, false );
else
- pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE );
+ pViewShell->HideOutline( bColumns, nLevel, nEntry, false );
EndRedo();
}
@@ -170,9 +170,9 @@ void ScUndoDoOutline::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
//
@@ -182,7 +182,7 @@ BOOL ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoMakeOutline::ScUndoMakeOutline( ScDocShell* pNewDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScOutlineTable* pNewUndoTab, BOOL bNewColumns, BOOL bNewMake ) :
+ ScOutlineTable* pNewUndoTab, sal_Bool bNewColumns, sal_Bool bNewMake ) :
ScSimpleUndo( pNewDocShell ),
aBlockStart( nStartX, nStartY, nStartZ ),
aBlockEnd( nEndX, nEndY, nEndZ ),
@@ -234,9 +234,9 @@ void ScUndoMakeOutline::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd );
if (bMake)
- pViewShell->MakeOutline( bColumns, FALSE );
+ pViewShell->MakeOutline( bColumns, false );
else
- pViewShell->RemoveOutline( bColumns, FALSE );
+ pViewShell->RemoveOutline( bColumns, false );
pDocShell->PostPaint(0,0,aBlockStart.Tab(),MAXCOL,MAXROW,aBlockEnd.Tab(),PAINT_GRID);
@@ -250,13 +250,13 @@ void ScUndoMakeOutline::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bMake)
- rViewShell.MakeOutline( bColumns, TRUE );
+ rViewShell.MakeOutline( bColumns, sal_True );
else
- rViewShell.RemoveOutline( bColumns, TRUE );
+ rViewShell.RemoveOutline( bColumns, sal_True );
}
}
-BOOL ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -268,7 +268,7 @@ BOOL ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoOutlineLevel::ScUndoOutlineLevel( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
- BOOL bNewColumns, USHORT nNewLevel ) :
+ sal_Bool bNewColumns, sal_uInt16 nNewLevel ) :
ScSimpleUndo( pNewDocShell ),
nStart( nNewStart ),
nEnd( nNewEnd ),
@@ -306,9 +306,9 @@ void ScUndoOutlineLevel::Undo()
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -335,7 +335,7 @@ void ScUndoOutlineLevel::Redo()
if ( nVisTab != nTab )
pViewShell->SetTabNo( nTab );
- pViewShell->SelectLevel( bColumns, nLevel, FALSE );
+ pViewShell->SelectLevel( bColumns, nLevel, false );
EndRedo();
}
@@ -343,10 +343,10 @@ void ScUndoOutlineLevel::Redo()
void ScUndoOutlineLevel::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, sal_True );
}
-BOOL ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -358,7 +358,7 @@ BOOL ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoOutlineBlock::ScUndoOutlineBlock( ScDocShell* pNewDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, BOOL bNewShow ) :
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, sal_Bool bNewShow ) :
ScSimpleUndo( pNewDocShell ),
aBlockStart( nStartX, nStartY, nStartZ ),
aBlockEnd( nEndX, nEndY, nEndZ ),
@@ -402,7 +402,7 @@ void ScUndoOutlineBlock::Undo()
if (!bShow)
{ // Groesse des ausgeblendeten Blocks
- USHORT nLevel;
+ sal_uInt16 nLevel;
pUndoTable->GetColArray()->FindTouchedLevel( nStartCol, nEndCol, nLevel );
pUndoTable->GetColArray()->ExtendBlock( nLevel, nStartCol, nEndCol );
pUndoTable->GetRowArray()->FindTouchedLevel( nStartRow, nEndRow, nLevel );
@@ -410,8 +410,8 @@ void ScUndoOutlineBlock::Undo()
}
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE, pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -434,9 +434,9 @@ void ScUndoOutlineBlock::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd );
if (bShow)
- pViewShell->ShowMarkedOutlines( FALSE );
+ pViewShell->ShowMarkedOutlines( false );
else
- pViewShell->HideMarkedOutlines( FALSE );
+ pViewShell->HideMarkedOutlines( false );
EndRedo();
}
@@ -448,13 +448,13 @@ void ScUndoOutlineBlock::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bShow)
- rViewShell.ShowMarkedOutlines( TRUE );
+ rViewShell.ShowMarkedOutlines( sal_True );
else
- rViewShell.HideMarkedOutlines( TRUE );
+ rViewShell.HideMarkedOutlines( sal_True );
}
}
-BOOL ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -505,8 +505,8 @@ void ScUndoRemoveAllOutlines::Undo()
SCROW nStartRow = aBlockStart.Row();
SCROW nEndRow = aBlockEnd.Row();
- pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -534,7 +534,7 @@ void ScUndoRemoveAllOutlines::Redo()
if ( nVisTab != nTab )
pViewShell->SetTabNo( nTab );
- pViewShell->RemoveAllOutlines( FALSE );
+ pViewShell->RemoveAllOutlines( false );
EndRedo();
}
@@ -542,10 +542,10 @@ void ScUndoRemoveAllOutlines::Redo()
void ScUndoRemoveAllOutlines::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( sal_True );
}
-BOOL ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -601,9 +601,9 @@ void ScUndoAutoOutline::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -636,7 +636,7 @@ void ScUndoAutoOutline::Redo()
ScRange aRange( aBlockStart.Col(), aBlockStart.Row(), nTab,
aBlockEnd.Col(), aBlockEnd.Row(), nTab );
ScOutlineDocFunc aFunc( *pDocShell );
- aFunc.AutoOutline( aRange, FALSE, FALSE );
+ aFunc.AutoOutline( aRange, false, false );
// auf der View markieren
// Wenn's beim Aufruf eine Mehrfachselektion war, ist es jetzt der
@@ -651,10 +651,10 @@ void ScUndoAutoOutline::Redo()
void ScUndoAutoOutline::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( sal_True );
}
-BOOL ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -725,9 +725,9 @@ void ScUndoSubTotals::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -740,9 +740,9 @@ void ScUndoSubTotals::Undo()
pDoc->DeleteAreaTab( 0,aParam.nRow1+1, MAXCOL,aParam.nRow2, nTab, IDF_ALL );
pUndoDoc->CopyToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_NONE, FALSE, pDoc ); // Flags
+ IDF_NONE, false, pDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab,
aParam.nCol2,aParam.nRow2,nTab );
@@ -750,7 +750,7 @@ void ScUndoSubTotals::Undo()
if (pUndoRange)
pDoc->SetRangeName( new ScRangeName( *pUndoRange ) );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
if ( nVisTab != nTab )
@@ -774,7 +774,7 @@ void ScUndoSubTotals::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab,
aParam.nCol2,aParam.nRow2,nTab );
- pViewShell->DoSubTotals( aParam, FALSE );
+ pViewShell->DoSubTotals( aParam, false );
EndRedo();
}
@@ -783,9 +783,9 @@ void ScUndoSubTotals::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -794,7 +794,7 @@ BOOL ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell,
SCTAB nNewTab, const ScSortParam& rParam,
- BOOL bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
+ sal_Bool bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
const ScRange* pDest ) :
ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab,
rParam.nCol2, rParam.nRow2, nNewTab ) ),
@@ -803,11 +803,11 @@ ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell,
bRepeatQuery( bQuery ),
pUndoDoc( pNewUndoDoc ),
pUndoDB( pNewUndoDB ),
- bDestArea( FALSE )
+ bDestArea( false )
{
if ( pDest )
{
- bDestArea = TRUE;
+ bDestArea = sal_True;
aDestRange = *pDest;
}
}
@@ -850,23 +850,23 @@ void ScUndoSort::Undo()
// do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo)
pDoc->DeleteAreaTab( nStartCol,nStartRow, nEndCol,nEndRow, nSortTab, IDF_ALL|IDF_NOCAPTIONS );
pUndoDoc->CopyToDocument( nStartCol, nStartRow, nSortTab, nEndCol, nEndRow, nSortTab,
- IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
if (bDestArea)
{
// do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo)
pDoc->DeleteAreaTab( aDestRange, IDF_ALL|IDF_NOCAPTIONS );
- pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
}
// Zeilenhoehen immer (wegen automatischer Anpassung)
//! auf ScBlockUndo umstellen
// if (bRepeatQuery)
pUndoDoc->CopyToDocument( 0, nStartRow, nSortTab, MAXCOL, nEndRow, nSortTab,
- IDF_NONE, FALSE, pDoc );
+ IDF_NONE, false, pDoc );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
if ( nVisTab != nSortTab )
@@ -891,7 +891,7 @@ void ScUndoSort::Redo()
pViewShell->MarkRange( ScRange( aSortParam.nCol1, aSortParam.nRow1, nTab,
aSortParam.nCol2, aSortParam.nRow2, nTab ) );
- pViewShell->Sort( aSortParam, FALSE );
+ pViewShell->Sort( aSortParam, false );
// Quellbereich painten wegen Markierung
if ( !aSortParam.bInplace )
@@ -905,9 +905,9 @@ void ScUndoSort::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -916,7 +916,7 @@ BOOL ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQueryParam& rParam,
ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
- const ScRange* pOld, BOOL bSize, const ScRange* pAdvSrc ) :
+ const ScRange* pOld, sal_Bool bSize, const ScRange* pAdvSrc ) :
ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab,
rParam.nCol2, rParam.nRow2, nNewTab ) ),
pDrawUndo( NULL ),
@@ -924,18 +924,18 @@ ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQuery
aQueryParam( rParam ),
pUndoDoc( pNewUndoDoc ),
pUndoDB( pNewUndoDB ),
- bIsAdvanced( FALSE ),
- bDestArea( FALSE ),
+ bIsAdvanced( false ),
+ bDestArea( false ),
bDoSize( bSize )
{
if ( pOld )
{
- bDestArea = TRUE;
+ bDestArea = sal_True;
aOldDest = *pOld;
}
if ( pAdvSrc )
{
- bIsAdvanced = TRUE;
+ bIsAdvanced = sal_True;
aAdvSource = *pAdvSrc;
}
@@ -961,7 +961,7 @@ void ScUndoQuery::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- BOOL bCopy = !aQueryParam.bInplace;
+ sal_Bool bCopy = !aQueryParam.bInplace;
SCCOL nDestEndCol = 0;
SCROW nDestEndRow = 0;
if (bCopy)
@@ -970,7 +970,7 @@ void ScUndoQuery::Undo()
nDestEndRow = aQueryParam.nDestRow + ( aQueryParam.nRow2-aQueryParam.nRow1 );
ScDBData* pData = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pData)
{
ScRange aNewDest;
@@ -998,22 +998,22 @@ void ScUndoQuery::Undo()
pUndoDoc->CopyToDocument( aQueryParam.nDestCol, aQueryParam.nDestRow, aQueryParam.nDestTab,
nDestEndCol, nDestEndRow, aQueryParam.nDestTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Attribute werden immer mitkopiert (#49287#)
// Rest von altem Bereich
if ( bDestArea && !bDoSize )
{
pDoc->DeleteAreaTab( aOldDest, IDF_ALL );
- pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, false, pDoc );
}
}
else
pUndoDoc->CopyToDocument( 0, aQueryParam.nRow1, nTab, MAXCOL, aQueryParam.nRow2, nTab,
- IDF_NONE, FALSE, pDoc );
+ IDF_NONE, false, pDoc );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
if (!bCopy)
{
@@ -1068,9 +1068,9 @@ void ScUndoQuery::Redo()
pViewShell->SetTabNo( nTab );
if ( bIsAdvanced )
- pViewShell->Query( aQueryParam, &aAdvSource, FALSE );
+ pViewShell->Query( aQueryParam, &aAdvSource, false );
else
- pViewShell->Query( aQueryParam, NULL, FALSE );
+ pViewShell->Query( aQueryParam, NULL, false );
EndRedo();
}
@@ -1079,9 +1079,9 @@ void ScUndoQuery::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -1089,7 +1089,7 @@ BOOL ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
//
ScUndoAutoFilter::ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange,
- const String& rName, BOOL bSet ) :
+ const String& rName, sal_Bool bSet ) :
ScDBFuncUndo( pNewDocShell, rRange ),
aDBName( rName ),
bFilterSet( bSet )
@@ -1105,11 +1105,11 @@ String ScUndoAutoFilter::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_QUERY ); // same as ScUndoQuery
}
-void ScUndoAutoFilter::DoChange( BOOL bUndo )
+void ScUndoAutoFilter::DoChange( sal_Bool bUndo )
{
- BOOL bNewFilter = bUndo ? !bFilterSet : bFilterSet;
+ sal_Bool bNewFilter = bUndo ? !bFilterSet : bFilterSet;
- USHORT nIndex;
+ sal_uInt16 nIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( aDBName, nIndex ) )
@@ -1136,14 +1136,14 @@ void ScUndoAutoFilter::DoChange( BOOL bUndo )
void ScUndoAutoFilter::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoAutoFilter::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1151,9 +1151,9 @@ void ScUndoAutoFilter::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//
@@ -1185,11 +1185,11 @@ void ScUndoDBData::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), TRUE );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // unnoetige Berechnungen vermeiden
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), sal_True );
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pDoc->SetAutoCalc( bOldAutoCalc );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -1203,11 +1203,11 @@ void ScUndoDBData::Redo()
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), TRUE );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // unnoetige Berechnungen vermeiden
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), sal_True );
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pDoc->SetAutoCalc( bOldAutoCalc );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -1219,9 +1219,9 @@ void ScUndoDBData::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
//
@@ -1243,7 +1243,7 @@ ScUndoImportData::ScUndoImportData( ScDocShell* pNewDocShell, SCTAB nNewTab,
pUndoDBData( pNewUndoData ),
pRedoDBData( pNewRedoData ),
nFormulaCols( nNewFormula ),
- bRedoFilled( FALSE )
+ bRedoFilled( false )
{
// redo doc doesn't contain imported data (but everything else)
}
@@ -1287,20 +1287,20 @@ void ScUndoImportData::Undo()
// imported data is deleted later anyway,
// so now delete each column after copying to save memory (#41216#)
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // outside of the loop
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // outside of the loop
for (SCCOL nCopyCol = nCol1; nCopyCol <= nCol2; nCopyCol++)
{
pDoc->CopyToDocument( nCopyCol,nRow1,nTab, nCopyCol,nRow2,nTab,
- IDF_CONTENTS & ~IDF_NOTE, FALSE, pRedoDoc );
+ IDF_CONTENTS & ~IDF_NOTE, false, pRedoDoc );
pDoc->DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, IDF_CONTENTS & ~IDF_NOTE );
pDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 );
}
pDoc->SetAutoCalc( bOldAutoCalc );
- bRedoFilled = TRUE;
+ bRedoFilled = sal_True;
}
}
- BOOL bMoveCells = pUndoDBData && pRedoDBData &&
+ sal_Bool bMoveCells = pUndoDBData && pRedoDBData &&
pRedoDBData->IsDoSize(); // in alt und neu gleich
if (bMoveCells)
{
@@ -1315,7 +1315,7 @@ void ScUndoImportData::Undo()
aOld.aEnd.SetCol( aOld.aEnd.Col() + nFormulaCols ); // FitBlock auch fuer Formeln
aNew.aEnd.SetCol( aNew.aEnd.Col() + nFormulaCols );
- pDoc->FitBlock( aNew, aOld, FALSE ); // rueckwaerts
+ pDoc->FitBlock( aNew, aOld, false ); // rueckwaerts
}
else
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
@@ -1323,7 +1323,7 @@ void ScUndoImportData::Undo()
pUndoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
nEndCol+nFormulaCols,nEndRow,nTab,
- IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ IDF_ALL & ~IDF_NOTE, false, pDoc );
if (pCurrentData)
{
@@ -1370,7 +1370,7 @@ void ScUndoImportData::Redo()
pCurrentData = ScUndoUtil::GetOldDBData( pUndoDBData, pDoc, nTab,
nCol1, nRow1, nCol2, nRow2 );
}
- BOOL bMoveCells = pUndoDBData && pRedoDBData &&
+ sal_Bool bMoveCells = pUndoDBData && pRedoDBData &&
pRedoDBData->IsDoSize(); // in alt und neu gleich
if (bMoveCells)
{
@@ -1387,14 +1387,14 @@ void ScUndoImportData::Redo()
pDoc->DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(),
aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); // incl. Formeln
+ pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, false, pDoc ); // incl. Formeln
}
else
{
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE );
pRedoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
if (pCurrentData)
@@ -1437,14 +1437,14 @@ void ScUndoImportData::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const
{
// Repeat nur fuer Import per DB-Bereich, dann ist pUndoDBData gesetzt
if (pUndoDBData)
return (rTarget.ISA(ScTabViewTarget));
else
- return FALSE; // Adressbuch
+ return false; // Adressbuch
}
//
@@ -1466,13 +1466,13 @@ ScUndoRepeatDB::ScUndoRepeatDB( ScDocShell* pNewDocShell, SCTAB nNewTab,
pUndoTable( pNewUndoTab ),
pUndoRange( pNewUndoRange ),
pUndoDB( pNewUndoDB ),
- bQuerySize( FALSE )
+ bQuerySize( false )
{
if ( pOldQ && pNewQ )
{
aOldQuery = *pOldQ;
aNewQuery = *pNewQ;
- bQuerySize = TRUE;;
+ bQuerySize = sal_True;;
}
}
@@ -1499,7 +1499,7 @@ void ScUndoRepeatDB::Undo()
if (bQuerySize)
{
- pDoc->FitBlock( aNewQuery, aOldQuery, FALSE );
+ pDoc->FitBlock( aNewQuery, aOldQuery, false );
if ( aNewQuery.aEnd.Col() == aOldQuery.aEnd.Col() )
{
@@ -1517,7 +1517,7 @@ void ScUndoRepeatDB::Undo()
aOldForm.aEnd.SetCol( aOldQuery.aEnd.Col() + nFormulaCols );
ScRange aNewForm = aOldForm;
aNewForm.aEnd.SetRow( aNewQuery.aEnd.Row() );
- pDoc->FitBlock( aNewForm, aOldForm, FALSE );
+ pDoc->FitBlock( aNewForm, aOldForm, false );
}
}
}
@@ -1549,9 +1549,9 @@ void ScUndoRepeatDB::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -1564,9 +1564,9 @@ void ScUndoRepeatDB::Undo()
MAXCOL, aBlockEnd.Row(), nTab, IDF_ALL );
pUndoDoc->CopyToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_NONE, FALSE, pDoc ); // Flags
+ IDF_NONE, false, pDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart.Col(),aBlockStart.Row(),nTab,
aBlockEnd.Col(),aBlockEnd.Row(),nTab );
@@ -1574,7 +1574,7 @@ void ScUndoRepeatDB::Undo()
if (pUndoRange)
pDoc->SetRangeName( new ScRangeName( *pUndoRange ) );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
// erack! it's broadcasted
// pDoc->SetDirty();
@@ -1604,7 +1604,7 @@ void ScUndoRepeatDB::Redo()
aBlockEnd.Col(),aBlockEnd.Row(),nTab );
pViewShell->SetCursor( aCursorPos.Col(), aCursorPos.Row() );
- pViewShell->RepeatDB( FALSE );
+ pViewShell->RepeatDB( false );
EndRedo();
}
@@ -1612,10 +1612,10 @@ void ScUndoRepeatDB::Redo()
void ScUndoRepeatDB::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( sal_True );
}
-BOOL ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1626,7 +1626,7 @@ BOOL ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoDataPilot::ScUndoDataPilot( ScDocShell* pNewDocShell,
ScDocument* pOldDoc, ScDocument* pNewDoc,
- const ScDPObject* pOldObj, const ScDPObject* pNewObj, BOOL bMove ) :
+ const ScDPObject* pOldObj, const ScDPObject* pNewObj, sal_Bool bMove ) :
ScSimpleUndo( pNewDocShell ),
pOldUndoDoc( pOldDoc ),
pNewUndoDoc( pNewDoc ),
@@ -1650,7 +1650,7 @@ ScUndoDataPilot::~ScUndoDataPilot()
String ScUndoDataPilot::GetComment() const
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( pOldUndoDoc && pNewUndoDoc )
nIndex = STR_UNDO_PIVOT_MODIFY;
else if ( pNewUndoDoc )
@@ -1674,13 +1674,13 @@ void ScUndoDataPilot::Undo()
{
aNewRange = pNewDPObject->GetOutRange();
pDoc->DeleteAreaTab( aNewRange, IDF_ALL );
- pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, FALSE, pDoc );
+ pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, false, pDoc );
}
if ( pOldDPObject && pOldUndoDoc )
{
aOldRange = pOldDPObject->GetOutRange();
pDoc->DeleteAreaTab( aOldRange, IDF_ALL );
- pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, FALSE, pDoc );
+ pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, false, pDoc );
}
// update objects in collection
@@ -1717,7 +1717,7 @@ void ScUndoDataPilot::Undo()
// re-insert deleted object
ScDPObject* pDestObj = new ScDPObject( *pOldDPObject );
- pDestObj->SetAlive(TRUE);
+ pDestObj->SetAlive(sal_True);
if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) )
{
OSL_FAIL("cannot insert DPObject");
@@ -1768,7 +1768,7 @@ void ScUndoDataPilot::Redo()
}
ScDBDocFunc aFunc( *pDocShell );
- aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, FALSE, FALSE, bAllowMove ); // no new undo action
+ aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, false, false, bAllowMove ); // no new undo action
EndRedo();
}
@@ -1778,10 +1778,10 @@ void ScUndoDataPilot::Repeat(SfxRepeatTarget& /* rTarget */)
//! allow deletion
}
-BOOL ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
//! allow deletion
- return FALSE;
+ return false;
}
@@ -1791,7 +1791,7 @@ BOOL ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoConsolidate::ScUndoConsolidate( ScDocShell* pNewDocShell, const ScArea& rArea,
const ScConsolidateParam& rPar, ScDocument* pNewUndoDoc,
- BOOL bReference, SCROW nInsCount, ScOutlineTable* pTab,
+ sal_Bool bReference, SCROW nInsCount, ScOutlineTable* pTab,
ScDBData* pData ) :
ScSimpleUndo( pNewDocShell ),
aDestArea( rArea ),
@@ -1836,19 +1836,19 @@ void ScUndoConsolidate::Undo()
pDoc->SetOutlineTable( nTab, pUndoTab );
// Zeilenstatus
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pDoc );
// Daten & Referenzen
pDoc->DeleteAreaTab( 0,aDestArea.nRowStart, MAXCOL,aDestArea.nRowEnd, nTab, IDF_ALL );
pUndoDoc->UndoToDocument( 0, aDestArea.nRowStart, nTab,
MAXCOL, aDestArea.nRowEnd, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Original-Bereich
if (pUndoData)
{
pDoc->DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, pDoc);
}
pDocShell->PostPaint( 0,aDestArea.nRowStart,nTab, MAXCOL,MAXROW,nTab,
@@ -1860,13 +1860,13 @@ void ScUndoConsolidate::Undo()
aDestArea.nColEnd,aDestArea.nRowEnd, nTab, IDF_ALL );
pUndoDoc->CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Original-Bereich
if (pUndoData)
{
pDoc->DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, pDoc);
}
SCCOL nEndX = aDestArea.nColEnd;
@@ -1888,7 +1888,7 @@ void ScUndoConsolidate::Undo()
ScDBCollection* pColl = pDoc->GetDBCollection();
if (pColl)
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if (pColl->SearchName( pUndoData->GetName(), nIndex ))
{
ScDBData* pDocData = (*pColl)[nIndex];
@@ -1917,7 +1917,7 @@ void ScUndoConsolidate::Redo()
{
BeginRedo();
- pDocShell->DoConsolidate( aParam, FALSE );
+ pDocShell->DoConsolidate( aParam, false );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -1934,9 +1934,9 @@ void ScUndoConsolidate::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1952,8 +1952,8 @@ void ScUndoChartData::Init()
}
ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
- const ScRange& rNew, BOOL bColHdr, BOOL bRowHdr,
- BOOL bAdd ) :
+ const ScRange& rNew, sal_Bool bColHdr, sal_Bool bRowHdr,
+ sal_Bool bAdd ) :
ScSimpleUndo( pNewDocShell ),
aChartName( rName ),
bNewColHeaders( bColHdr ),
@@ -1967,8 +1967,8 @@ ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
}
ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
- const ScRangeListRef& rNew, BOOL bColHdr, BOOL bRowHdr,
- BOOL bAdd ) :
+ const ScRangeListRef& rNew, sal_Bool bColHdr, sal_Bool bRowHdr,
+ sal_Bool bAdd ) :
ScSimpleUndo( pNewDocShell ),
aChartName( rName ),
aNewRangeListRef( rNew ),
@@ -1993,7 +1993,7 @@ void ScUndoChartData::Undo()
BeginUndo();
pDocShell->GetDocument()->UpdateChartArea( aChartName, aOldRangeListRef,
- bOldColHeaders, bOldRowHeaders, FALSE );
+ bOldColHeaders, bOldRowHeaders, false );
EndUndo();
}
@@ -2012,9 +2012,9 @@ void ScUndoChartData::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// Amelia Wang
@@ -2023,10 +2023,10 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData,
void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
- BOOL bRedoIsFilled ) :
+ sal_Bool bRedoIsFilled ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -2076,7 +2076,7 @@ void ScUndoDataForm::SetChangeTrack()
void ScUndoDataForm::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( true );
ShowTable( aBlockRange );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -2086,9 +2086,9 @@ void ScUndoDataForm::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, true ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
}
@@ -2097,31 +2097,31 @@ void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/)
{
}
-BOOL ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
-void ScUndoDataForm::DoChange( const BOOL bUndo )
+void ScUndoDataForm::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
// RefUndoData for redo is created before first undo
// (with DeleteUnchanged after the DoUndo call)
- BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
+ sal_Bool bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
if ( bCreateRedoData )
pRefRedoData = new ScRefUndoData( pDoc );
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// fuer Undo immer alle oder keine Inhalte sichern
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
nUndoFlags |= IDF_ATTRIB;
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -2130,8 +2130,8 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
{
if (!pRedoDoc)
{
- BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
- BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
+ sal_Bool bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
+ sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
@@ -2141,11 +2141,11 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, 1, FALSE, pRedoDoc );
- bRedoFilled = TRUE;
+ pDoc->CopyToDocument( aCopyRange, 1, false, pRedoDoc );
+ bRedoFilled = true;
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
for ( sal_uInt16 i=0; i <= ( aBlockRange.aEnd.Col() - aBlockRange.aStart.Col() ); i++ )
@@ -2157,9 +2157,9 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
if (pWorkRefData)
{
- pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
+ pWorkRefData->DoUndo( pDoc, true ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
- bPaintAll = TRUE;
+ bPaintAll = true;
}
if ( bCreateRedoData && pRefRedoData )
@@ -2175,8 +2175,8 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
SetChangeTrack();
ScRange aDrawRange( aBlockRange );
- pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
- USHORT nPaint = PAINT_GRID;
+ pDoc->ExtendMerge( aDrawRange, true ); // only needed for single sheet (text/rtf etc.)
+ sal_uInt16 nPaint = PAINT_GRID;
if (bPaintAll)
{
aDrawRange.aStart.SetCol(0);
@@ -2185,7 +2185,7 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
aDrawRange.aEnd.SetRow(MAXROW);
nPaint |= PAINT_TOP | PAINT_LEFT;
/*A*/ if (pViewShell)
- pViewShell->AdjustBlockHeight(FALSE);
+ pViewShell->AdjustBlockHeight(false);
}
else
{
@@ -2199,7 +2199,7 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
nPaint |= PAINT_LEFT;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
+/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index cfc83b6592ac..8a263080ae1d 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -131,7 +131,7 @@ String ScUndoDraw::GetRepeatComment(SfxRepeatTarget& rTarget) const
return String();
}
-USHORT ScUndoDraw::GetId() const
+sal_uInt16 ScUndoDraw::GetId() const
{
if (pDrawUndo)
return pDrawUndo->GetId();
@@ -139,26 +139,26 @@ USHORT ScUndoDraw::GetId() const
return 0;
}
-BOOL ScUndoDraw::IsLinked()
+sal_Bool ScUndoDraw::IsLinked()
{
if (pDrawUndo)
return pDrawUndo->IsLinked();
else
- return FALSE;
+ return false;
}
-void ScUndoDraw::SetLinked( BOOL bIsLinked )
+void ScUndoDraw::SetLinked( sal_Bool bIsLinked )
{
if (pDrawUndo)
pDrawUndo->SetLinked(bIsLinked);
}
-BOOL ScUndoDraw::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoDraw::Merge( SfxUndoAction* pNextAction )
{
if (pDrawUndo)
return pDrawUndo->Merge(pNextAction);
else
- return FALSE;
+ return false;
}
void ScUndoDraw::Undo()
@@ -185,12 +185,12 @@ void ScUndoDraw::Repeat(SfxRepeatTarget& rTarget)
pDrawUndo->Repeat(rTarget);
}
-BOOL ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (pDrawUndo)
return pDrawUndo->CanRepeat(rTarget);
else
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx
index 31c96cb0b061..843c275ef0cb 100644
--- a/sc/source/ui/undo/undoolk.cxx
+++ b/sc/source/ui/undo/undoolk.cxx
@@ -92,7 +92,7 @@ void DeleteSdrUndoAction( SdrUndoAction* pUndoAction )
delete pUndoAction;
}
-void EnableDrawAdjust( ScDocument* pDoc, BOOL bEnable )
+void EnableDrawAdjust( ScDocument* pDoc, sal_Bool bEnable )
{
ScDrawLayer* pLayer = pDoc->GetDrawLayer();
if (pLayer)
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 619736f8f188..f8286ed4b264 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -119,13 +119,13 @@ ScUndoModifyStyle::~ScUndoModifyStyle()
String ScUndoModifyStyle::GetComment() const
{
- USHORT nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
+ sal_uInt16 nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
STR_UNDO_EDITCELLSTYLE :
STR_UNDO_EDITPAGESTYLE;
return ScGlobal::GetRscString( nId );
}
-void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, BOOL bRemoved )
+void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, sal_Bool bRemoved )
{
//! move to document or docshell
@@ -147,8 +147,8 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
ScDocument* pDoc = pDocSh->GetDocument();
ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
String aNewName = rData.GetName();
- BOOL bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style
- BOOL bNew = ( rName.Len() == 0 && !bDelete ); // creating new style
+ sal_Bool bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style
+ sal_Bool bNew = ( rName.Len() == 0 && !bDelete ); // creating new style
SfxStyleSheetBase* pStyle = NULL;
if ( rName.Len() )
@@ -177,7 +177,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
if ( bDelete )
{
if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
- lcl_DocStyleChanged( pDoc, pStyle, TRUE ); // TRUE: remove usage of style
+ lcl_DocStyleChanged( pDoc, pStyle, sal_True ); // TRUE: remove usage of style
else
pDoc->RemovePageStyleInUse( rName );
@@ -196,11 +196,11 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
const SfxItemSet* pNewSet = rData.GetItems();
DBG_ASSERT( pNewSet, "no ItemSet for style" );
if (pNewSet)
- rStyleSet.Set( *pNewSet, FALSE );
+ rStyleSet.Set( *pNewSet, false );
if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
{
- lcl_DocStyleChanged( pDoc, pStyle, FALSE ); // cell styles: row heights
+ lcl_DocStyleChanged( pDoc, pStyle, false ); // cell styles: row heights
}
else
{
@@ -212,7 +212,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
if (pNewSet)
pDoc->ModifyStyleSheet( *pStyle, *pNewSet );
- pDocSh->PageStyleModified( aNewName, TRUE );
+ pDocSh->PageStyleModified( aNewName, sal_True );
}
}
}
@@ -241,9 +241,9 @@ void ScUndoModifyStyle::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // no repeat possible
+ return false; // no repeat possible
}
// -----------------------------------------------------------------------
@@ -303,9 +303,9 @@ void ScUndoApplyPageStyle::Repeat(SfxRepeatTarget& /* rTarget */)
//! set same page style to current tab
}
-BOOL ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0af08d48593c..97f2549711e1 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -59,7 +59,7 @@
#include <vector>
-extern BOOL bDrawIsInUndo; //! irgendwo als Member !!!
+extern sal_Bool bDrawIsInUndo; //! irgendwo als Member !!!
using namespace com::sun::star;
using ::com::sun::star::uno::Sequence;
@@ -94,7 +94,7 @@ TYPEINIT1(ScUndoTabColor, SfxUndoAction);
ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,
+ sal_Bool bApp,
const String& rNewName) :
ScSimpleUndo( pNewDocShell ),
sNewName( rNewName ),
@@ -137,11 +137,11 @@ void ScUndoInsertTab::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
pViewShell->SetTabNo(nTab);
- pDocShell->SetInUndo( TRUE ); //! BeginUndo
- bDrawIsInUndo = TRUE;
- pViewShell->DeleteTable( nTab, FALSE );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndUndo
+ pDocShell->SetInUndo( sal_True ); //! BeginUndo
+ bDrawIsInUndo = sal_True;
+ pViewShell->DeleteTable( nTab, false );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndUndo
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
@@ -149,7 +149,7 @@ void ScUndoInsertTab::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -159,17 +159,17 @@ void ScUndoInsertTab::Redo()
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
if (bAppend)
- pViewShell->AppendTable( sNewName, FALSE );
+ pViewShell->AppendTable( sNewName, false );
else
{
pViewShell->SetTabNo(nTab);
- pViewShell->InsertTable( sNewName, nTab, FALSE );
+ pViewShell->InsertTable( sNewName, nTab, false );
}
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndRedo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndRedo
SetChangeTrack();
}
@@ -181,7 +181,7 @@ void ScUndoInsertTab::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -193,7 +193,7 @@ BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,SvStrings *pNewNameList) :
+ sal_Bool bApp,SvStrings *pNewNameList) :
ScSimpleUndo( pNewDocShell ),
pDrawUndo( NULL ),
nTab( nTabNum ),
@@ -212,7 +212,7 @@ ScUndoInsertTables::~ScUndoInsertTables()
{
for(int i=0;i<pNameList->Count();i++)
{
- pStr=pNameList->GetObject(sal::static_int_cast<USHORT>(i));
+ pStr=pNameList->GetObject(sal::static_int_cast<sal_uInt16>(i));
delete pStr;
}
pNameList->Remove(0,pNameList->Count());
@@ -251,19 +251,19 @@ void ScUndoInsertTables::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
pViewShell->SetTabNo(nTab);
- pDocShell->SetInUndo( TRUE ); //! BeginUndo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginUndo
+ bDrawIsInUndo = sal_True;
vector<SCTAB> TheTabs;
for(int i=0; i<pNameList->Count(); ++i)
{
TheTabs.push_back(nTab+i);
}
- pViewShell->DeleteTables( TheTabs, FALSE );
+ pViewShell->DeleteTables( TheTabs, false );
TheTabs.clear();
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndUndo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndUndo
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
@@ -271,7 +271,7 @@ void ScUndoInsertTables::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -281,13 +281,13 @@ void ScUndoInsertTables::Redo()
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
pViewShell->SetTabNo(nTab);
- pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),FALSE );
+ pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),false );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndRedo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndRedo
SetChangeTrack();
}
@@ -299,7 +299,7 @@ void ScUndoInsertTables::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -333,7 +333,7 @@ void ScUndoDeleteTab::SetChangeTrack()
ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
if ( pChangeTrack )
{
- ULONG nTmpChangeAction;
+ sal_uLong nTmpChangeAction;
nStartChangeAction = pChangeTrack->GetActionMax() + 1;
nEndChangeAction = 0;
ScRange aRange( 0, 0, 0, MAXCOL, MAXROW, 0 );
@@ -363,7 +363,7 @@ void ScUndoDeleteTab::Undo()
unsigned int i=0;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bLink = FALSE;
+ sal_Bool bLink = false;
String aName;
for(i=0; i<theTabs.size(); ++i)
@@ -371,33 +371,33 @@ void ScUndoDeleteTab::Undo()
SCTAB nTab = theTabs[i];
pRefUndoDoc->GetName( nTab, aName );
- bDrawIsInUndo = TRUE;
- BOOL bOk = pDoc->InsertTab( nTab, aName );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = sal_True;
+ sal_Bool bOk = pDoc->InsertTab( nTab, aName );
+ bDrawIsInUndo = false;
if (bOk)
{
- pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pDoc );
+ pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pDoc );
String aOldName;
pRefUndoDoc->GetName( nTab, aOldName );
- pDoc->RenameTab( nTab, aOldName, FALSE );
+ pDoc->RenameTab( nTab, aOldName, false );
if (pRefUndoDoc->IsLinked(nTab))
{
pDoc->SetLink( nTab, pRefUndoDoc->GetLinkMode(nTab), pRefUndoDoc->GetLinkDoc(nTab),
pRefUndoDoc->GetLinkFlt(nTab), pRefUndoDoc->GetLinkOpt(nTab),
pRefUndoDoc->GetLinkTab(nTab), pRefUndoDoc->GetLinkRefreshDelay(nTab) );
- bLink = TRUE;
+ bLink = sal_True;
}
if ( pRefUndoDoc->IsScenario(nTab) )
{
- pDoc->SetScenario( nTab, TRUE );
+ pDoc->SetScenario( nTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
pDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
- BOOL bActive = pRefUndoDoc->IsActiveScenario( nTab );
+ sal_Bool bActive = pRefUndoDoc->IsActiveScenario( nTab );
pDoc->SetActiveScenario( nTab, bActive );
}
pDoc->SetVisible( nTab, pRefUndoDoc->IsVisible( nTab ) );
@@ -430,28 +430,28 @@ void ScUndoDeleteTab::Undo()
pDocShell->PostPaint(0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_ALL ); // incl. Extras
- // nicht ShowTable wegen SetTabNo(..., TRUE):
+ // nicht ShowTable wegen SetTabNo(..., sal_True):
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs[0] ), TRUE );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs[0] ), true );
}
void ScUndoDeleteTab::Redo()
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs[0] ) );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs.front() ) );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
- pViewShell->DeleteTables( theTabs, FALSE );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( TRUE ); //! EndRedo
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
+ pViewShell->DeleteTables( theTabs, false );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( sal_True ); //! EndRedo
SetChangeTrack();
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -460,11 +460,11 @@ void ScUndoDeleteTab::Repeat(SfxRepeatTarget& rTarget)
if (rTarget.ISA(ScTabViewTarget))
{
ScTabViewShell* pViewShell = ((ScTabViewTarget&)rTarget).GetViewShell();
- pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), TRUE );
+ pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), sal_True );
}
}
-BOOL ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -527,9 +527,9 @@ void ScUndoRenameTab::Repeat(SfxRepeatTarget& /* rTarget */)
// Repeat macht keinen Sinn
}
-BOOL ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -563,7 +563,7 @@ String ScUndoMoveTab::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_MOVE_TAB );
}
-void ScUndoMoveTab::DoChange( BOOL bUndo ) const
+void ScUndoMoveTab::DoChange( sal_Bool bUndo ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -579,7 +579,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
pDoc->MoveTab( nDestTab, nOldTab );
pViewShell->GetViewData()->MoveTab( nDestTab, nOldTab );
- pViewShell->SetTabNo( nOldTab, TRUE );
+ pViewShell->SetTabNo( nOldTab, true );
if (mpOldNames)
{
const OUString& rOldName = (*mpOldNames)[i-1];
@@ -599,7 +599,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
pDoc->MoveTab( nOldTab, nNewTab );
pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab );
- pViewShell->SetTabNo( nDestTab, TRUE );
+ pViewShell->SetTabNo( nDestTab, true );
if (mpNewNames)
{
const OUString& rNewName = (*mpNewNames)[i];
@@ -617,28 +617,28 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
void ScUndoMoveTab::Undo()
{
- DoChange( TRUE );
+ DoChange( sal_True );
}
void ScUndoMoveTab::Redo()
{
- DoChange( FALSE );
+ DoChange( false );
}
void ScUndoMoveTab::Repeat(SfxRepeatTarget& /* rTarget */)
{
- // kein Repeat ! ? !
+ // No Repeat ! ? !
}
-BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------------
//
-// Tabelle kopieren
+// Copy table
//
ScUndoCopyTab::ScUndoCopyTab(
@@ -673,7 +673,7 @@ void ScUndoCopyTab::DoChange() const
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo((*mpOldTabs)[0],TRUE);
+ pViewShell->SetTabNo((*mpOldTabs)[0],true);
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
@@ -695,9 +695,9 @@ void ScUndoCopyTab::Undo()
if (nDestTab > MAXTAB) // append?
nDestTab = pDoc->GetTableCount() - 1;
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->DeleteTab(nDestTab);
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
}
// ScTablesHint broadcasts after all sheets have been deleted,
@@ -729,9 +729,9 @@ void ScUndoCopyTab::Redo()
if (nDestTab > MAXTAB) // angehaengt ?
nDestTab = pDoc->GetTableCount() - 1;
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->CopyTab( nOldTab, nNewTab );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab );
@@ -741,15 +741,15 @@ void ScUndoCopyTab::Redo()
if ( pDoc->IsScenario(nAdjSource) )
{
- pDoc->SetScenario(nNewTab, TRUE );
+ pDoc->SetScenario(nNewTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags );
pDoc->SetScenarioData(nNewTab, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario(nAdjSource);
+ sal_Bool bActive = pDoc->IsActiveScenario(nAdjSource);
pDoc->SetActiveScenario(nNewTab, bActive );
- BOOL bVisible=pDoc->IsVisible(nAdjSource);
+ sal_Bool bVisible=pDoc->IsVisible(nAdjSource);
pDoc->SetVisible(nNewTab,bVisible );
}
@@ -765,7 +765,7 @@ void ScUndoCopyTab::Redo()
RedoSdrUndoAction( pDrawUndo ); // after the sheets are inserted
- pViewShell->SetTabNo( nDestTab, TRUE ); // after draw-undo
+ pViewShell->SetTabNo( nDestTab, sal_True ); // after draw-undo
DoChange();
@@ -776,9 +776,9 @@ void ScUndoCopyTab::Repeat(SfxRepeatTarget& /* rTarget */)
// kein Repeat ! ? !
}
-BOOL ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------------------
@@ -849,9 +849,9 @@ void ScUndoTabColor::Repeat(SfxRepeatTarget& /* rTarget */)
// No Repeat
}
-BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -862,7 +862,7 @@ BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell,
SCTAB nSrc, SCTAB nDest,
const String& rN, const String& rC,
- const Color& rCol, USHORT nF,
+ const Color& rCol, sal_uInt16 nF,
const ScMarkData& rMark ) :
ScSimpleUndo( pNewDocShell ),
nSrcTab( nSrc ),
@@ -891,11 +891,11 @@ void ScUndoMakeScenario::Undo()
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDocShell->SetInUndo( TRUE );
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True );
+ bDrawIsInUndo = sal_True;
pDoc->DeleteTab( nDestTab );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false );
DoSdrUndoAction( pDrawUndo, pDoc );
@@ -904,32 +904,31 @@ void ScUndoMakeScenario::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( nSrcTab, TRUE );
+ pViewShell->SetTabNo( nSrcTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
void ScUndoMakeScenario::Redo()
{
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE );
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True );
+ bDrawIsInUndo = sal_True;
- pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, FALSE );
+ pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, false );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( nDestTab, TRUE );
+ pViewShell->SetTabNo( nDestTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
}
@@ -942,7 +941,7 @@ void ScUndoMakeScenario::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -954,7 +953,7 @@ BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoImportTab::ScUndoImportTab( ScDocShell* pShell,
- SCTAB nNewTab, SCTAB nNewCount, BOOL bNewLink ) :
+ SCTAB nNewTab, SCTAB nNewCount, sal_Bool bNewLink ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
nCount( nNewCount ),
@@ -985,11 +984,11 @@ void ScUndoImportTab::DoChange() const
{
if(nTab<nTabCount)
{
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
}
else
{
- pViewShell->SetTabNo(nTab-1,TRUE);
+ pViewShell->SetTabNo(nTab-1,sal_True);
}
}
@@ -1004,32 +1003,32 @@ void ScUndoImportTab::Undo()
SCTAB i;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bMakeRedo = !pRedoDoc;
+ sal_Bool bMakeRedo = !pRedoDoc;
if (bMakeRedo)
{
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, TRUE,TRUE );
+ pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, sal_True,sal_True );
String aOldName;
for (i=0; i<nCount; i++)
{
SCTAB nTabPos=nTab+i;
- pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pRedoDoc );
+ pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, pRedoDoc );
pDoc->GetName( nTabPos, aOldName );
- pRedoDoc->RenameTab( nTabPos, aOldName, FALSE );
+ pRedoDoc->RenameTab( nTabPos, aOldName, false );
if ( pDoc->IsScenario(nTabPos) )
{
- pRedoDoc->SetScenario(nTabPos, TRUE );
+ pRedoDoc->SetScenario(nTabPos, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
pRedoDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario(nTabPos);
+ sal_Bool bActive = pDoc->IsActiveScenario(nTabPos);
pRedoDoc->SetActiveScenario(nTabPos, bActive );
- BOOL bVisible=pDoc->IsVisible(nTabPos);
+ sal_Bool bVisible=pDoc->IsVisible(nTabPos);
pRedoDoc->SetVisible(nTabPos,bVisible );
}
@@ -1041,10 +1040,10 @@ void ScUndoImportTab::Undo()
DoSdrUndoAction( pDrawUndo, pDoc ); // before the sheets are deleted
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
for (i=0; i<nCount; i++)
pDoc->DeleteTab( nTab );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
DoChange();
}
@@ -1064,26 +1063,26 @@ void ScUndoImportTab::Redo()
{
SCTAB nTabPos=nTab+i;
pRedoDoc->GetName(nTabPos,aName);
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->InsertTab(nTabPos,aName);
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
}
for (i=0; i<nCount; i++) // then copy into inserted sheets
{
SCTAB nTabPos=nTab+i;
- pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pDoc );
+ pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, pDoc );
if ( pRedoDoc->IsScenario(nTabPos) )
{
- pDoc->SetScenario(nTabPos, TRUE );
+ pDoc->SetScenario(nTabPos, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
pDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags );
- BOOL bActive = pRedoDoc->IsActiveScenario(nTabPos);
+ sal_Bool bActive = pRedoDoc->IsActiveScenario(nTabPos);
pDoc->SetActiveScenario(nTabPos, bActive );
- BOOL bVisible=pRedoDoc->IsVisible(nTabPos);
+ sal_Bool bVisible=pRedoDoc->IsVisible(nTabPos);
pDoc->SetVisible(nTabPos,bVisible );
}
@@ -1103,7 +1102,7 @@ void ScUndoImportTab::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1122,12 +1121,12 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) :
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
pTabs = new SCTAB[nTabCount];
- pModes = new BYTE[nTabCount];
+ pModes = new sal_uInt8[nTabCount];
pTabNames = new String[nTabCount];
for (SCTAB i=0; i<nTabCount; i++)
{
- BYTE nMode = pDoc->GetLinkMode(i);
+ sal_uInt8 nMode = pDoc->GetLinkMode(i);
if (nMode)
if (pDoc->GetLinkDoc(i) == aDocName)
{
@@ -1163,11 +1162,11 @@ String ScUndoRemoveLink::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_REMOVELINK );
}
-void ScUndoRemoveLink::DoChange( BOOL bLink ) const
+void ScUndoRemoveLink::DoChange( sal_Bool bLink ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
String aEmpty;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (bLink) // establish link
pDoc->SetLink( pTabs[i], pModes[i], aDocName, aFltName, aOptions, pTabNames[i], nRefreshDelay );
else // remove link
@@ -1177,12 +1176,12 @@ void ScUndoRemoveLink::DoChange( BOOL bLink ) const
void ScUndoRemoveLink::Undo()
{
- DoChange( TRUE );
+ DoChange( sal_True );
}
void ScUndoRemoveLink::Redo()
{
- DoChange( FALSE );
+ DoChange( false );
}
void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */)
@@ -1190,9 +1189,9 @@ void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1201,7 +1200,7 @@ BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
// Tabellen ein-/ausblenden
//
-ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewShow ) :
+ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewShow ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
bShow( bNewShow )
@@ -1212,14 +1211,14 @@ ScUndoShowHideTab::~ScUndoShowHideTab()
{
}
-void ScUndoShowHideTab::DoChange( BOOL bShowP ) const
+void ScUndoShowHideTab::DoChange( sal_Bool bShowP ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->SetVisible( nTab, bShowP );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pDocShell->SetDocumentModified();
@@ -1243,14 +1242,14 @@ void ScUndoShowHideTab::Repeat(SfxRepeatTarget& rTarget)
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
String ScUndoShowHideTab::GetComment() const
{
- USHORT nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
+ sal_uInt16 nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
return ScGlobal::GetRscString( nId );
}
@@ -1287,7 +1286,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect)
if (pViewShell)
{
pViewShell->UpdateLayerLocks();
- pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann
+ pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann
}
pDocShell->PostPaintGridAll();
@@ -1312,14 +1311,14 @@ void ScUndoDocProtect::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoDocProtect::GetComment() const
{
- USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
+ sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
return ScGlobal::GetRscString( nId );
}
@@ -1357,7 +1356,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect)
if (pViewShell)
{
pViewShell->UpdateLayerLocks();
- pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann
+ pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann
}
pDocShell->PostPaintGridAll();
@@ -1382,14 +1381,14 @@ void ScUndoTabProtect::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoTabProtect::GetComment() const
{
- USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
+ sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
return ScGlobal::GetRscString( nId );
}
@@ -1413,7 +1412,7 @@ ScUndoPrintRange::~ScUndoPrintRange()
delete pNewRanges;
}
-void ScUndoPrintRange::DoChange(BOOL bUndo)
+void ScUndoPrintRange::DoChange(sal_Bool bUndo)
{
ScDocument* pDoc = pDocShell->GetDocument();
if (bUndo)
@@ -1433,14 +1432,14 @@ void ScUndoPrintRange::DoChange(BOOL bUndo)
void ScUndoPrintRange::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoPrintRange::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1449,9 +1448,9 @@ void ScUndoPrintRange::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoPrintRange::GetComment() const
@@ -1469,7 +1468,7 @@ String ScUndoPrintRange::GetComment() const
ScUndoScenarioFlags::ScUndoScenarioFlags( ScDocShell* pNewDocShell, SCTAB nT,
const String& rON, const String& rNN, const String& rOC, const String& rNC,
- const Color& rOCol, const Color& rNCol, USHORT nOF, USHORT nNF ) :
+ const Color& rOCol, const Color& rNCol, sal_uInt16 nOF, sal_uInt16 nNF ) :
ScSimpleUndo( pNewDocShell ),
nTab ( nT ),
aOldName ( rON ),
@@ -1531,9 +1530,9 @@ void ScUndoScenarioFlags::Repeat(SfxRepeatTarget& /* rTarget */)
// Repeat macht keinen Sinn
}
-BOOL ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1568,8 +1567,8 @@ SdrObject* ScUndoRenameObject::GetObject()
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if ( pDrawLayer )
{
- USHORT nCount = pDrawLayer->GetPageCount();
- for (USHORT nTab=0; nTab<nCount; nTab++)
+ sal_uInt16 nCount = pDrawLayer->GetPageCount();
+ for (sal_uInt16 nTab=0; nTab<nCount; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(nTab);
DBG_ASSERT(pPage,"Page ?");
@@ -1614,9 +1613,9 @@ void ScUndoRenameObject::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -1624,7 +1623,7 @@ BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
// Switch sheet between left-to-right and right-to-left
//
-ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL ) :
+ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewRTL ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
bRTL( bNewRTL )
@@ -1635,20 +1634,20 @@ ScUndoLayoutRTL::~ScUndoLayoutRTL()
{
}
-void ScUndoLayoutRTL::DoChange( BOOL bNew )
+void ScUndoLayoutRTL::DoChange( sal_Bool bNew )
{
- pDocShell->SetInUndo( TRUE );
+ pDocShell->SetInUndo( sal_True );
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->SetLayoutRTL( nTab, bNew );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
pDocShell->SetDocumentModified();
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScUndoLayoutRTL::Undo()
@@ -1668,7 +1667,7 @@ void ScUndoLayoutRTL::Repeat(SfxRepeatTarget& rTarget)
Execute( FID_TAB_RTL, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index 6d6fcc770a1f..9668e5b0d4ac 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -44,10 +44,13 @@
#include "globstr.hrc"
#include "global.hxx"
-void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */,
+void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ )
{
+ if ( pDocShell->IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
@@ -56,7 +59,7 @@ void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */,
pViewShell->SetTabNo( nStartZ );
pViewShell->DoneBlockMode();
- pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, false, false );
pViewShell->InitOwnBlockMode();
pViewShell->GetViewData()->GetMarkData().
SetMarkArea( ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ) );
@@ -90,25 +93,25 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB
if (!pRet)
{
- BOOL bWasTemp = FALSE;
+ sal_Bool bWasTemp = false;
if ( pUndoData )
{
String aName;
pUndoData->GetName( aName );
if ( aName == ScGlobal::GetRscString( STR_DB_NONAME ) )
- bWasTemp = TRUE;
+ bWasTemp = sal_True;
}
DBG_ASSERT(bWasTemp, "Undo: didn't find database range");
(void)bWasTemp;
- USHORT nIndex;
+ sal_uInt16 nIndex;
ScDBCollection* pColl = pDoc->GetDBCollection();
if (pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nIndex ))
pRet = (*pColl)[nIndex];
else
{
pRet = new ScDBData( ScGlobal::GetRscString( STR_DB_NONAME ), nTab,
- nCol1,nRow1, nCol2,nRow2, TRUE,
+ nCol1,nRow1, nCol2,nRow2, sal_True,
pDoc->HasColHeader( nCol1,nRow1,nCol2,nRow2,nTab ) );
pColl->Insert( pRet );
}
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 4b4a0381e18f..029be6720869 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -73,13 +73,13 @@ void ScAddressConversionObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv )
{
if (!pDocShell)
- return sal_False;
+ return false;
ScDocument* pDoc = pDocShell->GetDocument();
- sal_Bool bSuccess = sal_False;
+ sal_Bool bSuccess = false;
if ( bIsRange )
{
- USHORT nResult = aRange.ParseAny( rUIString, pDoc, eConv );
+ sal_uInt16 nResult = aRange.ParseAny( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -93,7 +93,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formu
}
else
{
- USHORT nResult = aRange.aStart.Parse( rUIString, pDoc, eConv );
+ sal_uInt16 nResult = aRange.aStart.Parse( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -120,6 +120,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
@@ -134,6 +135,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
@@ -149,7 +151,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr
if ( !pDocShell )
throw uno::RuntimeException();
- sal_Bool bSuccess = sal_False;
+ sal_Bool bSuccess = false;
String aNameStr(aPropertyName);
if ( aNameStr.EqualsAscii( SC_UNONAME_ADDRESS ) )
{
@@ -262,7 +264,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString&
{
// generate UI representation string - include sheet only if different from ref sheet
String aFormatStr;
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
if ( aRange.aStart.Tab() != nRefSheet )
nFlags |= SCA_TAB_3D;
if ( bIsRange )
@@ -284,7 +286,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString&
// manually concatenate range so both parts always have the sheet name
aFormatStr.Append( (sal_Unicode) ':' );
String aSecond;
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
if( eConv != ::formula::FormulaGrammar::CONV_XL_A1 )
nFlags |= SCA_TAB_3D;
aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, eConv );
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index b391bee219a5..18d3acc0887c 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -181,7 +181,7 @@ sal_Bool lcl_FindAutoFormatIndex( const ScAutoFormat& rFormats, const String& rN
return sal_True;
}
}
- return sal_False; // is nich
+ return false; // is nich
}
//------------------------------------------------------------------------
@@ -251,7 +251,7 @@ void SAL_CALL ScAutoFormatsObj::insertByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
// Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein...
uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
if ( xInterface.is() )
@@ -422,7 +422,7 @@ sal_Bool SAL_CALL ScAutoFormatsObj::hasByName( const rtl::OUString& aName )
sal_uInt16 nDummy;
return lcl_FindAutoFormatIndex( *pFormats, aString, nDummy );
}
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
@@ -670,7 +670,7 @@ uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const rtl::OUString& aPrope
DBG_ASSERT(pData,"AutoFormat Daten nicht da");
sal_Bool bValue;
- sal_Bool bError = sal_False;
+ sal_Bool bError = false;
String aPropString(aPropertyName);
if (aPropString.EqualsAscii( SC_UNONAME_INCBACK ))
@@ -745,7 +745,7 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
{
if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pEntry->nWID ) )
{
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
switch( pEntry->nWID )
{
@@ -757,18 +757,18 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
switch( eOrient )
{
case table::CellOrientation_STANDARD:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
break;
case table::CellOrientation_TOPBOTTOM:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
break;
case table::CellOrientation_BOTTOMTOP:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
break;
case table::CellOrientation_STACKED:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, TRUE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_True ) );
break;
default:
{
@@ -841,7 +841,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const rtl::OUString& a
{
const SfxInt32Item* pRotItem = (const SfxInt32Item*)pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE );
sal_Int32 nRot = pRotItem ? pRotItem->GetValue() : 0;
- BOOL bStacked = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bStacked = ((const SfxBoolItem*)pItem)->GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aVal );
}
break;
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 76c894fae0ae..bdafcadfb4f3 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -207,111 +207,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * /* pServiceManager */, registry::XRegistryKey * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- lcl_WriteInfo( pRegistryKey,
- ScSpreadsheetSettings::getImplementationName_Static(),
- ScSpreadsheetSettings::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScRecentFunctionsObj::getImplementationName_Static(),
- ScRecentFunctionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionListObj::getImplementationName_Static(),
- ScFunctionListObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScAutoFormatsObj::getImplementationName_Static(),
- ScAutoFormatsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionAccess::getImplementationName_Static(),
- ScFunctionAccess::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFilterOptionsObj::getImplementationName_Static(),
- ScFilterOptionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_getImplementationName(),
- ScXMLImport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Meta_getImplementationName(),
- ScXMLImport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Styles_getImplementationName(),
- ScXMLImport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Content_getImplementationName(),
- ScXMLImport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Settings_getImplementationName(),
- ScXMLImport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_getImplementationName(),
- ScXMLOOoExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Meta_getImplementationName(),
- ScXMLOOoExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Styles_getImplementationName(),
- ScXMLOOoExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Content_getImplementationName(),
- ScXMLOOoExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Settings_getImplementationName(),
- ScXMLOOoExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_getImplementationName(),
- ScXMLOasisExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Meta_getImplementationName(),
- ScXMLOasisExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Styles_getImplementationName(),
- ScXMLOasisExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Content_getImplementationName(),
- ScXMLOasisExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Settings_getImplementationName(),
- ScXMLOasisExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScDocument_getImplementationName(),
- ScDocument_getSupportedServiceNames() );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException&)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
@@ -538,74 +433,74 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
ScModule* pScMod = SC_MOD();
ScAppOptions aAppOpt(pScMod->GetAppOptions());
ScInputOptions aInpOpt(pScMod->GetInputOptions());
- BOOL bSaveApp = FALSE;
- BOOL bSaveInp = FALSE;
+ sal_Bool bSaveApp = false;
+ sal_Bool bSaveInp = false;
// print options aren't loaded until needed
if (aString.EqualsAscii( SC_UNONAME_DOAUTOCP ))
{
aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_ENTERED ))
{
aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_EXPREF ))
{
aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_EXTFMT ))
{
aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_LINKUPD ))
{
aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_MARKHDR ))
{
aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_MOVESEL ))
{
aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_RANGEFIN ))
{
aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_USETABCOL ))
{
aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_PRMETRICS ))
{
aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_REPLWARN ))
{
aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_METRIC ))
{
aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_MOVEDIR ))
{
aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_SCALE ))
{
@@ -626,12 +521,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
aAppOpt.SetZoom( nVal );
aAppOpt.SetZoomType( SVX_ZOOM_PERCENT );
}
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_STBFUNC ))
{
aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_ULISTS ))
{
@@ -643,16 +538,16 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
// mehr tut ScGlobal::SetUserList auch nicht
pUserList->FreeAll(); // alle Eintraege raus
- USHORT nCount = (USHORT)aSeq.getLength();
+ sal_uInt16 nCount = (sal_uInt16)aSeq.getLength();
const rtl::OUString* pAry = aSeq.getConstArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
String aEntry = pAry[i];
ScUserListData* pData = new ScUserListData(aEntry);
if (!pUserList->Insert(pData)) // hinten anhaengen
delete pData; // sollte nicht vorkommen
}
- bSaveApp = TRUE; // Liste wird mit den App-Optionen gespeichert
+ bSaveApp = sal_True; // Liste wird mit den App-Optionen gespeichert
}
}
else if (aString.EqualsAscii( SC_UNONAME_PRALLSH ))
@@ -704,7 +599,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString&
else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc();
else if (aString.EqualsAscii( SC_UNONAME_SCALE ))
{
- INT16 nZoomVal = 0;
+ sal_Int16 nZoomVal = 0;
switch ( aAppOpt.GetZoomType() )
{
case SVX_ZOOM_PERCENT: nZoomVal = aAppOpt.GetZoom(); break;
@@ -723,10 +618,10 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString&
ScUserList* pUserList = ScGlobal::GetUserList();
if (pUserList)
{
- USHORT nCount = pUserList->GetCount();
+ sal_uInt16 nCount = pUserList->GetCount();
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
String aEntry((*pUserList)[i]->GetString());
pAry[i] = aEntry;
@@ -785,13 +680,13 @@ uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds()
{
SolarMutexGuard aGuard;
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
- USHORT nCount = rOpt.GetLRUFuncListCount();
- const USHORT* pFuncs = rOpt.GetLRUFuncList();
+ sal_uInt16 nCount = rOpt.GetLRUFuncListCount();
+ const sal_uInt16* pFuncs = rOpt.GetLRUFuncList();
if (pFuncs)
{
uno::Sequence<sal_Int32> aSeq(nCount);
sal_Int32* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
pAry[i] = pFuncs[i];
return aSeq;
}
@@ -803,12 +698,12 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = (USHORT) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX );
+ sal_uInt16 nCount = (sal_uInt16) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX );
const INT32* pAry = aRecentFunctionIds.getConstArray();
- USHORT* pFuncs = nCount ? new USHORT[nCount] : NULL;
- for (USHORT i=0; i<nCount; i++)
- pFuncs[i] = (USHORT)pAry[i]; //! auf gueltige Werte testen?
+ sal_uInt16* pFuncs = nCount ? new sal_uInt16[nCount] : NULL;
+ for (sal_uInt16 i=0; i<nCount; i++)
+ pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen?
ScModule* pScMod = SC_MOD();
ScAppOptions aNewOpts(pScMod->GetAppOptions());
@@ -885,10 +780,10 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
pArray[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_ARGUMENTS ));
if (rDesc.ppDefArgNames && rDesc.ppDefArgDescs && rDesc.pDefArgFlags )
{
- USHORT nCount = rDesc.nArgCount;
+ sal_uInt16 nCount = rDesc.nArgCount;
if (nCount >= VAR_ARGS)
nCount -= VAR_ARGS - 1;
- USHORT nSeqCount = rDesc.GetSuppressedArgCount();
+ sal_uInt16 nSeqCount = rDesc.GetSuppressedArgCount();
if (nSeqCount >= VAR_ARGS)
nSeqCount -= VAR_ARGS - 1;
@@ -896,7 +791,7 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
{
uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount);
sheet::FunctionArgument* pArgAry = aArgSeq.getArray();
- for (USHORT i=0, j=0; i<nCount; i++)
+ for (sal_uInt16 i=0, j=0; i<nCount; i++)
{
if (!rDesc.pDefArgFlags[i].bSuppress)
{
@@ -925,8 +820,8 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
- USHORT nCount = (USHORT)pFuncList->GetCount();
- for (USHORT nIndex=0; nIndex<nCount; nIndex++)
+ sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount();
+ for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
if ( pDesc && pDesc->nFIndex == nId )
@@ -954,8 +849,8 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName )
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
- USHORT nCount = (USHORT)pFuncList->GetCount();
- for (USHORT nIndex=0; nIndex<nCount; nIndex++)
+ sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount();
+ for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
//! Case-insensitiv ???
@@ -1069,7 +964,7 @@ sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName )
return sal_True;
}
}
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index 95f7755c6781..ce9586d1c9e2 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -81,7 +81,7 @@ namespace calc
,OCellListSource_PBase( OCellListSource_Base::rBHelper )
,m_xDocument( _rxDocument )
,m_aListEntryListeners( m_aMutex )
- ,m_bInitialized( sal_False )
+ ,m_bInitialized( false )
{
DBG_CTOR( OCellListSource, checkConsistency_static );
@@ -200,7 +200,7 @@ namespace calc
if ( *pLookup++ == _rServiceName )
return sal_True;
- return sal_False;
+ return false;
}
//--------------------------------------------------------------------
@@ -365,7 +365,7 @@ namespace calc
// get the cell address
CellRangeAddress aRangeAddress;
- sal_Bool bFoundAddress = sal_False;
+ sal_Bool bFoundAddress = false;
const Any* pLoop = _rArguments.getConstArray();
const Any* pLoopEnd = _rArguments.getConstArray() + _rArguments.getLength();
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 6a2b3e5e3a5d..4d8d263895ab 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -866,8 +866,8 @@ void lcl_CopyProperties( beans::XPropertySet& rDest, beans::XPropertySet& rSourc
{
uno::Sequence<beans::Property> aSeq(xInfo->getProperties());
const beans::Property* pAry = aSeq.getConstArray();
- ULONG nCount = aSeq.getLength();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = aSeq.getLength();
+ for (sal_uLong i=0; i<nCount; i++)
{
rtl::OUString aName(pAry[i].Name);
rDest.setPropertyValue( aName, rSource.getPropertyValue( aName ) );
@@ -885,16 +885,16 @@ SCTAB lcl_FirstTab( const ScRangeList& rRanges )
return 0; // soll nicht sein
}
-BOOL lcl_WholeSheet( const ScRangeList& rRanges )
+sal_Bool lcl_WholeSheet( const ScRangeList& rRanges )
{
if ( rRanges.size() == 1 )
{
const ScRange* pRange = rRanges[0];
if ( pRange && pRange->aStart.Col() == 0 && pRange->aEnd.Col() == MAXCOL &&
pRange->aStart.Row() == 0 && pRange->aEnd.Row() == MAXROW )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -953,9 +953,9 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con
{
// Calc braucht Twips, im Uno-Struct sind 1/100mm
- rLine.SetOutWidth( (USHORT)HMMToTwips( rStruct.OuterLineWidth ) );
- rLine.SetInWidth( (USHORT)HMMToTwips( rStruct.InnerLineWidth ) );
- rLine.SetDistance( (USHORT)HMMToTwips( rStruct.LineDistance ) );
+ rLine.SetOutWidth( (sal_uInt16)HMMToTwips( rStruct.OuterLineWidth ) );
+ rLine.SetInWidth( (sal_uInt16)HMMToTwips( rStruct.InnerLineWidth ) );
+ rLine.SetDistance( (sal_uInt16)HMMToTwips( rStruct.LineDistance ) );
rLine.SetColor( ColorData( rStruct.Color ) );
if ( rLine.GetOutWidth() || rLine.GetInWidth() || rLine.GetDistance() )
@@ -967,7 +967,7 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con
void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const table::TableBorder& rBorder )
{
SvxBorderLine aLine;
- rOuter.SetDistance( (USHORT)HMMToTwips( rBorder.Distance ) );
+ rOuter.SetDistance( (sal_uInt16)HMMToTwips( rBorder.Distance ) );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.TopLine ), BOX_LINE_TOP );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.BottomLine ), BOX_LINE_BOTTOM );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.LeftLine ), BOX_LINE_LEFT );
@@ -981,7 +981,7 @@ void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner
rInner.SetValid( VALID_HORI, rBorder.IsHorizontalLineValid );
rInner.SetValid( VALID_VERT, rBorder.IsVerticalLineValid );
rInner.SetValid( VALID_DISTANCE, rBorder.IsDistanceValid );
- rInner.SetTable( TRUE );
+ rInner.SetTable( sal_True );
}
void ScHelperFunctions::FillBorderLine( table::BorderLine& rStruct, const SvxBorderLine* pLine )
@@ -1026,7 +1026,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScDocument* pUndoDoc = NULL;
if (bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1042,12 +1042,12 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
pUndoDoc->InitUndo( pDoc, nTab, nTab );
else
pUndoDoc->AddUndoTab( nTab, nTab );
- pDoc->CopyToDocument( aRange, IDF_ATTRIB, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ATTRIB, false, pUndoDoc );
}
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
pDoc->ApplySelectionFrame( aMark, &rOuter, &rInner );
// RowHeight bei Umrandung alleine nicht noetig
@@ -1068,7 +1068,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
//! move lcl_PutDataArray to docfunc?
//! merge loop with ScFunctionAccess::callFunction
-BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
+sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
const uno::Sequence< uno::Sequence<uno::Any> >& aData )
{
ScDocument* pDoc = rDocShell.GetDocument();
@@ -1077,12 +1077,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) )
{
//! error message
- return FALSE;
+ return false;
}
long nCols = 0;
@@ -1094,7 +1094,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 )
{
//! error message?
- return FALSE;
+ return false;
}
ScDocument* pUndoDoc = NULL;
@@ -1102,12 +1102,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, false, pUndoDoc );
}
pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS );
- BOOL bError = FALSE;
+ sal_Bool bError = false;
SCROW nDocRow = nStartRow;
for (long nRow=0; nRow<nRows; nRow++)
{
@@ -1147,18 +1147,18 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
pDoc->PutCell( nDocCol, nDocRow, nTab, new ScStringCell( aUStr ) );
}
else
- bError = TRUE; // invalid type
+ bError = sal_True; // invalid type
++nDocCol;
}
}
else
- bError = TRUE; // wrong size
+ bError = sal_True; // wrong size
++nDocRow;
}
- BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
+ sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
if ( pUndoDoc )
{
@@ -1167,7 +1167,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark,
- pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) );
+ pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, false ) );
}
if (!bHeight)
@@ -1178,7 +1178,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
return !bError;
}
-BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
+sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
const uno::Sequence< uno::Sequence<rtl::OUString> >& aData,
const ::rtl::OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
@@ -1188,12 +1188,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) )
{
//! error message
- return FALSE;
+ return false;
}
long nCols = 0;
@@ -1205,7 +1205,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 )
{
//! error message?
- return FALSE;
+ return false;
}
ScDocument* pUndoDoc = NULL;
@@ -1213,14 +1213,14 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( rRange, IDF_CONTENTS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_CONTENTS, false, pUndoDoc );
}
pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS );
ScDocFunc aFunc( rDocShell ); // for InterpretEnglishString
- BOOL bError = FALSE;
+ sal_Bool bError = false;
SCROW nDocRow = nStartRow;
for (long nRow=0; nRow<nRows; nRow++)
{
@@ -1240,12 +1240,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
}
}
else
- bError = TRUE; // wrong size
+ bError = sal_True; // wrong size
++nDocRow;
}
- BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
+ sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
if ( pUndoDoc )
{
@@ -1254,7 +1254,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark,
- pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) );
+ pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, false ) );
}
if (!bHeight)
@@ -1266,7 +1266,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
}
// used in ScCellRangeObj::getFormulaArray and ScCellObj::GetInputString_Impl
-String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, BOOL bEnglish )
+String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, sal_Bool bEnglish )
{
String aVal;
if ( pDoc )
@@ -1339,10 +1339,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
pNoDfltCurrentDataSet( NULL ),
pMarkData( NULL ),
nObjectId( 0 ),
- bChartColAsHdr( FALSE ),
- bChartRowAsHdr( FALSE ),
- bCursorOnly( FALSE ),
- bGotDataChangedHint( FALSE ),
+ bChartColAsHdr( false ),
+ bChartRowAsHdr( false ),
+ bCursorOnly( false ),
+ bGotDataChangedHint( false ),
aValueListeners( 0 )
{
ScRange aCellRange(rR);
@@ -1368,10 +1368,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) :
pMarkData( NULL ),
aRanges( rR ),
nObjectId( 0 ),
- bChartColAsHdr( FALSE ),
- bChartRowAsHdr( FALSE ),
- bCursorOnly( FALSE ),
- bGotDataChangedHint( FALSE ),
+ bChartColAsHdr( false ),
+ bChartRowAsHdr( false ),
+ bCursorOnly( false ),
+ bGotDataChangedHint( false ),
aValueListeners( 0 )
{
if (pDocShell) // Null if created with createInstance
@@ -1426,7 +1426,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsFlat()
if ( !pCurrentFlat && pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
- pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), FALSE );
+ pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), false );
}
return pCurrentFlat;
}
@@ -1438,7 +1438,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsDeep()
if ( !pCurrentDeep && pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
- pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), TRUE );
+ pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), sal_True );
}
return pCurrentDeep;
}
@@ -1464,7 +1464,7 @@ const ScMarkData* ScCellRangesBase::GetMarkData()
if (!pMarkData)
{
pMarkData = new ScMarkData();
- pMarkData->MarkFromRangeList( aRanges, FALSE );
+ pMarkData->MarkFromRangeList( aRanges, false );
}
return pMarkData;
}
@@ -1502,7 +1502,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// any change of the range address is broadcast to value (modify) listeners
if ( aValueListeners.Count() )
- bGotDataChangedHint = TRUE;
+ bGotDataChangedHint = sal_True;
if ( pUndoRanges )
pDoc->AddUnoRefChange( nObjectId, *pUndoRanges );
@@ -1512,7 +1512,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
ForgetCurrentAttrs();
@@ -1524,7 +1524,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aValueListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ )
(*aValueListeners[n])->disposing( aEvent );
aValueListeners.DeleteAndDestroy( 0, aValueListeners.Count() );
@@ -1554,10 +1554,10 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// the EventObject holds a Ref to this object until after the listener calls
ScDocument* pDoc = pDocShell->GetDocument();
- for ( USHORT n=0; n<aValueListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ )
pDoc->AddUnoListenerCall( *aValueListeners[n], aEvent );
- bGotDataChangedHint = FALSE;
+ bGotDataChangedHint = false;
}
}
else if ( nId == SC_HINT_CALCALL )
@@ -1566,7 +1566,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// (SFX_HINT_DATACHANGED follows separately)
if ( aValueListeners.Count() )
- bGotDataChangedHint = TRUE;
+ bGotDataChangedHint = sal_True;
}
}
else if ( rHint.ISA( ScUnoRefUndoHint ) )
@@ -1580,7 +1580,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
RefChanged();
if ( aValueListeners.Count() )
- bGotDataChangedHint = TRUE; // need to broadcast the undo, too
+ bGotDataChangedHint = sal_True; // need to broadcast the undo, too
}
}
}
@@ -1652,7 +1652,7 @@ void ScCellRangesBase::SetNewRanges(const ScRangeList& rNew)
RefChanged();
}
-void ScCellRangesBase::SetCursorOnly( BOOL bSet )
+void ScCellRangesBase::SetCursorOnly( sal_Bool bSet )
{
// set for a selection object that is created from the cursor position
// without anything selected (may contain several sheets)
@@ -1731,7 +1731,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellRangesBase::getImplementationId()
// ---
-void ScCellRangesBase::PaintRanges_Impl( USHORT nPart )
+void ScCellRangesBase::PaintRanges_Impl( sal_uInt16 nPart )
{
for (size_t i = 0, nCount = aRanges.size(); i < nCount; ++i)
pDocShell->PostPaint( *aRanges[ i ], nPart );
@@ -1746,7 +1746,7 @@ double SAL_CALL ScCellRangesBase::computeFunction( sheet::GeneralFunction nFunct
ScMarkData aMark(*GetMarkData());
aMark.MarkToSimple();
if (!aMark.IsMarked())
- aMark.SetMarkNegative(TRUE); // um Dummy Position angeben zu koennen
+ aMark.SetMarkNegative(sal_True); // um Dummy Position angeben zu koennen
ScAddress aDummy; // wenn nicht Marked, ignoriert wegen Negative
double fVal;
@@ -1766,12 +1766,12 @@ void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(u
if ( !aRanges.empty() )
{
// only for clearContents: EDITATTR is only used if no contents are deleted
- USHORT nDelFlags = static_cast< USHORT >( nContentFlags & IDF_ALL );
+ sal_uInt16 nDelFlags = static_cast< sal_uInt16 >( nContentFlags & IDF_ALL );
if ( ( nContentFlags & IDF_EDITATTR ) && ( nContentFlags & IDF_CONTENTS ) == 0 )
nDelFlags |= IDF_EDITATTR;
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteContents( *GetMarkData(), nDelFlags, TRUE, TRUE );
+ aFunc.DeleteContents( *GetMarkData(), nDelFlags, sal_True, sal_True );
}
// sonst ist nichts zu tun
}
@@ -1784,7 +1784,7 @@ const SfxItemPropertyMap* ScCellRangesBase::GetItemPropertyMap()
}
void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry,
- USHORT& rItemWhich )
+ sal_uInt16& rItemWhich )
{
// Which-ID des betroffenen Items, auch wenn das Item die Property
// nicht alleine behandeln kann
@@ -1813,7 +1813,7 @@ void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry,
}
-beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, const SfxItemPropertySimpleEntry* pEntry )
+beans::PropertyState ScCellRangesBase::GetOnePropertyState( sal_uInt16 nItemWhich, const SfxItemPropertySimpleEntry* pEntry )
{
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
if ( nItemWhich ) // item wid (from map or special case)
@@ -1825,10 +1825,10 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c
const ScPatternAttr* pPattern = GetCurrentAttrsFlat();
if ( pPattern )
{
- SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, FALSE );
+ SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, false );
if ( nItemWhich == ATTR_VALUE_FORMAT && eState == SFX_ITEM_DEFAULT )
- eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, FALSE );
+ eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, false );
if ( eState == SFX_ITEM_SET )
eRet = beans::PropertyState_DIRECT_VALUE;
@@ -1869,7 +1869,7 @@ beans::PropertyState SAL_CALL ScCellRangesBase::getPropertyState( const rtl::OUS
throw uno::RuntimeException();
const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( aPropertyName );
lcl_GetPropertyWhich( pEntry, nItemWhich );
return GetOnePropertyState( nItemWhich, pEntry );
@@ -1885,9 +1885,9 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates
uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
- for(INT32 i = 0; i < aPropertyNames.getLength(); i++)
+ for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++)
{
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
lcl_GetPropertyWhich( pEntry, nItemWhich );
pStates[i] = GetOnePropertyState(nItemWhich, pEntry);
@@ -1902,7 +1902,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
if ( pDocShell )
{
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName );
lcl_GetPropertyWhich( pEntry, nItemWhich );
if ( nItemWhich ) // item wid (from map or special case)
@@ -1916,7 +1916,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
// //! for ATTR_ROTATE_VALUE, also reset ATTR_ORIENTATION?
- USHORT aWIDs[3];
+ sal_uInt16 aWIDs[3];
aWIDs[0] = nItemWhich;
if ( nItemWhich == ATTR_VALUE_FORMAT )
{
@@ -1925,19 +1925,19 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
}
else
aWIDs[1] = 0;
- aFunc.ClearItems( *GetMarkData(), aWIDs, TRUE );
+ aFunc.ClearItems( *GetMarkData(), aWIDs, sal_True );
}
}
else if ( pEntry )
{
if ( pEntry->nWID == SC_WID_UNO_CHCOLHDR )
- bChartColAsHdr = FALSE;
+ bChartColAsHdr = false;
else if ( pEntry->nWID == SC_WID_UNO_CHROWHDR )
- bChartRowAsHdr = FALSE;
+ bChartRowAsHdr = false;
else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), TRUE, TRUE );
+ aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), sal_True, sal_True );
}
}
}
@@ -1986,7 +1986,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
{
case SC_WID_UNO_CHCOLHDR:
case SC_WID_UNO_CHROWHDR:
- ScUnoHelpFunctions::SetBoolInAny( aAny, FALSE );
+ ScUnoHelpFunctions::SetBoolInAny( aAny, false );
break;
case SC_WID_UNO_CELLSTYL:
aAny <<= rtl::OUString( ScStyleNameConversion::DisplayToProgrammaticName(
@@ -2009,8 +2009,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
case SC_WID_UNO_CONDLOC:
case SC_WID_UNO_CONDXML:
{
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2023,8 +2023,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
case SC_WID_UNO_VALILOC:
case SC_WID_UNO_VALIXML:
{
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2058,7 +2058,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySe
void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rValue,
ScPatternAttr& rPattern, ScDocument* pDoc,
- USHORT& rFirstItemId, USHORT& rSecondItemId )
+ sal_uInt16& rFirstItemId, sal_uInt16& rSecondItemId )
{
rFirstItemId = rEntry.nWID;
rSecondItemId = 0;
@@ -2070,14 +2070,14 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
{
// language for number formats
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- ULONG nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue();
+ sal_uLong nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
nOldFormat = pFormatter->GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
sal_Int32 nIntVal = 0;
if ( rValue >>= nIntVal )
{
- ULONG nNewFormat = (ULONG)nIntVal;
+ sal_uLong nNewFormat = (sal_uLong)nIntVal;
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
const SvNumberformat* pNewEntry = pFormatter->GetEntry( nNewFormat );
@@ -2089,7 +2089,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
// if only language is changed,
// don't touch number format attribute
- ULONG nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET;
+ sal_uLong nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET;
if ( nNewMod == ( nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET ) &&
nNewMod <= SV_MAX_ANZ_STANDARD_FORMATE )
{
@@ -2107,7 +2107,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
{
sal_Int16 nIntVal = 0;
if ( rValue >>= nIntVal )
- rSet.Put( SfxUInt16Item( rEntry.nWID, (USHORT)HMMToTwips(nIntVal) ) );
+ rSet.Put( SfxUInt16Item( rEntry.nWID, (sal_uInt16)HMMToTwips(nIntVal) ) );
else
throw lang::IllegalArgumentException();
}
@@ -2136,20 +2136,20 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
switch( eOrient )
{
case table::CellOrientation_STANDARD:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
break;
case table::CellOrientation_TOPBOTTOM:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
rSecondItemId = ATTR_ROTATE_VALUE;
break;
case table::CellOrientation_BOTTOMTOP:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
rSecondItemId = ATTR_ROTATE_VALUE;
break;
case table::CellOrientation_STACKED:
- rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) );
break;
default:
{
@@ -2208,14 +2208,14 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
SfxItemSet& rSet = aPattern.GetItemSet();
rSet.ClearInvalidItems();
- USHORT nFirstItem, nSecondItem;
+ sal_uInt16 nFirstItem, nSecondItem;
lcl_SetCellProperty( *pEntry, aValue, aPattern, pDoc, nFirstItem, nSecondItem );
- for (USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
+ for (sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
if ( nWhich != nFirstItem && nWhich != nSecondItem )
rSet.ClearItem(nWhich);
- aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
}
}
else // implemented here
@@ -2269,7 +2269,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
String aString(ScStyleNameConversion::ProgrammaticToDisplayName(
aStrVal, SFX_STYLE_FAMILY_PARA ));
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyStyle( *GetMarkData(), aString, TRUE, TRUE );
+ aFunc.ApplyStyle( *GetMarkData(), aString, sal_True, sal_True );
}
break;
case SC_WID_UNO_TBLBORD:
@@ -2297,8 +2297,8 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if (pFormat)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
formula::FormulaGrammar::GRAM_UNSPECIFIED :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2307,13 +2307,13 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
pFormat->FillFormat( aNew, pDoc, eGrammar );
ScRangeListRef pRanges = new ScRangeList( aRanges );
aNew.AddRangeInfo( pRanges );
- ULONG nIndex = pDoc->AddCondFormat( aNew );
+ sal_uLong nIndex = pDoc->AddCondFormat( aNew );
ScDocFunc aFunc(*pDocShell);
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_CONDITIONAL, nIndex ) );
- aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
}
}
}
@@ -2330,22 +2330,22 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if (pValidObj)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
formula::FormulaGrammar::GRAM_UNSPECIFIED :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
ScValidationData* pNewData =
pValidObj->CreateValidationData( pDoc, eGrammar );
- ULONG nIndex = pDoc->AddValidationEntry( *pNewData );
+ sal_uLong nIndex = pDoc->AddValidationEntry( *pNewData );
delete pNewData;
ScDocFunc aFunc(*pDocShell);
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) );
- aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
}
}
}
@@ -2391,7 +2391,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
{
ScDocument* pDoc = pDocShell->GetDocument();
- ULONG nOldFormat = ((const SfxUInt32Item&)
+ sal_uLong nOldFormat = ((const SfxUInt32Item&)
pDataSet->Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)
pDataSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
@@ -2407,7 +2407,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
case ATTR_STACKED:
{
sal_Int32 nRot = ((const SfxInt32Item&)pDataSet->Get(ATTR_ROTATE_VALUE)).GetValue();
- BOOL bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue();
+ sal_Bool bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( rAny );
}
break;
@@ -2447,7 +2447,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
ScDocument* pDoc = pDocShell->GetDocument();
ScMarkData aMark;
aMark.SetMarkArea( *pFirst );
- aMark.SelectTable( pFirst->aStart.Tab(), TRUE );
+ aMark.SelectTable( pFirst->aStart.Tab(), sal_True );
pDoc->GetSelectionFrame( aMark, aOuter, aInner );
table::TableBorder aBorder;
@@ -2464,12 +2464,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if ( pPattern )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
- ULONG nIndex = ((const SfxUInt32Item&)
+ sal_uLong nIndex = ((const SfxUInt32Item&)
pPattern->GetItem(ATTR_CONDITIONAL)).GetValue();
rAny <<= uno::Reference<sheet::XSheetConditionalEntries>(
new ScTableConditionalFormat( pDoc, nIndex, eGrammar ));
@@ -2484,12 +2484,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if ( pPattern )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
- ULONG nIndex = ((const SfxUInt32Item&)
+ sal_uLong nIndex = ((const SfxUInt32Item&)
pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
rAny <<= uno::Reference<beans::XPropertySet>(
new ScTableValidationObj( pDoc, nIndex, eGrammar ));
@@ -2622,7 +2622,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
// collect items in pNewPattern, apply with one call after the loop
- USHORT nFirstItem, nSecondItem;
+ sal_uInt16 nFirstItem, nSecondItem;
lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
// put only affected items into new set
@@ -2642,7 +2642,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
if ( pNewPattern && !aRanges.empty() )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True );
}
delete pNewPattern;
@@ -2661,7 +2661,7 @@ uno::Sequence<uno::Any> SAL_CALL ScCellRangesBase::getPropertyValues(
uno::Sequence<uno::Any> aRet(aPropertyNames.getLength());
uno::Any* pProperties = aRet.getArray();
- for(INT32 i = 0; i < aPropertyNames.getLength(); i++)
+ for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++)
{
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
GetOnePropertyValue( pEntry, pProperties[i] );
@@ -2698,7 +2698,7 @@ IMPL_LINK( ScCellRangesBase, ValueListenerHdl, SfxHint*, pHint )
// in the range are notified. So only a flag is set that is checked when
// SFX_HINT_DATACHANGED is received.
- bGotDataChangedHint = TRUE;
+ bGotDataChangedHint = sal_True;
}
return 0;
}
@@ -2773,7 +2773,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
// collect items in pNewPattern, apply with one call after the loop
- USHORT nFirstItem, nSecondItem;
+ sal_uInt16 nFirstItem, nSecondItem;
try
{
lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
@@ -2817,7 +2817,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
if ( pNewPattern && !aRanges.empty() )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True );
}
delete pNewPattern;
@@ -2842,7 +2842,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- for(INT32 i = 0; i < nCount; i++)
+ for(sal_Int32 i = 0; i < nCount; i++)
{
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
if (!pEntry)
@@ -2851,7 +2851,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get
}
else
{
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
lcl_GetPropertyWhich( pEntry, nItemWhich );
pReturns[i].State = GetOnePropertyState( nItemWhich, pEntry );
GetOnePropertyValue( pEntry, pReturns[i].Value );
@@ -2872,8 +2872,8 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- INT32 j = 0;
- for(INT32 i = 0; i < nCount; i++)
+ sal_Int32 j = 0;
+ for(sal_Int32 i = 0; i < nCount; i++)
{
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
if (!pEntry)
@@ -2882,7 +2882,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas
}
else
{
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
lcl_GetPropertyWhich( pEntry, nItemWhich );
pReturns[j].State = GetOnePropertyState( nItemWhich, pEntry );
if (pReturns[j].State == beans::PropertyState_DIRECT_VALUE)
@@ -2910,7 +2910,7 @@ void SAL_CALL ScCellRangesBase::decrementIndent() throw(::com::sun::star::uno::R
//#97041#; put only MultiMarked ScMarkData in ChangeIndent
ScMarkData aMarkData(*GetMarkData());
aMarkData.MarkToMulti();
- aFunc.ChangeIndent( aMarkData, FALSE, TRUE );
+ aFunc.ChangeIndent( aMarkData, false, sal_True );
}
}
@@ -2923,7 +2923,7 @@ void SAL_CALL ScCellRangesBase::incrementIndent() throw(::com::sun::star::uno::R
//#97041#; put only MultiMarked ScMarkData in ChangeIndent
ScMarkData aMarkData(*GetMarkData());
aMarkData.MarkToMulti();
- aFunc.ChangeIndent( aMarkData, TRUE, TRUE );
+ aFunc.ChangeIndent( aMarkData, sal_True, sal_True );
}
}
@@ -3044,7 +3044,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
long nRowCount = aData.getLength();
long nColCount = nRowCount ? aData[0].getLength() : 0;
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount );
@@ -3084,7 +3084,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
PaintRanges_Impl( PAINT_GRID );
pDocShell->SetDocumentModified();
ForceChartListener_Impl(); // call listeners for this object synchronously
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -3117,7 +3117,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bChartColAsHdr )
{
long nRowCount = aRowDescriptions.getLength();
@@ -3151,7 +3151,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
PaintRanges_Impl( PAINT_GRID );
pDocShell->SetDocumentModified();
ForceChartListener_Impl(); // call listeners for this object synchronously
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -3185,7 +3185,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bChartRowAsHdr )
{
long nColCount = aColumnDescriptions.getLength();
@@ -3219,7 +3219,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
PaintRanges_Impl( PAINT_GRID );
pDocShell->SetDocumentModified();
ForceChartListener_Impl(); // call listeners for this object synchronously
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -3239,8 +3239,8 @@ void ScCellRangesBase::ForceChartListener_Impl()
ScChartListenerCollection* pColl = pDocShell->GetDocument()->GetChartListenerCollection();
if ( pColl )
{
- USHORT nCollCount = pColl->GetCount();
- for ( USHORT nIndex = 0; nIndex < nCollCount; nIndex++ )
+ sal_uInt16 nCollCount = pColl->GetCount();
+ for ( sal_uInt16 nIndex = 0; nIndex < nCollCount; nIndex++ )
{
ScChartListener* pChartListener = (ScChartListener*)pColl->At(nIndex);
if ( pChartListener &&
@@ -3255,16 +3255,16 @@ void ScCellRangesBase::ForceChartListener_Impl()
String lcl_UniqueName( ScStrCollection& rColl, const String& rPrefix )
{
long nNumber = 1;
- USHORT nCollCount = rColl.GetCount();
- while (TRUE)
+ sal_uInt16 nCollCount = rColl.GetCount();
+ while (sal_True)
{
String aName(rPrefix);
aName += String::CreateFromInt32( nNumber );
- BOOL bFound = FALSE;
- for (USHORT i=0; i<nCollCount; i++)
+ sal_Bool bFound = false;
+ for (sal_uInt16 i=0; i<nCollCount; i++)
if ( rColl[i]->GetString() == aName )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
if (!bFound)
@@ -3355,8 +3355,8 @@ void SAL_CALL ScCellRangesBase::removeModifyListener( const uno::Reference<util:
acquire(); // in case the listeners have the last ref - released below
- USHORT nCount = aValueListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aValueListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XModifyListener> *pObj = aValueListeners[n];
if ( *pObj == aListener )
@@ -3413,7 +3413,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
}
ScRangeList aNewRanges;
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges );
}
@@ -3443,7 +3443,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel
if ( !pCell->IsBlank() )
aMarkData.SetMultiMarkArea(
ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ),
- FALSE );
+ false );
pCell = aIter.GetNext();
}
@@ -3452,7 +3452,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel
ScRangeList aNewRanges;
// IsMultiMarked reicht hier nicht (wird beim deselektieren nicht zurueckgesetzt)
if (aMarkData.HasAnyMultiMarks())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3480,33 +3480,33 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
ScBaseCell* pCell = aIter.GetFirst();
while (pCell)
{
- BOOL bAdd = FALSE;
+ sal_Bool bAdd = false;
if ( pCell->HasNote() && ( nContentFlags & sheet::CellFlags::ANNOTATION ) )
- bAdd = TRUE;
+ bAdd = sal_True;
else
switch ( pCell->GetCellType() )
{
case CELLTYPE_STRING:
if ( nContentFlags & sheet::CellFlags::STRING )
- bAdd = TRUE;
+ bAdd = sal_True;
break;
case CELLTYPE_EDIT:
if ( (nContentFlags & sheet::CellFlags::STRING) || (nContentFlags & sheet::CellFlags::FORMATTED) )
- bAdd = TRUE;
+ bAdd = sal_True;
break;
case CELLTYPE_FORMULA:
if ( nContentFlags & sheet::CellFlags::FORMULA )
- bAdd = TRUE;
+ bAdd = sal_True;
break;
case CELLTYPE_VALUE:
if ( (nContentFlags & (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME))
== (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME) )
- bAdd = TRUE;
+ bAdd = sal_True;
else
{
// Date/Time Erkennung
- ULONG nIndex = (ULONG)((SfxUInt32Item*)pDoc->GetAttr(
+ sal_uLong nIndex = (sal_uLong)((SfxUInt32Item*)pDoc->GetAttr(
aIter.GetCol(), aIter.GetRow(), aIter.GetTab(),
ATTR_VALUE_FORMAT ))->GetValue();
short nTyp = pDoc->GetFormatTable()->GetType(nIndex);
@@ -3514,12 +3514,12 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
(nTyp == NUMBERFORMAT_DATETIME))
{
if ( nContentFlags & sheet::CellFlags::DATETIME )
- bAdd = TRUE;
+ bAdd = sal_True;
}
else
{
if ( nContentFlags & sheet::CellFlags::VALUE )
- bAdd = TRUE;
+ bAdd = sal_True;
}
}
break;
@@ -3532,7 +3532,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
if (bAdd)
aMarkData.SetMultiMarkArea(
ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ),
- TRUE );
+ sal_True );
pCell = aIter.GetNext();
}
@@ -3540,7 +3540,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
ScRangeList aNewRanges;
if (aMarkData.IsMultiMarked())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3571,27 +3571,27 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
- BOOL bAdd = FALSE;
+ sal_Bool bAdd = false;
if (pFCell->GetErrCode())
{
if ( nResultFlags & sheet::FormulaResult::ERROR )
- bAdd = TRUE;
+ bAdd = sal_True;
}
else if (pFCell->IsValue())
{
if ( nResultFlags & sheet::FormulaResult::VALUE )
- bAdd = TRUE;
+ bAdd = sal_True;
}
else // String
{
if ( nResultFlags & sheet::FormulaResult::STRING )
- bAdd = TRUE;
+ bAdd = sal_True;
}
if (bAdd)
aMarkData.SetMultiMarkArea(
ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ),
- TRUE );
+ sal_True );
}
pCell = aIter.GetNext();
@@ -3600,7 +3600,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
ScRangeList aNewRanges;
if (aMarkData.IsMultiMarked())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3609,7 +3609,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
}
uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
- const table::CellAddress& aCompare, BOOL bColumnDiff)
+ const table::CellAddress& aCompare, sal_Bool bColumnDiff)
{
if (pDocShell)
{
@@ -3686,7 +3686,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
if ( !ScBaseCell::CellEqual( pCell, pOtherCell ) )
aMarkData.SetMultiMarkArea( aOneRange );
else
- aMarkData.SetMultiMarkArea( aOneRange, FALSE ); // deselect
+ aMarkData.SetMultiMarkArea( aOneRange, false ); // deselect
pCell = aIter.GetNext();
}
@@ -3694,7 +3694,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
ScRangeList aNewRanges;
if (aMarkData.IsMultiMarked())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3705,14 +3705,14 @@ uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnD
const table::CellAddress& aCompare ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- return QueryDifferences_Impl( aCompare, TRUE );
+ return QueryDifferences_Impl( aCompare, true );
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryRowDifferences(
const table::CellAddress& aCompare ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- return QueryDifferences_Impl( aCompare, FALSE );
+ return QueryDifferences_Impl( aCompare, false );
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersection(
@@ -3749,14 +3749,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden
ScDocument* pDoc = pDocShell->GetDocument();
ScRangeList aNewRanges(aRanges);
- BOOL bFound;
+ sal_Bool bFound;
do
{
- bFound = FALSE;
+ bFound = false;
// aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( aNewRanges, FALSE );
+ aMarkData.MarkFromRangeList( aNewRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
for (size_t nR = 0, nCount = aNewRanges.size(); nR<nCount; ++nR)
@@ -3775,15 +3775,15 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden
while ( aRefIter.GetNextRef( aRefRange) )
{
if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aRefRange ) )
- bFound = TRUE;
- aMarkData.SetMultiMarkArea( aRefRange, TRUE );
+ bFound = sal_True;
+ aMarkData.SetMultiMarkArea( aRefRange, sal_True );
}
}
pCell = aIter.GetNext();
}
}
- aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True );
}
while ( bRecursive && bFound );
@@ -3802,14 +3802,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
ScDocument* pDoc = pDocShell->GetDocument();
ScRangeList aNewRanges(aRanges);
- BOOL bFound;
+ sal_Bool bFound;
do
{
- bFound = FALSE;
+ bFound = false;
// aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( aNewRanges, FALSE );
+ aMarkData.MarkFromRangeList( aNewRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
SCTAB nTab = lcl_FirstTab(aNewRanges); //! alle Tabellen
@@ -3820,7 +3820,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
{
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
- BOOL bMark = FALSE;
+ sal_Bool bMark = false;
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRefRange;
while ( aIter.GetNextRef( aRefRange) )
@@ -3830,7 +3830,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
{
ScRange aRange( *aNewRanges[ nR ] );
if (aRange.Intersects(aRefRange))
- bMark = TRUE; // von Teil des Ranges abhaengig
+ bMark = sal_True; // von Teil des Ranges abhaengig
}
}
if (bMark)
@@ -3839,14 +3839,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
aCellIter.GetRow(),
aCellIter.GetTab() );
if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aCellRange ) )
- bFound = TRUE;
- aMarkData.SetMultiMarkArea( aCellRange, TRUE );
+ bFound = sal_True;
+ aMarkData.SetMultiMarkArea( aCellRange, sal_True );
}
}
pCell = aCellIter.GetNext();
}
- aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True );
}
while ( bRecursive && bFound );
@@ -3890,12 +3890,12 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll(
SCCOL nCol = 0;
SCROW nRow = 0;
SCTAB nTab = 0;
- BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
+ sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
aMark, aDummyUndo, NULL );
if (bFound)
{
ScRangeList aNewRanges;
- aMark.FillRangeListWithMarks( &aNewRanges, TRUE );
+ aMark.FillRangeListWithMarks( &aNewRanges, sal_True );
// bei findAll immer CellRanges, egal wieviel gefunden wurde
xRet.set(new ScCellRangesObj( pDocShell, aNewRanges ));
}
@@ -3937,7 +3937,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl(
}
String aDummyUndo;
- BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
+ sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
aMark, aDummyUndo, NULL );
if (bFound)
{
@@ -4003,7 +4003,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
if (pSearchItem)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
pSearchItem->SetCommand( SVX_SEARCHCMD_REPLACE_ALL );
// immer nur innerhalb dieses Objekts
pSearchItem->SetSelection( !lcl_WholeSheet(aRanges) );
@@ -4011,10 +4011,10 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
ScMarkData aMark(*GetMarkData());
SCTAB nTabCount = pDoc->GetTableCount();
- BOOL bProtected = !pDocShell->IsEditable();
+ sal_Bool bProtected = !pDocShell->IsEditable();
for (SCTAB i=0; i<nTabCount; i++)
if ( aMark.GetTableSelect(i) && pDoc->IsTabProtected(i) )
- bProtected = TRUE;
+ bProtected = sal_True;
if (bProtected)
{
//! Exception, oder was?
@@ -4039,7 +4039,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
if (bUndo)
pUndoMark = new ScMarkData(aMark);
- BOOL bFound(FALSE);
+ sal_Bool bFound(false);
if (bUndo)
bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
aMark, aUndoStr, pUndoDoc );
@@ -4270,8 +4270,8 @@ void SAL_CALL ScCellRangesObj::addRangeAddress( const table::CellRangeAddress& r
void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const ScRange& rRange )
{
- USHORT nCount = rNamedEntries.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = rNamedEntries.Count();
+ for ( sal_uInt16 n=nCount; n--; )
if ( rNamedEntries[n]->GetRange() == rRange )
rNamedEntries.DeleteAndDestroy( n );
}
@@ -4297,7 +4297,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress
}
}
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( aSheetRanges, FALSE );
+ aMarkData.MarkFromRangeList( aSheetRanges, false );
ScRange aRange(static_cast<SCCOL>(rRange.StartColumn),
static_cast<SCROW>(rRange.StartRow),
static_cast<SCTAB>(rRange.Sheet),
@@ -4309,7 +4309,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress
aMarkData.MarkToMulti();
if (aMarkData.IsAllMarked( aRange ) )
{
- aMarkData.SetMultiMarkArea( aRange, FALSE );
+ aMarkData.SetMultiMarkArea( aRange, false );
lcl_RemoveNamedEntry(aNamedEntries, aRange);
}
else
@@ -4317,10 +4317,10 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress
}
SetNewRanges(aNotSheetRanges);
ScRangeList aNew;
- aMarkData.FillRangeListWithMarks( &aNew, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNew, false );
for ( size_t j = 0; j < aNew.size(); ++j)
{
- AddRange(*aNew[ j ], sal_False);
+ AddRange(*aNew[ j ], false);
}
}
@@ -4366,8 +4366,8 @@ void SAL_CALL ScCellRangesObj::removeRangeAddresses( const uno::Sequence<table::
void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const String& rName )
{
- USHORT nCount = rNamedEntries.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = rNamedEntries.Count();
+ for ( sal_uInt16 n=nCount; n--; )
if ( rNamedEntries[n]->GetName() == rName )
rNamedEntries.DeleteAndDestroy( n );
}
@@ -4378,7 +4378,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
{
SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
//! Type of aElement can be some specific interface instead of XInterface
@@ -4393,8 +4393,8 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
String aNamStr(aName);
if ( aNamStr.Len() )
{
- USHORT nNamedCount = aNamedEntries.Count();
- for (USHORT n=0; n<nNamedCount; n++)
+ sal_uInt16 nNamedCount = aNamedEntries.Count();
+ for (sal_uInt16 n=0; n<nNamedCount; n++)
if ( aNamedEntries[n]->GetName() == aNamStr )
throw container::ElementExistException();
}
@@ -4405,7 +4405,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
for ( size_t i = 0; i < nAddCount; i++ )
aNew.Join( *rAddRanges[ i ] );
SetNewRanges(aNew);
- bDone = TRUE;
+ bDone = sal_True;
if ( aName.getLength() && nAddCount == 1 )
{
@@ -4426,7 +4426,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
}
}
-BOOL lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh,
+sal_Bool lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh,
const String& rName, size_t& rIndex )
{
if (pDocSh)
@@ -4439,14 +4439,14 @@ BOOL lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh,
if ( aRangeStr == rName )
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE; // nicht gefunden
+ return false; // nicht gefunden
}
-BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
+sal_Bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
const ScRangeList& rRanges, ScDocShell* pDocSh,
const String& rName, ScRange& rFound )
{
@@ -4456,22 +4456,22 @@ BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
if ( lcl_FindRangeByName( rRanges, pDocSh, rName, nIndex ) )
{
rFound = *rRanges[ nIndex ];
- return TRUE;
+ return true;
}
// range contained in selection? (sheet must be specified)
ScRange aCellRange;
- USHORT nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() );
+ sal_uInt16 nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() );
if ( ( nParse & ( SCA_VALID | SCA_TAB_3D ) ) == ( SCA_VALID | SCA_TAB_3D ) )
{
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
if ( aMarkData.IsAllMarked( aCellRange ) )
{
rFound = aCellRange;
- return TRUE;
+ return sal_True;
}
}
@@ -4479,24 +4479,24 @@ BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
if ( rNamedEntries.Count() )
{
- for ( USHORT n=0; n<rNamedEntries.Count(); n++ )
+ for ( sal_uInt16 n=0; n<rNamedEntries.Count(); n++ )
if ( rNamedEntries[n]->GetName() == rName )
{
// test if named entry is contained in rRanges
const ScRange& rComp = rNamedEntries[n]->GetRange();
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
if ( aMarkData.IsAllMarked( rComp ) )
{
rFound = rComp;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE; // not found
+ return false; // not found
}
void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName )
@@ -4504,7 +4504,7 @@ void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
String aNameStr(aName);
ScDocShell* pDocSh = GetDocShell();
const ScRangeList& rRanges = GetRangeList();
@@ -4517,41 +4517,41 @@ void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName )
if (i != nIndex)
aNew.Append( *rRanges[ i ] );
SetNewRanges(aNew);
- bDone = TRUE;
+ bDone = sal_True;
}
else if (pDocSh)
{
// deselect any ranges (parsed or named entry)
ScRangeList aDiff;
- BOOL bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0;
+ sal_Bool bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0;
if ( !bValid && aNamedEntries.Count() )
{
- USHORT nCount = aNamedEntries.Count();
- for (USHORT n=0; n<nCount && !bValid; n++)
+ sal_uInt16 nCount = aNamedEntries.Count();
+ for (sal_uInt16 n=0; n<nCount && !bValid; n++)
if (aNamedEntries[n]->GetName() == aNameStr)
{
aDiff.RemoveAll();
aDiff.Append( aNamedEntries[n]->GetRange() );
- bValid = TRUE;
+ bValid = sal_True;
}
}
if ( bValid )
{
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
for ( size_t i = 0, nDiffCount = aDiff.size(); i < nDiffCount; i++ )
{
ScRange* pDiffRange = aDiff[ i ];
if (aMarkData.GetTableSelect( pDiffRange->aStart.Tab() ))
- aMarkData.SetMultiMarkArea( *pDiffRange, FALSE );
+ aMarkData.SetMultiMarkArea( *pDiffRange, false );
}
ScRangeList aNew;
- aMarkData.FillRangeListWithMarks( &aNew, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNew, false );
SetNewRanges(aNew);
- bDone = TRUE; //! error if range was not selected before?
+ bDone = sal_True; //! error if range was not selected before?
}
}
@@ -4601,17 +4601,17 @@ uno::Any SAL_CALL ScCellRangesObj::getByName( const rtl::OUString& aName )
return aRet;
}
-BOOL lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries,
+sal_Bool lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries,
const ScRange& rRange, String& rName )
{
- USHORT nCount = rNamedEntries.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rNamedEntries.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if (rNamedEntries[i]->GetRange() == rRange)
{
rName = rNamedEntries[i]->GetName();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames()
@@ -4932,9 +4932,9 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName(
SCTAB nTab = aRange.aStart.Tab();
ScRange aCellRange;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
String aString(aName);
- USHORT nParse = aCellRange.ParseAny( aString, pDoc, rDetails );
+ sal_uInt16 nParse = aCellRange.ParseAny( aString, pDoc, rDetails );
if ( nParse & SCA_VALID )
{
if ( !(nParse & SCA_TAB_3D) ) // keine Tabelle angegeben -> auf dieser Tabelle
@@ -4942,20 +4942,20 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName(
aCellRange.aStart.SetTab(nTab);
aCellRange.aEnd.SetTab(nTab);
}
- bFound = TRUE;
+ bFound = sal_True;
}
else
{
ScRangeUtil aRangeUtil;
if ( aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_NAMES ) ||
aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_DBASE ) )
- bFound = TRUE;
+ bFound = sal_True;
}
if (bFound) // valid only if within this object's range
{
if (!aRange.In(aCellRange))
- bFound = FALSE;
+ bFound = false;
}
if (bFound)
@@ -5069,15 +5069,15 @@ void ScCellRangeObj::SetArrayFormula_Impl( const rtl::OUString& rFormula,
throw uno::RuntimeException();
}
- aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, TRUE, TRUE, rFormulaNmsp, eGrammar );
+ aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, sal_True, sal_True, rFormulaNmsp, eGrammar );
}
else
{
// empty string -> erase array formula
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( aRange.aStart.Tab(), TRUE );
- aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE );
+ aMark.SelectTable( aRange.aStart.Tab(), sal_True );
+ aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True );
}
}
}
@@ -5154,15 +5154,15 @@ 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.
- aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, TRUE, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, sal_True, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
else
{
// empty sequence -> erase array formula
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( aRange.aStart.Tab(), TRUE );
- aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE );
+ aMark.SelectTable( aRange.aStart.Tab(), sal_True );
+ aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True );
}
}
}
@@ -5185,7 +5185,7 @@ uno::Sequence< uno::Sequence<uno::Any> > SAL_CALL ScCellRangeObj::getDataArray()
{
uno::Any aAny;
// bAllowNV = TRUE: errors as void
- if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, TRUE ) )
+ if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, sal_True ) )
{
uno::Sequence< uno::Sequence<uno::Any> > aSeq;
if ( aAny >>= aSeq )
@@ -5202,7 +5202,7 @@ void SAL_CALL ScCellRangeObj::setDataArray(
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -5246,7 +5246,7 @@ uno::Sequence< uno::Sequence<rtl::OUString> > SAL_CALL ScCellRangeObj::getFormul
rtl::OUString* pColAry = aColSeq.getArray();
for (SCCOL nColIndex = 0; nColIndex < nColCount; nColIndex++)
pColAry[nColIndex] = lcl_GetInputString( pDocSh->GetDocument(),
- ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), TRUE );
+ ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), sal_True );
pRowAry[nRowIndex] = aColSeq;
}
@@ -5263,7 +5263,7 @@ void SAL_CALL ScCellRangeObj::setFormulaArray(
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -5289,20 +5289,20 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
- BOOL bError = FALSE;
+ sal_Bool bError = false;
ScTabOpParam aParam;
aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn,
(SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn,
(SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column,
(SCROW)aRowCell.Row, aRowCell.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column,
(SCROW)aColumnCell.Row, aColumnCell.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
switch (nMode)
{
case sheet::TableOperationMode_COLUMN:
@@ -5315,13 +5315,13 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
aParam.nMode = 2;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if (!bError)
{
ScDocFunc aFunc(*pDocSh);
- aFunc.TabOp( aRange, NULL, aParam, TRUE, TRUE );
+ aFunc.TabOp( aRange, NULL, aParam, sal_True, sal_True );
}
}
}
@@ -5340,9 +5340,9 @@ void SAL_CALL ScCellRangeObj::merge( sal_Bool bMerge ) throw(uno::RuntimeExcepti
aRange.aEnd.Col(), aRange.aEnd.Row(), false);
aMergeOption.maTabs.insert(aRange.aStart.Tab());
if ( bMerge )
- aFunc.MergeCells( aMergeOption, FALSE, TRUE, TRUE );
+ aFunc.MergeCells( aMergeOption, false, true, true );
else
- aFunc.UnmergeCells( aMergeOption, TRUE, TRUE );
+ aFunc.UnmergeCells( aMergeOption, true, true );
//! Fehler abfangen?
}
@@ -5365,7 +5365,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bError = FALSE;
+ sal_Bool bError = false;
FillDir eDir = FILL_TO_BOTTOM;
switch (nFillDirection)
@@ -5383,7 +5383,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
eDir = FILL_TO_LEFT;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
FillCmd eCmd = FILL_SIMPLE;
@@ -5405,7 +5405,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
eCmd = FILL_AUTO;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
FillDateCmd eDateCmd = FILL_DAY;
@@ -5424,14 +5424,14 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
eDateCmd = FILL_YEAR;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if (!bError)
{
ScDocFunc aFunc(*pDocSh);
aFunc.FillSeries( aRange, NULL, eDir, eCmd, eDateCmd,
- MAXDOUBLE, fStep, fEndValue, TRUE, TRUE );
+ MAXDOUBLE, fStep, fEndValue, sal_True, sal_True );
}
}
}
@@ -5446,7 +5446,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
ScRange aSourceRange(aRange);
SCsCOLROW nCount = 0; // "Dest-Count"
FillDir eDir = FILL_TO_BOTTOM;
- BOOL bError = FALSE;
+ sal_Bool bError = false;
switch (nFillDirection)
{
case sheet::FillDirection_TO_BOTTOM:
@@ -5470,15 +5470,15 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
eDir = FILL_TO_LEFT;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if (nCount < 0 || nCount > MAXROW) // overflow
- bError = TRUE;
+ bError = sal_True;
if (!bError)
{
ScDocFunc aFunc(*pDocSh);
- aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, TRUE, TRUE );
+ aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, sal_True, sal_True );
}
}
}
@@ -5494,8 +5494,8 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName )
if ( pDocSh && pAutoFormat )
{
String aNameString(aName);
- USHORT nCount = pAutoFormat->GetCount();
- USHORT nIndex;
+ sal_uInt16 nCount = pAutoFormat->GetCount();
+ sal_uInt16 nIndex;
String aCompare;
for (nIndex=0; nIndex<nCount; nIndex++)
{
@@ -5506,7 +5506,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName )
if (nIndex<nCount)
{
ScDocFunc aFunc(*pDocSh);
- aFunc.AutoFormat( aRange, NULL, nIndex, TRUE, TRUE );
+ aFunc.AutoFormat( aRange, NULL, nIndex, sal_True, sal_True );
}
else
throw lang::IllegalArgumentException();
@@ -5535,7 +5535,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createSortDescripto
SCCOLROW nFieldStart = aParam.bByRow ?
static_cast<SCCOLROW>(aDBRange.aStart.Col()) :
static_cast<SCCOLROW>(aDBRange.aStart.Row());
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart )
aParam.nField[i] -= nFieldStart;
}
@@ -5553,7 +5553,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
- USHORT i;
+ sal_uInt16 i;
ScSortParam aParam;
ScDBData* pData = pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
if (pData)
@@ -5587,7 +5587,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein
- aFunc.Sort( nTab, aParam, TRUE, TRUE, TRUE );
+ aFunc.Sort( nTab, aParam, sal_True, sal_True, sal_True );
}
}
@@ -5690,7 +5690,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, NULL, sal_True, sal_True ); // Bereich muss angelegt sein
}
}
@@ -5717,7 +5717,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
ScFilterDescriptor* pNew = new ScFilterDescriptor(pDocSh); //! stattdessen vom Objekt?
ScQueryParam aParam = pNew->GetParam();
- aParam.bHasHeader = TRUE;
+ aParam.bHasHeader = sal_True;
table::CellRangeAddress aDataAddress(xAddr->getRangeAddress());
aParam.nCol1 = (SCCOL)aDataAddress.StartColumn;
@@ -5727,7 +5727,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
aParam.nTab = aDataAddress.Sheet;
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bOk = pDoc->CreateQueryParam(
+ sal_Bool bOk = pDoc->CreateQueryParam(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
aRange.aStart.Tab(), aParam );
@@ -5779,7 +5779,7 @@ uno::Reference<sheet::XSubTotalDescriptor> SAL_CALL ScCellRangeObj::createSubTot
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOL nFieldStart = aDBRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( aParam.bGroupActive[i] )
{
@@ -5815,7 +5815,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
// im SubTotalDescriptor sind die Fields innerhalb des Bereichs gezaehlt
SCCOL nFieldStart = aRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( aParam.bGroupActive[i] )
{
@@ -5836,7 +5836,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, NULL, sal_True, sal_True ); // Bereich muss angelegt sein
}
}
@@ -5852,7 +5852,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException)
if (pData)
pData->GetSubTotalParam(aParam); // auch bei Remove die Feld-Eintraege behalten
- aParam.bRemoveOnly = TRUE;
+ aParam.bRemoveOnly = sal_True;
SCTAB nTab = aRange.aStart.Tab();
aParam.nCol1 = aRange.aStart.Col();
@@ -5863,7 +5863,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException)
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, NULL, sal_True, sal_True ); // Bereich muss angelegt sein
}
}
@@ -5908,7 +5908,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, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag als Parameter
+ aFunc.DoImport( nTab, aParam, xResultSet, NULL, sal_True, false ); //! Api-Flag als Parameter
}
}
@@ -6064,7 +6064,7 @@ SvxUnoText& ScCellObj::GetUnoText()
ScSharedCellEditSource* pEditSource =
static_cast<ScSharedCellEditSource*> (pUnoText->GetEditSource());
if (pEditSource)
- pEditSource->SetDoUpdateData(sal_False);
+ pEditSource->SetDoUpdateData(false);
}
}
return *pUnoText;
@@ -6155,7 +6155,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellObj::getImplementationId() throw(uno::Run
// Hilfsfunktionen
-String ScCellObj::GetInputString_Impl(BOOL bEnglish) const // fuer getFormula / FormulaLocal
+String ScCellObj::GetInputString_Impl(sal_Bool bEnglish) const // fuer getFormula / FormulaLocal
{
if (GetDocShell())
return lcl_GetInputString( GetDocShell()->GetDocument(), aCellPos, bEnglish );
@@ -6188,7 +6188,7 @@ String ScCellObj::GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aCellP
{
// wie in GetString am Dokument (column)
Color* pColor;
- ULONG nNumFmt = pDoc->GetNumberFormat( aCellPos );
+ sal_uLong nNumFmt = pDoc->GetNumberFormat( aCellPos );
ScCellFormat::GetString( pCell, nNumFmt, aVal, &pColor, *pDoc->GetFormatTable() );
}
}
@@ -6205,14 +6205,14 @@ String ScCellObj::GetOutputString_Impl() const
return aVal;
}
-void ScCellObj::SetString_Impl(const String& rString, BOOL bInterpret, BOOL bEnglish)
+void ScCellObj::SetString_Impl(const String& rString, sal_Bool bInterpret, sal_Bool bEnglish)
{
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
ScDocFunc aFunc(*pDocSh);
// GRAM_PODF_A1 for API compatibility.
- (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -6231,7 +6231,7 @@ void ScCellObj::SetValue_Impl(double fValue)
if ( pDocSh )
{
ScDocFunc aFunc(*pDocSh);
- (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), TRUE );
+ (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), sal_True );
}
}
@@ -6266,7 +6266,54 @@ void ScCellObj::SetFormulaWithGrammar( const ::rtl::OUString& rFormula,
if ( pDocSh )
{
ScDocFunc aFunc(*pDocSh);
- aFunc.SetCellText( aCellPos, rFormula, TRUE, TRUE, TRUE, rFormulaNmsp, eGrammar);
+ aFunc.SetCellText( aCellPos, rFormula, sal_True, sal_True, sal_True, rFormulaNmsp, eGrammar);
+ }
+}
+
+void ScCellObj::InputEnglishString( const ::rtl::OUString& rText )
+{
+ // This is like a mixture of setFormula and property FormulaLocal:
+ // The cell's number format is checked for "text", a new cell format may be set,
+ // but all parsing is in English.
+
+ ScDocShell* pDocSh = GetDocShell();
+ if ( pDocSh )
+ {
+ String aString(rText);
+ ScDocument* pDoc = pDocSh->GetDocument();
+ SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
+ sal_uInt32 nOldFormat = pDoc->GetNumberFormat( aCellPos );
+ if ( pFormatter->GetType( nOldFormat ) == NUMBERFORMAT_TEXT )
+ {
+ SetString_Impl(aString, false, false); // text cell
+ }
+ else
+ {
+ ScDocFunc aFunc(*pDocSh);
+ short nFormatType = 0;
+ ScBaseCell* pNewCell = aFunc.InterpretEnglishString( aCellPos, aString,
+ EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1, &nFormatType );
+ if (pNewCell)
+ {
+ if ( ( nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 && nFormatType != 0 )
+ {
+ // apply a format for the recognized type and the old format's language
+ sal_uInt32 nNewFormat = ScGlobal::GetStandardFormat( *pFormatter, nOldFormat, nFormatType );
+ if ( nNewFormat != nOldFormat )
+ {
+ ScPatternAttr aPattern( pDoc->GetPool() );
+ aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
+ // ATTR_LANGUAGE_FORMAT remains unchanged
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
+ }
+ }
+ // put the cell into the document
+ // (after applying the format, so possible formula recalculation already uses the new format)
+ (void)aFunc.PutCell( aCellPos, pNewCell, sal_True );
+ }
+ else
+ SetString_Impl(aString, false, false); // no cell from InterpretEnglishString, probably empty string
+ }
}
}
@@ -6312,7 +6359,7 @@ void SAL_CALL ScCellObj::setString( const rtl::OUString& aText ) throw(uno::Runt
{
SolarMutexGuard aGuard;
String aString(aText);
- SetString_Impl(aString, FALSE, FALSE); // immer Text
+ SetString_Impl(aString, false, false); // immer Text
// don't create pUnoText here if not there
if (pUnoText)
@@ -6448,14 +6495,14 @@ rtl::OUString SAL_CALL ScCellObj::getFormula() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
// TRUE = englisch
- return GetInputString_Impl(TRUE);
+ return GetInputString_Impl(true);
}
void SAL_CALL ScCellObj::setFormula( const rtl::OUString& aFormula ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
String aString(aFormula);
- SetString_Impl(aString, TRUE, TRUE); // englisch interpretieren
+ SetString_Impl(aString, sal_True, sal_True); // englisch interpretieren
}
double SAL_CALL ScCellObj::getValue() throw(uno::RuntimeException)
@@ -6510,7 +6557,7 @@ table::CellContentType ScCellObj::GetResultType_Impl()
ScBaseCell* pCell = pDocSh->GetDocument()->GetCell(aCellPos);
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
{
- BOOL bValue = ((ScFormulaCell*)pCell)->IsValue();
+ sal_Bool bValue = ((ScFormulaCell*)pCell)->IsValue();
return bValue ? table::CellContentType_VALUE : table::CellContentType_TEXT;
}
}
@@ -6520,7 +6567,7 @@ table::CellContentType ScCellObj::GetResultType_Impl()
sal_Int32 SAL_CALL ScCellObj::getError() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nError = 0;
+ sal_uInt16 nError = 0;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -6570,7 +6617,7 @@ void SAL_CALL ScCellObj::setTokens( const uno::Sequence<sheet::FormulaToken>& rT
ScDocFunc aFunc( *pDocSh );
ScBaseCell* pNewCell = new ScFormulaCell( pDoc, aCellPos, &aTokenArray );
- (void)aFunc.PutCell( aCellPos, pNewCell, TRUE );
+ (void)aFunc.PutCell( aCellPos, pNewCell, sal_True );
}
}
@@ -6641,7 +6688,7 @@ void ScCellObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, c
rtl::OUString aStrVal;
aValue >>= aStrVal;
String aString(aStrVal);
- SetString_Impl(aString, TRUE, FALSE); // lokal interpretieren
+ SetString_Impl(aString, sal_True, false); // lokal interpretieren
}
else if ( pEntry->nWID == SC_WID_UNO_FORMRT )
{
@@ -6661,8 +6708,8 @@ void ScCellObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
{
if ( pEntry->nWID == SC_WID_UNO_FORMLOC )
{
- // FALSE = lokal
- rAny <<= rtl::OUString( GetInputString_Impl(FALSE) );
+ // sal_False = lokal
+ rAny <<= rtl::OUString( GetInputString_Impl(false) );
}
else if ( pEntry->nWID == SC_WID_UNO_FORMRT )
{
@@ -6736,7 +6783,7 @@ void SAL_CALL ScCellObj::addActionLock() throw(uno::RuntimeException)
ScSharedCellEditSource* pEditSource =
static_cast<ScSharedCellEditSource*> (pUnoText->GetEditSource());
if (pEditSource)
- pEditSource->SetDoUpdateData(sal_False);
+ pEditSource->SetDoUpdateData(false);
}
}
nActionLockCount++;
@@ -6785,7 +6832,7 @@ void SAL_CALL ScCellObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeExc
sal_Int16 SAL_CALL ScCellObj::resetActionLocks() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nRet(nActionLockCount);
+ sal_uInt16 nRet(nActionLockCount);
if (pUnoText)
{
ScSharedCellEditSource* pEditSource =
@@ -7059,7 +7106,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getColumnPage
sheet::TablePageBreakData aData;
uno::Sequence<sheet::TablePageBreakData> aSeq(nCount);
sheet::TablePageBreakData* pAry = aSeq.getArray();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
for (nCol=0; nCol<=MAXCOL; nCol++)
{
ScBreakType nBreak = pDoc->HasColBreak(nCol, nTab);
@@ -7109,14 +7156,14 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
//! docfunc Funktion, auch fuer ScViewFunc::RemoveManualBreaks
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
SCTAB nTab = GetTab_Impl();
if (bUndo)
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pUndoDoc );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) );
}
@@ -7124,7 +7171,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
pDoc->RemoveManualBreaks(nTab);
pDoc->UpdatePageBreaks(nTab);
- //? UpdatePageBreakData( TRUE );
+ //? UpdatePageBreakData( sal_True );
pDocSh->SetDocumentModified();
pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
}
@@ -7151,7 +7198,7 @@ void SAL_CALL ScTableSheetObj::setName( const rtl::OUString& aNewName )
{
String aString(aNewName);
ScDocFunc aFunc( *pDocSh );
- aFunc.RenameTable( GetTab_Impl(), aString, TRUE, TRUE );
+ aFunc.RenameTable( GetTab_Impl(), aString, sal_True, sal_True );
}
}
@@ -7188,18 +7235,18 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
InsCellCmd eCmd = INS_NONE;
switch (nMode)
{
- case sheet::CellInsertMode_NONE: bDo = FALSE; break;
+ case sheet::CellInsertMode_NONE: bDo = false; break;
case sheet::CellInsertMode_DOWN: eCmd = INS_CELLSDOWN; break;
case sheet::CellInsertMode_RIGHT: eCmd = INS_CELLSRIGHT; break;
case sheet::CellInsertMode_ROWS: eCmd = INS_INSROWS; break;
case sheet::CellInsertMode_COLUMNS: eCmd = INS_INSCOLS; break;
default:
OSL_FAIL("insertCells: falscher Mode");
- bDo = FALSE;
+ bDo = false;
}
if (bDo)
@@ -7208,7 +7255,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
ScDocFunc aFunc(*pDocSh);
- aFunc.InsertCells( aScRange, NULL, eCmd, TRUE, TRUE );
+ aFunc.InsertCells( aScRange, NULL, eCmd, sal_True, sal_True );
}
}
}
@@ -7220,18 +7267,18 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
DelCellCmd eCmd = DEL_NONE;
switch (nMode)
{
- case sheet::CellDeleteMode_NONE: bDo = FALSE; break;
+ case sheet::CellDeleteMode_NONE: bDo = false; break;
case sheet::CellDeleteMode_UP: eCmd = DEL_CELLSUP; break;
case sheet::CellDeleteMode_LEFT: eCmd = DEL_CELLSLEFT; break;
case sheet::CellDeleteMode_ROWS: eCmd = DEL_DELROWS; break;
case sheet::CellDeleteMode_COLUMNS: eCmd = DEL_DELCOLS; break;
default:
OSL_FAIL("deleteCells: falscher Mode");
- bDo = FALSE;
+ bDo = false;
}
if (bDo)
@@ -7240,7 +7287,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
ScDocFunc aFunc(*pDocSh);
- aFunc.DeleteCells( aScRange, NULL, eCmd, TRUE, TRUE );
+ aFunc.DeleteCells( aScRange, NULL, eCmd, sal_True, sal_True );
}
}
}
@@ -7258,7 +7305,7 @@ void SAL_CALL ScTableSheetObj::moveRange( const table::CellAddress& aDestination
ScUnoConversion::FillScRange( aSourceRange, aSource );
ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet );
ScDocFunc aFunc(*pDocSh);
- aFunc.MoveBlock( aSourceRange, aDestPos, TRUE, TRUE, TRUE, TRUE );
+ aFunc.MoveBlock( aSourceRange, aDestPos, sal_True, sal_True, sal_True, sal_True );
}
}
@@ -7275,7 +7322,7 @@ void SAL_CALL ScTableSheetObj::copyRange( const table::CellAddress& aDestination
ScUnoConversion::FillScRange( aSourceRange, aSource );
ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet );
ScDocFunc aFunc(*pDocSh);
- aFunc.MoveBlock( aSourceRange, aDestPos, FALSE, TRUE, TRUE, TRUE );
+ aFunc.MoveBlock( aSourceRange, aDestPos, false, sal_True, sal_True, sal_True );
}
}
@@ -7289,7 +7336,7 @@ void ScTableSheetObj::PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges )
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
SCTAB nTab = GetTab_Impl();
ScPrintRangeSaver* pNewRanges = pDoc->CreatePrintRangeSaver();
@@ -7320,12 +7367,12 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScTableSheetObj::getPrintAreas()
{
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- USHORT nCount = pDoc->GetPrintRangeCount( nTab );
+ sal_uInt16 nCount = pDoc->GetPrintRangeCount( nTab );
table::CellRangeAddress aRangeAddress;
uno::Sequence<table::CellRangeAddress> aSeq(nCount);
table::CellRangeAddress* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const ScRange* pRange = pDoc->GetPrintRange( nTab, i );
DBG_ASSERT(pRange,"wo ist der Druckbereich");
@@ -7354,13 +7401,13 @@ void SAL_CALL ScTableSheetObj::setPrintAreas(
ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver();
- USHORT nCount = (USHORT) aPrintAreas.getLength();
+ sal_uInt16 nCount = (sal_uInt16) aPrintAreas.getLength();
pDoc->ClearPrintRanges( nTab );
if (nCount)
{
ScRange aPrintRange;
const table::CellRangeAddress* pAry = aPrintAreas.getConstArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScUnoConversion::FillScRange( aPrintRange, pAry[i] );
pDoc->AddPrintRange( nTab, aPrintRange );
@@ -7381,7 +7428,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeExce
SCTAB nTab = GetTab_Impl();
return ( pDoc->GetRepeatColRange(nTab) != NULL );
}
- return FALSE;
+ return false;
}
void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns )
@@ -7462,7 +7509,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeExcepti
SCTAB nTab = GetTab_Impl();
return ( pDoc->GetRepeatRowRange(nTab) != NULL );
}
- return FALSE;
+ return false;
}
void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows )
@@ -7542,7 +7589,7 @@ sheet::SheetLinkMode SAL_CALL ScTableSheetObj::getLinkMode() throw(uno::RuntimeE
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BYTE nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() );
+ sal_uInt8 nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() );
if ( nMode == SC_LINK_NORMAL )
eRet = sheet::SheetLinkMode_NORMAL;
else if ( nMode == SC_LINK_VALUE )
@@ -7631,19 +7678,19 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr
aFileString = ScGlobal::GetAbsDocName( aFileString, pDocSh );
if ( !aFilterString.Len() )
- ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, TRUE, FALSE );
+ ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, sal_True, false );
// remove application prefix from filter name here, so the filter options
// aren't reset when the filter name is changed in ScTableLink::DataChanged
ScDocumentLoader::RemoveAppPrefix( aFilterString );
- BYTE nLinkMode = SC_LINK_NONE;
+ sal_uInt8 nLinkMode = SC_LINK_NONE;
if ( nMode == sheet::SheetLinkMode_NORMAL )
nLinkMode = SC_LINK_NORMAL;
else if ( nMode == sheet::SheetLinkMode_VALUE )
nLinkMode = SC_LINK_VALUE;
- ULONG nRefresh = 0;
+ sal_uLong nRefresh = 0;
pDoc->SetLink( nTab, nLinkMode, aFileString, aFilterString, aOptString, aSheetString, nRefresh );
pDocSh->UpdateLinks(); // ggf. Link eintragen oder loeschen
@@ -7659,8 +7706,8 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr
//! Update nur fuer die betroffene Tabelle???
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
- USHORT nCount = pLinkManager->GetLinks().Count();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScTableLink))
@@ -7693,7 +7740,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hideDependents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveDelSucc( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPosition )
@@ -7709,7 +7756,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveDelPred( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPosition )
@@ -7725,7 +7772,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddSucc( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPosition )
@@ -7741,7 +7788,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddPred( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPosition )
@@ -7757,7 +7804,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPositi
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddError( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException)
@@ -7769,7 +7816,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException)
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveMarkInvalid( GetTab_Impl() );
}
- return FALSE;
+ return false;
}
void SAL_CALL ScTableSheetObj::clearArrows() throw(uno::RuntimeException)
@@ -7793,11 +7840,11 @@ void SAL_CALL ScTableSheetObj::group( const table::CellRangeAddress& rGroupRange
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
+ sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
ScRange aGroupRange;
ScUnoConversion::FillScRange( aGroupRange, rGroupRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.MakeOutline( aGroupRange, bColumns, TRUE, TRUE );
+ aFunc.MakeOutline( aGroupRange, bColumns, sal_True, sal_True );
}
}
@@ -7809,11 +7856,11 @@ void SAL_CALL ScTableSheetObj::ungroup( const table::CellRangeAddress& rGroupRan
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
+ sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
ScRange aGroupRange;
ScUnoConversion::FillScRange( aGroupRange, rGroupRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.RemoveOutline( aGroupRange, bColumns, TRUE, TRUE );
+ aFunc.RemoveOutline( aGroupRange, bColumns, sal_True, sal_True );
}
}
@@ -7827,7 +7874,7 @@ void SAL_CALL ScTableSheetObj::autoOutline( const table::CellRangeAddress& rCell
ScRange aFormulaRange;
ScUnoConversion::FillScRange( aFormulaRange, rCellRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.AutoOutline( aFormulaRange, TRUE, TRUE );
+ aFunc.AutoOutline( aFormulaRange, sal_True, sal_True );
}
}
@@ -7839,7 +7886,7 @@ void SAL_CALL ScTableSheetObj::clearOutline() throw(uno::RuntimeException)
{
SCTAB nTab = GetTab_Impl();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.RemoveAllOutlines( nTab, TRUE, TRUE );
+ aFunc.RemoveAllOutlines( nTab, sal_True, sal_True );
}
}
@@ -7853,7 +7900,7 @@ void SAL_CALL ScTableSheetObj::hideDetail( const table::CellRangeAddress& rCellR
ScRange aMarkRange;
ScUnoConversion::FillScRange( aMarkRange, rCellRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.HideMarkedOutlines( aMarkRange, TRUE, TRUE );
+ aFunc.HideMarkedOutlines( aMarkRange, sal_True, sal_True );
}
}
@@ -7867,7 +7914,7 @@ void SAL_CALL ScTableSheetObj::showDetail( const table::CellRangeAddress& rCellR
ScRange aMarkRange;
ScUnoConversion::FillScRange( aMarkRange, rCellRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.ShowMarkedOutlines( aMarkRange, TRUE, TRUE );
+ aFunc.ShowMarkedOutlines( aMarkRange, sal_True, sal_True );
}
}
@@ -7878,10 +7925,10 @@ void SAL_CALL ScTableSheetObj::showLevel( sal_Int16 nLevel, table::TableOrientat
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
+ sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
SCTAB nTab = GetTab_Impl();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.SelectLevel( nTab, bColumns, nLevel, TRUE, TRUE, TRUE );
+ aFunc.SelectLevel( nTab, bColumns, nLevel, sal_True, sal_True, sal_True );
}
}
@@ -7897,7 +7944,7 @@ void SAL_CALL ScTableSheetObj::protect( const rtl::OUString& aPassword )
{
String aString(aPassword);
ScDocFunc aFunc(*pDocSh);
- aFunc.Protect( GetTab_Impl(), aString, TRUE );
+ aFunc.Protect( GetTab_Impl(), aString, sal_True );
}
}
@@ -7910,7 +7957,7 @@ void SAL_CALL ScTableSheetObj::unprotect( const rtl::OUString& aPassword )
{
String aString(aPassword);
ScDocFunc aFunc(*pDocSh);
- BOOL bDone = aFunc.Unprotect( GetTab_Impl(), aString, TRUE );
+ sal_Bool bDone = aFunc.Unprotect( GetTab_Impl(), aString, sal_True );
if (!bDone)
throw lang::IllegalArgumentException();
}
@@ -7924,7 +7971,7 @@ sal_Bool SAL_CALL ScTableSheetObj::isProtected() throw(uno::RuntimeException)
return pDocSh->GetDocument()->IsTabProtected( GetTab_Impl() );
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return FALSE;
+ return false;
}
// XScenario
@@ -7936,7 +7983,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getIsScenario() throw(uno::RuntimeException)
if ( pDocSh )
return pDocSh->GetDocument()->IsScenario( GetTab_Impl() );
- return FALSE;
+ return false;
}
rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeException)
@@ -7947,7 +7994,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocSh->GetDocument()->GetScenarioData( GetTab_Impl(), aComment, aColor, nFlags );
return aComment;
}
@@ -7967,7 +8014,7 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -7990,13 +8037,13 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
if (pDoc->IsScenario(nTab))
{
ScMarkData aMarkData;
- aMarkData.SelectTable( nTab, TRUE );
+ aMarkData.SelectTable( nTab, sal_True );
- USHORT nRangeCount = (USHORT)rScenRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)rScenRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = rScenRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
DBG_ASSERT( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" );
ScRange aOneRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab,
@@ -8009,9 +8056,9 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
// Szenario-Ranges sind durch Attribut gekennzeichnet
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
ScDocFunc aFunc(*pDocSh);
- aFunc.ApplyAttributes( aMarkData, aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( aMarkData, aPattern, sal_True, sal_True );
}
}
}
@@ -8086,7 +8133,7 @@ void ScTableSheetObj::setExternalName( const ::rtl::OUString& aUrl, const ::rtl:
const SCTAB nTab = GetTab_Impl();
const String aAbsDocName( ScGlobal::GetAbsDocName( aUrl, pDocSh ) );
const String aDocTabName( ScGlobal::GetDocTabName( aAbsDocName, aSheetName ) );
- if ( !pDoc->RenameTab( nTab, aDocTabName, FALSE /*bUpdateRef*/, TRUE /*bExternalDocument*/ ) )
+ if ( !pDoc->RenameTab( nTab, aDocTabName, false /*bUpdateRef*/, sal_True /*bExternalDocument*/ ) )
{
throw container::ElementExistException( ::rtl::OUString(), *this );
}
@@ -8169,8 +8216,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- aFunc.SetTableVisible( nTab, bVis, TRUE );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ aFunc.SetTableVisible( nTab, bVis, sal_True );
}
else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE )
{
@@ -8187,7 +8234,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8204,10 +8251,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8237,10 +8284,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8270,10 +8317,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8303,10 +8350,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8336,10 +8383,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8369,10 +8416,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8403,12 +8450,12 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
if (nValue == com::sun::star::text::WritingMode2::RL_TB)
aFunc.SetLayoutRTL(nTab, sal_True, sal_True);
else
- aFunc.SetLayoutRTL(nTab, sal_False, sal_True);
+ aFunc.SetLayoutRTL(nTab, false, sal_True);
}
}
else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT )
{
- BOOL bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bAutoPrint)
pDoc->SetPrintEntireSheet( nTab ); // clears all print ranges
else
@@ -8458,7 +8505,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = pDoc->IsVisible( nTab );
+ sal_Bool bVis = pDoc->IsVisible( nTab );
ScUnoHelpFunctions::SetBoolInAny( rAny, bVis );
}
else if ( pEntry->nWID == SC_WID_UNO_LINKDISPBIT )
@@ -8482,7 +8529,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
rAny <<= static_cast<sal_Int32>(aColor.GetColor());
@@ -8494,7 +8541,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PROTECT) != 0 );
@@ -8506,7 +8553,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_SHOWFRAME) != 0 );
@@ -8518,7 +8565,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PRINTFRAME) != 0 );
@@ -8530,7 +8577,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_TWOWAY) != 0 );
@@ -8542,7 +8589,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_ATTRIB) != 0 );
@@ -8554,7 +8601,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, !(nFlags & SC_SCENARIO_VALUE));
@@ -8569,7 +8616,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT )
{
- BOOL bAutoPrint = pDoc->IsPrintEntireSheet( nTab );
+ sal_Bool bAutoPrint = pDoc->IsPrintEntireSheet( nTab );
ScUnoHelpFunctions::SetBoolInAny( rAny, bAutoPrint );
}
else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR )
@@ -8791,32 +8838,32 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
{
// property is 1/100mm, column width is twips
nNewWidth = HMMToTwips(nNewWidth);
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)nNewWidth, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)nNewWidth, sal_True, sal_True );
}
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
}
else if ( pEntry->nWID == SC_WID_UNO_OWIDTH )
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab,
- SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE );
- // FALSE bei Spalten momentan ohne Auswirkung
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab,
+ SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True );
+ // sal_False bei Spalten momentan ohne Auswirkung
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE )
{
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bSet)
- aFunc.InsertPageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True );
}
else
ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID
@@ -8842,9 +8889,9 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if ( pEntry->nWID == SC_WID_UNO_CELLWID )
{
// for hidden column, return original height
- USHORT nWidth = pDoc->GetOriginalWidth( nCol, nTab );
+ sal_uInt16 nWidth = pDoc->GetOriginalWidth( nCol, nTab );
// property is 1/100mm, column width is twips
- nWidth = (USHORT) TwipsToHMM(nWidth);
+ nWidth = (sal_uInt16) TwipsToHMM(nWidth);
rAny <<= (sal_Int32)( nWidth );
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
@@ -8855,7 +8902,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
else if ( pEntry->nWID == SC_WID_UNO_OWIDTH )
{
//! momentan immer gesetzt ??!?!
- BOOL bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt );
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE )
@@ -8935,42 +8982,42 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
{
// property is 1/100mm, row height is twips
nNewHeight = HMMToTwips(nNewHeight);
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)nNewHeight, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)nNewHeight, sal_True, sal_True );
}
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
}
else if ( pEntry->nWID == SC_WID_UNO_CELLFILT )
{
- BOOL bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
pDoc->SetRowFiltered(nRow, nRow, nTab, bFil);
}
else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT )
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True );
else
{
// set current height again manually
- USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab );
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, TRUE, TRUE );
+ sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, sal_True, sal_True );
}
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE )
{
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bSet)
- aFunc.InsertPageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( false, rRange.aStart, sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( false, rRange.aStart, sal_True, sal_True, sal_True );
}
else
ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID
@@ -8995,9 +9042,9 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
if ( pEntry->nWID == SC_WID_UNO_CELLHGT )
{
// for hidden row, return original height
- USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab );
+ sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab );
// property is 1/100mm, row height is twips
- nHeight = (USHORT) TwipsToHMM(nHeight);
+ nHeight = (sal_uInt16) TwipsToHMM(nHeight);
rAny <<= (sal_Int32)( nHeight );
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
@@ -9012,7 +9059,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
}
else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT )
{
- BOOL bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt );
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE )
@@ -9085,7 +9132,7 @@ uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException)
sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bHas = FALSE;
+ sal_Bool bHas = false;
if ( pDocShell )
{
//! schneller selber testen?
@@ -9102,13 +9149,13 @@ ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR
pDocShell( pDocSh ),
aRanges( rR ),
pMark( NULL ),
- bAtEnd( FALSE )
+ bAtEnd( false )
{
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->AddUnoObject(*this);
if ( aRanges.empty() )
- bAtEnd = TRUE;
+ bAtEnd = true;
else
{
SCTAB nTab = 0;
@@ -9124,7 +9171,7 @@ void ScCellsEnumeration::CheckPos_Impl()
{
if (pDocShell)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScDocument* pDoc = pDocShell->GetDocument();
ScBaseCell* pCell = pDoc->GetCell(aPos);
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE )
@@ -9132,7 +9179,7 @@ void ScCellsEnumeration::CheckPos_Impl()
if (!pMark)
{
pMark = new ScMarkData;
- pMark->MarkFromRangeList( aRanges, FALSE );
+ pMark->MarkFromRangeList( aRanges, false );
pMark->MarkToMulti(); // needed for GetNextMarkedCell
}
bFound = pMark->IsCellMarked( aPos.Col(), aPos.Row() );
@@ -9155,18 +9202,18 @@ void ScCellsEnumeration::Advance_Impl()
if (!pMark)
{
pMark = new ScMarkData;
- pMark->MarkFromRangeList( aRanges, FALSE );
+ pMark->MarkFromRangeList( aRanges, false );
pMark->MarkToMulti(); // needed for GetNextMarkedCell
}
SCCOL nCol = aPos.Col();
SCROW nRow = aPos.Row();
SCTAB nTab = aPos.Tab();
- BOOL bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark );
+ sal_Bool bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark );
if (bFound)
aPos.Set( nCol, nRow, nTab );
else
- bAtEnd = TRUE; // kommt nix mehr
+ bAtEnd = sal_True; // kommt nix mehr
}
void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -9355,8 +9402,8 @@ ScCellFormatsEnumeration::ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScR
pDocShell( pDocSh ),
nTab( rRange.aStart.Tab() ),
pIter( NULL ),
- bAtEnd( FALSE ),
- bDirty( FALSE )
+ bAtEnd( false ),
+ bDirty( false )
{
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->AddUnoObject(*this);
@@ -9386,7 +9433,7 @@ void ScCellFormatsEnumeration::Advance_Impl()
if ( bDirty )
{
pIter->DataChanged(); // AttrArray-Index neu suchen
- bDirty = FALSE;
+ bDirty = false;
}
SCCOL nCol1, nCol2;
@@ -9394,10 +9441,10 @@ void ScCellFormatsEnumeration::Advance_Impl()
if ( pIter->GetNext( nCol1, nCol2, nRow1, nRow2 ) )
aNext = ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
else
- bAtEnd = TRUE; // kommt nix mehr
+ bAtEnd = sal_True; // kommt nix mehr
}
else
- bAtEnd = TRUE; // Dok weggekommen oder so
+ bAtEnd = sal_True; // Dok weggekommen oder so
}
ScCellRangeObj* ScCellFormatsEnumeration::NextObject_Impl()
@@ -9422,7 +9469,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // ungueltig geworden
@@ -9431,7 +9478,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( nId == SFX_HINT_DATACHANGED )
{
- bDirty = TRUE; // AttrArray-Index evtl. ungueltig geworden
+ bDirty = sal_True; // AttrArray-Index evtl. ungueltig geworden
}
}
}
@@ -9485,7 +9532,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
pDocShell = NULL; // ungueltig geworden
}
@@ -9751,7 +9798,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
pDocShell = NULL; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 7eeb66573ca9..31d5417bf99e 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -88,7 +88,7 @@ namespace calc
,OCellValueBinding_PBase( OCellValueBinding_Base::rBHelper )
,m_xDocument( _rxDocument )
,m_aModifyListeners( m_aMutex )
- ,m_bInitialized( sal_False )
+ ,m_bInitialized( false )
,m_bListPos( _bListPos )
{
DBG_CTOR( OCellValueBinding, checkConsistency_static );
@@ -224,7 +224,7 @@ namespace calc
if ( aType.equals( *pTypes++ ) )
return sal_True;
- return sal_False;
+ return false;
}
//--------------------------------------------------------------------
@@ -252,7 +252,7 @@ namespace calc
{
// check if the cell has a numeric value (this might go into a helper function):
- sal_Bool bHasValue = sal_False;
+ sal_Bool bHasValue = false;
CellContentType eCellType = m_xCell->getType();
if ( eCellType == CellContentType_VALUE )
bHasValue = sal_True;
@@ -343,7 +343,7 @@ namespace calc
// boolean is stored as values 0 or 1
// TODO: set the number format to boolean if no format is set?
- sal_Bool bValue( sal_False );
+ sal_Bool bValue( false );
aValue >>= bValue;
double nCellValue = bValue ? 1.0 : 0.0;
@@ -413,7 +413,7 @@ namespace calc
if ( xTypes.is() )
{
Locale aLocale;
- sal_Bool bWasBoolean = sal_False;
+ sal_Bool bWasBoolean = false;
sal_Int32 nOldIndex = ::comphelper::getINT32( xCellProp->getPropertyValue( sPropName ) );
Reference<XPropertySet> xOldFormat;
@@ -497,7 +497,7 @@ namespace calc
if ( *pLookup++ == _rServiceName )
return sal_True;
- return sal_False;
+ return false;
}
//--------------------------------------------------------------------
@@ -582,7 +582,7 @@ namespace calc
// get the cell address
CellAddress aAddress;
- sal_Bool bFoundAddress = sal_False;
+ sal_Bool bFoundAddress = false;
const Any* pLoop = _rArguments.getConstArray();
const Any* pLoopEnd = _rArguments.getConstArray() + _rArguments.getLength();
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 98c21cbf760d..bac0a8f76d03 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1099,7 +1099,7 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens,
SCROW nMaxRow = 0;
SCTAB nTab = 0;
- USHORT nFileId = 0;
+ sal_uInt16 nFileId = 0;
String aExtTabName;
bool bExternal = false;
@@ -2496,7 +2496,7 @@ void ScChart2DataSequence::BuildDataCache()
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nErr = pFCell->GetErrCode();
+ sal_uInt16 nErr = pFCell->GetErrCode();
if (nErr)
break;
@@ -2712,7 +2712,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
+ sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId ==SFX_HINT_DYING )
{
m_pDocument = NULL;
@@ -2729,7 +2729,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
if( m_pDocument )
{
- for ( USHORT n=0; n<m_aValueListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<m_aValueListeners.Count(); n++ )
m_pDocument->AddUnoListenerCall( *m_aValueListeners[n], aEvent );
}
@@ -3288,8 +3288,8 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference<
acquire(); // in case the listeners have the last ref - released below
- USHORT nCount = m_aValueListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = m_aValueListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XModifyListener> *pObj = m_aValueListeners[n];
if ( *pObj == aListener )
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index fd5b97c88fde..db07ccda9d38 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -208,11 +208,11 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
}
ScRangeList* pList = new ScRangeList;
- USHORT nRangeCount = (USHORT)aRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = aRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet,
static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet );
@@ -232,7 +232,8 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
// Rechteck anpassen
//! Fehler/Exception, wenn leer/ungueltig ???
Point aRectPos( aRect.X, aRect.Y );
- if (aRectPos.X() < 0) aRectPos.X() = 0;
+ bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ if ( ( aRectPos.X() < 0 && !bLayoutRTL ) || ( aRectPos.X() > 0 && bLayoutRTL ) ) aRectPos.X() = 0;
if (aRectPos.Y() < 0) aRectPos.Y() = 0;
Size aRectSize( aRect.Width, aRect.Height );
if (aRectSize.Width() <= 0) aRectSize.Width() = 5000; // Default-Groesse
@@ -314,7 +315,7 @@ void SAL_CALL ScChartsObj::removeByName( const rtl::OUString& aName )
ScDrawLayer* pModel = pDoc->GetDrawLayer(); // ist nicht 0
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); // ist nicht 0
- pModel->AddUndo( new SdrUndoRemoveObj( *pObj ) ); //! Undo-Kommentar?
+ pModel->AddUndo( new SdrUndoDelObj( *pObj ) );
pPage->RemoveObject( pObj->GetOrdNum() );
//! Notify etc.???
@@ -547,14 +548,14 @@ void ScChartObj::Update_Impl( const ScRangeListRef& rRanges, bool bColHeaders, b
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if (bUndo)
{
pDocShell->GetUndoManager()->AddUndoAction(
- new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ) );
+ new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, false ) );
}
- pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, FALSE );
+ pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, false );
}
}
@@ -608,7 +609,7 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con
if ( pDoc )
{
ScRange aEmptyRange;
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
ScChartListener aSearcher( aChartName, pDoc, aEmptyRange );
ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection();
if ( pCollection && pCollection->Search( &aSearcher, nIndex ) )
@@ -683,7 +684,7 @@ void SAL_CALL ScChartObj::setHasColumnHeaders( sal_Bool bHasColumnHeaders )
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
- if ( bOldColHeaders != (bHasColumnHeaders != sal_False) )
+ if ( bOldColHeaders != (bHasColumnHeaders != false) )
Update_Impl( xRanges, bHasColumnHeaders, bOldRowHeaders );
}
@@ -703,7 +704,7 @@ void SAL_CALL ScChartObj::setHasRowHeaders( sal_Bool bHasRowHeaders )
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
- if ( bOldRowHeaders != (bHasRowHeaders != sal_False) )
+ if ( bOldRowHeaders != (bHasRowHeaders != false) )
Update_Impl( xRanges, bOldColHeaders, bHasRowHeaders );
}
@@ -748,11 +749,11 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress
GetData_Impl( xOldRanges, bColHeaders, bRowHeaders );
ScRangeList* pList = new ScRangeList;
- USHORT nRangeCount = (USHORT)aRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = aRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet,
static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet );
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 5fbbe2a007f5..fc05a9a4401e 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -143,7 +143,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
ScDocument* pDoc = pDocShell->GetDocument();
if (pDoc)
{
- sal_Bool bUpdateHeights = sal_False;
+ sal_Bool bUpdateHeights = false;
ScViewOptions aViewOpt(pDoc->GetViewOptions());
@@ -243,7 +243,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
{
// Int16 contains CharacterCompressionType values
sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue );
- pDoc->SetAsianCompression( (BYTE) nUno );
+ pDoc->SetAsianCompression( (sal_uInt8) nUno );
bUpdateHeights = sal_True;
}
else if ( aPropertyName.compareToAscii( SC_UNO_ASIANKERN ) == 0 )
@@ -253,7 +253,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
else if ( aPropertyName.compareToAscii( SCSAVEVERSION ) == 0)
{
- sal_Bool bTmp=sal_False;
+ sal_Bool bTmp=false;
if ( aValue >>= bTmp )
pDocShell->SetSaveVersionOnClose( bTmp );
}
@@ -265,13 +265,13 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
else if ( aPropertyName.compareToAscii( SC_UNO_LOADREADONLY ) == 0 )
{
- sal_Bool bTmp=sal_False;
+ sal_Bool bTmp=false;
if ( aValue >>= bTmp )
pDocShell->SetLoadReadonly( bTmp );
}
else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 )
{
- sal_Bool bDocShared = sal_False;
+ sal_Bool bDocShared = false;
if ( aValue >>= bDocShared )
{
pDocShell->SetSharedXMLFlag( bDocShared );
@@ -378,7 +378,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString
{
// #i75610# don't create the printer, return empty string if no printer created yet
// (as in SwXDocumentSettings)
- SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE );
+ SfxPrinter* pPrinter = pDoc->GetPrinter( false );
if (pPrinter)
aRet <<= rtl::OUString ( pPrinter->GetName());
else
@@ -388,7 +388,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString
{
// #i75610# don't create the printer, return empty sequence if no printer created yet
// (as in SwXDocumentSettings)
- SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE );
+ SfxPrinter* pPrinter = pDoc->GetPrinter( false );
if (pPrinter)
{
SvMemoryStream aStream;
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index d6139cd578bb..553ba56e6cd4 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -134,7 +134,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep
SCTAB nTab = aOneRange.aStart.Tab();
pDocSh->GetDocument()->GetDataArea(
- nTab, nStartCol, nStartRow, nEndCol, nEndRow, TRUE, false );
+ nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, false );
ScRange aNew( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
SetNewRange( aNew );
@@ -332,7 +332,7 @@ void SAL_CALL ScCellCursorObj::gotoStart() throw(uno::RuntimeException)
SCTAB nTab = aOneRange.aStart.Tab();
pDocSh->GetDocument()->GetDataArea(
- nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false );
+ nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, false );
ScRange aNew( nStartCol, nStartRow, nTab );
SetNewRange( aNew );
@@ -360,7 +360,7 @@ void SAL_CALL ScCellCursorObj::gotoEnd() throw(uno::RuntimeException)
SCTAB nTab = aOneRange.aStart.Tab();
pDocSh->GetDocument()->GetDataArea(
- nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false );
+ nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, false );
ScRange aNew( nEndCol, nEndRow, nTab );
SetNewRange( aNew );
@@ -383,7 +383,7 @@ void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException)
SCTAB nTab = aCursor.Tab();
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
- pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, FALSE,TRUE, aMark );
+ pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, false,sal_True, aMark );
//! sonst Exception oder so
SetNewRange( ScRange( nNewX, nNewY, nTab ) );
@@ -405,7 +405,7 @@ void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException)
SCTAB nTab = aCursor.Tab();
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
- pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, FALSE,TRUE, aMark );
+ pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, false,sal_True, aMark );
//! sonst Exception oder so
SetNewRange( ScRange( nNewX, nNewY, nTab ) );
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c675d5217771..71b5e5359945 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -176,7 +176,7 @@ bool lclCheckMinMaxStep( const DataPilotFieldGroupInfo& rInfo )
lclCheckValidDouble( rInfo.Start, rInfo.HasAutoStart ) &&
lclCheckValidDouble( rInfo.End, rInfo.HasAutoEnd ) &&
(rInfo.HasAutoStart || rInfo.HasAutoEnd || (rInfo.Start <= rInfo.End)) &&
- lclCheckValidDouble( rInfo.Step, sal_False ) &&
+ lclCheckValidDouble( rInfo.Step, false ) &&
(0.0 <= rInfo.Step);
}
@@ -203,7 +203,7 @@ SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupItemObj, "ScDataPilotFieldGroupItem
//------------------------------------------------------------------------
-GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits )
+GeneralFunction ScDataPilotConversion::FirstFunc( sal_uInt16 nBits )
{
if ( nBits & PIVOT_FUNC_SUM ) return GeneralFunction_SUM;
if ( nBits & PIVOT_FUNC_COUNT ) return GeneralFunction_COUNT;
@@ -220,9 +220,9 @@ GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits )
return GeneralFunction_NONE;
}
-USHORT ScDataPilotConversion::FunctionBit( GeneralFunction eFunc )
+sal_uInt16 ScDataPilotConversion::FunctionBit( GeneralFunction eFunc )
{
- USHORT nRet = PIVOT_FUNC_NONE; // 0
+ sal_uInt16 nRet = PIVOT_FUNC_NONE; // 0
switch (eFunc)
{
case GeneralFunction_SUM: nRet = PIVOT_FUNC_SUM; break;
@@ -298,7 +298,7 @@ sal_Int32 lcl_GetObjectIndex( ScDPObject* pDPObj, const ScFieldIdentifier& rFiel
sal_Int32 nCount = pDPObj->GetDimCount();
for ( sal_Int32 nDim = 0; nDim < nCount; ++nDim )
{
- BOOL bIsDataLayout = FALSE;
+ sal_Bool bIsDataLayout = false;
OUString aDimName( pDPObj->GetDimName( nDim, bIsDataLayout ) );
if ( rFieldId.mbDataLayout ? bIsDataLayout : (aDimName == rFieldId.maFieldName) )
return nDim;
@@ -431,7 +431,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
if ( aNewName.getLength() && hasByName( aNewName ) )
throw RuntimeException(); // no other exceptions specified
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDataPilotDescriptorBase* pImp = ScDataPilotDescriptorBase::getImplementation( xDescriptor );
if ( pDocShell && pImp )
{
@@ -452,7 +452,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
// todo: handle double fields (for more information see ScDPObject
ScDBDocFunc aFunc(*pDocShell);
- bDone = aFunc.DataPilotUpdate( NULL, pNewObj, TRUE, TRUE );
+ bDone = aFunc.DataPilotUpdate( NULL, pNewObj, sal_True, sal_True );
}
}
@@ -469,7 +469,7 @@ void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName )
if (pDPObj && pDocShell)
{
ScDBDocFunc aFunc(*pDocShell);
- aFunc.DataPilotUpdate( pDPObj, NULL, TRUE, TRUE ); // remove - incl. undo etc.
+ aFunc.DataPilotUpdate( pDPObj, NULL, sal_True, sal_True ); // remove - incl. undo etc.
}
else
throw RuntimeException(); // no other exceptions specified
@@ -498,7 +498,7 @@ sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException)
// api only handles sheet data at this time
//! allow all data sources!!!
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
size_t nCount = pColl->GetCount();
for (size_t i=0; i<nCount; ++i)
{
@@ -561,7 +561,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames()
// api only handles sheet data at this time
//! allow all data sources!!!
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
size_t nCount = pColl->GetCount();
size_t i;
for (i=0; i<nCount; ++i)
@@ -571,7 +571,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames()
++nFound;
}
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
Sequence<OUString> aSeq(nFound);
OUString* pAry = aSeq.getArray();
for (i=0; i<nCount; ++i)
@@ -607,11 +607,11 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName )
ScDPObject* pDPObj = (*pColl)[i];
if ( pDPObj->GetOutRange().aStart.Tab() == nTab &&
pDPObj->GetName() == aNamStr )
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -842,7 +842,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
ScImportParam aParam;
ScImportDescriptor::FillImportParam( aParam, aArgSeq );
- USHORT nNewType = sheet::DataImportMode_NONE;
+ sal_uInt16 nNewType = sheet::DataImportMode_NONE;
if ( aParam.bImport )
{
if ( aParam.bSql )
@@ -983,7 +983,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
aParam.aStatement = pImportDesc->aObject;
aParam.bNative = pImportDesc->bNative;
aParam.bSql = ( pImportDesc->nType == sheet::DataImportMode_SQL );
- aParam.nType = static_cast<BYTE>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable);
+ aParam.nType = static_cast<sal_uInt8>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable);
uno::Sequence<beans::PropertyValue> aSeq( ScImportDescriptor::GetPropertyCount() );
ScImportDescriptor::FillProperties( aSeq, aParam );
@@ -1200,7 +1200,7 @@ void ScDataPilotTableObj::SetDPObject( ScDPObject* pDPObject )
if ( pDPObj && pDocSh )
{
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DataPilotUpdate( pDPObj, pDPObject, TRUE, TRUE );
+ aFunc.DataPilotUpdate( pDPObj, pDPObject, sal_True, sal_True );
}
}
@@ -1284,7 +1284,7 @@ void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException)
{
ScDPObject* pNew = new ScDPObject(*pDPObj);
ScDBDocFunc aFunc(*GetDocShell());
- aFunc.DataPilotUpdate( pDPObj, pNew, TRUE, TRUE );
+ aFunc.DataPilotUpdate( pDPObj, pNew, true, true );
delete pNew; // DataPilotUpdate copies settings from "new" object
}
}
@@ -1365,8 +1365,8 @@ void SAL_CALL ScDataPilotTableObj::removeModifyListener( const uno::Reference<ut
acquire(); // in case the listeners have the last ref - released below
- USHORT nCount = aModifyListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aModifyListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XModifyListener> *pObj = aModifyListeners[n];
if ( *pObj == aListener )
@@ -1392,6 +1392,23 @@ void ScDataPilotTableObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
Refreshed_Impl();
}
+ else if ( rHint.ISA( ScUpdateRefHint ) )
+ {
+ ScRange aRange( 0, 0, nTab );
+ ScRangeList aRanges;
+ aRanges.Append( aRange );
+ const ScUpdateRefHint& rRef = static_cast< const ScUpdateRefHint& >( rHint );
+ if ( aRanges.UpdateReference( rRef.GetMode(), GetDocShell()->GetDocument(), rRef.GetRange(),
+ rRef.GetDx(), rRef.GetDy(), rRef.GetDz() ) &&
+ aRanges.Count() == 1 )
+ {
+ const ScRange* pRange = aRanges.GetObject( 0 );
+ if ( pRange )
+ {
+ nTab = pRange->aStart.Tab();
+ }
+ }
+ }
ScDataPilotDescriptorBase::Notify( rBC, rHint );
}
@@ -1404,7 +1421,7 @@ void ScDataPilotTableObj::Refreshed_Impl()
// the EventObject holds a Ref to this object until after the listener calls
ScDocument* pDoc = GetDocShell()->GetDocument();
- for ( USHORT n=0; n<aModifyListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aModifyListeners.Count(); n++ )
pDoc->AddUnoListenerCall( *aModifyListeners[n], aEvent );
}
@@ -1419,8 +1436,8 @@ ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
// set defaults like in ScPivotParam constructor
aSaveData.SetColumnGrand( sal_True );
aSaveData.SetRowGrand( sal_True );
- aSaveData.SetIgnoreEmptyRows( sal_False );
- aSaveData.SetRepeatIfEmpty( sal_False );
+ aSaveData.SetIgnoreEmptyRows( false );
+ aSaveData.SetRepeatIfEmpty( false );
mpDPObject->SetSaveData(aSaveData);
ScSheetSourceDesc aSheetDesc(pDocSh ? pDocSh->GetDocument() : NULL);
mpDPObject->SetSheetDesc(aSheetDesc);
@@ -1608,10 +1625,10 @@ sal_Int32 lcl_GetFieldCount( const Reference<XDimensionsSupplier>& rSource, cons
return nRet;
}
-BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource,
+sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource,
const Any& rOrient, SCSIZE nIndex, ScFieldIdentifier& rFieldId )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
SCSIZE nPos = 0;
sal_Int32 nDimIndex = 0;
@@ -1686,13 +1703,13 @@ BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource,
rFieldId.mnFieldIdx = nRepeat;
}
else
- bOk = sal_False;
+ bOk = false;
}
return bOk;
}
-BOOL lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId )
+sal_Bool lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId )
{
// "By name" is always the first match.
// The name "Data" always refers to the data layout field.
@@ -2102,7 +2119,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
pDim = pNewDim;
}
- pDim->SetOrientation(sal::static_int_cast<USHORT>(eNew));
+ pDim->SetOrientation(sal::static_int_cast<sal_uInt16>(eNew));
// move changed field behind all other fields (make it the last field in dimension)
pSaveData->SetPosition( pDim, pSaveData->GetDimensions().size() );
@@ -2146,12 +2163,12 @@ void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc)
pDim->SetSubTotals( 0, NULL );
else
{
- USHORT nFunc = sal::static_int_cast<USHORT>( eNewFunc );
+ sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( eNewFunc );
pDim->SetSubTotals( 1, &nFunc );
}
}
else
- pDim->SetFunction( sal::static_int_cast<USHORT>( eNewFunc ) );
+ pDim->SetFunction( sal::static_int_cast<sal_uInt16>( eNewFunc ) );
SetDPObject( pDPObj );
}
}
@@ -2193,21 +2210,21 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt
pDim->SetSubTotals( 0, NULL );
else
{
- USHORT nFunc = sal::static_int_cast<USHORT>( rSubtotals[ 0 ] );
+ sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( rSubtotals[ 0 ] );
pDim->SetSubTotals( 1, &nFunc );
}
}
else if( nCount > 1 )
{
// set multiple functions, ignore NONE and AUTO in this case
- ::std::vector< USHORT > aSubt;
+ ::std::vector< sal_uInt16 > aSubt;
for( sal_Int32 nIdx = 0; nIdx < nCount; ++nIdx )
{
GeneralFunction eFunc = rSubtotals[ nIdx ];
if( (eFunc != GeneralFunction_NONE) && (eFunc != GeneralFunction_AUTO) )
{
// do not insert functions twice
- USHORT nFunc = static_cast< USHORT >( eFunc );
+ sal_uInt16 nFunc = static_cast< sal_uInt16 >( eFunc );
if( ::std::find( aSubt.begin(), aSubt.end(), nFunc ) == aSubt.end() )
aSubt.push_back( nFunc );
}
@@ -2369,7 +2386,7 @@ sal_Bool ScDataPilotFieldObj::hasGroupInfo()
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
if( const ScDPDimensionSaveData* pDimData = pDPObj->GetSaveData()->GetExistingDimensionData() )
return pDimData->GetNamedGroupDim( pDim->GetName() ) || pDimData->GetNumGroupDim( pDim->GetName() );
- return sal_False;
+ return false;
}
DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
@@ -2527,7 +2544,7 @@ void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
sal_Bool ScDataPilotFieldObj::HasString(const Sequence< OUString >& rItems, const OUString& aString)
{
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
sal_Int32 nCount(rItems.getLength());
sal_Int32 nItem(0);
@@ -3270,7 +3287,7 @@ Any SAL_CALL ScDataPilotItemsObj::getByName( const OUString& aName )
{
Reference<XIndexAccess> xMembersIndex(new ScNameToIndexAccess( xMembers ));
sal_Int32 nCount = xMembersIndex->getCount();
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
sal_Int32 nItem = 0;
while (nItem < nCount && !bFound )
{
@@ -3299,7 +3316,7 @@ sal_Bool SAL_CALL ScDataPilotItemsObj::hasByName( const OUString& aName )
throw(RuntimeException)
{
SolarMutexGuard aGuard;
- sal_Bool bFound = sal_False;
+ sal_Bool bFound = false;
Reference<XNameAccess> xMembers = GetMembers();
if (xMembers.is())
{
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 1728c7002165..d279fff0d020 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -283,25 +283,25 @@ void ScImportDescriptor::FillImportParam( ScImportParam& rParam, const uno::Sequ
switch (eMode)
{
case sheet::DataImportMode_NONE:
- rParam.bImport = FALSE;
+ rParam.bImport = false;
break;
case sheet::DataImportMode_SQL:
- rParam.bImport = TRUE;
- rParam.bSql = TRUE;
+ rParam.bImport = sal_True;
+ rParam.bSql = sal_True;
break;
case sheet::DataImportMode_TABLE:
- rParam.bImport = TRUE;
- rParam.bSql = FALSE;
+ rParam.bImport = sal_True;
+ rParam.bSql = false;
rParam.nType = ScDbTable;
break;
case sheet::DataImportMode_QUERY:
- rParam.bImport = TRUE;
- rParam.bSql = FALSE;
+ rParam.bImport = sal_True;
+ rParam.bSql = false;
rParam.nType = ScDbQuery;
break;
default:
OSL_FAIL("falscher Mode");
- rParam.bImport = FALSE;
+ rParam.bImport = false;
}
}
}
@@ -331,7 +331,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq
aOutPos.Column = rParam.nDestCol;
aOutPos.Row = rParam.nDestRow;
- USHORT nSortCount = 0;
+ sal_uInt16 nSortCount = 0;
while ( nSortCount < MAXSORT && rParam.bDoSort[nSortCount] )
++nSortCount;
@@ -339,7 +339,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq
if (nSortCount)
{
table::TableSortField* pFieldArray = aFields.getArray();
- for (USHORT i=0; i<nSortCount; i++)
+ for (sal_uInt16 i=0; i<nSortCount; i++)
{
pFieldArray[i].Field = rParam.nField[i];
pFieldArray[i].IsAscending = rParam.bAscending[i];
@@ -431,10 +431,10 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
rParam.bAscending[i] = pFieldArray[i].SortAscending;
// FieldType wird ignoriert
- rParam.bDoSort[i] = TRUE;
+ rParam.bDoSort[i] = sal_True;
}
for (i=nCount; i<MAXSORT; i++)
- rParam.bDoSort[i] = FALSE;
+ rParam.bDoSort[i] = false;
}
else if ( rProp.Value >>= aNewSeq )
{
@@ -457,10 +457,10 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
rParam.aCollatorAlgorithm = pFieldArray[i].CollatorAlgorithm;
// FieldType wird ignoriert
- rParam.bDoSort[i] = TRUE;
+ rParam.bDoSort[i] = sal_True;
}
for (i=nCount; i<MAXSORT; i++)
- rParam.bDoSort[i] = FALSE;
+ rParam.bDoSort[i] = false;
}
}
else if (aPropName.EqualsAscii( SC_UNONAME_ISCASE ))
@@ -487,7 +487,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
{
sal_Int32 nVal = 0;
if ( rProp.Value >>= nVal )
- rParam.nUserIndex = (USHORT)nVal;
+ rParam.nUserIndex = (sal_uInt16)nVal;
}
else if (aPropName.EqualsAscii( SC_UNONAME_COLLLOC ))
{
@@ -504,7 +504,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
//------------------------------------------------------------------------
-ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, USHORT nP ) :
+ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP ) :
xRef( pDesc ), // Objekt festhalten
rParent( *pDesc ),
nPos( nP )
@@ -565,8 +565,8 @@ void SAL_CALL ScSubTotalFieldObj::setSubTotalColumns(
ScSubTotalParam aParam;
rParent.GetData(aParam);
- UINT32 nColCount = aSubTotalColumns.getLength();
- if ( nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) )
+ sal_uInt32 nColCount = aSubTotalColumns.getLength();
+ if ( nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) )
{
SCCOL nCount = static_cast<SCCOL>(nColCount);
aParam.nSubTotals[nPos] = nCount;
@@ -619,7 +619,7 @@ void ScSubTotalDescriptorBase::PutData( const ScSubTotalParam& /* rParam */ )
// XSubTotalDesctiptor
-ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(USHORT nIndex)
+ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(sal_uInt16 nIndex)
{
if ( nIndex < getCount() )
return new ScSubTotalFieldObj( this, nIndex );
@@ -632,8 +632,8 @@ void SAL_CALL ScSubTotalDescriptorBase::clear() throw(uno::RuntimeException)
ScSubTotalParam aParam;
GetData(aParam);
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
- aParam.bGroupActive[i] = FALSE;
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
+ aParam.bGroupActive[i] = false;
//! Notify oder so fuer die Field-Objekte???
@@ -648,15 +648,15 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew(
ScSubTotalParam aParam;
GetData(aParam);
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < MAXSUBTOTAL && aParam.bGroupActive[nPos] )
++nPos;
- UINT32 nColCount = aSubTotalColumns.getLength();
+ sal_uInt32 nColCount = aSubTotalColumns.getLength();
- if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) )
+ if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) )
{
- aParam.bGroupActive[nPos] = TRUE;
+ aParam.bGroupActive[nPos] = sal_True;
aParam.nField[nPos] = static_cast<SCCOL>(nGroupColumn);
delete aParam.pSubTotals[nPos];
@@ -708,7 +708,7 @@ sal_Int32 SAL_CALL ScSubTotalDescriptorBase::getCount() throw(uno::RuntimeExcept
ScSubTotalParam aParam;
GetData(aParam);
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while ( nCount < MAXSUBTOTAL && aParam.bGroupActive[nCount] )
++nCount;
return nCount;
@@ -719,7 +719,7 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xField.is())
return uno::makeAny(xField);
else
@@ -779,7 +779,7 @@ void SAL_CALL ScSubTotalDescriptorBase::setPropertyValue(
{
sal_Int32 nVal = 0;
if ( aValue >>= nVal )
- aParam.nUserIndex = (USHORT)nVal;
+ aParam.nUserIndex = (sal_uInt16)nVal;
}
else if (aString.EqualsAscii( SC_UNONAME_MAXFLD ))
{
@@ -954,13 +954,13 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScConsolidationDescriptor::getSo
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aParam.nDataAreaCount;
+ sal_uInt16 nCount = aParam.nDataAreaCount;
if (!aParam.ppDataAreas)
nCount = 0;
table::CellRangeAddress aRange;
uno::Sequence<table::CellRangeAddress> aSeq(nCount);
table::CellRangeAddress* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScArea* pArea = aParam.ppDataAreas[i];
if (pArea)
@@ -981,12 +981,12 @@ void SAL_CALL ScConsolidationDescriptor::setSources(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = (USHORT)aSources.getLength();
+ sal_uInt16 nCount = (sal_uInt16)aSources.getLength();
if (nCount)
{
const table::CellRangeAddress* pAry = aSources.getConstArray();
ScArea** pNew = new ScArea*[nCount];
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<nCount; i++)
pNew[i] = new ScArea( pAry[i].Sheet,
static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow,
@@ -1082,7 +1082,7 @@ void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocSh = NULL; // invalid
@@ -1256,7 +1256,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
if (!rEntry.pStr)
rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein)
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR;
rEntry.nField = pAry[i].Field;
rEntry.bQueryByString = !pAry[i].IsNumeric;
@@ -1284,7 +1284,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1292,7 +1292,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1304,7 +1304,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized
for (i=nCount; i<nParamCount; i++)
- aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen
+ aParam.GetEntry(i).bDoQuery = false; // ueberzaehlige Felder zuruecksetzen
PutData(aParam);
}
@@ -1330,7 +1330,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
if (!rEntry.pStr)
rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein)
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR;
rEntry.nField = pAry[i].Field;
rEntry.bQueryByString = !pAry[i].IsNumeric;
@@ -1364,7 +1364,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1372,7 +1372,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1384,7 +1384,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized
for (i=nCount; i<nParamCount; i++)
- aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen
+ aParam.GetEntry(i).bDoQuery = false; // ueberzaehlige Felder zuruecksetzen
PutData(aParam);
}
@@ -1639,7 +1639,7 @@ ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const
ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection();
if (pNames)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pNames->SearchName( aName, nPos ))
pRet = (*pNames)[nPos];
}
@@ -1663,7 +1663,7 @@ void SAL_CALL ScDatabaseRangeObj::setName( const rtl::OUString& aNewName )
{
ScDBDocFunc aFunc(*pDocShell);
String aNewStr(aNewName);
- BOOL bOk = aFunc.RenameDBRange( aName, aNewStr, TRUE );
+ sal_Bool bOk = aFunc.RenameDBRange( aName, aNewStr, sal_True );
if (bOk)
aName = aNewStr;
}
@@ -1701,7 +1701,7 @@ void SAL_CALL ScDatabaseRangeObj::setDataArea( const table::CellRangeAddress& aD
aNewData.SetArea( aDataArea.Sheet, (SCCOL)aDataArea.StartColumn, (SCROW)aDataArea.StartRow,
(SCCOL)aDataArea.EndColumn, (SCROW)aDataArea.EndRow );
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
@@ -1719,7 +1719,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScDatabaseRangeObj::getSortDescript
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOLROW nFieldStart = aParam.bByRow ? static_cast<SCCOLROW>(aDBRange.aStart.Col()) : static_cast<SCCOLROW>(aDBRange.aStart.Row());
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart )
aParam.nField[i] -= nFieldStart;
}
@@ -1773,7 +1773,7 @@ void ScDatabaseRangeObj::SetQueryParam(const ScQueryParam& rQueryParam)
aNewData.SetQueryParam(aParam);
aNewData.SetHeader(aParam.bHasHeader); // not in ScDBData::SetQueryParam
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
@@ -1795,7 +1795,7 @@ void ScDatabaseRangeObj::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOL nFieldStart = aDBRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( rSubTotalParam.bGroupActive[i] )
{
@@ -1820,7 +1820,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam)
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOL nFieldStart = aDBRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( aParam.bGroupActive[i] )
{
@@ -1833,7 +1833,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam)
ScDBData aNewData( *pData );
aNewData.SetSubTotalParam(aParam);
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
@@ -1869,7 +1869,7 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException)
ScDBDocFunc aFunc(*pDocShell);
// Import zu wiederholen?
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
ScImportParam aImportParam;
pData->GetImportParam( aImportParam );
if (aImportParam.bImport && !pData->HasImportSelection())
@@ -1879,12 +1879,12 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException)
SCROW nDummyRow;
pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
uno::Reference< sdbc::XResultSet > xResultSet;
- bContinue = aFunc.DoImport( nTab, aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag als Parameter
+ bContinue = aFunc.DoImport( nTab, aImportParam, xResultSet, NULL, sal_True, false ); //! Api-Flag als Parameter
}
// interne Operationen (sort, query, subtotal) nur, wenn kein Fehler
if (bContinue)
- aFunc.RepeatDB( pData->GetName(), TRUE, TRUE );
+ aFunc.RepeatDB( pData->GetName(), sal_True, sal_True );
}
}
@@ -1907,8 +1907,8 @@ void SAL_CALL ScDatabaseRangeObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -1925,7 +1925,7 @@ void ScDatabaseRangeObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -1972,7 +1972,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
if ( pDocShell && pData )
{
ScDBData aNewData( *pData );
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
String aString(aPropertyName);
if ( aString.EqualsAscii( SC_UNONAME_KEEPFORM ) )
@@ -2044,12 +2044,12 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
{
}
else
- bDo = FALSE;
+ bDo = false;
if (bDo)
{
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
}
@@ -2180,7 +2180,7 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XDatabaseRanges
-ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(USHORT nIndex)
+ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
{
if (pDocShell)
{
@@ -2207,7 +2207,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName,
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDBDocFunc aFunc(*pDocShell);
@@ -2215,7 +2215,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName,
String aString(aName);
ScRange aNameRange( (SCCOL)aRange.StartColumn, (SCROW)aRange.StartRow, aRange.Sheet,
(SCCOL)aRange.EndColumn, (SCROW)aRange.EndRow, aRange.Sheet );
- bDone = aFunc.AddDBRange( aString, aNameRange, TRUE );
+ bDone = aFunc.AddDBRange( aString, aNameRange, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2225,12 +2225,12 @@ void SAL_CALL ScDatabaseRangesObj::removeByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDBDocFunc aFunc(*pDocShell);
String aString(aName);
- bDone = aFunc.DeleteDBRange( aString, TRUE );
+ bDone = aFunc.DeleteDBRange( aString, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2267,7 +2267,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xRange.is())
return uno::makeAny(xRange);
else
@@ -2313,11 +2313,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDatabaseRangesObj::getElementNames()
ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection();
if (pNames)
{
- USHORT nCount = pNames->GetCount();
+ sal_uInt16 nCount = pNames->GetCount();
String aName;
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
pAry[i] = (*pNames)[i]->GetName();
return aSeq;
@@ -2339,12 +2339,12 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const rtl::OUString& aName )
if (pNames)
{
String aString(aName);
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pNames->SearchName( aString, nPos ))
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 68ad542e3ec0..71193ff7f2fe 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -303,7 +303,7 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const rtl::OUS
beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE;
- USHORT nWID = pEntry->nWID;
+ sal_uInt16 nWID = pEntry->nWID;
if ( nWID == ATTR_FONT || nWID == ATTR_CJK_FONT || nWID == ATTR_CTL_FONT || !nWID )
{
// static default for font is system-dependent,
@@ -378,7 +378,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const rtl::OUString& aPr
if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
- const SfxPoolItem* pItem = pPool->GetItem( pEntry->nWID, SFX_ITEMS_STATICDEFAULT );
+ const SfxPoolItem* pItem = pPool->GetItem2( pEntry->nWID, SFX_ITEMS_DEFAULT );
if (pItem)
pItem->QueryValue( aRet, pEntry->nMemberId );
}
diff --git a/sc/source/ui/unoobj/detreg.cxx b/sc/source/ui/unoobj/detreg.cxx
index da87ca9e3644..388a652e32eb 100644
--- a/sc/source/ui/unoobj/detreg.cxx
+++ b/sc/source/ui/unoobj/detreg.cxx
@@ -50,27 +50,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */ ,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey(xKey->createKey( aDelimiter + ScFilterDetect::impl_getStaticImplementationName() +
- aUnoServices ));
-
- Sequence< OUString > aServices(ScFilterDetect::impl_getStaticSupportedServiceNames());
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /* pRegistryKey */ )
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 3420281600aa..12699b5f0e08 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -216,7 +216,7 @@ void SAL_CALL ScDispatchProviderInterceptor::disposing( const lang::EventObject&
ScDispatch::ScDispatch(ScTabViewShell* pViewSh) :
pViewShell( pViewSh ),
- bListeningToView( FALSE )
+ bListeningToView( false )
{
if (pViewShell)
StartListening(*pViewShell);
@@ -250,7 +250,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL,
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pViewShell && !aURL.Complete.compareToAscii(cURLInsertColumns) )
{
ScViewData* pViewData = pViewShell->GetViewData();
@@ -322,7 +322,7 @@ void SAL_CALL ScDispatch::addStatusListener(
bListeningToView = sal_True;
}
- ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD);
+ ScDBData* pDBData = pViewShell->GetDBData(false,SC_DB_OLD);
if ( pDBData )
pDBData->GetImportParam( aLastImport );
lcl_FillDataSource( aEvent, aLastImport ); // modifies State, IsEnabled
@@ -341,8 +341,8 @@ void SAL_CALL ScDispatch::removeStatusListener(
if ( !aURL.Complete.compareToAscii(cURLDocDataSource) )
{
- USHORT nCount = aDataSourceListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aDataSourceListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<frame::XStatusListener> *pObj = aDataSourceListeners[n];
if ( *pObj == xListener )
@@ -357,7 +357,7 @@ void SAL_CALL ScDispatch::removeStatusListener(
uno::Reference<view::XSelectionSupplier> xSupplier(lcl_GetSelectionSupplier( pViewShell ));
if ( xSupplier.is() )
xSupplier->removeSelectionChangeListener(this);
- bListeningToView = sal_False;
+ bListeningToView = false;
}
}
}
@@ -372,7 +372,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO
if ( pViewShell )
{
ScImportParam aNewImport;
- ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD);
+ ScDBData* pDBData = pViewShell->GetDBData(false,SC_DB_OLD);
if ( pDBData )
pDBData->GetImportParam( aNewImport );
@@ -389,7 +389,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO
lcl_FillDataSource( aEvent, aNewImport ); // modifies State, IsEnabled
- for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ )
(*aDataSourceListeners[n])->statusChanged( aEvent );
aLastImport = aNewImport;
@@ -404,11 +404,11 @@ void SAL_CALL ScDispatch::disposing( const ::com::sun::star::lang::EventObject&
{
uno::Reference<view::XSelectionSupplier> xSupplier(rSource.Source, uno::UNO_QUERY);
xSupplier->removeSelectionChangeListener(this);
- bListeningToView = sal_False;
+ bListeningToView = false;
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ )
(*aDataSourceListeners[n])->disposing( aEvent );
pViewShell = NULL;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 98e52213ac3b..e84f6756757e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -227,15 +227,15 @@ ScPrintUIOptions::ScPrintUIOptions()
sal_Bool bSuppress = rPrintOpt.GetSkipEmpty();
ResStringArray aStrings( ScResId( SCSTR_PRINT_OPTIONS ) );
- DBG_ASSERT( aStrings.Count() >= 19, "resource incomplete" );
- if( aStrings.Count() < 19 ) // bad resource ?
+ DBG_ASSERT( aStrings.Count() >= 10, "resource incomplete" );
+ if( aStrings.Count() < 10 ) // bad resource ?
return;
m_aUIProperties.realloc( 8 );
// create Section for spreadsheet (results in an extra tab page in dialog)
SvtModuleOptions aOpt;
- String aAppGroupname( aStrings.GetString( 18 ) );
+ String aAppGroupname( aStrings.GetString( 9 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SCALC ) );
m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
@@ -245,35 +245,35 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a bool option for empty pages
m_aUIProperties[2].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 1 ) ),
- rtl::OUString( aStrings.GetString( 2 ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsIncludeEmptyPages:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsIncludeEmptyPages" ) ),
! bSuppress
);
// create Subgroup for print content
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
- m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
+ m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 2 ) ),
rtl::OUString(),
aPrintRangeOpt
);
// create a choice for the content to create
- uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpTexts( 3 );
- aChoices[0] = aStrings.GetString( 7 );
- aHelpTexts[0] = aStrings.GetString( 8 );
- aChoices[1] = aStrings.GetString( 9 );
- aHelpTexts[1] = aStrings.GetString( 10 );
- aChoices[2] = aStrings.GetString( 11 );
- aHelpTexts[2] = aStrings.GetString( 12 );
+ uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpIds( 3 );
+ aChoices[0] = aStrings.GetString( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aChoices[1] = aStrings.GetString( 4 );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
+ aChoices[2] = aStrings.GetString( 5 );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) );
m_aUIProperties[4].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ),
aChoices,
nContent );
// create Subgroup for print range
aPrintRangeOpt.mbInternalOnly = sal_True;
- m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 13 ) ),
+ m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
rtl::OUString(),
aPrintRangeOpt
);
@@ -281,13 +281,13 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a choice for the range to print
rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
aChoices.realloc( 2 );
- aHelpTexts.realloc( 2 );
- aChoices[0] = aStrings.GetString( 14 );
- aHelpTexts[0] = aStrings.GetString( 15 );
- aChoices[1] = aStrings.GetString( 16 );
- aHelpTexts[1] = aStrings.GetString( 17 );
+ aHelpIds.realloc( 2 );
+ aChoices[0] = aStrings.GetString( 7 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0" ) );
+ aChoices[1] = aStrings.GetString( 8 );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1" ) );
m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
aPrintRangeName,
aChoices,
0 );
@@ -295,7 +295,7 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
m_aUIProperties[7].Value = getEditControlOpt( rtl::OUString(),
- rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
rtl::OUString(),
aPageRangeOpt
@@ -437,6 +437,12 @@ ScSheetSaveData* ScModelObj::GetSheetSaveData()
return NULL;
}
+void ScModelObj::RepaintRange( const ScRange& rRange )
+{
+ if (pDocShell)
+ pDocShell->PostPaint( rRange, PAINT_GRID );
+}
+
uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException)
{
@@ -555,7 +561,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // has become invalid
@@ -578,13 +584,26 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DELETEZ( pPrintFuncCache );
// handle "OnCalculate" sheet events (search also for VBA event handlers)
- if ( pDocShell && pDocShell->GetDocument()->HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, true ) )
- HandleCalculateEvents();
+ if ( pDocShell )
+ {
+ ScDocument* pDoc = pDocShell->GetDocument();
+ if ( pDoc->GetVbaEventProcessor().is() )
+ {
+ // If the VBA event processor is set, HasAnyCalcNotification is much faster than HasAnySheetEventScript
+ if ( pDoc->HasAnyCalcNotification() && pDoc->HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, true ) )
+ HandleCalculateEvents();
+ }
+ else
+ {
+ if ( pDoc->HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE ) )
+ HandleCalculateEvents();
+ }
+ }
}
}
else if ( rHint.ISA( ScPointerChangedHint ) )
{
- USHORT nFlags = ((const ScPointerChangedHint&)rHint).GetFlags();
+ sal_uInt16 nFlags = ((const ScPointerChangedHint&)rHint).GetFlags();
if (nFlags & SC_POINTERCHANGED_NUMFMT)
{
// NumberFormatter-Pointer am Uno-Objekt neu setzen
@@ -735,7 +754,7 @@ bool lcl_ParseTarget( const String& rTarget, ScRange& rTargetRange, Rectangle& r
return bRangeValid;
}
-BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
+sal_Bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
const uno::Sequence< beans::PropertyValue >& rOptions,
ScMarkData& rMark,
ScPrintSelectionStatus& rStatus, String& rPagesStr ) const
@@ -743,12 +762,12 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
DBG_ASSERT( !rMark.IsMarked() && !rMark.IsMultiMarked(), "FillRenderMarkData: MarkData must be empty" );
DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" );
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
uno::Reference<frame::XController> xView;
// defaults when no options are passed: all sheets, include empty pages
- sal_Bool bSelectedSheetsOnly = sal_False;
+ sal_Bool bSelectedSheetsOnly = false;
sal_Bool bIncludeEmptyPages = sal_True;
bool bHasPrintContent = false;
@@ -796,11 +815,11 @@ 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 bCursor = pSelObj->IsCursorOnly();
+ sal_Bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL );
+ sal_Bool bCursor = pSelObj->IsCursorOnly();
const ScRangeList& rRanges = pSelObj->GetRangeList();
- rMark.MarkFromRangeList( rRanges, FALSE );
+ rMark.MarkFromRangeList( rRanges, false );
rMark.MarkToSimple();
if ( rMark.IsMultiMarked() )
@@ -826,7 +845,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
rStatus.SetMode( SC_PRINTSEL_RANGE );
rStatus.SetRanges( rRanges );
- bDone = TRUE;
+ bDone = sal_True;
}
// multi selection isn't supported
}
@@ -855,7 +874,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
if( rMark.IsMarked() && !rMark.IsMultiMarked() )
{
rStatus.SetMode( SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -869,9 +888,9 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
- rMark.SelectTable( nTab, TRUE );
+ rMark.SelectTable( nTab, sal_True );
rStatus.SetMode( SC_PRINTSEL_DOCUMENT );
- bDone = TRUE;
+ bDone = sal_True;
}
// other selection types aren't supported
}
@@ -889,7 +908,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
if (!rViewMark.GetTableSelect(nTab))
- rMark.SelectTable( nTab, FALSE );
+ rMark.SelectTable( nTab, false );
}
}
}
@@ -1024,7 +1043,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
}
ScPrintFunc aFunc( pDocShell, pDocShell->GetPrinter(), nTab,
pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() );
- aFunc.SetRenderFlag( TRUE );
+ aFunc.SetRenderFlag( sal_True );
Range aPageRange( nRenderer+1, nRenderer+1 );
MultiSelection aPage( aPageRange );
@@ -1034,10 +1053,10 @@ 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, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, NULL );
ScRange aCellRange;
- BOOL bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
+ sal_Bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
Size aTwips = aFunc.GetPageSize();
awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM( aTwips.Height() ) );
@@ -1109,7 +1128,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
{
pDrawView = new FmFormView( pModel, pDev );
pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetPrintPreview( sal_True );
}
ScRange aRange;
@@ -1125,7 +1144,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
ScPrintFunc aFunc( pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() );
aFunc.SetDrawView( pDrawView );
- aFunc.SetRenderFlag( TRUE );
+ aFunc.SetRenderFlag( sal_True );
if( aStatus.GetMode() == SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS )
aFunc.SetExclusivelyDrawOleAndDrawObjects();
@@ -1163,7 +1182,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
}
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, TRUE, NULL, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_True, NULL, NULL );
// resolve the hyperlinks for PDF export
@@ -1258,6 +1277,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
rBookmarks.clear();
}
+ if ( pDrawView )
+ pDrawView->HideSdrPage();
delete pDrawView;
}
@@ -1276,7 +1297,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno
sal_Bool SAL_CALL ScModelObj::isActionLocked() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bLocked = FALSE;
+ sal_Bool bLocked = false;
if (pDocShell)
bLocked = ( pDocShell->GetLockCount() != 0 );
return bLocked;
@@ -1306,7 +1327,7 @@ void SAL_CALL ScModelObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeEx
sal_Int16 SAL_CALL ScModelObj::resetActionLocks() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if (pDocShell)
{
nRet = pDocShell->GetLockCount();
@@ -1340,7 +1361,7 @@ void SAL_CALL ScModelObj::calculate() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
if (pDocShell)
- pDocShell->DoRecalc(TRUE);
+ pDocShell->DoRecalc(sal_True);
else
{
OSL_FAIL("keine DocShell"); //! Exception oder so?
@@ -1351,7 +1372,7 @@ void SAL_CALL ScModelObj::calculateAll() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
if (pDocShell)
- pDocShell->DoHardRecalc(TRUE);
+ pDocShell->DoHardRecalc(sal_True);
else
{
OSL_FAIL("keine DocShell"); //! Exception oder so?
@@ -1365,7 +1386,7 @@ sal_Bool SAL_CALL ScModelObj::isAutomaticCalculationEnabled() throw(uno::Runtime
return pDocShell->GetDocument()->GetAutoCalc();
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return FALSE;
+ return false;
}
void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabled )
@@ -1398,7 +1419,7 @@ void SAL_CALL ScModelObj::protect( const rtl::OUString& aPassword ) throw(uno::R
String aString(aPassword);
ScDocFunc aFunc(*pDocShell);
- aFunc.Protect( TABLEID_DOC, aString, TRUE );
+ aFunc.Protect( TABLEID_DOC, aString, sal_True );
}
}
@@ -1411,7 +1432,7 @@ void SAL_CALL ScModelObj::unprotect( const rtl::OUString& aPassword )
String aString(aPassword);
ScDocFunc aFunc(*pDocShell);
- BOOL bDone = aFunc.Unprotect( TABLEID_DOC, aString, TRUE );
+ sal_Bool bDone = aFunc.Unprotect( TABLEID_DOC, aString, sal_True );
if (!bDone)
throw lang::IllegalArgumentException();
}
@@ -1424,7 +1445,7 @@ sal_Bool SAL_CALL ScModelObj::isProtected() throw(uno::RuntimeException)
return pDocShell->GetDocument()->IsDocProtected();
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return FALSE;
+ return false;
}
// XDrawPagesSupplier
@@ -1456,7 +1477,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
String aGoalString(aGoalValue);
ScDocument* pDoc = pDocShell->GetDocument();
double fValue = 0.0;
- BOOL bFound = pDoc->Solver(
+ sal_Bool bFound = pDoc->Solver(
(SCCOL)aFormulaPosition.Column, (SCROW)aFormulaPosition.Row, aFormulaPosition.Sheet,
(SCCOL)aVariablePosition.Column, (SCROW)aVariablePosition.Row, aVariablePosition.Sheet,
aGoalString, fValue );
@@ -1505,7 +1526,7 @@ void SAL_CALL ScModelObj::consolidate(
if (pDocShell)
{
const ScConsolidateParam& rParam = aImpl.GetParam();
- pDocShell->DoConsolidate( rParam, TRUE );
+ pDocShell->DoConsolidate( rParam, sal_True );
pDocShell->GetDocument()->SetConsolidateDlgData( &rParam );
}
}
@@ -1581,7 +1602,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
const ScDocOptions& rOldOpt = pDoc->GetDocOptions();
ScDocOptions aNewOpt = rOldOpt;
- BOOL bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue );
+ sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue );
if (bOpt)
{
// done...
@@ -1651,10 +1672,10 @@ void SAL_CALL ScModelObj::setPropertyValue(
}
else if ( aString.EqualsAscii( SC_UNO_ISUNDOENABLED ) )
{
- BOOL bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue );
pDoc->EnableUndo( bUndoEnabled );
- USHORT nCount = ( bUndoEnabled ?
- static_cast< USHORT >( SvtUndoOptions().GetUndoCount() ) : 0 );
+ sal_uInt16 nCount = ( bUndoEnabled ?
+ static_cast< sal_uInt16 >( SvtUndoOptions().GetUndoCount() ) : 0 );
pDocShell->GetUndoManager()->SetMaxUndoActionCount( nCount );
}
else if ( aString.EqualsAscii( SC_UNO_ISADJUSTHEIGHTENABLED ) )
@@ -1695,7 +1716,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
// Recalculation after loading is handled separately.
//! Recalc only for options that need it?
if ( !pDoc->IsImportingXML() )
- pDocShell->DoHardRecalc( TRUE );
+ pDocShell->DoHardRecalc( sal_True );
pDocShell->SetDocumentModified();
}
}
@@ -1761,11 +1782,11 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
}
else if ( aString.EqualsAscii( SC_UNO_COLLABELRNG ) )
{
- aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, TRUE ));
+ aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, sal_True ));
}
else if ( aString.EqualsAscii( SC_UNO_ROWLABELRNG ) )
{
- aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, FALSE ));
+ aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, false ));
}
else if ( aString.EqualsAscii( SC_UNO_AREALINKS ) )
{
@@ -1794,7 +1815,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
// default for no model is FALSE
ScDrawLayer* pModel = pDoc->GetDrawLayer();
- sal_Bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : sal_False;
+ sal_Bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : false;
ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoControlFocus );
}
else if ( aString.EqualsAscii( SC_UNO_FORBIDDEN ) )
@@ -1883,7 +1904,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
SolarMutexGuard aGuard;
uno::Reference<uno::XInterface> xRet;
String aNameStr(aServiceSpecifier);
- USHORT nType = ScServiceProvider::GetProviderType(aNameStr);
+ sal_uInt16 nType = ScServiceProvider::GetProviderType(aNameStr);
if ( nType != SC_SERVICE_INVALID )
{
// drawing layer tables must be kept as long as the model is alive
@@ -1897,6 +1918,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
case SC_SERVICE_MARKERTAB: xRet.set(xDrawMarkerTab); break;
case SC_SERVICE_DASHTAB: xRet.set(xDrawDashTab); break;
case SC_SERVICE_CHDATAPROV: xRet.set(xChartDataProv); break;
+ case SC_SERVICE_VBAOBJECTPROVIDER: xRet.set(xObjProvider); break;
}
// #i64497# If a chart is in a temporary document during clipoard paste,
@@ -1922,6 +1944,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
case SC_SERVICE_MARKERTAB: xDrawMarkerTab.set(xRet); break;
case SC_SERVICE_DASHTAB: xDrawDashTab.set(xRet); break;
case SC_SERVICE_CHDATAPROV: xChartDataProv.set(xRet); break;
+ case SC_SERVICE_VBAOBJECTPROVIDER: xObjProvider.set(xRet); break;
}
}
}
@@ -2156,7 +2179,7 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange
if ( rOperation.compareToAscii("cell-change") == 0 && pDocShell )
{
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
@@ -2274,7 +2297,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
-uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 nIndex) const
+uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
{
if (pDocShell)
{
@@ -2282,7 +2305,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 n
DBG_ASSERT(pDrawLayer,"kann Draw-Layer nicht anlegen");
if ( pDrawLayer && nIndex >= 0 && nIndex < pDocShell->GetDocument()->GetTableCount() )
{
- SdrPage* pPage = pDrawLayer->GetPage((USHORT)nIndex);
+ SdrPage* pPage = pDrawLayer->GetPage((sal_uInt16)nIndex);
DBG_ASSERT(pPage,"Draw-Page nicht gefunden");
if (pPage)
{
@@ -2305,7 +2328,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sa
String aNewName;
pDocShell->GetDocument()->CreateValidTabName(aNewName);
ScDocFunc aFunc(*pDocShell);
- if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, TRUE, TRUE ) )
+ if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, sal_True, sal_True ) )
xRet.set(GetObjectByIndex_Impl( nPos ));
}
return xRet;
@@ -2323,7 +2346,7 @@ void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>&
{
SCTAB nPageNum = static_cast<SCTAB>(pPage->GetPageNum());
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteTable( nPageNum, TRUE, TRUE );
+ aFunc.DeleteTable( nPageNum, sal_True, sal_True );
}
}
}
@@ -2413,12 +2436,12 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const rtl::OUString& aName, sal
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
String aNamStr(aName);
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE );
+ bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2428,13 +2451,13 @@ void SAL_CALL ScTableSheetsObj::moveByName( const rtl::OUString& aName, sal_Int1
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
String aNamStr(aName);
SCTAB nSource;
if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) )
- bDone = pDocShell->MoveTable( nSource, nDestination, FALSE, TRUE );
+ bDone = pDocShell->MoveTable( nSource, nDestination, false, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2445,7 +2468,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
String aNamStr(aName);
@@ -2453,7 +2476,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
SCTAB nSource;
if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) )
{
- bDone = pDocShell->MoveTable( nSource, nDestination, TRUE, TRUE );
+ bDone = pDocShell->MoveTable( nSource, nDestination, sal_True, sal_True );
if (bDone)
{
// #i92477# any index past the last sheet means "append" in MoveTable
@@ -2463,7 +2486,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
nResultTab = nTabCount - 1;
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.RenameTable( nResultTab, aNewStr, TRUE, TRUE );
+ bDone = aFunc.RenameTable( nResultTab, aNewStr, sal_True, sal_True );
}
}
}
@@ -2476,8 +2499,8 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
- BOOL bIllArg = FALSE;
+ sal_Bool bDone = false;
+ sal_Bool bIllArg = false;
//! Type of aElement can be some specific interface instead of XInterface
@@ -2501,17 +2524,17 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const
{
SCTAB nPosition = pDoc->GetTableCount();
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE );
+ bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True );
if (bDone)
pSheetObj->InitInsertSheet( pDocShell, nPosition );
// Dokument und neuen Range am Objekt setzen
}
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
if (!bDone)
@@ -2528,8 +2551,8 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
- BOOL bIllArg = FALSE;
+ sal_Bool bDone = false;
+ sal_Bool bIllArg = false;
//! Type of aElement can be some specific interface instead of XInterface
@@ -2546,10 +2569,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const
if ( pDocShell->GetDocument()->GetTable( aNamStr, nPosition ) )
{
ScDocFunc aFunc(*pDocShell);
- if ( aFunc.DeleteTable( nPosition, TRUE, TRUE ) )
+ if ( aFunc.DeleteTable( nPosition, sal_True, sal_True ) )
{
// InsertTable kann jetzt eigentlich nicht schiefgehen...
- bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE );
+ bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True );
if (bDone)
pSheetObj->InitInsertSheet( pDocShell, nPosition );
}
@@ -2561,10 +2584,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const
}
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
if (!bDone)
@@ -2581,7 +2604,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
SCTAB nIndex;
@@ -2589,7 +2612,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName )
if ( pDocShell->GetDocument()->GetTable( aString, nIndex ) )
{
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.DeleteTable( nIndex, TRUE, TRUE );
+ bDone = aFunc.DeleteTable( nIndex, sal_True, sal_True );
}
else
{
@@ -2608,7 +2631,7 @@ uno::Reference< table::XCell > SAL_CALL ScTableSheetsObj::getCellByPosition( sal
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet)));
+ uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet)));
if (! xSheet.is())
throw lang::IndexOutOfBoundsException();
@@ -2619,7 +2642,7 @@ uno::Reference< table::XCellRange > SAL_CALL ScTableSheetsObj::getCellRangeByPos
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet)));
+ uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet)));
if (! xSheet.is())
throw lang::IndexOutOfBoundsException();
@@ -2742,9 +2765,9 @@ sal_Bool SAL_CALL ScTableSheetsObj::hasByName( const rtl::OUString& aName )
{
SCTAB nIndex;
if ( pDocShell->GetDocument()->GetTable( String(aName), nIndex ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -2803,14 +2826,14 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartCol+nPosition <= nEndCol &&
nStartCol+nPosition+nCount-1 <= MAXCOL )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab,
(SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab );
- bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, TRUE, TRUE );
+ bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2820,14 +2843,14 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
// Der zu loeschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartCol+nIndex+nCount-1 <= nEndCol )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab,
(SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab );
- bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, TRUE, TRUE );
+ bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2907,9 +2930,9 @@ sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const rtl::OUString& aName )
String aString(aName);
if ( ::AlphaToCol( nCol, aString) )
if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
- return TRUE;
+ return sal_True;
- return FALSE; // nicht gefunden
+ return false; // nicht gefunden
}
// XPropertySet
@@ -2943,33 +2966,33 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue(
{
sal_Int32 nNewWidth = 0;
if ( aValue >>= nNewWidth )
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)HMMToTwips(nNewWidth), TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)HMMToTwips(nNewWidth), sal_True, sal_True );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT with size 0: hide
}
else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) )
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab,
- SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE );
- // FALSE for columns currently has no effect
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab,
+ SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True );
+ // sal_False for columns currently has no effect
}
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE ) )
{
//! single function to set/remove all breaks?
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
if (bSet)
- aFunc.InsertPageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True );
}
}
@@ -2990,7 +3013,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro
if ( aNameString.EqualsAscii( SC_UNONAME_CELLWID ) )
{
// for hidden column, return original height
- USHORT nWidth = pDoc->GetOriginalWidth( nStartCol, nTab );
+ sal_uInt16 nWidth = pDoc->GetOriginalWidth( nStartCol, nTab );
aAny <<= (sal_Int32)TwipsToHMM(nWidth);
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
@@ -3000,7 +3023,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro
}
else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) )
{
- BOOL bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) )
@@ -3064,14 +3087,14 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartRow+nPosition <= nEndRow &&
nStartRow+nPosition+nCount-1 <= MAXROW )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab,
MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab );
- bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, TRUE, TRUE );
+ bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3081,14 +3104,14 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
// Der zu loeschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartRow+nIndex+nCount-1 <= nEndRow )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab,
MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab );
- bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, TRUE, TRUE );
+ bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3172,13 +3195,13 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
// TODO: It's probably cleaner to use a different property name
// for this.
- pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (USHORT)HMMToTwips(nNewHeight) );
+ pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (sal_uInt16)HMMToTwips(nNewHeight) );
}
else
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True );
else
{
//! manually set old heights again?
@@ -3189,14 +3212,14 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
{
sal_Int32 nNewHeight = 0;
if ( aValue >>= nNewHeight )
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)HMMToTwips(nNewHeight), TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)HMMToTwips(nNewHeight), sal_True, sal_True );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT with size 0: hide
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLFILT ) )
@@ -3210,12 +3233,12 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE) )
{
//! single function to set/remove all breaks?
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
if (bSet)
- aFunc.InsertPageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( false, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( false, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLBACK ) || aNameString.EqualsAscii( SC_UNONAME_CELLTRAN ) )
{
@@ -3248,7 +3271,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper
if ( aNameString.EqualsAscii( SC_UNONAME_CELLHGT ) )
{
// for hidden row, return original height
- USHORT nHeight = pDoc->GetOriginalHeight( nStartRow, nTab );
+ sal_uInt16 nHeight = pDoc->GetOriginalHeight( nStartRow, nTab );
aAny <<= (sal_Int32)TwipsToHMM(nHeight);
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
@@ -3264,7 +3287,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper
}
else if ( aNameString.EqualsAscii( SC_UNONAME_OHEIGHT ) )
{
- BOOL bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) )
@@ -3412,7 +3435,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc( *pDocShell );
- aFunc.ReplaceNote( aPos, rText, 0, 0, TRUE );
+ aFunc.ReplaceNote( aPos, rText, 0, 0, sal_True );
}
}
@@ -3425,11 +3448,11 @@ void SAL_CALL ScAnnotationsObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Run
if ( GetAddressByIndex_Impl( nIndex, aPos ) )
{
ScMarkData aMarkData;
- aMarkData.SelectTable( aPos.Tab(), TRUE );
+ aMarkData.SelectTable( aPos.Tab(), sal_True );
aMarkData.SetMultiMarkArea( ScRange(aPos) );
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteContents( aMarkData, IDF_NOTE, TRUE, TRUE );
+ aFunc.DeleteContents( aMarkData, IDF_NOTE, sal_True, sal_True );
}
}
}
@@ -3450,7 +3473,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera
sal_Int32 SAL_CALL ScAnnotationsObj::getCount() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
if (pDocShell)
{
ScCellIterator aCellIter( pDocShell->GetDocument(), 0,0, nTab, MAXCOL,MAXROW, nTab );
@@ -3515,7 +3538,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XScenarios
-BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex )
+sal_Bool ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex )
{
//! Case-insensitiv ????
@@ -3531,16 +3554,16 @@ BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& r
if ( aTabName == aString )
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
ScTableSheetObj* ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
- USHORT nCount = (USHORT)getCount();
+ sal_uInt16 nCount = (sal_uInt16)getCount();
if ( pDocShell && nIndex >= 0 && nIndex < nCount )
return new ScTableSheetObj( pDocShell, nTab+static_cast<SCTAB>(nIndex)+1 );
@@ -3565,13 +3588,13 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
if ( pDocShell )
{
ScMarkData aMarkData;
- aMarkData.SelectTable( nTab, TRUE );
+ aMarkData.SelectTable( nTab, sal_True );
- USHORT nRangeCount = (USHORT)aRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = aRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
DBG_ASSERT( pAry[i].Sheet == nTab, "addScenario mit falscher Tab" );
ScRange aRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab,
@@ -3585,7 +3608,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
String aCommStr(aComment);
Color aColor( COL_LIGHTGRAY ); // Default
- USHORT nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT;
+ sal_uInt16 nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT;
pDocShell->MakeScenario( nTab, aNameStr, aCommStr, aColor, nFlags, aMarkData );
}
@@ -3599,7 +3622,7 @@ void SAL_CALL ScScenariosObj::removeByName( const rtl::OUString& aName )
if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteTable( nTab+nIndex+1, TRUE, TRUE );
+ aFunc.DeleteTable( nTab+nIndex+1, sal_True, sal_True );
}
}
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index f9cc38e1e747..c7e241b90f0e 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -56,7 +56,7 @@
TYPEINIT1( ScHeaderFooterChangedHint, SfxHint );
-ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(USHORT nP) :
+ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(sal_uInt16 nP) :
nPart( nP )
{
}
@@ -104,13 +104,13 @@ ScEditEngineDefaulter* ScSharedHeaderFooterEditSource::GetEditEngine()
// each ScHeaderFooterEditSource object has its own ScHeaderFooterTextData
ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj* pContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( *pContent, nP ) )
{
}
ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj& rContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( rContent, nP ) )
{
}
@@ -197,7 +197,7 @@ ScAnnotationEditSource::ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddre
aCellPos( rP ),
pEditEngine( NULL ),
pForwarder( NULL ),
- bDataValid( FALSE )
+ bDataValid( false )
{
if (pDocShell)
pDocShell->GetDocument()->AddUnoObject(*this);
@@ -238,7 +238,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScEditEngineDefaulter( pEnginePool, TRUE );
+ pEditEngine = new ScEditEngineDefaulter( pEnginePool, sal_True );
}
pForwarder = new SvxEditEngineForwarder(*pEditEngine);
}
@@ -251,7 +251,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder()
if ( const EditTextObject* pEditObj = pNote->GetEditTextObject() )
pEditEngine->SetText( *pEditObj ); // incl. Umbrueche
- bDataValid = TRUE;
+ bDataValid = sal_True;
return pForwarder;
}
@@ -287,7 +287,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // ungueltig geworden
@@ -296,7 +296,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint )
DELETEZ( pEditEngine ); // EditEngine uses document's pool
}
else if ( nId == SFX_HINT_DATACHANGED )
- bDataValid = FALSE; // Text muss neu geholt werden
+ bDataValid = false; // Text muss neu geholt werden
}
}
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index ee5a3c6d2aef..fa0f28f30bed 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -192,7 +192,7 @@ sal_Bool SAL_CALL ScSheetEventsObj::hasElements() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
if (mpDocShell)
return sal_True;
- return sal_False;
+ return false;
}
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 4c55d48fcff3..56af26ed5313 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -127,26 +127,26 @@ enum ScUnoCollectMode
class ScUnoEditEngine : public ScEditEngineDefaulter
{
ScUnoCollectMode eMode;
- USHORT nFieldCount;
+ sal_uInt16 nFieldCount;
TypeId aFieldType;
SvxFieldData* pFound; // lokale Kopie
- USHORT nFieldPar;
+ sal_uInt16 nFieldPar;
xub_StrLen nFieldPos;
- USHORT nFieldIndex;
+ sal_uInt16 nFieldIndex;
public:
ScUnoEditEngine(ScEditEngineDefaulter* pSource);
~ScUnoEditEngine();
//! nPos should be xub_StrLen
- virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+ virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos,
Color*& rTxtColor, Color*& rFldColor );
- USHORT CountFields(TypeId aType);
- SvxFieldData* FindByIndex(USHORT nIndex, TypeId aType);
- SvxFieldData* FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType);
+ sal_uInt16 CountFields(TypeId aType);
+ SvxFieldData* FindByIndex(sal_uInt16 nIndex, TypeId aType);
+ SvxFieldData* FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType);
- USHORT GetFieldPar() const { return nFieldPar; }
+ sal_uInt16 GetFieldPar() const { return nFieldPar; }
xub_StrLen GetFieldPos() const { return nFieldPos; }
};
@@ -171,7 +171,7 @@ ScUnoEditEngine::~ScUnoEditEngine()
}
String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor )
+ sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor )
{
String aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor ));
if (eMode != SC_UNO_COLLECT_NONE)
@@ -200,7 +200,7 @@ String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
return aRet;
}
-USHORT ScUnoEditEngine::CountFields(TypeId aType)
+sal_uInt16 ScUnoEditEngine::CountFields(TypeId aType)
{
eMode = SC_UNO_COLLECT_COUNT;
aFieldType = aType;
@@ -212,7 +212,7 @@ USHORT ScUnoEditEngine::CountFields(TypeId aType)
return nFieldCount;
}
-SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType)
+SvxFieldData* ScUnoEditEngine::FindByIndex(sal_uInt16 nIndex, TypeId aType)
{
eMode = SC_UNO_COLLECT_FINDINDEX;
nFieldIndex = nIndex;
@@ -225,7 +225,7 @@ SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType)
return pFound;
}
-SvxFieldData* ScUnoEditEngine::FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType)
+SvxFieldData* ScUnoEditEngine::FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType)
{
eMode = SC_UNO_COLLECT_FINDPOS;
nFieldPar = nPar;
@@ -290,15 +290,15 @@ void ScCellFieldsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XIndexAccess (via XTextFields)
-ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
+ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const
{
//! Feld-Funktionen muessen an den Forwarder !!!
ScEditEngineDefaulter* pEditEngine = ((ScCellEditSource*)pEditSource)->GetEditEngine();
ScUnoEditEngine aTempEngine(pEditEngine);
- if ( aTempEngine.FindByIndex( (USHORT)Index, NULL ) ) // in der Zelle ist der Typ egal
+ if ( aTempEngine.FindByIndex( (sal_uInt16)Index, NULL ) ) // in der Zelle ist der Typ egal
{
- USHORT nPar = aTempEngine.GetFieldPar();
+ sal_uInt16 nPar = aTempEngine.GetFieldPar();
xub_StrLen nPos = aTempEngine.GetFieldPos();
ESelection aSelection( nPar, nPos, nPar, nPos+1 ); // Feld ist 1 Zeichen
return new ScCellFieldObj( pDocShell, aCellPos, aSelection );
@@ -620,7 +620,7 @@ void SAL_CALL ScCellFieldObj::attach( const uno::Reference<text::XTextRange>& xT
uno::Reference<text::XText> xText(xTextRange->getText());
if (xText.is())
{
- xText->insertTextContent( xTextRange, this, TRUE );
+ xText->insertTextContent( xTextRange, this, sal_True );
}
}
}
@@ -686,7 +686,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue(
{
SvxURLField* pURL = (SvxURLField*)pField; // ist eine Kopie in der ScUnoEditEngine
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if ( aNameString.EqualsAscii( SC_UNONAME_URL ) )
{
if (aValue >>= aStrVal)
@@ -703,7 +703,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue(
pURL->SetTargetFrame( aStrVal );
}
else
- bOk = FALSE;
+ bOk = false;
if (bOk)
{
@@ -854,7 +854,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellFieldObj::getSupportedServiceNames()
//------------------------------------------------------------------------
-ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, USHORT nP, USHORT nT) :
+ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP, sal_uInt16 nT) :
pContentObj( pContent ),
nPart( nP ),
nType( nT ),
@@ -895,7 +895,7 @@ ScHeaderFieldsObj::~ScHeaderFieldsObj()
// XIndexAccess (via XTextFields)
-ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
+ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const
{
//! Feld-Funktionen muessen an den Forwarder !!!
ScEditEngineDefaulter* pEditEngine = ((ScHeaderFooterEditSource*)pEditSource)->GetEditEngine();
@@ -913,13 +913,13 @@ ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
case SC_SERVICE_SHEETFIELD: aTypeId = TYPE(SvxTableField); break;
// bei SC_SERVICE_INVALID bleibt TypeId Null
}
- SvxFieldData* pData = aTempEngine.FindByIndex( (USHORT)Index, aTypeId );
+ SvxFieldData* pData = aTempEngine.FindByIndex( (sal_uInt16)Index, aTypeId );
if ( pData )
{
- USHORT nPar = aTempEngine.GetFieldPar();
+ sal_uInt16 nPar = aTempEngine.GetFieldPar();
xub_StrLen nPos = aTempEngine.GetFieldPos();
- USHORT nFieldType = nType;
+ sal_uInt16 nFieldType = nType;
if ( nFieldType == SC_SERVICE_INVALID )
{
if ( pData->ISA( SvxPageField ) ) nFieldType = SC_SERVICE_PAGEFIELD;
@@ -1092,8 +1092,8 @@ sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue )
}
}
-ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, USHORT nP,
- USHORT nT, const ESelection& rSel) :
+ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP,
+ sal_uInt16 nT, const ESelection& rSel) :
OComponentHelper( getMutex() ),
pPropSet( (nT == SC_SERVICE_FILEFIELD) ? lcl_GetFileFieldPropertySet() : lcl_GetHeaderFieldPropertySet() ),
pContentObj( pContent ),
@@ -1175,7 +1175,7 @@ void SAL_CALL ScHeaderFieldObj::release() throw()
OComponentHelper::release();
}
-void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, USHORT nP,
+void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, sal_uInt16 nP,
const ESelection& rSel )
{
if ( pContent && !pEditSource )
@@ -1294,7 +1294,7 @@ void SAL_CALL ScHeaderFieldObj::attach( const uno::Reference<text::XTextRange>&
uno::Reference<text::XText> xText(xTextRange->getText());
if (xText.is())
{
- xText->insertTextContent( xTextRange, this, TRUE );
+ xText->insertTextContent( xTextRange, this, sal_True );
}
}
}
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 257489993850..9ca2f29ffccc 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -71,7 +71,7 @@ SC_SIMPLE_SERVICE_INFO( ScFilterOptionsObj, SCFILTEROPTIONSOBJ_IMPLNAME, SCFILTE
//------------------------------------------------------------------------
ScFilterOptionsObj::ScFilterOptionsObj() :
- bExport( sal_False )
+ bExport( false )
{
}
@@ -209,8 +209,8 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
else
{
sal_Bool bMultiByte = sal_True;
- sal_Bool bDBEnc = sal_False;
- sal_Bool bAscii = sal_False;
+ sal_Bool bDBEnc = false;
+ sal_Bool bAscii = false;
sal_Unicode cStrDel = '"';
sal_Unicode cAsciiDel = ';';
@@ -300,7 +300,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
void SAL_CALL ScFilterOptionsObj::setTargetDocument( const uno::Reference<lang::XComponent>& /* xDoc */ )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- bExport = sal_False;
+ bExport = false;
}
// XExporter
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index aa3f03cab80a..1fea8e338cca 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -184,7 +184,7 @@ ScCondFormatEntryItem::ScCondFormatEntryItem() :
//------------------------------------------------------------------------
ScTableConditionalFormat::ScTableConditionalFormat(
- ScDocument* pDoc, ULONG nKey, FormulaGrammar::Grammar eGrammar)
+ ScDocument* pDoc, sal_uLong nKey, FormulaGrammar::Grammar eGrammar)
{
// Eintrag aus dem Dokument lesen...
@@ -200,8 +200,8 @@ ScTableConditionalFormat::ScTableConditionalFormat(
if (pDoc->IsInExternalReferenceMarking())
pFormat->MarkUsedExternalReferences();
- USHORT nEntryCount = pFormat->Count();
- for (USHORT i=0; i<nEntryCount; i++)
+ sal_uInt16 nEntryCount = pFormat->Count();
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
{
ScCondFormatEntryItem aItem;
const ScCondFormatEntry* pFormatEntry = pFormat->GetEntry(i);
@@ -277,19 +277,14 @@ ScTableConditionalFormat::~ScTableConditionalFormat()
void ScTableConditionalFormat::AddEntry_Impl(const ScCondFormatEntryItem& aEntry)
{
- ScTableConditionalEntry* pNew = new ScTableConditionalEntry(this, aEntry);
+ ScTableConditionalEntry* pNew = new ScTableConditionalEntry(aEntry);
pNew->acquire();
aEntries.push_back(pNew);
}
-void ScTableConditionalFormat::DataChanged()
-{
- // wenn's mal das "lebende Objekt" ist, muss hier was passieren...
-}
-
// XSheetConditionalFormat
-ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(USHORT nIndex) const
+ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
{
return aEntries[nIndex];
}
@@ -388,7 +383,6 @@ void SAL_CALL ScTableConditionalFormat::addNew(
}
AddEntry_Impl(aEntry);
- DataChanged();
}
void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
@@ -439,7 +433,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xEntry.is())
return uno::makeAny(xEntry);
else
@@ -479,7 +473,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const rtl::OUString& aNam
for (long i=0; i<nCount; i++)
if ( aName == lcl_GetEntryNameFromIndex(i) )
{
- xEntry.set(GetObjectByIndex_Impl((USHORT)i));
+ xEntry.set(GetObjectByIndex_Impl((sal_uInt16)i));
break;
}
@@ -511,9 +505,9 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const rtl::OUString& aNam
long nCount = aEntries.size();
for (long i=0; i<nCount; i++)
if ( aName == lcl_GetEntryNameFromIndex(i) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
// XUnoTunnel
@@ -563,14 +557,11 @@ ScTableConditionalEntry::ScTableConditionalEntry(ScTableConditionalFormat* pPar,
pParent( pPar ),
aData( aItem )
{
- if (pParent)
- pParent->acquire();
+ // #i113668# only store the settings, keep no reference to parent object
}
ScTableConditionalEntry::~ScTableConditionalEntry()
{
- if (pParent)
- pParent->release();
}
void ScTableConditionalEntry::GetData(ScCondFormatEntryItem& rData) const
@@ -592,8 +583,6 @@ void SAL_CALL ScTableConditionalEntry::setOperator( sheet::ConditionOperator nOp
{
SolarMutexGuard aGuard;
aData.meMode = lcl_ConditionOperatorToMode( nOperator );
- if (pParent)
- pParent->DataChanged();
}
sal_Int32 SAL_CALL ScTableConditionalEntry::getConditionOperator()
@@ -623,8 +612,6 @@ void SAL_CALL ScTableConditionalEntry::setFormula1( const rtl::OUString& aFormul
{
SolarMutexGuard aGuard;
aData.maExpr1 = String( aFormula1 );
- if (pParent)
- pParent->DataChanged();
}
rtl::OUString SAL_CALL ScTableConditionalEntry::getFormula2() throw(uno::RuntimeException)
@@ -638,8 +625,6 @@ void SAL_CALL ScTableConditionalEntry::setFormula2( const rtl::OUString& aFormul
{
SolarMutexGuard aGuard;
aData.maExpr2 = String( aFormula2 );
- if (pParent)
- pParent->DataChanged();
}
table::CellAddress SAL_CALL ScTableConditionalEntry::getSourcePosition() throw(uno::RuntimeException)
@@ -657,8 +642,6 @@ void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddre
{
SolarMutexGuard aGuard;
aData.maPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
- if (pParent)
- pParent->DataChanged();
}
// XSheetConditionalEntry
@@ -674,36 +657,34 @@ void SAL_CALL ScTableConditionalEntry::setStyleName( const rtl::OUString& aStyle
{
SolarMutexGuard aGuard;
aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SFX_STYLE_FAMILY_PARA );
- if (pParent)
- pParent->DataChanged();
}
//------------------------------------------------------------------------
-ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey,
+ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
const formula::FormulaGrammar::Grammar eGrammar) :
aPropSet( lcl_GetValidatePropertyMap() )
{
// Eintrag aus dem Dokument lesen...
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( pDoc && nKey )
{
const ScValidationData* pData = pDoc->GetValidationEntry( nKey );
if (pData)
{
- nMode = sal::static_int_cast<USHORT>( pData->GetOperation() );
+ nMode = sal::static_int_cast<sal_uInt16>( pData->GetOperation() );
aSrcPos = pData->GetValidSrcPos(); // valid pos for expressions
aExpr1 = pData->GetExpression( aSrcPos, 0, 0, eGrammar );
aExpr2 = pData->GetExpression( aSrcPos, 1, 0, eGrammar );
meGrammar1 = meGrammar2 = eGrammar;
- nValMode = sal::static_int_cast<USHORT>( pData->GetDataMode() );
+ nValMode = sal::static_int_cast<sal_uInt16>( pData->GetDataMode() );
bIgnoreBlank = pData->IsIgnoreBlank();
nShowList = pData->GetListType();
bShowInput = pData->GetInput( aInputTitle, aInputMessage );
ScValidErrorStyle eStyle;
bShowError = pData->GetErrMsg( aErrorTitle, aErrorMessage, eStyle );
- nErrorStyle = sal::static_int_cast<USHORT>( eStyle );
+ nErrorStyle = sal::static_int_cast<sal_uInt16>( eStyle );
// During save to XML, sheet::ValidationType_ANY formulas are not
// saved, even if in the list, see
@@ -712,7 +693,7 @@ ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey,
if (nValMode != SC_VALID_ANY && pDoc->IsInExternalReferenceMarking())
pData->MarkUsedExternalReferences();
- bFound = TRUE;
+ bFound = sal_True;
}
}
if (!bFound)
@@ -767,10 +748,10 @@ void ScTableValidationObj::ClearData_Impl()
{
nMode = SC_COND_NONE;
nValMode = SC_VALID_ANY;
- bIgnoreBlank = TRUE;
+ bIgnoreBlank = sal_True;
nShowList = sheet::TableValidationVisibility::UNSORTED;
- bShowInput = FALSE;
- bShowError = FALSE;
+ bShowInput = false;
+ bShowError = false;
nErrorStyle = SC_VALERR_STOP;
aSrcPos.Set(0,0,0);
aExpr1.Erase();
@@ -788,11 +769,6 @@ ScTableValidationObj::~ScTableValidationObj()
{
}
-void ScTableValidationObj::DataChanged()
-{
- // wenn's mal das "lebende Objekt" ist, muss hier was passieren...
-}
-
// XSheetCondition
sheet::ConditionOperator SAL_CALL ScTableValidationObj::getOperator()
@@ -806,7 +782,7 @@ void SAL_CALL ScTableValidationObj::setOperator( sheet::ConditionOperator nOpera
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToMode( nOperator ) );
+ nMode = sal::static_int_cast<sal_uInt16>( lcl_ConditionOperatorToMode( nOperator ) );
DataChanged();
}
@@ -821,7 +797,7 @@ void SAL_CALL ScTableValidationObj::setConditionOperator( sal_Int32 nOperator )
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToModeNew( nOperator ) );
+ nMode = sal::static_int_cast<sal_uInt16>( lcl_ConditionOperatorToModeNew( nOperator ) );
DataChanged();
}
@@ -836,7 +812,6 @@ void SAL_CALL ScTableValidationObj::setFormula1( const rtl::OUString& aFormula1
{
SolarMutexGuard aGuard;
aExpr1 = String( aFormula1 );
- DataChanged();
}
rtl::OUString SAL_CALL ScTableValidationObj::getFormula2() throw(uno::RuntimeException)
@@ -850,7 +825,6 @@ void SAL_CALL ScTableValidationObj::setFormula2( const rtl::OUString& aFormula2
{
SolarMutexGuard aGuard;
aExpr2 = String( aFormula2 );
- DataChanged();
}
table::CellAddress SAL_CALL ScTableValidationObj::getSourcePosition() throw(uno::RuntimeException)
@@ -868,7 +842,6 @@ void SAL_CALL ScTableValidationObj::setSourcePosition( const table::CellAddress&
{
SolarMutexGuard aGuard;
aSrcPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
- DataChanged();
}
uno::Sequence<sheet::FormulaToken> SAL_CALL ScTableValidationObj::getTokens( sal_Int32 nIndex )
@@ -1027,8 +1000,6 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
if ( aValue >>= nVal )
meGrammar2 = static_cast< FormulaGrammar::Grammar >(nVal);
}
-
- DataChanged();
}
uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const rtl::OUString& aPropertyName )
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index f4b8633d0964..5ebe9942ab37 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -104,7 +104,7 @@ ScTempDocSource::ScTempDocSource( ScTempDocCache& rDocCache ) :
pTempDoc = CreateDocument();
else
{
- rCache.SetInUse( TRUE );
+ rCache.SetInUse( sal_True );
if ( !rCache.GetDocument() )
rCache.SetDocument( CreateDocument() );
}
@@ -115,7 +115,7 @@ ScTempDocSource::~ScTempDocSource()
if ( pTempDoc )
delete pTempDoc;
else
- rCache.SetInUse( FALSE );
+ rCache.SetInUse( false );
}
ScDocument* ScTempDocSource::GetDocument()
@@ -130,7 +130,7 @@ ScDocument* ScTempDocSource::GetDocument()
ScTempDocCache::ScTempDocCache() :
pDoc( NULL ),
- bInUse( FALSE )
+ bInUse( false )
{
}
@@ -159,7 +159,7 @@ void ScTempDocCache::Clear()
//! merge this with ScAreaLink::Refresh
//! copy directly without a clipboard document?
-BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
+sal_Bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScDocument* pDestDoc, const ScAddress& rDestPos )
{
SCTAB nSrcTab = rSrcRange.aStart.Tab();
@@ -199,7 +199,7 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
if ( nErrCode == 0 && pFCell->IsValue() )
{
sal_uInt32 nNewFormat = pFCell->GetStandardFormat( *pClipDoc->GetFormatTable(), nFormat );
@@ -215,10 +215,10 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewRange );
- pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, FALSE );
+ pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, false );
delete pClipDoc;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -328,7 +328,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
// options aren't initialized from configuration - always get the same default behaviour
- BOOL bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue );
+ sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue );
if (!bDone)
throw beans::UnknownPropertyException();
}
@@ -355,7 +355,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFunctionAccess )
// XFunctionAccess
-BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler )
+sal_Bool lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler )
{
// function names are always case-insensitive
String aUpper( ScGlobal::pCharClass->upper( rName ) );
@@ -367,28 +367,28 @@ BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,cons
if ( eOp != ocNone )
{
rArray.AddOpCode( eOp );
- return TRUE;
+ return sal_True;
}
// 2. old add in functions
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
{
rArray.AddExternal( aUpper.GetBuffer() );
- return TRUE;
+ return sal_True;
}
// 3. new (uno) add in functions
- String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
+ String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, false ));
if (aIntName.Len())
{
rArray.AddExternal( aIntName.GetBuffer() ); // international name
- return TRUE;
+ return sal_True;
}
- return FALSE; // no valid function name
+ return false; // no valid function name
}
void lcl_AddRef( ScTokenArray& rArray, long nStartRow, long nColCount, long nRowCount )
@@ -520,7 +520,7 @@ class ArrayOfArrayProc
{
public:
static void processSequences( ScDocument* pDoc, const uno::Any& rArg, ScTokenArray& rTokenArr,
- long& rDocRow, BOOL& rArgErr, BOOL& rOverflow )
+ long& rDocRow, sal_Bool& rArgErr, sal_Bool& rOverflow )
{
SequencesContainer< T > aContainer( rArg, rTokenArr, rDocRow, pDoc );
aContainer.process();
@@ -576,8 +576,8 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
// add arguments to token array
//
- BOOL bArgErr = FALSE;
- BOOL bOverflow = FALSE;
+ sal_Bool bArgErr = false;
+ sal_Bool bOverflow = false;
long nDocRow = 0;
long nArgCount = aArguments.getLength();
const uno::Any* pArgArr = aArguments.getConstArray();
@@ -653,12 +653,12 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
long nRowCount = aSrcRange.aEnd.Row() - aSrcRange.aStart.Row() + 1;
if ( nStartRow + nRowCount > MAXROWCOUNT )
- bOverflow = TRUE;
+ bOverflow = sal_True;
else
{
// copy data
if ( !lcl_CopyData( pSrcDoc, aSrcRange, pDoc, ScAddress( 0, (SCROW)nDocRow, 0 ) ) )
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
nDocRow += nRowCount;
@@ -666,13 +666,13 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
lcl_AddRef( aTokenArr, nStartRow, nColCount, nRowCount );
}
else
- bArgErr = TRUE;
+ bArgErr = sal_True;
}
else
- bArgErr = TRUE;
+ bArgErr = sal_True;
}
else
- bArgErr = TRUE; // invalid type
+ bArgErr = sal_True; // invalid type
}
aTokenArr.AddOpCode(ocClose);
aTokenArr.AddOpCode(ocStop);
@@ -688,14 +688,14 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
// GRAM_PODF_A1 doesn't really matter for the token array but fits with
// other API compatibility grammars.
ScFormulaCell* pFormula = new ScFormulaCell( pDoc, aFormulaPos,
- &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (BYTE)(mbArray ? MM_FORMULA : MM_NONE) );
+ &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (sal_uInt8)(mbArray ? MM_FORMULA : MM_NONE) );
pDoc->PutCell( aFormulaPos, pFormula ); //! necessary?
// call GetMatrix before GetErrCode because GetMatrix always recalculates
// if there is no matrix result
const ScMatrix* pMat = mbArray ? pFormula->GetMatrix() : 0;
- USHORT nErrCode = pFormula->GetErrCode();
+ sal_uInt16 nErrCode = pFormula->GetErrCode();
if ( nErrCode == 0 )
{
if ( pMat )
@@ -723,7 +723,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
else
{
// any other error: IllegalArgumentException
- bArgErr = TRUE;
+ bArgErr = sal_True;
}
pDoc->DeleteAreaTab( 0, 0, MAXCOL, MAXROW, 0, IDF_ALL );
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index a7385c5b72c0..430252b688ae 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -130,8 +130,8 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const
if (pDocShell)
{
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager();
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScTableLink))
@@ -188,8 +188,8 @@ void SAL_CALL ScSheetLinkObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -206,7 +206,7 @@ void ScSheetLinkObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -214,7 +214,7 @@ void ScSheetLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh )
{
ScTableLink* pLink = GetLink_Impl();
if( pLink )
- pLink->SetRefreshDelay( (ULONG) nRefresh );
+ pLink->SetRefreshDelay( (sal_uLong) nRefresh );
}
// XPropertySet
@@ -418,11 +418,11 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XSheetLinks
-ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(INT32 nIndex)
+ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if (pDocShell)
{
- INT32 nCount = 0;
+ sal_Int32 nCount = 0;
ScStrCollection aNames; // um doppelte wegzulassen
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
@@ -556,10 +556,10 @@ sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const rtl::OUString& aName )
//! case-insensitiv ???
String aLinkDoc(pDoc->GetLinkDoc( nTab ));
if ( aLinkDoc == aNameStr )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(uno::RuntimeException)
@@ -574,10 +574,10 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u
SCTAB nTabCount = pDoc->GetTableCount();
String aName;
- INT32 nLinkCount = getCount();
+ sal_Int32 nLinkCount = getCount();
uno::Sequence<rtl::OUString> aSeq(nLinkCount);
rtl::OUString* pAry = aSeq.getArray();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
if (pDoc->IsLinked(nTab))
@@ -598,14 +598,14 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u
//------------------------------------------------------------------------
-ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos )
+ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, sal_uInt16 nPos )
{
if (pDocShell)
{
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager();
- USHORT nTotalCount = pLinkManager->GetLinks().Count();
- USHORT nAreaCount = 0;
- for (USHORT i=0; i<nTotalCount; i++)
+ sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count();
+ sal_uInt16 nAreaCount = 0;
+ for (sal_uInt16 i=0; i<nTotalCount; i++)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScAreaLink))
@@ -619,7 +619,7 @@ ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos )
return NULL; // nicht gefunden
}
-ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, USHORT nP) :
+ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, sal_uInt16 nP) :
aPropSet( lcl_GetSheetLinkMap() ),
pDocShell( pDocSh ),
nPos( nP )
@@ -670,7 +670,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr
String aOptions (pLink->GetOptions());
String aSource (pLink->GetSource());
ScRange aDest (pLink->GetDestArea());
- ULONG nRefresh = pLink->GetRefreshDelay();
+ sal_uLong nRefresh = pLink->GetRefreshDelay();
//! Undo fuer Loeschen
//! Undo zusammenfassen
@@ -679,7 +679,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr
pLinkManager->Remove( pLink );
pLink = NULL; // bei Remove geloescht
- BOOL bFitBlock = TRUE; // verschieben, wenn durch Update Groesse geaendert
+ sal_Bool bFitBlock = sal_True; // verschieben, wenn durch Update Groesse geaendert
if (pNewFile)
{
aFile = String( *pNewFile );
@@ -694,11 +694,11 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr
if (pNewDest)
{
ScUnoConversion::FillScRange( aDest, *pNewDest );
- bFitBlock = FALSE; // neuer Bereich angegeben -> keine Inhalte verschieben
+ bFitBlock = false; // neuer Bereich angegeben -> keine Inhalte verschieben
}
ScDocFunc aFunc(*pDocShell);
- aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, TRUE );
+ aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, sal_True );
}
}
@@ -706,7 +706,7 @@ void ScAreaLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh )
{
ScAreaLink* pLink = lcl_GetAreaLink( pDocShell, nPos );
if( pLink )
- pLink->SetRefreshDelay( (ULONG) nRefresh );
+ pLink->SetRefreshDelay( (sal_uLong) nRefresh );
}
// XRefreshable
@@ -738,8 +738,8 @@ void SAL_CALL ScAreaLinkObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -756,7 +756,7 @@ void ScAreaLinkObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -960,10 +960,10 @@ void ScAreaLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XAreaLinks
-ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(INT32 nIndex)
+ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if ( pDocShell && nIndex >= 0 && nIndex < getCount() )
- return new ScAreaLinkObj( pDocShell, (USHORT)nIndex );
+ return new ScAreaLinkObj( pDocShell, (sal_uInt16)nIndex );
return NULL; // nicht gefunden
}
@@ -989,14 +989,14 @@ void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestP
ScDocFunc aFunc(*pDocShell);
aFunc.InsertAreaLink( aFileStr, aFilterStr, aOptionStr,
aSourceStr, ScRange(aDestAddr),
- 0, FALSE, TRUE ); // keine Inhalte verschieben
+ 0, false, sal_True ); // keine Inhalte verschieben
}
}
void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (USHORT)nIndex);
+ ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (sal_uInt16)nIndex);
if (pLink)
{
//! SetAddUndo oder so
@@ -1024,8 +1024,8 @@ sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException)
if (pDocShell)
{
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager();
- USHORT nTotalCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nTotalCount; i++)
+ sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nTotalCount; i++)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScAreaLink))
@@ -1181,8 +1181,8 @@ void SAL_CALL ScDDELinkObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -1209,7 +1209,7 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( )
ScDocument* pDoc = pDocShell->GetDocument();
if ( pDoc )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) )
{
const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix( nPos );
@@ -1247,7 +1247,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >&
ScDocument* pDoc = pDocShell->GetDocument();
if ( pDoc )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) )
{
uno::Any aAny;
@@ -1270,7 +1270,7 @@ void ScDDELinkObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -1301,13 +1301,13 @@ void ScDDELinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XDDELinks
-ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(INT32 nIndex)
+ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if (pDocShell)
{
String aAppl, aTopic, aItem;
if ( nIndex <= USHRT_MAX &&
- pDocShell->GetDocument()->GetDdeLinkData( (USHORT)nIndex, aAppl, aTopic, aItem ) )
+ pDocShell->GetDocument()->GetDdeLinkData( (sal_uInt16)nIndex, aAppl, aTopic, aItem ) )
return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem );
}
return NULL;
@@ -1321,8 +1321,8 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const rtl::OUString& aName)
String aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nCount = pDoc->GetDdeLinkCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pDoc->GetDdeLinkCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem );
if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr )
@@ -1396,11 +1396,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDDELinksObj::getElementNames() throw(uno
String aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nCount = pDoc->GetDdeLinkCount();
+ sal_uInt16 nCount = pDoc->GetDdeLinkCount();
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem );
pAry[i] = lcl_BuildDDEName(aAppl, aTopic, aItem);
@@ -1420,15 +1420,15 @@ sal_Bool SAL_CALL ScDDELinksObj::hasByName( const rtl::OUString& aName )
String aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nCount = pDoc->GetDdeLinkCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pDoc->GetDdeLinkCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem );
if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
// XDDELinks
@@ -1446,7 +1446,7 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink(
ScDocument* pDoc = pDocShell->GetDocument();
if ( pDoc )
{
- BYTE nMod = SC_DDE_DEFAULT;
+ sal_uInt8 nMod = SC_DDE_DEFAULT;
switch ( nMode )
{
case sheet::DDELinkMode_DEFAULT:
diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx
index 8a65a908979f..df961ae45a46 100644
--- a/sc/source/ui/unoobj/miscuno.cxx
+++ b/sc/source/ui/unoobj/miscuno.cxx
@@ -152,7 +152,7 @@ sal_Bool ScUnoHelpFunctions::GetBoolFromAny( const uno::Any& aAny )
{
if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN )
return *(sal_Bool*)aAny.getValue();
- return FALSE;
+ return false;
}
sal_Int16 ScUnoHelpFunctions::GetInt16FromAny( const uno::Any& aAny )
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index b7ca0b69aae3..0fd04cd5263f 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -558,7 +558,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName,
if ( nUnoType & sheet::NamedRangeFlag::COLUMN_HEADER ) nNewType |= RT_COLHEADER;
if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -573,7 +573,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName,
{
ScDocFunc aFunc(*pDocShell);
aFunc.SetNewRangeNames(pNewRanges, mbModifyAndBroadcast);
- bDone = TRUE;
+ bDone = true;
}
else
{
@@ -791,19 +791,19 @@ sal_Bool SAL_CALL ScNamedRangesObj::hasByName( const rtl::OUString& aName )
return sal_True;
}
}
- return sal_False;
+ return false;
}
/** called from the XActionLockable interface methods on initial locking */
void ScNamedRangesObj::lock()
{
- pDocShell->GetDocument()->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDocShell->GetDocument()->CompileNameFormula( sal_True ); // CreateFormulaString
}
/** called from the XActionLockable interface methods on final unlock */
void ScNamedRangesObj::unlock()
{
- pDocShell->GetDocument()->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDocShell->GetDocument()->CompileNameFormula( false ); // CompileFormulaString
}
// document::XActionLockable
@@ -1077,7 +1077,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex )
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1101,7 +1101,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex )
pDoc->CompileColRowNameFormula();
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID );
pDocShell->SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
//! Undo ?!?! (hier und aus Dialog)
}
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index e8a5f535a35c..c8ba4ed5bd6f 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -72,7 +72,7 @@ sal_Bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions,
const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName(aPropertyName );
if( !pEntry || !pEntry->nWID )
- return sal_False;
+ return false;
switch( pEntry->nWID )
{
case PROP_UNO_CALCASSHOWN :
@@ -95,7 +95,7 @@ sal_Bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions,
{
sal_Int32 nIntVal = 0;
if ( aValue >>= nIntVal )
- rOptions.SetIterCount( (USHORT)nIntVal );
+ rOptions.SetIterCount( (sal_uInt16)nIntVal );
}
break;
case PROP_UNO_ITEREPSILON :
@@ -173,7 +173,7 @@ uno::Any ScDocOptionsHelper::getPropertyValue(
break;
case PROP_UNO_NULLDATE:
{
- USHORT nD, nM, nY;
+ sal_uInt16 nD, nM, nY;
rOptions.GetDate( nD, nM, nY );
util::Date aDate( nD, nM, nY );
aRet <<= aDate;
@@ -213,7 +213,7 @@ void SAL_CALL ScDocOptionsObj::setPropertyValue(
{
SolarMutexGuard aGuard;
- BOOL bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue );
+ sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue );
if (!bDone)
ScModelObj::setPropertyValue( aPropertyName, aValue );
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index faf3a7eb3d68..89a358ad1408 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -125,7 +125,7 @@ static const sal_Char pFilterHtmlWeb[] = "calc_HTML_WebQuery";
static const sal_Char pFilterRtf[] = "Rich Text Format (StarCalc)";
-static BOOL lcl_MayBeAscii( SvStream& rStream )
+static sal_Bool lcl_MayBeAscii( SvStream& rStream )
{
// ASCII/CSV is considered possible if there are no null bytes, or a Byte
// Order Mark is present, or if, for Unicode UCS2/UTF-16, all null bytes
@@ -136,12 +136,12 @@ static BOOL lcl_MayBeAscii( SvStream& rStream )
const size_t nBufSize = 2048;
sal_uInt16 aBuffer[ nBufSize ];
sal_uInt8* pByte = reinterpret_cast<sal_uInt8*>(aBuffer);
- ULONG nBytesRead = rStream.Read( pByte, nBufSize*2);
+ sal_uLong nBytesRead = rStream.Read( pByte, nBufSize*2);
if ( nBytesRead >= 2 && (aBuffer[0] == 0xfffe || aBuffer[0] == 0xfeff) )
{
// Unicode BOM file may contain null bytes.
- return TRUE;
+ return sal_True;
}
const sal_uInt16* p = aBuffer;
@@ -159,13 +159,13 @@ static BOOL lcl_MayBeAscii( SvStream& rStream )
return nMask != 0;
}
-static BOOL lcl_MayBeDBase( SvStream& rStream )
+static sal_Bool lcl_MayBeDBase( SvStream& rStream )
{
// Look for dbf marker, see connectivity/source/inc/dbase/DTable.hxx
// DBFType for values.
- const BYTE nValidMarks[] = {
+ const sal_uInt8 nValidMarks[] = {
0x03, 0x04, 0x05, 0x30, 0x43, 0xB3, 0x83, 0x8b, 0x8e, 0xf5 };
- BYTE nMark;
+ sal_uInt8 nMark;
rStream.Seek(STREAM_SEEK_TO_BEGIN);
rStream >> nMark;
bool bValidMark = false;
@@ -175,24 +175,24 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
bValidMark = true;
}
if ( !bValidMark )
- return FALSE;
+ return false;
const size_t nHeaderBlockSize = 32;
// Empty dbf is >= 32*2+1 bytes in size.
const size_t nEmptyDbf = nHeaderBlockSize * 2 + 1;
rStream.Seek(STREAM_SEEK_TO_END);
- ULONG nSize = rStream.Tell();
+ sal_uLong nSize = rStream.Tell();
if ( nSize < nEmptyDbf )
- return FALSE;
+ return false;
// length of header starts at 8
rStream.Seek(8);
- USHORT nHeaderLen;
+ sal_uInt16 nHeaderLen;
rStream >> nHeaderLen;
if ( nHeaderLen < nEmptyDbf || nSize < nHeaderLen )
- return FALSE;
+ return false;
// Last byte of header must be 0x0d, this is how it's specified.
// #i9581#,#i26407# but some applications don't follow the specification
@@ -200,8 +200,8 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// even boundary. Some (#i88577# ) even pad more or pad using a 0x1a ^Z
// control character (#i8857#). This results in:
// Last byte of header must be 0x0d on 32 bytes boundary.
- USHORT nBlocks = (nHeaderLen - 1) / nHeaderBlockSize;
- BYTE nEndFlag = 0;
+ sal_uInt16 nBlocks = (nHeaderLen - 1) / nHeaderBlockSize;
+ sal_uInt8 nEndFlag = 0;
while ( nBlocks > 1 && nEndFlag != 0x0d ) {
rStream.Seek( nBlocks-- * nHeaderBlockSize );
rStream >> nEndFlag;
@@ -225,11 +225,11 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// opening as template is done when a parameter tells to do so and a template filter can be detected
// (otherwise no valid filter would be found) or if the detected filter is a template filter and
// there is no parameter that forbids to open as template
- sal_Bool bOpenAsTemplate = sal_False;
- sal_Bool bWasReadOnly = sal_False, bReadOnly = sal_False;
+ sal_Bool bOpenAsTemplate = false;
+ sal_Bool bWasReadOnly = false, bReadOnly = false;
- sal_Bool bRepairPackage = sal_False;
- sal_Bool bRepairAllowed = sal_False;
+ sal_Bool bRepairPackage = false;
+ sal_Bool bRepairAllowed = false;
// now some parameters that can already be in the array, but may be overwritten or new inserted here
// remember their indices in the case new values must be added to the array
@@ -294,7 +294,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
SfxAllItemSet *pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, false );
bWasReadOnly = pItem && pItem->GetValue();
@@ -317,10 +317,10 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
pFilter = aMatcher.GetFilter4EA( aTypeName );
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, false, NULL, pSet );
+ aMedium.UseInteractionHandler( sal_True );
- BOOL bIsStorage = aMedium.IsStorage();
+ sal_Bool bIsStorage = aMedium.IsStorage();
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
@@ -332,7 +332,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// maybe that IsStorage() already created an error!
if ( bIsStorage )
{
- uno::Reference < embed::XStorage > xStorage(aMedium.GetStorage( sal_False ));
+ uno::Reference < embed::XStorage > xStorage(aMedium.GetStorage( false ));
if ( aMedium.GetLastStorageCreationState() != ERRCODE_NONE )
{
// error during storage creation means _here_ that the medium
@@ -364,7 +364,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
String aFilterName;
if ( pFilter )
aFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : FALSE, &aFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : false, &aFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -384,20 +384,16 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
-
- xInteraction->handle( xRequest );
-
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
}
}
@@ -430,22 +426,22 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
pFilter = 0;
if ( pStream )
{
- SotStorageRef aStorage = new SotStorage ( pStream, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStream, false );
if ( !aStorage->GetError() )
{
// Excel-5: detect through contained streams
// there are some "excel" formats from 3rd party vendors that need to be distinguished
String aStreamName(RTL_CONSTASCII_USTRINGPARAM("Workbook"));
- BOOL bExcel97Stream = ( aStorage->IsStream( aStreamName ) );
+ sal_Bool bExcel97Stream = ( aStorage->IsStream( aStreamName ) );
aStreamName = String(RTL_CONSTASCII_USTRINGPARAM("Book"));
- BOOL bExcel5Stream = ( aStorage->IsStream( aStreamName ) );
+ sal_Bool bExcel5Stream = ( aStorage->IsStream( aStreamName ) );
if ( bExcel97Stream || bExcel5Stream )
{
if ( bExcel97Stream )
{
String aOldName;
- BOOL bIsCalcFilter = TRUE;
+ sal_Bool bIsCalcFilter = sal_True;
if ( pPreselectedFilter )
{
// cross filter; now this should be a type detection only, not a filter detection
@@ -474,7 +470,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
else if ( bExcel5Stream )
{
String aOldName;
- BOOL bIsCalcFilter = TRUE;
+ sal_Bool bIsCalcFilter = sal_True;
if ( pPreselectedFilter )
{
// cross filter; now this should be a type detection only, not a filter detection
@@ -518,18 +514,18 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
#define M_ALT(ANZ) (0x0200+(ANZ))
#define M_ENDE 0x8000
- static const UINT16 pLotus[] = // Lotus 1/1A/2
+ static const sal_uInt16 pLotus[] = // Lotus 1/1A/2
{ 0x0000, 0x0000, 0x0002, 0x0000,
M_ALT(2), 0x0004, 0x0006,
0x0004, M_ENDE };
- static const UINT16 pLotusNew[] = // Lotus >= 9.7
+ static const sal_uInt16 pLotusNew[] = // Lotus >= 9.7
{ 0x0000, 0x0000, M_DC, 0x0000, // Rec# + Len (0x1a)
M_ALT(3), 0x0003, 0x0004, 0x0005, // File Revision Code 97->ME
0x0010, 0x0004, 0x0000, 0x0000,
M_ENDE };
- static const UINT16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4
+ static const sal_uInt16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4
{ 0x09, // lobyte of BOF rec ID (0x0009, 0x0209, 0x0409)
M_ALT(3), 0x00, 0x02, 0x04, // hibyte of BOF rec ID (0x0009, 0x0209, 0x0409)
M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16)
@@ -539,7 +535,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x00, // hibyte of data type (0x0010, 0x0020, 0x0040)
M_ENDE };
- static const UINT16 pExcel2[] = // Excel BIFF4 Workspace
+ static const sal_uInt16 pExcel2[] = // Excel BIFF4 Workspace
{ 0x09, // lobyte of BOF rec ID (0x0409)
0x04, // hibyte of BOF rec ID (0x0409)
M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16)
@@ -549,7 +545,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x01, // hibyte of data type (0x0100)
M_ENDE };
- static const UINT16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream)
+ static const sal_uInt16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream)
{ 0x09, // lobyte of BOF rec ID (0x0809)
0x08, // hibyte of BOF rec ID (0x0809)
M_ALT(4), 4, 6, 8, 16, // lobyte of BOF rec size
@@ -559,7 +555,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x00, // hibyte of data type
M_ENDE };
- static const UINT16 pSc10[] = // StarCalc 1.0 Dokumente
+ static const sal_uInt16 pSc10[] = // StarCalc 1.0 Dokumente
{ 'B', 'l', 'a', 'i', 's', 'e', '-', 'T', 'a', 'b', 'e', 'l', 'l',
'e', 0x000A, 0x000D, 0x0000, // Sc10CopyRight[16]
M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC,
@@ -568,21 +564,21 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x0000,
M_ENDE };
- static const UINT16 pLotus2[] = // Lotus >3
+ static const sal_uInt16 pLotus2[] = // Lotus >3
{ 0x0000, 0x0000, 0x001A, 0x0000, // Rec# + Len (26)
M_ALT(2), 0x0000, 0x0002, // File Revision Code
0x0010,
0x0004, 0x0000, // File Revision Subcode
M_ENDE };
- static const UINT16 pQPro[] =
+ static const sal_uInt16 pQPro[] =
{ 0x0000, 0x0000, 0x0002, 0x0000,
M_ALT(4), 0x0001, 0x0002, // WB1, WB2
0x0006, 0x0007, // QPro 6/7 (?)
0x0010,
M_ENDE };
- static const UINT16 pDIF1[] = // DIF mit CR-LF
+ static const sal_uInt16 pDIF1[] = // DIF mit CR-LF
{
'T', 'A', 'B', 'L', 'E',
M_DC, M_DC,
@@ -591,7 +587,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
'\"',
M_ENDE };
- static const UINT16 pDIF2[] = // DIF mit CR oder LF
+ static const sal_uInt16 pDIF2[] = // DIF mit CR oder LF
{
'T', 'A', 'B', 'L', 'E',
M_DC,
@@ -600,13 +596,13 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
'\"',
M_ENDE };
- static const UINT16 pSylk[] = // Sylk
+ static const sal_uInt16 pSylk[] = // Sylk
{
'I', 'D', ';',
M_ALT(3), 'P', 'N', 'E', // 'P' plus undocumented Excel extensions 'N' and 'E'
M_ENDE };
- static const UINT16 *ppFilterPatterns[] = // Arrays mit Suchmustern
+ static const sal_uInt16 *ppFilterPatterns[] = // Arrays mit Suchmustern
{
pLotus,
pExcel1,
@@ -640,38 +636,38 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// suchen Sie jetzt!
// ... realisiert ueber 'Mustererkennung'
- BYTE nAkt;
- BOOL bSync; // Datei und Muster stimmen ueberein
- USHORT nFilter; // Zaehler ueber alle Filter
- const UINT16 *pSearch; // aktuelles Musterwort
+ sal_uInt8 nAkt;
+ sal_Bool bSync; // Datei und Muster stimmen ueberein
+ sal_uInt16 nFilter; // Zaehler ueber alle Filter
+ const sal_uInt16 *pSearch; // aktuelles Musterwort
for ( nFilter = 0 ; nFilter < nFilterCount ; nFilter++ )
{
rStr.Seek( 0 ); // am Anfang war alles Uebel...
rStr >> nAkt;
pSearch = ppFilterPatterns[ nFilter ];
- bSync = TRUE;
+ bSync = sal_True;
while( !rStr.IsEof() && bSync )
{
- register UINT16 nMuster = *pSearch;
+ register sal_uInt16 nMuster = *pSearch;
if( nMuster < 0x0100 )
{ // direkter Byte-Vergleich
- if( ( BYTE ) nMuster != nAkt )
- bSync = FALSE;
+ if( ( sal_uInt8 ) nMuster != nAkt )
+ bSync = false;
}
else if( nMuster & M_DC )
{ // don't care
}
else if( nMuster & M_ALT(0) )
{ // alternative Bytes
- BYTE nAnzAlt = ( BYTE ) nMuster;
- bSync = FALSE; // zunaechst unsynchron
+ sal_uInt8 nAnzAlt = ( sal_uInt8 ) nMuster;
+ bSync = false; // zunaechst unsynchron
while( nAnzAlt > 0 )
{
pSearch++;
- if( ( BYTE ) *pSearch == nAkt )
- bSync = TRUE; // jetzt erst Synchronisierung
+ if( ( sal_uInt8 ) *pSearch == nAkt )
+ bSync = sal_True; // jetzt erst Synchronisierung
nAnzAlt--;
}
}
@@ -687,7 +683,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
{ // gefundenen Filter einstellen
pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterName[ nFilter ]) );
}
- bSync = FALSE; // leave inner loop
+ bSync = false; // leave inner loop
nFilter = nFilterCount; // leave outer loop
}
else
@@ -868,7 +864,7 @@ sal_Bool SAL_CALL ScFilterDetect::supportsService( const UNOOUSTRING& sServiceNa
return sal_True ;
}
}
- return sal_False ;
+ return false ;
}
/* XServiceInfo */
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 220a4db28df4..d906b5210ccf 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
#include <tools/debug.hxx>
#include <sal/macros.h>
#include <svtools/unoimap.hxx>
@@ -63,6 +61,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/document/XCodeNameQuery.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
@@ -387,7 +386,7 @@ sal_uInt16 ScServiceProvider::GetProviderType(const String& rServiceName)
}
}
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<SC_SERVICE_COUNT; i++)
{
DBG_ASSERT( aOldNames[i], "ScServiceProvider::GetProviderType: no oldname => crash");
@@ -588,6 +587,11 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
if ( pAppMgr )
pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
+
+ // create the VBA document event processor
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents(
+ ::ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.VBASpreadsheetEventProcessor", aArgs ), uno::UNO_QUERY );
+ pDocShell->GetDocument()->SetVbaEventProcessor( xVbaEvents );
}
}
break;
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 73f039def74e..ab64c329e5c7 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -90,7 +90,7 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
return aMacroDescriptionsImpl;
}
// #i66550 HLINK_FOR_SHAPES
-ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, BOOL bCreate = FALSE )
+ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, sal_Bool bCreate = false )
{
if( pShape )
if( SdrObject* pObj = pShape->GetSdrObject() )
@@ -115,7 +115,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
pShapePropertySet(NULL),
pShapePropertyState(NULL),
pImplementationId(NULL),
- bIsTextShape(FALSE),
+ bIsTextShape(false),
bInitializedNotifier(false)
{
comphelper::increment( m_refCount );
@@ -262,22 +262,22 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScShapeObj::getPropertySetInfo(
return mxPropSetInfo;
}
-BOOL lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum )
+sal_Bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum )
{
- USHORT nCount = rModel.GetPageCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rModel.GetPageCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( rModel.GetPage(i) == pPage )
{
rNum = static_cast<SCTAB>(i);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint )
+sal_Bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
rtl::OUString sType(xShape->getShapeType());
sal_Bool bCaptionShape(sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape")));
if (bCaptionShape)
@@ -286,7 +286,7 @@ BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point&
if (xShapeProp.is())
{
xShapeProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" )) ) >>= rCaptionPoint;
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
return bReturn;
@@ -660,7 +660,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(
aNameString.EqualsAscii( SC_UNONAME_URL) )
{
rtl::OUString sHlink;
- ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this, TRUE);
+ ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this, true);
if ( ( aValue >>= sHlink ) && pInfo )
pInfo->SetHlink( sHlink );
}
@@ -1388,7 +1388,7 @@ class ShapeUnoEventAccessImpl : public ShapeUnoEventAcess_BASE
private:
ScShapeObj* mpShape;
- ScMacroInfo* getInfo( BOOL bCreate = FALSE )
+ ScMacroInfo* getInfo( sal_Bool bCreate = false )
{
return lcl_getShapeHyperMacroInfo( mpShape, bCreate );
}
@@ -1421,7 +1421,7 @@ public:
rtl::OUString sValue;
if ( pProperties->Value >>= sValue )
{
- ScMacroInfo* pInfo = getInfo( TRUE );
+ ScMacroInfo* pInfo = getInfo( sal_True );
DBG_ASSERT( pInfo, "shape macro info could not be created!" );
if ( !pInfo )
break;
@@ -1504,7 +1504,7 @@ ScShapeObj::getEvents( ) throw(uno::RuntimeException)
)
if ( _ServiceName == *pSupported )
return sal_True;
- return sal_False;
+ return false;
}
uno::Sequence< ::rtl::OUString > SAL_CALL ScShapeObj::getSupportedServiceNames( ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index 6bc561ec4201..6b8a6b71030d 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -86,21 +86,21 @@ ScCellSearchObj::ScCellSearchObj() :
{
pSearchItem = new SvxSearchItem( SCITEM_SEARCHDATA );
// Defaults:
- pSearchItem->SetWordOnly(FALSE);
- pSearchItem->SetExact(FALSE);
- pSearchItem->SetMatchFullHalfWidthForms(FALSE);
- pSearchItem->SetUseAsianOptions(FALSE); // or all asian bits would have to be handled
- pSearchItem->SetBackward(FALSE);
- pSearchItem->SetSelection(FALSE);
- pSearchItem->SetRegExp(FALSE);
- pSearchItem->SetPattern(FALSE);
- pSearchItem->SetLevenshtein(FALSE);
- pSearchItem->SetLEVRelaxed(FALSE);
+ pSearchItem->SetWordOnly(false);
+ pSearchItem->SetExact(false);
+ pSearchItem->SetMatchFullHalfWidthForms(false);
+ pSearchItem->SetUseAsianOptions(false); // or all asian bits would have to be handled
+ pSearchItem->SetBackward(false);
+ pSearchItem->SetSelection(false);
+ pSearchItem->SetRegExp(false);
+ pSearchItem->SetPattern(false);
+ pSearchItem->SetLevenshtein(false);
+ pSearchItem->SetLEVRelaxed(false);
pSearchItem->SetLEVOther(2);
pSearchItem->SetLEVShorter(2);
pSearchItem->SetLEVLonger(2);
// Calc-Flags
- pSearchItem->SetRowDirection(FALSE);
+ pSearchItem->SetRowDirection(false);
pSearchItem->SetCellType(SVX_SEARCHIN_FORMULA);
// Selection-Flag wird beim Aufruf gesetzt
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 62db21fdfb11..0a15aa2578ff 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -380,7 +380,7 @@ const SfxItemPropertyMap* lcl_GetFooterStyleMap()
#define SC_FAMILYNAME_CELL "CellStyles"
#define SC_FAMILYNAME_PAGE "PageStyles"
-static UINT16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE };
+static sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE };
//------------------------------------------------------------------------
@@ -421,11 +421,11 @@ struct ScDisplayNameMap
String aProgName;
};
-const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
+const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType )
{
if ( nType == SFX_STYLE_FAMILY_PARA )
{
- static BOOL bCellMapFilled = FALSE;
+ static sal_Bool bCellMapFilled = false;
static ScDisplayNameMap aCellMap[6];
if ( !bCellMapFilled )
{
@@ -446,13 +446,13 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
// last entry remains empty
- bCellMapFilled = TRUE;
+ bCellMapFilled = sal_True;
}
return aCellMap;
}
else if ( nType == SFX_STYLE_FAMILY_PAGE )
{
- static BOOL bPageMapFilled = FALSE;
+ static sal_Bool bPageMapFilled = false;
static ScDisplayNameMap aPageMap[3];
if ( !bPageMapFilled )
{
@@ -464,7 +464,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
// last entry remains empty
- bPageMapFilled = TRUE;
+ bPageMapFilled = sal_True;
}
return aPageMap;
}
@@ -478,7 +478,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
#define SC_SUFFIX_USER " (user)"
#define SC_SUFFIX_USER_LEN 7
-BOOL lcl_EndsWithUser( const String& rString )
+sal_Bool lcl_EndsWithUser( const String& rString )
{
const sal_Unicode *pChar = rString.GetBuffer();
xub_StrLen nLen = rString.Len();
@@ -494,7 +494,7 @@ BOOL lcl_EndsWithUser( const String& rString )
String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName, UINT16 nType )
{
- BOOL bDisplayIsProgrammatic = FALSE;
+ sal_Bool bDisplayIsProgrammatic = false;
const ScDisplayNameMap* pNames = lcl_GetStyleNameMap( nType );
if (pNames)
@@ -504,7 +504,7 @@ String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName
if (pNames->aDispName == rDispName)
return pNames->aProgName;
else if (pNames->aProgName == rDispName)
- bDisplayIsProgrammatic = TRUE; // display name matches any programmatic name
+ bDisplayIsProgrammatic = sal_True; // display name matches any programmatic name
}
while( (++pNames)->aDispName.Len() );
}
@@ -551,7 +551,7 @@ sal_Bool lcl_AnyTabProtected( ScDocument& rDoc )
for (SCTAB i=0; i<nTabCount; i++)
if (rDoc.IsTabProtected(i))
return sal_True;
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
@@ -581,7 +581,7 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XStyleFamilies
-ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const
+ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) const
{
if ( pDocShell )
{
@@ -594,7 +594,7 @@ ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const
return NULL;
}
-ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(UINT32 nIndex) const
+ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) const
{
if ( nIndex < SC_STYLE_FAMILY_COUNT )
return GetObjectByType_Impl(aStyleFamilyTypes[nIndex]);
@@ -700,9 +700,9 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const rtl::OUString& aURL,
{
// collect options
- BOOL bLoadReplace = TRUE; // defaults
- BOOL bLoadCellStyles = TRUE;
- BOOL bLoadPageStyles = TRUE;
+ sal_Bool bLoadReplace = sal_True; // defaults
+ sal_Bool bLoadCellStyles = sal_True;
+ sal_Bool bLoadPageStyles = sal_True;
const beans::PropertyValue* pPropArray = aOptions.getConstArray();
long nPropCount = aOptions.getLength();
@@ -733,13 +733,13 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderO
beans::PropertyValue* pArray = aSequence.getArray();
pArray[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_OVERWSTL ));
- ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, TRUE );
+ ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, true );
pArray[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_LOADCELL ));
- ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, TRUE );
+ ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, true );
pArray[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_LOADPAGE ));
- ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, TRUE );
+ ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, true );
return aSequence;
}
@@ -772,7 +772,7 @@ void ScStyleFamilyObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XStyleFamily
-ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex)
+ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(sal_uInt32 nIndex)
{
if ( pDocShell )
{
@@ -782,7 +782,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex)
SfxStyleSheetIterator aIter( pStylePool, eFamily );
if ( nIndex < aIter.Count() )
{
- SfxStyleSheetBase* pStyle = aIter[(USHORT)nIndex];
+ SfxStyleSheetBase* pStyle = aIter[(sal_uInt16)nIndex];
if ( pStyle )
{
return new ScStyleObj( pDocShell, eFamily, String (pStyle->GetName()) );
@@ -811,7 +811,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
// Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein...
uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
if ( xInterface.is() )
@@ -820,7 +820,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const
if ( pStyleObj && pStyleObj->GetFamily() == eFamily &&
!pStyleObj->IsInserted() ) // noch nicht eingefuegt?
{
- String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ));
+ String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
ScDocument* pDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
@@ -867,10 +867,10 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( pDocShell )
{
- String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ));
+ String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
ScDocument* pDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
@@ -881,7 +881,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
SfxStyleSheetBase* pStyle = pStylePool->Find( aString, eFamily );
if (pStyle)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( eFamily == SFX_STYLE_FAMILY_PARA )
{
// wie ScViewFunc::RemoveStyleSheetInUse
@@ -890,7 +890,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -966,7 +966,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const rtl::OUString& aName )
{
SolarMutexGuard aGuard;
uno::Reference< style::XStyle > xObj(
- GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ) ));
+ GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ) ));
if (xObj.is())
return uno::makeAny(xObj);
else
@@ -984,19 +984,19 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetIterator aIter( pStylePool, eFamily );
- UINT16 nCount = aIter.Count();
+ sal_uInt16 nCount = aIter.Count();
String aName;
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
SfxStyleSheetBase* pStyle = aIter.First();
- UINT16 nPos = 0;
+ sal_uInt16 nPos = 0;
while (pStyle)
{
DBG_ASSERT( nPos<nCount, "Anzahl durcheinandergekommen" );
if (nPos<nCount)
pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName(
- pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) );
+ pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
pStyle = aIter.Next();
}
return aSeq;
@@ -1010,14 +1010,14 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const rtl::OUString& aName )
SolarMutexGuard aGuard;
if ( pDocShell )
{
- String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ));
+ String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
ScDocument* pDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
if ( pStylePool->Find( aString, eFamily ) )
return sal_True;
}
- return sal_False;
+ return false;
}
// XPropertySet
@@ -1052,7 +1052,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const ::rtl::OUString& sPr
}
if ( nResId > 0 )
{
- ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< USHORT >( nResId ) ) );
+ ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< sal_uInt16 >( nResId ) ) );
aRet = uno::makeAny( sDisplayName );
}
}
@@ -1186,7 +1186,7 @@ sal_Bool SAL_CALL ScStyleObj::isUserDefined() throw(uno::RuntimeException)
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return pStyle->IsUserDefined();
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException)
@@ -1195,7 +1195,7 @@ sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException)
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return pStyle->IsUsed();
- return sal_False;
+ return false;
}
rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException)
@@ -1203,7 +1203,7 @@ rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<UINT16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<sal_uInt16>(eFamily) );
return rtl::OUString();
}
@@ -1221,7 +1221,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle )
//! DocFunc-Funktion??
//! Undo ?????????????
- String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<UINT16>(eFamily) ));
+ String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) ));
sal_Bool bOk = pStyle->SetParent( aString );
if (bOk)
{
@@ -1237,7 +1237,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle )
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -1259,7 +1259,7 @@ rtl::OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
return rtl::OUString();
}
@@ -1288,7 +1288,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName )
pDoc->GetPool()->CellStyleCreated( aString );
// Zellvorlagen = 2, Seitenvorlagen = 4
- UINT16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
+ sal_uInt16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4;
SfxBindings* pBindings = pDocShell->GetViewBindings();
if (pBindings)
@@ -1302,7 +1302,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName )
uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
{
- SvxNumRule aRule( 0, 0, TRUE ); // nothing supported
+ SvxNumRule aRule( 0, 0, sal_True ); // nothing supported
return SvxCreateNumRule( &aRule );
}
@@ -1355,14 +1355,14 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const rtl::OUString&
if ( pItemSet && pResultEntry )
{
- USHORT nWhich = pResultEntry->nWID;
+ sal_uInt16 nWhich = pResultEntry->nWID;
if ( nWhich == SC_WID_UNO_TBLBORD )
{
nWhich = ATTR_BORDER;
}
if ( IsScItemWid( nWhich ) )
{
- SfxItemState eState = pItemSet->GetItemState( nWhich, sal_False );
+ SfxItemState eState = pItemSet->GetItemState( nWhich, false );
// // if no rotate value is set, look at orientation
// //! also for a fixed value of 0 (in case orientation is ambiguous)?
@@ -1425,7 +1425,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
if ( pStyleSet && pResultEntry )
{
- USHORT nWhich = pResultEntry->nWID;
+ sal_uInt16 nWhich = pResultEntry->nWID;
if ( IsScItemWid( nWhich ) )
{
@@ -1435,7 +1435,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
// Default-Items mit falscher Slot-ID funktionieren im SfxItemPropertySet3 nicht
//! Slot-IDs aendern...
if ( aEmptySet.GetPool()->GetSlotId(nWhich) == nWhich &&
- aEmptySet.GetItemState(nWhich, sal_False) == SFX_ITEM_DEFAULT )
+ aEmptySet.GetItemState(nWhich, false) == SFX_ITEM_DEFAULT )
{
aEmptySet.Put( aEmptySet.Get( nWhich ) );
}
@@ -1491,9 +1491,9 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
SvxBoxInfoItem aInner( ATTR_BORDER_INNER );
table::TableBorder aBorder;
ScHelperFunctions::FillTableBorder( aBorder, aOuter, aInner );
- aBorder.IsHorizontalLineValid = sal_False;
- aBorder.IsVerticalLineValid = sal_False;
- aBorder.IsDistanceValid = sal_False;
+ aBorder.IsHorizontalLineValid = false;
+ aBorder.IsVerticalLineValid = false;
+ aBorder.IsDistanceValid = false;
aAny <<= aBorder;
}
}
@@ -1600,7 +1600,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeExcepti
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -1610,9 +1610,9 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeExcepti
// #i22448# apply the default BoxInfoItem for page styles again
// (same content as in ScStyleSheet::GetItemSet, to control the dialog)
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetTable( FALSE );
- aBoxInfoItem.SetDist( TRUE );
- aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );
+ aBoxInfoItem.SetTable( false );
+ aBoxInfoItem.SetDist( sal_True );
+ aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True );
rSet.Put( aBoxInfoItem );
pDocShell->PageStyleModified( aStyleName, sal_True );
@@ -1694,7 +1694,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
throw uno::RuntimeException();
SfxItemSet& rSet = pStyle->GetItemSet(); // direkt im lebenden Style aendern...
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
if ( eFamily == SFX_STYLE_FAMILY_PAGE )
{
if(pEntry->nWID == SC_WID_UNO_HEADERSET)
@@ -1741,14 +1741,14 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
// language for number formats
SvNumberFormatter* pFormatter =
pDocShell->GetDocument()->GetFormatTable();
- UINT32 nOldFormat = ((const SfxUInt32Item&)
+ sal_uInt32 nOldFormat = ((const SfxUInt32Item&)
rSet.Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)
rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
nOldFormat = pFormatter->
GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
- UINT32 nNewFormat = 0;
+ sal_uInt32 nNewFormat = 0;
*pValue >>= nNewFormat;
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
@@ -1765,7 +1765,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
{
sal_Int16 nVal = 0;
*pValue >>= nVal;
- rSet.Put( SfxUInt16Item( pEntry->nWID, (USHORT)HMMToTwips(nVal) ) );
+ rSet.Put( SfxUInt16Item( pEntry->nWID, (sal_uInt16)HMMToTwips(nVal) ) );
}
break;
case ATTR_ROTATE_VALUE:
@@ -1789,18 +1789,18 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
switch( eOrient )
{
case table::CellOrientation_STANDARD:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
break;
case table::CellOrientation_TOPBOTTOM:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
break;
case table::CellOrientation_BOTTOMTOP:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
break;
case table::CellOrientation_STACKED:
- rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) );
break;
default:
{
@@ -1832,7 +1832,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
case ATTR_PAGE_OBJECTS:
case ATTR_PAGE_DRAWINGS:
{
- sal_Bool bBool = sal_False;
+ sal_Bool bBool = false;
*pValue >>= bBool;
//! sal_Bool-MID fuer ScViewObjectModeItem definieren?
rSet.Put( ScViewObjectModeItem( pEntry->nWID,
@@ -1841,26 +1841,26 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
break;
case ATTR_PAGE_PAPERBIN:
{
- BYTE nTray = PAPERBIN_PRINTER_SETTINGS;
- BOOL bFound = FALSE;
+ sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS;
+ sal_Bool bFound = false;
rtl::OUString aName;
if ( *pValue >>= aName )
{
if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_PAPERBIN_DEFAULTNAME ) ) )
- bFound = TRUE;
+ bFound = sal_True;
else
{
Printer* pPrinter = pDocShell->GetPrinter();
if (pPrinter)
{
String aNameStr = aName;
- USHORT nCount = pPrinter->GetPaperBinCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pPrinter->GetPaperBinCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( aNameStr == pPrinter->GetPaperBinName(i) )
{
- nTray = (BYTE) i;
- bFound = TRUE;
+ nTray = (sal_uInt8) i;
+ bFound = sal_True;
break;
}
}
@@ -1893,7 +1893,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
// funktionieren im SfxItemPropertySet3 nicht
//! Slot-IDs aendern...
if ( rSet.GetPool()->GetSlotId(pEntry->nWID) == pEntry->nWID &&
- rSet.GetItemState(pEntry->nWID, sal_False) == SFX_ITEM_DEFAULT )
+ rSet.GetItemState(pEntry->nWID, false) == SFX_ITEM_DEFAULT )
{
rSet.Put( rSet.Get(pEntry->nWID) );
}
@@ -1951,7 +1951,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -1986,7 +1986,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
if ( pItemSet && pResultEntry )
{
- USHORT nWhich = pResultEntry->nWID;
+ sal_uInt16 nWhich = pResultEntry->nWID;
if ( IsScItemWid( nWhich ) )
{
@@ -1995,7 +1995,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
case ATTR_VALUE_FORMAT:
if ( pDocShell )
{
- UINT32 nOldFormat = ((const SfxUInt32Item&)
+ sal_uInt32 nOldFormat = ((const SfxUInt32Item&)
pItemSet->Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)
pItemSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
@@ -2011,7 +2011,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
case ATTR_STACKED:
{
sal_Int32 nRot = ((const SfxInt32Item&)pItemSet->Get(ATTR_ROTATE_VALUE)).GetValue();
- BOOL bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue();
+ sal_Bool bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aAny );
}
break;
@@ -2031,7 +2031,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
// property PrinterPaperTray is the name of the tray
- BYTE nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue();
+ sal_uInt8 nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue();
rtl::OUString aName;
if ( nValue == PAPERBIN_PRINTER_SETTINGS )
aName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_PAPERBIN_DEFAULTNAME ));
@@ -2058,7 +2058,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
// funktionieren im SfxItemPropertySet3 nicht
//! Slot-IDs aendern...
if ( pItemSet->GetPool()->GetSlotId(nWhich) == nWhich &&
- pItemSet->GetItemState(nWhich, sal_False) == SFX_ITEM_DEFAULT )
+ pItemSet->GetItemState(nWhich, false) == SFX_ITEM_DEFAULT )
{
SfxItemSet aNoEmptySet( *pItemSet );
aNoEmptySet.Put( aNoEmptySet.Get( nWhich ) );
@@ -2081,9 +2081,9 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
SvxBoxInfoItem aInner( ATTR_BORDER_INNER );
table::TableBorder aBorder;
ScHelperFunctions::FillTableBorder( aBorder, aOuter, aInner );
- aBorder.IsHorizontalLineValid = sal_False;
- aBorder.IsVerticalLineValid = sal_False;
- aBorder.IsDistanceValid = sal_False;
+ aBorder.IsHorizontalLineValid = false;
+ aBorder.IsVerticalLineValid = false;
+ aBorder.IsDistanceValid = false;
aAny <<= aBorder;
}
}
@@ -2108,7 +2108,7 @@ rtl::OUString SAL_CALL ScStyleObj::getImplementationName() throw(uno::RuntimeExc
sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName )
throw(uno::RuntimeException)
{
- BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
+ sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SCSTYLE_SERVICE ) )||
rServiceName.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM ( bPage ? SCPAGESTYLE_SERVICE : SCCELLSTYLE_SERVICE ));
@@ -2117,7 +2117,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName
uno::Sequence<rtl::OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
throw(uno::RuntimeException)
{
- BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
+ sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
uno::Sequence<rtl::OUString> aRet(2);
rtl::OUString* pArray = aRet.getArray();
pArray[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCSTYLE_SERVICE ));
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index acc15fa8825c..972c64013498 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -136,7 +136,7 @@ sal_Bool SAL_CALL ScLinkTargetTypesObj::hasByName(const rtl::OUString& aName) th
for (sal_uInt16 i=0; i<SC_LINKTARGETTYPE_COUNT; i++)
if ( aNames[i] == aNameStr )
return sal_True;
- return sal_False;
+ return false;
}
// container::XElementAccess
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 411da9b4d562..4e21b587294d 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -76,7 +76,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet()
SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties
{0,0,0,0,0,0}
};
- static BOOL bTwipsSet = FALSE;
+ static sal_Bool bTwipsSet = false;
if (!bTwipsSet)
{
@@ -96,7 +96,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet()
++pEntry;
}
- bTwipsSet = TRUE;
+ bTwipsSet = sal_True;
}
static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
return &aHdFtPropertySet_Impl;
@@ -141,7 +141,7 @@ void ScHeaderFooterContentObj::RemoveListener( SfxListener& rListener )
rListener.EndListening( aBC );
}
-void ScHeaderFooterContentObj::UpdateText( USHORT nPart, EditEngine& rSource )
+void ScHeaderFooterContentObj::UpdateText( sal_uInt16 nPart, EditEngine& rSource )
{
EditTextObject* pNew = rSource.CreateTextObject();
switch (nPart)
@@ -230,13 +230,13 @@ ScHeaderFooterContentObj* ScHeaderFooterContentObj::getImplementation(
//------------------------------------------------------------------------
ScHeaderFooterTextData::ScHeaderFooterTextData( ScHeaderFooterContentObj& rContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
rContentObj( rContent ),
nPart( nP ),
pEditEngine( NULL ),
pForwarder( NULL ),
- bDataValid( FALSE ),
- bInUpdate( FALSE )
+ bDataValid( false ),
+ bInUpdate( false )
{
rContentObj.acquire(); // must not go away
rContentObj.AddListener( *this );
@@ -261,7 +261,7 @@ void ScHeaderFooterTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( ((const ScHeaderFooterChangedHint&)rHint).GetPart() == nPart )
{
if (!bInUpdate) // not for own updates
- bDataValid = FALSE; // text has to be fetched again
+ bDataValid = false; // text has to be fetched again
}
}
}
@@ -272,9 +272,9 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, TRUE );
+ ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, sal_True );
- pHdrEngine->EnableUndo( FALSE );
+ pHdrEngine->EnableUndo( false );
pHdrEngine->SetRefMapMode( MAP_TWIP );
// default font must be set, independently of document
@@ -312,7 +312,7 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder()
if (pData)
pEditEngine->SetText(*pData);
- bDataValid = TRUE;
+ bDataValid = sal_True;
return pForwarder;
}
@@ -320,18 +320,18 @@ void ScHeaderFooterTextData::UpdateData()
{
if ( pEditEngine )
{
- bInUpdate = TRUE; // don't reset bDataValid during UpdateText
+ bInUpdate = sal_True; // don't reset bDataValid during UpdateText
rContentObj.UpdateText( nPart, *pEditEngine );
- bInUpdate = FALSE;
+ bInUpdate = false;
}
}
//------------------------------------------------------------------------
ScHeaderFooterTextObj::ScHeaderFooterTextObj( ScHeaderFooterContentObj& rContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
aTextData( rContent, nP ),
pUnoText( NULL )
{
@@ -400,7 +400,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce
rtl::OUString aRet;
const EditTextObject* pData;
- USHORT nPart = aTextData.GetPart();
+ sal_uInt16 nPart = aTextData.GetPart();
ScHeaderFooterContentObj& rContentObj = aTextData.GetContentObj();
if (nPart == SC_HDFT_LEFT)
@@ -412,7 +412,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce
if (pData)
{
// for pure text, no font info is needed in pool defaults
- ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE );
+ ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True );
ScHeaderFieldData aData;
FillDummyFieldData( aData );
@@ -430,7 +430,7 @@ void SAL_CALL ScHeaderFooterTextObj::setString( const rtl::OUString& aText ) thr
String aString(aText);
// for pure text, no font info is needed in pool defaults
- ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE );
+ ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True );
aEditEngine.SetText( aString );
aTextData.GetContentObj().UpdateText( aTextData.GetPart(), aEditEngine );
@@ -929,7 +929,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper()
pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM );
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); // TRUE: become owner of pool
+ pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); // TRUE: become owner of pool
pForwarder = new SvxEditEngineForwarder( *pEditEngine );
pOriginalSource = new ScSimpleEditSource( pForwarder );
}
@@ -974,10 +974,10 @@ ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) :
pEditEngine( NULL ),
pForwarder( NULL ),
pOriginalSource( NULL ),
- bDataValid( FALSE ),
- bInUpdate( FALSE ),
- bDirty( FALSE ),
- bDoUpdate( TRUE )
+ bDataValid( false ),
+ bInUpdate( false ),
+ bDirty( false ),
+ bDoUpdate( sal_True )
{
if (pDocShell)
pDocShell->GetDocument()->AddUnoObject(*this);
@@ -1029,12 +1029,12 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
}
- // currently, GetPortions doesn't work if UpdateMode is FALSE,
+ // currently, GetPortions doesn't work if UpdateMode is sal_False,
// this will be fixed (in EditEngine) by src600
-// pEditEngine->SetUpdateMode( FALSE );
- pEditEngine->EnableUndo( FALSE );
+// pEditEngine->SetUpdateMode( sal_False );
+ pEditEngine->EnableUndo( false );
if (pDocShell)
pEditEngine->SetRefDevice(pDocShell->GetRefDevice());
else
@@ -1072,7 +1072,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
}
}
- bDataValid = TRUE;
+ bDataValid = sal_True;
return pForwarder;
}
@@ -1087,17 +1087,17 @@ void ScCellTextData::UpdateData()
// or things like attributes after the text would be lost
// (are not stored in the cell)
- bInUpdate = TRUE; // prevents bDataValid from being reset
+ bInUpdate = sal_True; // prevents bDataValid from being reset
ScDocFunc aFunc(*pDocShell);
- aFunc.PutData( aCellPos, *pEditEngine, FALSE, TRUE ); // always as text
+ aFunc.PutData( aCellPos, *pEditEngine, false, sal_True ); // always as text
- bInUpdate = FALSE;
- bDirty = FALSE;
+ bInUpdate = false;
+ bDirty = false;
}
}
else
- bDirty = TRUE;
+ bDirty = sal_True;
}
void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -1110,7 +1110,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // invalid now
@@ -1121,7 +1121,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( nId == SFX_HINT_DATACHANGED )
{
if (!bInUpdate) // not for own UpdateData calls
- bDataValid = FALSE; // text has to be read from the cell again
+ bDataValid = false; // text has to be read from the cell again
}
}
}
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index d94767067ebd..adeb0e7a3a6d 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -115,6 +115,7 @@ const SfxItemPropertyMapEntry* lcl_GetViewOptPropertyMap()
{MAP_CHAR_LEN(SC_UNO_VISAREA), 0, &getCppuType((awt::Rectangle*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_ZOOMTYPE), 0, &getCppuType((sal_Int16*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_ZOOMVALUE), 0, &getCppuType((sal_Int16*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_VISAREASCREEN),0, &getCppuType((awt::Rectangle*)0), 0, 0},
{0,0,0,0,0,0}
};
return aViewOptPropertyMap_Impl;
@@ -136,7 +137,7 @@ SC_SIMPLE_SERVICE_INFO( ScViewPaneBase, "ScViewPaneObj", "com.sun.star.sheet.Spr
//------------------------------------------------------------------------
-ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, USHORT nP) :
+ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, sal_uInt16 nP) :
pViewShell( pViewSh ),
nPane( nP )
{
@@ -322,7 +323,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScViewPaneBase::getReferredCells()
namespace
{
- bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, USHORT _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView )
+ bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, sal_uInt16 _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView )
{
if ( !_pViewShell )
return false;
@@ -419,10 +420,15 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const
ScAddress aCell(pViewShell->GetViewData()->GetPosX(eWhichH),
pViewShell->GetViewData()->GetPosY(eWhichV),
pViewShell->GetViewData()->GetTabNo());
- Rectangle aVisRect(pDoc->GetMMRect(aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab()));
-
- aVisRect.SetSize(pWindow->PixelToLogic(pWindow->GetSizePixel(), pWindow->GetDrawMapMode(sal_True)));
-
+ Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) );
+ Size aVisSize( pWindow->PixelToLogic( pWindow->GetSizePixel(), pWindow->GetDrawMapMode( sal_True ) ) );
+ Point aVisPos( aCellRect.TopLeft() );
+ if ( pDoc->IsLayoutRTL( aCell.Tab() ) )
+ {
+ aVisPos = aCellRect.TopRight();
+ aVisPos.X() -= aVisSize.Width();
+ }
+ Rectangle aVisRect( aVisPos, aVisSize );
aVisArea = AWTRectangle(aVisRect);
}
}
@@ -431,7 +437,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const
//------------------------------------------------------------------------
-ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, USHORT nP) :
+ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, sal_uInt16 nP) :
ScViewPaneBase( pViewSh, nP )
{
}
@@ -487,7 +493,7 @@ public:
};
ScTabViewEventListener::ScTabViewEventListener(ScTabViewObj* pObj, uno::Reference< script::vba::XVBAEventProcessor >& rVbaEventsHelper):
- pViewObj( pObj ),xVbaEventsHelper( rVbaEventsHelper ), bDelaySelectionEvent( sal_False ), bSelectionChangeOccurred( sal_False )
+ pViewObj( pObj ),xVbaEventsHelper( rVbaEventsHelper ), bDelaySelectionEvent( false ), bSelectionChangeOccurred( false )
{
}
@@ -513,15 +519,15 @@ void ScTabViewEventListener::fireSelectionChangeEvent()
{
}
}
- bDelaySelectionEvent = sal_False;
- bSelectionChangeOccurred = sal_False;
+ bDelaySelectionEvent = false;
+ bSelectionChangeOccurred = false;
}
sal_Bool SAL_CALL ScTabViewEventListener::mousePressed( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException)
{
// Delay to fire the selection change event if clicking the left mouse button to do selection.
- bDelaySelectionEvent = ( e.Buttons == ::com::sun::star::awt::MouseButton::RIGHT ) ? sal_False : sal_True;
- bSelectionChangeOccurred = sal_False;
+ bDelaySelectionEvent = ( e.Buttons == ::com::sun::star::awt::MouseButton::RIGHT ) ? false : sal_True;
+ bSelectionChangeOccurred = false;
// ScTabViewObj::MousePressed should handle process BeforeDoubleClick and BeforeRightClick events
return sal_True;
@@ -557,7 +563,7 @@ ScTabViewObj::ScTabViewObj( ScTabViewShell* pViewSh ) :
aMouseClickHandlers( 0 ),
aActivationListeners( 0 ),
nPreviousTab( 0 ),
- bDrawSelModeSet(sal_False)
+ bDrawSelModeSet(false)
{
if (pViewSh)
{
@@ -662,7 +668,7 @@ void lcl_CallActivate( ScDocShell* pDocSh, SCTAB nTab, sal_Int32 nEvent )
}
}
-void ScTabViewObj::SheetChanged()
+void ScTabViewObj::SheetChanged( bool bSameTabButMoved )
{
if ( !GetViewShell() )
return;
@@ -676,7 +682,7 @@ void ScTabViewObj::SheetChanged()
uno::Reference< uno::XInterface > xSource(xView, uno::UNO_QUERY);
aEvent.Source = xSource;
aEvent.ActiveSheet = new ScTableSheetObj(pDocSh, pViewData->GetTabNo());
- for ( USHORT n=0; n<aActivationListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aActivationListeners.Count(); n++ )
{
try
{
@@ -690,9 +696,10 @@ void ScTabViewObj::SheetChanged()
}
}
- // handle sheet events
+ /* Handle sheet events, but do not trigger event handlers, if the old
+ active sheet gets re-activated after inserting/deleting/moving a sheet. */
SCTAB nNewTab = pViewData->GetTabNo();
- if ( nNewTab != nPreviousTab )
+ if ( !bSameTabButMoved && (nNewTab != nPreviousTab) )
{
lcl_CallActivate( pDocSh, nPreviousTab, SC_SHEETEVENT_UNFOCUS );
lcl_CallActivate( pDocSh, nNewTab, SC_SHEETEVENT_FOCUS );
@@ -753,25 +760,25 @@ uno::Sequence<sal_Int8> SAL_CALL ScTabViewObj::getImplementationId()
// XDocumentView
-BOOL lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges )
+sal_Bool lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges )
{
for (size_t i = 0, nCount = rRanges.size(); i < nCount; ++i)
{
const ScRange* pRange = rRanges[ i ];
if ( nTab >= pRange->aStart.Tab() && nTab <= pRange->aEnd.Tab() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* pSelObj )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCTAB nObjectTab = 0;
SdrModel* pModel = rDrawView.GetModel();
- USHORT nPageCount = pModel->GetPageCount();
- for (USHORT i=0; i<nPageCount && !bFound; i++)
+ sal_uInt16 nPageCount = pModel->GetPageCount();
+ for (sal_uInt16 i=0; i<nPageCount && !bFound; i++)
{
SdrPage* pPage = pModel->GetPage(i);
if (pPage)
@@ -782,7 +789,7 @@ void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject*
{
if ( pObject == pSelObj )
{
- bFound = TRUE;
+ bFound = sal_True;
nObjectTab = static_cast<SCTAB>(i);
}
pObject = aIter.Next();
@@ -804,11 +811,11 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
ScTabViewShell* pViewSh = GetViewShell();
if ( !pViewSh )
- return FALSE;
+ return false;
//! Type of aSelection can be some specific interface instead of XInterface
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY);
if ( !xInterface.is() ) //clear all selections
{
@@ -820,14 +827,14 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
}
else //#102232#; if there is no DrawView remove range selection
pViewSh->Unmark();
- bRet = TRUE;
+ bRet = sal_True;
}
if (bDrawSelModeSet) // remove DrawSelMode if set by API; if necessary it will be set again later
{
- pViewSh->SetDrawSelMode(sal_False);
+ pViewSh->SetDrawSelMode(false);
pViewSh->UpdateLayerLocks();
- bDrawSelModeSet = sal_False;
+ bDrawSelModeSet = false;
}
if (bRet)
@@ -861,8 +868,8 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
if (pDisp)
pDisp->Execute( pFunc->GetSlotID(), SFX_CALLMODE_SYNCHRON );
}
- pViewSh->SetDrawShell(FALSE);
- pViewSh->SetDrawSelMode(FALSE); // nach dem Dispatcher-Execute
+ pViewSh->SetDrawShell(false);
+ pViewSh->SetDrawSelMode(false); // nach dem Dispatcher-Execute
// Ranges selektieren
@@ -882,7 +889,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
pViewSh->SetTabNo( pFirst->aStart.Tab() );
pViewSh->DoneBlockMode();
pViewSh->InitOwnBlockMode();
- pViewData->GetMarkData().MarkFromRangeList( rRanges, TRUE );
+ pViewData->GetMarkData().MarkFromRangeList( rRanges, sal_True );
pViewSh->MarkDataChanged();
pViewData->GetDocShell()->PostPaintGridAll(); // Markierung (alt&neu)
if ( pFirst )
@@ -894,7 +901,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
//! Methode an der View, um RangeList zu selektieren
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( pShapeImp || xShapeColl.is() ) // Drawing-Layer
@@ -915,7 +922,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
if ( pPV && pObj->GetPage() == pPV->GetPage() )
{
pDrawView->MarkObj( pObj, pPV );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -957,21 +964,21 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
if (pDrawView->IsObjMarkable( pObj, pPV ))
pDrawView->MarkObj( pObj, pPV );
else
- bAllMarked = sal_False;
+ bAllMarked = false;
}
}
}
}
}
if (bAllMarked)
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE; // empty XShapes (all shapes are deselected)
+ bRet = sal_True; // empty XShapes (all shapes are deselected)
}
if (bRet)
- pViewSh->SetDrawShell(TRUE);
+ pViewSh->SetDrawShell(sal_True);
}
}
@@ -994,7 +1001,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
if (pDrawView)
{
const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if (nMarkCount)
{
// ShapeCollection erzeugen (wie in SdXImpressView::getSelection im Draw)
@@ -1003,7 +1010,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
SvxShapeCollection* pShapes = new SvxShapeCollection();
uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pShapes));
- for (ULONG i=0; i<nMarkCount; i++)
+ for (sal_uLong i=0; i<nMarkCount; i++)
{
SdrObject* pDrawObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if (pDrawObj)
@@ -1039,7 +1046,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
ScMarkData aFilteredMark( rMark );
ScViewUtil::UnmarkFiltered( aFilteredMark, pDocSh->GetDocument());
ScRangeList aRangeList;
- aFilteredMark.FillRangeListWithMarks( &aRangeList, FALSE);
+ aFilteredMark.FillRangeListWithMarks( &aRangeList, false);
// Theoretically a selection may start and end on a filtered row.
switch ( aRangeList.size() )
{
@@ -1079,7 +1086,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
// remember if the selection was from the cursor position without anything selected
// (used when rendering the selection)
- pObj->SetCursorOnly( TRUE );
+ pObj->SetCursorOnly( sal_True );
}
}
@@ -1101,7 +1108,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getCount() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
- USHORT nPanes = 0;
+ sal_uInt16 nPanes = 0;
if (pViewSh)
{
nPanes = 1;
@@ -1119,7 +1126,7 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xPane.is())
return uno::makeAny(xPane);
else
@@ -1141,7 +1148,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasElements() throw(uno::RuntimeException)
// XSpreadsheetView
-ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const
+ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
{
static ScSplitPos ePosHV[4] =
{ SC_SPLIT_TOPLEFT, SC_SPLIT_BOTTOMLEFT, SC_SPLIT_TOPRIGHT, SC_SPLIT_BOTTOMRIGHT };
@@ -1150,22 +1157,22 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const
if (pViewSh)
{
ScSplitPos eWhich = SC_SPLIT_BOTTOMLEFT; // default Position
- BOOL bError = FALSE;
+ sal_Bool bError = false;
ScViewData* pViewData = pViewSh->GetViewData();
- BOOL bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE );
- BOOL bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE );
if ( bHor && bVer )
{
// links oben, links unten, rechts oben, rechts unten - wie in Excel
if ( nIndex < 4 )
eWhich = ePosHV[nIndex];
else
- bError = TRUE;
+ bError = sal_True;
}
else if ( bHor )
{
if ( nIndex > 1 )
- bError = TRUE;
+ bError = sal_True;
else if ( nIndex == 1 )
eWhich = SC_SPLIT_BOTTOMRIGHT;
// sonst SC_SPLIT_BOTTOMLEFT
@@ -1173,16 +1180,16 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const
else if ( bVer )
{
if ( nIndex > 1 )
- bError = TRUE;
+ bError = sal_True;
else if ( nIndex == 0 )
eWhich = SC_SPLIT_TOPLEFT;
// sonst SC_SPLIT_BOTTOMLEFT
}
else if ( nIndex > 0 )
- bError = TRUE; // nicht geteilt: nur 0 gueltig
+ bError = sal_True; // nicht geteilt: nur 0 gueltig
if (!bError)
- return new ScViewPaneObj( pViewSh, sal::static_int_cast<USHORT>(eWhich) );
+ return new ScViewPaneObj( pViewSh, sal::static_int_cast<sal_uInt16>(eWhich) );
}
return NULL;
@@ -1268,11 +1275,11 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
Window* pActiveWin = pData->GetActiveWin();
Point aPos = pActiveWin->PixelToLogic(rPoint);
- USHORT nHitLog = (USHORT) pActiveWin->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pActiveWin->PixelToLogic(
Size(pDrawView->GetHitTolerancePixel(),0)).Width();
sal_uInt32 nCount(pDrawPage->GetObjCount());
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
sal_uInt32 i(0);
while (i < nCount && !bFound)
{
@@ -1307,7 +1314,7 @@ bool ScTabViewObj::IsMouseListening() const
sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
throw (::uno::RuntimeException)
{
- sal_Bool bReturn(sal_False);
+ sal_Bool bReturn(false);
uno::Reference< uno::XInterface > xTarget = GetClickedObject(Point(e.X, e.Y));
if (aMouseClickHandlers.Count() && xTarget.is())
@@ -1321,7 +1328,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
aMouseEvent.PopupTrigger = e.PopupTrigger;
aMouseEvent.Target = xTarget;
- for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ )
{
try
{
@@ -1365,7 +1372,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
/*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
// look for a boolean return value of true
- sal_Bool bRetValue = sal_False;
+ sal_Bool bRetValue = false;
if (aRet >>= bRetValue)
{
if (bRetValue)
@@ -1398,7 +1405,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
sal_Bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e )
throw (uno::RuntimeException)
{
- sal_Bool bReturn(sal_False);
+ sal_Bool bReturn(false);
if (aMouseClickHandlers.Count())
{
@@ -1415,7 +1422,7 @@ sal_Bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e )
aMouseEvent.PopupTrigger = e.PopupTrigger;
aMouseEvent.Target = xTarget;
- for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ )
{
try
{
@@ -1441,10 +1448,10 @@ void ScTabViewObj::StartMouseListening()
void ScTabViewObj::EndMouseListening()
{
- USHORT nCount(aMouseClickHandlers.Count());
+ sal_uInt16 nCount(aMouseClickHandlers.Count());
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
try
{
@@ -1463,10 +1470,10 @@ void ScTabViewObj::StartActivationListening()
void ScTabViewObj::EndActivationListening()
{
- USHORT nCount = aActivationListeners.Count();
+ sal_uInt16 nCount = aActivationListeners.Count();
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
try
{
@@ -1486,7 +1493,7 @@ void SAL_CALL ScTabViewObj::addEnhancedMouseClickHandler( const uno::Reference<
if (aListener.is())
{
- USHORT nCount = aMouseClickHandlers.Count();
+ sal_uInt16 nCount = aMouseClickHandlers.Count();
uno::Reference<awt::XEnhancedMouseClickHandler> *pObj =
new uno::Reference<awt::XEnhancedMouseClickHandler>( aListener );
aMouseClickHandlers.Insert( pObj, nCount );
@@ -1500,8 +1507,8 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc
throw (uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aMouseClickHandlers.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aMouseClickHandlers.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<awt::XEnhancedMouseClickHandler> *pObj = aMouseClickHandlers[n];
if ( *pObj == aListener )
@@ -1520,7 +1527,7 @@ void SAL_CALL ScTabViewObj::addActivationEventListener( const uno::Reference< sh
if (aListener.is())
{
- USHORT nCount = aActivationListeners.Count();
+ sal_uInt16 nCount = aActivationListeners.Count();
uno::Reference<sheet::XActivationEventListener> *pObj =
new uno::Reference<sheet::XActivationEventListener>( aListener );
aActivationListeners.Insert( pObj, nCount );
@@ -1534,8 +1541,8 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference<
throw (uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aActivationListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aActivationListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<sheet::XActivationEventListener> *pObj = aActivationListeners[n];
if ( *pObj == aListener )
@@ -1551,12 +1558,12 @@ INT16 ScTabViewObj::GetZoom(void) const
if (pViewSh)
{
const Fraction& rZoomY = pViewSh->GetViewData()->GetZoomY(); // Y wird angezeigt
- return (INT16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator());
+ return (sal_Int16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator());
}
return 0;
}
-void ScTabViewObj::SetZoom(INT16 nZoom)
+void ScTabViewObj::SetZoom(sal_Int16 nZoom)
{
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
@@ -1573,7 +1580,7 @@ void ScTabViewObj::SetZoom(INT16 nZoom)
}
}
Fraction aFract( nZoom, 100 );
- pViewSh->SetZoom( aFract, aFract, TRUE );
+ pViewSh->SetZoom( aFract, aFract, sal_True );
pViewSh->PaintGrid();
pViewSh->PaintTop();
pViewSh->PaintLeft();
@@ -1582,9 +1589,9 @@ void ScTabViewObj::SetZoom(INT16 nZoom)
}
}
-INT16 ScTabViewObj::GetZoomType(void) const
+sal_Int16 ScTabViewObj::GetZoomType(void) const
{
- INT16 aZoomType = view::DocumentZoomType::OPTIMAL;
+ sal_Int16 aZoomType = view::DocumentZoomType::OPTIMAL;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1611,7 +1618,7 @@ INT16 ScTabViewObj::GetZoomType(void) const
return aZoomType;
}
-void ScTabViewObj::SetZoomType(INT16 aZoomType)
+void ScTabViewObj::SetZoomType(sal_Int16 aZoomType)
{
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
@@ -1654,11 +1661,11 @@ void ScTabViewObj::SetZoomType(INT16 aZoomType)
{
case SVX_ZOOM_WHOLEPAGE:
case SVX_ZOOM_PAGEWIDTH:
- pView->SetZoomType( eZoomType, TRUE );
+ pView->SetZoomType( eZoomType, sal_True );
break;
default:
- pView->SetZoomType( SVX_ZOOM_PERCENT, TRUE );
+ pView->SetZoomType( SVX_ZOOM_PERCENT, sal_True );
}
SetZoom( nZoom );
}
@@ -1678,7 +1685,7 @@ sal_Bool SAL_CALL ScTabViewObj::getIsWindowSplit() throw(uno::RuntimeException)
pViewData->GetVSplitMode() == SC_SPLIT_NORMAL );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException)
@@ -1694,7 +1701,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException)
pViewData->GetVSplitMode() == SC_SPLIT_FIX );
}
- return FALSE;
+ return false;
}
sal_Int32 SAL_CALL ScTabViewObj::getSplitHorizontal() throw(uno::RuntimeException)
@@ -1740,7 +1747,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitColumn() throw(uno::RuntimeException)
SCsCOL nCol;
SCsROW nRow;
- pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, FALSE );
+ pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, false );
if ( nCol > 0 )
return nCol;
}
@@ -1762,7 +1769,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitRow() throw(uno::RuntimeException)
ScSplitPos ePos = SC_SPLIT_TOPLEFT; // es ist vertikal geteilt
SCsCOL nCol;
SCsROW nRow;
- pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, FALSE );
+ pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, false );
if ( nRow > 0 )
return nRow;
}
@@ -1777,8 +1784,8 @@ void SAL_CALL ScTabViewObj::splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixel
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
- pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), TRUE, TRUE );
- pViewSh->FreezeSplitters( FALSE );
+ pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), sal_True, sal_True );
+ pViewSh->FreezeSplitters( false );
pViewSh->InvalidateSplit();
}
}
@@ -1800,11 +1807,11 @@ void SAL_CALL ScTabViewObj::freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRow
aWinStart = pWin->GetPosPixel();
ScViewData* pViewData = pViewSh->GetViewData();
- Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, TRUE ));
+ Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, sal_True ));
aSplit += aWinStart;
- pViewSh->SplitAtPixel( aSplit, TRUE, TRUE );
- pViewSh->FreezeSplitters( TRUE );
+ pViewSh->SplitAtPixel( aSplit, sal_True, sal_True );
+ pViewSh->FreezeSplitters( sal_True );
pViewSh->InvalidateSplit();
}
}
@@ -1824,8 +1831,8 @@ void SAL_CALL ScTabViewObj::removeSelectionChangeListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aSelectionListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aSelectionListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<view::XSelectionChangeListener> *pObj = aSelectionListeners[n];
if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface?
@@ -1840,7 +1847,7 @@ void ScTabViewObj::SelectionChanged()
{
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aSelectionListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aSelectionListeners.Count(); n++ )
(*aSelectionListeners[n])->selectionChanged( aEvent );
// handle sheet events
@@ -2053,6 +2060,16 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty
else if ( aString.EqualsAscii( SC_UNO_VISAREA ) ) aRet <<= GetVisArea();
else if ( aString.EqualsAscii( SC_UNO_ZOOMTYPE ) ) aRet <<= GetZoomType();
else if ( aString.EqualsAscii( SC_UNO_ZOOMVALUE ) ) aRet <<= GetZoom();
+ else if ( aString.EqualsAscii( SC_UNO_VISAREASCREEN ) )
+ {
+ ScViewData* pViewData = pViewSh->GetViewData();
+ Window* pActiveWin = ( pViewData ? pViewData->GetActiveWin() : NULL );
+ if ( pActiveWin )
+ {
+ Rectangle aRect = pActiveWin->GetWindowExtentsRelative( NULL );
+ aRet <<= AWTRectangle( aRect );
+ }
+ }
}
return aRet;
@@ -2077,8 +2094,8 @@ void SAL_CALL ScTabViewObj::removePropertyChangeListener( const ::rtl::OUString&
uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aPropertyChgListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aPropertyChgListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<beans::XPropertyChangeListener> *pObj = aPropertyChgListeners[n];
if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface?
@@ -2109,7 +2126,7 @@ void ScTabViewObj::VisAreaChanged()
{
beans::PropertyChangeEvent aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aPropertyChgListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aPropertyChgListeners.Count(); n++ )
(*aPropertyChgListeners[n])->propertyChange( aEvent );
}
@@ -2124,9 +2141,9 @@ void SAL_CALL ScTabViewObj::startRangeSelection(
if (pViewSh)
{
String aInitVal, aTitle;
- BOOL bCloseOnButtonUp = FALSE;
- BOOL bSingleCell = FALSE;
- BOOL bMultiSelection = FALSE;
+ sal_Bool bCloseOnButtonUp = false;
+ sal_Bool bSingleCell = false;
+ sal_Bool bMultiSelection = false;
rtl::OUString aStrVal;
const beans::PropertyValue* pPropArray = aArguments.getConstArray();
@@ -2181,8 +2198,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRangeSelListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRangeSelListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<sheet::XRangeSelectionListener> *pObj = aRangeSelListeners[n];
if ( *pObj == xListener )
@@ -2208,8 +2225,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionChangeListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRangeChgListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRangeChgListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<sheet::XRangeSelectionChangeListener> *pObj = aRangeChgListeners[n];
if ( *pObj == xListener )
@@ -2226,7 +2243,7 @@ void ScTabViewObj::RangeSelDone( const String& rText )
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
aEvent.RangeDescriptor = rtl::OUString( rText );
- for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ )
(*aRangeSelListeners[n])->done( aEvent );
}
@@ -2236,7 +2253,7 @@ void ScTabViewObj::RangeSelAborted( const String& rText )
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
aEvent.RangeDescriptor = rtl::OUString( rText );
- for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ )
(*aRangeSelListeners[n])->aborted( aEvent );
}
@@ -2246,7 +2263,7 @@ void ScTabViewObj::RangeSelChanged( const String& rText )
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
aEvent.RangeDescriptor = rtl::OUString( rText );
- for ( USHORT n=0; n<aRangeChgListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRangeChgListeners.Count(); n++ )
(*aRangeChgListeners[n])->descriptorChanged( aEvent );
}
@@ -2345,7 +2362,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref
SolarMutexGuard aGuard;
ScEditShell* pShell = PTR_CAST( ScEditShell, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
if (pShell)
- pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), FALSE );
+ pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), false );
else
{
ScDrawTextObjectBar* pTextShell = PTR_CAST( ScDrawTextObjectBar, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
@@ -2356,7 +2373,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
if ( pOutView )
{
- pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), FALSE );
+ pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), false );
return;
}
}
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 99fda2b57a81..5ec8fd16c80d 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -25,8 +25,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <docuno.hxx>
+
#include "excelvbahelper.hxx"
+
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/sheet/XSheetCellRange.hpp>
+#include "docuno.hxx"
#include "tabvwsh.hxx"
#include "transobj.hxx"
#include "scmod.hxx"
@@ -40,12 +44,7 @@
using namespace ::com::sun::star;
using namespace ::ooo::vba;
-namespace ooo
-{
-namespace vba
-{
-namespace excel
-{
+// ============================================================================
uno::Reference< sheet::XDatabaseRanges >
GetDataBaseRanges( ScDocShell* pShell ) throw ( uno::RuntimeException )
@@ -79,7 +78,7 @@ GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet, rtl::OUString& sName ) t
dbAddress = xDBRange->getDataArea();
if ( dbAddress.Sheet == nSheet )
{
- sal_Bool bHasAuto = sal_False;
+ sal_Bool bHasAuto = false;
uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW );
xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ) ) >>= bHasAuto;
if ( bHasAuto )
@@ -169,7 +168,7 @@ private:
bool getReplaceCellsWarning() throw ( uno::RuntimeException )
{
- sal_Bool res = sal_False;
+ sal_Bool res = false;
getGlobalSheetSettings()->getPropertyValue( REPLACE_CELLS_WARNING ) >>= res;
return ( res == sal_True );
}
@@ -217,7 +216,14 @@ implnCopy( const uno::Reference< frame::XModel>& xModel )
{
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
+ {
pViewShell->CopyToClip(NULL,false,false,true);
+
+ // mark the copied transfer object so it is used in ScVbaRange::Insert
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ if (pClipObj)
+ pClipObj->SetUseInApi( true );
+ }
}
void
@@ -225,13 +231,20 @@ implnCut( const uno::Reference< frame::XModel>& xModel )
{
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
- pViewShell->CutToClip( NULL, TRUE );
+ {
+ pViewShell->CutToClip( NULL, sal_True );
+
+ // mark the copied transfer object so it is used in ScVbaRange::Insert
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ if (pClipObj)
+ pClipObj->SetUseInApi( true );
+ }
}
-void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
+void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
{
PasteCellsWarningReseter resetWarningBox;
- sal_Bool bAsLink(sal_False), bOtherDoc(sal_False);
+ sal_Bool bAsLink(false), bOtherDoc(false);
InsCellCmd eMoveMode = INS_NONE;
ScTabViewShell* pTabViewShell = getBestViewShell( xModel );
@@ -251,7 +264,7 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFl
pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc,
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, TRUE );
+ eMoveMode, IDF_NONE, sal_True );
pTabViewShell->CellContentChanged();
}
}
@@ -264,7 +277,7 @@ void implnCopyRange( const uno::Reference< frame::XModel>& xModel, const ScRange
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
{
- pViewShell->CopyToClip( NULL, rRange, FALSE, TRUE, TRUE );
+ pViewShell->CopyToClip( NULL, rRange, false, true, true );
}
}
@@ -309,20 +322,19 @@ sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const rtl::OUString& sRangeStr )
{
ScRangeList aCellRanges;
String sAddress( sRangeStr );
- USHORT nMask = SCA_VALID;
- USHORT rResFlags = aCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_R1C1 );
+ sal_uInt16 nMask = SCA_VALID;
+ sal_uInt16 rResFlags = aCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_R1C1 );
if ( rResFlags & SCA_VALID )
{
return sal_True;
}
- return sal_False;
+ return false;
}
uno::Reference< XHelperInterface >
getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException )
{
- uno::Reference< sheet::XSheetCellRange > xSheetRange( xRange, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xProps( xSheetRange->getSpreadsheet(), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xSheet, uno::UNO_QUERY_THROW );
rtl::OUString sCodeName;
xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CodeName") ) ) >>= sCodeName;
// #TODO #FIXME ideally we should 'throw' here if we don't get a valid parent, but... it is possible
@@ -330,8 +342,7 @@ getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw
// are *NO* special document module objects ( of course being able to switch between vba/non vba mode at
// the document in the future could fix this, especially IF the switching of the vba mode takes care to
// create the special document module objects if they don't exist.
- uno::Reference< XHelperInterface > xParent( ov::getUnoDocModule( sCodeName, GetDocShellFromRange( xRange ) ), uno::UNO_QUERY );
-
+ uno::Reference< XHelperInterface > xParent( ov::getUnoDocModule( sCodeName, GetDocShellFromRange( xSheet ) ), uno::UNO_QUERY );
return xParent;
}
@@ -348,9 +359,9 @@ formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAd
ScTokenArray* pCode = aCompiler.CompileString( sFormula );
if ( pCode )
{
- USHORT nLen = pCode->GetLen();
+ sal_uInt16 nLen = pCode->GetLen();
formula::FormulaToken** pTokens = pCode->GetArray();
- for ( USHORT nPos = 0; nPos < nLen; nPos++ )
+ for ( sal_uInt16 nPos = 0; nPos < nLen; nPos++ )
{
const formula::FormulaToken& rToken = *pTokens[nPos];
switch ( rToken.GetType() )
@@ -397,13 +408,13 @@ void CompileODFFormulaToExcel( ScDocument* pDoc, const String& rOldFormula, Stri
{
return;
}
- USHORT nLen = pCode->GetLen();
+ sal_uInt16 nLen = pCode->GetLen();
formula::FormulaToken** pTokens = pCode->GetArray();
- for ( USHORT nPos = 0; nPos < nLen && pTokens[nPos]; nPos++ )
+ for ( sal_uInt16 nPos = 0; nPos < nLen && pTokens[nPos]; nPos++ )
{
String rFormula;
formula::FormulaToken* pToken = pTokens[nPos];
- aCompiler.CreateStringFromToken( rFormula, pToken, TRUE );
+ aCompiler.CreateStringFromToken( rFormula, pToken, true );
if ( pToken->GetOpCode() == ocSep )
{
// Excel formula separator is ",".
@@ -419,16 +430,33 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& x
uno::Reference< container::XEnumerationAccess > xEnumAccess( xRanges, uno::UNO_QUERY_THROW );
uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
uno::Reference< table::XCellRange > xRange( xEnum->nextElement(), uno::UNO_QUERY_THROW );
-
return getUnoSheetModuleObj( xRange );
}
+uno::Reference< XHelperInterface >
+getUnoSheetModuleObj( const uno::Reference< table::XCell >& xCell ) throw ( uno::RuntimeException )
+{
+ uno::Reference< sheet::XSheetCellRange > xSheetRange( xCell, uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XSpreadsheet > xSheet( xSheetRange->getSpreadsheet(), uno::UNO_SET_THROW );
+ return getUnoSheetModuleObj( xSheet );
+}
+
+uno::Reference< XHelperInterface >
+getUnoSheetModuleObj( const uno::Reference< frame::XModel >& xModel, SCTAB nTab ) throw ( uno::RuntimeException )
+{
+ uno::Reference< sheet::XSpreadsheetDocument > xDoc( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xSheets( xDoc->getSheets(), uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XSpreadsheet > xSheet( xSheets->getByIndex( nTab ), uno::UNO_QUERY_THROW );
+ return getUnoSheetModuleObj( xSheet );
+}
+
SfxItemSet*
ScVbaCellRangeAccess::GetDataSet( ScCellRangesBase* pRangeObj )
{
return pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : 0;
}
+// ============================================================================
} //excel
} //vba
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index 7eff6768aa96..13e7bf985d32 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -34,12 +34,42 @@
#include <com/sun/star/sheet/XDatabaseRange.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <ooo/vba/XHelperInterface.hpp>
#include <formula/grammar.hxx>
class ScCellRangesBase;
-namespace ooo
+namespace ooo {
+namespace vba {
+namespace excel {
+
+// ============================================================================
+
+// nTabs empty means apply zoom to all sheets
+void implSetZoom( const css::uno::Reference< css::frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs );
+void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel );
+void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel );
+void implnCut( const css::uno::Reference< css::frame::XModel>& xModel );
+void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose);
+ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
+ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
+ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel );
+
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCell >& xCell ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::frame::XModel >& xModel, SCTAB nTab ) throw ( css::uno::RuntimeException );
+
+ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+ScDocument* GetDocumentFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+css::uno::Reference< css::frame::XModel > GetModelFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+
+// ============================================================================
+
+class ScVbaCellRangeAccess
{
namespace vba
{
diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk
index a937849d3ed4..67d600116b0c 100644
--- a/sc/source/ui/vba/makefile.mk
+++ b/sc/source/ui/vba/makefile.mk
@@ -123,15 +123,3 @@ SLOFILES= \
.INCLUDE : target.mk
-.IF "$(L10N_framework)"==""
-
-ALLTAR : \
- $(MISC)$/$(TARGET).don \
-
-$(SLOFILES) : $(MISC)$/$(TARGET).don
-
-$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
- +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
- echo $@
-
-.ENDIF
diff --git a/sc/source/ui/vba/testvba/makefile.mk b/sc/source/ui/vba/testvba/makefile.mk
index 20bdeca5271c..c75f6f63296c 100644
--- a/sc/source/ui/vba/testvba/makefile.mk
+++ b/sc/source/ui/vba/testvba/makefile.mk
@@ -36,11 +36,6 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
DLLPRE =
-.IF "$(ENABLE_VBA)"!="YES"
-dummy:
- @echo "not building vba..."
-.ENDIF
-
INCPRE=$(INCCOM)$/$(TARGET)
CDEFS+=-DVBA_OOBUILD_HACK
diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx
index d93f2515cc35..4a318098684e 100644
--- a/sc/source/ui/vba/testvba/testvba.cxx
+++ b/sc/source/ui/vba/testvba/testvba.cxx
@@ -132,7 +132,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
// Loading the wanted document
Sequence< PropertyValue > propertyValues(1);
propertyValues[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" ));
- propertyValues[0].Value <<= sal_False;
+ propertyValues[0].Value <<= false;
rtl::OUString sfileUrl = convertToURL( sUrl );
printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -208,7 +208,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
// if only one frame and model, click a button which related will colse.
// will make a crash. It related with window listener.
// so, for run all test cases, it should not close the document at this moment.
- xCloseable->close(sal_False);
+ xCloseable->close(false);
printf("closed\n");
}
else
@@ -237,7 +237,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "not a directory: ")).concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 );
}
// Getting all files and directories in the current directory
- Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, sal_False );
+ Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, false );
// Iterating for each file and directory
printf( "Entries %d\n", (int)entries.getLength() );
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index d54ea2bdff59..59bf41d21cd1 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -82,6 +82,7 @@
#include "appoptio.hxx"
#include <osl/file.hxx>
+#include <rtl/instance.hxx>
#include <map>
@@ -149,11 +150,32 @@ public:
ActiveWorkbook( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext) : ScVbaWorkbook( xParent, xContext ){}
};
+// ============================================================================
+
+/** Global application settings shared by all open workbooks. */
+struct ScVbaAppSettings
+{
+ sal_Int32 mnCalculation;
+ sal_Bool mbDisplayAlerts;
+ sal_Bool mbEnableEvents;
+
+ explicit ScVbaAppSettings();
+};
+
+ScVbaAppSettings::ScVbaAppSettings() :
+ mnCalculation( excel::XlCalculation::xlCalculationAutomatic ),
+ mbDisplayAlerts( sal_True ),
+ mbEnableEvents( sal_True )
+{
+}
+
+struct ScVbaStaticAppSettings : public ::rtl::Static< ScVbaAppSettings, ScVbaStaticAppSettings > {};
+
+// ============================================================================
+
ScVbaApplication::ScVbaApplication( const uno::Reference<uno::XComponentContext >& xContext ) :
ScVbaApplication_BASE( xContext ),
- m_xCalculation( excel::XlCalculation::xlCalculationAutomatic ),
- m_bDisplayAlerts( sal_True ),
- m_bEnableEvents( sal_True )
+ mrAppSettings( ScVbaStaticAppSettings::get() )
{
}
@@ -301,7 +323,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
OUString aPropName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_FILTERED_RANGE_SELECTION ) );
uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
uno::Any any;
- any <<= sal_False;
+ any <<= false;
xPropSet->setPropertyValue( aPropName, any );
uno::Reference< uno::XInterface > aSelection = ScUnoHelpFunctions::AnyToInterface(
xSelSupp->getSelection() );
@@ -457,7 +479,7 @@ ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
}
else
{
- result <<= sal_False;
+ result <<= false;
}
return result;
}
@@ -466,7 +488,7 @@ void SAL_CALL
ScVbaApplication::setCutCopyMode( const uno::Any& _cutcopymode ) throw (uno::RuntimeException)
{
// According to Excel's behavior, no matter what is the value of _cutcopymode, always releases the clip object.
- sal_Bool bCutCopyMode = sal_False;
+ sal_Bool bCutCopyMode = false;
if ( ( _cutcopymode >>= bCutCopyMode ) )
{
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
@@ -514,19 +536,21 @@ void SAL_CALL
ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::RuntimeException)
{
rtl::OUString sText;
- sal_Bool bDefault = sal_False;
+ sal_Bool bDefault = false;
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
uno::Reference< task::XStatusIndicatorSupplier > xStatusIndicatorSupplier( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
uno::Reference< task::XStatusIndicator > xStatusIndicator( xStatusIndicatorSupplier->getStatusIndicator(), uno::UNO_QUERY_THROW );
if( _statusbar >>= sText )
{
setDisplayStatusBar( sal_True );
- xStatusIndicator->start( sText, 100 );
- //xStatusIndicator->setText( sText );
+ if ( sText.getLength() )
+ xStatusIndicator->start( sText, 100 );
+ else
+ xStatusIndicator->end(); // restore normal state for empty text
}
else if( _statusbar >>= bDefault )
{
- if( bDefault == sal_False )
+ if( bDefault == false )
{
xStatusIndicator->end();
setDisplayStatusBar( sal_True );
@@ -540,6 +564,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime
::sal_Int32 SAL_CALL
ScVbaApplication::getCalculation() throw (uno::RuntimeException)
{
+ // TODO: in Excel, this is an application-wide setting
uno::Reference<sheet::XCalculatable> xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
if(xCalc->isAutomaticCalculationEnabled())
return excel::XlCalculation::xlCalculationAutomatic;
@@ -550,11 +575,12 @@ ScVbaApplication::getCalculation() throw (uno::RuntimeException)
void SAL_CALL
ScVbaApplication::setCalculation( ::sal_Int32 _calculation ) throw (uno::RuntimeException)
{
+ // TODO: in Excel, this is an application-wide setting
uno::Reference< sheet::XCalculatable > xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
switch(_calculation)
{
case excel::XlCalculation::xlCalculationManual:
- xCalc->enableAutomaticCalculation(sal_False);
+ xCalc->enableAutomaticCalculation(false);
break;
case excel::XlCalculation::xlCalculationAutomatic:
case excel::XlCalculation::xlCalculationSemiautomatic:
@@ -575,7 +601,6 @@ void SAL_CALL
ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
{
StarBASIC* pBasic = SFX_APP()->GetBasic();
- SFX_APP()->EnterBasicCall();
SbxArrayRef aArgs = new SbxArray;
SbxVariableRef aRef = new SbxVariable;
aRef->PutDouble( time );
@@ -589,8 +614,6 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
// forces a broadcast
SbxVariableRef pNew = new SbxMethod( *((SbxMethod*)pMeth));
}
- SFX_APP()->LeaveBasicCall();
-
}
uno::Any SAL_CALL
@@ -656,12 +679,12 @@ void SAL_CALL
ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) throw (uno::RuntimeException)
{
//test Scroll is a boolean
- sal_Bool bScroll = sal_False;
+ sal_Bool bScroll = false;
//R1C1-style string or a string of procedure name.
if( Scroll.hasValue() )
{
- sal_Bool aScroll = sal_False;
+ sal_Bool aScroll = false;
if( Scroll >>= aScroll )
{
bScroll = aScroll;
@@ -783,7 +806,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
case excel::XlMousePointer::xlNorthwestArrow:
{
const Pointer& rPointer( POINTER_ARROW );
- setCursorHelper( xModel, rPointer, sal_False );
+ setCursorHelper( xModel, rPointer, false );
break;
}
case excel::XlMousePointer::xlWait:
@@ -797,7 +820,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
case excel::XlMousePointer::xlDefault:
{
const Pointer& rPointer( POINTER_NULL );
- setCursorHelper( xModel, rPointer, sal_False );
+ setCursorHelper( xModel, rPointer, false );
break;
}
default:
@@ -831,25 +854,25 @@ ScVbaApplication::getName() throw (uno::RuntimeException)
void SAL_CALL
ScVbaApplication::setDisplayAlerts(sal_Bool displayAlerts) throw (uno::RuntimeException)
{
- m_bDisplayAlerts = displayAlerts;
+ mrAppSettings.mbDisplayAlerts = displayAlerts;
}
sal_Bool SAL_CALL
ScVbaApplication::getDisplayAlerts() throw (uno::RuntimeException)
{
- return m_bDisplayAlerts;
+ return mrAppSettings.mbDisplayAlerts;
}
void SAL_CALL
ScVbaApplication::setEnableEvents(sal_Bool bEnable) throw (uno::RuntimeException)
{
- m_bEnableEvents = bEnable;
+ mrAppSettings.mbEnableEvents = bEnable;
}
sal_Bool SAL_CALL
ScVbaApplication::getEnableEvents() throw (uno::RuntimeException)
{
- return m_bEnableEvents;
+ return mrAppSettings.mbEnableEvents;
}
sal_Bool SAL_CALL
@@ -1317,7 +1340,7 @@ ScVbaApplication::Volatile( const uno::Any& aVolatile ) throw ( uno::RuntimeExc
::sal_Bool SAL_CALL
ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
{
- sal_Bool bRes = sal_False;
+ sal_Bool bRes = false;
ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext );
if ( pViewShell )
{
@@ -1327,7 +1350,7 @@ ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
pViewShell->GetState( reqList );
const SfxPoolItem *pItem=0;
- if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, sal_False, &pItem ) == SFX_ITEM_SET )
+ if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, false, &pItem ) == SFX_ITEM_SET )
bRes = ((SfxBoolItem*)pItem)->GetValue();
}
return bRes;
@@ -1350,7 +1373,6 @@ uno::Any SAL_CALL
ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException )
{
StarBASIC* pBasic = SFX_APP()->GetBasic();
- SFX_APP()->EnterBasicCall();
SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD );
uno::Any aRet;
if ( pMeth )
@@ -1361,14 +1383,13 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeExcep
OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), rtl::OUStringToOString( pNew->GetString(), RTL_TEXTENCODING_UTF8 ).getStr() );
aRet = sbxToUnoValue( pNew );
}
- SFX_APP()->LeaveBasicCall();
return aRet;
}
uno::Any SAL_CALL
ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& FilterIndex, const uno::Any& Title, const uno::Any& ButtonText, const uno::Any& MultiSelect) throw (uno::RuntimeException)
{
- uno::Any aRet = uno::makeAny( sal_False );
+ uno::Any aRet = uno::makeAny( false );
try
{
const rtl::OUString sServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
@@ -1426,7 +1447,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
ButtonText >>= sButtonText;
xPickerControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, sButtonText );
}
- sal_Bool bMultiSelect = sal_False;
+ sal_Bool bMultiSelect = false;
if ( xFilePicker.is() && MultiSelect.hasValue() )
{
MultiSelect >>= bMultiSelect;
@@ -1435,7 +1456,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
if ( xFilePicker.is() && xFilePicker->execute() )
{
- sal_Bool bUseXFilePicker2 = sal_False;
+ sal_Bool bUseXFilePicker2 = false;
uno::Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
if ( xServiceInfo.is() )
{
@@ -1604,7 +1625,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
sal_Int16 nRet = xFilePicker->execute();
if (nRet == 0)
{
- strRet <<= sal_False;
+ strRet <<= false;
}
else
{
@@ -1636,7 +1657,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
}
else
{
- sal_Bool bValidFilter = sal_False;
+ sal_Bool bValidFilter = false;
FileFilterMap::const_iterator aIt = mFilterNameMap.begin();
while ( aIt != mFilterNameMap.end() )
{
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index bc047b82c7b9..84816902088d 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -39,12 +39,13 @@
typedef cppu::ImplInheritanceHelper1< VbaApplicationBase, ov::excel::XApplication > ScVbaApplication_BASE;
+struct ScVbaAppSettings;
+
class ScVbaApplication : public ScVbaApplication_BASE
{
private:
- sal_Int32 m_xCalculation;
- sal_Bool m_bDisplayAlerts;
- sal_Bool m_bEnableEvents;
+ // note: member variables moved to struct "ScVbaAppSettings", see cxx file, to be shared by all application instances
+ ScVbaAppSettings& mrAppSettings;
rtl::OUString getOfficePath( const rtl::OUString& sPath ) throw ( css::uno::RuntimeException );
css::uno::Reference< ov::XFileSearch > m_xFileSearch;
@@ -56,6 +57,9 @@ public:
ScVbaApplication( const css::uno::Reference< css::uno::XComponentContext >& m_xContext );
virtual ~ScVbaApplication();
+ /** Returns true, if VBA document events are enabled. */
+ static bool getDocumentEventsEnabled();
+
virtual SfxObjectShell* GetDocShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
// XExactName
diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx
index 126719c6fd56..3c91b9cde00b 100644
--- a/sc/source/ui/vba/vbaassistant.cxx
+++ b/sc/source/ui/vba/vbaassistant.cxx
@@ -41,7 +41,7 @@ using namespace ooo::vba::office::MsoAnimationType;
ScVbaAssistant::ScVbaAssistant( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext ): ScVbaAssistantImpl_BASE( xParent, xContext ),
m_sName( RTL_CONSTASCII_USTRINGPARAM( "Clippit" ) )
{
- m_bIsVisible = sal_False;
+ m_bIsVisible = false;
m_nPointsLeft = 795;
m_nPointsTop = 248;
m_nAnimation = msoAnimationIdle;
@@ -66,7 +66,7 @@ sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
return sal_True;
else
- return sal_False;
+ return false;
}
void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 9005ffdf6069..ae182c8a795e 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -168,7 +168,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup)
// bodgy helperapi port bits
sal_Int32 nAxisGroup = xlPrimary;
sal_Int32 nType = -1;
- if ( !_nType.hasValue() || ( ( _nType >>= nType ) == sal_False ) )
+ if ( !_nType.hasValue() || ( ( _nType >>= nType ) == false ) )
throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Axes::Item Failed to extract type" )), uno::Reference< uno::XInterface >() );
if ( _oAxisGroup.hasValue() )
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index 3cab8e7cea53..3d599b25a599 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -61,7 +61,7 @@ ScVbaAxis::isValueAxis() throw( script::BasicErrorException )
return sal_True;
}
-ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False )
+ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( false )
{
oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) );
moChartParent.set( xParent, uno::UNO_QUERY_THROW );
@@ -132,23 +132,23 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio
{
case xlAxisCrossesAutomatic: //Microsoft Excel sets the axis crossing point.
mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny( sal_True ) );
- bCrossesAreCustomized = sal_False;
+ bCrossesAreCustomized = false;
return;
case xlAxisCrossesMinimum: // The axis crosses at the minimum value.
mxPropertySet->getPropertyValue(VBA_MIN) >>= fNum;
setCrossesAt( fNum );
- bCrossesAreCustomized = sal_False;
+ bCrossesAreCustomized = false;
break;
case xlAxisCrossesMaximum: // The axis crosses at the maximum value.
mxPropertySet->getPropertyValue(VBA_MAX) >>= fNum;
setCrossesAt(fNum);
- bCrossesAreCustomized = sal_False;
+ bCrossesAreCustomized = false;
break;
default: //xlAxisCrossesCustom
bCrossesAreCustomized = sal_True;
break;
}
- mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(sal_False) );
+ mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(false) );
}
catch (uno::Exception& )
{
@@ -161,7 +161,7 @@ ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeExcept
sal_Int32 nCrosses = xlAxisCrossesCustom;
try
{
- sal_Bool bisAutoOrigin = sal_False;
+ sal_Bool bisAutoOrigin = false;
mxPropertySet->getPropertyValue(AUTOORIGIN) >>= bisAutoOrigin;
if (bisAutoOrigin)
nCrosses = xlAxisCrossesAutomatic;
@@ -194,8 +194,8 @@ ScVbaAxis::setCrossesAt( double _fCrossesAt ) throw (script::BasicErrorException
{
try
{
- setMaximumScaleIsAuto( sal_False );
- setMinimumScaleIsAuto( sal_False );
+ setMaximumScaleIsAuto( false );
+ setMinimumScaleIsAuto( false );
mxPropertySet->setPropertyValue(ORIGIN, uno::makeAny(_fCrossesAt));
}
catch (uno::Exception& e)
@@ -260,7 +260,7 @@ ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorExcepti
::sal_Bool SAL_CALL
ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bHasTitle = sal_False;
+ sal_Bool bHasTitle = false;
try
{
ScVbaChart* pChart = getChartPtr();
@@ -331,7 +331,7 @@ ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::Bas
::sal_Bool SAL_CALL
ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -356,7 +356,7 @@ ScVbaAxis::setReversePlotOrder( ::sal_Bool /*ReversePlotOrder*/ ) throw (script:
ScVbaAxis::getReversePlotOrder( ) throw (script::BasicErrorException, uno::RuntimeException)
{
DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString());
- return sal_False;
+ return false;
}
void SAL_CALL
@@ -410,7 +410,7 @@ ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::Bas
::sal_Bool SAL_CALL
ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -479,7 +479,7 @@ ScVbaAxis::setMaximumScaleIsAuto( ::sal_Bool _bMaximumScaleIsAuto ) throw (scrip
::sal_Bool SAL_CALL
ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -541,7 +541,7 @@ ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (scrip
::sal_Bool SAL_CALL
ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -572,7 +572,7 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorExce
switch (_nScaleType)
{
case xlScaleLinear:
- mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( sal_False ) );
+ mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( false ) );
break;
case xlScaleLogarithmic:
mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( sal_True ) );
@@ -597,7 +597,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce
{
if (isValueAxis())
{
- sal_Bool bisLogarithmic = sal_False;
+ sal_Bool bisLogarithmic = false;
mxPropertySet->getPropertyValue( rtl::OUString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Logarithmic"))) ) >>= bisLogarithmic;
if (bisLogarithmic)
nScaleType = xlScaleLogarithmic;
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 011b0a4a72e1..2b163afc2a74 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -47,8 +47,8 @@ ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xPar
{
if ( ( nStart + 1 ) > m_xSimpleText->getString().getLength() )
//nStart = m_xSimpleText->getString().getLength();
- xTextCursor->gotoEnd( sal_False );
- xTextCursor->goRight( nStart, sal_False );
+ xTextCursor->gotoEnd( false );
+ xTextCursor->goRight( nStart, false );
}
if ( nLength < 0 ) // expand to end
xTextCursor->gotoEnd( sal_True );
diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx
index df2fcf348619..b9711fcb86df 100644
--- a/sc/source/ui/vba/vbacharacters.hxx
+++ b/sc/source/ui/vba/vbacharacters.hxx
@@ -49,7 +49,7 @@ private:
// Add becuase of MSO has diferent behavior.
sal_Bool bReplace;
public:
- ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = sal_False ) throw ( css::lang::IllegalArgumentException );
+ ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = false ) throw ( css::lang::IllegalArgumentException );
virtual ~ScVbaCharacters() {}
// Attributes
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index c46569a8c44d..16893723a19a 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -166,7 +166,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce
}
else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.StockDiagram"))))
{
- sal_Bool bVolume = sal_False;
+ sal_Bool bVolume = false;
mxDiagramPropertySet->getPropertyValue(VOLUME) >>= bVolume;
if (bVolume)
{
@@ -179,7 +179,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce
}
else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.XYDiagram"))))
{
- sal_Bool bHasLines = sal_False;
+ sal_Bool bHasLines = false;
mxDiagramPropertySet->getPropertyValue(LINES) >>= bHasLines;
sal_Int32 nSplineType = 0;
mxDiagramPropertySet->getPropertyValue(SPLINETYPE) >>= nSplineType;
@@ -331,7 +331,7 @@ try
case xlXYScatter:
case xlBubble: // not possible
case xlBubble3DEffect: // not possible
- mxDiagramPropertySet->setPropertyValue(LINES, uno::makeAny( sal_False ));
+ mxDiagramPropertySet->setPropertyValue(LINES, uno::makeAny( false ));
break;
case xlXYScatterLines:
case xlXYScatterLinesNoMarkers:
@@ -385,7 +385,7 @@ try
default:
if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(DEEP))
{
- mxDiagramPropertySet->setPropertyValue(DEEP, uno::makeAny( sal_False));
+ mxDiagramPropertySet->setPropertyValue(DEEP, uno::makeAny( false));
}
break;
}
@@ -455,7 +455,7 @@ try
default:
if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(VERTICAL))
{
- mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::makeAny(sal_False));
+ mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::makeAny(false));
}
break;
}
@@ -476,7 +476,7 @@ try
case xlConeBarStacked:
case xlPyramidColStacked:
case xlPyramidBarStacked:
- mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( sal_False ));
+ mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( false ));
mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( sal_True ));
break;
case xlPyramidColStacked100:
@@ -497,8 +497,8 @@ try
mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( sal_True ));
break;
default:
- mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( sal_False));
- mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( sal_False));
+ mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( false));
+ mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( false));
break;
}
switch (_nChartType)
@@ -542,7 +542,7 @@ try
default:
if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(DIM3D))
{
- mxDiagramPropertySet->setPropertyValue(DIM3D, uno::makeAny( sal_False));
+ mxDiagramPropertySet->setPropertyValue(DIM3D, uno::makeAny( false));
}
break;
}
@@ -583,8 +583,8 @@ ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange
mxTableChart->setRanges(mRangeAddresses);
- sal_Bool bsetRowHeaders = sal_False;
- sal_Bool bsetColumnHeaders = sal_False;
+ sal_Bool bsetRowHeaders = false;
+ sal_Bool bsetColumnHeaders = false;
ScVbaRange* pRange = static_cast< ScVbaRange* >( _xCalcRange.get() );
if ( pRange )
@@ -822,7 +822,7 @@ ScVbaChart::setLocation( ::sal_Int32 /*where*/, const css::uno::Any& /*Name*/ )
sal_Bool SAL_CALL
ScVbaChart::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bHasTitle = sal_False;
+ sal_Bool bHasTitle = false;
try
{
mxChartPropertySet->getPropertyValue(HASMAINTITLE) >>= bHasTitle;
@@ -851,7 +851,7 @@ ScVbaChart::setHasTitle( ::sal_Bool bTitle ) throw (script::BasicErrorException,
::sal_Bool SAL_CALL
ScVbaChart::getHasLegend( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bHasLegend = sal_False;
+ sal_Bool bHasLegend = false;
try
{
mxChartPropertySet->getPropertyValue(HASLEGEND) >>= bHasLegend;
@@ -897,7 +897,7 @@ bool
ScVbaChart::is3D() throw ( uno::RuntimeException )
{
// #TODO perhaps provide limited Debughelper functionality
- sal_Bool is3d = sal_False;
+ sal_Bool is3d = false;
mxDiagramPropertySet->getPropertyValue(DIM3D) >>= is3d;
return is3d;
}
@@ -921,7 +921,7 @@ bool
ScVbaChart::isStacked() throw ( uno::RuntimeException )
{
// #TODO perhaps provide limited Debughelper functionality
- sal_Bool bStacked = sal_False;
+ sal_Bool bStacked = false;
mxDiagramPropertySet->getPropertyValue(STACKED) >>= bStacked;
return bStacked;
}
@@ -930,7 +930,7 @@ bool
ScVbaChart::is100PercentStacked() throw ( uno::RuntimeException )
{
// #TODO perhaps provide limited Debughelper functionality
- sal_Bool b100Percent = sal_False;
+ sal_Bool b100Percent = false;
mxDiagramPropertySet->getPropertyValue(PERCENT) >>= b100Percent;
return b100Percent;
}
@@ -971,7 +971,7 @@ ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _
sal_Int32
ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw (script::BasicErrorException)
{
- sal_Bool bUpDown = sal_False;
+ sal_Bool bUpDown = false;
try
{
mxDiagramPropertySet->getPropertyValue(UPDOWN) >>= bUpDown;
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index f707fad1eb13..402d9e9e1667 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -202,14 +202,14 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
if ( bOverwrite )
{
xTextCursor->collapseToStart();
- xTextCursor->gotoStart( sal_False );
- xTextCursor->goRight( nStart - 1, sal_False );
+ xTextCursor->gotoStart( false );
+ xTextCursor->goRight( nStart - 1, false );
xTextCursor->gotoEnd( sal_True );
}
else
{
xTextCursor->collapseToStart();
- xTextCursor->gotoStart( sal_False );
+ xTextCursor->gotoStart( false );
xTextCursor->goRight( nStart - 1 , sal_True );
}
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 7cbcc8592721..f1c706a7a091 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -49,6 +49,7 @@
#include "cellsuno.hxx"
#include "convuno.hxx"
+#include "vbaapplication.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::script::vba::VBAEventId;
@@ -56,6 +57,51 @@ using namespace ::ooo::vba;
// ============================================================================
+namespace {
+
+/** Extracts a sheet index from the specified element of the passed sequence.
+ The element may be an integer, a Calc range or ranges object, or a VBA Range object. */
+SCTAB lclGetTabFromArgs( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException)
+{
+ VbaEventsHelperBase::checkArgument( rArgs, nIndex );
+
+ // first try to extract a sheet index
+ SCTAB nTab = -1;
+ if( rArgs[ nIndex ] >>= nTab )
+ return nTab;
+
+ // try VBA Range object
+ uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex );
+ if( xVbaRange.is() )
+ {
+ uno::Reference< XHelperInterface > xVbaHelper( xVbaRange, uno::UNO_QUERY_THROW );
+ // TODO: in the future, the parent may be an excel::XChart (chart sheet) -> will there be a common base interface?
+ uno::Reference< excel::XWorksheet > xVbaSheet( xVbaHelper->getParent(), uno::UNO_QUERY_THROW );
+ // VBA sheet index is 1-based
+ return static_cast< SCTAB >( xVbaSheet->getIndex() - 1 );
+ }
+
+ // try single UNO range object
+ uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable = getXSomethingFromArgs< sheet::XCellRangeAddressable >( rArgs, nIndex );
+ if( xCellRangeAddressable.is() )
+ return xCellRangeAddressable->getRangeAddress().Sheet;
+
+ // at last, try UNO range list
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
+ if( xRanges.is() )
+ {
+ uno::Sequence< table::CellRangeAddress > aRangeAddresses = xRanges->getRangeAddresses();
+ if( aRangeAddresses.getLength() > 0 )
+ return aRangeAddresses[ 0 ].Sheet;
+ }
+
+ throw lang::IllegalArgumentException();
+}
+
+} // namespace
+
+// ============================================================================
+
typedef ::cppu::WeakImplHelper4<
awt::XWindowListener, util::XCloseListener, frame::XBorderResizeListener, util::XChangesListener > ScVbaEventsListener_BASE;
@@ -91,7 +137,6 @@ private:
uno::Reference< awt::XWindow > getContainerWindow();
bool isMouseReleased();
DECL_LINK( fireResizeMacro, void* );
- void processWindowResizeMacro();
private:
::osl::Mutex maMutex;
@@ -288,7 +333,7 @@ void SAL_CALL ScVbaEventsListener::changesOccurred( const util::ChangesEvent& aE
aChange.ReplacedElement >>= xRangeObj;
if( xRangeObj.is() )
{
- uno::Sequence< uno::Any > aArgs(1);
+ uno::Sequence< uno::Any > aArgs( 1 );
aArgs[0] <<= xRangeObj;
mrVbaEvents.processVbaEvent( WORKSHEET_CHANGE, aArgs );
}
@@ -363,8 +408,14 @@ bool ScVbaEventsListener::isMouseReleased()
IMPL_LINK( ScVbaEventsListener, fireResizeMacro, void*, EMPTYARG )
{
- if( !mbDisposed && isMouseReleased() )
- processWindowResizeMacro();
+ if( !mbDisposed && isMouseReleased() ) try
+ {
+ mrVbaEvents.processVbaEvent( WORKBOOK_WINDOWRESIZE, uno::Sequence< uno::Any >() );
+ }
+ catch( uno::Exception& )
+ {
+ // #163419# do not throw exceptions into application core
+ }
release();
return 0;
}
@@ -450,43 +501,19 @@ void SAL_CALL ScVbaEventsHelper::disposing( const lang::EventObject& rSource ) t
// protected ------------------------------------------------------------------
-bool ScVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException)
+bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
+ const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& rArgs ) throw (uno::RuntimeException)
{
// document and document shell are needed during event processing
- if( !mpDocShell || !mpDoc )
+ if( !mpShell || !mpDoc )
throw uno::RuntimeException();
- // get Application object and check if events are enabled (this is an Excel-only attribute)
- uno::Reference< excel::XApplication > xApplication( mxApplication.get(), uno::UNO_QUERY );
- if( !xApplication.is() && mpShell )
- {
- uno::Any aVBAGlobals;
- mpShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aVBAGlobals );
- uno::Reference< XHelperInterface > xHelperInterface( aVBAGlobals, uno::UNO_QUERY );
- if( xHelperInterface.is() )
- {
- xApplication.set( xHelperInterface->Application(), uno::UNO_QUERY );
- mxApplication = xApplication;
- }
- }
- if( !xApplication.is() )
- throw uno::RuntimeException();
+ // framework and Calc fire a few events before 'opened', ignore them
+ bool bExecuteEvent = mbOpened;
- // return whether event processing is enabled
- return xApplication->getEnableEvents();
-}
-
-bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
- const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& rArgs ) throw (uno::RuntimeException)
-{
- // check preconditions for some events, add more events if needed
- bool bExecuteEvent = true;
+ // special handling for some events
switch( rInfo.mnEventId )
{
- case WORKBOOK_ACTIVATE:
- // while loading, framework fires this before 'opened' event, delay it
- bExecuteEvent = mbOpened;
- break;
case WORKBOOK_OPEN:
bExecuteEvent = !mbOpened;
if( bExecuteEvent )
@@ -499,15 +526,25 @@ bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
break;
case WORKSHEET_SELECTIONCHANGE:
// if selection is not changed, then do not fire the event
- bExecuteEvent = mbOpened && isSelectionChanged( rArgs, 0 );
+ bExecuteEvent = bExecuteEvent && isSelectionChanged( rArgs, 0 );
break;
}
- // add workbook event associated to a sheet event
- bool bSheetEvent = false;
- rInfo.maUserData >>= bSheetEvent;
- if( bSheetEvent && bExecuteEvent )
- rEventQueue.push_back( EventQueueEntry( rInfo.mnEventId + USERDEFINED_START, rArgs ) );
+ if( bExecuteEvent )
+ {
+ // add workbook event associated to a sheet event
+ bool bSheetEvent = false;
+ if( (rInfo.maUserData >>= bSheetEvent) && bSheetEvent )
+ rEventQueue.push_back( EventQueueEntry( rInfo.mnEventId + USERDEFINED_START, rArgs ) );
+
+ /* For document events: check if events are enabled via the
+ Application.EnableEvents symbol (this is an Excel-only attribute).
+ Check this again for every event, as the event handler may change
+ the state of the EnableEvents symbol. Global events such as
+ AUTO_OPEN and AUTO_CLOSE are always enabled. */
+ if( rInfo.meType == EVENTHANDLER_DOCUMENT )
+ bExecuteEvent = ScVbaApplication::getDocumentEventsEnabled();
+ }
return bExecuteEvent;
}
@@ -631,7 +668,7 @@ void ScVbaEventsHelper::implPostProcessEvent( EventQueue& rEventQueue,
{
bool bSheetEvent = false;
rInfo.maUserData >>= bSheetEvent;
- SCTAB nTab = bSheetEvent ? getTabFromArgs( rArgs, 0 ) : -1;
+ SCTAB nTab = bSheetEvent ? lclGetTabFromArgs( rArgs, 0 ) : -1;
if( bSheetEvent && (nTab < 0) )
throw lang::IllegalArgumentException();
@@ -645,34 +682,31 @@ void ScVbaEventsHelper::implPostProcessEvent( EventQueue& rEventQueue,
// private --------------------------------------------------------------------
-SCTAB ScVbaEventsHelper::getTabFromArgs( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException)
-{
- checkArgument( rArgs, nIndex );
+namespace {
- // first try to extract a sheet index
- SCTAB nTab = -1;
- if( rArgs[ nIndex ] >>= nTab )
- return nTab;
+/** Compares the passed range lists representing sheet selections. Ignores
+ selections that refer to different sheets (returns false in this case). */
+bool lclSelectionChanged( const ScRangeList& rLeft, const ScRangeList& rRight )
+{
+ // one of the range lists empty? -> return false, if both lists empty
+ bool bLeftEmpty = rLeft.Count() == 0;
+ bool bRightEmpty = rRight.Count() == 0;
+ if( bLeftEmpty || bRightEmpty )
+ return !(bLeftEmpty && bRightEmpty);
- // next, try single range object
- uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable = getXSomethingFromArgs< sheet::XCellRangeAddressable >( rArgs, nIndex );
- if( xCellRangeAddressable.is() )
- return xCellRangeAddressable->getRangeAddress().Sheet;
+ // check sheet indexes of the range lists (assuming that all ranges in a list are on the same sheet)
+ if( rLeft.GetObject( 0 )->aStart.Tab() != rRight.GetObject( 0 )->aStart.Tab() )
+ return false;
- // at last, try range list
- uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
- if( xRanges.is() )
- {
- uno::Sequence< table::CellRangeAddress > aRangeAddresses = xRanges->getRangeAddresses();
- if( aRangeAddresses.getLength() > 0 )
- return aRangeAddresses[ 0 ].Sheet;
- }
-
- throw lang::IllegalArgumentException();
+ // compare all ranges
+ return rLeft != rRight;
}
+} // namespace
+
bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException, uno::RuntimeException)
{
+ uno::Reference< uno::XInterface > xOldSelection( maOldSelection, uno::UNO_QUERY );
uno::Reference< uno::XInterface > xNewSelection = getXSomethingFromArgs< uno::XInterface >( rArgs, nIndex, false );
if( ScCellRangesBase* pNewCellRanges = ScCellRangesBase::getImplementation( xNewSelection ) )
{
@@ -687,53 +721,46 @@ bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rAr
uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- // Eventually we will be able to pull the Workbook/Worksheet objects
- // directly from basic and register them as listeners
-
// extract sheet index, will throw, if parameter is invalid
- SCTAB nTab = getTabFromArgs( rArgs, nIndex );
-
- // create Workbook
- uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= uno::Reference< uno::XInterface >();
- aArgs[ 1 ] <<= mxModel;
- uno::Reference< uno::XInterface > xWorkbook( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Workbook", aArgs ), uno::UNO_SET_THROW );
-
- // create WorkSheet
- String aSheetName;
- mpDoc->GetName( nTab, aSheetName );
- aArgs = uno::Sequence< uno::Any >( 3 );
- aArgs[ 0 ] <<= xWorkbook;
- aArgs[ 1 ] <<= mxModel;
- aArgs[ 2 ] <<= ::rtl::OUString( aSheetName );
- uno::Reference< uno::XInterface > xWorksheet( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Worksheet", aArgs ), uno::UNO_SET_THROW );
- return uno::Any( xWorksheet );
+ SCTAB nTab = lclGetTabFromArgs( rArgs, nIndex );
+ return uno::Any( excel::getUnoSheetModuleObj( mxModel, nTab ) );
}
uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
- uno::Reference< table::XCellRange > xRange = getXSomethingFromArgs< table::XCellRange >( rArgs, nIndex );
- if ( !xRanges.is() && !xRange.is() )
- throw lang::IllegalArgumentException();
+ // it is possible to pass an existing VBA Range object
+ uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex );
+ if( !xVbaRange.is() )
+ {
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
+ uno::Reference< table::XCellRange > xRange = getXSomethingFromArgs< table::XCellRange >( rArgs, nIndex );
+ if ( !xRanges.is() && !xRange.is() )
+ throw lang::IllegalArgumentException();
- uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); // dummy parent
- if ( xRanges.is() )
- aArgs[ 1 ] <<= xRanges;
- else
- aArgs[ 1 ] <<= xRange;
- uno::Reference< uno::XInterface > xVbaRange( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Range", aArgs ), uno::UNO_SET_THROW );
+ uno::Sequence< uno::Any > aArgs( 2 );
+ if ( xRanges.is() )
+ {
+ aArgs[ 0 ] <<= excel::getUnoSheetModuleObj( xRanges );
+ aArgs[ 1 ] <<= xRanges;
+ }
+ else
+ {
+ aArgs[ 0 ] <<= excel::getUnoSheetModuleObj( xRange );
+ aArgs[ 1 ] <<= xRange;
+ }
+ xVbaRange.set( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Range", aArgs ), uno::UNO_QUERY_THROW );
+ }
return uno::Any( xVbaRange );
}
uno::Any ScVbaEventsHelper::createHyperlink( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
+ uno::Reference< table::XCell > xCell = getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false );
uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); // dummy parent
- aArgs[ 1 ] <<= getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false );
+ aArgs[ 0 ] <<= excel::getUnoSheetModuleObj( xCell );
+ aArgs[ 1 ] <<= xCell;
uno::Reference< uno::XInterface > xHyperlink( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Hyperlink", aArgs ), uno::UNO_SET_THROW );
return uno::Any( xHyperlink );
}
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
index f0c73dd88d7f..f299afd7ac6c 100644
--- a/sc/source/ui/vba/vbaeventshelper.hxx
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -34,8 +34,6 @@
#include "excelvbahelper.hxx"
#include "rangelst.hxx"
-namespace ooo { namespace vba { namespace excel { class XApplication; } } }
-
class ScVbaEventsListener;
// ============================================================================
@@ -52,16 +50,12 @@ public:
virtual void SAL_CALL disposing( const css::lang::EventObject& rSource ) throw (css::uno::RuntimeException);
protected:
- virtual bool implEventsEnabled() throw (css::uno::RuntimeException);
virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException);
virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException);
virtual ::rtl::OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException);
private:
- /** Extracts a sheet index from the first element of the passed sequence. The
- element may be an integer, or a Calc range or ranges object. */
- static SCTAB getTabFromArgs( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException);
/** Checks if selection has been changed compared to selection of last call.
@return true, if the selection has been changed. */
bool isSelectionChanged( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
@@ -76,11 +70,10 @@ private:
css::uno::Any createWindow() const throw (css::uno::RuntimeException);
private:
- mutable css::uno::WeakReference< ov::excel::XApplication > mxApplication;
::rtl::Reference< ScVbaEventsListener > mxListener;
+ css::uno::Any maOldSelection;
ScDocShell* mpDocShell;
ScDocument* mpDoc;
- ScRangeList maOldSelection;
bool mbOpened;
};
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index fcb561e2d414..1c5e7382c926 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -103,7 +103,7 @@ ScVbaFileDialog::Show( ) throw (::com::sun::star::uno::RuntimeException)
xFilePicker->setMultiSelectionMode(sal_True);
if ( xFilePicker->execute() )
{
- sal_Bool bUseXFilePicker2 = sal_False;
+ sal_Bool bUseXFilePicker2 = false;
Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
if (xServiceInfo.is())
{
diff --git a/sc/source/ui/vba/vbafiledialogselecteditems.cxx b/sc/source/ui/vba/vbafiledialogselecteditems.cxx
index d8ebc937b489..547841a2c987 100644
--- a/sc/source/ui/vba/vbafiledialogselecteditems.cxx
+++ b/sc/source/ui/vba/vbafiledialogselecteditems.cxx
@@ -139,7 +139,7 @@ throw (uno::RuntimeException)
{
return sal_True;
}
- return sal_False;
+ return false;
}
uno::Any SAL_CALL
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 68ade5207674..216b0b7232c4 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -104,7 +104,7 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio
xCell.set( xCellRange->getCellByPosition( 0,0 ) );
uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
- sal_Bool bValue = sal_False;
+ sal_Bool bValue = false;
aValue >>= bValue;
sal_Int16 nValue = NORMAL;
sal_Int8 nValue2 = NORMALHEIGHT;
@@ -176,7 +176,7 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException
xCell.set( xCellRange->getCellByPosition( 0,0 ) );
uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
- sal_Bool bValue = sal_False;
+ sal_Bool bValue = false;
aValue >>= bValue;
sal_Int16 nValue = NORMAL;
sal_Int8 nValue2 = NORMALHEIGHT;
@@ -230,7 +230,7 @@ uno::Any SAL_CALL
ScVbaFont::getSize() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getSize();
}
@@ -257,7 +257,7 @@ uno::Any SAL_CALL
ScVbaFont::getColorIndex() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getColorIndex();
}
@@ -304,8 +304,8 @@ ScVbaFont::getStandardFont() throw ( uno::RuntimeException )
void SAL_CALL
ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException )
{
- sal_Bool bBold = sal_False;
- sal_Bool bItalic = sal_False;
+ sal_Bool bBold = false;
+ sal_Bool bItalic = false;
rtl::OUString aStyles;
aValue >>= aStyles;
@@ -337,7 +337,7 @@ uno::Any SAL_CALL
ScVbaFont::getFontStyle() throw ( uno::RuntimeException )
{
rtl::OUStringBuffer aStyles;
- sal_Bool bValue = sal_False;
+ sal_Bool bValue = false;
getBold() >>= bValue;
if( bValue )
aStyles.appendAscii("Bold");
@@ -356,7 +356,7 @@ uno::Any SAL_CALL
ScVbaFont::getBold() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getBold();
}
@@ -399,7 +399,7 @@ uno::Any SAL_CALL
ScVbaFont::getUnderline() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
sal_Int32 nValue = awt::FontUnderline::NONE;
@@ -426,7 +426,7 @@ uno::Any SAL_CALL
ScVbaFont::getStrikethrough() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getStrikethrough();
}
@@ -435,7 +435,7 @@ uno::Any SAL_CALL
ScVbaFont::getShadow() throw (uno::RuntimeException)
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getShadow();
}
@@ -444,7 +444,7 @@ uno::Any SAL_CALL
ScVbaFont::getItalic() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getItalic();
@@ -454,7 +454,7 @@ uno::Any SAL_CALL
ScVbaFont::getName() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getName();
}
@@ -477,7 +477,7 @@ uno::Any SAL_CALL
ScVbaFont::getOutlineFont() throw (uno::RuntimeException)
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ) );
}
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index a493bac28e05..853ddaff2484 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star;
#define LOCALE "Locale"
template< typename Ifc1 >
-ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False )
+ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( false )
{
try
{
@@ -534,7 +534,7 @@ ScVbaFormat<Ifc1>::setLocked( const uno::Any& _aLocked ) throw (script::BasicErr
{
try
{
- sal_Bool bIsLocked = sal_False;
+ sal_Bool bIsLocked = false;
if ( !( _aLocked >>= bIsLocked ) )
throw uno::RuntimeException();
util::CellProtection aCellProtection;
@@ -555,7 +555,7 @@ ScVbaFormat<Ifc1>::setFormulaHidden( const uno::Any& FormulaHidden ) throw (scri
{
try
{
- sal_Bool bIsFormulaHidden = sal_False;
+ sal_Bool bIsFormulaHidden = false;
FormulaHidden >>= bIsFormulaHidden;
util::CellProtection aCellProtection;
rtl::OUString sCellProt( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLPRO ) );
@@ -583,8 +583,8 @@ ScVbaFormat<Ifc1>::getLocked( ) throw (script::BasicErrorException, uno::Runtim
SfxItemSet* pDataSet = getCurrentDataSet();
if ( pDataSet )
{
- const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, TRUE);
- SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, TRUE, NULL);
+ const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, sal_True);
+ SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, sal_True, NULL);
if(eState != SFX_ITEM_DONTCARE)
aCellProtection = uno::makeAny(rProtAttr.GetProtection());
}
@@ -616,8 +616,8 @@ ScVbaFormat<Ifc1>::getFormulaHidden( ) throw (script::BasicErrorException, uno:
SfxItemSet* pDataSet = getCurrentDataSet();
if ( pDataSet )
{
- const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, TRUE);
- SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, TRUE, NULL);
+ const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, sal_True);
+ SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, sal_True, NULL);
if(eState != SFX_ITEM_DONTCARE)
aBoolRet = uno::makeAny(rProtAttr.GetHideFormula());
}
diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx
index deed22ab287e..9874a44c2618 100644
--- a/sc/source/ui/vba/vbaformatcondition.cxx
+++ b/sc/source/ui/vba/vbaformatcondition.cxx
@@ -63,7 +63,7 @@ ScVbaFormatCondition::Modify( ::sal_Int32 _nType, const uno::Any& _aOperator, co
try
{
ScVbaFormatConditions* pFormatConditions = lcl_getScVbaFormatConditionsPtr( moFormatConditions );
- pFormatConditions->removeFormatCondition(msStyleName, sal_False);
+ pFormatConditions->removeFormatCondition(msStyleName, false);
pFormatConditions->Add(_nType, _aOperator, _aFormula1, _aFormula2, mxStyle);
}
catch (uno::Exception& )
diff --git a/sc/source/ui/vba/vbafoundfiles.cxx b/sc/source/ui/vba/vbafoundfiles.cxx
index 9d3af947e1dd..efbddd3451b1 100644
--- a/sc/source/ui/vba/vbafoundfiles.cxx
+++ b/sc/source/ui/vba/vbafoundfiles.cxx
@@ -83,7 +83,7 @@ sal_Bool SAL_CALL VbaFoundFilesEnum::hasMoreElements() throw (css::uno::RuntimeE
{
return sal_True;
}
- return sal_False;
+ return false;
}
css::uno::Any SAL_CALL VbaFoundFilesEnum::nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index 8178608eb3af..adc7b2493b88 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -131,7 +131,7 @@ private:
bool getReplaceCellsWarning() throw ( uno::RuntimeException )
{
- sal_Bool res = sal_False;
+ sal_Bool res = false;
getGlobalSheetSettings()->getPropertyValue( REPLACE_CELLS_WARNING ) >>= res;
return ( res == sal_True );
}
@@ -161,7 +161,7 @@ public:
}
};
-void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall)
+void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nSlot, SfxCallMode nCall)
{
ScTabViewShell* pViewShell = getBestViewShell( xModel );
SfxViewFrame* pViewFrame = NULL;
@@ -203,13 +203,13 @@ implnCut()
{
ScTabViewShell* pViewShell = getCurrentBestViewShell();
if ( pViewShell )
- pViewShell->CutToClip( NULL, TRUE );
+ pViewShell->CutToClip( NULL, sal_True );
}
-void implnPasteSpecial(USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
+void implnPasteSpecial(sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
{
PasteCellsWarningReseter resetWarningBox;
- sal_Bool bAsLink(sal_False), bOtherDoc(sal_False);
+ sal_Bool bAsLink(false), bOtherDoc(false);
InsCellCmd eMoveMode = INS_NONE;
ScTabViewShell* pTabViewShell = ScTabViewShell::GetActiveViewShell();
@@ -232,7 +232,7 @@ void implnPasteSpecial(USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_B
pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc,
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, TRUE );
+ eMoveMode, IDF_NONE, sal_True );
pTabViewShell->CellContentChanged();
}
}
@@ -271,7 +271,7 @@ getCurrentDocument() throw (uno::RuntimeException)
if ( pCompVar )
{
aModel = sbxToUnoValue( pCompVar );
- if ( sal_False == ( aModel >>= xModel ) ||
+ if ( false == ( aModel >>= xModel ) ||
!xModel.is() )
{
// trying last gasp try the current component
@@ -394,8 +394,8 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
sal_Int32 nTo = 0;
sal_Int32 nFrom = 0;
sal_Int16 nCopies = 1;
- sal_Bool bPreview = sal_False;
- sal_Bool bCollate = sal_False;
+ sal_Bool bPreview = false;
+ sal_Bool bCollate = false;
sal_Bool bSelection = bUseSelection;
From >>= nFrom;
To >>= nTo;
@@ -444,7 +444,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
}
SfxBoolItem sfxSelection( SID_SELECTION, bSelection );
aArgs.Put( sfxSelection, sfxSelection.Which() );
- SfxBoolItem sfxAsync( SID_ASYNCHRON, sal_False );
+ SfxBoolItem sfxAsync( SID_ASYNCHRON, false );
aArgs.Put( sfxAsync, sfxAsync.Which() );
SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
@@ -461,7 +461,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
}
}
else
- pDispatcher->Execute( (USHORT)SID_PRINTDOC, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs );
+ pDispatcher->Execute( (sal_uInt16)SID_PRINTDOC, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs );
}
}
@@ -491,7 +491,7 @@ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeEx
{
case uno::TypeClass_BOOLEAN:
{
- sal_Bool bBool = sal_False;
+ sal_Bool bBool = false;
pvargItem >>= bBool;
sString = rtl::OUString::valueOf( bBool );
break;
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index 2f3c5703203f..0a8f8463e390 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -100,7 +100,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch
// insert the text field into the document
xText->setString( OUString() );
uno::Reference< text::XTextRange > xRange( xText->createTextCursor(), uno::UNO_QUERY_THROW );
- xText->insertTextContent( xRange, xUrlField, sal_False );
+ xText->insertTextContent( xRange, xUrlField, false );
}
else
{
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 8379ebafcbc4..1e104e7ff5f4 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -229,7 +229,7 @@ uno::Reference< container::XEnumeration >
ScVbaNames::createEnumeration() throw (uno::RuntimeException)
{
uno::Reference< container::XEnumerationAccess > xEnumAccess( mxNames, uno::UNO_QUERY_THROW );
- return new NamesEnumeration( this, mxContext, xEnumAccess->createEnumeration(), mxModel , mxNames );
+ return new NamesEnumeration( getParent(), mxContext, xEnumAccess->createEnumeration(), mxModel , mxNames );
}
uno::Any
diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx
index 8c28aada76f4..fa75e96f6954 100644
--- a/sc/source/ui/vba/vbapagebreak.cxx
+++ b/sc/source/ui/vba/vbapagebreak.cxx
@@ -46,7 +46,7 @@ template< typename Ifc1 >
sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException)
{
uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )));
- sal_Bool hasPageBreak = sal_False;
+ sal_Bool hasPageBreak = false;
aValue >>= hasPageBreak;
if( !hasPageBreak )
@@ -70,7 +70,7 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException)
if( type == excel::XlPageBreak::xlPageBreakNone )
{
- mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
+ mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(false));
return;
}
@@ -78,13 +78,13 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException)
if( type == excel::XlPageBreak::xlPageBreakManual )
maTablePageBreakData.ManualBreak = sal_True;
else
- maTablePageBreakData.ManualBreak = sal_False;
+ maTablePageBreakData.ManualBreak = false;
}
template< typename Ifc1 >
void ScVbaPageBreak<Ifc1>::Delete() throw ( script::BasicErrorException, uno::RuntimeException)
{
- mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
+ mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(false));
}
template< typename Ifc1 >
diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx
index d8a574d5837d..18d785924c8c 100644
--- a/sc/source/ui/vba/vbapagebreaks.cxx
+++ b/sc/source/ui/vba/vbapagebreaks.cxx
@@ -205,7 +205,7 @@ public:
ScVbaHPageBreaks::ScVbaHPageBreaks( const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak) throw (uno::RuntimeException):
- ScVbaHPageBreaks_BASE( xParent,xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, sal_False )),
+ ScVbaHPageBreaks_BASE( xParent,xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, false )),
mxSheetPageBreak( xSheetPageBreak )
{
}
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index f03ee70b9231..f01e06a64a50 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -81,7 +81,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeEx
if( nCount )
{
ScAddress::Details aDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE );
ScRangeList aRangeList;
for( sal_Int32 i=0; i<nCount; i++ )
@@ -153,7 +153,7 @@ uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeEx
void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
{
- USHORT scaleToPageY = 0;
+ sal_uInt16 scaleToPageY = 0;
try
{
sal_Bool aValue;
@@ -176,10 +176,10 @@ uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeEx
void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException)
{
- USHORT scaleToPageX = 0;
+ sal_uInt16 scaleToPageX = 0;
try
{
- sal_Bool aValue = sal_False;
+ sal_Bool aValue = false;
if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue))
{
fitToPagesWide >>= scaleToPageX;
@@ -199,12 +199,12 @@ uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
{
- USHORT pageScale = 0;
+ sal_uInt16 pageScale = 0;
try
{
if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
{
- sal_Bool aValue = sal_False;
+ sal_Bool aValue = false;
zoom >>= aValue;
if( aValue )
{
@@ -221,7 +221,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru
}
// these only exist in S08
- USHORT nScale = 0;
+ sal_uInt16 nScale = 0;
mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale ));
mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale ));
mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale ));
@@ -463,7 +463,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")));
- sal_Bool bPrintDownFirst = sal_False;
+ sal_Bool bPrintDownFirst = false;
aValue >>= bPrintDownFirst;
if( !bPrintDownFirst )
order = excel::XlOrder::xlOverThenDown;
@@ -483,7 +483,7 @@ void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::Runtim
case excel::XlOrder::xlDownThenOver:
break;
case excel::XlOrder::xlOverThenDown:
- bOrder = sal_False;
+ bOrder = false;
break;
default:
DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
@@ -538,7 +538,7 @@ void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) thr
sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::RuntimeException)
{
- sal_Bool centerVertically = sal_False;
+ sal_Bool centerVertically = false;
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")));
@@ -563,7 +563,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) th
sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::RuntimeException)
{
- sal_Bool centerHorizontally = sal_False;
+ sal_Bool centerHorizontally = false;
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
@@ -588,7 +588,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally
sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
{
- sal_Bool printHeadings = sal_False;
+ sal_Bool printHeadings = false;
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
@@ -691,7 +691,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getPaperSize() throw (css::uno::RuntimeExcept
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")));
aValue >>= size;
- ePaper = SvxPaperInfo::GetSvxPaper( Size(size.Width, size.Height), MAP_100TH_MM, TRUE);
+ ePaper = SvxPaperInfo::GetSvxPaper( Size(size.Width, size.Height), MAP_100TH_MM, true);
}
catch( uno::Exception& )
{
diff --git a/sc/source/ui/vba/vbaquerytable.cxx b/sc/source/ui/vba/vbaquerytable.cxx
index 305c14262d3a..159c7b75adf2 100644
--- a/sc/source/ui/vba/vbaquerytable.cxx
+++ b/sc/source/ui/vba/vbaquerytable.cxx
@@ -67,9 +67,9 @@ ScVbaQueryTable::Refresh( const ::com::sun::star::uno::Any& /*aBackgroundQuery*/
//Get link info
sfx2::LinkManager *pLinkMng = m_pDocument->GetLinkManager();
const ::sfx2::SvBaseLinks &rLinks = pLinkMng->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 3dd34ca7854e..af6336eb39ea 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -25,6 +25,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
+#include "vbarange.hxx"
+
#include <vbahelper/helperdecl.hxx>
#include <comphelper/unwrapargs.hxx>
@@ -32,6 +35,8 @@
#include <sfx2/objsh.hxx>
#include <com/sun/star/script/ArrayWrapper.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/sheet/XDatabaseRange.hpp>
#include <com/sun/star/sheet/XDatabaseRanges.hpp>
#include <com/sun/star/sheet/XGoalSeek.hpp>
@@ -147,7 +152,7 @@
#include <unonames.hxx>
#include <tools/stream.hxx>
-#include "vbarange.hxx"
+#include "vbaapplication.hxx"
#include "vbafont.hxx"
#include "vbacomment.hxx"
#include "vbainterior.hxx"
@@ -192,6 +197,9 @@ using namespace ::ooo::vba;
using namespace ::com::sun::star;
using ::std::vector;
+// difference between VBA and file format width, in character units
+const double fExtraWidth = 182.0 / 256.0;
+
// * 1 point = 1/72 inch = 20 twips
// * 1 inch = 72 points = 1440 twips
// * 1 cm = 567 twips
@@ -199,13 +207,13 @@ double lcl_hmmToPoints( double nVal ) { return ( (double)((nVal /1000 ) * 567 )
static const sal_Int16 supportedIndexTable[] = { excel::XlBordersIndex::xlEdgeLeft, excel::XlBordersIndex::xlEdgeTop, excel::XlBordersIndex::xlEdgeBottom, excel::XlBordersIndex::xlEdgeRight, excel::XlBordersIndex::xlDiagonalDown, excel::XlBordersIndex::xlDiagonalUp, excel::XlBordersIndex::xlInsideVertical, excel::XlBordersIndex::xlInsideHorizontal };
-USHORT lcl_pointsToTwips( double nVal )
+sal_uInt16 lcl_pointsToTwips( double nVal )
{
nVal = nVal * static_cast<double>(20);
short nTwips = static_cast<short>(nVal);
return nTwips;
}
-double lcl_TwipsToPoints( USHORT nVal )
+double lcl_TwipsToPoints( sal_uInt16 nVal )
{
double nPoints = nVal;
return nPoints / 20;
@@ -279,6 +287,26 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
return pDataSet;
}
+void ScVbaRange::fireChangeEvent()
+{
+ if( ScVbaApplication::getDocumentEventsEnabled() )
+ {
+ if( ScDocument* pDoc = getScDocument() )
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVBAEvents = pDoc->GetVbaEventProcessor();
+ if( xVBAEvents.is() ) try
+ {
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= uno::Reference< excel::XRange >( this );
+ xVBAEvents->processVbaEvent( script::vba::VBAEventId::WORKSHEET_CHANGE, aArgs );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ }
+}
+
class SingleRangeEnumeration : public EnumerationHelper_BASE
{
uno::Reference< XHelperInterface > m_xParent;
@@ -486,7 +514,7 @@ public:
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
- SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, TRUE, NULL);
+ SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, true, NULL);
// one of the cells in the range is not like the other ;-)
// so return a zero length format to indicate that
if ( eState == SFX_ITEM_DONTCARE )
@@ -509,7 +537,7 @@ public:
return nType;
}
- bool setNumberFormat( const rtl::OUString& rFormat )
+ bool setNumberFormat( const rtl::OUString& rFormat )
{
lang::Locale aLocale;
uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
@@ -517,7 +545,12 @@ public:
sal_Int32 nNewIndex = mxFormats->queryKey(rFormat, aLocale, false );
if ( nNewIndex == -1 ) // format not defined
{
- nNewIndex = mxFormats->addNew( rFormat, aLocale );
+ lang::Locale aLocale;
+ uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
+ xNumProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Locale" ) ) ) >>= aLocale;
+ nNewIndex = mxFormats->queryKey( rFormat, aLocale, false );
+ if ( nNewIndex == -1 ) // format not defined
+ nNewIndex = mxFormats->addNew( rFormat, aLocale );
}
mxRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat") ), uno::makeAny( nNewIndex ) );
return true;
@@ -681,7 +714,7 @@ CellValueSetter::processValue( const uno::Any& aValue, const uno::Reference< tab
{
case uno::TypeClass_BOOLEAN:
{
- sal_Bool bState = sal_False;
+ sal_Bool bState = false;
if ( aValue >>= bState )
{
uno::Reference< table::XCellRange > xRange( xCell, uno::UNO_QUERY_THROW );
@@ -699,8 +732,26 @@ CellValueSetter::processValue( const uno::Any& aValue, const uno::Reference< tab
rtl::OUString aString;
if ( aValue >>= aString )
{
- uno::Reference< text::XTextRange > xTextRange( xCell, uno::UNO_QUERY_THROW );
- xTextRange->setString( aString );
+ // The required behavior for a string value is:
+ // 1. If the first character is a single quote, use the rest as a string cell, regardless of the cell's number format.
+ // 2. Otherwise, if the cell's number format is "text", use the string value as a string cell.
+ // 3. Otherwise, parse the string value in English locale, and apply a corresponding number format with the cell's locale
+ // if the cell's number format was "General".
+ // Case 1 is handled here, the rest in ScCellObj::InputEnglishString
+
+ if ( aString.toChar() == '\'' ) // case 1 - handle with XTextRange
+ {
+ rtl::OUString aRemainder( aString.copy(1) ); // strip the quote
+ uno::Reference< text::XTextRange > xTextRange( xCell, uno::UNO_QUERY_THROW );
+ xTextRange->setString( aRemainder );
+ }
+ else
+ {
+ // call implementation method InputEnglishString
+ ScCellObj* pCellObj = dynamic_cast< ScCellObj* >( xCell.get() );
+ if ( pCellObj )
+ pCellObj->InputEnglishString( aString );
+ }
}
else
isExtracted = false;
@@ -760,7 +811,7 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference<
if ( sFormula.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("=TRUE()") ) ) )
aValue <<= sal_True;
else if ( sFormula.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("=FALSE()") ) ) )
- aValue <<= sal_False;
+ aValue <<= false;
else
{
uno::Reference< beans::XPropertySet > xProp( xCell, uno::UNO_QUERY_THROW );
@@ -1076,7 +1127,7 @@ public:
};
bool
-getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter = 0 )
+getCellRangesForAddress( sal_uInt16& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter = 0 )
{
ScDocument* pDoc = NULL;
@@ -1084,7 +1135,7 @@ getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDoc
{
pDoc = pDocSh->GetDocument();
String aString(sAddress);
- USHORT nMask = SCA_VALID;
+ sal_uInt16 nMask = SCA_VALID;
rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, cDelimiter );
if ( rResFlags & SCA_VALID )
{
@@ -1149,7 +1200,7 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S
aChar = ';';
}
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( !getCellRangesForAddress( nFlags, sAddress, pDocSh, aCellRanges, eConv, aChar ) )
return false;
@@ -1252,7 +1303,7 @@ void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange,
{
uno::Reference< util::XMergeable > xMerge( lclExpandToMerged( rxCellRange, true ), uno::UNO_QUERY_THROW );
// Calc cannot merge over merged ranges, always unmerge first
- xMerge->merge( sal_False );
+ xMerge->merge( false );
if( bMerge )
{
// clear all contents of the covered cells (not the top-left cell)
@@ -1399,7 +1450,7 @@ void lcl_NotifyRangeChanges( const uno::Reference< frame::XModel >& xModel, ScCe
}
ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args,
- uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), excel::GetModelFromRange( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
+ uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), excel::GetModelFromRange( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( false ), mbIsColumns( false )
{
mxRange.set( mxPropertySet, uno::UNO_QUERY );
mxRanges.set( mxPropertySet, uno::UNO_QUERY );
@@ -1533,7 +1584,7 @@ ScVbaRange::getValue( ValueGetter& valueGetter) throw (uno::RuntimeException)
// multi cell range ( return array )
Dim2ArrayValueGetter arrayGetter( nRowCount, nColCount, valueGetter );
visitArray( arrayGetter );
- return uno::makeAny( script::ArrayWrapper( sal_False, arrayGetter.getValue() ) );
+ return uno::makeAny( script::ArrayWrapper( false, arrayGetter.getValue() ) );
}
uno::Any SAL_CALL
@@ -1591,6 +1642,7 @@ ScVbaRange::setValue( const uno::Any &aValue, ValueSetter& valueSetter ) thro
{
visitArray( valueSetter );
}
+ if( bFireEvent ) fireChangeEvent();
}
void SAL_CALL
@@ -1611,7 +1663,7 @@ ScVbaRange::setValue( const uno::Any &aValue ) throw (uno::RuntimeException)
lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
-void
+void SAL_CALL
ScVbaRange::Clear() throw (uno::RuntimeException)
{
using namespace ::com::sun::star::sheet::CellFlags;
@@ -1624,7 +1676,7 @@ ScVbaRange::Clear() throw (uno::RuntimeException)
//helper ClearContent
void
-ScVbaRange::ClearContents( sal_Int32 nFlags ) throw (uno::RuntimeException)
+ScVbaRange::ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (uno::RuntimeException)
{
// #TODO code within the test below "if ( m_Areas.... " can be removed
// Test is performed only because m_xRange is NOT set to be
@@ -1640,20 +1692,24 @@ ScVbaRange::ClearContents( sal_Int32 nFlags ) throw (uno::RuntimeException)
if ( pRange )
pRange->ClearContents( nFlags );
}
+ // fire change event for the entire range list
+ if( bFireEvent ) fireChangeEvent();
return;
}
uno::Reference< sheet::XSheetOperation > xSheetOperation(mxRange, uno::UNO_QUERY_THROW);
xSheetOperation->clearContents( nFlags );
+ if( bFireEvent ) fireChangeEvent();
}
-void
+
+void SAL_CALL
ScVbaRange::ClearComments() throw (uno::RuntimeException)
{
- ClearContents( sheet::CellFlags::ANNOTATION );
+ ClearContents( sheet::CellFlags::ANNOTATION, false );
}
-void
+void SAL_CALL
ScVbaRange::ClearContents() throw (uno::RuntimeException)
{
sal_Int32 nClearFlags = ( sheet::CellFlags::VALUE |
@@ -1665,7 +1721,7 @@ ScVbaRange::ClearContents() throw (uno::RuntimeException)
lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
-void
+void SAL_CALL
ScVbaRange::ClearFormats() throw (uno::RuntimeException)
{
//FIXME: need to check if we need to combine sheet::CellFlags::FORMATTED
@@ -1677,7 +1733,7 @@ ScVbaRange::ClearFormats() throw (uno::RuntimeException)
}
void
-ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::Grammar eGram ) throw (uno::RuntimeException)
+ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::Grammar eGram, bool bFireEvent ) throw (uno::RuntimeException)
{
// If this is a multiple selection apply setFormula over all areas
if ( m_Areas->getCount() > 1 )
@@ -1727,7 +1783,7 @@ ScVbaRange::getFormulaR1C1() throw (::com::sun::star::uno::RuntimeException)
void
ScVbaRange::setFormulaR1C1(const uno::Any& rFormula ) throw (uno::RuntimeException)
{
- setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 );
+ setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1, true );
}
uno::Any
@@ -1821,7 +1877,7 @@ ScVbaRange::HasFormula() throw (uno::RuntimeException)
ScCellRangesBase* pFormulaRanges = dynamic_cast< ScCellRangesBase * > ( xRanges.get() );
// check if there are no formula cell, return false
if ( pFormulaRanges->GetRangeList().empty() )
- return uno::makeAny(sal_False);
+ return uno::makeAny(false);
// chech if there are holes (where some cells are not formulas)
// or returned range is not equal to this range
@@ -2069,7 +2125,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
// force external to be false
// only first address should have the
// document and sheet specifications
- aExternalCopy = uno::makeAny(sal_False);
+ aExternalCopy = uno::makeAny(false);
}
sAddress += xRange->Address( RowAbsolute, ColumnAbsolute, ReferenceStyle, aExternalCopy, RelativeTo );
}
@@ -2084,7 +2140,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
if ( refStyle == excel::XlReferenceStyle::xlR1C1 )
dDetails = ScAddress::Details( formula::FormulaGrammar::CONV_XL_R1C1, 0, 0 );
}
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
ScDocShell* pDocShell = getScDocShell();
ScDocument* pDoc = pDocShell->GetDocument();
@@ -2092,8 +2148,8 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) );
String sRange;
- USHORT ROW_ABSOLUTE = ( SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE );
- USHORT COL_ABSOLUTE = ( SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE );
+ sal_uInt16 ROW_ABSOLUTE = ( SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE );
+ sal_uInt16 COL_ABSOLUTE = ( SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE );
// default
nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE );
if ( RowAbsolute.hasValue() )
@@ -2110,7 +2166,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
if ( !bVal )
nFlags &= ~COL_ABSOLUTE;
}
- sal_Bool bLocal = sal_False;
+ sal_Bool bLocal = false;
if ( External.hasValue() )
{
External >>= bLocal;
@@ -2165,6 +2221,18 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
return xRange->Cells( nRowIndex, nColumnIndex );
}
+ // Performance: Use a common helper method for ScVbaRange::Cells and ScVbaWorksheet::Cells,
+ // instead of creating a new ScVbaRange object in often-called ScVbaWorksheet::Cells
+ return CellsHelper( mxParent, mxContext, mxRange, nRowIndex, nColumnIndex );
+}
+
+// static
+uno::Reference< excel::XRange >
+ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
+ const uno::Reference< uno::XComponentContext >& xContext,
+ const uno::Reference< css::table::XCellRange >& xRange,
+ const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) throw(uno::RuntimeException)
+{
sal_Int32 nRow = 0, nColumn = 0;
sal_Bool bIsIndex = nRowIndex.hasValue();
@@ -2185,7 +2253,7 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
}
else if ( aRowIndexAny.hasValue() && !( aRowIndexAny >>= nRow ) )
{
- uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
uno::Any aConverted;
try
{
@@ -2205,7 +2273,7 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
{
ScAddress::Details dDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
ScRange tmpRange;
- USHORT flags = tmpRange.ParseCols( sCol, excel::GetDocumentFromRange( mxRange ), dDetails );
+ sal_uInt16 flags = tmpRange.ParseCols( sCol, excel::GetDocumentFromRange( mxRange ), dDetails );
if ( ( flags & 0x200 ) != 0x200 )
throw uno::RuntimeException();
nColumn = tmpRange.aStart.Col() + 1;
@@ -2238,12 +2306,12 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
if( !bIsIndex && !bIsColumnIndex ) // .Cells
// #FIXE needs proper parent ( Worksheet )
- return uno::Reference< excel::XRange >( new ScVbaRange( mxParent, mxContext, mxRange ) );
+ return uno::Reference< excel::XRange >( new ScVbaRange( xParent, xContext, xRange ) );
sal_Int32 nIndex = --nRow;
if( bIsIndex && !bIsColumnIndex ) // .Cells(n)
{
- uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, ::uno::UNO_QUERY_THROW);
+ uno::Reference< table::XColumnRowRange > xColumnRowRange(xRange, ::uno::UNO_QUERY_THROW);
sal_Int32 nColCount = xColumnRowRange->getColumns()->getCount();
if ( !nIndex || nIndex < 0 )
@@ -2305,7 +2373,7 @@ void setCursor( const SCCOL& nCol, const SCROW& nRow, const uno::Reference< fra
if ( bInSel )
pShell->SetCursor( nCol, nRow );
else
- pShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_NONE, FALSE, FALSE, TRUE, FALSE );
+ pShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_NONE, false, false, sal_True, false );
}
}
@@ -2682,7 +2750,7 @@ ScVbaRange::getWrapText() throw (script::BasicErrorException, uno::RuntimeExcept
SfxItemSet* pDataSet = getCurrentDataSet();
- SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK, TRUE, NULL);
+ SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK, true, NULL);
if ( eState == SFX_ITEM_DONTCARE )
return aNULL();
@@ -2822,10 +2890,10 @@ uno::Any ScVbaRange::getCellRange( const uno::Reference< excel::XRange >& rxRang
throw uno::RuntimeException();
}
-static USHORT
+static sal_uInt16
getPasteFlags (sal_Int32 Paste)
{
- USHORT nFlags = IDF_NONE;
+ sal_uInt16 nFlags = IDF_NONE;
switch (Paste) {
case excel::XlPasteType::xlPasteComments:
nFlags = IDF_NOTE;break;
@@ -2853,10 +2921,10 @@ getPasteFlags (sal_Int32 Paste)
return nFlags;
}
-static USHORT
+static sal_uInt16
getPasteFormulaBits( sal_Int32 Operation)
{
- USHORT nFormulaBits = PASTE_NOFUNC ;
+ sal_uInt16 nFormulaBits = PASTE_NOFUNC ;
switch (Operation)
{
case excel::XlPasteSpecialOperation::xlPasteSpecialOperationAdd:
@@ -2889,8 +2957,8 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
// set up defaults
sal_Int32 nPaste = excel::XlPasteType::xlPasteAll;
sal_Int32 nOperation = excel::XlPasteSpecialOperation::xlPasteSpecialOperationNone;
- sal_Bool bTranspose = sal_False;
- sal_Bool bSkipBlanks = sal_False;
+ sal_Bool bTranspose = false;
+ sal_Bool bSkipBlanks = false;
if ( Paste.hasValue() )
Paste >>= nPaste;
@@ -2901,8 +2969,8 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
if ( Transpose.hasValue() )
Transpose >>= bTranspose;
- USHORT nFlags = getPasteFlags(nPaste);
- USHORT nFormulaBits = getPasteFormulaBits(nOperation);
+ sal_uInt16 nFlags = getPasteFlags(nPaste);
+ sal_uInt16 nFormulaBits = getPasteFormulaBits(nOperation);
excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose);
}
@@ -3072,7 +3140,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
sal_Int16 nLook = globalSearchOptions.GetWordOnly() ? excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole;
sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
- sal_Bool bMatchCase = sal_False;
+ sal_Bool bMatchCase = false;
uno::Reference< util::XReplaceable > xReplace( mxRange, uno::UNO_QUERY );
if ( xReplace.is() )
{
@@ -3086,9 +3154,9 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
{
// sets SearchWords ( true is Cell match )
nLook = ::comphelper::getINT16( LookAt );
- sal_Bool bSearchWords = sal_False;
+ sal_Bool bSearchWords = false;
if ( nLook == excel::XlLookAt::xlPart )
- bSearchWords = sal_False;
+ bSearchWords = false;
else if ( nLook == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
@@ -3102,9 +3170,9 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
if ( SearchOrder.hasValue() )
{
nSearchOrder = ::comphelper::getINT16( SearchOrder );
- sal_Bool bSearchByRow = sal_False;
+ sal_Bool bSearchByRow = false;
if ( nSearchOrder == excel::XlSearchOrder::xlByColumns )
- bSearchByRow = sal_False;
+ bSearchByRow = false;
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
@@ -3222,9 +3290,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if ( LookAt.hasValue() )
{
nLookAt = ::comphelper::getINT16( LookAt );
- sal_Bool bSearchWords = sal_False;
+ sal_Bool bSearchWords = false;
if ( nLookAt == excel::XlLookAt::xlPart )
- bSearchWords = sal_False;
+ bSearchWords = false;
else if ( nLookAt == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
@@ -3237,9 +3305,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if ( SearchOrder.hasValue() )
{
nSearchOrder = ::comphelper::getINT16( SearchOrder );
- sal_Bool bSearchByRow = sal_False;
+ sal_Bool bSearchByRow = false;
if ( nSearchOrder == excel::XlSearchOrder::xlByColumns )
- bSearchByRow = sal_False;
+ bSearchByRow = false;
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
@@ -3255,9 +3323,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
sal_Int32 nSearchDirection = 0;
if( SearchDirection >>= nSearchDirection )
{
- sal_Bool bSearchBackwards = sal_False;
+ sal_Bool bSearchBackwards = false;
if ( nSearchDirection == excel::XlSearchDirection::xlNext )
- bSearchBackwards = sal_False;
+ bSearchBackwards = false;
else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
bSearchBackwards = sal_True;
else
@@ -3268,7 +3336,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
}
// MatchCase
- sal_Bool bMatchCase = sal_False;
+ sal_Bool bMatchCase = false;
if ( MatchCase.hasValue() )
{
// SearchCaseSensitive
@@ -3375,7 +3443,7 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan
if ( nOrder == excel::XlSortOrder::xlAscending )
aTableField.IsAscending = sal_True;
else
- aTableField.IsAscending = sal_False;
+ aTableField.IsAscending = false;
}
else
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal Key param" ) ), uno::Reference< uno::XInterface >() );
@@ -3391,7 +3459,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
sal_Int16 nDataOption1 = excel::XlSortDataOption::xlSortNormal;
- sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;;
+ sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;
sal_Int16 nDataOption3 = excel::XlSortDataOption::xlSortNormal;
ScDocument* pDoc = getScDocument();
@@ -3436,13 +3504,13 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
nOrientation = ::comphelper::getINT16( Orientation );
// persist new option to be next calls default
if ( nOrientation == excel::XlSortOrientation::xlSortRows )
- aSortParam.bByRow = FALSE;
+ aSortParam.bByRow = false;
else
- aSortParam.bByRow = TRUE;
+ aSortParam.bByRow = sal_True;
}
- sal_Bool bIsSortColumns=sal_False; // sort by row
+ sal_Bool bIsSortColumns=false; // sort by row
if ( nOrientation == excel::XlSortOrientation::xlSortRows )
bIsSortColumns = sal_True;
@@ -3450,7 +3518,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
#ifdef VBA_OOBUILD_HACK
nHeader = aSortParam.nCompatHeader;
#endif
- sal_Bool bContainsHeader = sal_False;
+ sal_Bool bContainsHeader = false;
if ( Header.hasValue() )
{
@@ -3498,26 +3566,26 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
{
nOrder1 = ::comphelper::getINT16(Order1);
if ( nOrder1 == excel::XlSortOrder::xlAscending )
- aSortParam.bAscending[0] = TRUE;
+ aSortParam.bAscending[0] = true;
else
- aSortParam.bAscending[0] = FALSE;
+ aSortParam.bAscending[0] = false;
}
if ( Order2.hasValue() )
{
nOrder2 = ::comphelper::getINT16(Order2);
if ( nOrder2 == excel::XlSortOrder::xlAscending )
- aSortParam.bAscending[1] = TRUE;
+ aSortParam.bAscending[1] = true;
else
- aSortParam.bAscending[1] = FALSE;
+ aSortParam.bAscending[1] = false;
}
if ( Order3.hasValue() )
{
nOrder3 = ::comphelper::getINT16(Order3);
if ( nOrder3 == excel::XlSortOrder::xlAscending )
- aSortParam.bAscending[2] = TRUE;
+ aSortParam.bAscending[2] = true;
else
- aSortParam.bAscending[2] = FALSE;
+ aSortParam.bAscending[2] = false;
}
uno::Reference< table::XCellRange > xKey1;
@@ -3696,7 +3764,7 @@ ScVbaRange::hasElements() throw (uno::RuntimeException)
if ( xColumnRowRange->getRows()->getCount() ||
xColumnRowRange->getColumns()->getCount() )
return sal_True;
- return sal_False;
+ return false;
}
// XEnumerationAccess
@@ -3740,7 +3808,7 @@ double
ScVbaRange::getCalcColWidth( const table::CellRangeAddress& rAddress) throw (uno::RuntimeException)
{
ScDocument* pDoc = getScDocument();
- USHORT nWidth = pDoc->GetOriginalWidth( static_cast< SCCOL >( rAddress.StartColumn ), static_cast< SCTAB >( rAddress.Sheet ) );
+ sal_uInt16 nWidth = pDoc->GetOriginalWidth( static_cast< SCCOL >( rAddress.StartColumn ), static_cast< SCTAB >( rAddress.Sheet ) );
double nPoints = lcl_TwipsToPoints( nWidth );
nPoints = lcl_Round2DecPlaces( nPoints );
return nPoints;
@@ -3750,7 +3818,7 @@ double
ScVbaRange::getCalcRowHeight( const table::CellRangeAddress& rAddress ) throw (uno::RuntimeException)
{
ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
- USHORT nWidth = pDoc->GetOriginalHeight( rAddress.StartRow, rAddress.Sheet );
+ sal_uInt16 nWidth = pDoc->GetOriginalHeight( rAddress.StartRow, rAddress.Sheet );
double nPoints = lcl_TwipsToPoints( nWidth );
nPoints = lcl_Round2DecPlaces( nPoints );
return nPoints;
@@ -3779,7 +3847,7 @@ double getDefaultCharWidth( const uno::Reference< frame::XModel >& xModel ) thro
double nPixelsPerMeter = xDevice->getInfo().PixelPerMeterX;
double nCharWidth = nCharPixelWidth / nPixelsPerMeter;
nCharWidth = nCharWidth * (double)56700;// in twips
- return lcl_TwipsToPoints( (USHORT)nCharWidth );
+ return lcl_TwipsToPoints( (sal_uInt16)nCharWidth );
}
uno::Any SAL_CALL
@@ -3797,24 +3865,24 @@ ScVbaRange::getColumnWidth() throw (uno::RuntimeException)
if ( pShell )
{
uno::Reference< frame::XModel > xModel = pShell->GetModel();
- double defaultCharWidth = getDefaultCharWidth( xModel );
+ double defaultCharWidth = getDefaultCharWidth( pShell );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
sal_Int32 nStartCol = thisAddress.StartColumn;
sal_Int32 nEndCol = thisAddress.EndColumn;
- USHORT nColTwips = 0;
+ sal_uInt16 nColTwips = 0;
for( sal_Int32 nCol = nStartCol ; nCol <= nEndCol; ++nCol )
{
thisAddress.StartColumn = nCol;
- USHORT nCurTwips = pShell->GetDocument()->GetOriginalWidth( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCTAB >( thisAddress.Sheet ) );
+ sal_uInt16 nCurTwips = pShell->GetDocument()->GetOriginalWidth( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCTAB >( thisAddress.Sheet ) );
if ( nCol == nStartCol )
nColTwips = nCurTwips;
if ( nColTwips != nCurTwips )
return aNULL();
}
- nColWidth = lcl_Round2DecPlaces( lcl_TwipsToPoints( nColTwips ) );
- if ( xModel.is() )
- nColWidth = nColWidth / defaultCharWidth;
+ nColWidth = lcl_TwipsToPoints( nColTwips );
+ if ( nColWidth != 0.0 )
+ nColWidth = ( nColWidth / defaultCharWidth ) - fExtraWidth;
}
nColWidth = lcl_Round2DecPlaces( nColWidth );
return uno::makeAny( nColWidth );
@@ -3846,17 +3914,16 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) throw (uno::RuntimeEx
nColWidth = ( nColWidth * getDefaultCharWidth( xModel ) );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
- USHORT nTwips = lcl_pointsToTwips( nColWidth );
+ sal_uInt16 nTwips = lcl_pointsToTwips( nColWidth );
ScDocFunc aFunc(*pDocShell);
SCCOLROW nColArr[2];
nColArr[0] = thisAddress.StartColumn;
nColArr[1] = thisAddress.EndColumn;
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
- nTwips, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( true, 1, nColArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
+ nTwips, true, true );
}
- }
}
uno::Any SAL_CALL
@@ -3946,7 +4013,7 @@ ScVbaRange::BorderAround( const css::uno::Any& LineStyle, const css::uno::Any& W
case excel::XlBordersIndex::xlDiagonalUp:
break;
default:
- return uno::makeAny( sal_False );
+ return uno::makeAny( false );
}
}
return uno::makeAny( sal_True );
@@ -3969,7 +4036,7 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeException)
sal_Int32 nStartRow = thisAddress.StartRow;
sal_Int32 nEndRow = thisAddress.EndRow;
- USHORT nRowTwips = 0;
+ sal_uInt16 nRowTwips = 0;
// #TODO probably possible to use the SfxItemSet ( and see if
// SFX_ITEM_DONTCARE is set ) to improve performance
// #CHECKME looks like this is general behaviour not just row Range specific
@@ -3980,7 +4047,7 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeException)
for ( sal_Int32 nRow = nStartRow ; nRow <= nEndRow; ++nRow )
{
thisAddress.StartRow = nRow;
- USHORT nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet );
+ sal_uInt16 nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet );
if ( nRow == nStartRow )
nRowTwips = nCurTwips;
if ( nRowTwips != nCurTwips )
@@ -4009,15 +4076,15 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight) throw (uno::RuntimeExcepti
nHeight = lcl_Round2DecPlaces( nHeight );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
- USHORT nTwips = lcl_pointsToTwips( nHeight );
+ sal_uInt16 nTwips = lcl_pointsToTwips( nHeight );
ScDocShell* pDocShell = excel::GetDocShellFromRange( mxRange );
ScDocFunc aFunc(*pDocShell);
SCCOLROW nRowArr[2];
nRowArr[0] = thisAddress.StartRow;
nRowArr[1] = thisAddress.EndRow;
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
- nTwips, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
+ nTwips, true, true );
}
uno::Any SAL_CALL
@@ -4029,10 +4096,10 @@ ScVbaRange::getPageBreak() throw (uno::RuntimeException)
{
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
- BOOL bColumn = FALSE;
+ sal_Bool bColumn = false;
if (thisAddress.StartRow==0)
- bColumn = TRUE;
+ bColumn = true;
uno::Reference< frame::XModel > xModel = pShell->GetModel();
if ( xModel.is() )
@@ -4069,10 +4136,10 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
if ((thisAddress.StartColumn==0) && (thisAddress.StartRow==0))
return;
- BOOL bColumn = FALSE;
+ sal_Bool bColumn = false;
if (thisAddress.StartRow==0)
- bColumn = TRUE;
+ bColumn = true;
ScAddress aAddr( static_cast<SCCOL>(thisAddress.StartColumn), thisAddress.StartRow, thisAddress.Sheet );
uno::Reference< frame::XModel > xModel = pShell->GetModel();
@@ -4080,9 +4147,9 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti
{
ScTabViewShell* pViewShell = excel::getBestViewShell( xModel );
if ( nPageBreak == excel::XlPageBreak::xlPageBreakManual )
- pViewShell->InsertPageBreak( bColumn, TRUE, &aAddr);
+ pViewShell->InsertPageBreak( bColumn, sal_True, &aAddr);
else if ( nPageBreak == excel::XlPageBreak::xlPageBreakNone )
- pViewShell->DeletePageBreak( bColumn, TRUE, &aAddr);
+ pViewShell->DeletePageBreak( bColumn, sal_True, &aAddr);
}
}
}
@@ -4257,7 +4324,7 @@ ScDBData* lcl_GetDBData_Impl( ScDocShell* pDocShell, sal_Int16 nSheet )
ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection();
if (pNames)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pNames->SearchName( sName , nPos ))
pRet = (*pNames)[nPos];
}
@@ -4273,7 +4340,7 @@ 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, NULL, sal_True );
}
}
}
@@ -4413,7 +4480,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
sal_Int16 nSheet = thisAddress.Sheet;
ScDocShell* pShell = getScDocShell();
- sal_Bool bHasAuto = sal_False;
+ sal_Bool bHasAuto = false;
rtl::OUString sAutofiltRangeName;
uno::Reference< sheet::XDatabaseRange > xDataBaseRange = excel::GetAutoFiltRange( pShell, nSheet, sAutofiltRangeName );
if ( xDataBaseRange.is() )
@@ -4446,6 +4513,20 @@ ScVbaRange::AutoFilter( const uno::Any& Field, 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 );
+ if ( pDocument )
+ {
+ SCCOL nStartCol = autoFiltAddress.StartColumn;
+ SCROW nStartRow = autoFiltAddress.StartRow;
+ SCCOL nEndCol = autoFiltAddress.EndColumn;
+ SCROW nEndRow = autoFiltAddress.EndRow;
+ pDocument->GetDataArea( autoFiltAddress.Sheet, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, true );
+ autoFiltAddress.StartColumn = nStartCol;
+ autoFiltAddress.StartRow = nStartRow;
+ autoFiltAddress.EndColumn = nEndCol;
+ autoFiltAddress.EndRow = nEndRow;
+ }
}
uno::Reference< sheet::XDatabaseRanges > xDBRanges = excel::GetDataBaseRanges( pShell );
@@ -4467,10 +4548,10 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(sal_True) );
// set header
uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW );
- sal_Bool bHasColHeader = sal_False;
+ sal_Bool bHasColHeader = false;
ScDocument* pDoc = pShell ? pShell->GetDocument() : NULL;
- 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 ) ) ? sal_True : sal_False;
+ 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 ) ) ? sal_True : false;
xFiltProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader") ), uno::Any( bHasColHeader ) );
}
@@ -4483,12 +4564,12 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
VisibleDropDown >>= bVisible;
if ( bVisible == bHasAuto ) // dropdown is displayed/notdisplayed as required
- bVisible = sal_False;
+ bVisible = false;
sheet::FilterConnection nConn = sheet::FilterConnection_AND;
double nCriteria1 = 0;
bool bHasCritValue = Criteria1.hasValue();
- bool bCritHasNumericValue = sal_False; // not sure if a numeric criteria is possible
+ bool bCritHasNumericValue = false; // not sure if a numeric criteria is possible
if ( bHasCritValue )
bCritHasNumericValue = ( Criteria1 >>= nCriteria1 );
@@ -4608,7 +4689,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
{
uno::Reference< beans::XPropertySet > xProps;
lcl_setTableFieldsFromCriteria( sCriteria2, xProps, sTabFilts[1] );
- sTabFilts[1].IsNumeric = sal_False;
+ sTabFilts[1].IsNumeric = false;
}
}
else // numeric
@@ -4661,8 +4742,6 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
void SAL_CALL
ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (uno::RuntimeException)
{
- sal_Bool bCopyOrigin = sal_True;
- CopyOrigin >>= bCopyOrigin;
// It appears ( from the web ) that the undocumented CopyOrigin
// param should contain member of enum XlInsertFormatOrigin
// which can have values xlFormatFromLeftOrAbove or xlFormatFromRightOrBelow
@@ -4697,7 +4776,11 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (u
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
xCellRangeMove->insertCells( thisAddress, mode );
- if ( bCopyOrigin )
+
+ // 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 );
+ if ( pClipObj && pClipObj->GetUseInApi() )
{
// After the insert ( this range ) actually has moved
ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) );
@@ -4735,15 +4818,15 @@ ScVbaRange::Autofit() throw (uno::RuntimeException)
SCCOLROW nColArr[2];
nColArr[0] = thisAddress.StartColumn;
nColArr[1] = thisAddress.EndColumn;
- BOOL bDirection = TRUE;
+ sal_Bool bDirection = sal_True;
if ( mbIsRows )
{
- bDirection = FALSE;
+ bDirection = false;
nColArr[0] = thisAddress.StartRow;
nColArr[1] = thisAddress.EndRow;
}
aFunc.SetWidthOrHeight( bDirection, 1, nColArr, thisAddress.Sheet, SC_SIZE_OPTIMAL,
- 0, TRUE, TRUE );
+ 0, true, true );
}
}
@@ -4795,7 +4878,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
OSL_TRACE("set TextQualifier\n");
}
- sal_Bool bConsecutiveDelimiter = sal_False;
+ sal_Bool bConsecutiveDelimiter = false;
if( ConsecutiveDelimiter.hasValue() )
{
if( !( ConsecutiveDelimiter >>= bConsecutiveDelimiter ) )
@@ -4804,7 +4887,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
OSL_TRACE("set ConsecutiveDelimiter\n");
}
- sal_Bool bTab = sal_False;
+ sal_Bool bTab = false;
if( Tab.hasValue() && bDilimited )
{
if( !( Tab >>= bTab ) )
@@ -4813,7 +4896,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
OSL_TRACE("set Tab\n");
}
- sal_Bool bSemicolon = sal_False;
+ sal_Bool bSemicolon = false;
if( Semicolon.hasValue() && bDilimited )
{
if( !( Semicolon >>= bSemicolon ) )
@@ -4821,7 +4904,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Semicolon\n");
}
- sal_Bool bComma = sal_False;
+ sal_Bool bComma = false;
if( Comma.hasValue() && bDilimited )
{
if( !( Comma >>= bComma ) )
@@ -4829,7 +4912,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Comma\n");
}
- sal_Bool bSpace = sal_False;
+ sal_Bool bSpace = false;
if( Space.hasValue() && bDilimited )
{
if( !( Space >>= bSpace ) )
@@ -4837,7 +4920,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Space\n");
}
- sal_Bool bOther = sal_False;
+ sal_Bool bOther = false;
rtl::OUString sOtherChar;
if( Other.hasValue() && bDilimited )
{
@@ -4888,15 +4971,15 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
}
// Parse the value of parameter FieldInfo.
- USHORT nRealCount = 0;
+ sal_uInt16 nRealCount = 0;
xub_StrLen* pColumns = NULL;
- BYTE* pFormats = NULL;
+ sal_uInt8* pFormats = NULL;
if ( sFieldInfo.getLength() > 0 )
{
- USHORT nCount = sFieldInfo.getLength();
+ sal_uInt16 nCount = sFieldInfo.getLength();
pColumns = new xub_StrLen[nCount];
- pFormats = new BYTE[nCount];
- USHORT nFormat = 1;
+ pFormats = new sal_uInt8[nCount];
+ sal_uInt16 nFormat = 1;
uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
@@ -4907,7 +4990,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
{
uno::Any aConverted = xConverter->convertTo( sFieldInfo[nIndex][0], getCppuType((xub_StrLen*)0) );
aConverted >>= pColumns[nRealCount];
- aConverted = xConverter->convertTo( sFieldInfo[nIndex][1], getCppuType((USHORT*)0) );
+ aConverted = xConverter->convertTo( sFieldInfo[nIndex][1], getCppuType((sal_uInt16*)0) );
aConverted >>= nFormat;
}
catch( const uno::Exception& )
@@ -5107,7 +5190,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
if( m_Areas->getCount() > 1 )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not get Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
- sal_Bool bShowDetail = sal_False;
+ sal_Bool bShowDetail = false;
RangeHelper helper( mxRange );
uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();
@@ -5120,7 +5203,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
if( (thisAddress.StartRow == thisAddress.EndRow && thisAddress.EndRow == aOutlineAddress.EndRow ) ||
(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
{
- sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? sal_False:sal_True;
+ sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:sal_True;
ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), sal_True);
const ScOutlineArray* pOutlineArray = bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray();
@@ -5239,7 +5322,7 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
sal_Int32 nCol;
sal_Int32 nMaxRows = 0;
sal_Int32 nMaxColumns = 0;
- sal_Bool bEof = sal_False;
+ sal_Bool bEof = false;
long lColCnt = 0;
if (MaxColumns.hasValue())
{
@@ -5478,7 +5561,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
}
ScDocFunc aFunc(*pDocSh);
#ifdef VBA_OOBUILD_HACK
- aFunc.FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd, nCount, fStep, fEndValue, TRUE, TRUE );
+ aFunc.FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd, nCount, fStep, fEndValue, sal_True, sal_True );
#endif
}
sal_Bool SAL_CALL
@@ -5504,10 +5587,10 @@ ScVbaRange::GoalSeek( const uno::Any& Goal, const uno::Reference< excel::XRange
// but... if it detects 0 is the value it requires then it will use that
// e.g. divergence & result both = 0.0 does NOT mean there is an error
if ( ( res.Divergence != 0.0 ) && ( res.Result == 0.0 ) )
- bRes = sal_False;
+ bRes = false;
}
else
- bRes = sal_False;
+ bRes = false;
return bRes;
}
@@ -5619,7 +5702,7 @@ ScVbaRange::Merge( const uno::Any& Across ) throw (script::BasicErrorException,
return;
}
uno::Reference< table::XCellRange > oCellRange;
- sal_Bool bAcross = sal_False;
+ sal_Bool bAcross = false;
Across >>= bAcross;
if ( !bAcross )
lcl_mergeCellsOfRange( mxRange );
@@ -5629,7 +5712,7 @@ ScVbaRange::Merge( const uno::Any& Across ) throw (script::BasicErrorException,
// #TODO #FIXME this seems incredibly lame, this can't be right
for (sal_Int32 i=1; i <= oRangeRowsImpl->getCount();i++)
{
- oRangeRowsImpl->Cells( uno::makeAny( i ), uno::Any() )->Merge( uno::makeAny( sal_False ) );
+ oRangeRowsImpl->Cells( uno::makeAny( i ), uno::Any() )->Merge( uno::makeAny( false ) );
}
}
}
@@ -5647,7 +5730,7 @@ ScVbaRange::UnMerge( ) throw (script::BasicErrorException, uno::RuntimeExceptio
}
return;
}
- lcl_mergeCellsOfRange( mxRange, sal_False);
+ lcl_mergeCellsOfRange( mxRange, false);
}
uno::Any SAL_CALL
@@ -5697,7 +5780,7 @@ ScVbaRange::PreviousNext( bool bIsPrevious )
SCTAB nTab = refRange.aStart.Tab();
ScDocument* pDoc = getScDocument();
- pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, TRUE,TRUE, markedRange );
+ pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, true,true, markedRange );
refRange.aStart.SetCol( nNewX );
refRange.aStart.SetRow( nNewY );
refRange.aStart.SetTab( nTab );
@@ -5907,9 +5990,9 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal_Int32 _nFunction, const uno::
{
try
{
- sal_Bool bDoReplace = sal_False;
+ sal_Bool bDoReplace = false;
aReplace >>= bDoReplace;
- sal_Bool bAddPageBreaks = sal_False;
+ sal_Bool bAddPageBreaks = false;
PageBreaks >>= bAddPageBreaks;
uno::Reference< sheet::XSubTotalCalculatable> xSub(mxRange, uno::UNO_QUERY_THROW );
@@ -6076,7 +6159,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
// Unique
if ( xPropertySet.is() )
{
- sal_Bool bUnique = sal_False;
+ sal_Bool bUnique = false;
uno::Any aUnique;
try
{
@@ -6171,7 +6254,7 @@ ScVbaRange::getServiceNames()
sal_Bool SAL_CALL
ScVbaRange::hasError() throw (uno::RuntimeException)
{
- double dResult = sal_False;
+ double dResult = false;
uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< script::XInvocation > xInvoc( xApplication->WorksheetFunction(), uno::UNO_QUERY_THROW );
@@ -6184,7 +6267,7 @@ ScVbaRange::hasError() throw (uno::RuntimeException)
xInvoc->invoke( FunctionName, Params, OutParamIndex, OutParam ) >>= dResult;
if ( dResult > 0.0 )
return sal_True;
- return sal_False;
+ return false;
}
namespace range
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 3bec144fe57f..687128b98757 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -110,11 +110,14 @@ class ScVbaRange : public ScVbaRange_BASE
void fillSeries( css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) throw( css::uno::RuntimeException );
- void ClearContents( sal_Int32 nFlags ) throw (css::uno::RuntimeException);
- virtual void setValue( const css::uno::Any& aValue, ValueSetter& setter) throw ( css::uno::RuntimeException);
- virtual css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
- virtual css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
- virtual void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);
+ void ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (css::uno::RuntimeException);
+
+ css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
+ void setValue( const css::uno::Any& aValue, ValueSetter& setter, bool bFireEvent ) throw ( css::uno::RuntimeException);
+
+ css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
+ void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar, bool bFireEvent ) throw ( css::uno::RuntimeException);
+
css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException );
ScCellRangeObj* getCellRangeObj( ) throw ( css::uno::RuntimeException );
css::uno::Reference< ov::XCollection >& getBorders();
@@ -122,6 +125,10 @@ class ScVbaRange : public ScVbaRange_BASE
css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious );
css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );
css::awt::Point getPosition() throw ( css::uno::RuntimeException );
+
+ /** Fires a Worksheet_Change event for this range or range list. */
+ void fireChangeEvent();
+
protected:
virtual ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException );
virtual SfxItemSet* getCurrentDataSet( ) throw ( css::uno::RuntimeException );
@@ -152,6 +159,12 @@ public:
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( css::uno::RuntimeException );
css::table::CellAddress getLeftUpperCellAddress();
+ static css::uno::Reference< ov::excel::XRange > CellsHelper(
+ const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::table::XCellRange >& xRange,
+ const css::uno::Any &nRowIndex, const css::uno::Any &nColumnIndex ) throw(css::uno::RuntimeException);
+
// Attributes
virtual css::uno::Any SAL_CALL getName() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 652c8e4f87b1..f7582d9a25a2 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -39,7 +39,9 @@
#include <rtl/ustrbuf.hxx>
#include <filter/msfilter/msvbahelper.hxx>
#include <oox/helper/helper.hxx>
+#include <svx/unoshape.hxx>
#include "vbafont.hxx"
+#include "drwlayer.hxx"
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -238,13 +240,38 @@ void SAL_CALL ScVbaSheetObjectBase::setName( const OUString& rName ) throw (uno:
sal_Int32 SAL_CALL ScVbaSheetObjectBase::getPlacement() throw (uno::RuntimeException)
{
- // TODO
- return excel::XlPlacement::xlMoveAndSize;
+ sal_Int32 nRet = excel::XlPlacement::xlMoveAndSize;
+ SvxShape* pShape = SvxShape::getImplementation( mxShape );
+ if(pShape)
+ {
+ SdrObject* pObj = pShape->GetSdrObject();
+ if (pObj)
+ {
+ ScAnchorType eType = ScDrawLayer::GetAnchor(pObj);
+ if (eType == SCA_PAGE)
+ nRet = excel::XlPlacement::xlFreeFloating;
+ }
+ }
+ return nRet;
}
-void SAL_CALL ScVbaSheetObjectBase::setPlacement( sal_Int32 /*nPlacement*/ ) throw (uno::RuntimeException)
+void SAL_CALL ScVbaSheetObjectBase::setPlacement( sal_Int32 nPlacement ) throw (uno::RuntimeException)
{
- // TODO
+ SvxShape* pShape = SvxShape::getImplementation( mxShape );
+ if(pShape)
+ {
+ SdrObject* pObj = pShape->GetSdrObject();
+ if (pObj)
+ {
+ ScAnchorType eType = SCA_CELL;
+ if ( nPlacement == excel::XlPlacement::xlFreeFloating )
+ eType = SCA_PAGE;
+
+ // xlMove is not supported, treated as SCA_CELL (xlMoveAndSize)
+
+ ScDrawLayer::SetAnchor(pObj, eType);
+ }
+ }
}
sal_Bool SAL_CALL ScVbaSheetObjectBase::getPrintObject() throw (uno::RuntimeException)
@@ -351,14 +378,14 @@ void SAL_CALL ScVbaControlObjectBase::setOnAction( const OUString& rMacroName )
// if a macro name has been passed, try to attach it to the event
if( rMacroName.getLength() > 0 )
{
- VBAMacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
- if( !aResolvedMacro.IsResolved() )
+ MacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
+ if( !aResolvedMacro.mbFound )
throw uno::RuntimeException();
script::ScriptEventDescriptor aDescriptor;
aDescriptor.ListenerType = maListenerType;
aDescriptor.EventMethod = maEventMethod;
aDescriptor.ScriptType = CREATE_OUSTRING( "Script" );
- aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.ResolvedMacro() );
+ aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.msResolvedMacro );
xEventMgr->registerScriptEvent( nIndex, aDescriptor );
}
}
@@ -378,7 +405,7 @@ void SAL_CALL ScVbaControlObjectBase::setPrintObject( sal_Bool bPrintObject ) th
sal_Bool SAL_CALL ScVbaControlObjectBase::getAutoSize() throw (uno::RuntimeException)
{
// not supported
- return sal_False;
+ return false;
}
void SAL_CALL ScVbaControlObjectBase::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index 126b03577887..2c52556b23a9 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -72,7 +72,7 @@ lcl_getValidationProps( const uno::Reference< table::XCellRange >& xRange )
ScVbaValidation::getIgnoreBlank() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) );
- sal_Bool bBlank = sal_False;
+ sal_Bool bBlank = false;
xProps->getPropertyValue( IGNOREBLANK ) >>= bBlank;
return bBlank;
}
@@ -91,13 +91,13 @@ ScVbaValidation::getInCellDropdown() throw (uno::RuntimeException)
uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange );
sal_Int32 nShowList = 0;
xProps->getPropertyValue( SHOWLIST ) >>= nShowList;
- return ( nShowList ? sal_True : sal_False );
+ return ( nShowList ? sal_True : false );
}
void SAL_CALL
ScVbaValidation::setInCellDropdown( ::sal_Bool _incelldropdown ) throw (uno::RuntimeException)
{
- sal_Int32 nDropDown = sal_False;
+ sal_Int32 nDropDown = false;
if ( _incelldropdown )
nDropDown = 1;
uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps(m_xRange) );
@@ -109,7 +109,7 @@ ScVbaValidation::setInCellDropdown( ::sal_Bool _incelldropdown ) throw (uno::R
ScVbaValidation::getShowInput() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange );
- sal_Bool bShowInput = sal_False;
+ sal_Bool bShowInput = false;
xProps->getPropertyValue( SHOWINPUT ) >>= bShowInput;
return bShowInput;
}
@@ -126,7 +126,7 @@ ScVbaValidation:: setShowInput( ::sal_Bool _showinput ) throw (uno::RuntimeExcep
ScVbaValidation::getShowError() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange );
- sal_Bool bShowError = sal_False;
+ sal_Bool bShowError = false;
xProps->getPropertyValue( SHOWERROR ) >>= bShowError;
return bShowError;
}
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index e79985db92a6..761671727e9c 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -683,14 +683,14 @@ double SAL_CALL
ScVbaWindow::getSplitVertical() throw (uno::RuntimeException)
{
double fSplitVertical = m_xViewSplitable->getSplitVertical();
- double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, sal_False );
+ double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, false );
return fVertiPoints;
}
void SAL_CALL
ScVbaWindow::setSplitVertical(double _splitvertical ) throw (uno::RuntimeException)
{
- double fVertiPixels = PointsToPixels( m_xDevice, _splitvertical, sal_False );
+ double fVertiPixels = PointsToPixels( m_xDevice, _splitvertical, false );
m_xViewSplitable->splitAtPosition( 0, static_cast<sal_Int32>( fVertiPixels ) );
}
@@ -761,7 +761,7 @@ ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
{
sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;
_view >>= nWindowView;
- USHORT nSlot = FID_NORMALVIEWMODE;
+ sal_uInt16 nSlot = FID_NORMALVIEWMODE;
switch ( nWindowView )
{
case excel::XlWindowView::xlNormalView:
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 53063bd0e4fc..bf880e473af3 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -382,18 +382,16 @@ ScVbaWorkbook::Styles( const::uno::Any& Item ) throw (uno::RuntimeException)
}
uno::Any SAL_CALL
-ScVbaWorkbook::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
+ScVbaWorkbook::Names( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
- uno::Reference< frame::XModel > xModel( getModel() );
+ uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW );
uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW );
uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
- uno::Reference< XCollection > xNames( new ScVbaNames( this , mxContext , xNamedRanges , xModel ));
- if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
- {
+ uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, xModel ) );
+ if ( aIndex.hasValue() )
+ return uno::Any( xNames->Item( aIndex, uno::Any() ) );
return uno::Any( xNames );
}
- return uno::Any( xNames->Item( aIndex, uno::Any() ) );
-}
rtl::OUString&
ScVbaWorkbook::getServiceImplName()
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index ee947f1a757e..86b24c3dec92 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -47,7 +47,9 @@
#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/uri/XUriReference.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
@@ -74,15 +76,19 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
ScDocShell* pShell = excel::getDocShell( xModel );
if ( pShell )
{
+ String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
+ pShell->GetBasicManager()->SetName( aPrjName );
+
+ /* Set library container to VBA compatibility mode. This will create
+ the VBA Globals object and store it in the Basic manager of the
+ document. */
uno::Reference<script::XLibraryContainer> xLibContainer = pShell->GetBasicContainer();
uno::Reference<script::vba::XVBACompatibility> xVBACompat( xLibContainer, uno::UNO_QUERY_THROW );
xVBACompat->setVBACompatibilityMode( sal_True );
- String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- pShell->GetBasicManager()->SetName( aPrjName );
if( xLibContainer.is() )
{
- if( !xLibContainer->hasByName( aPrjName ) )
+ if( !xLibContainer->hasByName( aPrjName ) )
xLibContainer->createLibrary( aPrjName );
uno::Any aLibAny = xLibContainer->getByName( aPrjName );
uno::Reference< container::XNameContainer > xLib;
@@ -91,8 +97,6 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
{
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW );
uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW);
- // bootstrap vbaglobals
- xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals")));
uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY_THROW );
// set up the module info for the workbook and sheets in the nealy created
// spreadsheet
@@ -131,6 +135,18 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
}
}
}
+
+ /* Trigger the Workbook_Open event, event processor will register
+ itself as listener for specific events. */
+ try
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( pShell->GetDocument()->GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ uno::Sequence< uno::Any > aArgs;
+ xVbaEvents->processVbaEvent( script::vba::VBAEventId::WORKBOOK_OPEN, aArgs );
+ }
+ catch( uno::Exception& )
+ {
+ }
}
}
@@ -201,9 +217,41 @@ ScVbaWorkbooks::createCollectionObject( const css::uno::Any& aSource )
uno::Any SAL_CALL
-ScVbaWorkbooks::Add() throw (uno::RuntimeException)
+ScVbaWorkbooks::Add( const uno::Any& Template ) throw (uno::RuntimeException)
{
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XSpreadsheetDocument > xSpreadDoc;
+ sal_Int32 nWorkbookType = 0;
+ ::rtl::OUString aTemplateFileName;
+ if( Template >>= nWorkbookType )
+ {
+ // nWorkbookType is a constant from XlWBATemplate (added in Excel 2007)
+ // TODO: create chart-sheet if supported by Calc
+
+ xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
+ // create a document with one sheet only
+ uno::Reference< sheet::XSpreadsheets > xSheets( xSpreadDoc->getSheets(), uno::UNO_SET_THROW );
+ uno::Reference< container::XIndexAccess > xSheetsIA( xSheets, uno::UNO_QUERY_THROW );
+ while( xSheetsIA->getCount() > 1 )
+ {
+ uno::Reference< container::XNamed > xSheetName( xSheetsIA->getByIndex( xSheetsIA->getCount() - 1 ), uno::UNO_QUERY_THROW );
+ xSheets->removeByName( xSheetName->getName() );
+ }
+ }
+ else if( Template >>= aTemplateFileName )
+ {
+ // TODO: create document from template
+ xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
+ }
+ else if( !Template.hasValue() )
+ {
+ // regular spreadsheet document with configured number of sheets
+ xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
+ }
+ else
+ {
+ // illegal argument
+ throw uno::RuntimeException();
+ }
// need to set up the document modules ( and vba mode ) here
setUpDocumentModules( xSpreadDoc );
@@ -212,10 +260,10 @@ ScVbaWorkbooks::Add() throw (uno::RuntimeException)
return uno::Any();
}
-void
+void SAL_CALL
ScVbaWorkbooks::Close() throw (uno::RuntimeException)
{
- VbaDocumentsBase::Close();
+ closeDocuments();
}
bool
@@ -255,7 +303,7 @@ ScVbaWorkbooks::getFileFilterType( const rtl::OUString& rFileName )
}
// #TODO# #FIXME# can any of the unused params below be used?
-uno::Any
+uno::Any SAL_CALL
ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLinks*/, const uno::Any& ReadOnly, const uno::Any& Format, const uno::Any& /*Password*/, const uno::Any& /*WriteResPassword*/, const uno::Any& /*IgnoreReadOnlyRecommended*/, const uno::Any& /*Origin*/, const uno::Any& Delimiter, const uno::Any& /*Editable*/, const uno::Any& /*Notify*/, const uno::Any& /*Converter*/, const uno::Any& /*AddToMru*/ ) throw (uno::RuntimeException)
{
// we need to detect if this is a URL, if not then assume its a file path
@@ -334,7 +382,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi
else if ( !isSpreadSheetFile( sType ) )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Bad Format")), uno::Reference< uno::XInterface >() );
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Open( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent );
uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY );
if ( xWBook.is() )
@@ -342,12 +390,6 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi
return aRet;
}
-uno::Any
-ScVbaWorkbooks::Open( const rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException)
-{
- return VbaDocumentsBase::Open( Filename, ReadOnly, rProps );
-}
-
rtl::OUString&
ScVbaWorkbooks::getServiceImplName()
{
diff --git a/sc/source/ui/vba/vbaworkbooks.hxx b/sc/source/ui/vba/vbaworkbooks.hxx
index a195bb8d3cd0..51273b180cf1 100644
--- a/sc/source/ui/vba/vbaworkbooks.hxx
+++ b/sc/source/ui/vba/vbaworkbooks.hxx
@@ -61,12 +61,9 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
// XWorkbooks
- virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& UpdateLinks, const css::uno::Any& ReadOnly, const css::uno::Any& Format, const css::uno::Any& Password, const css::uno::Any& WriteResPassword, const css::uno::Any& IgnoreReadOnlyRecommended, const css::uno::Any& Origin, const css::uno::Any& Delimiter, const css::uno::Any& Editable, const css::uno::Any& Notify, const css::uno::Any& Converter, const css::uno::Any& AddToMru ) throw (css::uno::RuntimeException);
-
- // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci)
- virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException);
};
#endif /* SC_VBA_WORKBOOKS_HXX */
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 51a2292c2bf2..7b889b4603c7 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/sheet/XSheetOutline.hpp>
#include <com/sun/star/sheet/XSheetPageBreak.hpp>
#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
+#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
@@ -62,6 +63,7 @@
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
#include <ooo/vba/excel/XlEnableSelection.hpp>
+#include <ooo/vba/excel/XlSheetVisibility.hpp>
#include <ooo/vba/excel/XWorkbook.hpp>
#include <ooo/vba/XControlProvider.hpp>
#include <ooo/vba/excel/XlSheetVisibility.hpp>
@@ -182,7 +184,7 @@ openNewDoc(rtl::OUString aSheetName )
return xModel;
}
-ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext )
+ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext ), mbVeryHidden( false )
{
}
@@ -193,9 +195,9 @@ ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< XHelperInterface >& xParent
}
ScVbaWorksheet::ScVbaWorksheet( uno::Sequence< uno::Any> const & args,
- uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : WorksheetImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
+ uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : WorksheetImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) ), mbVeryHidden( false )
{
- if ( args.getLength() < 2 )
+ if ( args.getLength() < 3 )
throw lang::IllegalArgumentException();
rtl::OUString sSheetName;
@@ -245,6 +247,25 @@ ScVbaWorksheet::getVisible() throw (uno::RuntimeException)
void
ScVbaWorksheet::setVisible( ::sal_Int32 _Visible ) throw (uno::RuntimeException)
{
+ using namespace ::ooo::vba::excel::XlSheetVisibility;
+ bool bVisible = true;
+ switch( nVisible )
+ {
+ case xlSheetVisible: case 1: // Excel accepts -1 and 1 for visible sheets
+ bVisible = true;
+ mbVeryHidden = false;
+ break;
+ case xlSheetHidden:
+ bVisible = false;
+ mbVeryHidden = false;
+ break;
+ case xlSheetVeryHidden:
+ bVisible = false;
+ mbVeryHidden = true;
+ break;
+ default:
+ throw uno::RuntimeException();
+ }
uno::Reference< beans::XPropertySet > xProps( getSheet(), uno::UNO_QUERY_THROW );
sal_Bool bVisible = true;
@@ -279,8 +300,8 @@ ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException)
uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
- sal_Bool bLockedCells = sal_False;
- sal_Bool bUnlockedCells = sal_False;
+ sal_Bool bLockedCells = false;
+ sal_Bool bUnlockedCells = false;
if( pProtect )
{
bLockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS);
@@ -318,8 +339,8 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx
ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
// default is xlNoSelection
- sal_Bool bLockedCells = sal_False;
- sal_Bool bUnlockedCells = sal_False;
+ sal_Bool bLockedCells = false;
+ sal_Bool bUnlockedCells = false;
if( nSelection == excel::XlEnableSelection::xlNoRestrictions )
{
bLockedCells = sal_True;
@@ -362,7 +383,7 @@ uno::Reference< beans::XPropertySet > ScVbaWorksheet::getFirstDBRangeProperties(
sal_Bool SAL_CALL ScVbaWorksheet::getAutoFilterMode() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xDBRangeProps = getFirstDBRangeProperties();
- sal_Bool bAutoFilterMode = sal_False;
+ sal_Bool bAutoFilterMode = false;
return
xDBRangeProps.is() &&
(xDBRangeProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoFilter" ) ) ) >>= bAutoFilterMode) &&
@@ -436,7 +457,7 @@ ScVbaWorksheet::getStandardHeight() throw (uno::RuntimeException)
sal_Bool
ScVbaWorksheet::getProtectionMode() throw (uno::RuntimeException)
{
- return sal_False;
+ return false;
}
sal_Bool
@@ -461,13 +482,13 @@ ScVbaWorksheet::getProtectDrawingObjects() throw (uno::RuntimeException)
if ( pProtect )
return pProtect->isOptionEnabled( ScTableProtection::OBJECTS );
}
- return sal_False;
+ return false;
}
sal_Bool
ScVbaWorksheet::getProtectScenarios() throw (uno::RuntimeException)
{
- return sal_False;
+ return false;
}
void
@@ -592,7 +613,7 @@ ScVbaWorksheet::Copy( const uno::Any& Before, const uno::Any& After ) throw (uno
ScDocShell* pDestDocShell = excel::getDocShell( pDestSheet->getModel() );
ScDocShell* pSrcDocShell = excel::getDocShell( getModel() );
if ( pDestDocShell && pSrcDocShell )
- pDestDocShell->TransferTab( *pSrcDocShell, static_cast<SCTAB>(nSrc), static_cast<SCTAB>(nDest), TRUE, TRUE );
+ pDestDocShell->TransferTab( *pSrcDocShell, static_cast<SCTAB>(nSrc), static_cast<SCTAB>(nDest), true, true );
}
}
// active the new sheet
@@ -729,7 +750,10 @@ uno::Reference< excel::XRange >
ScVbaWorksheet::Cells( const ::uno::Any &nRow, const ::uno::Any &nCol )
throw (uno::RuntimeException)
{
- return getSheetRange()->Cells( nRow, nCol );
+ // Performance optimization for often-called Cells method:
+ // Use a common helper method instead of creating a new ScVbaRange object
+ uno::Reference< table::XCellRange > xRange( getSheet(), uno::UNO_QUERY_THROW );
+ return ScVbaRange::CellsHelper( this, mxContext, xRange, nRow, nCol );
}
uno::Reference< excel::XRange >
@@ -806,8 +830,15 @@ ScVbaWorksheet::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeExceptio
uno::Any SAL_CALL
ScVbaWorksheet::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
{
- uno::Reference< excel::XWorkbook > xWorkbook( getParent(), uno::UNO_QUERY_THROW );
- return xWorkbook->Names( aIndex );
+ // fake sheet-local names by returning all global names
+ // #163498# initialize Names object with correct parent (this worksheet)
+ // TODO: real sheet-local names...
+ uno::Reference< beans::XPropertySet > xProps( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, mxModel ) );
+ if ( aIndex.hasValue() )
+ return uno::Any( xNames->Item( aIndex, uno::Any() ) );
+ return uno::Any( xNames );
}
uno::Any SAL_CALL
@@ -962,7 +993,7 @@ ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::U
::sal_Bool SAL_CALL
ScVbaWorksheet::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
{
- return sal_False;
+ return false;
}
uno::Reference< container::XNameAccess >
@@ -993,7 +1024,7 @@ ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeE
uno::Reference< container::XNameAccess > xFormControls( getFormControls() );
if ( xFormControls.is() )
return xFormControls->hasByName( aName );
- return sal_False;
+ return false;
}
uno::Any
@@ -1081,9 +1112,9 @@ ScVbaWorksheet::PrintOut( const uno::Any& From, const uno::Any& To, const uno::A
sal_Int32 nTo = 0;
sal_Int32 nFrom = 0;
sal_Int16 nCopies = 1;
- sal_Bool bCollate = sal_False;
- sal_Bool bSelection = sal_False;
- sal_Bool bIgnorePrintAreas = sal_False;
+ sal_Bool bCollate = false;
+ sal_Bool bSelection = false;
+ sal_Bool bIgnorePrintAreas = false;
From >>= nFrom;
To >>= nTo;
Copies >>= nCopies;
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index 3328c3c5b807..df490655d9ba 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -64,6 +64,7 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
css::uno::Reference< ov::excel::XChartObjects > mxCharts;
css::uno::Reference< ov::excel::XHyperlinks > mxHlinks;
::rtl::Reference< ScVbaSheetObjectsBase > mxButtons;
+ bool mbVeryHidden;
css::uno::Reference< ov::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
css::uno::Reference< ov::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index ed0cc73171cb..680b5ae6b600 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -267,7 +267,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After,
aStringSheet = xBeforeAfterSheet->getName();
else
After >>= aStringSheet;
- bBefore = sal_False;
+ bBefore = false;
}
if (!aStringSheet.getLength())
{
@@ -339,8 +339,8 @@ ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno::
sal_Int32 nTo = 0;
sal_Int32 nFrom = 0;
sal_Int16 nCopies = 1;
- sal_Bool bCollate = sal_False;
- sal_Bool bSelection = sal_False;
+ sal_Bool bCollate = false;
+ sal_Bool bSelection = false;
From >>= nFrom;
To >>= nTo;
Copies >>= nCopies;
@@ -362,9 +362,9 @@ ScVbaWorksheets::getVisible() throw (uno::RuntimeException)
while ( xEnum->hasMoreElements() )
{
uno::Reference< excel::XWorksheet > xSheet( xEnum->nextElement(), uno::UNO_QUERY_THROW );
- if ( xSheet->getVisible() == sal_False )
+ if ( xSheet->getVisible() == false )
{
- bVisible = sal_False;
+ bVisible = false;
break;
}
}
@@ -374,7 +374,7 @@ ScVbaWorksheets::getVisible() throw (uno::RuntimeException)
void SAL_CALL
ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeException)
{
- sal_Bool bState = sal_False;
+ sal_Bool bState = false;
if ( _visible >>= bState )
{
uno::Reference< container::XEnumeration > xEnum( createEnumeration(), uno::UNO_QUERY_THROW );
@@ -416,7 +416,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException)
bSelectSingle = false;
}
else
- rMarkData.SelectTable( static_cast< SCTAB >( pSheet->getSheetID() ), TRUE );
+ rMarkData.SelectTable( static_cast< SCTAB >( pSheet->getSheetID() ), sal_True );
}
}
diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx
index b87ec852b9a5..685377da4324 100644
--- a/sc/source/ui/vba/vbawsfunction.cxx
+++ b/sc/source/ui/vba/vbawsfunction.cxx
@@ -63,7 +63,7 @@ void lclConvertDoubleToBoolean( uno::Any& rAny )
void lclConvertBooleanToDouble( uno::Any& rAny )
{
- sal_Bool bValue( sal_False );
+ sal_Bool bValue( false );
if ( rAny >>= bValue )
{
if ( bValue )
@@ -268,7 +268,7 @@ ScVbaWSFunction::getValue(const rtl::OUString& /*PropertyName*/) throw(beans::Un
sal_Bool SAL_CALL
ScVbaWSFunction::hasMethod(const rtl::OUString& Name) throw(uno::RuntimeException)
{
- sal_Bool bIsFound = sal_False;
+ sal_Bool bIsFound = false;
try
{
// the function name contained in the com.sun.star.sheet.FunctionDescription service is alwayse localized.
@@ -288,7 +288,7 @@ ScVbaWSFunction::hasMethod(const rtl::OUString& Name) throw(uno::RuntimeExcepti
sal_Bool SAL_CALL
ScVbaWSFunction::hasProperty(const rtl::OUString& /*Name*/) throw(uno::RuntimeException)
{
- return sal_False;
+ return false;
}
::rtl::OUString SAL_CALL
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 115055b2f136..b35be06c4e5a 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -69,7 +69,7 @@ ScAuditingShell::ScAuditingShell(ScViewData* pData) :
nFunction( SID_FILL_ADD_PRED )
{
SetPool( &pViewData->GetViewShell()->GetPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -90,7 +90,7 @@ ScAuditingShell::~ScAuditingShell()
void ScAuditingShell::Execute( SfxRequest& rReq )
{
SfxBindings& rBindings = pViewData->GetBindings();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_FILL_ADD_PRED:
@@ -105,7 +105,7 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
break;
case SID_CANCEL: // Escape
case SID_FILL_NONE:
- pViewData->GetViewShell()->SetAuditShell( FALSE );
+ pViewData->GetViewShell()->SetAuditShell( false );
break;
case SID_FILL_SELECT:
@@ -115,15 +115,15 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pXItem;
const SfxPoolItem* pYItem;
- if ( pReqArgs->GetItemState( SID_RANGE_COL, TRUE, &pXItem ) == SFX_ITEM_SET
- && pReqArgs->GetItemState( SID_RANGE_ROW, TRUE, &pYItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_RANGE_COL, sal_True, &pXItem ) == SFX_ITEM_SET
+ && pReqArgs->GetItemState( SID_RANGE_ROW, sal_True, &pYItem ) == SFX_ITEM_SET )
{
DBG_ASSERT( pXItem->ISA(SfxInt16Item) && pYItem->ISA(SfxInt32Item),
"falsche Items" );
SCsCOL nCol = static_cast<SCsCOL>(((const SfxInt16Item*) pXItem)->GetValue());
SCsROW nRow = static_cast<SCsROW>(((const SfxInt32Item*) pYItem)->GetValue());
ScViewFunc* pView = pViewData->GetView();
- pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, FALSE, FALSE );
+ pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, false, false );
switch ( nFunction )
{
case SID_FILL_ADD_PRED:
@@ -150,7 +150,7 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
void ScAuditingShell::GetState( SfxItemSet& rSet )
{
- rSet.Put( SfxBoolItem( nFunction, TRUE ) ); // aktive Funktion markieren
+ rSet.Put( SfxBoolItem( nFunction, sal_True ) ); // aktive Funktion markieren
}
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 1b991b6ce057..209fff0eae38 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -72,9 +72,6 @@
#define CellMovement
#include "scslots.hxx"
-#define SearchSettings
-#include <svx/svxslots.hxx>
-
TYPEINIT1( ScCellShell, ScFormatShell );
SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) )
@@ -89,7 +86,7 @@ SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) )
ScCellShell::ScCellShell(ScViewData* pData) :
ScFormatShell(pData),
pImpl( new CellShell_Impl() ),
- bPastePossible(FALSE)
+ bPastePossible(false)
{
SetHelpId(HID_SCSHELL_CELLSH);
SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Cell")));
@@ -99,7 +96,7 @@ ScCellShell::~ScCellShell()
{
if ( pImpl->m_pClipEvtLstnr )
{
- pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), FALSE );
+ pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), false );
// The listener may just now be waiting for the SolarMutex and call the link
// afterwards, in spite of RemoveListener. So the link has to be reset, too.
@@ -120,9 +117,9 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
ScRange aMarkRange;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aMarkRange );
- BOOL bSimpleArea = (eMarkType == SC_MARK_SIMPLE);
- BOOL bOnlyNotBecauseOfMatrix;
- BOOL bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix );
+ sal_Bool bSimpleArea = (eMarkType == SC_MARK_SIMPLE);
+ sal_Bool bOnlyNotBecauseOfMatrix;
+ sal_Bool bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix );
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocShell = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -134,11 +131,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
nRow2 = aMarkRange.aEnd.Row();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- BOOL bDisable = FALSE;
- BOOL bNeedEdit = TRUE; // muss Selektion editierbar sein?
+ sal_Bool bDisable = false;
+ sal_Bool bNeedEdit = sal_True; // muss Selektion editierbar sein?
switch ( nWhich )
{
case FID_FILL_TO_BOTTOM: // Fuellen oben/unten
@@ -172,7 +169,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case FID_FILL_SERIES: // Block fuellen
case SID_OPENDLG_TABOP: // Mehrfachoperationen, mind. 2 Zellen markiert?
if (pDoc->GetChangeTrack()!=NULL &&nWhich ==SID_OPENDLG_TABOP)
- bDisable = TRUE;
+ bDisable = sal_True;
else
bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == nRow2);
@@ -210,7 +207,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
//! muss man leben.. wird in Copy-Routine abgefangen, sonst
//! muesste hier nochmal Aufwand getrieben werden
if ( !(!bEditable && bOnlyNotBecauseOfMatrix) )
- bNeedEdit = FALSE; // erlaubt, wenn geschuetzt/ReadOnly
+ bNeedEdit = false; // erlaubt, wenn geschuetzt/ReadOnly
break;
case SID_AUTOFORMAT: // Autoformat, mind. 3x3 selektiert
@@ -222,11 +219,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
{
if ( !bEditable && bOnlyNotBecauseOfMatrix )
{
- bNeedEdit = FALSE;
+ bNeedEdit = false;
}
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -237,14 +234,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case SID_ENABLE_HYPHENATION :
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
if ( !bEditable && bOnlyNotBecauseOfMatrix )
- bNeedEdit = FALSE;
+ bNeedEdit = false;
break;
case FID_VALIDATION:
{
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -257,14 +254,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
break;
}
if (!bDisable && bNeedEdit && !bEditable)
- bDisable = TRUE;
+ bDisable = sal_True;
if (bDisable)
rSet.DisableItem(nWhich);
else if (nWhich == SID_ENABLE_HYPHENATION)
{
// toggle slots need a bool item
- rSet.Put( SfxBoolItem( nWhich, FALSE ) );
+ rSet.Put( SfxBoolItem( nWhich, false ) );
}
nWhich = aIter.NextWhich();
}
@@ -282,11 +279,11 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
GetViewData()->GetTabNo() );
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- BOOL bDisable = FALSE;
- BOOL bNeedEdit = TRUE; // muss Cursorposition editierbar sein?
+ sal_Bool bDisable = false;
+ sal_Bool bNeedEdit = sal_True; // muss Cursorposition editierbar sein?
switch ( nWhich )
{
case SID_THESAURUS:
@@ -296,7 +293,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!bDisable)
{
// test for available languages
- USHORT nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor );
+ sal_uInt16 nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor );
bDisable = !ScModule::HasThesaurusLanguage( nLang );
}
}
@@ -312,9 +309,9 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!pDoc->IsBlockEditable( aCursor.Tab(), aRange.aStart.Col(),aRange.aStart.Row(),
aRange.aEnd.Col(),aRange.aEnd.Row() ))
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
- bNeedEdit=FALSE;
+ bNeedEdit=false;
}
}
@@ -323,7 +320,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
{
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -331,7 +328,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!bDisable && bNeedEdit)
if (!pDoc->IsBlockEditable( aCursor.Tab(), aCursor.Col(),aCursor.Row(),
aCursor.Col(),aCursor.Row() ))
- bDisable = TRUE;
+ bDisable = sal_True;
if (bDisable)
rSet.DisableItem(nWhich);
nWhich = aIter.NextWhich();
@@ -369,13 +366,13 @@ sal_Bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDataHe
return sal_True;
}
- return sal_False;
+ return false;
}
void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats )
{
Window* pWin = GetViewData()->GetActiveWin();
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
@@ -403,11 +400,11 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats )
// Einfuegen, Inhalte einfuegen
-BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData )
+sal_Bool lcl_IsCellPastePossible( const TransferableDataHelper& rData )
{
- BOOL bPossible = FALSE;
+ sal_Bool bPossible = false;
if ( ScTransferObj::GetOwnClipboard( NULL ) || ScDrawTransferObj::GetOwnClipboard( NULL ) )
- bPossible = TRUE;
+ bPossible = sal_True;
else
{
if ( rData.HasFormat( SOT_FORMAT_BITMAP ) ||
@@ -427,7 +424,7 @@ BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData )
rData.HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE ) ||
rData.HasFormat( SOT_FORMATSTR_ID_DIF ) )
{
- bPossible = TRUE;
+ bPossible = sal_True;
}
}
return bPossible;
@@ -460,14 +457,14 @@ void ScCellShell::GetClipState( SfxItemSet& rSet )
pImpl->m_pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScCellShell, ClipboardChanged ) );
pImpl->m_pClipEvtLstnr->acquire();
Window* pWin = GetViewData()->GetActiveWin();
- pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, TRUE );
+ pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
bPastePossible = lcl_IsCellPastePossible( aDataHelper );
}
- BOOL bDisable = !bPastePossible;
+ sal_Bool bDisable = !bPastePossible;
// Zellschutz / Multiselektion
@@ -478,11 +475,11 @@ void ScCellShell::GetClipState( SfxItemSet& rSet )
SCTAB nTab = GetViewData()->GetTabNo();
ScDocument* pDoc = GetViewData()->GetDocShell()->GetDocument();
if (!pDoc->IsBlockEditable( nTab, nCol,nRow, nCol,nRow ))
- bDisable = TRUE;
+ bDisable = sal_True;
ScRange aDummy;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aDummy);
if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED)
- bDisable = TRUE;
+ bDisable = sal_True;
}
if (bDisable)
@@ -532,7 +529,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -548,7 +545,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( pData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
{
String aStr;
- USHORT nFlags = SCA_VALID | SCA_TAB_3D;
+ sal_uInt16 nFlags = SCA_VALID | SCA_TAB_3D;
aRange.Format(aStr,nFlags,pDoc);
rSet.Put( SfxStringItem( nWhich, aStr ) );
}
@@ -612,7 +609,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
* 1: ER Click erweitert Selektion
* 2: ERG Click definiert weitere Selektion
*/
- USHORT nMode = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nMode = pTabViewShell->GetLockedModifiers();
switch ( nMode )
{
@@ -654,7 +651,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")) ) );
else
{
- USHORT nErrCode = 0;
+ sal_uInt16 nErrCode = 0;
ScBaseCell* pCell;
pDoc->GetCell( nPosX, nPosY, nTab, pCell );
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
@@ -745,7 +742,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( !pDoc->IsScenario(nTab) )
{
String aStr;
- USHORT nFlags;
+ sal_uInt16 nFlags;
SCTAB nScTab = nTab + 1;
String aProtect;
bool bSheetProtected = pDoc->IsTabProtected(nTab);
@@ -756,7 +753,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
aList.Insert( new String( aStr ), LIST_APPEND );
pDoc->GetScenarioData( nScTab, aStr, aDummyCol, nFlags );
aList.Insert( new String( aStr ), LIST_APPEND );
- // Protection is TRUE if both Sheet and Scenario are protected
+ // Protection is sal_True if both Sheet and Scenario are protected
aProtect = (bSheetProtected && (nFlags & SC_SCENARIO_PROTECT)) ? '1' : '0';
aList.Insert( new String( aProtect), LIST_APPEND );
++nScTab;
@@ -765,7 +762,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
else
{
String aComment;
- USHORT nDummyFlags;
+ sal_uInt16 nDummyFlags;
pDoc->GetScenarioData( nTab, aComment, aDummyCol, nDummyFlags );
DBG_ASSERT( aList.Count() == 0, "List not empty!" );
aList.Insert( new String( aComment ) );
@@ -773,8 +770,8 @@ void ScCellShell::GetState(SfxItemSet &rSet)
rSet.Put( SfxStringListItem( nWhich, &aList ) );
- ULONG nCount = aList.Count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uLong nCount = aList.Count();
+ for ( sal_uLong i=0; i<nCount; i++ )
delete (String*) aList.GetObject(i);
}
break;
@@ -809,7 +806,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (!pTabViewShell->OutlinePossible(FALSE))
+ else if (!pTabViewShell->OutlinePossible(false))
rSet.DisableItem( nWhich );
break;
@@ -819,7 +816,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (!pTabViewShell->OutlinePossible(TRUE))
+ else if (!pTabViewShell->OutlinePossible(sal_True))
rSet.DisableItem( nWhich );
break;
@@ -832,7 +829,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
else
{
- BOOL bCol, bRow;
+ sal_Bool bCol, bRow;
pTabViewShell->TestRemoveOutline( bCol, bRow );
if ( !bCol && !bRow )
rSet.DisableItem( nWhich );
@@ -888,21 +885,21 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_DELETE_NOTE:
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = false;
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
{
if ( pDoc->IsSelectionEditable( rMark ) )
{
// look for at least one note in selection
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
size_t nCount = aRanges.size();
for (size_t nPos = 0; nPos < nCount && !bEnable; ++nPos)
{
ScCellIterator aCellIter(pDoc, *aRanges[nPos]);
for( ScBaseCell* pCell = aCellIter.GetFirst(); pCell && !bEnable; pCell = aCellIter.GetNext() )
if ( pCell->HasNote() )
- bEnable = TRUE; // note found
+ bEnable = sal_True; // note found
}
}
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 059d27fa2649..c5cb779ee2a4 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -105,7 +105,7 @@
#include <svx/dialogs.hrc>
#include "scabstdlg.hxx"
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -127,7 +127,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -218,7 +218,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bTheFlag=(pDoc->GetChangeTrack()!=NULL);
+ sal_Bool bTheFlag=(pDoc->GetChangeTrack()!=NULL);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -289,7 +289,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
ScRange aRange;
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bTheFlag=GetViewData()->IsMultiMarked() ||
+ sal_Bool bTheFlag=GetViewData()->IsMultiMarked() ||
(GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE_FILTERED) ||
(pDoc->GetChangeTrack() != NULL);
@@ -342,7 +342,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_DELETE:
{
- USHORT nFlags = IDF_NONE;
+ sal_uInt16 nFlags = IDF_NONE;
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
@@ -353,7 +353,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
aFlags.ToUpperAscii();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ )
{
@@ -361,7 +361,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
case 'A': // Alle
nFlags |= IDF_ALL;
- bCont = FALSE; // nicht mehr weitermachen!
+ bCont = false; // nicht mehr weitermachen!
break;
case 'S': nFlags |= IDF_STRING; break;
case 'V': nFlags |= IDF_VALUE; break;
@@ -453,10 +453,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_FILL_TAB:
{
- USHORT nFlags = IDF_NONE;
- USHORT nFunction = PASTE_NOFUNC;
- BOOL bSkipEmpty = FALSE;
- BOOL bAsLink = FALSE;
+ sal_uInt16 nFlags = IDF_NONE;
+ sal_uInt16 nFunction = PASTE_NOFUNC;
+ sal_Bool bSkipEmpty = false;
+ sal_Bool bAsLink = false;
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
@@ -467,7 +467,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
aFlags.ToUpperAscii();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ )
{
@@ -475,7 +475,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
case 'A': // Alle
nFlags |= IDF_ALL;
- bCont = FALSE; // nicht mehr weitermachen!
+ bCont = false; // nicht mehr weitermachen!
break;
case 'S': nFlags |= IDF_STRING; break;
case 'V': nFlags |= IDF_VALUE; break;
@@ -495,7 +495,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
RID_SCDLG_INSCONT, 0, /* nCheckDefaults */
&ScGlobal::GetRscString(STR_FILL_TAB));
DBG_ASSERT(pDlg, "Dialog create fail!");
- pDlg->SetFillMode(TRUE);
+ pDlg->SetFillMode(true);
if (pDlg->Execute() == RET_OK)
{
@@ -545,14 +545,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SCCOL nEndCol;
SCROW nEndRow;
SCTAB nEndTab;
- USHORT nPossDir = FDS_OPT_NONE;
+ sal_uInt16 nPossDir = FDS_OPT_NONE;
FillDir eFillDir = FILL_TO_BOTTOM;
FillCmd eFillCmd = FILL_LINEAR;
FillDateCmd eFillDateCmd = FILL_DAY;
double fStartVal = MAXDOUBLE;
double fIncVal = 1;
double fMaxVal = MAXDOUBLE;
- BOOL bDoIt = FALSE;
+ sal_Bool bDoIt = false;
GetViewData()->GetSimpleArea( nStartCol, nStartRow, nStartTab,
nEndCol, nEndRow, nEndTab );
@@ -580,7 +580,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
sal_uInt32 nKey;
double fTmpVal;
- bDoIt=FALSE;
+ bDoIt=false;
if( IS_AVAILABLE( FID_FILL_SERIES, &pItem ) )
aFillDir = ((const SfxStringItem*)pItem)->GetValue();
@@ -635,7 +635,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( pFormatter->IsNumberFormat( aFillMax, nKey, fTmpVal ))
fMaxVal = fTmpVal;
- bDoIt = TRUE;
+ bDoIt = sal_True;
}
else // (pReqArgs == NULL) => Dialog hochziehen
@@ -735,7 +735,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( nStartCol != nEndCol && nStartRow != nEndRow )
{
- pDlg->SetEdStartValEnabled(FALSE);
+ pDlg->SetEdStartValEnabled(false);
}
if ( pDlg->Execute() == RET_OK )
@@ -753,7 +753,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
fStartVal = pDlg->GetStart();
fIncVal = pDlg->GetStep();
fMaxVal = pDlg->GetMax();
- bDoIt = TRUE;
+ bDoIt = sal_True;
}
delete pDlg;
}
@@ -799,7 +799,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
rReq.AppendItem( SfxStringItem( FN_PARAM_2, aPara ) );
- ULONG nFormatKey = pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER,
+ sal_uLong nFormatKey = pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER,
ScGlobal::eLnge );
pFormatter->GetOutputString( fIncVal, nFormatKey, aPara, &pColor );
@@ -935,7 +935,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_OUTLINE_HIDE:
if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) )
- pTabViewShell->SetDataPilotDetails( FALSE );
+ pTabViewShell->SetDataPilotDetails( false );
else
pTabViewShell->HideMarkedOutlines();
rReq.Done();
@@ -948,7 +948,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pDPObj )
{
Sequence<sheet::DataPilotFieldFilter> aFilters;
- USHORT nOrientation;
+ sal_uInt16 nOrientation;
if ( pTabViewShell->HasSelectionForDrillDown( nOrientation ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -960,7 +960,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
String aNewDimName( pDlg->GetDimensionName() );
- pTabViewShell->SetDataPilotDetails( TRUE, &aNewDimName );
+ pTabViewShell->SetDataPilotDetails( sal_True, &aNewDimName );
}
}
else if ( !pDPObj->IsServiceData() &&
@@ -969,7 +969,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFilters ) )
pTabViewShell->ShowDataPilotSourceData( *pDPObj, aFilters );
else
- pTabViewShell->SetDataPilotDetails( TRUE );
+ pTabViewShell->SetDataPilotDetails( sal_True );
}
else
pTabViewShell->ShowMarkedOutlines();
@@ -979,8 +979,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_OUTLINE_MAKE:
{
- BOOL bColumns = FALSE;
- BOOL bOk = TRUE;
+ sal_Bool bColumns = false;
+ sal_Bool bOk = sal_True;
if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) )
@@ -1018,12 +1018,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
pTabViewShell->GroupDataPilot();
- bOk = FALSE;
+ bOk = false;
}
else if( pReqArgs != NULL )
{
const SfxPoolItem* pItem;
- bOk = FALSE;
+ bOk = false;
if( IS_AVAILABLE( SID_OUTLINE_MAKE, &pItem ) )
{
@@ -1032,28 +1032,28 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch( aCol.GetChar(0) )
{
- case 'R': bColumns=FALSE; bOk = TRUE;break;
- case 'C': bColumns=TRUE; bOk = TRUE;break;
+ case 'R': bColumns=false; bOk = sal_True;break;
+ case 'C': bColumns=sal_True; bOk = sal_True;break;
}
}
}
else // Dialog, wenn nicht ganze Zeilen/Spalten markiert
{
if ( GetViewData()->SimpleColMarked() && !GetViewData()->SimpleRowMarked() )
- bColumns = TRUE;
+ bColumns = sal_True;
else if ( !GetViewData()->SimpleColMarked() && GetViewData()->SimpleRowMarked() )
- bColumns = FALSE;
+ bColumns = false;
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,FALSE);
+ AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,false);
DBG_ASSERT(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
else
- bOk = FALSE;
+ bOk = false;
delete pDlg;
}
}
@@ -1073,19 +1073,19 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_OUTLINE_REMOVE:
{
- BOOL bColumns = FALSE;
- BOOL bOk = TRUE;
+ sal_Bool bColumns = false;
+ sal_Bool bOk = sal_True;
if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) )
{
pTabViewShell->UngroupDataPilot();
- bOk = FALSE;
+ bOk = false;
}
else if( pReqArgs != NULL )
{
const SfxPoolItem* pItem;
- bOk = FALSE;
+ bOk = false;
if( IS_AVAILABLE( SID_OUTLINE_REMOVE, &pItem ) )
{
@@ -1094,34 +1094,34 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch( aCol.GetChar(0) )
{
- case 'R': bColumns=FALSE; bOk = TRUE;break;
- case 'C': bColumns=TRUE; bOk = TRUE;break;
+ case 'R': bColumns=false; bOk = sal_True;break;
+ case 'C': bColumns=sal_True; bOk = sal_True;break;
}
}
}
else // Dialog nur, wenn Aufheben fuer Zeilen und Spalten moeglich
{
- BOOL bColPoss, bRowPoss;
+ sal_Bool bColPoss, bRowPoss;
pTabViewShell->TestRemoveOutline( bColPoss, bRowPoss );
if ( bColPoss && bRowPoss )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,TRUE);
+ AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,true);
DBG_ASSERT(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
else
- bOk = FALSE;
+ bOk = false;
delete pDlg;
}
else if ( bColPoss )
- bColumns = TRUE;
+ bColumns = sal_True;
else if ( bRowPoss )
- bColumns = FALSE;
+ bColumns = false;
else
- bOk = FALSE;
+ bOk = false;
}
if (bOk)
{
@@ -1145,7 +1145,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_COPY: // fuer Grafiken in DrawShell
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- pTabViewShell->CopyToClip( NULL, FALSE, FALSE, TRUE );
+ pTabViewShell->CopyToClip( NULL, false, false, sal_True );
rReq.Done();
GetViewData()->SetPasteMode( (ScPasteFlags) (SC_PASTE_MODE | SC_PASTE_BORDER) );
pTabViewShell->ShowCursor();
@@ -1156,7 +1156,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_CUT: // fuer Grafiken in DrawShell
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- pTabViewShell->CutToClip( NULL, TRUE );
+ pTabViewShell->CutToClip( NULL, sal_True );
rReq.Done();
GetViewData()->SetPasteMode( SC_PASTE_MODE );
pTabViewShell->UpdateCopySourceOverlay();
@@ -1174,10 +1174,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -1186,9 +1186,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( nFormat )
{
Window* pWin = GetViewData()->GetActiveWin();
- BOOL bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL );
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
- BOOL bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE );
+ sal_Bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE );
if ( bCells && bOle )
pTabViewShell->PasteFromSystem();
@@ -1207,16 +1207,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_INS_CELL_CONTENTS:
{
- USHORT nFlags = IDF_NONE;
- USHORT nFunction = PASTE_NOFUNC;
- BOOL bSkipEmpty = FALSE;
- BOOL bTranspose = FALSE;
- BOOL bAsLink = FALSE;
+ sal_uInt16 nFlags = IDF_NONE;
+ sal_uInt16 nFunction = PASTE_NOFUNC;
+ sal_Bool bSkipEmpty = false;
+ sal_Bool bTranspose = false;
+ sal_Bool bAsLink = false;
InsCellCmd eMoveMode = INS_NONE;
Window* pWin = GetViewData()->GetActiveWin();
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bOtherDoc = !pDoc->IsClipboardSource();
+ sal_Bool bOtherDoc = !pDoc->IsClipboardSource();
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
if ( pOwnClip )
{
@@ -1231,7 +1231,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
aFlags.ToUpperAscii();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ )
{
@@ -1239,7 +1239,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
case 'A': // Alle
nFlags |= IDF_ALL;
- bCont = FALSE; // nicht mehr weitermachen!
+ bCont = false; // nicht mehr weitermachen!
break;
case 'S': nFlags |= IDF_STRING; break;
case 'V': nFlags |= IDF_VALUE; break;
@@ -1250,11 +1250,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
}
- SFX_REQUEST_ARG( rReq, pFuncItem, SfxUInt16Item, FN_PARAM_1, sal_False );
- SFX_REQUEST_ARG( rReq, pSkipItem, SfxBoolItem, FN_PARAM_2, sal_False );
- SFX_REQUEST_ARG( rReq, pTransposeItem, SfxBoolItem, FN_PARAM_3, sal_False );
- SFX_REQUEST_ARG( rReq, pLinkItem, SfxBoolItem, FN_PARAM_4, sal_False );
- SFX_REQUEST_ARG( rReq, pMoveItem, SfxInt16Item, FN_PARAM_5, sal_False );
+ SFX_REQUEST_ARG( rReq, pFuncItem, SfxUInt16Item, FN_PARAM_1, false );
+ SFX_REQUEST_ARG( rReq, pSkipItem, SfxBoolItem, FN_PARAM_2, false );
+ SFX_REQUEST_ARG( rReq, pTransposeItem, SfxBoolItem, FN_PARAM_3, false );
+ SFX_REQUEST_ARG( rReq, pLinkItem, SfxBoolItem, FN_PARAM_4, false );
+ SFX_REQUEST_ARG( rReq, pMoveItem, SfxInt16Item, FN_PARAM_5, false );
if ( pFuncItem )
nFunction = pFuncItem->GetValue();
if ( pSkipItem )
@@ -1296,7 +1296,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SCROW nClipStartY, nClipSizeY;
pOwnClip->GetDocument()->GetClipStart( nClipStartX, nClipStartY );
// for CutMode, filtered rows can always be included
- pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, TRUE );
+ pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, sal_True );
int nDisableShift = 0;
if ( nClipStartX <= nPosX + nClipSizeX &&
nPosX <= nClipStartX + nClipSizeX )
@@ -1333,7 +1333,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
pTabViewShell->PasteFromClip( nFlags, pOwnClip->GetDocument(),
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, TRUE ); // allow warning dialog
+ eMoveMode, IDF_NONE, sal_True ); // allow warning dialog
}
if( !pReqArgs )
@@ -1377,18 +1377,18 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
// Clipboard-ID als Parameter angegeben? Basic "PasteSpecial(Format)"
const SfxPoolItem* pItem=NULL;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
- ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
- BOOL bRet=TRUE;
+ sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_Bool bRet=sal_True;
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
if ( bDraw && nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE )
pTabViewShell->PasteDraw();
else
- bRet = pTabViewShell->PasteFromSystem(nFormat, TRUE); // TRUE: keine Fehlermeldungen
+ bRet = pTabViewShell->PasteFromSystem(nFormat, sal_True); // TRUE: keine Fehlermeldungen
}
if ( bRet )
@@ -1411,21 +1411,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else // Zeichenobjekte oder fremde Daten
{
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS );
GetPossibleClipboardFormats( aFormats );
- USHORT nFormatCount = aFormats.Count();
+ sal_uInt16 nFormatCount = aFormats.Count();
if ( nFormatCount )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( pTabViewShell->GetDialogParent() );
if ( pDlg )
{
- for (USHORT i=0; i<nFormatCount; i++)
+ for (sal_uInt16 i=0; i<nFormatCount; i++)
{
- ULONG nFormatId = aFormats.GetClipbrdFormatId( i );
+ sal_uLong nFormatId = aFormats.GetClipbrdFormatId( i );
String aName = aFormats.GetClipbrdFormatName( i );
// special case for paste dialog: '*' is replaced by object type
if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE )
@@ -1435,7 +1435,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
if (nFormat > 0)
{
{
@@ -1471,22 +1471,22 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
//
case FID_INS_ROWBRK:
- pTabViewShell->InsertPageBreak( FALSE );
+ pTabViewShell->InsertPageBreak( false );
rReq.Done();
break;
case FID_INS_COLBRK:
- pTabViewShell->InsertPageBreak( TRUE );
+ pTabViewShell->InsertPageBreak( sal_True );
rReq.Done();
break;
case FID_DEL_ROWBRK:
- pTabViewShell->DeletePageBreak( FALSE );
+ pTabViewShell->DeletePageBreak( false );
rReq.Done();
break;
case FID_DEL_COLBRK:
- pTabViewShell->DeletePageBreak( TRUE );
+ pTabViewShell->DeletePageBreak( sal_True );
rReq.Done();
break;
@@ -1640,15 +1640,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_DEC_INDENT:
- pTabViewShell->ChangeIndent( FALSE );
+ pTabViewShell->ChangeIndent( false );
break;
case SID_INC_INDENT:
- pTabViewShell->ChangeIndent( TRUE );
+ pTabViewShell->ChangeIndent( sal_True );
break;
case FID_USE_NAME:
{
- USHORT nFlags = pTabViewShell->GetCreateNameFlags();
+ sal_uInt16 nFlags = pTabViewShell->GetCreateNameFlags();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -1670,7 +1670,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState( SCITEM_CONSOLIDATEDATA, TRUE, &pItem ) )
+ pReqArgs->GetItemState( SCITEM_CONSOLIDATEDATA, sal_True, &pItem ) )
{
const ScConsolidateParam& rParam =
((const ScConsolidateItem*)pItem)->GetData();
@@ -1731,29 +1731,29 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else
{
- USHORT nId = ScNameDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScNameDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_DEFINE_COLROWNAMERANGES:
{
- USHORT nId = ScColRowNameRangesDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScColRowNameRangesDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_UPDATECHART:
{
- BOOL bAll = FALSE;
+ sal_Bool bAll = false;
if( pReqArgs )
{
@@ -1822,7 +1822,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pScMod->InputKeyEvent( KeyEvent('=',KeyCode()) );
String aName = pDlg->GetSelectedName();
- pHdl->InsertFunction( aName, FALSE ); // ohne "()"
+ pHdl->InsertFunction( aName, false ); // ohne "()"
}
}
break;
@@ -1868,7 +1868,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
bool bShow;
const SfxPoolItem* pItem;
- if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, TRUE, &pItem ) == SFX_ITEM_SET) )
+ if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, sal_True, &pItem ) == SFX_ITEM_SET) )
bShow = ((const SfxBoolItem*) pItem)->GetValue();
else
bShow = !pNote->IsCaptionShown();
@@ -1898,14 +1898,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if ( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, pItem );
if ( pStringItem )
aChars = pStringItem->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
aFontName = pFontItem->GetValue();
@@ -1933,7 +1933,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pTabViewShell->GetSelectionScriptType() );
SfxAllItemSet aSet( GetPool() );
- aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
@@ -1941,8 +1941,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, false );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, false );
if ( pItem && pFontItem )
{
@@ -1993,7 +1993,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
const String& rName = pHyper->GetName();
const String& rURL = pHyper->GetURL();
const String& rTarget = pHyper->GetTargetFrame();
- USHORT nType = (USHORT) pHyper->GetInsertMode();
+ sal_uInt16 nType = (sal_uInt16) pHyper->GetInsertMode();
pTabViewShell->InsertURL( rName, rURL, rTarget, nType );
rReq.Done();
@@ -2030,21 +2030,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
String aFilter;
String aOptions;
String aSource;
- ULONG nRefresh=0;
+ sal_uLong nRefresh=0;
- SFX_REQUEST_ARG( rReq, pFile, SfxStringItem, SID_FILE_NAME, sal_False );
- SFX_REQUEST_ARG( rReq, pSource, SfxStringItem, FN_PARAM_1, sal_False );
+ SFX_REQUEST_ARG( rReq, pFile, SfxStringItem, SID_FILE_NAME, false );
+ SFX_REQUEST_ARG( rReq, pSource, SfxStringItem, FN_PARAM_1, false );
if ( pFile && pSource )
{
aFile = pFile->GetValue();
aSource = pSource->GetValue();
- SFX_REQUEST_ARG( rReq, pFilter, SfxStringItem, SID_FILTER_NAME, sal_False );
+ SFX_REQUEST_ARG( rReq, pFilter, SfxStringItem, SID_FILTER_NAME, false );
if ( pFilter )
aFilter = pFilter->GetValue();
- SFX_REQUEST_ARG( rReq, pOptions, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False );
+ SFX_REQUEST_ARG( rReq, pOptions, SfxStringItem, SID_FILE_FILTEROPTIONS, false );
if ( pOptions )
aOptions = pOptions->GetValue();
- SFX_REQUEST_ARG( rReq, pRefresh, SfxUInt32Item, FN_PARAM_2, sal_False );
+ SFX_REQUEST_ARG( rReq, pRefresh, SfxUInt32Item, FN_PARAM_2, false );
if ( pRefresh )
nRefresh = pRefresh->GetValue();
}
@@ -2090,12 +2090,12 @@ void ScCellShell::ExecuteTrans( SfxRequest& rReq )
void ScCellShell::ExecuteExternalSource(
const String& _rFile, const String& _rFilter, const String& _rOptions,
- const String& _rSource, ULONG _nRefresh, SfxRequest& _rRequest )
+ const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest )
{
if ( _rFile.Len() && _rSource.Len() ) // filter may be empty
{
ScRange aLinkRange;
- BOOL bMove = FALSE;
+ sal_Bool bMove = false;
ScViewData* pData = GetViewData();
ScMarkData& rMark = pData->GetMarkData();
@@ -2103,14 +2103,14 @@ void ScCellShell::ExecuteExternalSource(
if ( rMark.IsMarked() )
{
rMark.GetMarkArea( aLinkRange );
- bMove = TRUE; // insert/delete cells to fit range
+ bMove = sal_True; // insert/delete cells to fit range
}
else
aLinkRange = ScRange( pData->GetCurX(), pData->GetCurY(), pData->GetTabNo() );
ScDocFunc aFunc(*pData->GetDocShell());
aFunc.InsertAreaLink( _rFile, _rFilter, _rOptions, _rSource,
- aLinkRange, _nRefresh, bMove, FALSE );
+ aLinkRange, _nRefresh, bMove, false );
_rRequest.Done();
}
else
@@ -2137,10 +2137,10 @@ void ScCellShell::ExecuteDataPilotDialog()
else // create new table
{
// select database range or data
- pTabViewShell->GetDBData( TRUE, SC_DB_OLD );
+ pTabViewShell->GetDBData( true, SC_DB_OLD );
ScMarkData& rMark = GetViewData()->GetMarkData();
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
- pTabViewShell->MarkDataArea( FALSE );
+ pTabViewShell->MarkDataArea( false );
// output to cursor position for non-sheet data
ScAddress aDestPos( pData->GetCurX(), pData->GetCurY(),
@@ -2271,10 +2271,10 @@ void ScCellShell::ExecuteDataPilotDialog()
{
// start layout dialog
- USHORT nId = ScPivotLayoutWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScPivotLayoutWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
}
@@ -2283,7 +2283,7 @@ IMPL_LINK( ScCellShell, DialogClosed, AbstractScLinkedAreaDlg*, EMPTYARG )
DBG_ASSERT( pImpl->m_pLinkedDlg, "ScCellShell::DialogClosed(): invalid request" );
DBG_ASSERT( pImpl->m_pRequest, "ScCellShell::DialogClosed(): invalid request" );
String sFile, sFilter, sOptions, sSource;
- ULONG nRefresh = 0;
+ sal_uLong nRefresh = 0;
if ( pImpl->m_pLinkedDlg->GetResult() == RET_OK )
{
@@ -2327,12 +2327,12 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa
SCCOL nClipEndX;
SCROW nClipEndY;
pClipDoc->GetClipStart( nClipStartX, nClipStartY );
- pClipDoc->GetClipArea( nClipEndX, nClipEndY, TRUE );
+ pClipDoc->GetClipArea( nClipEndX, nClipEndY, sal_True );
nClipEndX = nClipEndX + nClipStartX;
nClipEndY = nClipEndY + nClipStartY; // GetClipArea returns the difference
ScRange aSource( nClipStartX, nClipStartY, nSourceTab, nClipEndX, nClipEndY, nSourceTab );
- BOOL bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() );
+ sal_Bool bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() );
if ( !bDone )
pTabViewShell->ErrorMessage( STR_ERR_DATAPILOT_INPUT );
}
@@ -2351,7 +2351,7 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa
nFlags &= ~IDF_FORMULA;
pTabViewShell->PasteFromClip( nFlags, pClipDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bShowDialog ); // allow warning dialog
}
}
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 3440a4fae7ae..4cb71cc45bd4 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -77,7 +77,7 @@
using namespace com::sun::star;
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
//------------------------------------------------------------------
@@ -121,14 +121,14 @@ bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange )
return bRet;
}
-BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
+sal_Bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
{
ScTabViewShell* pTabViewShell = pData->GetViewShell();
ScDBData* pDBData = pTabViewShell->GetDBData();
ScDocument* pDoc = pData->GetDocument();
SCTAB nTab = pData->GetTabNo();
ScDirection eFillDir = DIR_TOP;
- BOOL bSort = TRUE;
+ sal_Bool bSort = sal_True;
ScRange aExternalRange;
if( rSortParam.nCol1 != rSortParam.nCol2 )
@@ -147,7 +147,7 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
SCCOL nStartCol = aExternalRange.aStart.Col();
SCROW nEndRow = aExternalRange.aEnd.Row();
SCCOL nEndCol = aExternalRange.aEnd.Col();
- pDoc->GetDataArea( aExternalRange.aStart.Tab(), nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false );
+ pDoc->GetDataArea( aExternalRange.aStart.Tab(), nStartCol, nStartRow, nEndCol, nEndRow, false, false );
aExternalRange.aStart.SetRow( nStartRow );
aExternalRange.aStart.SetCol( nStartCol );
aExternalRange.aEnd.SetRow( nEndRow );
@@ -156,7 +156,7 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
if(( rSortParam.nCol1 == rSortParam.nCol2 && aExternalRange.aStart.Col() != aExternalRange.aEnd.Col() ) ||
( rSortParam.nRow1 == rSortParam.nRow2 && aExternalRange.aStart.Row() != aExternalRange.aEnd.Row() ) )
{
- USHORT nFmt = SCA_VALID;
+ sal_uInt16 nFmt = SCA_VALID;
String aExtendStr,aCurrentStr;
pTabViewShell->AddHighlightRange( aExternalRange,Color( COL_LIGHTBLUE ) );
@@ -176,13 +176,13 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
{
if( bResult == BTN_EXTEND_RANGE )
{
- pTabViewShell->MarkRange( aExternalRange, FALSE );
+ pTabViewShell->MarkRange( aExternalRange, false );
pDBData->SetArea( nTab, aExternalRange.aStart.Col(), aExternalRange.aStart.Row(), aExternalRange.aEnd.Col(), aExternalRange.aEnd.Row() );
}
}
else
{
- bSort = FALSE;
+ bSort = false;
pData->GetDocShell()->CancelAutoDBRange();
}
@@ -205,7 +205,7 @@ namespace
void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
ScModule* pScMod = SC_MOD();
@@ -224,14 +224,14 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
// check if database beamer is open
SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
- BOOL bWasOpen = FALSE;
+ sal_Bool bWasOpen = false;
{
uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")),
frame::FrameSearchFlag::CHILDREN);
if ( xBeamerFrame.is() )
- bWasOpen = TRUE;
+ bWasOpen = sal_True;
}
if ( bWasOpen )
@@ -244,12 +244,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
// show database beamer: SfxViewFrame call must be synchronous
- pViewFrame->ExecuteSlot( rReq, (BOOL) FALSE ); // FALSE = synchronous
+ pViewFrame->ExecuteSlot( rReq, (sal_Bool) false ); // sal_False = synchronous
// select current database in database beamer
ScImportParam aImportParam;
- ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD); // don't create if none found
+ ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD); // don't create if none found
if (pDBData)
pDBData->GetImportParam( aImportParam );
@@ -261,8 +261,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_REIMPORT_DATA:
{
- BOOL bOk = FALSE;
- ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD);
+ sal_Bool bOk = false;
+ ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD);
if (pDBData)
{
ScImportParam aImportParam;
@@ -271,7 +271,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
pTabViewShell->ImportData( aImportParam );
pDBData->SetImportParam( aImportParam ); //! Undo ??
- bOk = TRUE;
+ bOk = sal_True;
}
}
@@ -285,12 +285,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_REFRESH_DBAREA:
{
- ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD);
+ ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD);
if (pDBData)
{
// Import wiederholen wie SID_REIMPORT_DATA
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
if (aImportParam.bImport && !pDBData->HasImportSelection())
@@ -360,7 +360,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScDBData* pDBData = pTabViewShell->GetDBData();
pDBData->GetSubTotalParam( aSubTotalParam );
- aSubTotalParam.bRemoveOnly = FALSE;
+ aSubTotalParam.bRemoveOnly = false;
aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, GetViewData(), &aSubTotalParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -387,8 +387,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
else // if (bResult == SCRET_REMOVE)
{
pOutSet = &aArgSet;
- aSubTotalParam.bRemoveOnly = TRUE;
- aSubTotalParam.bReplace = TRUE;
+ aSubTotalParam.bRemoveOnly = sal_True;
+ aSubTotalParam.bReplace = sal_True;
aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA,
GetViewData(),
&aSubTotalParam ) );
@@ -424,7 +424,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScDocument* pDoc = GetViewData()->GetDocument();
pDBData->GetSortParam( aSortParam );
- BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab );
+ sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab );
if( nCol < aSortParam.nCol1 )
nCol = aSortParam.nCol1;
@@ -432,17 +432,17 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
nCol = aSortParam.nCol2;
aSortParam.bHasHeader = bHasHeader;
- aSortParam.bByRow = TRUE;
- aSortParam.bCaseSens = FALSE;
- aSortParam.bNaturalSort = FALSE;
- aSortParam.bIncludePattern = TRUE;
- aSortParam.bInplace = TRUE;
- aSortParam.bDoSort[0] = TRUE;
+ aSortParam.bByRow = true;
+ aSortParam.bCaseSens = false;
+ aSortParam.bNaturalSort = false;
+ aSortParam.bIncludePattern = true;
+ aSortParam.bInplace = true;
+ aSortParam.bDoSort[0] = true;
aSortParam.nField[0] = nCol;
aSortParam.bAscending[0] = (nSlotId == SID_SORT_ASCENDING);
- for ( USHORT i=1; i<MAXSORT; i++ )
- aSortParam.bDoSort[i] = FALSE;
+ for ( sal_uInt16 i=1; i<MAXSORT; i++ )
+ aSortParam.bDoSort[i] = false;
aArgSet.Put( ScSortItem( SCITEM_SORTDATA, GetViewData(), &aSortParam ) );
@@ -473,51 +473,51 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScDocument* pDoc = GetViewData()->GetDocument();
pDBData->GetSortParam( aSortParam );
- BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
+ sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
if( bHasHeader )
aSortParam.bHasHeader = bHasHeader;
- aSortParam.bInplace = TRUE; // von Basic immer
+ aSortParam.bInplace = sal_True; // von Basic immer
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( SID_SORT_BYROW, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_BYROW, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bByRow = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_HASHEADER, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_HASHEADER, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bHasHeader = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_CASESENS, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_CASESENS, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bCaseSens = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_NATURALSORT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_NATURALSORT, true, &pItem ) == SFX_ITEM_SET )
aSortParam.bNaturalSort = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_ATTRIBS, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_ATTRIBS, true, &pItem ) == SFX_ITEM_SET )
aSortParam.bIncludePattern = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_USERDEF, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_USERDEF, sal_True, &pItem ) == SFX_ITEM_SET )
{
- USHORT nUserIndex = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nUserIndex = ((const SfxUInt16Item*)pItem)->GetValue();
aSortParam.bUserDef = ( nUserIndex != 0 );
if ( nUserIndex )
aSortParam.nUserIndex = nUserIndex - 1; // Basic: 1-basiert
}
SCCOLROW nField0 = 0;
- if ( pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
nField0 = ((const SfxInt32Item*)pItem)->GetValue();
aSortParam.bDoSort[0] = ( nField0 != 0 );
aSortParam.nField[0] = nField0 > 0 ? (nField0-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bAscending[0] = ((const SfxBoolItem*)pItem)->GetValue();
SCCOLROW nField1 = 0;
- if ( pArgs->GetItemState( FN_PARAM_3, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem ) == SFX_ITEM_SET )
nField1 = ((const SfxInt32Item*)pItem)->GetValue();
aSortParam.bDoSort[1] = ( nField1 != 0 );
aSortParam.nField[1] = nField1 > 0 ? (nField1-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_4, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bAscending[1] = ((const SfxBoolItem*)pItem)->GetValue();
SCCOLROW nField2 = 0;
- if ( pArgs->GetItemState( FN_PARAM_5, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem ) == SFX_ITEM_SET )
nField2 = ((const SfxInt32Item*)pItem)->GetValue();
aSortParam.bDoSort[2] = ( nField2 != 0 );
aSortParam.nField[2] = nField2 > 0 ? (nField2-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_6, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bAscending[2] = ((const SfxBoolItem*)pItem)->GetValue();
// Teilergebnisse bei Bedarf neu
@@ -540,7 +540,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxItemSet aArgSet( GetPool(), SCITEM_SORTDATA, SCITEM_SORTDATA );
pDBData->GetSortParam( aSortParam );
- BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
+ sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
if( bHasHeader )
aSortParam.bHasHeader = bHasHeader;
@@ -574,7 +574,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
rOutParam.bNaturalSort ) );
rReq.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
rOutParam.bIncludePattern ) );
- USHORT nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
+ sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
rReq.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) );
if ( rOutParam.bDoSort[0] )
{
@@ -617,16 +617,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_FILTER with arguments?");
pTabViewShell->Query( ((const ScQueryItem&)
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, TRUE );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, sal_True );
rReq.Done();
}
else
{
- USHORT nId = ScFilterDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScFilterDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
}
break;
@@ -638,16 +638,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_SPECIAL_FILTER with arguments?");
pTabViewShell->Query( ((const ScQueryItem&)
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, TRUE );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, sal_True );
rReq.Done();
}
else
{
- USHORT nId = ScSpecialFilterDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSpecialFilterDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
}
break;
@@ -656,7 +656,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState( SCITEM_QUERYDATA, TRUE, &pItem ) )
+ pReqArgs->GetItemState( SCITEM_QUERYDATA, sal_True, &pItem ) )
{
const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(*pItem);
@@ -674,9 +674,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScRange aAdvSource;
if (rQueryItem.GetAdvancedQuerySource(aAdvSource))
- pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, TRUE );
+ pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, sal_True );
else
- pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, TRUE );
+ pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, sal_True );
rReq.Done( *pReqArgs );
}
}
@@ -690,9 +690,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
pDBData->GetQueryParam( aParam );
SCSIZE nEC = aParam.GetEntryCount();
for (SCSIZE i=0; i<nEC; i++)
- aParam.GetEntry(i).bDoQuery = FALSE;
- aParam.bDuplicate = TRUE;
- pTabViewShell->Query( aParam, NULL, TRUE );
+ aParam.GetEntry(i).bDoQuery = false;
+ aParam.bDuplicate = sal_True;
+ pTabViewShell->Query( aParam, NULL, sal_True );
rReq.Done();
}
break;
@@ -711,7 +711,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState( SCITEM_PIVOTDATA, TRUE, &pItem ) )
+ pReqArgs->GetItemState( SCITEM_PIVOTDATA, sal_True, &pItem ) )
{
SCTAB nCurTab = GetViewData()->GetTabNo();
SCTAB nRefTab = GetViewData()->GetRefTabNo();
@@ -747,11 +747,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_DEFINE_DBNAME:
{
- USHORT nId = ScDbNameDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScDbNameDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -782,11 +782,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const String aStrNoName( ScGlobal::GetRscString(STR_DB_NONAME) );
List aList;
- USHORT nDBCount = pDBCol->GetCount();
+ sal_uInt16 nDBCount = pDBCol->GetCount();
ScDBData* pDbData = NULL;
String* pDBName = NULL;
- for ( USHORT i=0; i < nDBCount; i++ )
+ for ( sal_uInt16 i=0; i < nDBCount; i++ )
{
pDbData = (ScDBData*)(pDBCol->At( i ));
if ( pDbData )
@@ -850,11 +850,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScValidationMode eMode = SC_VALID_ANY;
ScConditionMode eOper = SC_COND_EQUAL;
String aExpr1, aExpr2;
- BOOL bBlank = TRUE;
+ sal_Bool bBlank = sal_True;
sal_Int16 nListType = ValidListType::UNSORTED;
- BOOL bShowHelp = FALSE;
+ sal_Bool bShowHelp = false;
String aHelpTitle, aHelpText;
- BOOL bShowError = FALSE;
+ sal_Bool bShowError = false;
ScValidErrorStyle eErrStyle = SC_VALERR_STOP;
String aErrTitle, aErrText;
@@ -863,7 +863,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SCROW nCurY = GetViewData()->GetCurY();
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aCursorPos( nCurX, nCurY, nTab );
- ULONG nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
+ sal_uLong nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
nCurX, nCurY, nTab, ATTR_VALIDDATA ))->GetValue();
if ( nIndex )
{
@@ -872,7 +872,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
eMode = pOldData->GetDataMode();
eOper = pOldData->GetOperation();
- ULONG nNumFmt = 0;
+ sal_uLong nNumFmt = 0;
if ( eMode == SC_VALID_DATE || eMode == SC_VALID_TIME )
{
short nType = ( eMode == SC_VALID_DATE ) ? NUMBERFORMAT_DATE
@@ -888,8 +888,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
bShowHelp = pOldData->GetInput( aHelpTitle, aHelpText );
bShowError = pOldData->GetErrMsg( aErrTitle, aErrText, eErrStyle );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<USHORT>(eMode) ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<USHORT>(eOper) ) );
+ aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(eMode) ) );
+ aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(eOper) ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE1, aExpr1 ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE2, aExpr2 ) );
aArgSet.Put( SfxBoolItem( FID_VALID_BLANK, bBlank ) );
@@ -898,7 +898,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aHelpTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aHelpText ) );
aArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, bShowError ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<USHORT>(eErrStyle) ) );
+ aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<sal_uInt16>(eErrStyle) ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aErrTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aErrText ) );
}
@@ -915,11 +915,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- if ( pOutSet->GetItemState( FID_VALID_MODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_MODE, sal_True, &pItem ) == SFX_ITEM_SET )
eMode = (ScValidationMode) ((const SfxAllEnumItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_CONDMODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_CONDMODE, sal_True, &pItem ) == SFX_ITEM_SET )
eOper = (ScConditionMode) ((const SfxAllEnumItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_VALUE1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET )
{
String aTemp1 = ((const SfxStringItem*)pItem)->GetValue();
if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME)
@@ -929,14 +929,14 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if (pDoc->GetFormatTable()->IsNumberFormat(aTemp1, nNumIndex, nVal))
aExpr1 =String( ::rtl::math::doubleToUString( nVal,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
- ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE));
+ ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True));
else
aExpr1 = aTemp1;
}
else
aExpr1 = aTemp1;
}
- if ( pOutSet->GetItemState( FID_VALID_VALUE2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET )
{
String aTemp2 = ((const SfxStringItem*)pItem)->GetValue();
if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME)
@@ -946,7 +946,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if (pDoc->GetFormatTable()->IsNumberFormat(aTemp2, nNumIndex, nVal))
aExpr2 =String( ::rtl::math::doubleToUString( nVal,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
- ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE));
+ ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True));
else
aExpr2 = aTemp2;
}
@@ -954,25 +954,25 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aExpr2 = aTemp2;
}
- if ( pOutSet->GetItemState( FID_VALID_BLANK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_BLANK, sal_True, &pItem ) == SFX_ITEM_SET )
bBlank = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, sal_True, &pItem ) == SFX_ITEM_SET )
nListType = ((const SfxInt16Item*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, sal_True, &pItem ) == SFX_ITEM_SET )
bShowHelp = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aHelpTitle = ((const SfxStringItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aHelpText = ((const SfxStringItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_SHOWERR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET )
bShowError = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET )
eErrStyle = (ScValidErrorStyle) ((const SfxAllEnumItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aErrTitle = ((const SfxStringItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aErrText = ((const SfxStringItem*)pItem)->GetValue();
ScValidationData aData( eMode, eOper, aExpr1, aExpr2, pDoc, aCursorPos );
@@ -1061,11 +1061,11 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
SCROW nPosY = pData->GetCurY();
SCTAB nTab = pData->GetTabNo();
- BOOL bAutoFilter = FALSE;
- BOOL bAutoFilterTested = FALSE;
+ sal_Bool bAutoFilter = false;
+ sal_Bool bAutoFilterTested = false;
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -1074,8 +1074,8 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
{
// importierte Daten ohne Selektion
// oder Filter,Sortierung,Teilergebis (auch ohne Import)
- BOOL bOk = FALSE;
- ScDBData* pDBData = pTabViewShell->GetDBData(FALSE,SC_DB_OLD);
+ sal_Bool bOk = false;
+ ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
if (pDBData && pDoc->GetChangeTrack() == NULL)
{
if ( pDBData->HasImportParam() )
@@ -1125,7 +1125,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
case SID_REIMPORT_DATA:
{
// nur importierte Daten ohne Selektion
- ScDBData* pDBData = pTabViewShell->GetDBData(FALSE,SC_DB_OLD);
+ ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
if (!pDBData || !pDBData->HasImportParam() || pDBData->HasImportSelection() ||
pDoc->GetChangeTrack()!=NULL)
{
@@ -1137,7 +1137,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
case SID_VIEW_DATA_SOURCE_BROWSER:
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE))
- rSet.Put(SfxVisibilityItem(nWhich, sal_False));
+ rSet.Put(SfxVisibilityItem(nWhich, false));
else
// get state (BoolItem) from SfxViewFrame
pTabViewShell->GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
@@ -1145,9 +1145,9 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
break;
case SID_SBA_BRW_INSERT:
{
- // SBA will ein BOOL-Item, damit ueberhaupt enabled
+ // SBA will ein sal_Bool-Item, damit ueberhaupt enabled
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
rSet.Put(SfxBoolItem(nWhich, bEnable));
}
break;
@@ -1158,7 +1158,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
if (!bAutoFilterTested)
{
bAutoFilter = pDoc->HasAutoFilter( nPosX, nPosY, nTab );
- bAutoFilterTested = TRUE;
+ bAutoFilterTested = sal_True;
}
if ( nWhich == SID_AUTO_FILTER )
{
@@ -1186,16 +1186,16 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
SCTAB nStartTab, nEndTab;
- BOOL bAnyQuery = FALSE;
+ sal_Bool bAnyQuery = false;
- BOOL bSelected = (GetViewData()->GetSimpleArea(
+ sal_Bool bSelected = (GetViewData()->GetSimpleArea(
nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab )
== SC_MARK_SIMPLE);
if ( bSelected )
{
if (nStartCol==nEndCol && nStartRow==nEndRow)
- bSelected = FALSE;
+ bSelected = false;
}
else
{
@@ -1213,7 +1213,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
ScQueryParam aParam;
pDBData->GetQueryParam( aParam );
if ( aParam.GetEntry(0).bDoQuery )
- bAnyQuery = TRUE;
+ bAnyQuery = sal_True;
}
if ( !bAnyQuery )
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index ee5285e8ffea..06c960a8ac0a 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -73,7 +73,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
ScModule* pScMod = SC_MOD();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -88,7 +88,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
// inplace macht die EditShell Aerger...
//! kann nicht immer umgeschaltet werden ????
if (!pTabViewShell->GetViewFrame()->GetFrame().IsInPlace())
- pTabViewShell->SetDontSwitch(TRUE); // EditShell nicht abschalten
+ pTabViewShell->SetDontSwitch(sal_True); // EditShell nicht abschalten
// kein break
case FID_CELL_FORMAT:
@@ -101,7 +101,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pScMod->InputEnterHandler();
pTabViewShell->UpdateInputHandler();
- pTabViewShell->SetDontSwitch(FALSE);
+ pTabViewShell->SetDontSwitch(false);
break;
@@ -125,7 +125,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
* 1: ER Click erweitert Selektion
* 2: ERG Click definiert weitere Selektion
*/
- UINT16 nMode = ((const SfxUInt16Item&)pReqArgs->Get( nSlot )).GetValue();
+ sal_uInt16 nMode = ((const SfxUInt16Item&)pReqArgs->Get( nSlot )).GetValue();
switch ( nMode )
{
@@ -143,7 +143,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
// no arguments (also executed by double click on the status bar controller):
// advance to next selection mode
- USHORT nModifiers = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nModifiers = pTabViewShell->GetLockedModifiers();
switch ( nModifiers )
{
case KEY_SHIFT: nModifiers = KEY_MOD1; break; // EXT -> ADD
@@ -247,7 +247,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else if ( aString.Len() > 0 && ( aString.GetChar(0) == '=' || aString.GetChar(0) == '+' || aString.GetChar(0) == '-' ) )
{
- pTabViewShell->EnterData( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aString, TRUE, pData );
+ pTabViewShell->EnterData( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aString, sal_True, pData );
}
else
{
@@ -302,22 +302,22 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_FUNCTION:
{
- USHORT nId = SID_OPENDLG_FUNCTION;
+ sal_uInt16 nId = SID_OPENDLG_FUNCTION;
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
rReq.Ignore();
}
break;
case SID_OPENDLG_CONSOLIDATE:
{
- USHORT nId = ScConsolidateDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScConsolidateDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -339,10 +339,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
ATTR_PATTERN_END );
const SfxPoolItem* pAttr = NULL;
- USHORT nWhich = 0;
+ sal_uInt16 nWhich = 0;
for ( nWhich=ATTR_PATTERN_START; nWhich<=ATTR_PATTERN_END; nWhich++ )
- if ( pReqArgs->GetItemState( nWhich, TRUE, &pAttr ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nWhich, sal_True, &pAttr ) == SFX_ITEM_SET )
pNewSet->Put( *pAttr );
pTabViewShell->ApplyAttributes( pNewSet, pEmptySet );
@@ -365,31 +365,31 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_SOLVE:
{
- USHORT nId = ScSolverDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSolverDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_OPENDLG_OPTSOLVER:
{
- USHORT nId = ScOptSolverDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScOptSolverDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_OPENDLG_TABOP:
{
- USHORT nId = ScTabOpDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScTabOpDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -431,7 +431,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aBaseName );
aBaseName += '_';
@@ -440,13 +440,13 @@ void ScCellShell::Execute( SfxRequest& rReq )
// vorneweg testen, ob der Prefix als gueltig erkannt wird
// wenn nicht, nur doppelte vermeiden
- BOOL bPrefix = pDoc->ValidTabName( aBaseName );
+ sal_Bool bPrefix = pDoc->ValidTabName( aBaseName );
DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
while ( pDoc->IsScenario(nTab+i) )
i++;
- BOOL bValid;
+ sal_Bool bValid;
SCTAB nDummy;
do
{
@@ -465,9 +465,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
String aArgName;
String aArgComment;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_SCENARIOS, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_SCENARIOS, sal_True, &pItem ) == SFX_ITEM_SET )
aArgName = ((const SfxStringItem*)pItem)->GetValue();
- if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, sal_True, &pItem ) == SFX_ITEM_SET )
aArgComment = ((const SfxStringItem*)pItem)->GetValue();
aColor = Color( COL_LIGHTGRAY ); // Default
@@ -479,11 +479,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else
{
- BOOL bSheetProtected = pDoc->IsTabProtected(nTab);
+ sal_Bool bSheetProtected = pDoc->IsTabProtected(nTab);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, RID_SCDLG_NEWSCENARIO, FALSE,bSheetProtected);
+ AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, RID_SCDLG_NEWSCENARIO, false,bSheetProtected);
DBG_ASSERT(pNewDlg, "Dialog create fail!");
if ( pNewDlg->Execute() == RET_OK )
{
@@ -522,8 +522,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_ROW_HEIGHT );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
if( ! rReq.IsAPI() )
rReq.Done();
}
@@ -531,7 +531,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
ScViewData* pData = GetViewData();
FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
- USHORT nCurHeight = pData->GetDocument()->
+ sal_uInt16 nCurHeight = pData->GetDocument()->
GetRowHeight( pData->GetCurY(),
pData->GetTabNo() );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -549,10 +549,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT, (sal_uInt16)nVal );
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_ROW_HEIGHT, (USHORT)TwipsToEvenHMM(nVal) ) );
+ rReq.AppendItem( SfxUInt16Item( FID_ROW_HEIGHT, (sal_uInt16)TwipsToEvenHMM(nVal) ) );
rReq.Done();
}
@@ -568,8 +568,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_ROW_OPT_HEIGHT );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_OPTIMAL,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_OPTIMAL,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
ScGlobal::nLastRowHeightExtra = rUInt16Item.GetValue();
if( ! rReq.IsAPI() )
@@ -594,11 +594,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_OPTIMAL, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_OPTIMAL, (sal_uInt16)nVal );
ScGlobal::nLastRowHeightExtra = nVal;
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_ROW_OPT_HEIGHT, (USHORT)TwipsToEvenHMM(nVal) ) );
+ rReq.AppendItem( SfxUInt16Item( FID_ROW_OPT_HEIGHT, (sal_uInt16)TwipsToEvenHMM(nVal) ) );
rReq.Done();
}
@@ -614,8 +614,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_COL_WIDTH );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
if( ! rReq.IsAPI() )
rReq.Done();
}
@@ -623,7 +623,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
ScViewData* pData = GetViewData();
- USHORT nCurHeight = pData->GetDocument()->
+ sal_uInt16 nCurHeight = pData->GetDocument()->
GetColWidth( pData->GetCurX(),
pData->GetTabNo() );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -641,10 +641,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT, (sal_uInt16)nVal );
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_COL_WIDTH, (USHORT)TwipsToEvenHMM(nVal)) );
+ rReq.AppendItem( SfxUInt16Item( FID_COL_WIDTH, (sal_uInt16)TwipsToEvenHMM(nVal)) );
rReq.Done();
}
@@ -660,8 +660,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_COL_OPT_WIDTH );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
ScGlobal::nLastColWidthExtra = rUInt16Item.GetValue();
if( ! rReq.IsAPI() )
@@ -685,11 +685,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL, (sal_uInt16)nVal );
ScGlobal::nLastColWidthExtra = nVal;
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_COL_OPT_WIDTH, (USHORT)TwipsToEvenHMM(nVal) ) );
+ rReq.AppendItem( SfxUInt16Item( FID_COL_OPT_WIDTH, (sal_uInt16)TwipsToEvenHMM(nVal) ) );
rReq.Done();
}
delete pDlg;
@@ -698,24 +698,24 @@ void ScCellShell::Execute( SfxRequest& rReq )
break;
case FID_COL_OPT_DIRECT:
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH );
rReq.Done();
break;
case FID_ROW_HIDE:
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT, 0 );
rReq.Done();
break;
case FID_ROW_SHOW:
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_SHOW, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_SHOW, 0 );
rReq.Done();
break;
case FID_COL_HIDE:
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT, 0 );
rReq.Done();
break;
case FID_COL_SHOW:
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_SHOW, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_SHOW, 0 );
rReq.Done();
break;
@@ -737,7 +737,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
// test whether to merge or to split
bool bMerge = false;
- BOOL bCenter = FALSE;
+ sal_Bool bCenter = false;
switch( nSlot )
{
case FID_MERGE_ON:
@@ -748,7 +748,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
break;
case FID_MERGE_TOGGLE:
{
- bCenter = TRUE;
+ bCenter = true;
SfxPoolItem* pItem = 0;
if( rBindings.QueryState( nSlot, pItem ) >= SFX_ITEM_DEFAULT )
bMerge = !static_cast< SfxBoolItem* >( pItem )->GetValue();
@@ -759,17 +759,17 @@ void ScCellShell::Execute( SfxRequest& rReq )
if( bMerge )
{
// merge - check if to move contents of covered cells
- BOOL bMoveContents = FALSE;
- BOOL bApi = rReq.IsAPI();
+ sal_Bool bMoveContents = false;
+ sal_Bool bApi = rReq.IsAPI();
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
{
DBG_ASSERT(pItem && pItem->ISA(SfxBoolItem), "falsches Item");
bMoveContents = ((const SfxBoolItem*)pItem)->GetValue();
}
- if (pTabViewShell->MergeCells( bApi, bMoveContents, TRUE, bCenter ))
+ if (pTabViewShell->MergeCells( bApi, bMoveContents, true, bCenter ))
{
if (!bApi && bMoveContents) // "ja" im Dialog geklickt
rReq.AppendItem( SfxBoolItem( nSlot, bMoveContents ) );
@@ -803,7 +803,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
- pTabViewShell->MarkDataArea( TRUE );
+ pTabViewShell->MarkDataArea( sal_True );
GetViewData()->GetSimpleArea( nStartCol,nStartRow,nStartTab,
nEndCol,nEndRow,nEndTab );
@@ -815,7 +815,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
const SfxStringItem& rNameItem = (const SfxStringItem&)pReqArgs->Get( SID_AUTOFORMAT );
ScAutoFormat* pFormat = ScGlobal::GetAutoFormat();
- USHORT nIndex = pFormat->FindIndexPerName( rNameItem.GetValue() );
+ sal_uInt16 nIndex = pFormat->FindIndexPerName( rNameItem.GetValue() );
pTabViewShell->AutoFormat( nIndex );
@@ -881,7 +881,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_DETECTIVE_FILLMODE:
{
- BOOL bOldMode = pTabViewShell->IsAuditShell();
+ sal_Bool bOldMode = pTabViewShell->IsAuditShell();
pTabViewShell->SetAuditShell( !bOldMode );
pTabViewShell->Invalidate( nSlot );
}
@@ -889,11 +889,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_CONDFRMT:
{
- USHORT nId = ScCondFormatDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScCondFormatDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index cf8a0fcb330d..d5062793940d 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -55,7 +55,7 @@
//------------------------------------------------------------------
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
void ScCellShell::ExecuteCursor( SfxRequest& rReq )
@@ -63,10 +63,10 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
ScViewData* pData = GetViewData();
ScTabViewShell* pTabViewShell = pData->GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
SCsCOLROW nRepeat = 1;
- BOOL bSel = FALSE;
- BOOL bKeep = FALSE;
+ sal_Bool bSel = false;
+ sal_Bool bKeep = false;
if ( pReqArgs != NULL )
{
@@ -80,13 +80,13 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
{
// evaluate locked selection mode
- USHORT nLocked = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers();
if ( nLocked & KEY_SHIFT )
- bSel = TRUE; // EXT
+ bSel = sal_True; // EXT
else if ( nLocked & KEY_MOD1 )
{
// ADD mode: keep the selection, start a new block when marking with shift again
- bKeep = TRUE;
+ bKeep = true;
}
}
@@ -280,7 +280,7 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )
void ScCellShell::ExecuteMove( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
if(nSlotId != SID_CURSORTOPOFSCREEN && nSlotId != SID_CURSORENDOFSCREEN)
pTabViewShell->ExecuteInputDirect();
@@ -300,25 +300,25 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
// weil das ScSbxRange-Objekt bei Eingaben die Markierung veraendert
case SID_NEXT_UNPROTECT:
- pTabViewShell->FindNextUnprot( FALSE, !rReq.IsAPI() );
+ pTabViewShell->FindNextUnprot( false, !rReq.IsAPI() );
break;
case SID_PREV_UNPROTECT:
- pTabViewShell->FindNextUnprot( TRUE, !rReq.IsAPI() );
+ pTabViewShell->FindNextUnprot( sal_True, !rReq.IsAPI() );
break;
case SID_CURSORENTERUP:
if (rReq.IsAPI())
- pTabViewShell->MoveCursorRel( 0, -1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorRel( 0, -1, SC_FOLLOW_LINE, false );
else
- pTabViewShell->MoveCursorEnter( TRUE );
+ pTabViewShell->MoveCursorEnter( sal_True );
break;
case SID_CURSORENTERDOWN:
if (rReq.IsAPI())
- pTabViewShell->MoveCursorRel( 0, 1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorRel( 0, 1, SC_FOLLOW_LINE, false );
else
- pTabViewShell->MoveCursorEnter( FALSE );
+ pTabViewShell->MoveCursorEnter( false );
break;
case SID_SELECT_COL:
@@ -362,11 +362,11 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
break;
case SID_CURSORTOPOFSCREEN:
- pTabViewShell->MoveCursorScreen( 0, -1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorScreen( 0, -1, SC_FOLLOW_LINE, false );
break;
case SID_CURSORENDOFSCREEN:
- pTabViewShell->MoveCursorScreen( 0, 1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorScreen( 0, 1, SC_FOLLOW_LINE, false );
break;
default:
@@ -379,7 +379,7 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
void ScCellShell::ExecutePageSel( SfxRequest& rReq )
{
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
switch ( nSlotId )
{
case SID_CURSORHOME_SEL: rReq.SetSlot( SID_CURSORHOME ); break;
@@ -390,7 +390,7 @@ void ScCellShell::ExecutePageSel( SfxRequest& rReq )
OSL_FAIL("Unbekannte Message bei ViewShell (ExecutePageSel)");
return;
}
- rReq.AppendItem( SfxBoolItem(FN_PARAM_2, TRUE) );
+ rReq.AppendItem( SfxBoolItem(FN_PARAM_2, sal_True) );
ExecuteSlot( rReq, GetInterface() );
}
@@ -398,9 +398,9 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bSel = FALSE;
- BOOL bKeep = FALSE;
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bSel = false;
+ sal_Bool bKeep = false;
if ( pReqArgs != NULL )
{
@@ -412,13 +412,13 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
{
// evaluate locked selection mode
- USHORT nLocked = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers();
if ( nLocked & KEY_SHIFT )
- bSel = TRUE; // EXT
+ bSel = sal_True; // EXT
else if ( nLocked & KEY_MOD1 )
{
// ADD mode: keep the selection, start a new block when marking with shift again
- bKeep = TRUE;
+ bKeep = true;
}
}
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index 79ea4b61b2ef..0f24a98e2bf4 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -85,7 +85,7 @@ ScColBar::~ScColBar()
{
}
-inline BOOL ScColBar::UseNumericHeader() const
+inline sal_Bool ScColBar::UseNumericHeader() const
{
return pViewData->GetDocument()->GetAddressConvention() == formula::FormulaGrammar::CONV_XL_R1C1;
}
@@ -95,14 +95,14 @@ SCCOLROW ScColBar::GetPos()
return pViewData->GetPosX(eWhich);
}
-USHORT ScColBar::GetEntrySize( SCCOLROW nEntryNo )
+sal_uInt16 ScColBar::GetEntrySize( SCCOLROW nEntryNo )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
if (pDoc->ColHidden(static_cast<SCCOL>(nEntryNo), nTab))
return 0;
else
- return (USHORT) ScViewData::ToPixel( pDoc->GetColWidth( static_cast<SCCOL>(nEntryNo), nTab ), pViewData->GetPPTX() );
+ return (sal_uInt16) ScViewData::ToPixel( pDoc->GetColWidth( static_cast<SCCOL>(nEntryNo), nTab ), pViewData->GetPPTX() );
}
String ScColBar::GetEntryText( SCCOLROW nEntryNo )
@@ -112,9 +112,9 @@ String ScColBar::GetEntryText( SCCOLROW nEntryNo )
: ScColToAlpha( static_cast<SCCOL>(nEntryNo) );
}
-void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
+void ScColBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize )
{
- USHORT nSizeTwips;
+ sal_uInt16 nSizeTwips;
ScSizeMode eMode = SC_SIZE_DIRECT;
if (nNewSize>0 && nNewSize<10) nNewSize=10; // (Pixel)
@@ -124,7 +124,7 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
eMode = SC_SIZE_OPTIMAL;
}
else
- nSizeTwips = (USHORT) ( nNewSize / pViewData->GetPPTX() );
+ nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTX() );
ScMarkData& rMark = pViewData->GetMarkData();
@@ -160,7 +160,7 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
nRangeCnt = 1;
}
- pViewData->GetView()->SetWidthOrHeight( TRUE, nRangeCnt, pRanges, eMode, nSizeTwips );
+ pViewData->GetView()->SetWidthOrHeight( sal_True, nRangeCnt, pRanges, eMode, nSizeTwips );
delete[] pRanges;
}
@@ -169,10 +169,10 @@ void ScColBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd )
SCCOLROW nRange[2];
nRange[0] = nStart;
nRange[1] = nEnd;
- pViewData->GetView()->SetWidthOrHeight( TRUE, 1, nRange, SC_SIZE_DIRECT, 0 );
+ pViewData->GetView()->SetWidthOrHeight( sal_True, 1, nRange, SC_SIZE_DIRECT, 0 );
}
-void ScColBar::SetMarking( BOOL bSet )
+void ScColBar::SetMarking( sal_Bool bSet )
{
pViewData->GetMarkData().SetMarking( bSet );
if (!bSet)
@@ -201,19 +201,19 @@ void ScColBar::SelectWindow()
}
pViewSh->ActivatePart( eActive );
- pFuncSet->SetColumn( TRUE );
+ pFuncSet->SetColumn( sal_True );
pFuncSet->SetWhich( eActive );
pViewSh->ActiveGrabFocus();
}
-BOOL ScColBar::IsDisabled()
+sal_Bool ScColBar::IsDisabled()
{
ScModule* pScMod = SC_MOD();
return pScMod->IsFormulaMode() || pScMod->IsModalMode();
}
-BOOL ScColBar::ResizeAllowed()
+sal_Bool ScColBar::ResizeAllowed()
{
return !pViewData->HasEditView( pViewData->GetActivePart() );
}
@@ -233,7 +233,7 @@ String ScColBar::GetDragHelp( long nVal )
return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_WIDTH) );
}
-BOOL ScColBar::IsLayoutRTL() // overloaded only for columns
+sal_Bool ScColBar::IsLayoutRTL() // overloaded only for columns
{
return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
}
@@ -260,7 +260,7 @@ SCCOLROW ScRowBar::GetPos()
return pViewData->GetPosY(eWhich);
}
-USHORT ScRowBar::GetEntrySize( SCCOLROW nEntryNo )
+sal_uInt16 ScRowBar::GetEntrySize( SCCOLROW nEntryNo )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
@@ -268,7 +268,7 @@ USHORT ScRowBar::GetEntrySize( SCCOLROW nEntryNo )
if (pDoc->RowHidden(nEntryNo, nTab, NULL, &nLastRow))
return 0;
else
- return (USHORT) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo,
+ return (sal_uInt16) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo,
nTab ), pViewData->GetPPTY() );
}
@@ -277,9 +277,9 @@ String ScRowBar::GetEntryText( SCCOLROW nEntryNo )
return String::CreateFromInt32( nEntryNo + 1 );
}
-void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
+void ScRowBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize )
{
- USHORT nSizeTwips;
+ sal_uInt16 nSizeTwips;
ScSizeMode eMode = SC_SIZE_DIRECT;
if (nNewSize>0 && nNewSize<10) nNewSize=10; // (Pixel)
@@ -289,7 +289,7 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
eMode = SC_SIZE_OPTIMAL;
}
else
- nSizeTwips = (USHORT) ( nNewSize / pViewData->GetPPTY() );
+ nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTY() );
ScMarkData& rMark = pViewData->GetMarkData();
@@ -325,7 +325,7 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
nRangeCnt = 1;
}
- pViewData->GetView()->SetWidthOrHeight( FALSE, nRangeCnt, pRanges, eMode, nSizeTwips );
+ pViewData->GetView()->SetWidthOrHeight( false, nRangeCnt, pRanges, eMode, nSizeTwips );
delete[] pRanges;
}
@@ -334,10 +334,10 @@ void ScRowBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd )
SCCOLROW nRange[2];
nRange[0] = nStart;
nRange[1] = nEnd;
- pViewData->GetView()->SetWidthOrHeight( FALSE, 1, nRange, SC_SIZE_DIRECT, 0 );
+ pViewData->GetView()->SetWidthOrHeight( false, 1, nRange, SC_SIZE_DIRECT, 0 );
}
-void ScRowBar::SetMarking( BOOL bSet )
+void ScRowBar::SetMarking( sal_Bool bSet )
{
pViewData->GetMarkData().SetMarking( bSet );
if (!bSet)
@@ -366,19 +366,19 @@ void ScRowBar::SelectWindow()
}
pViewSh->ActivatePart( eActive );
- pFuncSet->SetColumn( FALSE );
+ pFuncSet->SetColumn( false );
pFuncSet->SetWhich( eActive );
pViewSh->ActiveGrabFocus();
}
-BOOL ScRowBar::IsDisabled()
+sal_Bool ScRowBar::IsDisabled()
{
ScModule* pScMod = SC_MOD();
return pScMod->IsFormulaMode() || pScMod->IsModalMode();
}
-BOOL ScRowBar::ResizeAllowed()
+sal_Bool ScRowBar::ResizeAllowed()
{
return !pViewData->HasEditView( pViewData->GetActivePart() );
}
@@ -407,7 +407,7 @@ SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo )
return pDoc->GetHiddenRowCount( nEntryNo, nTab );
}
-BOOL ScRowBar::IsMirrored() // overloaded only for rows
+sal_Bool ScRowBar::IsMirrored() // overloaded only for rows
{
return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
}
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 98b81701b805..3607a8dc7a2a 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -71,7 +71,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName )
ScDocument* pDoc = GetViewData()->GetDocument();
ScDBCollection* pDBCol = pDoc->GetDBCollection();
- USHORT nFoundAt = 0;
+ sal_uInt16 nFoundAt = 0;
if ( pDBCol->SearchName( rDBName, nFoundAt ) )
{
ScDBData* pData = (*pDBCol)[nFoundAt];
@@ -89,7 +89,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName )
SetTabNo( nTab );
MoveCursorAbs( nStartCol, nStartRow, ScFollowMode( SC_FOLLOW_JUMP ),
- FALSE, FALSE ); // bShift,bControl
+ false, false ); // bShift,bControl
DoneBlockMode();
InitBlockMode( nStartCol, nStartRow, nTab );
MarkCursor( nEndCol, nEndRow, nTab );
@@ -100,7 +100,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName )
// aktuellen Datenbereich fuer Sortieren / Filtern suchen
-ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool /*bShrinkToData*/, bool bExpandRows )
+ScDBData* ScDBFunc::GetDBData( sal_Bool bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool /*bShrinkToData*/, bool bExpandRows )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDBData* pData = NULL;
@@ -191,7 +191,7 @@ ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection e
{
ScRange aFound;
pData->GetArea(aFound, bExpandRows);
- MarkRange( aFound, FALSE );
+ MarkRange( aFound, false );
}
return pData;
}
@@ -207,7 +207,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List&
ScDBCollection* pOldColl = pDoc->GetDBCollection();
ScDBCollection* pUndoColl = NULL;
ScDBCollection* pRedoColl = NULL;
- const BOOL bRecord (pDoc->IsUndoEnabled());
+ const sal_Bool bRecord (pDoc->IsUndoEnabled());
long nDelCount = rDelAreaList.Count();
for (long nDelPos=0; nDelPos<nDelCount; nDelPos++)
@@ -231,9 +231,9 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List&
// neue Targets am SBA anmelden nicht mehr noetig
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
pDoc->SetDBCollection( new ScDBCollection( rNewColl ) );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pOldColl = NULL;
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID );
aModificator.SetDocumentModified();
@@ -253,7 +253,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List&
// Sortieren
-void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord )
+void ScDBFunc::UISort( const ScSortParam& rSortParam, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -280,12 +280,12 @@ void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord )
}
}
-void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::Sort( const ScSortParam& rSortParam, sal_Bool bRecord, sal_Bool bPaint )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
ScDBDocFunc aDBDocFunc( *pDocSh );
- BOOL bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, FALSE );
+ sal_Bool bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, false );
if ( bSuccess && !rSortParam.bInplace )
{
// Ziel markieren
@@ -299,23 +299,23 @@ void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint )
// Filtern
-void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, BOOL bRecord )
+void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
ScDBDocFunc aDBDocFunc( *pDocSh );
- BOOL bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, FALSE );
+ sal_Bool bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, false );
if (bSuccess)
{
- BOOL bCopy = !rQueryParam.bInplace;
+ sal_Bool bCopy = !rQueryParam.bInplace;
if (bCopy)
{
// Zielbereich markieren (DB-Bereich wurde ggf. angelegt)
ScDocument* pDoc = pDocSh->GetDocument();
ScDBData* pDestData = pDoc->GetDBAtCursor(
rQueryParam.nDestCol, rQueryParam.nDestRow,
- rQueryParam.nDestTab, TRUE );
+ rQueryParam.nDestTab, sal_True );
if (pDestData)
{
ScRange aDestRange;
@@ -345,17 +345,17 @@ void ScDBFunc::ToggleAutoFilter()
ScDocument* pDoc = GetViewData()->GetDocument();
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, SC_DBSEL_ROW_DOWN, false, true);
- pDBData->SetByRow( TRUE ); //! Undo, vorher abfragen ??
+ pDBData->SetByRow( sal_True ); //! Undo, vorher abfragen ??
pDBData->GetQueryParam( aParam );
SCCOL nCol;
SCROW nRow = aParam.nRow1;
SCTAB nTab = GetViewData()->GetTabNo();
- INT16 nFlag;
- BOOL bHasAuto = TRUE;
- BOOL bHeader = pDBData->HasHeader();
- BOOL bPaint = FALSE;
+ sal_Int16 nFlag;
+ sal_Bool bHasAuto = sal_True;
+ sal_Bool bHeader = pDBData->HasHeader();
+ sal_Bool bPaint = false;
//! stattdessen aus DB-Bereich abfragen?
@@ -365,7 +365,7 @@ void ScDBFunc::ToggleAutoFilter()
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue();
if ( (nFlag & SC_MF_AUTO) == 0 )
- bHasAuto = FALSE;
+ bHasAuto = false;
}
if (bHasAuto) // aufheben
@@ -387,21 +387,21 @@ void ScDBFunc::ToggleAutoFilter()
ScRange aRange;
pDBData->GetArea( aRange );
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) );
+ new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), false ) );
- pDBData->SetAutoFilter(FALSE);
+ pDBData->SetAutoFilter(false);
// Filter aufheben (incl. Paint / Undo)
SCSIZE nEC = aParam.GetEntryCount();
for (SCSIZE i=0; i<nEC; i++)
- aParam.GetEntry(i).bDoQuery = FALSE;
- aParam.bDuplicate = TRUE;
- Query( aParam, NULL, TRUE );
+ aParam.GetEntry(i).bDoQuery = false;
+ aParam.bDuplicate = sal_True;
+ Query( aParam, NULL, sal_True );
pDocSh->GetUndoManager()->LeaveListAction();
- bPaint = TRUE;
+ bPaint = sal_True;
}
else // Filterknoepfe einblenden
{
@@ -416,17 +416,17 @@ void ScDBFunc::ToggleAutoFilter()
ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // Koepfe aus erster Zeile?
).Execute() == RET_YES )
{
- pDBData->SetHeader( TRUE ); //! Undo ??
- bHeader = TRUE;
+ pDBData->SetHeader( sal_True ); //! Undo ??
+ bHeader = sal_True;
}
}
ScRange aRange;
pDBData->GetArea( aRange );
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), TRUE ) );
+ new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), sal_True ) );
- pDBData->SetAutoFilter(TRUE);
+ pDBData->SetAutoFilter(sal_True);
for (nCol=aParam.nCol1; nCol<=aParam.nCol2; nCol++)
{
@@ -436,7 +436,7 @@ void ScDBFunc::ToggleAutoFilter()
}
pDocSh->PostPaint( aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab,
PAINT_GRID );
- bPaint = TRUE;
+ bPaint = sal_True;
}
else
{
@@ -466,7 +466,7 @@ void ScDBFunc::HideAutoFilter()
ScDocument* pDoc = pDocSh->GetDocument();
ScQueryParam aParam;
- ScDBData* pDBData = GetDBData( FALSE );
+ ScDBData* pDBData = GetDBData( false );
SCTAB nTab;
SCCOL nCol1, nCol2;
@@ -475,7 +475,7 @@ void ScDBFunc::HideAutoFilter()
for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++)
{
- INT16 nFlag = ((ScMergeFlagAttr*) pDoc->
+ sal_Int16 nFlag = ((ScMergeFlagAttr*) pDoc->
GetAttr( nCol, nRow1, nTab, ATTR_MERGE_FLAG ))->GetValue();
pDoc->ApplyAttr( nCol, nRow1, nTab, ScMergeFlagAttr( nFlag & ~SC_MF_AUTO ) );
}
@@ -483,9 +483,9 @@ void ScDBFunc::HideAutoFilter()
ScRange aRange;
pDBData->GetArea( aRange );
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) );
+ new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), false ) );
- pDBData->SetAutoFilter(FALSE);
+ pDBData->SetAutoFilter(false);
pDocSh->PostPaint( nCol1,nRow1,nTab, nCol2,nRow1,nTab, PAINT_GRID );
aModificator.SetDocumentModified();
@@ -497,7 +497,7 @@ void ScDBFunc::HideAutoFilter()
// Re-Import
-BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord )
+sal_Bool ScDBFunc::ImportData( const ScImportParam& rParam, sal_Bool bRecord )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScEditableTester aTester( pDoc, GetViewData()->GetTabNo(), rParam.nCol1,rParam.nRow1,
@@ -505,7 +505,7 @@ BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord )
if ( !aTester.IsEditable() )
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScDBDocFunc aDBDocFunc( *GetViewData()->GetDocShell() );
diff --git a/sc/source/ui/view/dbfunc2.cxx b/sc/source/ui/view/dbfunc2.cxx
index f789daea996d..5753eb1367c2 100644
--- a/sc/source/ui/view/dbfunc2.cxx
+++ b/sc/source/ui/view/dbfunc2.cxx
@@ -54,9 +54,9 @@
class ScDrawLayer;
class ScChartCollection;
-void ScDBFunc::UpdateCharts( BOOL bAllCharts )
+void ScDBFunc::UpdateCharts( sal_Bool bAllCharts )
{
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
ScViewData* pViewData = GetViewData();
ScDocument* pDoc = pViewData->GetDocument();
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index cc4efa6f416b..8e64cc7f7f86 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -111,14 +111,14 @@ using ::std::vector;
// Outline-Gruppierung erzeugen
-void ScDBFunc::MakeOutline( BOOL bColumns, BOOL bRecord )
+void ScDBFunc::MakeOutline( sal_Bool bColumns, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.MakeOutline( aRange, bColumns, bRecord, FALSE );
+ aFunc.MakeOutline( aRange, bColumns, bRecord, false );
}
else
ErrorMessage(STR_NOMULTISELECT);
@@ -126,14 +126,14 @@ void ScDBFunc::MakeOutline( BOOL bColumns, BOOL bRecord )
// Outline-Gruppierung loeschen
-void ScDBFunc::RemoveOutline( BOOL bColumns, BOOL bRecord )
+void ScDBFunc::RemoveOutline( sal_Bool bColumns, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.RemoveOutline( aRange, bColumns, bRecord, FALSE );
+ aFunc.RemoveOutline( aRange, bColumns, bRecord, false );
}
else
ErrorMessage(STR_NOMULTISELECT);
@@ -141,10 +141,10 @@ void ScDBFunc::RemoveOutline( BOOL bColumns, BOOL bRecord )
// Menue-Status: Outlines loeschen
-void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
+void ScDBFunc::TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow )
{
- BOOL bColFound = FALSE;
- BOOL bRowFound = FALSE;
+ sal_Bool bColFound = false;
+ sal_Bool bRowFound = false;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
@@ -160,8 +160,8 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
ScOutlineEntry* pEntry;
SCCOLROW nStart;
SCCOLROW nEnd;
- BOOL bColMarked = ( nStartRow == 0 && nEndRow == MAXROW );
- BOOL bRowMarked = ( nStartCol == 0 && nEndCol == MAXCOL );
+ sal_Bool bColMarked = ( nStartRow == 0 && nEndRow == MAXROW );
+ sal_Bool bRowMarked = ( nStartCol == 0 && nEndCol == MAXCOL );
// Spalten
@@ -174,7 +174,7 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
if ( nStartCol<=static_cast<SCCOL>(nEnd) && nEndCol>=static_cast<SCCOL>(nStart) )
- bColFound = TRUE;
+ bColFound = sal_True;
}
}
@@ -189,7 +189,7 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
if ( nStartRow<=nEnd && nEndRow>=nStart )
- bRowFound = TRUE;
+ bRowFound = sal_True;
}
}
}
@@ -199,14 +199,14 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
rRow = bRowFound;
}
-void ScDBFunc::RemoveAllOutlines( BOOL bRecord )
+void ScDBFunc::RemoveAllOutlines( sal_Bool bRecord )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.RemoveAllOutlines( nTab, bRecord, FALSE );
+ sal_Bool bOk = aFunc.RemoveAllOutlines( nTab, bRecord, false );
ShowCursor();
if (bOk)
@@ -215,7 +215,7 @@ void ScDBFunc::RemoveAllOutlines( BOOL bRecord )
// Auto-Outlines
-void ScDBFunc::AutoOutline( BOOL bRecord )
+void ScDBFunc::AutoOutline( sal_Bool bRecord )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScRange aRange( 0,0,nTab, MAXCOL,MAXROW,nTab ); // ganze Tabelle, wenn nichts markiert
@@ -228,19 +228,19 @@ void ScDBFunc::AutoOutline( BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.AutoOutline( aRange, bRecord, FALSE );
+ aFunc.AutoOutline( aRange, bRecord, false );
}
// Outline-Ebene auswaehlen
-void ScDBFunc::SelectLevel( BOOL bColumns, USHORT nLevel, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel, sal_Bool bRecord, sal_Bool bPaint )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, bPaint, FALSE );
+ sal_Bool bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, bPaint, false );
ShowCursor();
if (bOk)
@@ -249,14 +249,14 @@ void ScDBFunc::SelectLevel( BOOL bColumns, USHORT nLevel, BOOL bRecord, BOOL bPa
// einzelne Outline-Gruppe einblenden
-void ScDBFunc::ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bRecord, sal_Bool bPaint )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, FALSE );
+ sal_Bool bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, false );
ShowCursor();
if ( bOk && bPaint )
@@ -265,14 +265,14 @@ void ScDBFunc::ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bR
// einzelne Outline-Gruppe ausblenden
-void ScDBFunc::HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bRecord, sal_Bool bPaint )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.HideOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, FALSE );
+ sal_Bool bOk = aFunc.HideOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, false );
ShowCursor();
if ( bOk && bPaint )
@@ -281,9 +281,9 @@ void ScDBFunc::HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bR
// Menue-Status: markierten Bereich ein-/ausblenden
-BOOL ScDBFunc::OutlinePossible(BOOL bHide)
+sal_Bool ScDBFunc::OutlinePossible(sal_Bool bHide)
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = false;
SCCOL nStartCol;
SCROW nStartRow;
@@ -316,13 +316,13 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide)
{
if ( nStartCol<=static_cast<SCCOL>(nEnd) && nEndCol>=static_cast<SCCOL>(nStart) )
if (!pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
else
{
if ( nStart>=nStartCol && nEnd<=nEndCol )
if (pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
}
@@ -338,13 +338,13 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide)
{
if ( nStartRow<=nEnd && nEndRow>=nStart )
if (!pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
else
{
if ( nStart>=nStartRow && nEnd<=nEndRow )
if (pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
}
}
@@ -355,7 +355,7 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide)
// markierten Bereich einblenden
-void ScDBFunc::ShowMarkedOutlines( BOOL bRecord )
+void ScDBFunc::ShowMarkedOutlines( sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
@@ -363,7 +363,7 @@ void ScDBFunc::ShowMarkedOutlines( BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bDone = aFunc.ShowMarkedOutlines( aRange, bRecord, FALSE );
+ sal_Bool bDone = aFunc.ShowMarkedOutlines( aRange, bRecord, false );
ShowCursor();
if (bDone)
UpdateScrollBars();
@@ -374,7 +374,7 @@ void ScDBFunc::ShowMarkedOutlines( BOOL bRecord )
// markierten Bereich ausblenden
-void ScDBFunc::HideMarkedOutlines( BOOL bRecord )
+void ScDBFunc::HideMarkedOutlines( sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
@@ -382,7 +382,7 @@ void ScDBFunc::HideMarkedOutlines( BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bDone = aFunc.HideMarkedOutlines( aRange, bRecord, FALSE );
+ sal_Bool bDone = aFunc.HideMarkedOutlines( aRange, bRecord, false );
ShowCursor();
if (bDone)
UpdateScrollBars();
@@ -397,17 +397,17 @@ void ScDBFunc::HideMarkedOutlines( BOOL bRecord )
// Teilergebnisse
//
-void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
+void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord,
const ScSortParam* pForceNewSort )
{
- BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen
+ sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTab = GetViewData()->GetTabNo();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1,
rParam.nCol2, rParam.nRow2 );
@@ -432,7 +432,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
}
WaitObject aWait( GetViewData()->GetDialogParent() );
- BOOL bOk = TRUE;
+ sal_Bool bOk = true;
if (rParam.bReplace)
if (pDoc->TestRemoveSubTotals( nTab, rParam ))
{
@@ -455,7 +455,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
if (bRecord) // alte Daten sichern
{
- BOOL bOldFilter = bDo && rParam.bDoSort;
+ sal_Bool bOldFilter = bDo && rParam.bDoSort;
SCTAB nTabCount = pDoc->GetTableCount();
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
@@ -470,20 +470,20 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, bOldFilter );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, bOldFilter );
// Datenbereich sichern - incl. Filter-Ergebnis
pDoc->CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -500,7 +500,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
if (rParam.bReplace)
pDoc->RemoveSubTotals( nTab, aNewParam );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if (bDo)
{
// Sortieren
@@ -514,7 +514,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
ScSortParam aOldSort;
pDBData->GetSortParam( aOldSort );
ScSortParam aSortParam( aNewParam, pForceNewSort ? *pForceNewSort : aOldSort );
- Sort( aSortParam, FALSE, FALSE );
+ Sort( aSortParam, false, false );
}
bSuccess = pDoc->DoSubTotals( nTab, aNewParam );
@@ -562,11 +562,11 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
// Consolidate
//
-void ScDBFunc::Consolidate( const ScConsolidateParam& rParam, BOOL bRecord )
+void ScDBFunc::Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord )
{
ScDocShell* pDocShell = GetViewData()->GetDocShell();
pDocShell->DoConsolidate( rParam, bRecord );
- SetTabNo( rParam.nTab, TRUE );
+ SetTabNo( rParam.nTab, sal_True );
}
//
@@ -580,8 +580,8 @@ String lcl_MakePivotTabName( const String& rPrefix, SCTAB nNumber )
return aName;
}
-bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable,
- const ScDPObject& rSource, BOOL bApi )
+bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, sal_Bool bNewTable,
+ const ScDPObject& rSource, sal_Bool bApi )
{
// error message if no fields are set
// this must be removed when drag&drop of fields from a toolbox is available
@@ -594,7 +594,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScRange aDestRange = rDest;
if ( bNewTable )
@@ -615,7 +615,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
while ( !pDoc->InsertTab( nNewTab, lcl_MakePivotTabName( aName, i ) ) && i <= MAXTAB )
i++;
- BOOL bAppend = ( nNewTab+1 == pDoc->GetTableCount() );
+ sal_Bool bAppend = ( nNewTab+1 == pDoc->GetTableCount() );
if (bUndo)
{
pDocSh->GetUndoManager()->AddUndoAction(
@@ -623,7 +623,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
}
GetViewData()->InsertTab( nNewTab );
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
aDestRange = ScRange( 0, 0, nNewTab );
}
@@ -653,7 +653,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
bool bAllowMove = (pDPObj != NULL); // allow re-positioning when editing existing table
ScDBDocFunc aFunc( *pDocSh );
- bool bSuccess = aFunc.DataPilotUpdate( pDPObj, &aObj, TRUE, FALSE, bAllowMove );
+ bool bSuccess = aFunc.DataPilotUpdate( pDPObj, &aObj, sal_True, false, bAllowMove );
CursorPosChanged(); // shells may be switched
@@ -676,7 +676,7 @@ void ScDBFunc::DeletePivotTable()
if ( pDPObj )
{
ScDBDocFunc aFunc( *pDocSh );
- aFunc.DataPilotUpdate( pDPObj, NULL, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, NULL, sal_True, false );
CursorPosChanged(); // shells may be switched
}
else
@@ -696,7 +696,7 @@ void ScDBFunc::RecalcPivotTable()
if ( pDPObj )
{
ScDBDocFunc aFunc( *pDocSh );
- aFunc.DataPilotUpdate( pDPObj, pDPObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pDPObj, true, false );
CursorPosChanged(); // shells may be switched
}
else
@@ -717,7 +717,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
ScRangeListRef xRanges;
GetViewData()->GetMultiArea( xRanges ); // incl. cursor if nothing is selected
size_t nRangeCount = xRanges->size();
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = true;
for (size_t nRangePos=0; nRangePos < nRangeCount && bContinue; nRangePos++)
{
@@ -734,7 +734,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
sheet::DataPilotTableHeaderData aData;
pDPObj->GetHeaderPositionData(ScAddress(nCol, nRow, nTab), aData);
if ( aData.Dimension < 0 )
- bContinue = FALSE; // not part of any dimension
+ bContinue = false; // not part of any dimension
else
{
if ( nStartDimension < 0 ) // first member?
@@ -747,7 +747,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
aData.Hierarchy != nStartHierarchy ||
aData.Level != nStartLevel )
{
- bContinue = FALSE; // cannot mix dimensions
+ bContinue = false; // cannot mix dimensions
}
}
if ( bContinue )
@@ -769,11 +769,11 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
rEntries.FreeAll(); // remove all if not valid
}
-BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts )
+sal_Bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts )
{
// determine if the date group dialog has to be shown for the current selection
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nCurX = GetViewData()->GetCurX();
SCROW nCurY = GetViewData()->GetCurY();
@@ -789,12 +789,12 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
String aBaseDimName( aDimName );
- BOOL bInGroupDim = FALSE;
- BOOL bFoundParts = FALSE;
+ sal_Bool bInGroupDim = false;
+ sal_Bool bFoundParts = false;
ScDPDimensionSaveData* pDimData =
const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() );
@@ -812,7 +812,7 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
// (parts are collected below)
rOldInfo = pNumGroupDim->GetDateInfo();
- bFound = TRUE;
+ bFound = sal_True;
}
else if ( pNumGroupDim->GetInfo().DateValues )
{
@@ -821,10 +821,10 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
rOldInfo = pNumGroupDim->GetInfo();
rParts = com::sun::star::sheet::DataPilotFieldGroupBy::DAYS; // not found in CollectDateParts
- bFoundParts = TRUE;
- bFound = TRUE;
+ bFoundParts = sal_True;
+ bFound = sal_True;
}
- bInGroupDim = TRUE;
+ bInGroupDim = sal_True;
}
else if ( pGroupDim )
{
@@ -837,9 +837,9 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
rOldInfo = pGroupDim->GetDateInfo();
aBaseDimName = pGroupDim->GetSourceDimName();
- bFound = TRUE;
+ bFound = sal_True;
}
- bInGroupDim = TRUE;
+ bInGroupDim = sal_True;
}
}
if ( bFound && !bFoundParts )
@@ -861,12 +861,12 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
SCTAB nSelTab = aSelRange.aStart.Tab();
if ( pDoc->HasValueData( nSelCol, nSelRow, nSelTab ) )
{
- ULONG nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr(
+ sal_uLong nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr(
nSelCol, nSelRow, nSelTab, ATTR_VALUE_FORMAT))->GetValue();
short nType = pDoc->GetFormatTable()->GetType(nIndex);
if ( nType == NUMBERFORMAT_DATE || nType == NUMBERFORMAT_TIME || nType == NUMBERFORMAT_DATETIME )
{
- bFound = TRUE;
+ bFound = sal_True;
// use currently selected value for automatic limits
if( rOldInfo.AutoStart )
rOldInfo.Start = pDoc->GetValue( aSelRange.aStart );
@@ -882,11 +882,11 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
return bFound;
}
-BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
+sal_Bool ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
{
// determine if the numeric group dialog has to be shown for the current selection
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nCurX = GetViewData()->GetCurX();
SCROW nCurY = GetViewData()->GetCurY();
@@ -902,10 +902,10 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
- BOOL bInGroupDim = FALSE;
+ sal_Bool bInGroupDim = false;
ScDPDimensionSaveData* pDimData =
const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() );
@@ -918,10 +918,10 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
// -> edit settings of this dimension
rOldInfo = pNumGroupDim->GetInfo();
- bFound = TRUE;
+ bFound = sal_True;
}
else if ( pDimData->GetNamedGroupDim( aDimName ) )
- bInGroupDim = TRUE; // in a group dimension
+ bInGroupDim = sal_True; // in a group dimension
}
if ( !bFound && !bInGroupDim )
{
@@ -935,7 +935,7 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
if ( pDoc->HasValueData( aSelRange.aStart.Col(), aSelRange.aStart.Row(),
aSelRange.aStart.Tab() ) )
{
- bFound = TRUE;
+ bFound = sal_True;
// use currently selected value for automatic limits
if( rOldInfo.AutoStart )
rOldInfo.Start = pDoc->GetValue( aSelRange.aStart );
@@ -962,7 +962,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
@@ -1016,7 +1016,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
ScDPNumGroupInfo aEmpty;
bool bFirst = true;
sal_Int32 nMask = 1;
- for (USHORT nBit=0; nBit<32; nBit++)
+ for (sal_uInt16 nBit=0; nBit<32; nBit++)
{
if ( nParts & nMask )
{
@@ -1071,7 +1071,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1092,7 +1092,7 @@ void ScDBFunc::NumGroupDataPilot( const ScDPNumGroupInfo& rInfo )
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
@@ -1115,7 +1115,7 @@ void ScDBFunc::NumGroupDataPilot( const ScDPNumGroupInfo& rInfo )
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1136,7 +1136,7 @@ void ScDBFunc::GroupDataPilot()
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
@@ -1157,8 +1157,8 @@ void ScDBFunc::GroupDataPilot()
// remove the selected items from their groups
// (empty groups are removed, too)
- USHORT nEntryCount = aEntries.GetCount();
- USHORT nEntry;
+ sal_uInt16 nEntryCount = aEntries.GetCount();
+ sal_uInt16 nEntry;
if ( pGroupDimension )
{
for (nEntry=0; nEntry<nEntryCount; nEntry++)
@@ -1203,7 +1203,7 @@ void ScDBFunc::GroupDataPilot()
const ScDPSaveGroupItem* pBaseGroup = pBaseGroupDim->GetGroupByIndex( nGroup );
StrData aStrData( pBaseGroup->GetGroupName() );
- USHORT nCollIndex;
+ sal_uInt16 nCollIndex;
if ( !aEntries.Search( &aStrData, nCollIndex ) ) //! ignore case?
{
// add an additional group for each item that is not in the selection
@@ -1259,7 +1259,7 @@ void ScDBFunc::GroupDataPilot()
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1280,14 +1280,14 @@ void ScDBFunc::UngroupDataPilot()
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
ScDPDimensionSaveData* pDimData = aData.GetDimensionData(); // created if not there
//! test first if DimensionData exists?
- BOOL bApply = FALSE;
+ sal_Bool bApply = false;
ScDPSaveGroupDimension* pGroupDim = pDimData->GetNamedGroupDimAcc( aDimName );
const ScDPSaveNumGroupDimension* pNumGroupDim = pDimData->GetNumGroupDim( aDimName );
@@ -1303,8 +1303,8 @@ void ScDBFunc::UngroupDataPilot()
}
else if ( pGroupDim )
{
- USHORT nEntryCount = aEntries.GetCount();
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ sal_uInt16 nEntryCount = aEntries.GetCount();
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aEntryName = aEntries[nEntry]->GetString();
pGroupDim->RemoveGroup( aEntryName );
@@ -1326,14 +1326,14 @@ void ScDBFunc::UngroupDataPilot()
// also remove SaveData settings for the dimension that no longer exists
aData.RemoveDimensionByName( aDimName );
}
- bApply = TRUE;
+ bApply = sal_True;
}
else if ( pNumGroupDim )
{
// remove the numerical grouping
pDimData->RemoveNumGroupDimension( aDimName );
// SaveData settings can remain unchanged - the same dimension still exists
- bApply = TRUE;
+ bApply = sal_True;
}
if ( bApply )
@@ -1342,7 +1342,7 @@ void ScDBFunc::UngroupDataPilot()
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1417,13 +1417,13 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
return;
}
- USHORT nErrorId = 0;
+ sal_uInt16 nErrorId = 0;
pDPObj->BuildAllDimensionMembers();
ScDPSaveData aData( *pDPObj->GetSaveData() );
- BOOL bChange = FALSE;
+ sal_Bool bChange = false;
- USHORT nOrient = DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( rPos, nOrient );
if ( nField >= 0 )
{
@@ -1445,7 +1445,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
ScDPSaveDimension* pSaveDim = aData.GetDimensionByName( aOldText );
pSaveDim->SetName( aNewName );
- bChange = TRUE;
+ bChange = sal_True;
}
else
nErrorId = STR_INVALIDNAME;
@@ -1453,7 +1453,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
}
else if (nOrient == DataPilotFieldOrientation_COLUMN || nOrient == DataPilotFieldOrientation_ROW)
{
- BOOL bDataLayout = false;
+ sal_Bool bDataLayout = false;
String aDimName = pDPObj->GetDimName(nField, bDataLayout);
ScDPSaveDimension* pDim = bDataLayout ? aData.GetDataLayoutDimension() : aData.GetDimensionByName(aDimName);
if (pDim)
@@ -1513,7 +1513,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
{
if ( aData.GetExistingDimensionData() && !(aPosData.Flags & MemberResultFlags::SUBTOTAL))
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( aPosData.Dimension, bIsDataLayout );
ScDPDimensionSaveData* pDimData = aData.GetDimensionData();
@@ -1541,7 +1541,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
if ( pSaveMember )
pSaveMember->SetName( aNewName );
- bChange = TRUE;
+ bChange = sal_True;
}
else
nErrorId = STR_INVALIDNAME;
@@ -1554,7 +1554,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
}
else if (aPosData.Dimension >= 0 && aPosData.MemberName.getLength() > 0)
{
- BOOL bDataLayout = false;
+ sal_Bool bDataLayout = false;
String aDimName = pDPObj->GetDimName(static_cast<long>(aPosData.Dimension), bDataLayout);
if (bDataLayout)
{
@@ -1661,7 +1661,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
}
else
@@ -1708,13 +1708,13 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
if ( pUserListId )
pDPObj->BuildAllDimensionMembers();
- USHORT nOrientation;
+ sal_uInt16 nOrientation;
long nDimIndex = pDPObj->GetHeaderDim(rPos, nOrientation);
if (nDimIndex < 0)
// Invalid dimension index. Bail out.
return false;
- BOOL bDataLayout;
+ sal_Bool bDataLayout;
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
if (!pSaveData)
return false;
@@ -1840,9 +1840,9 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
return aFunc.DataPilotUpdate(pDPObj, pNewObj.get(), true, false);
}
-BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
+sal_Bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDocument* pDoc = GetViewData()->GetDocument();
ScDPObject* pDPObj = pDoc->GetDPAtCursor( rSource.aStart.Col(), rSource.aStart.Row(), rSource.aStart.Tab() );
if ( pDPObj && pDPObj == pDoc->GetDPAtCursor( rDest.Col(), rDest.Row(), rDest.Tab() ) )
@@ -1876,7 +1876,7 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
if ( bValid )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( aDestData.Dimension, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -1923,12 +1923,12 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); //! bApi for drag&drop?
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false ); //! bApi for drag&drop?
delete pNewObj;
Unmark(); // entry was moved - no use in leaving the old cell selected
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1936,9 +1936,9 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
return bRet;
}
-BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
+sal_Bool ScDBFunc::HasSelectionForDrillDown( sal_uInt16& rOrientation )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDPObject* pDPObj = GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
@@ -1950,7 +1950,7 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -1958,12 +1958,12 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
ScDPSaveDimension* pDim = pSaveData->GetExistingDimensionByName( aDimName );
if ( pDim )
{
- USHORT nDimOrient = pDim->GetOrientation();
+ sal_uInt16 nDimOrient = pDim->GetOrientation();
ScDPSaveDimension* pInner = pSaveData->GetInnermostDimension( nDimOrient );
if ( pDim == pInner )
{
rOrientation = nDimOrient;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1973,7 +1973,7 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
return bRet;
}
-void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName )
+void ScDBFunc::SetDataPilotDetails( sal_Bool bShow, const String* pNewDimensionName )
{
ScDPObject* pDPObj = GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
@@ -1985,7 +1985,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -2005,7 +2005,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
pDuplicated = aData.DuplicateDimension( *pNewDimensionName );
}
- USHORT nOrientation = pDim->GetOrientation();
+ sal_uInt16 nOrientation = pDim->GetOrientation();
pNewDim->SetOrientation( nOrientation );
long nPosition = LONG_MAX;
@@ -2032,17 +2032,17 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
ScStrCollection aVisibleEntries;
pDPObj->GetMemberResultNames( aVisibleEntries, nSelectDimension );
- USHORT nVisCount = aVisibleEntries.GetCount();
- for (USHORT nVisPos=0; nVisPos<nVisCount; nVisPos++)
+ sal_uInt16 nVisCount = aVisibleEntries.GetCount();
+ for (sal_uInt16 nVisPos=0; nVisPos<nVisCount; nVisPos++)
{
String aVisName = aVisibleEntries[nVisPos]->GetString();
ScDPSaveMember* pMember = pDim->GetMemberByName( aVisName );
- pMember->SetShowDetails( FALSE );
+ pMember->SetShowDetails( false );
}
}
- USHORT nEntryCount = aEntries.GetCount();
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ sal_uInt16 nEntryCount = aEntries.GetCount();
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aEntryName = aEntries[nEntry]->GetString();
ScDPSaveMember* pMember = pDim->GetMemberByName( aEntryName );
@@ -2053,7 +2053,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -2121,7 +2121,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
continue;
ScPatternAttr aPattern( pInsDoc->GetPool() );
- aPattern.GetItemSet().Put( SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<UINT32>(nNumFmt)) );
+ aPattern.GetItemSet().Put( SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<sal_uInt32>(nNumFmt)) );
pInsDoc->ApplyPatternAreaTab(nCol, 1, nCol, nRowSize-1, nNewTab, aPattern);
}
@@ -2130,7 +2130,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
pInsDoc->GetCellArea( nNewTab, nEndCol, nEndRow );
pInsDoc->SetClipArea( ScRange( 0, 0, nNewTab, nEndCol, nEndRow, nNewTab ) );
- SfxUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager();
String aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE );
pMgr->EnterListAction( aUndo, aUndo );
@@ -2146,7 +2146,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
// DB-Operationen (Sortieren, Filtern, Teilergebnisse) wiederholen
//
-void ScDBFunc::RepeatDB( BOOL bRecord )
+void ScDBFunc::RepeatDB( sal_Bool bRecord )
{
SCCOL nCurX = GetViewData()->GetCurX();
SCROW nCurY = GetViewData()->GetCurY();
@@ -2154,33 +2154,33 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
ScDocument* pDoc = GetViewData()->GetDocument();
ScDBData* pDBData = GetDBData();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
- BOOL bQuery = aQueryParam.GetEntry(0).bDoQuery;
+ sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery;
ScSortParam aSortParam;
pDBData->GetSortParam( aSortParam );
- BOOL bSort = aSortParam.bDoSort[0];
+ sal_Bool bSort = aSortParam.bDoSort[0];
ScSubTotalParam aSubTotalParam;
pDBData->GetSubTotalParam( aSubTotalParam );
- BOOL bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
+ sal_Bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
if ( bQuery || bSort || bSubTotal )
{
- BOOL bQuerySize = FALSE;
+ sal_Bool bQuerySize = false;
ScRange aOldQuery;
ScRange aNewQuery;
if (bQuery && !aQueryParam.bInplace)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest && pDest->IsDoSize())
{
pDest->GetArea( aOldQuery );
- bQuerySize = TRUE;
+ bQuerySize = sal_True;
}
}
@@ -2214,18 +2214,18 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
// Datenbereich sichern - incl. Filter-Ergebnis
- pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
- pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -2240,14 +2240,14 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
{
// Sortieren ohne SubTotals
- aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt
- DoSubTotals( aSubTotalParam, FALSE );
+ aSubTotalParam.bRemoveOnly = sal_True; // wird unten wieder zurueckgesetzt
+ DoSubTotals( aSubTotalParam, false );
}
if (bSort)
{
pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben
- Sort( aSortParam, FALSE, FALSE);
+ Sort( aSortParam, false, false);
}
if (bQuery)
{
@@ -2259,10 +2259,10 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
aAdvSource.aStart.Col(), aAdvSource.aStart.Row(),
aAdvSource.aEnd.Col(), aAdvSource.aEnd.Row(),
aAdvSource.aStart.Tab(), aQueryParam );
- Query( aQueryParam, &aAdvSource, FALSE );
+ Query( aQueryParam, &aAdvSource, false );
}
else
- Query( aQueryParam, NULL, FALSE );
+ Query( aQueryParam, NULL, false );
// bei nicht-inplace kann die Tabelle umgestellt worden sein
if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
@@ -2271,8 +2271,8 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
if (bSubTotal)
{
pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben
- aSubTotalParam.bRemoveOnly = FALSE;
- DoSubTotals( aSubTotalParam, FALSE );
+ aSubTotalParam.bRemoveOnly = false;
+ DoSubTotals( aSubTotalParam, false );
}
if (bRecord)
@@ -2287,7 +2287,7 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
if (bQuerySize)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest)
{
pDest->GetArea( aNewQuery );
diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx
index 940ffa5a37d6..f395cb741221 100644
--- a/sc/source/ui/view/dbfunc4.cxx
+++ b/sc/source/ui/view/dbfunc4.cxx
@@ -53,16 +53,16 @@ using namespace com::sun::star;
//==================================================================
-USHORT ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts )
+sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
return 0;
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
- USHORT nPageCount = pModel->GetPageCount();
- for (USHORT nPageNo=0; nPageNo<nPageCount; nPageNo++)
+ sal_uInt16 nPageCount = pModel->GetPageCount();
+ for (sal_uInt16 nPageNo=0; nPageNo<nPageCount; nPageNo++)
{
SdrPage* pPage = pModel->GetPage(nPageNo);
DBG_ASSERT(pPage,"Page ?");
@@ -74,12 +74,12 @@ USHORT ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL b
if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) )
{
String aName = ((SdrOle2Obj*)pObject)->GetPersistName();
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
if ( !bAllCharts )
{
ScRangeList aRanges;
- BOOL bColHeaders = FALSE;
- BOOL bRowHeaders = FALSE;
+ sal_Bool bColHeaders = false;
+ sal_Bool bRowHeaders = false;
pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders );
bHit = aRanges.In( rPos );
}
diff --git a/sc/source/ui/view/drawattr.cxx b/sc/source/ui/view/drawattr.cxx
index 01809fd60e2e..7067b0d711eb 100644
--- a/sc/source/ui/view/drawattr.cxx
+++ b/sc/source/ui/view/drawattr.cxx
@@ -42,7 +42,7 @@ String SvxDrawToolItem::GetValueText() const
//------------------------------------------------------------------------
-String SvxDrawToolItem::GetValueText( USHORT nVal ) const
+String SvxDrawToolItem::GetValueText( sal_uInt16 nVal ) const
{
const sal_Char* p;
@@ -72,9 +72,9 @@ SfxPoolItem* SvxDrawToolItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-SfxPoolItem* SvxDrawToolItem::Create( SvStream& rStream, USHORT nVer ) const
+SfxPoolItem* SvxDrawToolItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
{
- USHORT nVal;
+ sal_uInt16 nVal;
rStream >> nVal;
return new SvxDrawToolItem(nVal);
}
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index 4270170e099a..54b4ef95dd83 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -63,7 +63,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
long nTwipsY = 0;
for (SCCOL i=nStartCol; i<nEndCol; i++)
{
- USHORT nWidth = pDoc->GetColWidth(i,nTab);
+ sal_uInt16 nWidth = pDoc->GetColWidth(i,nTab);
nTwipsX += (long) nWidth;
nPixelX += ScViewData::ToPixel( nWidth, nPPTX );
}
@@ -77,7 +77,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
continue;
}
- USHORT nHeight = pDoc->GetRowHeight(nRow, nTab);
+ sal_uInt16 nHeight = pDoc->GetRowHeight(nRow, nTab);
nTwipsY += static_cast<long>(nHeight);
nPixelY += ScViewData::ToPixel(nHeight, nPPTY);
}
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 4d6c8d84b380..400384a38712 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -49,7 +49,7 @@
void ScIMapDlgSet( const Graphic& rGraphic, const ImageMap* pImageMap,
const TargetList* pTargetList, void* pEditingObj ); // imapwrap
-USHORT ScIMapChildWindowId();
+sal_uInt16 ScIMapChildWindowId();
// STATIC DATA -----------------------------------------------------------
@@ -61,7 +61,7 @@ ScDrawView::ScDrawView( OutputDevice* pOut, ScViewData* pData ) :
nTab( pData->GetTabNo() ),
pDropMarker( NULL ),
pDropMarkObj( NULL ),
- bInConstruct( TRUE )
+ bInConstruct( true )
{
// #i73602# Use default from the configuration
SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_Calc());
@@ -80,8 +80,8 @@ void ScDrawView::SetPageAnchored()
if( AreObjectsMarked() )
{
const SdrMarkList* pMark = &GetMarkedObjectList();
- ULONG nCount = pMark->GetMarkCount();
- for( ULONG i=0; i<nCount; i++ )
+ sal_uLong nCount = pMark->GetMarkCount();
+ for( sal_uLong i=0; i<nCount; i++ )
{
pObj = pMark->GetMark(i)->GetMarkedSdrObj();
ScDrawLayer::SetPageAnchored( *pObj );
@@ -101,8 +101,8 @@ void ScDrawView::SetCellAnchored()
if( AreObjectsMarked() )
{
const SdrMarkList* pMark = &GetMarkedObjectList();
- ULONG nCount = pMark->GetMarkCount();
- for( ULONG i=0; i<nCount; i++ )
+ sal_uLong nCount = pMark->GetMarkCount();
+ for( sal_uLong i=0; i<nCount; i++ )
{
pObj = pMark->GetMark(i)->GetMarkedSdrObj();
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *pDoc, nTab);
@@ -115,21 +115,21 @@ void ScDrawView::SetCellAnchored()
ScAnchorType ScDrawView::GetAnchorType() const
{
- BOOL bPage = FALSE;
- BOOL bCell = FALSE;
+ sal_Bool bPage = false;
+ sal_Bool bCell = false;
const SdrObject* pObj = NULL;
if( AreObjectsMarked() )
{
const SdrMarkList* pMark = &GetMarkedObjectList();
- ULONG nCount = pMark->GetMarkCount();
+ sal_uLong nCount = pMark->GetMarkCount();
Point p0;
- for( ULONG i=0; i<nCount; i++ )
+ for( sal_uLong i=0; i<nCount; i++ )
{
pObj = pMark->GetMark(i)->GetMarkedSdrObj();
if( ScDrawLayer::GetAnchorType( *pObj ) == SCA_CELL )
- bCell =TRUE;
+ bCell =true;
else
- bPage = TRUE;
+ bPage = sal_True;
}
}
if( bPage && !bCell )
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index cd2ed3f11701..1e6f330a3fd3 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -72,18 +72,18 @@ Point aDragStartDiff;
// -----------------------------------------------------------------------
-void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
+void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_Bool& rOneOle )
{
- rAnyOle = rOneOle = FALSE;
- ULONG nCount = rMarkList.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ rAnyOle = rOneOle = false;
+ sal_uLong nCount = rMarkList.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrMark* pMark = rMarkList.GetMark(i);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_OLE2)
{
- rAnyOle = TRUE;
+ rAnyOle = sal_True;
rOneOle = (nCount == 1);
break;
}
@@ -95,8 +95,8 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
{
if ( pSubObj->GetObjIdentifier() == OBJ_OLE2 )
{
- rAnyOle = TRUE;
- // rOneOle remains FALSE - a group isn't treated like a single OLE object
+ rAnyOle = sal_True;
+ // rOneOle remains sal_False - a group isn't treated like a single OLE object
return;
}
pSubObj = aIter.Next();
@@ -105,9 +105,9 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
}
}
-BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
+sal_Bool ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( AreObjectsMarked() )
{
@@ -118,7 +118,7 @@ BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
aDragStartDiff = rStartPos - aMarkedRect.TopLeft();
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -160,7 +160,7 @@ BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
void ScDrawView::DoCopy()
{
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -196,7 +196,7 @@ void ScDrawView::DoCopy()
uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
{
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -258,12 +258,12 @@ void ScDrawView::SetMarkedOriginalSize()
const SdrMarkList& rMarkList = GetMarkedObjectList();
long nDone = 0;
- ULONG nCount = rMarkList.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rMarkList.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
- USHORT nIdent = pObj->GetObjIdentifier();
- BOOL bDo = FALSE;
+ sal_uInt16 nIdent = pObj->GetObjIdentifier();
+ sal_Bool bDo = false;
Size aOriginalSize;
if (nIdent == OBJ_OLE2)
{
@@ -277,7 +277,7 @@ void ScDrawView::SetMarkedOriginalSize()
{
MapMode aMapMode( MAP_100TH_MM );
aOriginalSize = ((SdrOle2Obj*)pObj)->GetOrigObjSize( &aMapMode );
- bDo = TRUE;
+ bDo = sal_True;
}
else
{
@@ -289,10 +289,10 @@ void ScDrawView::SetMarkedOriginalSize()
aOriginalSize = OutputDevice::LogicToLogic(
Size( aSz.Width, aSz.Height ),
aUnit, MAP_100TH_MM );
- bDo = TRUE;
+ bDo = sal_True;
} catch( embed::NoVisualAreaSizeException& )
{
- OSL_ENSURE( sal_False, "Can't get the original size of the object!" );
+ OSL_ENSURE( false, "Can't get the original size of the object!" );
}
}
}
@@ -319,7 +319,7 @@ void ScDrawView::SetMarkedOriginalSize()
{
aOriginalSize = pActWin->LogicToLogic(
rGraphic.GetPrefSize(), &aSourceMap, &aDestMap );
- bDo = TRUE;
+ bDo = sal_True;
}
}
}
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 9516123c19fc..d9a9169d52be 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -83,11 +83,11 @@ using namespace com::sun::star;
void ScDrawView::Construct()
{
- EnableExtendedKeyInputDispatcher(FALSE);
- EnableExtendedMouseEventDispatcher(FALSE);
- EnableExtendedCommandEventDispatcher(FALSE);
+ EnableExtendedKeyInputDispatcher(false);
+ EnableExtendedMouseEventDispatcher(false);
+ EnableExtendedCommandEventDispatcher(false);
- SetFrameDragSingles(TRUE);
+ SetFrameDragSingles(true);
SetMinMoveDistancePixel( 2 );
SetHitTolerancePixel( 2 );
@@ -97,8 +97,8 @@ void ScDrawView::Construct()
SCTAB nViewTab = pViewData->GetTabNo();
ShowSdrPage(GetModel()->GetPage(nViewTab));
- BOOL bEx = pViewData->GetViewShell()->IsDrawSelMode();
- BOOL bProt = pDoc->IsTabProtected( nViewTab ) ||
+ sal_Bool bEx = pViewData->GetViewShell()->IsDrawSelMode();
+ sal_Bool bProt = pDoc->IsTabProtected( nViewTab ) ||
pViewData->GetSfxDocShell()->IsReadOnly();
SdrLayer* pLayer;
@@ -108,7 +108,7 @@ void ScDrawView::Construct()
SetLayerLocked( pLayer->GetName(), bProt || !bEx );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN);
if (pLayer)
- SetLayerLocked( pLayer->GetName(), TRUE );
+ SetLayerLocked( pLayer->GetName(), sal_True );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT);
if (pLayer)
{
@@ -122,10 +122,10 @@ void ScDrawView::Construct()
if (pLayer)
{
SetLayerLocked( pLayer->GetName(), bProt );
- SetLayerVisible( pLayer->GetName(), sal_False);
+ SetLayerVisible( pLayer->GetName(), false);
}
- SetSwapAsynchron(TRUE);
+ SetSwapAsynchron(sal_True);
}
else
{
@@ -136,7 +136,7 @@ void ScDrawView::Construct()
RecalcScale();
UpdateWorkArea();
- bInConstruct = FALSE;
+ bInConstruct = false;
}
void ScDrawView::ImplClearCalcDropMarker()
@@ -156,8 +156,8 @@ ScDrawView::~ScDrawView()
void ScDrawView::AddCustomHdl()
{
const SdrMarkList &rMrkList = GetMarkedObjectList();
- UINT32 nCount = rMrkList.GetMarkCount();
- for(UINT32 nPos=0; nPos<nCount; nPos++ )
+ sal_uInt32 nCount = rMrkList.GetMarkCount();
+ for(sal_uInt32 nPos=0; nPos<nCount; nPos++ )
{
SdrObject* pObj = rMrkList.GetMark(nPos)->GetMarkedSdrObj();
if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjDataTab(pObj, nTab))
@@ -174,7 +174,7 @@ void ScDrawView::InvalidateAttribs()
SfxBindings& rBindings = pViewData->GetBindings();
// true status values:
- rBindings.InvalidateAll( TRUE );
+ rBindings.InvalidateAll( true );
}
void ScDrawView::InvalidateDrawTextAttrs()
@@ -216,7 +216,7 @@ void ScDrawView::InvalidateDrawTextAttrs()
rBindings.Invalidate( SID_ALIGN_ANY_JUSTIFIED );
}
-void ScDrawView::SetMarkedToLayer( BYTE nLayerNo )
+void ScDrawView::SetMarkedToLayer( sal_uInt8 nLayerNo )
{
if (AreObjectsMarked())
{
@@ -225,8 +225,8 @@ void ScDrawView::SetMarkedToLayer( BYTE nLayerNo )
BegUndo( ScGlobal::GetRscString( STR_UNDO_SELATTR ) );
const SdrMarkList& rMark = GetMarkedObjectList();
- ULONG nCount = rMark.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rMark.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
if ( !pObj->ISA(SdrUnoObj) && (pObj->GetLayer() != SC_LAYER_INTERN) )
@@ -380,7 +380,7 @@ void ScDrawView::MarkListHasChanged()
SdrGrafObj* pGrafObj = NULL;
const SdrMarkList& rMarkList = GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount == 0 && !pViewData->GetViewShell()->IsDrawSelMode() && !bInConstruct )
{
@@ -389,7 +389,7 @@ void ScDrawView::MarkListHasChanged()
LockInternalLayer();
}
- BOOL bSubShellSet = FALSE;
+ sal_Bool bSubShellSet = false;
if (nMarkCount == 1)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -397,55 +397,55 @@ void ScDrawView::MarkListHasChanged()
{
pOle2Obj = (SdrOle2Obj*) pObj;
if (!pDoc->IsChart(pObj) )
- pViewSh->SetOleObjectShell(TRUE);
+ pViewSh->SetOleObjectShell(sal_True);
else
- pViewSh->SetChartShell(TRUE);
- bSubShellSet = TRUE;
+ pViewSh->SetChartShell(sal_True);
+ bSubShellSet = sal_True;
}
else if (pObj->GetObjIdentifier() == OBJ_GRAF)
{
pGrafObj = (SdrGrafObj*) pObj;
- pViewSh->SetGraphicShell(TRUE);
- bSubShellSet = TRUE;
+ pViewSh->SetGraphicShell(sal_True);
+ bSubShellSet = sal_True;
}
else if (pObj->GetObjIdentifier() == OBJ_MEDIA)
{
- pViewSh->SetMediaShell(TRUE);
- bSubShellSet = TRUE;
+ pViewSh->SetMediaShell(true);
+ bSubShellSet = true;
}
else if (pObj->GetObjIdentifier() != OBJ_TEXT // Verhindern, das beim Anlegen
|| !pViewSh->IsDrawTextShell()) // eines TextObjekts auf die
{ // DrawShell umgeschaltet wird.
- pViewSh->SetDrawShell(TRUE); //@#70206#
+ pViewSh->SetDrawShell(sal_True); //@#70206#
}
}
if ( nMarkCount && !bSubShellSet )
{
- BOOL bOnlyControls = TRUE;
- BOOL bOnlyGraf = TRUE;
- for (ULONG i=0; i<nMarkCount; i++)
+ sal_Bool bOnlyControls = sal_True;
+ sal_Bool bOnlyGraf = sal_True;
+ for (sal_uLong i=0; i<nMarkCount; i++)
{
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if ( pObj->ISA( SdrObjGroup ) )
{
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- ULONG nListCount = pLst->GetObjCount();
+ sal_uLong nListCount = pLst->GetObjCount();
if ( nListCount == 0 )
{
// An empty group (may occur during Undo) is no control or graphics object.
// Creating the form shell during undo would lead to problems with the undo manager.
- bOnlyControls = FALSE;
- bOnlyGraf = FALSE;
+ bOnlyControls = false;
+ bOnlyGraf = false;
}
- for ( USHORT j = 0; j < nListCount; ++j )
+ for ( sal_uInt16 j = 0; j < nListCount; ++j )
{
SdrObject *pSubObj = pLst->GetObj( j );
if (!pSubObj->ISA(SdrUnoObj))
- bOnlyControls = FALSE;
+ bOnlyControls = false;
if (pSubObj->GetObjIdentifier() != OBJ_GRAF)
- bOnlyGraf = FALSE;
+ bOnlyGraf = false;
if ( !bOnlyControls && !bOnlyGraf ) break;
}
@@ -453,9 +453,9 @@ void ScDrawView::MarkListHasChanged()
else
{
if (!pObj->ISA(SdrUnoObj))
- bOnlyControls = FALSE;
+ bOnlyControls = false;
if (pObj->GetObjIdentifier() != OBJ_GRAF)
- bOnlyGraf = FALSE;
+ bOnlyGraf = false;
}
if ( !bOnlyControls && !bOnlyGraf ) break;
@@ -463,15 +463,15 @@ void ScDrawView::MarkListHasChanged()
if(bOnlyControls)
{
- pViewSh->SetDrawFormShell(TRUE); // jetzt UNO-Controls
+ pViewSh->SetDrawFormShell(sal_True); // jetzt UNO-Controls
}
else if(bOnlyGraf)
{
- pViewSh->SetGraphicShell(TRUE);
+ pViewSh->SetGraphicShell(sal_True);
}
else if(nMarkCount>1)
{
- pViewSh->SetDrawShell(TRUE);
+ pViewSh->SetDrawShell(sal_True);
}
}
@@ -480,10 +480,12 @@ void ScDrawView::MarkListHasChanged()
// Verben anpassen
SfxViewFrame* pViewFrame = pViewSh->GetViewFrame();
- BOOL bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace();
+ uno::Sequence< embed::VerbDescriptor > aVerbs;
if ( pOle2Obj && !bOle )
{
uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef();
+ DBG_ASSERT( xObj.is(), "SdrOle2Obj ohne ObjRef" );
if (xObj.is())
pViewSh->SetVerbs( xObj->getSupportedVerbs() );
else
@@ -492,8 +494,7 @@ void ScDrawView::MarkListHasChanged()
pViewSh->SetVerbs( 0 );
}
}
- else
- pViewSh->SetVerbs( 0 );
+ pViewSh->SetVerbs( aVerbs );
// Image-Map Editor
@@ -558,7 +559,7 @@ void ScDrawView::UpdateUserViewOptions()
const ScViewOptions& rOpt = pViewData->GetOptions();
const ScGridOptions& rGrid = rOpt.GetGridOptions();
- BOOL bBigHdl = rOpt.GetOption( VOPT_BIGHANDLES );
+ sal_Bool bBigHdl = rOpt.GetOption( VOPT_BIGHANDLES );
SetDragStripes( rOpt.GetOption( VOPT_HELPLINES ) );
SetSolidMarkHdl( rOpt.GetOption( VOPT_SOLIDHANDLES ) );
@@ -582,7 +583,7 @@ void ScDrawView::UpdateUserViewOptions()
#pragma optimize ( "", on )
#endif
-BOOL ScDrawView::SelectObject( const String& rName )
+sal_Bool ScDrawView::SelectObject( const String& rName )
{
UnmarkAll();
@@ -644,7 +645,7 @@ BOOL ScDrawView::SelectObject( const String& rName )
}
-bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions)
+bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, sal_uLong nOptions)
{
// Markierung nicht aendern, wenn Ole-Objekt aktiv
// (bei Drop aus Ole-Objekt wuerde sonst mitten im ExecuteDrag deaktiviert!)
@@ -699,7 +700,7 @@ void ScDrawView::DeleteMarked()
(void)pCaptObj; // prevent 'unused variable' compiler warning in pro builds
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : 0;
- SfxUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
bool bUndo = pDrawLayer && pDocShell && pUndoMgr && pDoc->IsUndoEnabled();
// remove the cell note from document, we are its owner now
@@ -731,7 +732,7 @@ void ScDrawView::DeleteMarked()
SdrEndTextEditKind ScDrawView::ScEndTextEdit()
{
- BOOL bIsTextEdit = IsTextEdit();
+ sal_Bool bIsTextEdit = IsTextEdit();
SdrEndTextEditKind eKind = SdrEndTextEdit();
if ( bIsTextEdit && pViewData )
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index ab96b03258b0..515b2fc514a9 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -110,8 +110,8 @@ ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) :
pEditView (pView),
pViewData (pData),
pClipEvtLstnr (NULL),
- bPastePossible (FALSE),
- bIsInsertMode (TRUE)
+ bPastePossible (false),
+ bIsInsertMode (sal_True)
{
SetPool( pEditView->GetEditEngine()->GetEmptyItemSet().GetPool() );
SetUndoManager( &pEditView->GetEditEngine()->GetUndoManager() );
@@ -122,7 +122,7 @@ ScEditShell::~ScEditShell()
{
if ( pClipEvtLstnr )
{
- pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), FALSE );
+ pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), false );
// The listener may just now be waiting for the SolarMutex and call the link
// afterwards, in spite of RemoveListener. So the link has to be reset, too.
@@ -149,13 +149,13 @@ void lcl_RemoveAttribs( EditView& rEditView )
{
ScEditEngineDefaulter* pEngine = static_cast<ScEditEngineDefaulter*>(rEditView.GetEditEngine());
- BOOL bOld = pEngine->GetUpdateMode();
- pEngine->SetUpdateMode(FALSE);
+ sal_Bool bOld = pEngine->GetUpdateMode();
+ pEngine->SetUpdateMode(false);
String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
pEngine->GetUndoManager().EnterListAction( aName, aName );
- rEditView.RemoveAttribs(TRUE);
+ rEditView.RemoveAttribs(true);
pEngine->RepeatDefaults(); // paragraph attributes from cell formats must be preserved
pEngine->GetUndoManager().LeaveListAction();
@@ -175,7 +175,7 @@ void lclInsertCharacter( EditView* pTableView, EditView* pTopView, sal_Unicode c
void ScEditShell::Execute( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxBindings& rBindings = pViewData->GetBindings();
ScInputHandler* pHdl = GetMyInputHdl();
@@ -197,7 +197,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
EditEngine* pEngine = pTableView->GetEditEngine();
pHdl->DataChanging();
- BOOL bSetSelIsRef = FALSE;
+ sal_Bool bSetSelIsRef = false;
switch ( nSlot )
{
@@ -223,7 +223,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_THES:
{
String aReplaceText;
- SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , sal_False );
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , false );
if (pItem2)
aReplaceText = pItem2->GetValue();
if (aReplaceText.Len() > 0)
@@ -261,10 +261,10 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -287,7 +287,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( pViewData->GetDialogParent() );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if ( pDlg )
{
pDlg->Insert( SOT_FORMAT_STRING, EMPTY_STRING );
@@ -325,7 +325,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_SELECTALL:
{
- USHORT nPar = pEngine->GetParagraphCount();
+ sal_uInt16 nPar = pEngine->GetParagraphCount();
if (nPar)
{
xub_StrLen nLen = pEngine->GetTextLen(nPar-1);
@@ -338,8 +338,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_CHARMAP:
{
- USHORT nScript = pTableView->GetSelectedScriptType();
- USHORT nFontWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_FONTINFO_CJK :
+ sal_uInt16 nScript = pTableView->GetSelectedScriptType();
+ sal_uInt16 nFontWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_FONTINFO_CJK :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? EE_CHAR_FONTINFO_CTL :
EE_CHAR_FONTINFO );
const SvxFontItem& rItem = (const SvxFontItem&)
@@ -351,13 +351,13 @@ void ScEditShell::Execute( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
aString = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
{
@@ -385,7 +385,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
if ( aString.Len() )
{
// if string contains WEAK characters, set all fonts
- BYTE nSetScript;
+ sal_uInt8 nSetScript;
ScDocument* pDoc = pViewData->GetDocument();
if ( pDoc->HasStringWeakCharacters( aString ) )
nSetScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
@@ -395,7 +395,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
SfxItemSet aSet( pTableView->GetEmptyItemSet() );
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, GetPool() );
aSetItem.PutItemForScriptType( nSetScript, aNewItem );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
// SetAttribs an der View selektiert ein Wort, wenn nichts selektiert ist
pTableView->GetEditEngine()->QuickSetAttribs( aSet, pTableView->GetSelection() );
@@ -423,7 +423,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, FALSE );
+ AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, false );
DBG_ASSERT(pDlg, "Dialog create fail!");
short nRet = pDlg->Execute();
// pDlg is needed below
@@ -484,7 +484,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_TOGGLE_REL:
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
if (pEngine->GetParagraphCount() == 1)
{
String aText = pEngine->GetText();
@@ -503,10 +503,10 @@ void ScEditShell::Execute( SfxRequest& rReq )
pTopView->GetEditEngine()->SetText( aNew );
pTopView->SetSelection( aNewSel );
}
- bOk = TRUE;
+ bOk = sal_True;
// Referenz wird selektiert -> beim Tippen nicht ueberschreiben
- bSetSelIsRef = TRUE;
+ bSetSelIsRef = sal_True;
}
}
if (!bOk)
@@ -518,7 +518,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
if( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
const String& rName = pHyper->GetName();
@@ -526,7 +526,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
const String& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD )
{
const SvxURLField* pURLField = GetURLField();
@@ -560,14 +560,14 @@ void ScEditShell::Execute( SfxRequest& rReq )
pTopView->SetSelection( aSel ); // select inserted field
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
if (!bDone)
{
pViewData->GetViewShell()->
- InsertURL( rName, rURL, rTarget, (USHORT) eMode );
+ InsertURL( rName, rURL, rTarget, (sal_uInt16) eMode );
// InsertURL an der ViewShell schaltet bei "Button"
// die EditShell ab, darum sofort return
@@ -612,13 +612,13 @@ void ScEditShell::Execute( SfxRequest& rReq )
pHdl->DataChanged();
if (bSetSelIsRef)
- pHdl->SetSelIsRef(TRUE);
+ pHdl->SetSelIsRef(sal_True);
}
void lcl_DisableAll( SfxItemSet& rSet ) // disable all slots
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -641,7 +641,7 @@ void ScEditShell::GetState( SfxItemSet& rSet )
EditView* pActiveView = pHdl ? pHdl->GetActiveView() : pEditView;
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -703,7 +703,7 @@ void ScEditShell::GetState( SfxItemSet& rSet )
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
// disable thesaurus context menu entry if there is nothing to look up
- BOOL bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
+ sal_Bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
if (!bIsLookUpWord || !bCanDoThesaurus)
rSet.DisableItem( SID_THES );
}
@@ -755,7 +755,7 @@ void ScEditShell::GetClipState( SfxItemSet& rSet )
pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScEditShell, ClipboardChanged ) );
pClipEvtLstnr->acquire();
Window* pWin = pViewData->GetActiveWin();
- pClipEvtLstnr->AddRemoveListener( pWin, TRUE );
+ pClipEvtLstnr->AddRemoveListener( pWin, sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
@@ -763,7 +763,7 @@ void ScEditShell::GetClipState( SfxItemSet& rSet )
}
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -809,7 +809,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
SfxItemSet aSet( pEditView->GetEmptyItemSet() );
SfxBindings& rBindings = pViewData->GetBindings();
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -819,7 +819,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
if (pArgs)
{
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
{
nScript = pEditView->GetSelectedScriptType();
@@ -828,10 +828,10 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
- USHORT nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
}
}
break;
@@ -851,21 +851,21 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_WEIGHT:
{
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
- BOOL bOld = FALSE;
+ sal_Bool bOld = false;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), FALSE );
+ aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() > WEIGHT_NORMAL )
- bOld = TRUE;
+ bOld = sal_True;
SvxScriptSetItem aSetItem( nSlot, rPool );
aSetItem.PutItemForScriptType( nScript,
SvxWeightItem( bOld ? WEIGHT_NORMAL : WEIGHT_BOLD, EE_CHAR_WEIGHT ) );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
rBindings.Invalidate( nSlot );
}
@@ -874,21 +874,21 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_POSTURE:
{
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
- BOOL bOld = FALSE;
+ sal_Bool bOld = false;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), FALSE );
+ aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxPostureItem*)pCore)->GetValue() != ITALIC_NONE )
- bOld = TRUE;
+ bOld = sal_True;
SvxScriptSetItem aSetItem( nSlot, rPool );
aSetItem.PutItemForScriptType( nScript,
SvxPostureItem( bOld ? ITALIC_NONE : ITALIC_NORMAL, EE_CHAR_ITALIC ) );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
rBindings.Invalidate( nSlot );
}
@@ -939,7 +939,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_STRIKEOUT:
{
- BOOL bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs().
+ sal_Bool bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs().
Get(EE_CHAR_STRIKEOUT)).GetValue() != STRIKEOUT_NONE;
aSet.Put( SvxCrossedOutItem( bOld ? STRIKEOUT_NONE : STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT ) );
rBindings.Invalidate( nSlot );
@@ -948,7 +948,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_SHADOWED:
{
- BOOL bOld = ((const SvxShadowedItem&)pEditView->GetAttribs().
+ sal_Bool bOld = ((const SvxShadowedItem&)pEditView->GetAttribs().
Get(EE_CHAR_SHADOW)).GetValue();
aSet.Put( SvxShadowedItem( !bOld, EE_CHAR_SHADOW ) );
rBindings.Invalidate( nSlot );
@@ -957,7 +957,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_CONTOUR:
{
- BOOL bOld = ((const SvxContourItem&)pEditView->GetAttribs().
+ sal_Bool bOld = ((const SvxContourItem&)pEditView->GetAttribs().
Get(EE_CHAR_OUTLINE)).GetValue();
aSet.Put( SvxContourItem( !bOld, EE_CHAR_OUTLINE ) );
rBindings.Invalidate( nSlot );
@@ -991,8 +991,8 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
//
EditEngine* pEngine = pEditView->GetEditEngine();
- BOOL bOld = pEngine->GetUpdateMode();
- pEngine->SetUpdateMode(FALSE);
+ sal_Bool bOld = pEngine->GetUpdateMode();
+ pEngine->SetUpdateMode(false);
pEditView->SetAttribs( aSet );
@@ -1018,11 +1018,11 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
// choose font info according to selection script type
- USHORT nScript = pEditView->GetSelectedScriptType();
+ sal_uInt16 nScript = pEditView->GetSelectedScriptType();
if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
// #i55929# input-language-dependent script type (depends on input language if nothing selected)
- USHORT nInputScript = nScript;
+ sal_uInt16 nInputScript = nScript;
if ( !pEditView->GetSelection().HasRange() )
{
LanguageType nInputLang = pViewData->GetActiveWin()->GetInputLanguage();
@@ -1042,7 +1042,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
// Unterstreichung
- SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE, TRUE );
+ SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE, sal_True );
if ( eState == SFX_ITEM_DONTCARE )
{
rSet.InvalidateItem( SID_ULINE_VAL_NONE );
@@ -1054,7 +1054,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
{
FontUnderline eUnderline = ((const SvxUnderlineItem&)
aAttribs.Get(EE_CHAR_UNDERLINE)).GetLineStyle();
- USHORT nId = SID_ULINE_VAL_NONE;
+ sal_uInt16 nId = SID_ULINE_VAL_NONE;
switch (eUnderline)
{
case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break;
@@ -1063,7 +1063,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
default:
break;
}
- rSet.Put( SfxBoolItem( nId, TRUE ) );
+ rSet.Put( SfxBoolItem( nId, sal_True ) );
}
//! Testen, ob Klammer-Hervorhebung aktiv ist !!!!
@@ -1072,7 +1072,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
rSet.ClearItem( EE_CHAR_WEIGHT ); // hervorgehobene Klammern hier nicht
}
-String ScEditShell::GetSelectionText( BOOL bWholeWord )
+String ScEditShell::GetSelectionText( sal_Bool bWholeWord )
{
String aStrSelection;
@@ -1110,20 +1110,20 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq)
pHdl->DataChanging();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_UNDO:
case SID_REDO:
{
- BOOL bIsUndo = ( nSlot == SID_UNDO );
+ sal_Bool bIsUndo = ( nSlot == SID_UNDO );
- USHORT nCount = 1;
+ sal_uInt16 nCount = 1;
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
nCount = ((const SfxUInt16Item*)pItem)->GetValue();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if ( bIsUndo )
{
@@ -1141,7 +1141,7 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq)
}
break;
}
- pViewData->GetBindings().InvalidateAll(FALSE);
+ pViewData->GetBindings().InvalidateAll(false);
pHdl->DataChanged();
}
@@ -1154,7 +1154,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
if ( pViewFrm && GetUndoManager() )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
pViewFrm->GetSlotState( nWhich, NULL, &rSet );
@@ -1169,7 +1169,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
EditView* pTopView = pHdl->GetTopView();
if (pTopView)
{
- SfxUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager();
+ ::svl::IUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager();
if ( rTopMgr.GetUndoActionCount() == 0 )
rSet.DisableItem( SID_UNDO );
if ( rTopMgr.GetRedoActionCount() == 0 )
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 4d8c6f2cbbee..42a8411f24f0 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -114,7 +114,7 @@
namespace {
-SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot )
+SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot )
{
SvxCellHorJustify eHJustify = SVX_HOR_JUSTIFY_STANDARD;
switch( nSlot )
@@ -129,7 +129,7 @@ SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot )
return eHJustify;
}
-SvxCellVerJustify lclConvertSlotToVAlign( USHORT nSlot )
+SvxCellVerJustify lclConvertSlotToVAlign( sal_uInt16 nSlot )
{
SvxCellVerJustify eVJustify = SVX_VER_JUSTIFY_STANDARD;
switch( nSlot )
@@ -163,7 +163,7 @@ ScFormatShell::ScFormatShell(ScViewData* pData) :
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SetPool( &pTabViewShell->GetPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -185,15 +185,15 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
- BOOL bProtected = FALSE;
+ sal_Bool bProtected = false;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nTabCount; i++)
if (pDoc->IsTabProtected(i)) // ueberhaupt eine Tabelle geschuetzt?
- bProtected = TRUE;
+ bProtected = sal_True;
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- USHORT nSlotId = 0;
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_uInt16 nSlotId = 0;
while ( nWhich )
{
@@ -244,7 +244,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
{
ISfxTemplateCommon* pDesigner = SFX_APP()->
GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
- BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
+ sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
if ( bProtected || bPage )
rSet.DisableItem( nSlotId );
@@ -256,7 +256,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
{
ISfxTemplateCommon* pDesigner = SFX_APP()->
GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
- BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
+ sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
if ( bProtected && !bPage )
rSet.DisableItem( nSlotId );
@@ -285,7 +285,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
//--------------------------------------------------------------------
SfxBindings& rBindings = pViewData->GetBindings();
const SfxItemSet* pArgs = rReq.GetArgs();
- const USHORT nSlotId = rReq.GetSlot();
+ const sal_uInt16 nSlotId = rReq.GetSlot();
const SCTAB nCurTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScTabViewShell* pTabViewShell= GetViewData()->GetViewShell();
@@ -293,7 +293,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
ScMarkData& rMark = GetViewData()->GetMarkData();
ScModule* pScMod = SC_MOD();
String aRefName;
- BOOL bUndo = pDoc->IsUndoEnabled();
+ sal_Bool bUndo = pDoc->IsUndoEnabled();
if ( (nSlotId == SID_STYLE_NEW)
|| (nSlotId == SID_STYLE_EDIT)
@@ -307,18 +307,18 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = NULL;
- BOOL bStyleToMarked = FALSE;
- BOOL bListAction = FALSE;
- BOOL bAddUndo = FALSE; // add ScUndoModifyStyle (style modified)
+ sal_Bool bStyleToMarked = false;
+ sal_Bool bListAction = false;
+ sal_Bool bAddUndo = false; // add ScUndoModifyStyle (style modified)
ScStyleSaveData aOldData; // for undo/redo
ScStyleSaveData aNewData;
SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA;
const SfxPoolItem* pFamItem;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, TRUE, &pFamItem ) )
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, sal_True, &pFamItem ) )
eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue();
else
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, TRUE, &pFamItem ) )
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_True, &pFamItem ) )
{
String sFamily = ((const SfxStringItem*)pFamItem)->GetValue();
if (sFamily.CompareToAscii("CellStyles") == COMPARE_EQUAL)
@@ -329,7 +329,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
}
String aStyleName;
- USHORT nRetMask = 0xffff;
+ sal_uInt16 nRetMask = 0xffff;
pStylePool->SetSearchMask( eFamily, SFXSTYLEBIT_ALL );
@@ -338,11 +338,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_NEW:
{
const SfxPoolItem* pNameItem;
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem ))
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem ))
aStyleName = ((const SfxStringItem*)pNameItem)->GetValue();
const SfxPoolItem* pRefItem=NULL;
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, TRUE, &pRefItem ))
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, sal_True, &pRefItem ))
{
if(pRefItem!=NULL)
aRefName = ((const SfxStringItem*)pRefItem)->GetValue();
@@ -358,8 +358,8 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_APPLY:
{
- SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_APPLY_STYLE, sal_False );
- SFX_REQUEST_ARG( rReq, pFamilyItem, SfxStringItem, SID_STYLE_FAMILYNAME, sal_False );
+ SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_APPLY_STYLE, false );
+ SFX_REQUEST_ARG( rReq, pFamilyItem, SfxStringItem, SID_STYLE_FAMILYNAME, false );
if ( pFamilyItem && pNameItem )
{
com::sun::star::uno::Reference< com::sun::star::style::XStyleFamiliesSupplier > xModel(pDocSh->GetModel(), com::sun::star::uno::UNO_QUERY);
@@ -385,7 +385,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_NEW_BY_EXAMPLE:
{
const SfxPoolItem* pNameItem;
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem ))
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem ))
aStyleName = ((const SfxStringItem*)pNameItem)->GetValue();
pStyleSheet = pStylePool->Find( aStyleName, eFamily );
@@ -395,14 +395,14 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_WATERCAN:
{
- BOOL bWaterCan = pScMod->GetIsWaterCan();
+ sal_Bool bWaterCan = pScMod->GetIsWaterCan();
if( !bWaterCan )
{
const SfxPoolItem* pItem;
if ( SFX_ITEM_SET ==
- pArgs->GetItemState( nSlotId, TRUE, &pItem ) )
+ pArgs->GetItemState( nSlotId, sal_True, &pItem ) )
{
const SfxStringItem* pStrItem = PTR_CAST(SfxStringItem,pItem);
if ( pStrItem )
@@ -422,13 +422,13 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( !bWaterCan && pStyleSheet )
{
- pScMod->SetWaterCan( TRUE );
+ pScMod->SetWaterCan( sal_True );
pTabViewShell->SetActivePointer( Pointer(POINTER_FILL) );
rReq.Done();
}
else
{
- pScMod->SetWaterCan( FALSE );
+ pScMod->SetWaterCan( false );
pTabViewShell->SetActivePointer( Pointer(POINTER_ARROW) );
rReq.Done();
}
@@ -453,15 +453,15 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
if ( pStyleSheet )
{
- pTabViewShell->RemoveStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->RemoveStyleSheetInUse( pStyleSheet );
pStylePool->Remove( pStyleSheet );
pTabViewShell->InvalidateAttribs();
- nRetMask = TRUE;
- bAddUndo = TRUE;
+ nRetMask = sal_True;
+ bAddUndo = sal_True;
rReq.Done();
}
else
- nRetMask = FALSE;
+ nRetMask = false;
}
break;
@@ -512,10 +512,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bListAction = TRUE;
+ bListAction = sal_True;
}
- BOOL bConvertBack = FALSE;
+ sal_Bool bConvertBack = false;
SfxStyleSheet* pSheetInUse = (SfxStyleSheet*)
pTabViewShell->GetStyleSheetFromMarked();
@@ -535,7 +535,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
//!!! bei Gelenheit mal eine Methode, die
// das fuer einen bestimmten Style macht
pDoc->StylesToNames();
- bConvertBack = TRUE;
+ bConvertBack = sal_True;
pStylePool->Remove(pStyleSheet);
}
@@ -556,11 +556,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// Attribute uebernehmen und Style anwenden
pStyleSheet->GetItemSet().Put( aAttrSet );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
// call SetStyleSheetToMarked after adding the ScUndoModifyStyle
// (pStyleSheet pointer is used!)
- bStyleToMarked = TRUE;
+ bStyleToMarked = sal_True;
}
else // ( nSlotId == SID_STYLE_UPDATE_BY_EXAMPLE )
{
@@ -574,20 +574,20 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bListAction = TRUE;
+ bListAction = sal_True;
}
pStyleSheet->GetItemSet().Put( aAttrSet );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
// call SetStyleSheetToMarked after adding the ScUndoModifyStyle
// (pStyleSheet pointer is used!)
- bStyleToMarked = TRUE;
+ bStyleToMarked = sal_True;
}
}
aNewData.InitFromStyle( pStyleSheet );
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
rReq.Done();
}
break;
@@ -609,14 +609,14 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
if ( pDoc->RemovePageStyleInUse( pStyleSheet->GetName() ) )
{
- ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nCurTab ).UpdatePages();
+ ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nCurTab ).UpdatePages();
rBindings.Invalidate( SID_STATUS_PAGESTYLE );
rBindings.Invalidate( FID_RESET_PRINTZOOM );
}
pStylePool->Remove( pStyleSheet );
rBindings.Invalidate( SID_STYLE_FAMILY4 );
pDocSh->SetDocumentModified();
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
rReq.Done();
}
}
@@ -636,7 +636,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( aOldName != aStyleName )
{
pDoc->SetPageStyle( nTab, aStyleName );
- ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nTab ).UpdatePages();
+ ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nTab ).UpdatePages();
if( !pUndoAction )
pUndoAction = new ScUndoApplyPageStyle( pDocSh, aStyleName );
pUndoAction->AddSheetAction( nTab, aOldName );
@@ -665,7 +665,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxStyleSheetBase* pCurStyle = pStylePool->Find( rStrCurStyle, eFamily );
SfxItemSet aAttrSet = pCurStyle->GetItemSet();
SCTAB nInTab;
- BOOL bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab );
+ sal_Bool bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab );
// wenn bereits vorhanden, erstmal entfernen...
if ( pStyleSheet )
@@ -681,12 +681,12 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// wenn in Verwendung -> Update
if ( bUsed )
- ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nInTab ).UpdatePages();
+ ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nInTab ).UpdatePages();
aNewData.InitFromStyle( pStyleSheet );
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
rReq.Done();
- nRetMask = TRUE;
+ nRetMask = sal_True;
}
}
break;
@@ -710,7 +710,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxStyleFamily eFam = pStyleSheet->GetFamily();
SfxAbstractTabDialog* pDlg = NULL;
- USHORT nRsc = 0;
+ sal_uInt16 nRsc = 0;
// alte Items aus der Vorlage merken
SfxItemSet aOldSet = pStyleSheet->GetItemSet();
@@ -729,16 +729,16 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
const SfxPoolItem* pItem;
if ( rSet.GetItemState( ATTR_VALUE_FORMAT,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ false, &pItem ) == SFX_ITEM_SET )
{
// NumberFormat Value aus Value und Language
// erzeugen und eintueten
- ULONG nFormat =
+ sal_uLong nFormat =
((SfxUInt32Item*)pItem)->GetValue();
LanguageType eLang =
((SvxLanguageItem*)&rSet.Get(
ATTR_LANGUAGE_FORMAT ))->GetLanguage();
- ULONG nLangFormat = pDoc->GetFormatTable()->
+ sal_uLong nLangFormat = pDoc->GetFormatTable()->
GetFormatForLanguageIfBuiltIn( nFormat, eLang );
if ( nLangFormat != nFormat )
{
@@ -754,16 +754,16 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pDocSh->PutItem( *pNumberInfoItem );
nRsc = RID_SCDLG_STYLES_PAR;
- // auf jeden Fall ein SvxBoxInfoItem mit Table = FALSE im Set:
+ // auf jeden Fall ein SvxBoxInfoItem mit Table = sal_False im Set:
// (wenn gar kein Item da ist, loescht der Dialog auch das
// BORDER_OUTER SvxBoxItem aus dem Vorlagen-Set)
- if ( rSet.GetItemState( ATTR_BORDER_INNER, FALSE ) != SFX_ITEM_SET )
+ if ( rSet.GetItemState( ATTR_BORDER_INNER, false ) != SFX_ITEM_SET )
{
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetTable(FALSE); // keine inneren Linien
- aBoxInfoItem.SetDist(TRUE);
- aBoxInfoItem.SetMinDist(FALSE);
+ aBoxInfoItem.SetTable(false); // keine inneren Linien
+ aBoxInfoItem.SetDist(sal_True);
+ aBoxInfoItem.SetMinDist(false);
rSet.Put( aBoxInfoItem );
}
}
@@ -788,7 +788,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pParent = pTabViewShell->GetDialogParent();
}
- pTabViewShell->SetInFormatDialog(TRUE);
+ pTabViewShell->SetInFormatDialog(sal_True);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -796,7 +796,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pDlg = pFact->CreateScStyleDlg( pParent, *pStyleSheet, nRsc, nRsc );
DBG_ASSERT(pDlg, "Dialog create fail!");
short nResult = pDlg->Execute();
- pTabViewShell->SetInFormatDialog(FALSE);
+ pTabViewShell->SetInFormatDialog(false);
if ( nResult == RET_OK )
{
@@ -812,7 +812,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( SFX_STYLE_FAMILY_PARA == eFam )
{
SfxItemSet& rNewSet = pStyleSheet->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate(
bNumFormatChanged, aOldSet, rNewSet ) )
pDoc->InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
@@ -820,11 +820,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
- ULONG nOldFormat = ((const SfxUInt32Item&)aOldSet.
+ sal_uLong nOldFormat = ((const SfxUInt32Item&)aOldSet.
Get( ATTR_VALUE_FORMAT )).GetValue();
- ULONG nNewFormat = ((const SfxUInt32Item&)rNewSet.
+ sal_uLong nNewFormat = ((const SfxUInt32Item&)rNewSet.
Get( ATTR_VALUE_FORMAT )).GetValue();
if ( nNewFormat != nOldFormat )
{
@@ -862,12 +862,12 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
(const SvxNumberInfoItem&)
*(pDocSh->GetItem(SID_ATTR_NUMBERFORMAT_INFO)) );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
pTabViewShell->InvalidateAttribs();
}
aNewData.InitFromStyle( pStyleSheet );
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
}
}
else
@@ -913,7 +913,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
ScModule* pScMod = SC_MOD();
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1005,11 +1005,11 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
rReq.Done();
break;
case SID_NUMBER_INCDEC:
- pTabViewShell->ChangeNumFmtDecimals( TRUE );
+ pTabViewShell->ChangeNumFmtDecimals( sal_True );
rReq.Done();
break;
case SID_NUMBER_DECDEC:
- pTabViewShell->ChangeNumFmtDecimals( FALSE );
+ pTabViewShell->ChangeNumFmtDecimals( false );
rReq.Done();
break;
@@ -1017,7 +1017,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
if ( pReqArgs )
{
const SfxPoolItem* pItem;
- if(pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET)
+ if(pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET)
{
String aCode = ((const SfxStringItem*)pItem)->GetValue();
pTabViewShell->SetNumFmtByStr( aCode );
@@ -1029,7 +1029,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
if ( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, sal_True, &pItem ) == SFX_ITEM_SET )
{
// We have to accomplish this using ApplyAttributes()
// because we also need the language information to be
@@ -1039,7 +1039,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
SfxItemPool* pDocPool = GetViewData()->GetDocument()->GetPool();
SfxItemSet aNewSet( *pDocPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
aNewSet.Put( *pItem );
- pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, TRUE );
+ pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, sal_True );
}
}
break;
@@ -1074,7 +1074,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SfxBindings& rBindings = pViewData->GetBindings();
const SfxItemSet* pSet = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1099,7 +1099,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
if( pSet )
{
const SfxPoolItem* pItem = NULL;
- if( pSet->GetItemState(GetPool().GetWhich(nSlot), TRUE, &pItem ) == SFX_ITEM_SET )
+ if( pSet->GetItemState(GetPool().GetWhich(nSlot), sal_True, &pItem ) == SFX_ITEM_SET )
{
switch ( nSlot )
@@ -1165,7 +1165,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
SfxBindings& rBindings = pViewData->GetBindings();
const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern();
const SfxItemSet* pSet = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxAllItemSet* pNewSet = 0;
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1185,7 +1185,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
case SID_ATTR_CHAR_WEIGHT:
{
// #i78017 establish the same behaviour as in Writer
- BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
@@ -1197,7 +1197,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
FontWeight eWeight = WEIGHT_BOLD;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE );
+ aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() == WEIGHT_BOLD )
eWeight = WEIGHT_NORMAL;
@@ -1205,14 +1205,14 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
aSetItem.PutItemForScriptType( nScript, SvxWeightItem( eWeight, ATTR_FONT_WEIGHT ) );
}
pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() );
- pNewSet->Put( aSetItem.GetItemSet(), FALSE );
+ pNewSet->Put( aSetItem.GetItemSet(), false );
}
break;
case SID_ATTR_CHAR_POSTURE:
{
// #i78017 establish the same behaviour as in Writer
- BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
@@ -1224,7 +1224,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
FontItalic eItalic = ITALIC_NORMAL;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE );
+ aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxPostureItem*)pCore)->GetPosture() == ITALIC_NORMAL )
eItalic = ITALIC_NONE;
@@ -1232,7 +1232,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
aSetItem.PutItemForScriptType( nScript, SvxPostureItem( eItalic, ATTR_FONT_POSTURE ) );
}
pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() );
- pNewSet->Put( aSetItem.GetItemSet(), FALSE );
+ pNewSet->Put( aSetItem.GetItemSet(), false );
}
break;
@@ -1311,12 +1311,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
- if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET)
+ if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET)
{
pHorJustify = (const SvxHorJustifyItem*)pItem;
eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() );
}
- if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET)
+ if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET)
{
pVerJustify = (const SvxVerJustifyItem*)pItem;
eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() );
@@ -1422,7 +1422,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
if ( !pNewAttrs )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -1434,7 +1434,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_ATTR_ALIGN_LINEBREAK: // ohne Parameter als Toggle
{
const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern();
- BOOL bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue();
+ sal_Bool bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue();
SfxBoolItem aBreakItem( ATTR_LINEBREAK, !bOld );
pTabViewShell->ApplyAttr( aBreakItem );
@@ -1463,7 +1463,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
}
else
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -1484,13 +1484,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_ATTR_CHAR_FONTHEIGHT:
{
// #i78017 establish the same behaviour as in Writer
- BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScript = pTabViewShell->GetSelectionScriptType();
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
- USHORT nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
aSetItem.PutItemForScriptType( nScript, pNewAttrs->Get( nWhich ) );
pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() );
@@ -1518,13 +1518,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
pDefLine->SetInWidth ( pLine->GetInWidth() );
pDefLine->SetDistance( pLine->GetDistance() );
pDefLine->SetStyle( pLine->GetStyle( ) );
- pTabViewShell->SetSelectionFrameLines( pDefLine, FALSE );
+ pTabViewShell->SetSelectionFrameLines( pDefLine, false );
}
else
{
pTabViewShell->SetDefaultFrameLine( pLine );
pTabViewShell->GetDefaultFrameLine()->SetColor( COL_BLACK );
- pTabViewShell->SetSelectionFrameLines( pLine, FALSE );
+ pTabViewShell->SetSelectionFrameLines( pLine, false );
}
}
else
@@ -1532,7 +1532,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
Color aColorBlack( COL_BLACK );
SvxBorderLine aDefLine( &aColorBlack, 20, 0, 0 );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
- pTabViewShell->SetSelectionFrameLines( NULL, FALSE );
+ pTabViewShell->SetSelectionFrameLines( NULL, false );
}
}
break;
@@ -1548,13 +1548,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
if ( pDefLine )
{
pDefLine->SetColor( rColor );
- pTabViewShell->SetSelectionFrameLines( pDefLine, TRUE );
+ pTabViewShell->SetSelectionFrameLines( pDefLine, sal_True );
}
else
{
SvxBorderLine aDefLine( &rColor, 20, 0, 0 );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
- pTabViewShell->SetSelectionFrameLines( &aDefLine, FALSE );
+ pTabViewShell->SetSelectionFrameLines( &aDefLine, false );
}
}
break;
@@ -1582,7 +1582,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
// Border-Items vom Controller auswerten:
const SfxPoolItem* pItem = 0;
- if ( pNewAttrs->GetItemState( ATTR_BORDER, TRUE, &pItem )
+ if ( pNewAttrs->GetItemState( ATTR_BORDER, sal_True, &pItem )
== SFX_ITEM_SET )
{
// The SvxFrameToolBoxControl toolbox controller uses a default
@@ -1603,7 +1603,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
rReq.AppendItem( aBoxItem );
}
- if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, TRUE, &pItem )
+ if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, sal_True, &pItem )
== SFX_ITEM_SET )
{
SvxBoxInfoItem aBoxInfoItem( *(const SvxBoxInfoItem*)pItem );
@@ -1684,12 +1684,12 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
const SvxBorderLine* pLine = pTabViewShell->GetDefaultFrameLine();
const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rAttrSet.Get( ATTR_BACKGROUND );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
- rSet.Put( rAttrSet, FALSE );
+ rSet.Put( rAttrSet, false );
// choose font info according to selection script type
- BYTE nScript = 0; // GetSelectionScriptType never returns 0
+ sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0
if ( rSet.GetItemState( ATTR_FONT ) != SFX_ITEM_UNKNOWN )
{
if (!nScript) nScript = pTabViewShell->GetSelectionScriptType();
@@ -1731,10 +1731,10 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- rSet.Put( rAttrSet, FALSE ); // ItemStates mitkopieren
+ rSet.Put( rAttrSet, false ); // ItemStates mitkopieren
// choose font info according to selection script type
- BYTE nScript = 0; // GetSelectionScriptType never returns 0
+ sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0
if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SFX_ITEM_UNKNOWN )
{
if (!nScript) nScript = pTabViewShell->GetSelectionScriptType();
@@ -1755,7 +1755,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
// Unterstreichung
//------------------------
- eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, TRUE );
+ eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, sal_True );
if ( eState == SFX_ITEM_DONTCARE )
{
rSet.InvalidateItem( SID_ULINE_VAL_NONE );
@@ -1767,7 +1767,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
{
FontUnderline eUnderline = ((const SvxUnderlineItem&)
rAttrSet.Get(ATTR_FONT_UNDERLINE)).GetLineStyle();
- USHORT nId = SID_ULINE_VAL_NONE;
+ sal_uInt16 nId = SID_ULINE_VAL_NONE;
switch (eUnderline)
{
case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break;
@@ -1776,7 +1776,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
default:
break;
}
- rSet.Put( SfxBoolItem( nId, TRUE ) );
+ rSet.Put( SfxBoolItem( nId, sal_True ) );
}
//------------------------
@@ -1786,11 +1786,11 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
const SvxHorJustifyItem* pHorJustify = NULL;
const SvxVerJustifyItem* pVerJustify = NULL;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
- USHORT nWhich = 0;
- BOOL bJustifyStd = FALSE;
- SfxBoolItem aBoolItem ( 0, TRUE );
+ sal_uInt16 nWhich = 0;
+ sal_Bool bJustifyStd = false;
+ SfxBoolItem aBoolItem ( 0, sal_True );
- eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, TRUE,
+ eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True,
(const SfxPoolItem**)&pHorJustify );
switch ( eState )
{
@@ -1819,7 +1819,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
case SVX_HOR_JUSTIFY_REPEAT:
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
}
@@ -1833,7 +1833,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
break;
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
@@ -1844,12 +1844,12 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
}
else if ( bJustifyStd )
{
- aBoolItem.SetValue( FALSE );
+ aBoolItem.SetValue( false );
aBoolItem.SetWhich( SID_ALIGNLEFT ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNRIGHT ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNCENTERHOR ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNBLOCK ); rSet.Put( aBoolItem );
- bJustifyStd = FALSE;
+ bJustifyStd = false;
}
//------------------------
@@ -1857,9 +1857,9 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
//------------------------
nWhich = 0;
- aBoolItem.SetValue( TRUE );
+ aBoolItem.SetValue( sal_True );
- eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, TRUE,
+ eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, sal_True,
(const SfxPoolItem**)&pVerJustify );
switch ( eState )
@@ -1884,7 +1884,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
case SVX_VER_JUSTIFY_STANDARD:
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
}
@@ -1897,7 +1897,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
break;
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
@@ -1908,7 +1908,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
}
else if ( bJustifyStd )
{
- aBoolItem.SetValue( FALSE );
+ aBoolItem.SetValue( false );
aBoolItem.SetWhich( SID_ALIGNTOP ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNBOTTOM ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNCENTERVER ); rSet.Put( aBoolItem );
@@ -1939,7 +1939,7 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SvxCellHorJustify eHAlign = SVX_HOR_JUSTIFY_STANDARD;
bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SFX_ITEM_DONTCARE;
@@ -1990,7 +1990,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
short nType = GetCurrentNumberFormatType();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -2002,7 +2002,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SFX_ITEM_DONTCARE )
{
- ULONG nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get(
+ sal_uLong nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get(
ATTR_VALUE_FORMAT )).GetValue();
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
@@ -2045,13 +2045,13 @@ void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq )
pTabViewShell->UpdateInputHandler();
}
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
{
- BOOL bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM);
+ sal_Bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM);
ScPatternAttr aAttr( GetViewData()->GetDocument()->GetPool() );
SfxItemSet& rItemSet = aAttr.GetItemSet();
rItemSet.Put( SfxBoolItem( ATTR_STACKED, bVert ) );
@@ -2077,15 +2077,15 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- BOOL bVertDontCare =
+ sal_Bool bVertDontCare =
(rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SFX_ITEM_DONTCARE) ||
(rAttrSet.GetItemState( ATTR_STACKED ) == SFX_ITEM_DONTCARE);
- BOOL bLeftRight = !bVertDontCare &&
+ sal_Bool bLeftRight = !bVertDontCare &&
!((const SfxBoolItem&) rAttrSet.Get( ATTR_STACKED )).GetValue();
- BOOL bTopBottom = !bVertDontCare && !bLeftRight &&
+ sal_Bool bTopBottom = !bVertDontCare && !bLeftRight &&
((const SfxBoolItem&) rAttrSet.Get( ATTR_VERTICAL_ASIAN )).GetValue();
- BOOL bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE);
+ sal_Bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE);
EEHorizontalTextDirection eBidiDir = EE_HTEXTDIR_DEFAULT;
if ( !bBidiDontCare )
{
@@ -2101,11 +2101,11 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet )
}
SvtLanguageOptions aLangOpt;
- BOOL bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
- BOOL bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
+ sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
+ sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch( nWhich )
@@ -2155,7 +2155,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq )
}
else
{
- BOOL bLock = FALSE;
+ sal_Bool bLock = false;
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue();
@@ -2166,7 +2166,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq )
pView->Unmark();
ScDocument* pBrushDoc = new ScDocument( SCDOCMODE_CLIP );
- pView->CopyToClip( pBrushDoc, FALSE, TRUE );
+ pView->CopyToClip( pBrushDoc, false, sal_True );
pView->SetBrushDocument( pBrushDoc, bLock );
}
}
diff --git a/sc/source/ui/view/galwrap.cxx b/sc/source/ui/view/galwrap.cxx
index 8dde5477814e..c781841b52dd 100644
--- a/sc/source/ui/view/galwrap.cxx
+++ b/sc/source/ui/view/galwrap.cxx
@@ -47,12 +47,12 @@ Graphic GalleryGetGraphic()
return pGal->GetGraphic();
}
-USHORT GallerySGA_FORMAT_GRAPHIC()
+sal_uInt16 GallerySGA_FORMAT_GRAPHIC()
{
return SGA_FORMAT_GRAPHIC;
}
-BOOL GalleryIsLinkage()
+sal_Bool GalleryIsLinkage()
{
GalleryExplorer* pGal = SVX_GALLERY();
DBG_ASSERT( pGal, "Wo ist die Gallery?" );
diff --git a/sc/source/ui/view/gridmerg.cxx b/sc/source/ui/view/gridmerg.cxx
index 31dba191b2fd..97821e406c96 100644
--- a/sc/source/ui/view/gridmerg.cxx
+++ b/sc/source/ui/view/gridmerg.cxx
@@ -42,7 +42,7 @@ ScGridMerger::ScGridMerger( OutputDevice* pOutDev, long nOnePixelX, long nOnePix
nOneX( nOnePixelX ),
nOneY( nOnePixelY ),
nCount( 0 ),
- bVertical( FALSE )
+ bVertical( false )
{
// optimize (DrawGrid) only for pixel MapMode,
// to avoid rounding errors
@@ -105,7 +105,7 @@ void ScGridMerger::AddHorLine( long nX1, long nX2, long nY )
if ( bVertical )
{
Flush();
- bVertical = FALSE;
+ bVertical = false;
}
AddLine( nX1, nX2, nY );
}
@@ -120,7 +120,7 @@ void ScGridMerger::AddVerLine( long nX, long nY1, long nY2 )
if ( !bVertical )
{
Flush();
- bVertical = TRUE;
+ bVertical = sal_True;
}
AddLine( nY1, nY2, nX );
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 47a280dc5dad..7e06db06676b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -139,9 +139,9 @@ using namespace com::sun::star;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
-const BYTE SC_NESTEDBUTTON_NONE = 0;
-const BYTE SC_NESTEDBUTTON_DOWN = 1;
-const BYTE SC_NESTEDBUTTON_UP = 2;
+const sal_uInt8 SC_NESTEDBUTTON_NONE = 0;
+const sal_uInt8 SC_NESTEDBUTTON_DOWN = 1;
+const sal_uInt8 SC_NESTEDBUTTON_UP = 2;
#define SC_AUTOFILTER_ALL 0
#define SC_AUTOFILTER_TOP10 1
@@ -159,8 +159,8 @@ enum ScFilterBoxMode
};
extern SfxViewShell* pScActiveViewShell; // global.cxx
-extern USHORT nScClickMouseModifier; // global.cxx
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScClickMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
#define SC_FILTERLISTBOX_LINES 12
@@ -184,12 +184,12 @@ private:
ScGridWindow* pGridWin;
SCCOL nCol;
SCROW nRow;
- BOOL bButtonDown;
- BOOL bInit;
- BOOL bCancelled;
- BOOL bInSelect;
+ sal_Bool bButtonDown;
+ sal_Bool bInit;
+ sal_Bool bCancelled;
+ sal_Bool bInSelect;
bool mbListHasDates;
- ULONG nSel;
+ sal_uLong nSel;
ScFilterBoxMode eMode;
protected:
@@ -207,11 +207,11 @@ public:
SCCOL GetCol() const { return nCol; }
SCROW GetRow() const { return nRow; }
ScFilterBoxMode GetMode() const { return eMode; }
- BOOL IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); }
+ sal_Bool IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); }
void EndInit();
- BOOL IsInInit() const { return bInit; }
- void SetCancelled() { bCancelled = TRUE; }
- BOOL IsInSelect() const { return bInSelect; }
+ sal_Bool IsInInit() const { return bInit; }
+ void SetCancelled() { bCancelled = sal_True; }
+ sal_Bool IsInSelect() const { return bInSelect; }
void SetListHasDates(bool b) { mbListHasDates = b; }
bool HasDates() const { return mbListHasDates; }
};
@@ -225,10 +225,10 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid,
pGridWin( pGrid ),
nCol( nNewCol ),
nRow( nNewRow ),
- bButtonDown( FALSE ),
- bInit( TRUE ),
- bCancelled( FALSE ),
- bInSelect( FALSE ),
+ bButtonDown( false ),
+ bInit( sal_True ),
+ bCancelled( false ),
+ bInSelect( false ),
mbListHasDates(false),
nSel( 0 ),
eMode( eNewMode )
@@ -243,13 +243,13 @@ ScFilterListBox::~ScFilterListBox()
void ScFilterListBox::EndInit()
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nSel = 0;
else
nSel = nPos;
- bInit = FALSE;
+ bInit = false;
}
void ScFilterListBox::LoseFocus()
@@ -270,7 +270,7 @@ long ScFilterListBox::PreNotify( NotifyEvent& rNEvt )
KeyCode aCode = aKeyEvt.GetKeyCode();
if ( !aCode.GetModifier() ) // ohne alle Modifiers
{
- USHORT nKey = aCode.GetCode();
+ sal_uInt16 nKey = aCode.GetCode();
if ( nKey == KEY_RETURN )
{
SelectHdl(); // auswaehlen
@@ -297,16 +297,16 @@ void ScFilterListBox::SelectHdl()
{
if ( !IsTravelSelect() && !bInit && !bCancelled )
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
{
nSel = nPos;
if (!bButtonDown)
{
// #i81298# set bInSelect flag, so the box isn't deleted from modifications within FilterSelect
- bInSelect = TRUE;
+ bInSelect = sal_True;
pGridWin->FilterSelect( nSel );
- bInSelect = FALSE;
+ bInSelect = false;
}
}
}
@@ -341,7 +341,7 @@ Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow()
// ============================================================================
-BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
+sal_Bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
{
// wenn es ein editierbarer Bereich ist, und rechts unten eine Matrix-Zelle
// mit Origin links oben liegt, enthaelt der Bereich genau die Matrix.
@@ -349,7 +349,7 @@ BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
if ( !pDoc->IsBlockEditable( rRange.aStart.Tab(), rRange.aStart.Col(),rRange.aStart.Row(),
rRange.aEnd.Col(),rRange.aEnd.Row() ) )
- return FALSE;
+ return false;
ScAddress aPos;
const ScBaseCell* pCell = pDoc->GetCell( rRange.aEnd );
@@ -379,24 +379,24 @@ void lcl_UnLockComment( ScDrawView* pView, SdrPageView* pPV, SdrModel* pDrDoc, c
sal_Bool lcl_GetHyperlinkCell(ScDocument* pDoc, SCCOL& rPosX, SCROW& rPosY, SCTAB nTab, ScBaseCell*& rpCell )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
do
{
pDoc->GetCell( rPosX, rPosY, nTab, rpCell );
if ( !rpCell || rpCell->GetCellType() == CELLTYPE_NOTE )
{
if ( rPosX <= 0 )
- return FALSE; // alles leer bis links
+ return false; // alles leer bis links
else
--rPosX; // weitersuchen
}
else if ( rpCell->GetCellType() == CELLTYPE_EDIT)
- bFound = TRUE;
+ bFound = sal_True;
else if (rpCell->GetCellType() == CELLTYPE_FORMULA &&
static_cast<ScFormulaCell*>(rpCell)->IsHyperLinkCell())
- bFound = TRUE;
+ bFound = sal_True;
else
- return FALSE; // andere Zelle
+ return false; // andere Zelle
}
while ( !bFound );
@@ -425,31 +425,31 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
mpDPFieldPopup(NULL),
mpFilterButton(NULL),
nCursorHideCount( 0 ),
- bMarking( FALSE ),
+ bMarking( false ),
nButtonDown( 0 ),
- bEEMouse( FALSE ),
+ bEEMouse( false ),
nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ),
- bDPMouse( FALSE ),
- bRFMouse( FALSE ),
+ bDPMouse( false ),
+ bRFMouse( false ),
nPagebreakMouse( SC_PD_NONE ),
- bPagebreakDrawn( FALSE ),
+ bPagebreakDrawn( false ),
nPageScript( 0 ),
- bDragRect( FALSE ),
+ bDragRect( false ),
nDragStartX( -1 ),
nDragStartY( -1 ),
nDragEndX( -1 ),
nDragEndY( -1 ),
meDragInsertMode( INS_NONE ),
nCurrentPointer( 0 ),
- bIsInScroll( FALSE ),
- bIsInPaint( FALSE ),
+ bIsInScroll( false ),
+ bIsInPaint( false ),
aComboButton( this ),
aCurMousePos( 0,0 ),
nPaintCount( 0 ),
- bNeedsRepaint( FALSE ),
- bAutoMarkVisible( FALSE ),
- bListValButton( FALSE )
+ bNeedsRepaint( false ),
+ bAutoMarkVisible( false ),
+ bListValButton( false )
{
switch(eWhich)
{
@@ -483,7 +483,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
SetUniqueId( HID_SC_WIN_GRIDWIN );
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
- EnableRTL( FALSE );
+ EnableRTL( false );
}
ScGridWindow::~ScGridWindow()
@@ -540,7 +540,7 @@ IMPL_LINK( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo*, pInfo )
return 0;
}
-void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr )
+void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr )
{
//! gridwin2 ?
@@ -550,13 +550,13 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti
if ( pDPObj && nCol > 0 )
{
// look for the dimension header left of the drop-down arrow
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE )
{
ScDPSaveData aSaveData( *pDPObj->GetSaveData() );
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -573,7 +573,7 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSaveData( aSaveData );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -587,10 +587,10 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
delete pFilterBox;
delete pFilterFloat;
- USHORT i;
+ sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -629,13 +629,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
TypedScStrCollection aStrings( 128, 128 );
// get list box entries and selection
- BOOL bHasCurrentPage = FALSE;
+ sal_Bool bHasCurrentPage = false;
String aCurrentPage;
ScDPObject* pDPObj = pDoc->GetDPAtCursor(nCol, nRow, nTab);
if ( pDPObj && nCol > 0 )
{
// look for the dimension header left of the drop-down arrow
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE )
{
@@ -644,7 +644,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
// get current page from SaveData
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( pSaveData && !bIsDataLayout )
{
@@ -652,7 +652,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
if ( pDim && pDim->HasCurrentPage() )
{
aCurrentPage = pDim->GetCurrentPage();
- bHasCurrentPage = TRUE;
+ bHasCurrentPage = sal_True;
}
}
}
@@ -660,7 +660,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
// include all entry widths for the size of the drop-down
long nMaxText = 0;
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i=0; i<nCount; i++)
{
TypedStrData* pData = aStrings[i];
@@ -691,13 +691,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show must be called before SetUpdateMode
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(false);
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS);
// fill the list box
- BOOL bWait = ( nCount > 100 );
+ sal_Bool bWait = ( nCount > 100 );
if (bWait)
EnterWait();
@@ -710,9 +710,9 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
if (bWait)
LeaveWait();
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
- USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
if (bHasCurrentPage)
nSelPos = pFilterBox->GetEntryPos( aCurrentPage );
@@ -763,7 +763,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -803,7 +803,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
Size aSize( nSizeX, nHeight );
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!!
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(false);
// SetOutputSizePixel/StartPopupMode erst unten, wenn die Groesse feststeht
@@ -854,10 +854,10 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS );
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
pFilterBox->GrabFocus();
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if (aCurrent.Len())
{
nPos = pFilterBox->GetEntryPos( aCurrent );
@@ -876,15 +876,15 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
CaptureMouse();
}
-void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
+void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect )
{
delete pFilterBox;
delete pFilterFloat;
- USHORT i;
+ sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -921,15 +921,15 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
// SetSize spaeter
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = false;
TypedScStrCollection aStrings( 128, 128 );
if ( bDataSelect ) // Auswahl-Liste
{
// Liste fuellen
- aStrings.SetCaseSensitive( TRUE );
+ aStrings.SetCaseSensitive( sal_True );
pDoc->GetDataEntries( nCol, nRow, nTab, aStrings );
if ( aStrings.GetCount() == 0 )
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else // AutoFilter
{
@@ -941,8 +941,8 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
long nMaxText = 0;
// default entries
- static const USHORT nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY };
- const USHORT nDefCount = SAL_N_ELEMENTS(nDefIDs);
+ static const sal_uInt16 nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY };
+ const sal_uInt16 nDefCount = SAL_N_ELEMENTS(nDefIDs);
for (i=0; i<nDefCount; i++)
{
String aEntry( (ScResId) nDefIDs[i] );
@@ -960,7 +960,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
// check widths of numerical entries (string entries are not included)
// so all numbers are completely visible
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i=0; i<nCount; i++)
{
TypedStrData* pData = aStrings[i];
@@ -998,14 +998,14 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!!
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(false);
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS);
// Listbox fuellen
- USHORT nCount = aStrings.GetCount();
- BOOL bWait = ( nCount > 100 );
+ sal_uInt16 nCount = aStrings.GetCount();
+ sal_Bool bWait = ( nCount > 100 );
if (bWait)
EnterWait();
@@ -1016,10 +1016,10 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
if (bWait)
LeaveWait();
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
}
- USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
if (!bDataSelect) // AutoFilter: aktiven Eintrag selektieren
{
@@ -1029,7 +1029,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
ScQueryParam aParam;
pDBData->GetQueryParam( aParam ); // kann nur MAXQUERY Eintraege ergeben
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
for (SCSIZE j=0; j<MAXQUERY && bValid; j++) // bisherige Filter-Einstellungen
if (aParam.GetEntry(j).bDoQuery)
{
@@ -1038,7 +1038,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
ScQueryEntry& rEntry = aParam.GetEntry(j);
if (j>0)
if (rEntry.eConnect != SC_AND)
- bValid = FALSE;
+ bValid = false;
if (rEntry.nField == nCol)
{
if (rEntry.eOp == SC_EQUAL)
@@ -1064,7 +1064,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
else
{
- ULONG nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
+ sal_uLong nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
nCol, nRow, nTab, ATTR_VALIDDATA ))->GetValue();
if ( nIndex )
{
@@ -1085,13 +1085,13 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
bool bSortList = ( pData->GetListType() == ValidListType::SORTEDASCENDING);
if ( bSortList )
{
- USHORT nStrIndex;
+ sal_uInt16 nStrIndex;
if (aStrings.Search(pNew,nStrIndex))
nSelPos = nStrIndex;
}
else
{
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i = 0; ((i < nCount) && ( LISTBOX_ENTRY_NOTFOUND == nSelPos)); i++)
{
if ( aStrings.Compare(aStrings[i], pNew)==0 )
@@ -1141,9 +1141,9 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
}
}
-void ScGridWindow::FilterSelect( ULONG nSel )
+void ScGridWindow::FilterSelect( sal_uLong nSel )
{
- String aString = pFilterBox->GetEntry( static_cast< USHORT >( nSel ) );
+ String aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) );
SCCOL nCol = pFilterBox->GetCol();
SCROW nRow = pFilterBox->GetRow();
@@ -1184,7 +1184,7 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr )
}
}
-void ScGridWindow::ExecFilter( ULONG nSel,
+void ScGridWindow::ExecFilter( sal_uLong nSel,
SCCOL nCol, SCROW nRow,
const String& aValue, bool bCheckForDates )
{
@@ -1211,13 +1211,13 @@ void ScGridWindow::ExecFilter( ULONG nSel,
}
else
{
- BOOL bDeleteOld = FALSE;
+ sal_Bool bDeleteOld = false;
SCSIZE nQueryPos = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if (!aParam.bInplace)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
if (aParam.bRegExp)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
for (SCSIZE i=0; i<MAXQUERY && !bDeleteOld; i++) // bisherige Filter-Einstellungen
if (aParam.GetEntry(i).bDoQuery)
{
@@ -1226,14 +1226,14 @@ void ScGridWindow::ExecFilter( ULONG nSel,
ScQueryEntry& rEntry = aParam.GetEntry(i);
if (i>0)
if (rEntry.eConnect != SC_AND)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
if (rEntry.nField == nCol)
{
if (bFound) // diese Spalte zweimal?
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
nQueryPos = i;
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
nQueryPos = i + 1;
@@ -1245,8 +1245,8 @@ void ScGridWindow::ExecFilter( ULONG nSel,
for (SCSIZE i=0; i<nEC; i++)
aParam.GetEntry(i).Clear();
nQueryPos = 0;
- aParam.bInplace = TRUE;
- aParam.bRegExp = FALSE;
+ aParam.bInplace = sal_True;
+ aParam.bRegExp = false;
}
if ( nQueryPos < MAXQUERY || SC_AUTOFILTER_ALL == nSel ) // loeschen geht immer
@@ -1255,8 +1255,8 @@ void ScGridWindow::ExecFilter( ULONG nSel,
{
ScQueryEntry& rNewEntry = aParam.GetEntry(nQueryPos);
- rNewEntry.bDoQuery = TRUE;
- rNewEntry.bQueryByString = TRUE;
+ rNewEntry.bDoQuery = sal_True;
+ rNewEntry.bQueryByString = sal_True;
rNewEntry.nField = nCol;
rNewEntry.bQueryByDate = bCheckForDates;
if ( nSel == SC_AUTOFILTER_TOP10 )
@@ -1267,7 +1267,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
else if (nSel == SC_AUTOFILTER_EMPTY)
{
rNewEntry.pStr->Erase();
- rNewEntry.bQueryByString = FALSE;
+ rNewEntry.bQueryByString = false;
rNewEntry.eOp = SC_EQUAL;
rNewEntry.nVal = SC_EMPTYFIELDS;
@@ -1275,7 +1275,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
else if (nSel == SC_AUTOFILTER_NOTEMPTY)
{
rNewEntry.pStr->Erase();
- rNewEntry.bQueryByString = FALSE;
+ rNewEntry.bQueryByString = false;
rNewEntry.eOp = SC_EQUAL;
rNewEntry.nVal = SC_NONEMPTYFIELDS;
}
@@ -1301,7 +1301,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
}
aParam.bUseDynamicRange = true;
- pViewData->GetView()->Query( aParam, NULL, TRUE );
+ pViewData->GetView()->Query( aParam, NULL, true );
pDBData->SetQueryParam( aParam ); // speichern
}
else // "Zuviele Bedingungen"
@@ -1335,7 +1335,7 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
rDestWin.nRFIndex = nRFIndex;
rDestWin.nRFAddX = nRFAddX;
rDestWin.nRFAddY = nRFAddY;
- bRFMouse = FALSE;
+ bRFMouse = false;
}
if (nPagebreakMouse)
@@ -1349,26 +1349,26 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
}
}
-BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
+sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
{
// MouseEvent buttons must only be checked if bAction==TRUE
// to allow changing the mouse pointer in MouseMove,
// but not start AutoFill with right button (#74229#).
- // with bAction==TRUE, SetFillMode / SetDragMode is called
+ // with bAction==sal_True, SetFillMode / SetDragMode is called
if ( bAction && !rMEvt.IsLeft() )
- return FALSE;
+ return false;
- BOOL bNewPointer = FALSE;
+ sal_Bool bNewPointer = false;
SfxInPlaceClient* pClient = pViewData->GetViewShell()->GetIPClient();
- BOOL bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
if ( pViewData->IsActive() && !bOleActive )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// Auto-Fill
@@ -1397,7 +1397,7 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
// where the Marking flag is set and MarkToSimple won't work anymore.
pViewData->GetMarkData().MarkToSimple();
}
- bNewPointer = TRUE;
+ bNewPointer = sal_True;
}
}
}
@@ -1418,21 +1418,21 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
aStartPos.X() += 2;
aEndPos.X() += 2;
}
- BOOL bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
+ sal_Bool bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
aMousePos.Y() >= aStartPos.Y()-3 && aMousePos.Y() <= aStartPos.Y()+1 );
- BOOL bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
+ sal_Bool bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
aMousePos.Y() >= aEndPos.Y()-3 && aMousePos.Y() <= aEndPos.Y()+1 );
if ( bTop || bBottom )
{
SetPointer( Pointer( POINTER_CROSS ) );
if (bAction)
{
- BYTE nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB;
+ sal_uInt8 nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB;
pViewData->SetDragMode(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), nMode );
}
- bNewPointer = TRUE;
+ bNewPointer = sal_True;
}
}
}
@@ -1490,7 +1490,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
HideNoteMarker(); // Notiz-Anzeige
- bEEMouse = FALSE;
+ bEEMouse = false;
ScModule* pScMod = SC_MOD();
if (pScMod->IsModalMode(pViewData->GetSfxDocShell()))
@@ -1502,11 +1502,11 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
pScActiveViewShell = pViewData->GetViewShell(); // falls auf Link geklickt wird
nScClickMouseModifier = rMEvt.GetModifier(); // um Control-Klick immer zu erkennen
- BOOL bDetective = pViewData->GetViewShell()->IsAuditShell();
- BOOL bRefMode = pViewData->IsRefMode(); // Referenz angefangen
- BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
- BOOL bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE
- BOOL bDouble = (rMEvt.GetClicks() == 2);
+ sal_Bool bDetective = pViewData->GetViewShell()->IsAuditShell();
+ sal_Bool bRefMode = pViewData->IsRefMode(); // Referenz angefangen
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE
+ sal_Bool bDouble = (rMEvt.GetClicks() == 2);
// DeactivateIP passiert nur noch bei MarkListHasChanged
@@ -1586,7 +1586,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
GrabFocus();
pScMod->SetInputMode( SC_INPUT_TABLE );
- bEEMouse = TRUE;
+ bEEMouse = sal_True;
bEditMode = pEditView->MouseButtonDown( rMEvt );
return;
}
@@ -1607,7 +1607,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
if ( HitRangeFinder( rMEvt.GetPosPixel(), bRFSize, &nRFIndex, &nRFAddX, &nRFAddY ) )
{
- bRFMouse = TRUE; // die anderen Variablen sind oben initialisiert
+ bRFMouse = sal_True; // die anderen Variablen sind oben initialisiert
if ( pViewData->GetActivePart() != eWhich )
pViewData->GetView()->ActivatePart( eWhich ); //! schon oben immer ???
@@ -1616,7 +1616,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- BOOL bCrossPointer = TestMouse( rMEvt, TRUE );
+ sal_Bool bCrossPointer = TestMouse( rMEvt, sal_True );
if ( bCrossPointer )
{
if ( bDouble )
@@ -1631,9 +1631,9 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
&nPagebreakBreak, &nPagebreakPrev );
if (nPagebreakMouse)
{
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = false;
StartTracking();
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, false );
return;
}
}
@@ -1645,7 +1645,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- pViewData->GetViewShell()->SetDrawShell( FALSE ); // kein Draw-Objekt selektiert
+ pViewData->GetViewShell()->SetDrawShell( false ); // kein Draw-Objekt selektiert
// TestMouse schon oben passiert
}
@@ -1684,7 +1684,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
Rectangle aButtonRect = GetListValButtonRect( aListValPos );
if ( aButtonRect.IsInside( aPos ) )
{
- DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), TRUE );
+ DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), sal_True );
nMouseStatus = SC_GM_FILTER; // not set in DoAutoFilterMenue for bDataSelect
CaptureMouse();
@@ -1725,7 +1725,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
// Links in Edit-Zellen
//
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && rMEvt.IsLeft() &&
GetEditUrl(rMEvt.GetPosPixel()) ) // Klick auf Link: Cursor nicht bewegen
{
@@ -1755,7 +1755,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
ReleaseMouse();
StartTracking();
}
- pViewData->GetMarkData().SetMarking(TRUE);
+ pViewData->GetMarkData().SetMarking(sal_True);
return;
}
}
@@ -1783,7 +1783,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
nMouseStatus = SC_GM_NONE;
// Selection-Engine: Markieren abbrechen
pViewData->GetView()->GetSelEngine()->Reset();
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(false);
if (pViewData->IsAnyFillMode())
{
pViewData->GetView()->StopRefMode();
@@ -1840,7 +1840,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pViewData->GetView()->InvalidateAttribs();
rBindings.Invalidate( SID_HYPERLINK_GETLINK );
- bEEMouse = FALSE;
+ bEEMouse = false;
return;
}
@@ -1852,8 +1852,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // Range wieder richtigherum
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // Range wieder richtigherum
+ bRFMouse = false;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
return;
@@ -1861,7 +1861,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, TRUE );
+ PagebreakMove( rMEvt, sal_True );
nPagebreakMouse = SC_PD_NONE;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
@@ -1870,7 +1870,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nMouseStatus == SC_GM_WATERUNDO) // Undo im Giesskannenmodus
{
- SfxUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
if ( pMgr->GetUndoActionCount() && pMgr->GetUndoActionId() == STR_UNDO_APPLYCELLSTYLE )
pMgr->Undo();
else
@@ -1881,7 +1881,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (DrawMouseButtonUp(rMEvt)) // includes format paint brush handling for drawing objects
return;
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(false);
SetPointer( Pointer( POINTER_ARROW ) );
@@ -1895,16 +1895,16 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
SCROW nEndRow;
pViewData->GetFillData( nStartCol, nStartRow, nEndCol, nEndRow );
ScRange aDelRange;
- BOOL bIsDel = pViewData->GetDelMark( aDelRange );
+ sal_Bool bIsDel = pViewData->GetDelMark( aDelRange );
ScViewFunc* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE ); // #i5819# don't use AutoFill anchor flag for selection
+ pView->GetFunctionSet()->SetAnchorFlag( false ); // #i5819# don't use AutoFill anchor flag for selection
if ( bIsDel )
{
- pView->MarkRange( aDelRange, FALSE );
+ pView->MarkRange( aDelRange, false );
pView->DeleteContents( IDF_CONTENTS );
SCTAB nTab = pViewData->GetTabNo();
ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
@@ -1914,7 +1914,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
aBlockRange.aEnd.SetCol( aDelRange.aStart.Col() - 1 );
else
aBlockRange.aEnd.SetRow( aDelRange.aStart.Row() - 1 );
- pView->MarkRange( aBlockRange, FALSE );
+ pView->MarkRange( aBlockRange, false );
}
}
else
@@ -1936,11 +1936,11 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( false );
if ( aEndPos != aBlockRange.aEnd )
{
- pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, FALSE );
+ pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, false );
pViewData->GetView()->MarkRange( ScRange( aBlockRange.aStart, aEndPos ) );
}
}
@@ -1950,11 +1950,11 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( false );
pViewData->GetDocShell()->UpdateOle(pViewData);
}
- BOOL bRefMode = pViewData->IsRefMode();
+ sal_Bool bRefMode = pViewData->IsRefMode();
if (bRefMode)
pScMod->EndReference();
@@ -1990,7 +1990,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pStyleSheet->GetName() );
ScPrintFunc( pViewData->GetDocShell(),
- pViewData->GetViewShell()->GetPrinter(TRUE),
+ pViewData->GetViewShell()->GetPrinter(sal_True),
pViewData->GetTabNo() ).UpdatePages();
rBindings.Invalidate( SID_STATUS_PAGESTYLE );
@@ -2016,7 +2016,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// double click (only left button)
//
- BOOL bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
+ sal_Bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
if ( bDouble && !bRefMode && nMouseStatus == SC_GM_DBLDOWN && !pScMod->IsRefDialogOpen() )
{
// data pilot table
@@ -2037,7 +2037,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( ( aData.Flags & sheet::MemberResultFlags::HASMEMBER ) &&
! ( aData.Flags & sheet::MemberResultFlags::SUBTOTAL ) )
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
if ( pView->HasSelectionForDrillDown( nDummy ) )
{
// execute slot to show dialog
@@ -2049,7 +2049,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScDPObject aNewObj( *pDPObj );
pDPObj->ToggleDetails( aData, &aNewObj );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -2103,7 +2103,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// Links in edit cells
//
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && !bRefMode && !bDouble && nMouseStatus == SC_GM_URLDOWN )
{
// beim ButtonUp nur ausfuehren, wenn ButtonDown auch ueber einer URL war
@@ -2146,14 +2146,14 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
//
// SelMouseButtonDown is called only for left button, but SelMouseButtonUp would return
- // TRUE for any call, so IsLeft must be checked here, too.
+ // sal_True for any call, so IsLeft must be checked here, too.
if ( rMEvt.IsLeft() && pViewData->GetView()->GetSelEngine()->SelMouseButtonUp( rMEvt ) )
{
pViewData->GetView()->SelectionChanged();
SfxDispatcher* pDisp = pViewData->GetViewShell()->GetDispatcher();
- BOOL bFormulaMode = pScMod->IsFormulaMode();
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode();
DBG_ASSERT( pDisp || bFormulaMode, "Cursor auf nicht aktiver View bewegen ?" );
// #i14927# execute SID_CURRENTCELL (for macro recording) only if there is no
@@ -2225,7 +2225,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bEEMouse && nButtonDown && !rMEvt.GetButtons())
{
- bEEMouse = FALSE;
+ bEEMouse = false;
nButtonDown = 0;
nMouseStatus = SC_GM_NONE;
return;
@@ -2267,7 +2267,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
}
}
- BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
if (bEEMouse && pViewData->HasEditView( eWhich ))
{
@@ -2287,19 +2287,19 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, FALSE );
+ RFMouseMove( rMEvt, false );
return;
}
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, false );
return;
}
// anderen Mauszeiger anzeigen?
- BOOL bEditMode = pViewData->HasEditView(eWhich);
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich);
//! Testen ob RefMode-Dragging !!!
if ( bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo()) )
@@ -2320,7 +2320,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
nPosY >= (SCsROW) nEditRow && nPosY <= (SCsROW) nEndRow )
{
// Field can only be URL field
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && !nButtonDown && pEditView && pEditView->GetFieldUnderMousePointer() )
SetPointer( Pointer( POINTER_REFHAND ) );
else if ( pEditView && pEditView->GetEditEngine()->IsVertical() )
@@ -2331,29 +2331,29 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
}
}
- BOOL bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush();
+ sal_Bool bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush();
if (bWater)
SetPointer( Pointer(POINTER_FILL) );
if (!bWater)
{
- BOOL bCross = FALSE;
+ sal_Bool bCross = false;
// Range-Finder
- BOOL bCorner;
+ sal_Bool bCorner;
if ( HitRangeFinder( rMEvt.GetPosPixel(), bCorner ) )
{
if (bCorner)
SetPointer( Pointer( POINTER_CROSS ) );
else
SetPointer( Pointer( POINTER_HAND ) );
- bCross = TRUE;
+ bCross = sal_True;
}
// Page-Break-Modus
- USHORT nBreakType;
+ sal_uInt16 nBreakType;
if ( !nButtonDown && pViewData->IsPagebreakMode() &&
( nBreakType = HitPageBreak( rMEvt.GetPosPixel() ) ) != 0 )
{
@@ -2380,25 +2380,25 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
break;
}
SetPointer( Pointer( eNew ) );
- bCross = TRUE;
+ bCross = sal_True;
}
// Fill-Cursor anzeigen ?
if ( !bFormulaMode && !nButtonDown )
- if (TestMouse( rMEvt, FALSE ))
- bCross = TRUE;
+ if (TestMouse( rMEvt, false ))
+ bCross = sal_True;
if ( nButtonDown && pViewData->IsAnyFillMode() )
{
SetPointer( Pointer( POINTER_CROSS ) );
- bCross = TRUE;
+ bCross = sal_True;
nScFillModeMouseModifier = rMEvt.GetModifier(); // ausgewertet bei AutoFill und Matrix
}
if (!bCross)
{
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if (bEditMode) // Edit-Mode muss zuerst kommen!
SetPointer( Pointer( POINTER_ARROW ) );
@@ -2437,13 +2437,13 @@ void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const MouseE
rEvent.X = rEvt.GetPosPixel().X();
rEvent.Y = rEvt.GetPosPixel().Y();
rEvent.ClickCount = rEvt.GetClicks();
- rEvent.PopupTrigger = sal_False;
+ rEvent.PopupTrigger = false;
}
long ScGridWindow::PreNotify( NotifyEvent& rNEvt )
{
bool bDone = false;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN )
{
Window* pWindow = rNEvt.GetWindow();
@@ -2502,24 +2502,24 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
if (!pViewData->GetView()->IsInActivatePart())
{
if (bDPMouse)
- bDPMouse = FALSE; // gezeichnet wird per bDragRect
+ bDPMouse = false; // gezeichnet wird per bDragRect
if (bDragRect)
{
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // richtig abbrechen geht dabei nicht...
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // richtig abbrechen geht dabei nicht...
+ bRFMouse = false;
}
if (nPagebreakMouse)
{
// if (bPagebreakDrawn)
// DrawDragRect( aPagebreakDrag.aStart.Col(), aPagebreakDrag.aStart.Row(),
- // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), FALSE );
- bPagebreakDrawn = FALSE;
+ // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), sal_False );
+ bPagebreakDrawn = false;
UpdateDragRectOverlay();
nPagebreakMouse = SC_PD_NONE;
}
@@ -2528,7 +2528,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
StopMarking();
MouseButtonUp( rMEvt ); // mit Status SC_GM_IGNORE aus StopMarking
- BOOL bRefMode = pViewData->IsRefMode();
+ sal_Bool bRefMode = pViewData->IsRefMode();
if (bRefMode)
SC_MOD()->EndReference(); // Dialog nicht verkleinert lassen
}
@@ -2554,7 +2554,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
HideNoteMarker();
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
if (bEEMouse && pViewData->HasEditView( eWhich ))
{
@@ -2565,7 +2565,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
// don't remove the edit view while switching views
ScModule* pScMod = SC_MOD();
- pScMod->SetInEditCommand( TRUE );
+ pScMod->SetInEditCommand( sal_True );
pEditView->Command( aDragEvent );
@@ -2573,7 +2573,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
if (pHdl)
pHdl->DataChanged();
- pScMod->SetInEditCommand( FALSE );
+ pScMod->SetInEditCommand( false );
if (!pViewData->IsActive()) // dropped to different view?
{
ScInputHandler* pViewHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
@@ -2593,7 +2593,7 @@ void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, Window* pWi
{
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, NULL, sal_True );
aEditArea.Right() = aEditArea.Left();
aEditArea = pWin->PixelToLogic( aEditArea );
pWin->SetCursorRect( &aEditArea );
@@ -2605,7 +2605,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
// menu from an inplace client is closed. Now we have the chance to
// deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
ScTabViewShell* pTabViewSh = pViewData->GetViewShell();
SfxInPlaceClient* pClient = pTabViewSh->GetIPClient();
if ( pClient &&
@@ -2624,7 +2624,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
nCmd == COMMAND_EXTTEXTINPUT ||
nCmd == COMMAND_CURSORPOS )
{
- BOOL bEditView = pViewData->HasEditView( eWhich );
+ sal_Bool bEditView = pViewData->HasEditView( eWhich );
if (!bEditView)
{
// only if no cell editview is active, look at drawview
@@ -2654,7 +2654,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
if ( pHdl )
{
- pHdl->InputCommand( rCEvt, TRUE );
+ pHdl->InputCommand( rCEvt, sal_True );
return; // done
}
@@ -2717,20 +2717,20 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL )
{
- BOOL bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich );
+ sal_Bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich );
if (!bDone)
Window::Command(rCEvt);
return;
}
// #i7560# FormulaMode check is below scrolling - scrolling is allowed during formula input
- BOOL bDisable = pScMod->IsFormulaMode() ||
+ sal_Bool bDisable = pScMod->IsFormulaMode() ||
pScMod->IsModalMode(pViewData->GetSfxDocShell());
if (bDisable)
return;
if ( nCmd == COMMAND_CONTEXTMENU && !SC_MOD()->GetIsWaterCan() )
{
- BOOL bMouse = rCEvt.IsMouseEvent();
+ sal_Bool bMouse = rCEvt.IsMouseEvent();
if ( bMouse && nMouseStatus == SC_GM_IGNORE )
return;
@@ -2775,12 +2775,12 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
SelectForContextMenu( aPosPixel, nCellX, nCellY );
}
- BOOL bDone = FALSE;
- BOOL bEdit = pViewData->HasEditView(eWhich);
+ sal_Bool bDone = false;
+ sal_Bool bEdit = pViewData->HasEditView(eWhich);
if ( !bEdit )
{
// Edit-Zelle mit Spelling-Errors ?
- if ( bMouse && GetEditUrlOrError( TRUE, aPosPixel ) )
+ if ( bMouse && GetEditUrlOrError( sal_True, aPosPixel ) )
{
// GetEditUrlOrError hat den Cursor schon bewegt
@@ -2826,7 +2826,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
Link aLink = LINK( this, ScGridWindow, PopupSpellingHdl );
pEditView->ExecuteSpellPopup( aMenuPos, &aLink );
- bDone = TRUE;
+ bDone = sal_True;
}
}
else if ( !bMouse )
@@ -2835,7 +2835,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
SCCOL nCurX = pViewData->GetCurX();
SCROW nCurY = pViewData->GetCurY();
- aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, TRUE );
+ aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, sal_True );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nCurX, nCurY, nSizeXPix, nSizeYPix );
@@ -2983,24 +2983,24 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
// look for existing selection
- BOOL bHitSelected = FALSE;
+ sal_Bool bHitSelected = false;
if ( pDrawView && pDrawView->IsMarkedObjHit( aLogicPos ) )
{
// clicked on selected object -> don't change anything
- bHitSelected = TRUE;
+ bHitSelected = sal_True;
}
else if ( pViewData->GetMarkData().IsCellMarked(nCellX, nCellY) )
{
// clicked on selected cell -> don't change anything
- bHitSelected = TRUE;
+ bHitSelected = sal_True;
}
// select drawing object or move cell cursor
if ( !bHitSelected )
{
- BOOL bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() );
- BOOL bHitDraw = FALSE;
+ sal_Bool bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() );
+ sal_Bool bHitDraw = false;
if ( pDrawView )
{
pDrawView->UnmarkAllObj();
@@ -3015,7 +3015,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
pView->Unmark();
pView->SetCursor(nCellX, nCellY);
if ( bWasDraw )
- pViewData->GetViewShell()->SetDrawShell( FALSE ); // switch shells
+ pViewData->GetViewShell()->SetDrawShell( false ); // switch shells
}
}
}
@@ -3030,7 +3030,7 @@ static void ClearSingleSelection( ScViewData* pViewData )
return;
ScDocument* pClipDoc = pTransObj->GetDocument();
- pClipDoc->GetClipArea( nX, nY, TRUE );
+ pClipDoc->GetClipArea( nX, nY, true );
if (nX == 0 && nY == 0)
{
ScTabView* pView = pViewData->GetView();
@@ -3062,7 +3062,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
{
ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
- ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, FALSE );
+ ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, false );
ClearSingleSelection( pViewData );
uno::Reference<datatransfer::clipboard::XClipboard> xSystemClipboard =
@@ -3089,7 +3089,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
}
// query for existing note marker before calling ViewShell's keyboard handling
// which may remove the marker
- BOOL bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() );
+ sal_Bool bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() );
ScTabViewShell* pViewSh = pViewData->GetViewShell();
if (pViewData->GetDocShell()->GetProgress())
@@ -3124,7 +3124,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
if ( bHadKeyMarker )
HideNoteMarker(); // hide when previously visible
else
- ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), TRUE );
+ ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), sal_True );
return;
}
if (aCode.GetCode() == KEY_BRACKETLEFT && aCode.GetModifier() == KEY_MOD1)
@@ -3149,15 +3149,15 @@ void ScGridWindow::StopMarking()
if (nButtonDown)
{
- pViewData->GetMarkData().SetMarking(FALSE);
+ pViewData->GetMarkData().SetMarking(false);
nMouseStatus = SC_GM_IGNORE;
}
}
void ScGridWindow::UpdateInputContext()
{
- BOOL bReadOnly = pViewData->GetDocShell()->IsReadOnly();
- ULONG nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT );
+ sal_Bool bReadOnly = pViewData->GetDocShell()->IsReadOnly();
+ sal_uLong nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT );
// when font from InputContext is used,
// it must be taken from the cursor position's cell attributes
@@ -3172,7 +3172,7 @@ void ScGridWindow::UpdateInputContext()
// sensitiver Bereich (Pixel)
#define SCROLL_SENSITIVE 20
-BOOL ScGridWindow::DropScroll( const Point& rMousePos )
+sal_Bool ScGridWindow::DropScroll( const Point& rMousePos )
{
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -3203,15 +3203,15 @@ BOOL ScGridWindow::DropScroll( const Point& rMousePos )
pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
}
- return FALSE;
+ return false;
}
-BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
+sal_Bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
// Testet, ob bei eingeschalteten RedLining,
// bei einem Drop ein Scenario betroffen ist.
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
SCTAB nTab = aDragRange.aStart.Tab();
SCTAB nTabCount = pDoc->GetTableCount();
@@ -3219,7 +3219,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -3227,7 +3227,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if(pDoc->HasScenarioRange(i, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
}
@@ -3258,8 +3258,8 @@ ScRange lcl_MakeDropRange( SCCOL nPosX, SCROW nPosY, SCTAB nTab, const ScRange&
//--------------------------------------------------------
-extern BOOL bPasteIsDrop; // viewfun4 -> move to header
-extern BOOL bPasteIsMove; // viewfun7 -> move to header
+extern sal_Bool bPasteIsDrop; // viewfun4 -> move to header
+extern sal_Bool bPasteIsMove; // viewfun7 -> move to header
//--------------------------------------------------------
@@ -3267,7 +3267,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( rEvt.mbLeaving )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
return rEvt.mnAction;
}
@@ -3280,7 +3280,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect)
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3296,7 +3296,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect) // Rechteck loeschen
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
@@ -3309,7 +3309,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if ( rData.pCellTransfer->GetDragSourceFlags() & SC_DROP_TABLE ) // whole sheet?
{
- BOOL bOk = pThisDoc->IsDocEditable();
+ sal_Bool bOk = pThisDoc->IsDocEditable();
return bOk ? rEvt.mnAction : 0; // don't draw selection frame
}
@@ -3346,7 +3346,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect)
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3380,14 +3380,14 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if ( bValid )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( aDestData.Dimension, bIsDataLayout );
const ScDPSaveDimension* pDim = pDPObj->GetSaveData()->GetExistingDimensionByName( aDimName );
if ( pDim )
{
ScRange aOutRange = pDPObj->GetOutRange();
- USHORT nOrient = pDim->GetOrientation();
+ sal_uInt16 nOrient = pDim->GetOrientation();
if ( nOrient == sheet::DataPilotFieldOrientation_COLUMN )
{
eDragInsertMode = INS_CELLSRIGHT;
@@ -3409,7 +3409,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
// no valid sorting in a DataPilot table -> disallow
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3439,7 +3439,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3467,7 +3467,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
nDragStartY = nNewDragY;
nDragEndX = nDragStartX+nSizeX-1;
nDragEndY = nDragStartY+nSizeY-1;
- bDragRect = TRUE;
+ bDragRect = sal_True;
meDragInsertMode = eDragInsertMode;
UpdateDragRectOverlay();
@@ -3558,7 +3558,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
case DND_ACTION_MOVE:
case DND_ACTION_COPYMOVE:
{
- BOOL bMove = ( nMyAction == DND_ACTION_MOVE );
+ sal_Bool bMove = ( nMyAction == DND_ACTION_MOVE );
if ( IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE ) ||
IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE ) ||
IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) ||
@@ -3610,7 +3610,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
// Simple check for protection: It's not known here if the drop will result
// in cells or drawing objects (some formats can be both) and how many cells
// the result will be. But if IsFormatEditable for the drop cell position
- // is FALSE (ignores matrix formulas), nothing can be pasted, so the drop
+ // is sal_False (ignores matrix formulas), nothing can be pasted, so the drop
// can already be rejected here.
Point aPos = rEvt.maPosPixel;
@@ -3635,7 +3635,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
return nRet;
}
-ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false )
+sal_uLong lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false )
{
TransferableDataHelper aDataHelper( xTransfer );
@@ -3653,7 +3653,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
return SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR;
}
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) )
nFormatId = SOT_FORMATSTR_ID_DRAWING;
else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) )
@@ -3662,7 +3662,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
{
// If it's a Writer object, insert RTF instead of OLE
- BOOL bDoRtf = FALSE;
+ sal_Bool bDoRtf = false;
SotStorageStreamRef xStm;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) &&
@@ -3720,11 +3720,11 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
return nFormatId;
}
-ULONG lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer )
+sal_uLong lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer )
{
TransferableDataHelper aDataHelper( xTransfer );
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ) )
nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE;
else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) )
@@ -3751,7 +3751,7 @@ ULONG lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTra
sal_Int8 ScGridWindow::ExecutePrivateDrop( const ExecuteDropEvent& rEvt )
{
// hide drop marker
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
ScModule* pScMod = SC_MOD();
@@ -3772,10 +3772,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
ScDocument* pThisDoc = pViewData->GetDocument();
ScViewFunc* pView = pViewData->GetView();
SCTAB nThisTab = pViewData->GetTabNo();
- USHORT nFlags = pTransObj->GetDragSourceFlags();
+ sal_uInt16 nFlags = pTransObj->GetDragSourceFlags();
- BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
- BOOL bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi );
+ sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
+ sal_Bool bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi );
// workaround for wrong nDndAction on Windows when pressing solely
// the Alt key during drag and drop;
@@ -3785,7 +3785,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bIsMove = ( nDndAction & DND_ACTION_MOVE && !bIsNavi );
}
- BOOL bIsLink = ( nDndAction == DND_ACTION_LINK );
+ sal_Bool bIsLink = ( nDndAction == DND_ACTION_LINK );
ScRange aSource = pTransObj->GetRange();
@@ -3826,7 +3826,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bFiltered = ScViewUtil::HasFiltered( aDest, pThisDoc);
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (!bFiltered && pSourceDoc == pThisDoc)
{
@@ -3835,9 +3835,9 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( pThisDoc->IsDocEditable() )
{
SCTAB nSrcTab = aSource.aStart.Tab();
- pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, TRUE ); // with Undo
- pView->SetTabNo( nThisTab, TRUE );
- bDone = TRUE;
+ pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, sal_True ); // with Undo
+ pView->SetTabNo( nThisTab, sal_True );
+ bDone = sal_True;
}
}
else // move/copy block
@@ -3849,10 +3849,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
aSource.Format( aRangeName, SCR_ABS_3D, pThisDoc );
SfxStringItem aNameItem( SID_CHART_NAME, aChartName );
SfxStringItem aRangeItem( SID_CHART_SOURCE, aRangeName );
- USHORT nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE;
+ sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE;
pViewData->GetDispatcher().Execute( nId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aRangeItem, &aNameItem, (void*) NULL );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( pThisDoc->GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) )
{
@@ -3862,7 +3862,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( aDestPos != aSource.aStart )
bDone = pViewData->GetView()->DataPilotMove( aSource, aDestPos );
else
- bDone = TRUE; // same position: nothing
+ bDone = sal_True; // same position: nothing
}
else if ( nDestPosX != aSource.aStart.Col() || nDestPosY != aSource.aStart.Row() ||
nSourceTab != nThisTab )
@@ -3870,11 +3870,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
if ( nThisTab == nSourceTab )
@@ -3899,13 +3899,13 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
{
if ( bIsLink )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pView->LinkBlock( aSource, aDest.aStart, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pView->LinkBlock( aSource, aDest.aStart, sal_True /*bApi*/ );
}
else
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, TRUE /*bRecord*/, TRUE /*bPaint*/, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, sal_True /*bRecord*/, sal_True /*bPaint*/, sal_True /*bApi*/ );
}
}
@@ -3924,8 +3924,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( ( eCmd == DEL_CELLSUP && nDestPosX == aSource.aStart.Col() ) ||
( eCmd == DEL_CELLSLEFT && nDestPosY == aSource.aStart.Row() ) )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, TRUE /*bRecord*/, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, sal_True /*bRecord*/, sal_True /*bApi*/ );
if ( bDone )
{
if ( eCmd == DEL_CELLSUP && nDestPosY > aSource.aEnd.Row() )
@@ -3944,7 +3944,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( bDone )
{
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, false, false );
SCCOL nDCol = pViewData->GetCurX() - aSource.aStart.Col();
SCROW nDRow = pViewData->GetCurY() - aSource.aStart.Row();
@@ -3957,7 +3957,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
Sound::Beep(); // instead of error message in drop handler
}
else
- bDone = TRUE; // nothing to do
+ bDone = sal_True; // nothing to do
}
if (bDone)
@@ -3995,7 +3995,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
}
pView->ImportTables( pSrcShell,nTabSelCount, nTabs, bIsLink, nThisTab );
- bDone = TRUE;
+ bDone = sal_True;
}
}
else if ( bIsLink )
@@ -4010,11 +4010,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4055,7 +4055,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
pView->EnterMatrix( aFormula );
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, false, false );
pView->SetCursor( aDest.aStart.Col(), aDest.aStart.Row() );
}
@@ -4070,11 +4070,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4089,7 +4089,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bDone = pView->PasteFromClip( IDF_ALL, pTransObj->GetDocument() ); // clip-doc
if ( bDone )
{
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, false, false );
pView->SetCursor( aDest.aStart.Col(), aDest.aStart.Row() );
}
}
@@ -4120,14 +4120,14 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
// try to insert a link
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
String aThisName;
ScDocShell* pDocSh = pViewData->GetDocShell();
if (pDocSh && pDocSh->HasName())
aThisName = pDocSh->GetMedium()->GetName();
if ( rData.aLinkDoc == aThisName ) // error - no link within a document
- bOk = FALSE;
+ bOk = false;
else
{
ScViewFunc* pView = pViewData->GetView();
@@ -4139,7 +4139,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
- pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE );
+ pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false );
pView->InsertAreaLink( rData.aLinkDoc, EMPTY_STRING, EMPTY_STRING,
rData.aLinkArea, 0 );
@@ -4147,7 +4147,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
else
{
OSL_FAIL("drop with link: no sheet nor area");
- bOk = FALSE;
+ bOk = false;
}
}
@@ -4158,10 +4158,10 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (rData.pDrawTransfer)
{
- USHORT nFlags = rData.pDrawTransfer->GetDragSourceFlags();
+ sal_uInt16 nFlags = rData.pDrawTransfer->GetDragSourceFlags();
- BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
- BOOL bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi );
+ sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
+ sal_Bool bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi );
bPasteIsMove = bIsMove;
@@ -4169,7 +4169,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (bPasteIsMove)
rData.pDrawTransfer->SetDragWasInternal();
- bPasteIsMove = FALSE;
+ bPasteIsMove = false;
return rEvt.mnAction;
}
@@ -4192,7 +4192,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
}
- BOOL bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
+ sal_Bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
ScDocument* pThisDoc = pViewData->GetDocument();
SdrObject* pHitObj = pThisDoc->GetObjectAtPoint( pViewData->GetTabNo(), PixelToLogic(aPos) );
@@ -4200,23 +4200,23 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
// dropped on drawing object
// PasteOnDrawObject checks for valid formats
- if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, TRUE ) )
+ if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, sal_True ) )
return rEvt.mnAction;
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
- ULONG nFormatId = bIsLink ?
+ sal_uLong nFormatId = bIsLink ?
lcl_GetDropLinkId( rEvt.maDropEvent.Transferable ) :
lcl_GetDropFormatId( rEvt.maDropEvent.Transferable );
if ( nFormatId )
{
- pScMod->SetInExecuteDrop( TRUE ); // #i28468# prevent error messages from PasteDataFormat
- bPasteIsDrop = TRUE;
+ pScMod->SetInExecuteDrop( sal_True ); // #i28468# prevent error messages from PasteDataFormat
+ bPasteIsDrop = sal_True;
bDone = pViewData->GetView()->PasteDataFormat(
nFormatId, rEvt.maDropEvent.Transferable, nPosX, nPosY, &aLogicPos, bIsLink );
- bPasteIsDrop = FALSE;
- pScMod->SetInExecuteDrop( FALSE );
+ bPasteIsDrop = false;
+ pScMod->SetInExecuteDrop( false );
}
sal_Int8 nRet = bDone ? rEvt.mnAction : DND_ACTION_NONE;
@@ -4238,8 +4238,8 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
SdrView* pDrawView = pViewData->GetViewShell()->GetSdrView();
if (pDrawView)
{
- ULONG nCount = pDrawView->GetMarkedObjectCount();
- for (ULONG i = 0; i < nCount; ++i)
+ sal_uLong nCount = pDrawView->GetMarkedObjectCount();
+ for (sal_uLong i = 0; i < nCount; ++i)
{
SdrObject* pObj = pDrawView->GetMarkedObjectByIndex(i);
if (pObj && pObj->GetLogicRect().IsInside(aLogicPos))
@@ -4272,7 +4272,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
// bSameDocClipboard argument for PasteDraw is needed
// because only DragData is checked directly inside PasteDraw
- pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), FALSE,
+ pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), false,
pDrawTransfer->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
}
@@ -4285,12 +4285,12 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
uno::Reference<datatransfer::XTransferable> xTransferable = aDataHelper.GetTransferable();
if ( xTransferable.is() )
{
- ULONG nFormatId = lcl_GetDropFormatId( xTransferable, true );
+ sal_uLong nFormatId = lcl_GetDropFormatId( xTransferable, true );
if ( nFormatId )
{
- bPasteIsDrop = TRUE;
+ bPasteIsDrop = sal_True;
pViewData->GetView()->PasteDataFormat( nFormatId, xTransferable, nPosX, nPosY, &aLogicPos );
- bPasteIsDrop = FALSE;
+ bPasteIsDrop = false;
}
}
}
@@ -4311,10 +4311,10 @@ void ScGridWindow::UpdateEditViewPos()
// hide EditView?
- BOOL bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) );
+ sal_Bool bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) );
if ( SC_MOD()->IsFormulaMode() )
if ( pViewData->GetTabNo() != pViewData->GetRefTabNo() )
- bHide = TRUE;
+ bHide = sal_True;
if (bHide)
{
@@ -4328,8 +4328,8 @@ void ScGridWindow::UpdateEditViewPos()
}
else
{
- // bForceToTop = TRUE for editing
- Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, TRUE );
+ // bForceToTop = sal_True for editing
+ Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, sal_True );
Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() );
Rectangle aRect = pView->GetOutputArea();
@@ -4345,7 +4345,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
ClickExtern();
HideNoteMarker();
- bIsInScroll = TRUE;
+ bIsInScroll = true;
SetMapMode(MAP_PIXEL);
Scroll( nDifX, nDifY, SCROLL_CHILDREN );
@@ -4354,7 +4354,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
UpdateEditViewPos();
DrawAfterScroll();
- bIsInScroll = FALSE;
+ bIsInScroll = false;
}
// Formeln neu zeichnen -------------------------------------------------
@@ -4369,7 +4369,7 @@ void ScGridWindow::UpdateFormulas()
// nicht anfangen, verschachtelt zu painten
// (dann wuerde zumindest der MapMode nicht mehr stimmen)
- bNeedsRepaint = TRUE; // -> am Ende vom Paint nochmal Invalidate auf alles
+ bNeedsRepaint = sal_True; // -> am Ende vom Paint nochmal Invalidate auf alles
aRepaintPixel = Rectangle(); // alles
return;
}
@@ -4396,7 +4396,7 @@ void ScGridWindow::UpdateFormulas()
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nMirrorWidth = GetSizePixel().Width();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
if ( bLayoutRTL )
{
long nEndPixel = pViewData->GetScrPos( nX2+1, nPosY, eWhich ).X();
@@ -4411,7 +4411,7 @@ void ScGridWindow::UpdateFormulas()
double nPPTY = pViewData->GetPPTY();
ScTableInfo aTabInfo;
- pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, FALSE, FALSE );
+ pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, false, false );
Fraction aZoomX = pViewData->GetZoomX();
Fraction aZoomY = pViewData->GetZoomY();
@@ -4431,7 +4431,7 @@ void ScGridWindow::UpdateFormulas()
CheckNeedsRepaint(); // #i90362# used to be called via Draw() - still needed here
}
-void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange)
+void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange)
{
if ( bMarked != bAutoMarkVisible || ( bMarked && rMarkRange.aEnd != aAutoMarkPos ) )
{
@@ -4445,9 +4445,9 @@ void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange)
}
}
-void ScGridWindow::UpdateListValPos( BOOL bVisible, const ScAddress& rPos )
+void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos )
{
- BOOL bOldButton = bListValButton;
+ sal_Bool bOldButton = bListValButton;
ScAddress aOldPos = aListValPos;
bListValButton = bVisible;
@@ -4485,7 +4485,7 @@ void ScGridWindow::GetFocus()
{
ScTabViewShell* pViewShell = pViewData->GetViewShell();
pViewShell->GotFocus();
- pViewShell->SetFormShellAtTop( FALSE ); // focus in GridWindow -> FormShell no longer on top
+ pViewShell->SetFormShellAtTop( false ); // focus in GridWindow -> FormShell no longer on top
if (pViewShell->HasAccessibilityObjects())
pViewShell->BroadcastAccessibility(ScAccGridWinFocusGotHint(eWhich, GetAccessible()));
@@ -4519,10 +4519,10 @@ Point ScGridWindow::GetMousePosPixel() const { return aCurMousePos; }
//------------------------------------------------------------------------
-BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
- USHORT* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
+sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner,
+ sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (pHdl)
{
@@ -4532,7 +4532,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
SCsCOL nPosX;
@@ -4541,25 +4541,25 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
// zusammengefasste (einzeln/Bereich) ???
ScAddress aAddr( nPosX, nPosY, nTab );
- Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, TRUE );
+ Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, true );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nPosX, nPosY, nSizeXPix, nSizeYPix );
aNext.X() += nSizeXPix * nLayoutSign;
aNext.Y() += nSizeYPix;
- BOOL bCornerHor;
+ sal_Bool bCornerHor;
if ( bLayoutRTL )
bCornerHor = ( rMouse.X() >= aNext.X() && rMouse.X() <= aNext.X() + 8 );
else
bCornerHor = ( rMouse.X() >= aNext.X() - 8 && rMouse.X() <= aNext.X() );
- BOOL bCellCorner = ( bCornerHor &&
+ sal_Bool bCellCorner = ( bCornerHor &&
rMouse.Y() >= aNext.Y() - 8 && rMouse.Y() <= aNext.Y() );
// corner is hit only if the mouse is within the cell
- USHORT nCount = (USHORT)pRangeFinder->Count();
- for (USHORT i=nCount; i;)
+ sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count();
+ for (sal_uInt16 i=nCount; i;)
{
// rueckwaerts suchen, damit der zuletzt gepaintete Rahmen gefunden wird
--i;
@@ -4569,7 +4569,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
if (pIndex) *pIndex = i;
if (pAddX) *pAddX = nPosX - pData->aRef.aStart.Col();
if (pAddY) *pAddY = nPosY - pData->aRef.aStart.Row();
- bFound = TRUE;
+ bFound = sal_True;
rCorner = ( bCellCorner && aAddr == pData->aRef.aEnd );
break;
}
@@ -4585,7 +4585,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
#define SCE_RIGHT 8
#define SCE_ALL 15
-void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges )
+void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, sal_uInt16 nEdges )
{
// der Range ist immer richtigherum
@@ -4595,19 +4595,19 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
SCCOL nCol2 = rRange.aEnd.Col();
SCROW nRow2 = rRange.aEnd.Row();
SCTAB nTab2 = rRange.aEnd.Tab();
- BOOL bHiddenEdge = FALSE;
+ sal_Bool bHiddenEdge = false;
SCROW nTmp;
ScDocument* pDoc = pDocSh->GetDocument();
while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab1) )
{
--nCol1;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab1) )
{
++nCol2;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(0, nRow1, nTab1);
if (!ValidRow(nTmp))
@@ -4615,7 +4615,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
if (nTmp < nRow1)
{
nRow1 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab1);
if (!ValidRow(nTmp))
@@ -4623,7 +4623,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
if (nTmp > nRow2)
{
nRow2 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
if ( nCol2 > nCol1 + 1 && nRow2 > nRow1 + 1 && !bHiddenEdge )
@@ -4719,7 +4719,7 @@ void lcl_PaintRefChanged( ScDocShell* pDocSh, const ScRange& rOldUn, const ScRan
}
}
-void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
+void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp )
{
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (!pHdl)
@@ -4740,7 +4740,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
// Scrolling
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = false;
Point aPos = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -4755,7 +4755,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
{
if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
- bTimer = TRUE;
+ bTimer = sal_True;
}
// Umschalten bei Fixierung (damit Scrolling funktioniert)
@@ -4847,13 +4847,13 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
//------------------------------------------------------------------------
-BOOL ScGridWindow::GetEditUrl( const Point& rPos,
+sal_Bool ScGridWindow::GetEditUrl( const Point& rPos,
String* pName, String* pUrl, String* pTarget )
{
- return GetEditUrlOrError( FALSE, rPos, pName, pUrl, pTarget );
+ return GetEditUrlOrError( false, rPos, pName, pUrl, pTarget );
}
-BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
+sal_Bool ScGridWindow::GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
String* pName, String* pUrl, String* pTarget )
{
//! nPosX/Y mit uebergeben?
@@ -4866,24 +4866,24 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
ScDocument* pDoc = pDocSh->GetDocument();
ScBaseCell* pCell = NULL;
- BOOL bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell );
+ sal_Bool bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell );
if( !bFound )
- return FALSE;
+ return false;
ScHideTextCursor aHideCursor( pViewData, eWhich ); // before GetEditArea (MapMode is changed)
const ScPatternAttr* pPattern = pDoc->GetPattern( nPosX, nPosY, nTab );
- // bForceToTop = FALSE, use the cell's real position
- Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, FALSE );
+ // bForceToTop = sal_False, use the cell's real position
+ Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false );
if (rPos.Y() < aEditRect.Top())
- return FALSE;
+ return false;
// vertikal kann (noch) nicht angeklickt werden:
if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD)
- return FALSE;
+ return false;
- BOOL bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
+ sal_Bool bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
((SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK);
SvxCellHorJustify eHorJust = (SvxCellHorJustify)((SvxHorJustifyItem&)pPattern->
@@ -4987,7 +4987,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
EditView aTempView( &aEngine, this );
aTempView.SetOutputArea( aLogicEdit );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
MapMode aOld = GetMapMode();
SetMapMode(aEditMode); // kein return mehr
@@ -5016,7 +5016,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
if (pTarget)
*pTarget = pURLField->GetTargetFrame();
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -5027,22 +5027,22 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
return bRet;
}
- return FALSE;
+ return false;
}
-BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
+sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
SCTAB nTabCount = pDoc->GetTableCount();
if ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Size aButSize = pViewData->GetScenButSize();
long nBWidth = aButSize.Width();
if (!nBWidth)
- return FALSE; // noch kein Button gezeichnet -> da ist auch keiner
+ return false; // noch kein Button gezeichnet -> da ist auch keiner
long nBHeight = aButSize.Height();
long nHSpace = (long)( SC_SCENARIO_HSPACE * pViewData->GetPPTX() );
@@ -5050,9 +5050,9 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
ScMarkData aMarks;
for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++)
- pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME );
+ pDoc->MarkScenario( i, nTab, aMarks, false, SC_SCENARIO_SHOWFRAME );
ScRangeList aRanges;
- aMarks.FillRangeListWithMarks( &aRanges, FALSE );
+ aMarks.FillRangeListWithMarks( &aRanges, false );
size_t nRangeCount = aRanges.size();
@@ -5063,18 +5063,18 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
// dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden
pDoc->ExtendTotalMerge( aRange );
- BOOL bTextBelow = ( aRange.aStart.Row() == 0 );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
Point aButtonPos;
if ( bTextBelow )
{
aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aEnd.Row()+1,
- eWhich, TRUE );
+ eWhich, sal_True );
}
else
{
aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aStart.Row(),
- eWhich, TRUE );
+ eWhich, sal_True );
aButtonPos.Y() -= nBHeight;
}
if ( bLayoutRTL )
@@ -5086,12 +5086,12 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
if ( aButRect.IsInside( rPosPixel ) )
{
rScenRange = aRange;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
// #114409#
@@ -5242,11 +5242,11 @@ void ScGridWindow::UpdateCursorOverlay()
ScDocument* pDoc = pViewData->GetDocument();
const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab);
const ScMergeFlagAttr& rMergeFlag = (const ScMergeFlagAttr&) pPattern->GetItem(ATTR_MERGE_FLAG);
- BOOL bOverlapped = rMergeFlag.IsOverlapped();
+ sal_Bool bOverlapped = rMergeFlag.IsOverlapped();
// left or above of the screen?
- BOOL bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
+ sal_Bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
if (!bVis)
{
SCCOL nEndX = nX;
@@ -5261,12 +5261,12 @@ void ScGridWindow::UpdateCursorOverlay()
if ( bVis && !bOverlapped && !pViewData->HasEditView(eWhich) && pViewData->IsActive() )
{
- Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE );
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// completely right of/below the screen?
// (test with logical start position in aScrPos)
- BOOL bMaybeVisible;
+ sal_Bool bMaybeVisible;
if ( bLayoutRTL )
bMaybeVisible = ( aScrPos.X() >= -2 && aScrPos.Y() >= -2 );
else
@@ -5435,9 +5435,9 @@ void ScGridWindow::UpdateAutoFillOverlay()
SCTAB nTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
- Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE );
+ Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
@@ -5527,7 +5527,7 @@ void ScGridWindow::UpdateDragRectOverlay()
double nPPTY = pViewData->GetPPTY();
SCCOLROW i;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
if (ValidCol(nX2) && nX2>=nX1)
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index c9ced7d1003f..df6df29c9c00 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -85,7 +85,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
if (!pDPObj)
return DataPilotFieldOrientation_HIDDEN;
- USHORT nOrient = DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN;
// Check for page field first.
if (nCol > 0)
@@ -94,7 +94,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == DataPilotFieldOrientation_PAGE )
{
- BOOL bIsDataLayout = FALSE;
+ sal_Bool bIsDataLayout = false;
String aFieldName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( aFieldName.Len() && !bIsDataLayout )
return DataPilotFieldOrientation_PAGE;
@@ -107,7 +107,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
long nField = pDPObj->GetHeaderDim(ScAddress(nCol, nRow, nTab), nOrient);
if (nField >= 0 && (nOrient == DataPilotFieldOrientation_COLUMN || nOrient == DataPilotFieldOrientation_ROW) )
{
- BOOL bIsDataLayout = FALSE;
+ sal_Bool bIsDataLayout = false;
String aFieldName = pDPObj->GetDimName(nField, bIsDataLayout);
if (aFieldName.Len() && !bIsDataLayout)
return static_cast<DataPilotFieldOrientation>(nOrient);
@@ -117,14 +117,14 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
}
// private method for mouse button handling
-BOOL ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow )
+sal_Bool ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow )
{
if (GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE)
{
LaunchPageFieldMenu( nCol, nRow );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt )
@@ -135,7 +135,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
Point aDiffPix = rMEvt.GetPosPixel();
aDiffPix -= aScrPos;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
if ( bLayoutRTL )
aDiffPix.X() = -aDiffPix.X();
@@ -180,12 +180,12 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
if (pDPObj)
{
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
ScAddress aPos( nCol, nRow, nTab );
long nField = pDPObj->GetHeaderDim( aPos, nOrient );
if ( nField >= 0 )
{
- bDPMouse = TRUE;
+ bDPMouse = sal_True;
nDPField = nField;
pDragDPObj = pDPObj;
@@ -197,7 +197,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
return;
}
- DPTestMouse( rMEvt, TRUE );
+ DPTestMouse( rMEvt, sal_True );
StartTracking();
}
else if ( pDPObj->IsFilterButton(aPos) )
@@ -237,7 +237,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSheetDesc( aNewDesc );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
delete pDlg;
@@ -256,14 +256,14 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
// Data Pilot interaction
//
-void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
+void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove )
{
DBG_ASSERT(pDragDPObj, "pDragDPObj missing");
// scroll window if at edges
//! move this to separate method
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = false;
Point aPixel = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
@@ -279,14 +279,14 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
nDy = 1;
if ( nDx != 0 || nDy != 0 )
{
- UpdateDragRect( FALSE, Rectangle() );
+ UpdateDragRect( false, Rectangle() );
if ( nDx != 0)
pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
if ( nDy != 0 )
pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
- bTimer = TRUE;
+ bTimer = sal_True;
}
// ---
@@ -294,20 +294,20 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), eWhich, nPosX, nPosY );
- BOOL bMouseLeft;
- BOOL bMouseTop;
+ sal_Bool bMouseLeft;
+ sal_Bool bMouseTop;
pViewData->GetMouseQuadrant( aPixel, eWhich, nPosX, nPosY, bMouseLeft, bMouseTop );
ScAddress aPos( nPosX, nPosY, pViewData->GetTabNo() );
Rectangle aPosRect;
- USHORT nOrient;
+ sal_uInt16 nOrient;
long nDimPos;
- BOOL bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField,
+ sal_Bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField,
aPosRect, nOrient, nDimPos );
UpdateDragRect( bHasRange && bMove, aPosRect );
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
sal_Int32 nDimFlags = 0;
String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout, &nDimFlags );
bool bAllowed = !bHasRange || ScDPObject::IsOrientationAllowed( nOrient, nDimFlags );
@@ -356,7 +356,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
aNewObj.SetSaveData( aSaveData );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
// when dragging fields, allow re-positioning (bAllowMove)
- aFunc.DataPilotUpdate( pDragDPObj, &aNewObj, TRUE, FALSE, TRUE );
+ aFunc.DataPilotUpdate( pDragDPObj, &aNewObj, sal_True, false, sal_True );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -369,7 +369,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
bool ScGridWindow::DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddress& rPos, ScDPObject* pDPObj)
{
- BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+ sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
// Get the geometry of the cell.
Point aScrPos = pViewData->GetScrPos(rPos.Col(), rPos.Row(), eWhich);
@@ -461,14 +461,14 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
pDPObj->FillLabelData(pDPData->maDPParam);
pDPData->mpDPObj = pDPObj;
- USHORT nOrient;
+ sal_uInt16 nOrient;
pDPData->mnDim = pDPObj->GetHeaderDim(rPos, nOrient);
if (pDPData->maDPParam.maLabelArray.size() <= static_cast<size_t>(pDPData->mnDim))
// out-of-bound dimension ID. This should never happen!
return;
- const ScDPLabelData& rLabelData = *pDPData->maDPParam.maLabelArray[pDPData->mnDim];
+ const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[pDPData->mnDim];
mpDPFieldPopup.reset(new ScDPFieldPopupWindow(this, pViewData->GetDocument()));
mpDPFieldPopup->setName(OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilot field member popup")));
@@ -521,7 +521,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
}
}
- BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+ sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
Rectangle aCellRect(rScrPos, rScrSize);
const Size& rPopupSize = mpDPFieldPopup->getWindowSize();
@@ -558,14 +558,14 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu()
aNewDPObj.BuildAllDimensionMembers();
ScDPSaveData* pSaveData = aNewDPObj.GetSaveData();
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName(pDPData->mnDim, bIsDataLayout);
ScDPSaveDimension* pDim = pSaveData->GetDimensionByName(aDimName);
if (!pDim)
return;
// Build a map of layout names to original names.
- const ScDPLabelData& rLabelData = *pDPData->maDPParam.maLabelArray[pDPData->mnDim];
+ const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[pDPData->mnDim];
MemNameMapType aMemNameMap;
for (vector<ScDPLabelData::Member>::const_iterator itr = rLabelData.maMembers.begin(), itrEnd = rLabelData.maMembers.end();
itr != itrEnd; ++itr)
@@ -612,21 +612,21 @@ void ScGridWindow::UpdateVisibleRange()
void ScGridWindow::DPMouseMove( const MouseEvent& rMEvt )
{
- DPTestMouse( rMEvt, TRUE );
+ DPTestMouse( rMEvt, sal_True );
}
void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt )
{
- bDPMouse = FALSE;
+ bDPMouse = false;
ReleaseMouse();
- DPTestMouse( rMEvt, FALSE );
+ DPTestMouse( rMEvt, false );
SetPointer( Pointer( POINTER_ARROW ) );
}
// -----------------------------------------------------------------------
-void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect )
+void ScGridWindow::UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect )
{
SCCOL nStartX = ( rPosRect.Left() >= 0 ) ? static_cast<SCCOL>(rPosRect.Left()) : SCCOL_MAX;
SCROW nStartY = ( rPosRect.Top() >= 0 ) ? static_cast<SCROW>(rPosRect.Top()) : SCROW_MAX;
@@ -645,10 +645,10 @@ void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect )
nDragStartY = nStartY;
nDragEndX = nEndX;
nDragEndY = nEndY;
- bDragRect = TRUE;
+ bDragRect = true;
}
else
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
@@ -657,10 +657,10 @@ void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect )
// Page-Break-Modus
-USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
+sal_uInt16 ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
SCCOLROW* pBreak, SCCOLROW* pPrev )
{
- USHORT nFound = SC_PD_NONE; // 0
+ sal_uInt16 nFound = SC_PD_NONE; // 0
ScRange aSource;
SCCOLROW nBreak = 0;
SCCOLROW nPrev = 0;
@@ -668,8 +668,8 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
ScPageBreakData* pPageData = pViewData->GetView()->GetPageBreakData();
if ( pPageData )
{
- BOOL bHori = FALSE;
- BOOL bVert = FALSE;
+ sal_Bool bHori = false;
+ sal_Bool bVert = false;
SCCOL nHitX = 0;
SCROW nHitY = 0;
@@ -684,38 +684,38 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
// Horizontal mehr Toleranz als vertikal, weil mehr Platz ist
if ( nMouseX <= aTL.X() + 4 )
{
- bHori = TRUE;
+ bHori = sal_True;
nHitX = nPosX;
}
else if ( nMouseX >= aBR.X() - 6 )
{
- bHori = TRUE;
+ bHori = sal_True;
nHitX = nPosX+1; // linker Rand der naechsten Zelle
}
if ( nMouseY <= aTL.Y() + 2 )
{
- bVert = TRUE;
+ bVert = sal_True;
nHitY = nPosY;
}
else if ( nMouseY >= aBR.Y() - 4 )
{
- bVert = TRUE;
+ bVert = sal_True;
nHitY = nPosY+1; // oberer Rand der naechsten Zelle
}
if ( bHori || bVert )
{
- USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() );
- for (USHORT nPos=0; nPos<nCount && !nFound; nPos++)
+ sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );
+ for (sal_uInt16 nPos=0; nPos<nCount && !nFound; nPos++)
{
ScPrintRangeData& rData = pPageData->GetData(nPos);
ScRange aRange = rData.GetPrintRange();
- BOOL bLHit = ( bHori && nHitX == aRange.aStart.Col() );
- BOOL bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 );
- BOOL bTHit = ( bVert && nHitY == aRange.aStart.Row() );
- BOOL bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 );
- BOOL bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() );
- BOOL bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() );
+ sal_Bool bLHit = ( bHori && nHitX == aRange.aStart.Col() );
+ sal_Bool bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 );
+ sal_Bool bTHit = ( bVert && nHitY == aRange.aStart.Row() );
+ sal_Bool bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 );
+ sal_Bool bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() );
+ sal_Bool bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() );
if ( bLHit )
{
@@ -789,14 +789,14 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
return nFound;
}
-void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
+void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp )
{
//! Scrolling und Umschalten mit RFMouseMove zusammenfassen !
//! (Weginvertieren vor dem Scrolling ist anders)
// Scrolling
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = false;
Point aPos = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -811,13 +811,13 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
{
if ( bPagebreakDrawn ) // weginvertieren
{
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = false;
UpdateDragRectOverlay();
}
if ( nDx != 0 ) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
- bTimer = TRUE;
+ bTimer = sal_True;
}
// Umschalten bei Fixierung (damit Scrolling funktioniert)
@@ -849,14 +849,14 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
- BOOL bLeft, bTop;
+ sal_Bool bLeft, bTop;
pViewData->GetMouseQuadrant( aPos, eWhich, nPosX, nPosY, bLeft, bTop );
if ( !bLeft ) ++nPosX;
if ( !bTop ) ++nPosY;
- BOOL bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V );
- BOOL bHide = FALSE;
- BOOL bToEnd = FALSE;
+ sal_Bool bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V );
+ sal_Bool bHide = false;
+ sal_Bool bToEnd = false;
ScRange aDrawRange = aPagebreakSource;
if ( bBreak )
{
@@ -870,7 +870,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
aDrawRange.aEnd.SetCol( nPosX - 1 );
}
else
- bHide = TRUE;
+ bHide = sal_True;
}
else
{
@@ -882,7 +882,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
aDrawRange.aEnd.SetRow( nPosY - 1 );
}
else
- bHide = TRUE;
+ bHide = sal_True;
}
}
else
@@ -896,18 +896,18 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( nPosX > 0 )
aDrawRange.aEnd.SetCol( nPosX-1 );
else
- bHide = TRUE;
+ bHide = sal_True;
}
if ( nPagebreakMouse & SC_PD_RANGE_B )
{
if ( nPosY > 0 )
aDrawRange.aEnd.SetRow( nPosY-1 );
else
- bHide = TRUE;
+ bHide = sal_True;
}
if ( aDrawRange.aStart.Col() > aDrawRange.aEnd.Col() ||
aDrawRange.aStart.Row() > aDrawRange.aEnd.Row() )
- bHide = TRUE;
+ bHide = sal_True;
}
if ( !bPagebreakDrawn || bUp || aDrawRange != aPagebreakDrag )
@@ -917,13 +917,13 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( bPagebreakDrawn )
{
// weginvertieren
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = false;
}
aPagebreakDrag = aDrawRange;
if ( !bUp && !bHide )
{
// hininvertieren
- bPagebreakDrawn = TRUE;
+ bPagebreakDrawn = true;
}
UpdateDragRectOverlay();
}
@@ -936,11 +936,11 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
ScDocShell* pDocSh = pViewData->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if ( bBreak )
{
- BOOL bColumn = ( nPagebreakMouse == SC_PD_BREAK_H );
+ sal_Bool bColumn = ( nPagebreakMouse == SC_PD_BREAK_H );
SCCOLROW nNew = bColumn ? static_cast<SCCOLROW>(nPosX) : static_cast<SCCOLROW>(nPosY);
if ( nNew != nPagebreakBreak )
{
@@ -950,18 +950,18 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
}
- BOOL bGrow = !bHide && nNew > nPagebreakBreak;
+ sal_Bool bGrow = !bHide && nNew > nPagebreakBreak;
if ( bColumn )
{
if (pDoc->HasColBreak(static_cast<SCCOL>(nPagebreakBreak), nTab) & BREAK_MANUAL)
{
ScAddress aOldAddr( static_cast<SCCOL>(nPagebreakBreak), nPosY, nTab );
- pViewFunc->DeletePageBreak( TRUE, TRUE, &aOldAddr, FALSE );
+ pViewFunc->DeletePageBreak( sal_True, sal_True, &aOldAddr, false );
}
if ( !bHide && !bToEnd ) // am Ende nicht
{
ScAddress aNewAddr( static_cast<SCCOL>(nNew), nPosY, nTab );
- pViewFunc->InsertPageBreak( TRUE, TRUE, &aNewAddr, FALSE );
+ pViewFunc->InsertPageBreak( sal_True, sal_True, &aNewAddr, false );
}
if ( bGrow )
{
@@ -970,12 +970,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( static_cast<SCCOL>(nPagebreakPrev) > aPagebreakSource.aStart.Col() && !bManualBreak )
{
ScAddress aPrev( static_cast<SCCOL>(nPagebreakPrev), nPosY, nTab );
- pViewFunc->InsertPageBreak( TRUE, TRUE, &aPrev, FALSE );
+ pViewFunc->InsertPageBreak( sal_True, sal_True, &aPrev, false );
}
if (!pDocSh->AdjustPrintZoom( ScRange(
static_cast<SCCOL>(nPagebreakPrev),0,nTab, static_cast<SCCOL>(nNew-1),0,nTab ) ))
- bGrow = FALSE;
+ bGrow = false;
}
}
else
@@ -983,12 +983,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if (pDoc->HasRowBreak(nPagebreakBreak, nTab) & BREAK_MANUAL)
{
ScAddress aOldAddr( nPosX, nPagebreakBreak, nTab );
- pViewFunc->DeletePageBreak( FALSE, TRUE, &aOldAddr, FALSE );
+ pViewFunc->DeletePageBreak( false, sal_True, &aOldAddr, false );
}
if ( !bHide && !bToEnd ) // am Ende nicht
{
ScAddress aNewAddr( nPosX, nNew, nTab );
- pViewFunc->InsertPageBreak( FALSE, TRUE, &aNewAddr, FALSE );
+ pViewFunc->InsertPageBreak( false, sal_True, &aNewAddr, false );
}
if ( bGrow )
{
@@ -997,12 +997,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( nPagebreakPrev > aPagebreakSource.aStart.Row() && !bManualBreak )
{
ScAddress aPrev( nPosX, nPagebreakPrev, nTab );
- pViewFunc->InsertPageBreak( FALSE, TRUE, &aPrev, FALSE );
+ pViewFunc->InsertPageBreak( false, sal_True, &aPrev, false );
}
if (!pDocSh->AdjustPrintZoom( ScRange(
0,nPagebreakPrev,nTab, 0,nNew-1,nTab ) ))
- bGrow = FALSE;
+ bGrow = false;
}
}
@@ -1013,7 +1013,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if (!bGrow) // sonst in AdjustPrintZoom schon passiert
{
- pViewFunc->UpdatePageBreakData( TRUE );
+ pViewFunc->UpdatePageBreakData( sal_True );
pDocSh->SetDocumentModified();
}
}
@@ -1023,10 +1023,10 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
// Druckbereich setzen
String aNewRanges;
- USHORT nOldCount = pDoc->GetPrintRangeCount( nTab );
+ sal_uInt16 nOldCount = pDoc->GetPrintRangeCount( nTab );
if ( nOldCount )
{
- for (USHORT nPos=0; nPos<nOldCount; nPos++)
+ for (sal_uInt16 nPos=0; nPos<nOldCount; nPos++)
{
const ScRange* pOld = pDoc->GetPrintRange( nTab, nPos );
if ( pOld )
@@ -1048,7 +1048,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
else if (!bHide)
aPagebreakDrag.Format( aNewRanges, SCA_VALID );
- pViewFunc->SetPrintRanges( pDoc->IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, FALSE );
+ pViewFunc->SetPrintRanges( pDoc->IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, false );
}
}
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index c42c1bcf2463..7a0c4d215546 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -54,9 +54,9 @@
// -----------------------------------------------------------------------
-BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
@@ -65,7 +65,7 @@ BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if ( pDraw->IsDetectiveHit( aLogicPos ) )
{
// auf Detektiv-Pfeilen gar nichts (Doppelklick wird bei ButtonUp ausgewertet)
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -81,15 +81,15 @@ BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if ( pDrView && !rMEvt.IsLeft() && !bRet )
{
pDrView->BrkAction();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
{
ScViewFunc* pView = pViewData->GetView();
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
FuPoor* pDraw = pView->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
@@ -103,7 +103,7 @@ BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
ScDrawView* pDrView = pViewData->GetScDrawView();
if ( pDrView )
{
- BOOL bReplaceAll = TRUE;
+ sal_Bool bReplaceAll = sal_True;
pDrView->SetAttrToMarked(*pDrawBrush, bReplaceAll);
}
@@ -115,13 +115,13 @@ BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
return bRet;
}
-BOOL ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
+sal_Bool ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
{
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- BOOL bRet = pDraw->MouseMove( rMEvt );
+ sal_Bool bRet = pDraw->MouseMove( rMEvt );
if ( bRet )
UpdateStatusPosSize();
return bRet;
@@ -129,7 +129,7 @@ BOOL ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
else
{
SetPointer( Pointer( POINTER_ARROW ) );
- return FALSE;
+ return false;
}
}
@@ -146,44 +146,44 @@ void ScGridWindow::DrawEndAction()
// ReleaseMouse beim Aufruf
}
-BOOL ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
+sal_Bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDrView && pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- BYTE nUsed = pDraw->Command( rCEvt );
+ sal_uInt8 nUsed = pDraw->Command( rCEvt );
if( nUsed == SC_CMD_USED )
nButtonDown = 0; // MouseButtonUp wird verschluckt...
if( nUsed || pDrView->IsAction() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+sal_Bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDrView && pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- BOOL bOldMarked = pDrView->AreObjectsMarked();
+ sal_Bool bOldMarked = pDrView->AreObjectsMarked();
if (pDraw->KeyInput( rKEvt ))
{
- BOOL bLeaveDraw = FALSE;
- BOOL bUsed = TRUE;
- BOOL bNewMarked = pDrView->AreObjectsMarked();
+ sal_Bool bLeaveDraw = false;
+ sal_Bool bUsed = sal_True;
+ sal_Bool bNewMarked = pDrView->AreObjectsMarked();
if ( !pViewData->GetView()->IsDrawSelMode() )
if ( !bNewMarked )
{
- pViewData->GetViewShell()->SetDrawShell( FALSE );
- bLeaveDraw = TRUE;
+ pViewData->GetViewShell()->SetDrawShell( false );
+ bLeaveDraw = sal_True;
if ( !bOldMarked &&
rKEvt.GetKeyCode().GetCode() == KEY_DELETE )
- bUsed = FALSE; // nichts geloescht
+ bUsed = false; // nichts geloescht
}
if (!bLeaveDraw)
UpdateStatusPosSize(); // for moving/resizing etc. by keyboard
@@ -191,10 +191,10 @@ BOOL ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
}
}
- return FALSE;
+ return false;
}
-void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer )
+void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer )
{
// #109985#
const ScViewOptions& rOpts = pViewData->GetOptions();
@@ -245,11 +245,11 @@ void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pCo
}
}
-MapMode ScGridWindow::GetDrawMapMode( BOOL bForce )
+MapMode ScGridWindow::GetDrawMapMode( sal_Bool bForce )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
MapMode aDrawMode = pViewData->GetLogicMode();
@@ -296,7 +296,7 @@ void ScGridWindow::DrawAfterScroll(/*BOOL bVal*/)
{
OutlinerView* pOlView = pDrView->GetTextEditOutlinerView();
if (pOlView && pOlView->GetWindow() == this)
- pOlView->ShowCursor(FALSE); // ist beim Scrollen weggekommen
+ pOlView->ShowCursor(false); // ist beim Scrollen weggekommen
}
}
@@ -308,8 +308,8 @@ void ScGridWindow::CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddres
const ScViewOptions& rOpts = pViewData->GetOptions();
if(rOpts.GetOption( VOPT_ANCHOR ))
{
- BOOL bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() );
- Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, TRUE );
+ sal_Bool bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() );
+ Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, sal_True );
aPos = PixelToLogic(aPos);
rHdl.AddHdl(new SdrHdl(aPos, bNegativePage ? HDL_ANCHOR_TR : HDL_ANCHOR));
}
@@ -346,7 +346,7 @@ void ScGridWindow::UpdateStatusPosSize()
// position and size of selected object(s) if something is selected,
// mouse position otherwise
- BOOL bActionItem = FALSE;
+ sal_Bool bActionItem = false;
if ( pDrView->IsAction() ) // action rectangle
{
Rectangle aRect;
@@ -357,7 +357,7 @@ void ScGridWindow::UpdateStatusPosSize()
aSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
aSet.Put( SvxSizeItem( SID_ATTR_SIZE,
Size( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ) ) );
- bActionItem = TRUE;
+ bActionItem = sal_True;
}
}
if ( !bActionItem )
@@ -382,10 +382,10 @@ void ScGridWindow::UpdateStatusPosSize()
pViewData->GetBindings().SetState(aSet);
}
-BOOL ScGridWindow::DrawHasMarkedObj()
+sal_Bool ScGridWindow::DrawHasMarkedObj()
{
ScDrawView* p = pViewData->GetScDrawView();
- return p ? p->AreObjectsMarked() : FALSE;
+ return p ? p->AreObjectsMarked() : false;
}
void ScGridWindow::DrawMarkDropObj( SdrObject* pObj )
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9fdd02c867d4..57dc1dd9c22f 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -88,9 +88,9 @@ void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible )
}
void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel,
- const String& rTitle, const Color& rColor, BOOL bTextBelow,
+ const String& rTitle, const Color& rColor, sal_Bool bTextBelow,
double nPPTX, double nPPTY, const Fraction& rZoomY,
- ScDocument* pDoc, ScViewData* pButtonViewData, BOOL bLayoutRTL )
+ ScDocument* pDoc, ScViewData* pButtonViewData, sal_Bool bLayoutRTL )
{
// pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen,
// darf ansonsten NULL sein!
@@ -149,20 +149,20 @@ void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel,
long nBHeight = nVer + aTextSize.Height() + 1;
Size aButSize( nBWidth, nBHeight );
long nButtonPos = bLayoutRTL ? aOuter.Left() : aOuter.Right()-nBWidth+1;
- aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, FALSE );
+ aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, false );
if (pButtonViewData)
pButtonViewData->SetScenButSize( aButSize );
long nTextStart = bLayoutRTL ? aInner.Right() - aTextSize.Width() + 1 : aInner.Left();
- BOOL bWasClip = FALSE;
+ sal_Bool bWasClip = false;
Region aOldClip;
- BOOL bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() );
+ sal_Bool bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() );
if ( bClip )
{
if (pDev->IsClipRegion())
{
- bWasClip = TRUE;
+ bWasClip = sal_True;
aOldClip = pDev->GetActiveClipRegion();
}
long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left();
@@ -207,11 +207,11 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
ScMarkData aMarks;
for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++)
- pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME );
+ pDoc->MarkScenario( i, nTab, aMarks, false, SC_SCENARIO_SHOWFRAME );
ScRangeListRef xRanges = new ScRangeList;
- aMarks.FillRangeListWithMarks( xRanges, FALSE );
+ aMarks.FillRangeListWithMarks( xRanges, false );
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
for (size_t j = 0, n = xRanges->size(); j < n; ++j)
@@ -226,16 +226,16 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
if ( aRange.Intersects( aViewRange ) ) //! Platz fuer Text/Button?
{
Point aStartPos = pViewData->GetScrPos(
- aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE );
+ aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True );
Point aEndPos = pViewData->GetScrPos(
- aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, TRUE );
+ aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, sal_True );
// on the grid:
aStartPos.X() -= nLayoutSign;
aStartPos.Y() -= 1;
aEndPos.X() -= nLayoutSign;
aEndPos.Y() -= 1;
- BOOL bTextBelow = ( aRange.aStart.Row() == 0 );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
String aCurrent;
Color aColor( COL_LIGHTGRAY );
@@ -243,7 +243,7 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
if ( pDoc->IsActiveScenario(nAct) && pDoc->HasScenarioRange(nAct,aRange) )
{
String aDummyComment;
- USHORT nDummyFlags;
+ sal_uInt16 nDummyFlags;
pDoc->GetName( nAct, aCurrent );
pDoc->GetScenarioData( nAct, aDummyComment, aColor, nDummyFlags );
}
@@ -268,8 +268,8 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData,
ScHighlightRanges& rHighlightRanges )
{
SCTAB nTab = pViewData->GetTabNo();
- ULONG nCount = rHighlightRanges.Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rHighlightRanges.Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScHighlightEntry* pEntry = rHighlightRanges.GetObject( i );
if (pEntry)
@@ -280,7 +280,7 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData,
rOutputData.DrawRefMark(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
- pEntry->aColor, FALSE );
+ pEntry->aColor, false );
}
}
}
@@ -338,7 +338,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
}
else
{
- bNeedsRepaint = TRUE;
+ bNeedsRepaint = sal_True;
aRepaintPixel = LogicToPixel(rRect); // nur betroffenen Bereich
}
return;
@@ -347,7 +347,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
if (bIsInPaint)
return;
- bIsInPaint = TRUE;
+ bIsInPaint = sal_True;
Rectangle aPixRect = LogicToPixel( rRect );
@@ -392,7 +392,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS ); // nicht weiterzeichnen
- bIsInPaint = FALSE;
+ bIsInPaint = false;
}
//
@@ -402,8 +402,8 @@ void ScGridWindow::Paint( const Rectangle& rRect )
void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode )
{
ScModule* pScMod = SC_MOD();
- BOOL bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg();
- BOOL bGridFirst = TRUE; //! entscheiden!!!
+ sal_Bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bGridFirst = true; //! entscheiden!!!
if (pViewData->IsMinimized())
return;
@@ -446,7 +446,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nMirrorWidth = GetSizePixel().Width();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
if ( bLayoutRTL )
{
@@ -463,7 +463,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
SCCOL nCurEndX = nCurX;
SCROW nCurEndY = nCurY;
pDoc->ExtendMerge( nCurX, nCurY, nCurEndX, nCurEndY, nTab );
- BOOL bCurVis = nCursorHideCount==0 &&
+ sal_Bool bCurVis = nCursorHideCount==0 &&
( nCurEndX+1 >= nX1 && nCurX <= nX2+1 && nCurEndY+1 >= nY1 && nCurY <= nY2+1 );
// AutoFill-Anfasser
@@ -483,14 +483,14 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
double nPPTY = pViewData->GetPPTY();
const ScViewOptions& rOpts = pViewData->GetOptions();
- BOOL bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
- BOOL bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS );
+ sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
+ sal_Bool bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS );
// Datenblock
ScTableInfo aTabInfo;
pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab,
- nPPTX, nPPTY, FALSE, bFormulaMode,
+ nPPTX, nPPTY, false, bFormulaMode,
&pViewData->GetMarkData() );
//--------------------------------------------------------------------
@@ -504,7 +504,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.SetMirrorWidth( nMirrorWidth ); // needed for RTL
std::auto_ptr< VirtualDevice > xFmtVirtDev;
- BOOL bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode?
+ sal_Bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode?
if ( bTextWysiwyg )
{
@@ -523,11 +523,11 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
xFmtVirtDev->SetMapMode( MAP_100TH_MM );
aOutputData.SetFmtDevice( xFmtVirtDev.get() );
- bLogicText = TRUE; // use logic MapMode
+ bLogicText = sal_True; // use logic MapMode
}
const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig();
- Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, FALSE ).nColor );
+ Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, false ).nColor );
if ( aGridColor.GetColor() == COL_TRANSPARENT )
{
// use view options' grid color only if color config has "automatic" color
@@ -541,22 +541,22 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.SetShowSpellErrors ( pDoc->GetDocOptions().IsAutoSpell() );
aOutputData.SetMarkClipped ( bMarkClipped );
- aOutputData.SetUseStyleColor( TRUE ); // always set in table view
+ aOutputData.SetUseStyleColor( true ); // always set in table view
aOutputData.SetEditObject( GetEditObject() );
aOutputData.SetViewShell( pViewData->GetViewShell() );
- BOOL bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid();
+ sal_Bool bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid();
- BOOL bPage = rOpts.GetOption( VOPT_PAGEBREAKS );
+ sal_Bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS );
if ( eMode == SC_UPDATE_CHANGED )
{
aOutputData.FindChanged();
- aOutputData.SetSingleGrid(TRUE);
+ aOutputData.SetSingleGrid(sal_True);
}
- BOOL bPageMode = pViewData->IsPagebreakMode();
+ sal_Bool bPageMode = pViewData->IsPagebreakMode();
if (bPageMode) // nach FindChanged
{
// SetPagebreakMode initialisiert auch bPrinted Flags
@@ -564,7 +564,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
}
EditView* pEditView = NULL;
- BOOL bEditMode = pViewData->HasEditView(eWhich);
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich);
if ( bEditMode && pViewData->GetRefTabNo() == nTab )
{
SCCOL nEditCol;
@@ -576,7 +576,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( nEditEndCol >= nX1 && nEditCol <= nX2 && nEditEndRow >= nY1 && nEditRow <= nY2 )
aOutputData.SetEditCell( nEditCol, nEditRow );
else
- bEditMode = FALSE;
+ bEditMode = false;
}
// define drawing layer map mode and paint rectangle
@@ -691,7 +691,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
DrawRedraw( aOutputData, eMode, SC_LAYER_BACK );
}
else
- aOutputData.SetSolidBackground(TRUE);
+ aOutputData.SetSolidBackground(sal_True);
pContentDev->SetMapMode(MAP_PIXEL);
aOutputData.DrawDocumentBackground();
@@ -710,15 +710,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.DrawShadow();
aOutputData.DrawFrame();
if ( !bLogicText )
- aOutputData.DrawStrings(FALSE); // in pixel MapMode
+ aOutputData.DrawStrings(false); // in pixel MapMode
// edit cells and printer-metrics text must be before the buttons
// (DataPilot buttons contain labels in UI font)
pContentDev->SetMapMode(pViewData->GetLogicMode(eWhich));
if ( bLogicText )
- aOutputData.DrawStrings(TRUE); // in logic MapMode if bTextWysiwyg is set
- aOutputData.DrawEdit(TRUE);
+ aOutputData.DrawStrings(sal_True); // in logic MapMode if bTextWysiwyg is set
+ aOutputData.DrawEdit(sal_True);
pContentDev->SetMapMode(MAP_PIXEL);
// Autofilter- und Pivot-Buttons
@@ -743,15 +743,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
SCTAB nTabCount = pDoc->GetTableCount();
ScHighlightRanges* pHigh = pViewData->GetView()->GetHighlightRanges();
- BOOL bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) );
- BOOL bHasChange = ( pDoc->GetChangeTrack() != NULL );
+ sal_Bool bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) );
+ sal_Bool bHasChange = ( pDoc->GetChangeTrack() != NULL );
if ( bHasChange || bHasScenario || pHigh != NULL )
{
//! SetChangedClip() mit DrawMarks() zusammenfassen?? (anderer MapMode!)
- BOOL bAny = TRUE;
+ sal_Bool bAny = sal_True;
if (eMode == SC_UPDATE_CHANGED)
bAny = aOutputData.SetChangedClip();
if (bAny)
@@ -793,7 +793,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
Color aRefColor( rColorCfg.GetColorValue(svtools::CALCREFERENCE).nColor );
aOutputData.DrawRefMark( pViewData->GetRefStartX(), pViewData->GetRefStartY(),
pViewData->GetRefEndX(), pViewData->GetRefEndY(),
- aRefColor, FALSE );
+ aRefColor, false );
}
// Range-Finder
@@ -805,8 +805,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( pRangeFinder && !pRangeFinder->IsHidden() &&
pRangeFinder->GetDocName() == pDocSh->GetTitle() )
{
- USHORT nCount = (USHORT)pRangeFinder->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScRangeFindData* pData = pRangeFinder->GetObject(i);
if (pData)
@@ -817,7 +817,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.DrawRefMark( aRef.aStart.Col(), aRef.aStart.Row(),
aRef.aEnd.Col(), aRef.aEnd.Row(),
Color( ScRangeFindList::GetColorName( i ) ),
- TRUE );
+ sal_True );
}
}
}
@@ -899,7 +899,7 @@ void ScGridWindow::CheckNeedsRepaint()
if (bNeedsRepaint)
{
- bNeedsRepaint = FALSE;
+ bNeedsRepaint = false;
if (aRepaintPixel.IsEmpty())
Invalidate();
else
@@ -948,7 +948,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
else
{
// use EditEngine to draw mixed-script string
- pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE );
+ pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True );
pEditEng->SetRefMapMode( pContentDev->GetMapMode() );
SfxItemSet* pEditDefaults = new SfxItemSet( pEditEng->GetEmptyItemSet() );
rDefPattern.FillEditItemSet( pEditDefaults );
@@ -956,8 +956,8 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
pEditEng->SetDefaults( pEditDefaults );
}
- USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() );
- for (USHORT nPos=0; nPos<nCount; nPos++)
+ sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );
+ for (sal_uInt16 nPos=0; nPos<nCount; nPos++)
{
ScPrintRangeData& rData = pPageData->GetData(nPos);
ScRange aRange = rData.GetPrintRange();
@@ -974,9 +974,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
pContentDev->SetFillColor( aManual );
Point aStart = pViewData->GetScrPos(
- aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE );
+ aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True );
Point aEnd = pViewData->GetScrPos(
- aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, TRUE );
+ aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, sal_True );
aStart.X() -= 2;
aStart.Y() -= 2;
@@ -1010,7 +1010,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
else
pContentDev->SetFillColor( aAutomatic );
Point aBreak = pViewData->GetScrPos(
- nBreak, aRange.aStart.Row(), eWhich, TRUE );
+ nBreak, aRange.aStart.Row(), eWhich, sal_True );
pContentDev->DrawRect( Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) );
}
}
@@ -1029,7 +1029,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
else
pContentDev->SetFillColor( aAutomatic );
Point aBreak = pViewData->GetScrPos(
- aRange.aStart.Col(), nBreak, eWhich, TRUE );
+ aRange.aStart.Col(), nBreak, eWhich, sal_True );
pContentDev->DrawRect( Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) );
}
}
@@ -1049,9 +1049,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
if ( nPrEndX >= nX1 && nPrStartX <= nX2 )
{
Point aPageStart = pViewData->GetScrPos(
- nPrStartX, nPrStartY, eWhich, TRUE );
+ nPrStartX, nPrStartY, eWhich, sal_True );
Point aPageEnd = pViewData->GetScrPos(
- nPrEndX+1,nPrEndY+1, eWhich, TRUE );
+ nPrEndX+1,nPrEndY+1, eWhich, sal_True );
long nPageNo = rData.GetFirstPage();
if ( rData.IsTopDown() )
@@ -1134,9 +1134,9 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
ScQueryParam* pQueryParam = NULL;
RowInfo* pRowInfo = rTabInfo.mpRowInfo;
- USHORT nArrCount = rTabInfo.mnArrCount;
+ sal_uInt16 nArrCount = rTabInfo.mnArrCount;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Point aOldPos = aComboButton.GetPosPixel(); // Zustand fuer MouseDown/Up
Size aOldSize = aComboButton.GetSizePixel(); // merken
@@ -1158,7 +1158,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
if (!pQueryParam)
pQueryParam = new ScQueryParam;
- BOOL bNewData = TRUE;
+ sal_Bool bNewData = sal_True;
if (pDBData)
{
SCCOL nStartCol;
@@ -1169,7 +1169,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
pDBData->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow );
if ( nCol >= nStartCol && nCol <= nEndCol &&
nRow >= nStartRow && nRow <= nEndRow )
- bNewData = FALSE;
+ bNewData = false;
}
if (bNewData)
{
@@ -1185,10 +1185,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
// pQueryParam kann nur MAXQUERY Eintraege enthalten
- BOOL bSimpleQuery = TRUE;
- BOOL bColumnFound = FALSE;
+ sal_Bool bSimpleQuery = sal_True;
+ sal_Bool bColumnFound = false;
if (!pQueryParam->bInplace)
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
for (nQuery=0; nQuery<MAXQUERY && bSimpleQuery; nQuery++)
if (pQueryParam->GetEntry(nQuery).bDoQuery)
{
@@ -1196,10 +1196,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
// (auch bei ">1" soll der Spaltenkopf blau werden)
if (pQueryParam->GetEntry(nQuery).nField == nCol)
- bColumnFound = TRUE;
+ bColumnFound = sal_True;
if (nQuery > 0)
if (pQueryParam->GetEntry(nQuery).eConnect != SC_AND)
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
}
bool bArrowState = bSimpleQuery && bColumnFound;
@@ -1254,7 +1254,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
aComboButton.SetPosPixel( aRect.TopLeft() );
aComboButton.SetSizePixel( aRect.GetSize() );
pContentDev->SetClipRegion( aRect );
- aComboButton.Draw( FALSE, FALSE );
+ aComboButton.Draw( false, false );
pContentDev->SetClipRegion(); // always called from Draw() without clip region
aComboButton.SetPosPixel( aOldPos ); // restore old state
aComboButton.SetSizePixel( aOldSize ); // for MouseUp/Down (AutoFilter)
@@ -1269,7 +1269,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
ScDDComboBoxButton aButton( this ); // for optimal size
@@ -1293,7 +1293,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
nNextCol = nCol + pMerge->GetColMerge(); // next cell after the merged area
while ( nNextCol <= MAXCOL && pDoc->ColHidden(nNextCol, nTab) )
++nNextCol;
- BOOL bNextCell = ( nNextCol <= MAXCOL );
+ sal_Bool bNextCell = ( nNextCol <= MAXCOL );
if ( bNextCell )
nAvailable = ScViewData::ToPixel( pDoc->GetColWidth( nNextCol, nTab ), pViewData->GetPPTX() );
@@ -1302,7 +1302,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
if ( nCellSizeY < aBtnSize.Height() )
aBtnSize.Height() = nCellSizeY;
- Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, TRUE );
+ Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, sal_True );
aPos.X() += nCellSizeX * nLayoutSign; // start of next cell
if (!bNextCell)
aPos.X() -= aBtnSize.Width() * nLayoutSign; // right edge of cell if next cell not available
@@ -1315,7 +1315,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
return Rectangle( aPos, aBtnSize );
}
-BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
ScDocument* pDoc = pViewData->GetDocument();
ScDBData* pDBData = pDoc->GetDBAtCursor( nCol, nRow, nTab );
@@ -1328,12 +1328,12 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
OSL_FAIL("Auto-Filter-Button ohne DBData");
}
- BOOL bSimpleQuery = TRUE;
- BOOL bColumnFound = FALSE;
+ sal_Bool bSimpleQuery = sal_True;
+ sal_Bool bColumnFound = false;
SCSIZE nQuery;
if ( !aQueryParam.bInplace )
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
// aQueryParam kann nur MAXQUERY Eintraege enthalten
@@ -1341,18 +1341,18 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
if ( aQueryParam.GetEntry(nQuery).bDoQuery )
{
if (aQueryParam.GetEntry(nQuery).nField == nCol)
- bColumnFound = TRUE;
+ bColumnFound = sal_True;
if (nQuery > 0)
if (aQueryParam.GetEntry(nQuery).eConnect != SC_AND)
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
}
return ( bSimpleQuery && bColumnFound );
}
void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bTestMerge, BOOL bRepeat )
+ sal_Bool bTestMerge, sal_Bool bRepeat )
{
//! if INVERT_HIGHLIGHT swaps foreground and background (like on Mac),
//! use INVERT_HIGHLIGHT only for cells that have no background color set
@@ -1365,7 +1365,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
SCCOL nTestX2 = nX2;
@@ -1402,30 +1402,30 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nScrY = aScrPos.Y();
- BOOL bWasHidden = FALSE;
+ sal_Bool bWasHidden = false;
for (SCROW nY=nY1; nY<=nY2; nY++)
{
- BOOL bFirstRow = ( nY == nPosY ); // first visible row?
- BOOL bDoHidden = FALSE; // versteckte nachholen ?
- USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab );
- BOOL bDoRow = ( nHeightTwips != 0 );
+ sal_Bool bFirstRow = ( nY == nPosY ); // first visible row?
+ sal_Bool bDoHidden = false; // versteckte nachholen ?
+ sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab );
+ sal_Bool bDoRow = ( nHeightTwips != 0 );
if (bDoRow)
{
if (bTestMerge)
if (bWasHidden) // auf versteckte zusammengefasste testen
{
- bDoHidden = TRUE;
- bDoRow = TRUE;
+ bDoHidden = true;
+ bDoRow = true;
}
- bWasHidden = FALSE;
+ bWasHidden = false;
}
else
{
- bWasHidden = TRUE;
+ bWasHidden = sal_True;
if (bTestMerge)
if (nY==nY2)
- bDoRow = TRUE; // letzte Zeile aus Block
+ bDoRow = sal_True; // letzte Zeile aus Block
}
if ( bDoRow )
@@ -1478,7 +1478,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
}
}
- if ( rMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat )
+ if ( rMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat )
{
if ( !pMergeFlag->IsOverlapped() )
{
@@ -1503,7 +1503,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
}
else // !bTestMerge
{
- if ( rMark.IsCellMarked( nX, nY, TRUE ) == bRepeat &&
+ if ( rMark.IsCellMarked( nX, nY, sal_True ) == bRepeat &&
nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
{
aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
@@ -1527,13 +1527,13 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
{
ScMarkData aMultiMark( pViewData->GetMarkData() );
- aMultiMark.SetMarking( FALSE );
+ aMultiMark.SetMarking( false );
aMultiMark.MarkToMulti();
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
if ( !aMultiMark.IsMultiMarked() )
@@ -1549,8 +1549,8 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
PutInOrder( nX1, nX2 );
PutInOrder( nY1, nY2 );
- BOOL bTestMerge = TRUE;
- BOOL bRepeat = TRUE;
+ sal_Bool bTestMerge = sal_True;
+ sal_Bool bRepeat = sal_True;
SCCOL nTestX2 = nX2;
SCROW nTestY2 = nY2;
@@ -1584,30 +1584,30 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nScrY = aScrPos.Y();
- BOOL bWasHidden = FALSE;
+ sal_Bool bWasHidden = false;
for (SCROW nY=nY1; nY<=nY2; nY++)
{
- BOOL bFirstRow = ( nY == nPosY ); // first visible row?
- BOOL bDoHidden = FALSE; // versteckte nachholen ?
- USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab );
- BOOL bDoRow = ( nHeightTwips != 0 );
+ sal_Bool bFirstRow = ( nY == nPosY ); // first visible row?
+ sal_Bool bDoHidden = false; // versteckte nachholen ?
+ sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab );
+ sal_Bool bDoRow = ( nHeightTwips != 0 );
if (bDoRow)
{
if (bTestMerge)
if (bWasHidden) // auf versteckte zusammengefasste testen
{
- bDoHidden = TRUE;
- bDoRow = TRUE;
+ bDoHidden = sal_True;
+ bDoRow = sal_True;
}
- bWasHidden = FALSE;
+ bWasHidden = false;
}
else
{
- bWasHidden = TRUE;
+ bWasHidden = sal_True;
if (bTestMerge)
if (nY==nY2)
- bDoRow = TRUE; // letzte Zeile aus Block
+ bDoRow = sal_True; // letzte Zeile aus Block
}
if ( bDoRow )
@@ -1660,7 +1660,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
}
}
- if ( aMultiMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat )
+ if ( aMultiMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat )
{
if ( !pMergeFlag->IsOverlapped() )
{
@@ -1685,7 +1685,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
}
else // !bTestMerge
{
- if ( aMultiMark.IsCellMarked( nX, nY, TRUE ) == bRepeat &&
+ if ( aMultiMark.IsCellMarked( nX, nY, sal_True ) == bRepeat &&
nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
{
aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index ace5b14d82f5..e5cfd3c8eb05 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -86,22 +86,22 @@ ScHideTextCursor::~ScHideTextCursor()
{
// restore text cursor
if ( pViewData->HasEditView(eWhich) && pWin->HasFocus() )
- pViewData->GetEditView(eWhich)->ShowCursor( FALSE, TRUE );
+ pViewData->GetEditView(eWhich)->ShowCursor( false, sal_True );
}
}
// -----------------------------------------------------------------------
-BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
+sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
ScAddress aCellPos( nPosX, nPosY, nTab );
String aTrackText;
- BOOL bLeftEdge = FALSE;
+ sal_Bool bLeftEdge = false;
// Change-Tracking
@@ -175,7 +175,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
// bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle
if ( pFound->GetType() == SC_CAT_DELETE_COLS )
- bLeftEdge = TRUE;
+ bLeftEdge = sal_True;
DateTime aDT = pFound->GetDateTime();
aTrackText = pFound->GetUser();
@@ -202,23 +202,23 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
const ScPostIt* pNote = pDoc->GetNote( aCellPos );
if ( (aTrackText.Len() > 0) || (pNote && !pNote->IsCaptionShown()) )
{
- BOOL bNew = TRUE;
- BOOL bFast = FALSE;
+ sal_Bool bNew = sal_True;
+ sal_Bool bFast = false;
if ( pNoteMarker ) // schon eine Notiz angezeigt
{
if ( pNoteMarker->GetDocPos() == aCellPos ) // dieselbe
- bNew = FALSE; // dann stehenlassen
+ bNew = false; // dann stehenlassen
else
- bFast = TRUE; // sonst sofort
+ bFast = sal_True; // sonst sofort
// marker which was shown for ctrl-F1 isn't removed by mouse events
if ( pNoteMarker->IsByKeyboard() && !bKeyboard )
- bNew = FALSE;
+ bNew = false;
}
if ( bNew )
{
if ( bKeyboard )
- bFast = TRUE; // keyboard also shows the marker immediately
+ bFast = sal_True; // keyboard also shows the marker immediately
delete pNoteMarker;
@@ -233,7 +233,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
/* If caption is shown from right or bottom windows, adjust
mapmode to include size of top-left window. */
- MapMode aMapMode = GetDrawMapMode( TRUE );
+ MapMode aMapMode = GetDrawMapMode( sal_True );
Size aLeftSize = pLeft->PixelToLogic( pLeft->GetOutputSizePixel(), aMapMode );
Point aOrigin = aMapMode.GetOrigin();
if( (this == pRight) || (this == pDiagonal) )
@@ -247,7 +247,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
aMapMode, bLeftEdge, bFast, bKeyboard );
}
- bDone = TRUE; // something is shown (old or new)
+ bDone = sal_True; // something is shown (old or new)
}
return bDone;
@@ -257,11 +257,11 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
{
- BOOL bDone = FALSE;
- BOOL bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0;
+ sal_Bool bDone = false;
+ sal_Bool bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0;
SdrView* pDrView = pViewData->GetScDrawView();
- BOOL bDrawTextEdit = FALSE;
+ sal_Bool bDrawTextEdit = false;
if (pDrView)
bDrawTextEdit = pDrView->IsTextEdit();
@@ -274,10 +274,10 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
SCsROW nPosY;
pViewData->GetPosFromPixel( aPosPixel.X(), aPosPixel.Y(), eWhich, nPosX, nPosY );
- if ( ShowNoteMarker( nPosX, nPosY, FALSE ) )
+ if ( ShowNoteMarker( nPosX, nPosY, false ) )
{
Window::RequestHelp( rHEvt ); // alte Tip/Balloon ausschalten
- bDone = TRUE;
+ bDone = sal_True;
}
}
@@ -373,8 +373,8 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
ScHideTextCursor aHideCursor( pViewData, eWhich ); // MapMode is changed in GetEditArea
- // bForceToTop = FALSE, use the cell's real position
- aPixRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, FALSE );
+ // bForceToTop = sal_False, use the cell's real position
+ aPixRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false );
}
}
@@ -388,7 +388,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
Help::ShowQuickHelp(this,aScreenRect, aHelpText);
- bDone = TRUE;
+ bDone = sal_True;
}
}
@@ -406,13 +406,13 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( nMouseStatus == SC_GM_TABDOWN && pViewData->GetRefType() == SC_REFTYPE_FILL &&
Help::IsQuickHelpEnabled() )
- bDone = TRUE;
+ bDone = sal_True;
if (!bDone)
Window::RequestHelp( rHEvt );
}
-BOOL ScGridWindow::IsMyModel(SdrEditView* pSdrView)
+sal_Bool ScGridWindow::IsMyModel(SdrEditView* pSdrView)
{
return pSdrView &&
pSdrView->GetModel() == pViewData->GetDocument()->GetDrawLayer();
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index e190e7dc6a0d..c8f6a4577158 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -67,7 +67,7 @@
//==================================================================
ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEngine,
- SCCOLROW nNewSize, USHORT nNewFlags ) :
+ SCCOLROW nNewSize, sal_uInt16 nNewFlags ) :
Window ( pParent ),
pSelEngine ( pSelectionEngine ),
nFlags ( nNewFlags ),
@@ -75,24 +75,24 @@ ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEn
nSize ( nNewSize ),
nMarkStart ( 0 ),
nMarkEnd ( 0 ),
- bMarkRange ( FALSE ),
- bDragging ( FALSE ),
- bIgnoreMove ( FALSE )
+ bMarkRange ( false ),
+ bDragging ( false ),
+ bIgnoreMove ( false )
{
// --- RTL --- no default mirroring for this window, the spreadsheet itself
// is also not mirrored
// mirror the vertical window for correct border drawing
// table layout depends on sheet format, not UI setting, so the
// borders of the vertical window have to be handled manually, too.
- EnableRTL( FALSE );
+ EnableRTL( false );
aNormFont = GetFont();
- aNormFont.SetTransparent( TRUE ); //! WEIGHT_NORMAL hart setzen ???
+ aNormFont.SetTransparent( sal_True ); //! WEIGHT_NORMAL hart setzen ???
aBoldFont = aNormFont;
aBoldFont.SetWeight( WEIGHT_BOLD );
SetFont(aBoldFont);
- bBoldSet = TRUE;
+ bBoldSet = sal_True;
Size aSize = LogicToPixel( Size(
GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("8888")) ),
@@ -128,7 +128,7 @@ ScHeaderControl::~ScHeaderControl()
void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd )
{
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nLayoutSign = bLayoutRTL ? -1 : 1;
Rectangle aRect( Point(0,0), GetOutputSizePixel() );
@@ -145,15 +145,15 @@ void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd )
Invalidate(aRect);
}
-void ScHeaderControl::SetMark( BOOL bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd )
+void ScHeaderControl::SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd )
{
- BOOL bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader(); //! cachen?
+ sal_Bool bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader(); //! cachen?
if (!bEnabled)
- bNewSet = FALSE;
+ bNewSet = false;
// Variablen setzen
- BOOL bOldSet = bMarkRange;
+ sal_Bool bOldSet = bMarkRange;
SCCOLROW nOldStart = nMarkStart;
SCCOLROW nOldEnd = nMarkEnd;
PutInOrder( nNewStart, nNewEnd );
@@ -205,7 +205,7 @@ long ScHeaderControl::GetScrPos( SCCOLROW nEntryNo )
nScrPos = 0;
for (SCCOLROW i=GetPos(); i<nEntryNo && nScrPos<nMax; i++)
{
- USHORT nAdd = GetEntrySize(i);
+ sal_uInt16 nAdd = GetEntrySize(i);
if (nAdd)
nScrPos += nAdd;
else
@@ -270,8 +270,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
// Linien zusammengefasst
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bHighContrast = rStyleSettings.GetHighContrastMode();
- BOOL bDark = rStyleSettings.GetFaceColor().IsDark();
+ sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode();
+ sal_Bool bDark = rStyleSettings.GetFaceColor().IsDark();
// Use the same distinction for bDark as in Window::DrawSelectionBackground
Color aTextColor = rStyleSettings.GetButtonTextColor();
@@ -287,19 +287,19 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
Color aSelLineColor = rStyleSettings.GetHighlightColor();
aSelLineColor.Merge( aBlack, 0xe0 ); // darken just a little bit
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nLayoutSign = bLayoutRTL ? -1 : 1;
- BOOL bMirrored = IsMirrored();
+ sal_Bool bMirrored = IsMirrored();
String aString;
- USHORT nBarSize;
+ sal_uInt16 nBarSize;
Point aScrPos;
Size aTextSize;
if (bVertical)
- nBarSize = (USHORT) GetSizePixel().Width();
+ nBarSize = (sal_uInt16) GetSizePixel().Width();
else
- nBarSize = (USHORT) GetSizePixel().Height();
+ nBarSize = (sal_uInt16) GetSizePixel().Height();
SCCOLROW nPos = GetPos();
@@ -331,7 +331,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
for (SCCOLROW i=nPos; i<nSize; i++)
{
- USHORT nSizePix = GetEntrySize( i );
+ sal_uInt16 nSizePix = GetEntrySize( i );
if (nSizePix)
{
nLineEnd += nSizePix * nLayoutSign;
@@ -453,7 +453,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
// borders, light border at top isn't used anymore
// use SC_HDRPAINT_SEL_BOTTOM for different color
- for (USHORT nPass = SC_HDRPAINT_SEL_BOTTOM; nPass < SC_HDRPAINT_COUNT; nPass++)
+ for (sal_uInt16 nPass = SC_HDRPAINT_SEL_BOTTOM; nPass < SC_HDRPAINT_COUNT; nPass++)
{
// set line color etc. before entry loop
switch ( nPass )
@@ -483,7 +483,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
else
aTransRect = Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 );
SetBackground( Color( rStyleSettings.GetFaceColor() ) );
- DrawSelectionBackground( aTransRect, 0, TRUE, FALSE, FALSE );
+ DrawSelectionBackground( aTransRect, 0, sal_True, false, false );
SetBackground();
}
break;
@@ -503,7 +503,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
nScrPos = nPEnd + nLayoutSign; // beyond nPEnd -> stop
else
{
- USHORT nSizePix = GetEntrySize( nEntryNo );
+ sal_uInt16 nSizePix = GetEntrySize( nEntryNo );
if (nSizePix == 0)
{
@@ -519,8 +519,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
else
aEndPos = Point( aScrPos.X()+(nSizePix-1)*nLayoutSign, aScrPos.Y()+nBarSize-1 );
- BOOL bMark = bMarkRange && nEntryNo >= nMarkStart && nEntryNo <= nMarkEnd;
- BOOL bNextToMark = bMarkRange && nEntryNo + 1 >= nMarkStart && nEntryNo <= nMarkEnd;
+ sal_Bool bMark = bMarkRange && nEntryNo >= nMarkStart && nEntryNo <= nMarkEnd;
+ sal_Bool bNextToMark = bMarkRange && nEntryNo + 1 >= nMarkStart && nEntryNo <= nMarkEnd;
switch ( nPass )
{
@@ -598,9 +598,9 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
// Maus - Handling
//
-SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder )
+SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, sal_Bool& rBorder )
{
- BOOL bFound=FALSE;
+ sal_Bool bFound=false;
SCCOLROW nCount = 1;
SCCOLROW nPos = GetPos();
SCCOLROW nHitNo = nPos;
@@ -610,7 +610,7 @@ SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder )
Size aSize = GetOutputSizePixel();
long nWinSize = bVertical ? aSize.Height() : aSize.Width();
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nLayoutSign = bLayoutRTL ? -1 : 1;
long nEndPos = bLayoutRTL ? -1 : nWinSize;
@@ -627,7 +627,7 @@ SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder )
nDif = nMousePos - nScrPos;
if (nDif >= -2 && nDif <= 2 && nCount > 0)
{
- bFound=TRUE;
+ bFound=sal_True;
nHitNo=nEntryNo-1;
}
else if (nDif * nLayoutSign >= 0 && nEntryNo < nSize)
@@ -647,7 +647,7 @@ bool ScHeaderControl::IsSelectionAllowed(SCCOLROW nPos) const
return false;
ScViewData* pViewData = pViewSh->GetViewData();
- USHORT nTab = pViewData->GetTabNo();
+ sal_uInt16 nTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
const ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
bool bSelectAllowed = true;
@@ -684,10 +684,10 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
if (IsDisabled())
return;
- bIgnoreMove = FALSE;
+ bIgnoreMove = false;
SelectWindow();
- BOOL bFound;
+ sal_Bool bFound;
SCCOLROW nHitNo = GetMousePos( rMEvt, bFound );
if (!IsSelectionAllowed(nHitNo))
return;
@@ -695,7 +695,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
if ( bFound && rMEvt.IsLeft() && ResizeAllowed() )
{
nDragNo = nHitNo;
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks && nClicks%2==0 )
{
SetEntrySize( nDragNo, HDR_SIZE_OPTIMUM );
@@ -712,8 +712,8 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
DrawInvert( nDragPos );
StartTracking();
- bDragging = TRUE;
- bDragMoved = FALSE;
+ bDragging = sal_True;
+ bDragMoved = false;
}
}
else if (rMEvt.IsLeft())
@@ -727,7 +727,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
aVis.Top() = LONG_MIN, aVis.Bottom() = LONG_MAX;
pSelEngine->SetVisibleArea( aVis );
- SetMarking( TRUE ); // muss vor SelMouseButtonDown sein
+ SetMarking( sal_True ); // muss vor SelMouseButtonDown sein
pSelEngine->SelMouseButtonDown( rMEvt );
// In column/row headers a simple click already is a selection.
@@ -750,18 +750,18 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& rMEvt )
if ( IsDisabled() )
return;
- SetMarking( FALSE );
- bIgnoreMove = FALSE;
+ SetMarking( false );
+ bIgnoreMove = false;
if ( bDragging )
{
DrawInvert( nDragPos );
ReleaseMouse();
- bDragging = FALSE;
+ bDragging = false;
long nScrPos = GetScrPos( nDragNo );
long nMousePos = bVertical ? rMEvt.GetPosPixel().Y() : rMEvt.GetPosPixel().X();
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nNewWidth = bLayoutRTL ? ( nScrPos - nMousePos + 1 )
: ( nMousePos + 2 - nScrPos );
@@ -786,7 +786,7 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& rMEvt )
{
if (nNewWidth<0) nNewWidth=0;
if (bDragMoved)
- SetEntrySize( nDragNo, (USHORT) nNewWidth );
+ SetEntrySize( nDragNo, (sal_uInt16) nNewWidth );
}
}
else
@@ -804,7 +804,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt )
return;
}
- BOOL bFound;
+ sal_Bool bFound;
(void)GetMousePos( rMEvt, bFound );
if ( bDragging )
@@ -818,7 +818,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt )
DrawInvert( nDragPos );
if (nDragPos <= nDragStart-SC_DRAG_MIN || nDragPos >= nDragStart+SC_DRAG_MIN)
- bDragMoved = TRUE;
+ bDragMoved = sal_True;
}
}
else
@@ -848,7 +848,7 @@ void ScHeaderControl::Tracking( const TrackingEvent& rTEvt )
void ScHeaderControl::Command( const CommandEvent& rCEvt )
{
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_CONTEXTMENU )
{
StopMarking(); // Selektion / Dragging beenden
@@ -869,7 +869,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt )
SC_MOD()->InputEnterHandler(); // always end edit mode
MouseEvent aMEvt( rCEvt.GetMousePosPixel() );
- BOOL bBorder;
+ sal_Bool bBorder;
SCCOLROW nPos = GetMousePos( aMEvt, bBorder );
if (!IsSelectionAllowed(nPos))
// Selecting this cell is not allowed, neither is context menu.
@@ -886,7 +886,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt )
// see if any part of the range is already selected
ScRangeList aRanges;
- pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, FALSE );
+ pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, false );
bool bSelected = aRanges.Intersects(aNewRange);
// select the range if no part of it was selected
@@ -909,11 +909,11 @@ void ScHeaderControl::StopMarking()
if ( bDragging )
{
DrawInvert( nDragPos );
- bDragging = FALSE;
+ bDragging = false;
}
- SetMarking( FALSE );
- bIgnoreMove = TRUE;
+ SetMarking( false );
+ bIgnoreMove = sal_True;
// don't call pSelEngine->Reset, so selection across the parts of
// a split/frozen view is possible
@@ -926,7 +926,7 @@ void ScHeaderControl::ShowDragHelp()
if (Help::IsQuickHelpEnabled())
{
long nScrPos = GetScrPos( nDragNo );
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nVal = bLayoutRTL ? ( nScrPos - nDragPos + 1 )
: ( nDragPos + 2 - nScrPos );
@@ -937,7 +937,7 @@ void ScHeaderControl::ShowDragHelp()
Point aMousePos = OutputToScreenPixel(GetPointerPosPixel());
Rectangle aRect;
- USHORT nAlign;
+ sal_uInt16 nAlign;
if (!bVertical)
{
// oberhalb
@@ -965,7 +965,7 @@ void ScHeaderControl::RequestHelp( const HelpEvent& rHEvt )
// Wenn eigene QuickHelp angezeigt wird, nicht durch RequestHelp
// wieder wegnehmen lassen
- BOOL bOwn = bDragging && Help::IsQuickHelpEnabled();
+ sal_Bool bOwn = bDragging && Help::IsQuickHelpEnabled();
if (!bOwn)
Window::RequestHelp(rHEvt);
}
@@ -985,24 +985,24 @@ SCCOLROW ScHeaderControl::GetHiddenCount( SCCOLROW nEntryNo )
return nHidden;
}
-BOOL ScHeaderControl::IsLayoutRTL()
+sal_Bool ScHeaderControl::IsLayoutRTL()
{
- return FALSE;
+ return false;
}
-BOOL ScHeaderControl::IsMirrored()
+sal_Bool ScHeaderControl::IsMirrored()
{
- return FALSE;
+ return false;
}
-BOOL ScHeaderControl::IsDisabled()
+sal_Bool ScHeaderControl::IsDisabled()
{
- return FALSE;
+ return false;
}
-BOOL ScHeaderControl::ResizeAllowed()
+sal_Bool ScHeaderControl::ResizeAllowed()
{
- return TRUE;
+ return sal_True;
}
void ScHeaderControl::SelectWindow()
@@ -1018,7 +1018,7 @@ String ScHeaderControl::GetDragHelp( long /* nVal */ )
return EMPTY_STRING;
}
-void ScHeaderControl::SetMarking( BOOL /* bSet */ )
+void ScHeaderControl::SetMarking( sal_Bool /* bSet */ )
{
}
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index 0343ccfd7e00..595531ac8655 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -56,7 +56,7 @@ ScHintWindow::ScHintWindow( Window* pParent, const String& rTit, const String& r
SetBackground( aYellow );
aTextFont = GetFont();
- aTextFont.SetTransparent( TRUE );
+ aTextFont.SetTransparent( sal_True );
aTextFont.SetWeight( WEIGHT_NORMAL );
aHeadFont = aTextFont;
aHeadFont.SetWeight( WEIGHT_BOLD );
diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx
index 88e78ccf1ee6..3be7c801049d 100644
--- a/sc/source/ui/view/imapwrap.cxx
+++ b/sc/source/ui/view/imapwrap.cxx
@@ -37,7 +37,7 @@
#include <sfx2/viewfrm.hxx>
-USHORT ScIMapChildWindowId()
+sal_uInt16 ScIMapChildWindowId()
{
return SvxIMapDlgChildWindow::GetChildWindowId();
}
diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx
index cb913677e962..c65b29ba1a6e 100644
--- a/sc/source/ui/view/invmerge.cxx
+++ b/sc/source/ui/view/invmerge.cxx
@@ -164,7 +164,7 @@ void ScInvertMerger::AddRect( const Rectangle& rRect )
}
else
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( aJustified.Top() == aLineRect.Top() &&
aJustified.Bottom() == aLineRect.Bottom() )
{
@@ -172,12 +172,12 @@ void ScInvertMerger::AddRect( const Rectangle& rRect )
if ( aJustified.Left() == aLineRect.Right() + 1 )
{
aLineRect.Right() = aJustified.Right();
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( aJustified.Right() + 1 == aLineRect.Left() ) // for RTL layout
{
aLineRect.Left() = aJustified.Left();
- bDone = TRUE;
+ bDone = sal_True;
}
}
if (!bDone)
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 4deb56ab61e1..f43b8e2985ab 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -49,7 +49,7 @@
ScNoteMarker::ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Window* pDiagonal,
ScDocument* pD, ScAddress aPos, const String& rUser,
- const MapMode& rMap, BOOL bLeftEdge, BOOL bForce, BOOL bKeyboard ) :
+ const MapMode& rMap, sal_Bool bLeftEdge, sal_Bool bForce, sal_Bool bKeyboard ) :
pWindow( pWin ),
pRightWin( pRight ),
pBottomWin( pBottom ),
@@ -62,7 +62,7 @@ ScNoteMarker::ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Windo
bByKeyboard( bKeyboard ),
pModel( NULL ),
pObject( NULL ),
- bVisible( FALSE )
+ bVisible( false )
{
Size aSizePixel = pWindow->GetOutputSizePixel();
if( pRightWin )
@@ -105,7 +105,7 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, EMPTYARG )
rOutliner.SetRefDevice(pPrinter);
}
- if( SdrPage* pPage = pModel->AllocPage( FALSE ) )
+ if( SdrPage* pPage = pModel->AllocPage( false ) )
{
pObject = ScNoteUtil::CreateTempCaption( *pDoc, aDocPos, *pPage, aUserText, aVisRect, bLeft );
if( pObject )
@@ -115,7 +115,7 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, EMPTYARG )
pModel->InsertPage( pPage );
}
- bVisible = TRUE;
+ bVisible = sal_True;
}
Draw();
@@ -127,7 +127,7 @@ void lcl_DrawWin( SdrObject* pObject, Window* pWindow, const MapMode& rMap )
MapMode aOld = pWindow->GetMapMode();
pWindow->SetMapMode( rMap );
- ULONG nOldDrawMode = pWindow->GetDrawMode();
+ sal_uLong nOldDrawMode = pWindow->GetDrawMode();
if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pWindow->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 1340547e66e1..7f1eeaa3ba80 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -47,10 +47,10 @@ const long SC_OL_POSOFFSET = 2;
const size_t SC_OL_NOLEVEL = static_cast< size_t >( -1 );
const size_t SC_OL_HEADERENTRY = static_cast< size_t >( -1 );
-const USHORT SC_OL_IMAGE_PLUS = 9;
-const USHORT SC_OL_IMAGE_MINUS = SC_OL_IMAGE_PLUS + 1;
-const USHORT SC_OL_IMAGE_NOTPRESSED = SC_OL_IMAGE_MINUS + 1;
-const USHORT SC_OL_IMAGE_PRESSED = SC_OL_IMAGE_NOTPRESSED + 1;
+const sal_uInt16 SC_OL_IMAGE_PLUS = 9;
+const sal_uInt16 SC_OL_IMAGE_MINUS = SC_OL_IMAGE_PLUS + 1;
+const sal_uInt16 SC_OL_IMAGE_NOTPRESSED = SC_OL_IMAGE_MINUS + 1;
+const sal_uInt16 SC_OL_IMAGE_PRESSED = SC_OL_IMAGE_NOTPRESSED + 1;
// ============================================================================
@@ -73,7 +73,7 @@ ScOutlineWindow::ScOutlineWindow( Window* pParent, ScOutlineMode eMode, ScViewDa
mnFocusEntry( SC_OL_HEADERENTRY ),
mbDontDrawFocus( false )
{
- EnableRTL( FALSE ); // mirroring is done manually
+ EnableRTL( false ); // mirroring is done manually
InitSettings();
maFocusRect.SetEmpty();
@@ -95,7 +95,7 @@ ScOutlineWindow::~ScOutlineWindow()
void ScOutlineWindow::SetHeaderSize( long nNewSize )
{
- BOOL bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() );
+ sal_Bool bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() );
mbMirrorEntries = bLayoutRTL && mbHoriz;
mbMirrorLevels = bLayoutRTL && !mbHoriz;
@@ -179,7 +179,7 @@ const ScOutlineArray* ScOutlineWindow::GetOutlineArray() const
const ScOutlineEntry* ScOutlineWindow::GetOutlineEntry( size_t nLevel, size_t nEntry ) const
{
const ScOutlineArray* pArray = GetOutlineArray();
- return pArray ? pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) ) : NULL;
+ return pArray ? pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ) : NULL;
}
bool ScOutlineWindow::IsHidden( SCCOLROW nColRowIndex ) const
@@ -270,8 +270,8 @@ size_t ScOutlineWindow::GetLevelFromPos( long nLevelPos ) const
long ScOutlineWindow::GetColRowPos( SCCOLROW nColRowIndex ) const
{
long nDocPos = mbHoriz ?
- mrViewData.GetScrPos( static_cast<SCCOL>(nColRowIndex), 0, meWhich, TRUE ).X() :
- mrViewData.GetScrPos( 0, static_cast<SCROW>(nColRowIndex), meWhich, TRUE ).Y();
+ mrViewData.GetScrPos( static_cast<SCCOL>(nColRowIndex), 0, meWhich, sal_True ).X() :
+ mrViewData.GetScrPos( 0, static_cast<SCROW>(nColRowIndex), meWhich, sal_True ).Y();
return mnMainFirstPos + nDocPos;
}
@@ -413,13 +413,13 @@ bool ScOutlineWindow::ItemHit( const Point& rPos, size_t& rnLevel, size_t& rnEnt
// --- expand/collapse buttons and expanded lines ---
// search outline entries backwards
- size_t nEntry = pArray->GetCount( sal::static_int_cast<USHORT>(nLevel) );
+ size_t nEntry = pArray->GetCount( sal::static_int_cast<sal_uInt16>(nLevel) );
while ( nEntry )
{
--nEntry;
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel),
- sal::static_int_cast<USHORT>(nEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel),
+ sal::static_int_cast<sal_uInt16>(nEntry) );
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -471,16 +471,16 @@ void ScOutlineWindow::DoFunction( size_t nLevel, size_t nEntry ) const
{
ScDBFunc& rFunc = *mrViewData.GetView();
if ( nEntry == SC_OL_HEADERENTRY )
- rFunc.SelectLevel( mbHoriz, sal::static_int_cast<USHORT>(nLevel) );
+ rFunc.SelectLevel( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel) );
else
{
const ScOutlineEntry* pEntry = GetOutlineEntry( nLevel, nEntry );
if ( pEntry )
{
if ( pEntry->IsHidden() )
- rFunc.ShowOutline( mbHoriz, sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) );
+ rFunc.ShowOutline( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) );
else
- rFunc.HideOutline( mbHoriz, sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) );
+ rFunc.HideOutline( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) );
}
}
}
@@ -542,7 +542,7 @@ void ScOutlineWindow::DrawRectRel(
DrawRect( GetRectangle( nLevelStart, nEntryStart, nLevelEnd, nEntryEnd ) );
}
-void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, USHORT nId )
+void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId )
{
DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawImageRel - no images" );
const Image& rImage = mpSymbols->GetImage( nId );
@@ -559,7 +559,7 @@ void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed
if ( GetImagePos( nLevel, nEntry, aPos ) )
{
DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawBorderRel - no images" );
- USHORT nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED;
+ sal_uInt16 nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED;
bool bClip = (nEntry != SC_OL_HEADERENTRY);
if ( bClip )
SetEntryAreaClipRegion();
@@ -633,7 +633,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
{
long nEntryPos = GetHeaderEntryPos();
for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel )
- DrawImageRel( GetLevelPos( nLevel ), nEntryPos, static_cast< USHORT >( nLevel + 1 ) );
+ DrawImageRel( GetLevelPos( nLevel ), nEntryPos, static_cast< sal_uInt16 >( nLevel + 1 ) );
SetLineColor( maLineColor );
long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1));
@@ -652,7 +652,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
long nLevelPos = GetLevelPos( nLevel );
long nEntryPos1 = 0, nEntryPos2 = 0, nImagePos = 0;
- size_t nEntryCount = pArray->GetCount( sal::static_int_cast<USHORT>(nLevel) );
+ size_t nEntryCount = pArray->GetCount( sal::static_int_cast<sal_uInt16>(nLevel) );
size_t nEntry;
// first draw all lines in the current level
@@ -660,8 +660,8 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
SetFillColor( maLineColor );
for ( nEntry = 0; nEntry < nEntryCount; ++nEntry )
{
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel),
- sal::static_int_cast<USHORT>(nEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel),
+ sal::static_int_cast<sal_uInt16>(nEntry) );
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -693,8 +693,8 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
{
--nEntry;
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel),
- sal::static_int_cast<USHORT>(nEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel),
+ sal::static_int_cast<sal_uInt16>(nEntry) );
SCCOLROW nStart = pEntry->GetStart();
// visible range?
@@ -705,7 +705,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
// draw, if not hidden by higher levels
if ( bDraw )
{
- USHORT nImageId = pEntry->IsHidden() ? SC_OL_IMAGE_PLUS : SC_OL_IMAGE_MINUS;
+ sal_uInt16 nImageId = pEntry->IsHidden() ? SC_OL_IMAGE_PLUS : SC_OL_IMAGE_MINUS;
DrawImageRel( nLevelPos, nImagePos, nImageId );
}
}
@@ -761,7 +761,7 @@ bool ScOutlineWindow::ImplMoveFocusByEntry( bool bForward, bool bFindVisible )
return false;
bool bWrapped = false;
- size_t nEntryCount = pArray->GetCount( sal::static_int_cast<USHORT>(mnFocusLevel) );
+ size_t nEntryCount = pArray->GetCount( sal::static_int_cast<sal_uInt16>(mnFocusLevel) );
// #i29530# entry count may be decreased after changing active sheet
if( mnFocusEntry >= nEntryCount )
mnFocusEntry = SC_OL_HEADERENTRY;
@@ -812,8 +812,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward )
}
else
{
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(mnFocusLevel),
- sal::static_int_cast<USHORT>(mnFocusEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(mnFocusLevel),
+ sal::static_int_cast<sal_uInt16>(mnFocusEntry) );
if ( pEntry )
{
SCCOLROW nStart = pEntry->GetStart();
@@ -827,8 +827,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward )
// next level -> find first child entry
nNewLevel = mnFocusLevel + 1;
// TODO - change ScOutlineArray interface to size_t usage
- USHORT nTmpEntry = 0;
- bFound = pArray->GetEntryIndexInRange( sal::static_int_cast<USHORT>(nNewLevel), nStart, nEnd, nTmpEntry );
+ sal_uInt16 nTmpEntry = 0;
+ bFound = pArray->GetEntryIndexInRange( sal::static_int_cast<sal_uInt16>(nNewLevel), nStart, nEnd, nTmpEntry );
nNewEntry = nTmpEntry;
}
else if ( !bForward && (mnFocusLevel > 0) )
@@ -836,8 +836,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward )
// previous level -> find parent entry
nNewLevel = mnFocusLevel - 1;
// TODO - change ScOutlineArray interface to size_t usage
- USHORT nTmpEntry = 0;
- bFound = pArray->GetEntryIndex( sal::static_int_cast<USHORT>(nNewLevel), nStart, nTmpEntry );
+ sal_uInt16 nTmpEntry = 0;
+ bFound = pArray->GetEntryIndex( sal::static_int_cast<sal_uInt16>(nNewLevel), nStart, nTmpEntry );
nNewEntry = nTmpEntry;
}
@@ -999,7 +999,7 @@ void ScOutlineWindow::KeyInput( const KeyEvent& rKEvt )
bool bShift = (rKCode.GetModifier() == KEY_SHIFT);
bool bCtrl = (rKCode.GetModifier() == KEY_MOD1);
- USHORT nCode = rKCode.GetCode();
+ sal_uInt16 nCode = rKCode.GetCode();
bool bUpDownKey = (nCode == KEY_UP) || (nCode == KEY_DOWN);
bool bLeftRightKey = (nCode == KEY_LEFT) || (nCode == KEY_RIGHT);
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 8fbe8819fc46..421038b24a46 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -91,7 +91,7 @@ private:
const ScAppOptions& rOpt;
const ScStrCollection& rUsers;
String aLastUserName;
- USHORT nLastUserIndex;
+ sal_uInt16 nLastUserIndex;
ColorData nColor;
public:
@@ -142,7 +142,7 @@ void ScActionColorChanger::Update( const ScChangeAction& rAction )
{
aLastUserName = rAction.GetUser();
StrData aData(aLastUserName);
- USHORT nIndex;
+ sal_uInt16 nIndex;
if (!rUsers.Search(&aData, nIndex))
{
// empty string is possible if a name wasn't found while saving a 5.0 file
@@ -183,25 +183,25 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
pEditObj( NULL ),
pViewShell( NULL ),
pDrawView( NULL ), // #114135#
- bEditMode( FALSE ),
- bMetaFile( FALSE ),
- bSingleGrid( FALSE ),
- bPagebreakMode( FALSE ),
- bSolidBackground( FALSE ),
- bUseStyleColor( FALSE ),
+ bEditMode( false ),
+ bMetaFile( false ),
+ bSingleGrid( false ),
+ bPagebreakMode( false ),
+ bSolidBackground( false ),
+ bUseStyleColor( false ),
bForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ),
- bSyntaxMode( FALSE ),
+ bSyntaxMode( false ),
pValueColor( NULL ),
pTextColor( NULL ),
pFormulaColor( NULL ),
aGridColor( COL_BLACK ),
- bShowNullValues( TRUE ),
- bShowFormulas( FALSE ),
- bShowSpellErrors( FALSE ),
- bMarkClipped( FALSE ), // FALSE fuer Drucker/Metafile etc.
- bSnapPixel( FALSE ),
- bAnyRotated( FALSE ),
- bAnyClipped( FALSE ),
+ bShowNullValues( sal_True ),
+ bShowFormulas( false ),
+ bShowSpellErrors( false ),
+ bMarkClipped( false ), // sal_False fuer Drucker/Metafile etc.
+ bSnapPixel( false ),
+ bAnyRotated( false ),
+ bAnyClipped( false ),
mpTargetPaintWindow(0) // #i74769# use SdrPaintWindow direct
{
if (pZoomX)
@@ -262,27 +262,27 @@ void ScOutputData::SetGridColor( const Color& rColor )
aGridColor = rColor;
}
-void ScOutputData::SetMarkClipped( BOOL bSet )
+void ScOutputData::SetMarkClipped( sal_Bool bSet )
{
bMarkClipped = bSet;
}
-void ScOutputData::SetShowNullValues( BOOL bSet )
+void ScOutputData::SetShowNullValues( sal_Bool bSet )
{
bShowNullValues = bSet;
}
-void ScOutputData::SetShowFormulas( BOOL bSet )
+void ScOutputData::SetShowFormulas( sal_Bool bSet )
{
bShowFormulas = bSet;
}
-void ScOutputData::SetShowSpellErrors( BOOL bSet )
+void ScOutputData::SetShowSpellErrors( sal_Bool bSet )
{
bShowSpellErrors = bSet;
}
-void ScOutputData::SetSnapPixel( BOOL bSet )
+void ScOutputData::SetSnapPixel( sal_Bool bSet )
{
bSnapPixel = bSet;
}
@@ -291,20 +291,20 @@ void ScOutputData::SetEditCell( SCCOL nCol, SCROW nRow )
{
nEditCol = nCol;
nEditRow = nRow;
- bEditMode = TRUE;
+ bEditMode = sal_True;
}
-void ScOutputData::SetMetaFileMode( BOOL bNewMode )
+void ScOutputData::SetMetaFileMode( sal_Bool bNewMode )
{
bMetaFile = bNewMode;
}
-void ScOutputData::SetSingleGrid( BOOL bNewMode )
+void ScOutputData::SetSingleGrid( sal_Bool bNewMode )
{
bSingleGrid = bNewMode;
}
-void ScOutputData::SetSyntaxMode( BOOL bNewMode )
+void ScOutputData::SetSyntaxMode( sal_Bool bNewMode )
{
bSyntaxMode = bNewMode;
if (bNewMode)
@@ -316,7 +316,7 @@ void ScOutputData::SetSyntaxMode( BOOL bNewMode )
}
}
-void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
+void ScOutputData::DrawGrid( sal_Bool bGrid, sal_Bool bPage )
{
SCCOL nX;
SCROW nY;
@@ -326,12 +326,12 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
ScBreakType nBreak = BREAK_NONE;
ScBreakType nBreakOld = BREAK_NONE;
- BOOL bSingle;
+ sal_Bool bSingle;
Color aPageColor;
Color aManualColor;
if (bPagebreakMode)
- bPage = FALSE; // keine "normalen" Umbrueche ueber volle Breite/Hoehe
+ bPage = false; // keine "normalen" Umbrueche ueber volle Breite/Hoehe
//! um den einen Pixel sieht das Metafile (oder die Druck-Ausgabe) anders aus
//! als die Bildschirmdarstellung, aber wenigstens passen Druck und Metafile zusammen
@@ -372,7 +372,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
{
SCCOL nXplus1 = nX+1;
SCCOL nXplus2 = nX+2;
- USHORT nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth;
+ sal_uInt16 nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth;
if (nWidth)
{
nPosX += nWidth * nLayoutSign;
@@ -400,9 +400,9 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
}
}
- BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
+ sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- USHORT nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
+ sal_uInt16 nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
bSingle = bSingleGrid; //! in Fillinfo holen !!!!!
if ( nX<MAXCOL && !bSingle )
{
@@ -410,9 +410,9 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
for (nArrY=1; nArrY+1<nArrCount && !bSingle; nArrY++)
{
if (pRowInfo[nArrY].pCellInfo[nXplus2].bHOverlapped)
- bSingle = TRUE;
+ bSingle = sal_True;
if (pRowInfo[nArrY].pCellInfo[nXplus1].bHideGrid)
- bSingle = TRUE;
+ bSingle = sal_True;
}
}
@@ -431,7 +431,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
nNextY = nPosY + pThisRowInfo->nHeight;
- BOOL bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid;
+ sal_Bool bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid;
if (!bHOver)
{
if (nWidthXplus2)
@@ -509,14 +509,14 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
}
}
- BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
+ sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- BOOL bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1);
+ sal_Bool bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1);
bSingle = !bNextYisNextRow; // Hidden
for (SCCOL i=nX1; i<=nX2 && !bSingle; i++)
{
if (pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped)
- bSingle = TRUE;
+ bSingle = sal_True;
}
if (bDraw)
@@ -535,7 +535,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
nNextX = nPosX + pRowInfo[0].pCellInfo[i+1].nWidth * nLayoutSign;
if (nNextX != nPosX) // sichtbar
{
- BOOL bVOver;
+ sal_Bool bVOver;
if ( bNextYisNextRow )
bVOver = pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped;
else
@@ -569,15 +569,15 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
{
- bPagebreakMode = TRUE;
+ bPagebreakMode = sal_True;
if (!pPageData)
return; // noch nicht initialisiert -> alles "nicht gedruckt"
// gedruckten Bereich markieren
- // (in FillInfo ist schon alles auf FALSE initialisiert)
+ // (in FillInfo ist schon alles auf sal_False initialisiert)
- USHORT nRangeCount = sal::static_int_cast<USHORT>(pPageData->GetCount());
- for (USHORT nPos=0; nPos<nRangeCount; nPos++)
+ sal_uInt16 nRangeCount = sal::static_int_cast<sal_uInt16>(pPageData->GetCount());
+ for (sal_uInt16 nPos=0; nPos<nRangeCount; nPos++)
{
ScRange aRange = pPageData->GetData( nPos ).GetPrintRange();
@@ -593,7 +593,7 @@ void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
pThisRowInfo->nRowNo <= nEndY )
{
for (SCCOL nX=nStartX; nX<=nEndX; nX++)
- pThisRowInfo->pCellInfo[nX+1].bPrinted = TRUE;
+ pThisRowInfo->pCellInfo[nX+1].bPrinted = sal_True;
}
}
}
@@ -630,11 +630,11 @@ void ScOutputData::FindRotated()
if ( pPattern ) // Spalte nicht ausgeblendet
{
- BYTE nDir = pPattern->GetRotateDir( pCondSet );
+ sal_uInt8 nDir = pPattern->GetRotateDir( pCondSet );
if (nDir != SC_ROTDIR_NONE)
{
pInfo->nRotateDir = nDir;
- bAnyRotated = TRUE;
+ bAnyRotated = sal_True;
}
}
}
@@ -644,12 +644,12 @@ void ScOutputData::FindRotated()
// ----------------------------------------------------------------------------
-USHORT lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_uInt16 lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
- USHORT nRet = SC_ROTDIR_NONE;
+ sal_uInt16 nRet = SC_ROTDIR_NONE;
long nAttrRotate = pPattern->GetRotateVal( pCondSet );
if ( nAttrRotate )
@@ -684,7 +684,7 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow
const SvxBrushItem* pBackground = (const SvxBrushItem*)
&pPattern->GetItem( ATTR_BACKGROUND, pCondSet );
- USHORT nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab );
+ sal_uInt16 nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab );
// CENTER wird wie RIGHT behandelt...
if ( nDir == SC_ROTDIR_RIGHT || nDir == SC_ROTDIR_CENTER )
@@ -717,12 +717,12 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow
// ----------------------------------------------------------------------------
-BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
- SCCOL nX1, SCCOL nX2, BOOL bShowProt, BOOL bPagebreakMode )
+sal_Bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
+ SCCOL nX1, SCCOL nX2, sal_Bool bShowProt, sal_Bool bPagebreakMode )
{
if ( rFirst.bChanged != rOther.bChanged ||
rFirst.bEmptyBack != rOther.bEmptyBack )
- return FALSE;
+ return false;
SCCOL nX;
if ( bShowProt )
@@ -733,27 +733,27 @@ BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
const ScPatternAttr* pPat2 = rOther.pCellInfo[nX+1].pPatternAttr;
if ( !pPat1 || !pPat2 ||
&pPat1->GetItem(ATTR_PROTECTION) != &pPat2->GetItem(ATTR_PROTECTION) )
- return FALSE;
+ return false;
}
}
else
{
for ( nX=nX1; nX<=nX2; nX++ )
if ( rFirst.pCellInfo[nX+1].pBackground != rOther.pCellInfo[nX+1].pBackground )
- return FALSE;
+ return false;
}
if ( rFirst.nRotMaxCol != SC_ROTMAX_NONE || rOther.nRotMaxCol != SC_ROTMAX_NONE )
for ( nX=nX1; nX<=nX2; nX++ )
if ( rFirst.pCellInfo[nX+1].nRotateDir != rOther.pCellInfo[nX+1].nRotateDir )
- return FALSE;
+ return false;
if ( bPagebreakMode )
for ( nX=nX1; nX<=nX2; nX++ )
if ( rFirst.pCellInfo[nX+1].bPrinted != rOther.pCellInfo[nX+1].bPrinted )
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
void ScOutputData::DrawDocumentBackground()
@@ -787,11 +787,11 @@ void ScOutputData::DrawBackground()
pDev->SetLineColor();
- BOOL bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab);
- BOOL bDoAll = bShowProt || bPagebreakMode || bSolidBackground;
+ sal_Bool bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab);
+ sal_Bool bDoAll = bShowProt || bPagebreakMode || bSolidBackground;
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor &&
+ sal_Bool bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
long nPosY = nScrY;
@@ -900,16 +900,16 @@ void ScOutputData::DrawBackground()
void ScOutputData::DrawShadow()
{
- DrawExtraShadow( FALSE, FALSE, FALSE, FALSE );
+ DrawExtraShadow( false, false, false, false );
}
-void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom)
+void ScOutputData::DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom)
{
pDev->SetLineColor();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
+ sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
Color aAutoTextColor;
if ( bCellContrast )
aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
@@ -926,8 +926,8 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot
long nPosY = nScrY - pRowInfo[0].nHeight;
for (SCSIZE nArrY=0; nArrY<nArrCount; nArrY++)
{
- BOOL bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount );
- BOOL bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom );
+ sal_Bool bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount );
+ sal_Bool bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom );
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
long nRowHeight = pThisRowInfo->nHeight;
@@ -937,10 +937,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot
long nPosX = nInitPosX - pRowInfo[0].pCellInfo[nX1].nWidth * nLayoutSign;
for (SCCOL nArrX=nX1; nArrX<=nX2+2; nArrX++)
{
- BOOL bCornerX = ( nArrX==nX1 || nArrX==nX2+2 );
- BOOL bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight );
+ sal_Bool bCornerX = ( nArrX==nX1 || nArrX==nX2+2 );
+ sal_Bool bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight );
- for (USHORT nPass=0; nPass<2; nPass++) // horizontal / vertikal
+ for (sal_uInt16 nPass=0; nPass<2; nPass++) // horizontal / vertikal
{
const SvxShadowItem* pAttr = nPass ?
pThisRowInfo->pCellInfo[nArrX].pVShadowOrigin :
@@ -951,10 +951,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot
pThisRowInfo->pCellInfo[nArrX].eVShadowPart :
pThisRowInfo->pCellInfo[nArrX].eHShadowPart;
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
if ( (nPass==0 && bCornerX) || (nPass==1 && bCornerY) )
if ( ePart != SC_SHADOW_CORNER )
- bDo = FALSE;
+ bDo = false;
if (bDo)
{
@@ -1107,20 +1107,20 @@ long lclGetSnappedY( OutputDevice& rDev, long nPosY, bool bSnapPixel )
return (bSnapPixel && nPosY) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( 0, nPosY ) ) ).Height() : nPosY;
}
-size_t lclGetArrayColFromCellInfoX( USHORT nCellInfoX, USHORT nCellInfoFirstX, USHORT nCellInfoLastX, bool bRTL )
+size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoFirstX, sal_uInt16 nCellInfoLastX, bool bRTL )
{
return static_cast< size_t >( bRTL ? (nCellInfoLastX + 2 - nCellInfoX) : (nCellInfoX - nCellInfoFirstX) );
}
void ScOutputData::DrawFrame()
{
- ULONG nOldDrawMode = pDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pDev->GetDrawMode();
Color aSingleColor;
- BOOL bUseSingleColor = FALSE;
+ sal_Bool bUseSingleColor = false;
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
+ sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
// if a Calc OLE object is embedded in Draw/Impress, the VCL DrawMode is used
// for display mode / B&W printing. The VCL DrawMode handling doesn't work for lines
@@ -1131,18 +1131,18 @@ void ScOutputData::DrawFrame()
{
pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_WHITEFILL) );
aSingleColor.SetColor( COL_BLACK );
- bUseSingleColor = TRUE;
+ bUseSingleColor = sal_True;
}
else if ( ( nOldDrawMode & DRAWMODE_SETTINGSFILL ) && ( nOldDrawMode & DRAWMODE_SETTINGSLINE ) )
{
pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_SETTINGSFILL) );
aSingleColor = rStyleSettings.GetWindowTextColor(); // same as used in VCL for DRAWMODE_SETTINGSLINE
- bUseSingleColor = TRUE;
+ bUseSingleColor = sal_True;
}
else if ( bCellContrast )
{
aSingleColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
- bUseSingleColor = TRUE;
+ bUseSingleColor = sal_True;
}
const Color* pForceColor = bUseSingleColor ? &aSingleColor : 0;
@@ -1191,7 +1191,7 @@ void ScOutputData::DrawFrame()
// set X offset for left-to-right sheets; for right-to-left sheets this is done after for() loop
if( !bLayoutRTL )
rArray.SetXOffset( nOldSnapX );
- for( USHORT nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx )
+ for( sal_uInt16 nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx )
{
size_t nCol = lclGetArrayColFromCellInfoX( nInfoIdx, nX1, nX2, bLayoutRTL );
long nNewPosX = nOldPosX + pRowInfo[ 0 ].pCellInfo[ nInfoIdx ].nWidth * nLayoutSign;
@@ -1235,13 +1235,13 @@ void ScOutputData::DrawFrame()
// Linie unter der Zelle
const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
- SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nRotDir,
- BOOL bTopLine )
+ SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nRotDir,
+ sal_Bool bTopLine )
{
if ( nRotDir != SC_ROTDIR_LEFT && nRotDir != SC_ROTDIR_RIGHT )
return NULL;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
while (!bFound)
{
if ( nRotDir == SC_ROTDIR_LEFT )
@@ -1265,7 +1265,7 @@ const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( !pPattern->GetRotateVal( pCondSet ) ||
((const SvxRotateModeItem&)pPattern->GetItem(
ATTR_ROTATE_MODE, pCondSet)).GetValue() == SVX_ROTATE_MODE_STANDARD )
- bFound = TRUE;
+ bFound = sal_True;
}
if (bTopLine)
@@ -1384,7 +1384,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
+ sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
// color (pForceColor) is determined externally, including DrawMode changes
@@ -1432,7 +1432,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
{
if (nX==nX1) nPosX = nInitPosX; // calculated individually for preceding positions
- USHORT nArrX = nX + 1;
+ sal_uInt16 nArrX = nX + 1;
CellInfo* pInfo = &rThisRowInfo.pCellInfo[nArrX];
long nColWidth = pRowInfo[0].pCellInfo[nArrX].nWidth;
@@ -1590,7 +1590,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
nX = nX1 > 0 ? (nX1-1) : static_cast<SCCOL>(0);
for (; nX<=nX2+1; nX++) // sichtbarer Teil +- 1
{
- USHORT nArrX = nX + 1;
+ sal_uInt16 nArrX = nX + 1;
CellInfo& rInfo = rThisRowInfo.pCellInfo[nArrX];
if ( rInfo.nRotateDir > SC_ROTDIR_STANDARD &&
!rInfo.bHOverlapped && !rInfo.bVOverlapped )
@@ -1604,17 +1604,17 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
// horizontal: angrenzende Linie verlaengern
// (nur, wenn die gedrehte Zelle eine Umrandung hat)
- USHORT nDir = rInfo.nRotateDir;
+ sal_uInt16 nDir = rInfo.nRotateDir;
if ( rArray.GetCellStyleTop( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_TOP )
{
- svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, TRUE ), nPPTY );
+ svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, sal_True ), nPPTY );
rArray.SetCellStyleTop( nCol, nRow, aStyle );
if( nRow > 0 )
rArray.SetCellStyleBottom( nCol, nRow - 1, aStyle );
}
if ( rArray.GetCellStyleBottom( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_BOTTOM )
{
- svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, FALSE ), nPPTY );
+ svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, false ), nPPTY );
rArray.SetCellStyleBottom( nCol, nRow, aStyle );
if( nRow + 1 < rArray.GetRowCount() )
rArray.SetCellStyleTop( nCol, nRow + 1, aStyle );
@@ -1659,7 +1659,7 @@ PolyPolygon ScOutputData::GetChangedArea()
aDrawingRect.Left() = nScrX;
aDrawingRect.Right() = nScrX+nScrW-1;
- BOOL bHad = FALSE;
+ sal_Bool bHad = false;
long nPosY = nScrY;
SCSIZE nArrY;
for (nArrY=1; nArrY+1<nArrCount; nArrY++)
@@ -1671,14 +1671,14 @@ PolyPolygon ScOutputData::GetChangedArea()
if (!bHad)
{
aDrawingRect.Top() = nPosY;
- bHad = TRUE;
+ bHad = sal_True;
}
aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1;
}
else if (bHad)
{
aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) );
- bHad = FALSE;
+ bHad = false;
}
nPosY += pRowInfo[nArrY].nHeight;
}
@@ -1689,7 +1689,7 @@ PolyPolygon ScOutputData::GetChangedArea()
return aPoly;
}
-BOOL ScOutputData::SetChangedClip()
+sal_Bool ScOutputData::SetChangedClip()
{
PolyPolygon aPoly;
@@ -1697,7 +1697,7 @@ BOOL ScOutputData::SetChangedClip()
aDrawingRect.Left() = nScrX;
aDrawingRect.Right() = nScrX+nScrW-1;
- BOOL bHad = FALSE;
+ sal_Bool bHad = false;
long nPosY = nScrY;
SCSIZE nArrY;
for (nArrY=1; nArrY+1<nArrCount; nArrY++)
@@ -1709,14 +1709,14 @@ BOOL ScOutputData::SetChangedClip()
if (!bHad)
{
aDrawingRect.Top() = nPosY;
- bHad = TRUE;
+ bHad = sal_True;
}
aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1;
}
else if (bHad)
{
aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) );
- bHad = FALSE;
+ bHad = false;
}
nPosY += pRowInfo[nArrY].nHeight;
}
@@ -1724,7 +1724,7 @@ BOOL ScOutputData::SetChangedClip()
if (bHad)
aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) );
- BOOL bRet = (aPoly.Count() != 0);
+ sal_Bool bRet = (aPoly.Count() != 0);
if (bRet)
pDev->SetClipRegion(Region(aPoly));
return bRet;
@@ -1735,12 +1735,12 @@ void ScOutputData::FindChanged()
SCCOL nX;
SCSIZE nArrY;
- BOOL bWasIdleDisabled = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE );
+ sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled();
+ pDoc->DisableIdle( sal_True );
for (nArrY=0; nArrY<nArrCount; nArrY++)
- pRowInfo[nArrY].bChanged = FALSE;
+ pRowInfo[nArrY].bChanged = false;
- BOOL bProgress = FALSE;
+ sal_Bool bProgress = false;
for (nArrY=0; nArrY<nArrCount; nArrY++)
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
@@ -1753,22 +1753,22 @@ void ScOutputData::FindChanged()
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
if ( !bProgress && pFCell->GetDirty() )
{
- ScProgress::CreateInterpretProgress( pDoc, TRUE );
- bProgress = TRUE;
+ ScProgress::CreateInterpretProgress( pDoc, sal_True );
+ bProgress = sal_True;
}
if (!pFCell->IsRunning())
{
(void)pFCell->GetValue();
if (pFCell->IsChanged())
{
- pThisRowInfo->bChanged = TRUE;
+ pThisRowInfo->bChanged = sal_True;
if ( pThisRowInfo->pCellInfo[nX+1].bMerged )
{
SCSIZE nOverY = nArrY + 1;
while ( nOverY<nArrCount &&
pRowInfo[nOverY].pCellInfo[nX+1].bVOverlapped )
{
- pRowInfo[nOverY].bChanged = TRUE;
+ pRowInfo[nOverY].bChanged = sal_True;
++nOverY;
}
}
@@ -1784,7 +1784,7 @@ void ScOutputData::FindChanged()
void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, BOOL bHandle )
+ const Color& rColor, sal_Bool bHandle )
{
PutInOrder( nRefStartX, nRefEndX );
PutInOrder( nRefStartY, nRefEndY );
@@ -1807,14 +1807,14 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
- BOOL bTop = FALSE;
- BOOL bBottom = FALSE;
- BOOL bLeft = FALSE;
- BOOL bRight = FALSE;
+ sal_Bool bTop = false;
+ sal_Bool bBottom = false;
+ sal_Bool bLeft = false;
+ sal_Bool bRight = false;
long nPosY = nScrY;
- BOOL bNoStartY = ( nY1 < nRefStartY );
- BOOL bNoEndY = FALSE;
+ sal_Bool bNoStartY = ( nY1 < nRefStartY );
+ sal_Bool bNoEndY = false;
for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check
{
SCROW nY = pRowInfo[nArrY].nRowNo;
@@ -1822,17 +1822,17 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
{
nMinY = nPosY;
- bTop = TRUE;
+ bTop = sal_True;
}
if ( nY==nRefEndY )
{
nMaxY = nPosY + pRowInfo[nArrY].nHeight - 2;
- bBottom = TRUE;
+ bBottom = sal_True;
}
if ( nY>nRefEndY && bNoEndY )
{
nMaxY = nPosY-2;
- bBottom = TRUE;
+ bBottom = sal_True;
}
bNoStartY = ( nY < nRefStartY );
bNoEndY = ( nY < nRefEndY );
@@ -1848,12 +1848,12 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
if ( nX==nRefStartX )
{
nMinX = nPosX;
- bLeft = TRUE;
+ bLeft = sal_True;
}
if ( nX==nRefEndX )
{
nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 2 ) * nLayoutSign;
- bRight = TRUE;
+ bRight = sal_True;
}
nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign;
}
@@ -1890,7 +1890,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, USHORT nType )
+ const Color& rColor, sal_uInt16 nType )
{
PutInOrder( nRefStartX, nRefEndX );
PutInOrder( nRefStartY, nRefEndY );
@@ -1913,14 +1913,14 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
- BOOL bTop = FALSE;
- BOOL bBottom = FALSE;
- BOOL bLeft = FALSE;
- BOOL bRight = FALSE;
+ sal_Bool bTop = false;
+ sal_Bool bBottom = false;
+ sal_Bool bLeft = false;
+ sal_Bool bRight = false;
long nPosY = nScrY;
- BOOL bNoStartY = ( nY1 < nRefStartY );
- BOOL bNoEndY = FALSE;
+ sal_Bool bNoStartY = ( nY1 < nRefStartY );
+ sal_Bool bNoEndY = false;
for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check
{
SCROW nY = pRowInfo[nArrY].nRowNo;
@@ -1928,17 +1928,17 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
{
nMinY = nPosY - 1;
- bTop = TRUE;
+ bTop = sal_True;
}
if ( nY==nRefEndY )
{
nMaxY = nPosY + pRowInfo[nArrY].nHeight - 1;
- bBottom = TRUE;
+ bBottom = sal_True;
}
if ( nY>nRefEndY && bNoEndY )
{
nMaxY = nPosY - 1;
- bBottom = TRUE;
+ bBottom = sal_True;
}
bNoStartY = ( nY < nRefStartY );
bNoEndY = ( nY < nRefEndY );
@@ -1954,12 +1954,12 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
if ( nX==nRefStartX )
{
nMinX = nPosX - nLayoutSign;
- bLeft = TRUE;
+ bLeft = sal_True;
}
if ( nX==nRefEndX )
{
nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 1 ) * nLayoutSign;
- bRight = TRUE;
+ bRight = sal_True;
}
nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign;
}
@@ -1968,9 +1968,9 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
nMaxY >= nMinY )
{
if ( nType == SC_CAT_DELETE_ROWS )
- bLeft = bRight = bBottom = FALSE; //! dicke Linie ???
+ bLeft = bRight = bBottom = false; //! dicke Linie ???
else if ( nType == SC_CAT_DELETE_COLS )
- bTop = bBottom = bRight = FALSE; //! dicke Linie ???
+ bTop = bBottom = bRight = false; //! dicke Linie ???
pDev->SetLineColor( rColor );
if (bTop && bBottom && bLeft && bRight)
@@ -2047,7 +2047,7 @@ void ScOutputData::DrawChangeTrack()
aColorChanger.Update( *pAction );
Color aColor( aColorChanger.GetColor() );
DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(),
- aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) );
+ aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) );
}
}
@@ -2063,7 +2063,7 @@ void ScOutputData::DrawChangeTrack()
aColorChanger.Update( *pAction );
Color aColor( aColorChanger.GetColor() );
DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(),
- aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) );
+ aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) );
}
}
}
@@ -2074,7 +2074,7 @@ void ScOutputData::DrawChangeTrack()
void ScOutputData::DrawNoteMarks()
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
long nInitPosX = nScrX;
if ( bLayoutRTL )
@@ -2092,12 +2092,12 @@ void ScOutputData::DrawNoteMarks()
{
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
ScBaseCell* pCell = pInfo->pCell;
- BOOL bIsMerged = FALSE;
+ sal_Bool bIsMerged = false;
if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
{
// find start of merged cell
- bIsMerged = TRUE;
+ bIsMerged = sal_True;
SCROW nY = pRowInfo[nArrY].nRowNo;
SCCOL nMergeX = nX;
SCROW nMergeY = nY;
@@ -2119,7 +2119,7 @@ void ScOutputData::DrawNoteMarks()
else
pDev->SetFillColor(COL_LIGHTRED);
- bFirst = FALSE;
+ bFirst = false;
}
long nMarkX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 4 ) * nLayoutSign;
@@ -2170,7 +2170,7 @@ void ScOutputData::AddPDFNotes()
{
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
ScBaseCell* pCell = pInfo->pCell;
- BOOL bIsMerged = FALSE;
+ sal_Bool bIsMerged = false;
SCROW nY = pRowInfo[nArrY].nRowNo;
SCCOL nMergeX = nX;
SCROW nMergeY = nY;
@@ -2178,7 +2178,7 @@ void ScOutputData::AddPDFNotes()
if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
{
// find start of merged cell
- bIsMerged = TRUE;
+ bIsMerged = sal_True;
pDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, nTab );
pCell = pDoc->GetCell( ScAddress(nMergeX,nMergeY,nTab) );
// use origin's pCell for NotePtr test below
@@ -2238,7 +2238,7 @@ void ScOutputData::DrawClipMarks()
Color aArrowFillCol( COL_LIGHTRED );
- ULONG nOldDrawMode = pDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pDev->GetDrawMode();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
if ( bUseStyleColor && rStyleSettings.GetHighContrastMode() )
{
@@ -2345,14 +2345,14 @@ void ScOutputData::DrawClipMarks()
// visually left
Rectangle aMarkRect = aCellRect;
aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1;
- SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, TRUE );
+ SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, true );
}
if ( pInfo->nClipMark & ( bLayoutRTL ? SC_CLIPMARK_LEFT : SC_CLIPMARK_RIGHT ) )
{
// visually right
Rectangle aMarkRect = aCellRect;
aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1;
- SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, FALSE );
+ SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, false );
}
}
nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index e37b897b89d9..35e6d78b0191 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -86,7 +86,7 @@
#define DRAWTEXT_MAX 32767
-const USHORT SC_SHRINKAGAIN_MAX = 7;
+const sal_uInt16 SC_SHRINKAGAIN_MAX = 7;
// STATIC DATA -----------------------------------------------------------
@@ -109,8 +109,8 @@ class ScDrawStringsVars
SvxCellJustifyMethod eAttrHorJustMethod;
SvxCellJustifyMethod eAttrVerJustMethod;
const SvxMarginItem* pMargin;
- USHORT nIndent;
- BOOL bRotated;
+ sal_uInt16 nIndent;
+ sal_Bool bRotated;
String aString; // Inhalte
Size aTextSize;
@@ -121,28 +121,28 @@ class ScDrawStringsVars
long nExpWidth;
ScBaseCell* pLastCell;
- ULONG nValueFormat;
- BOOL bLineBreak;
- BOOL bRepeat;
- BOOL bShrink;
+ sal_uLong nValueFormat;
+ sal_Bool bLineBreak;
+ sal_Bool bRepeat;
+ sal_Bool bShrink;
- BOOL bPixelToLogic;
- BOOL bCellContrast;
+ sal_Bool bPixelToLogic;
+ sal_Bool bCellContrast;
Color aBackConfigColor; // used for ScPatternAttr::GetFont calls
Color aTextConfigColor;
public:
- ScDrawStringsVars(ScOutputData* pData, BOOL bPTL);
+ ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL);
~ScDrawStringsVars();
// SetPattern = ex-SetVars
// SetPatternSimple: ohne Font
- void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, BYTE nScript );
+ void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, sal_uInt8 nScript );
void SetPatternSimple( const ScPatternAttr* pNew, const SfxItemSet* pSet );
- BOOL SetText( ScBaseCell* pCell ); // TRUE -> pOldPattern vergessen
+ sal_Bool SetText( ScBaseCell* pCell ); // TRUE -> pOldPattern vergessen
void SetHashText();
void SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth );
void SetAutoText( const String& rAutoText );
@@ -155,26 +155,26 @@ public:
SvxCellJustifyMethod GetVerJustMethod() const { return eAttrVerJustMethod; }
const SvxMarginItem* GetMargin() const { return pMargin; }
- USHORT GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; }
+ sal_uInt16 GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; }
const String& GetString() const { return aString; }
const Size& GetTextSize() const { return aTextSize; }
long GetOriginalWidth() const { return nOriginalWidth; }
- ULONG GetValueFormat() const { return nValueFormat; }
- BOOL GetLineBreak() const { return bLineBreak; }
- BOOL IsRepeat() const { return bRepeat; }
- BOOL IsShrink() const { return bShrink; }
+ sal_uLong GetValueFormat() const { return nValueFormat; }
+ sal_Bool GetLineBreak() const { return bLineBreak; }
+ sal_Bool IsRepeat() const { return bRepeat; }
+ sal_Bool IsShrink() const { return bShrink; }
long GetAscent() const { return nAscentPixel; }
- BOOL IsRotated() const { return bRotated; }
+ sal_Bool IsRotated() const { return bRotated; }
- void SetShrinkScale( long nScale, BYTE nScript );
+ void SetShrinkScale( long nScale, sal_uInt8 nScript );
- BOOL HasCondHeight() const { return pCondSet && SFX_ITEM_SET ==
- pCondSet->GetItemState( ATTR_FONT_HEIGHT, TRUE ); }
+ sal_Bool HasCondHeight() const { return pCondSet && SFX_ITEM_SET ==
+ pCondSet->GetItemState( ATTR_FONT_HEIGHT, sal_True ); }
- BOOL HasEditCharacters() const;
+ sal_Bool HasEditCharacters() const;
private:
long GetMaxDigitWidth(); // in logic units
@@ -186,7 +186,7 @@ private:
//==================================================================
-ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
+ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL) :
pOutput ( pData ),
pPattern ( NULL ),
pCondSet ( NULL ),
@@ -198,7 +198,7 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
eAttrVerJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
pMargin ( NULL ),
nIndent ( 0 ),
- bRotated ( FALSE ),
+ bRotated ( false ),
nOriginalWidth( 0 ),
nMaxDigitWidth( 0 ),
nSignWidth( 0 ),
@@ -206,9 +206,9 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
nExpWidth( 0 ),
pLastCell ( NULL ),
nValueFormat( 0 ),
- bLineBreak ( FALSE ),
- bRepeat ( FALSE ),
- bShrink ( FALSE ),
+ bLineBreak ( false ),
+ bRepeat ( false ),
+ bShrink ( false ),
bPixelToLogic( bPTL )
{
ScModule* pScMod = SC_MOD();
@@ -225,7 +225,7 @@ ScDrawStringsVars::~ScDrawStringsVars()
{
}
-void ScDrawStringsVars::SetShrinkScale( long nScale, BYTE nScript )
+void ScDrawStringsVars::SetShrinkScale( long nScale, sal_uInt8 nScript )
{
// text remains valid, size is updated
@@ -270,13 +270,13 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, BYTE nScript )
namespace {
template<typename _ItemType, typename _EnumType>
-_EnumType lcl_GetValue(const ScPatternAttr& rPattern, USHORT nWhich, const SfxItemSet* pCondSet)
+_EnumType lcl_GetValue(const ScPatternAttr& rPattern, sal_uInt16 nWhich, const SfxItemSet* pCondSet)
{
const _ItemType& rItem = static_cast<const _ItemType&>(rPattern.GetItem(nWhich, pCondSet));
return static_cast<_EnumType>(rItem.GetValue());
}
-bool lcl_GetBoolValue(const ScPatternAttr& rPattern, USHORT nWhich, const SfxItemSet* pCondSet)
+bool lcl_GetBoolValue(const ScPatternAttr& rPattern, sal_uInt16 nWhich, const SfxItemSet* pCondSet)
{
return lcl_GetValue<SfxBoolItem, bool>(rPattern, nWhich, pCondSet);
}
@@ -284,7 +284,7 @@ bool lcl_GetBoolValue(const ScPatternAttr& rPattern, USHORT nWhich, const SfxIte
}
void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet,
- ScBaseCell* pCell, BYTE nScript )
+ ScBaseCell* pCell, sal_uInt8 nScript )
{
nMaxDigitWidth = 0;
nSignWidth = 0;
@@ -365,20 +365,20 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
break;
case SVX_ORIENTATION_STACKED:
nRot = 0;
- bRotated = FALSE;
+ bRotated = false;
break;
case SVX_ORIENTATION_TOPBOTTOM:
nRot = 2700;
- bRotated = FALSE;
+ bRotated = false;
break;
case SVX_ORIENTATION_BOTTOMTOP:
nRot = 900;
- bRotated = FALSE;
+ bRotated = false;
break;
default:
OSL_FAIL("Falscher SvxCellOrientation Wert");
nRot = 0;
- bRotated = FALSE;
+ bRotated = false;
break;
}
aFont.SetOrientation( nRot );
@@ -453,12 +453,12 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
// Zahlenformat
- ULONG nOld = nValueFormat;
+ sal_uLong nOld = nValueFormat;
const SfxPoolItem* pFormItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,TRUE,&pFormItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,sal_True,&pFormItem) != SFX_ITEM_SET )
pFormItem = &pPattern->GetItem(ATTR_VALUE_FORMAT);
const SfxPoolItem* pLangItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,TRUE,&pLangItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,sal_True,&pLangItem) != SFX_ITEM_SET )
pLangItem = &pPattern->GetItem(ATTR_LANGUAGE_FORMAT);
nValueFormat = pOutput->pDoc->GetFormatTable()->GetFormatForLanguageIfBuiltIn(
((SfxUInt32Item*)pFormItem)->GetValue(),
@@ -481,16 +481,16 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
bShrink = static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue();
}
-inline BOOL SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0
+inline sal_Bool SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0
{
return pOldCell && pOldCell->GetCellType() == CELLTYPE_VALUE &&
pCell->GetCellType() == CELLTYPE_VALUE &&
((ScValueCell*)pCell)->GetValue() == ((ScValueCell*)pOldCell)->GetValue();
}
-BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
+sal_Bool ScDrawStringsVars::SetText( ScBaseCell* pCell )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
if (pCell)
{
@@ -499,7 +499,7 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
pLastCell = pCell; // Zelle merken
Color* pColor;
- ULONG nFormat = GetValueFormat();
+ sal_uLong nFormat = GetValueFormat();
ScCellFormat::GetString( pCell,
nFormat, aString, &pColor,
*pOutput->pDoc->GetFormatTable(),
@@ -515,7 +515,7 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
OutputDevice* pDev = pOutput->pDev;
aFont.SetColor(*pColor);
pDev->SetFont( aFont ); // nur fuer Ausgabe
- bChanged = TRUE;
+ bChanged = sal_True;
pLastCell = NULL; // naechstes Mal wieder hierherkommen
}
@@ -566,7 +566,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
return;
}
- ULONG nFormat = GetValueFormat();
+ sal_uLong nFormat = GetValueFormat();
if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)
{
// Not 'General' number format. Set hash text and bail out.
@@ -734,7 +734,7 @@ void ScDrawStringsVars::TextChanged()
aTextSize = pRefDevice->LogicToPixel( aTextSize );
}
-BOOL ScDrawStringsVars::HasEditCharacters() const
+sal_Bool ScDrawStringsVars::HasEditCharacters() const
{
static const sal_Unicode pChars[] =
{
@@ -857,13 +857,13 @@ void ScOutputData::SetEditSyntaxColor( EditEngine& rEngine, ScBaseCell* pCell )
}
}
-BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
+sal_Bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
SCCOL& rOverX, SCROW& rOverY,
- BOOL bVisRowChanged )
+ sal_Bool bVisRowChanged )
{
- BOOL bDoMerge = FALSE;
- BOOL bIsLeft = ( nX == nVisX1 );
- BOOL bIsTop = ( nY == nVisY1 ) || bVisRowChanged;
+ sal_Bool bDoMerge = false;
+ sal_Bool bIsLeft = ( nX == nVisX1 );
+ sal_Bool bIsTop = ( nY == nVisY1 ) || bVisRowChanged;
CellInfo* pInfo = &pRowInfo[nArrY].pCellInfo[nX+1];
if ( pInfo->bHOverlapped && pInfo->bVOverlapped )
@@ -875,16 +875,16 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
rOverX = nX;
rOverY = nY;
- BOOL bHOver = pInfo->bHOverlapped;
- BOOL bVOver = pInfo->bVOverlapped;
- BOOL bHidden;
+ sal_Bool bHOver = pInfo->bHOverlapped;
+ sal_Bool bVOver = pInfo->bVOverlapped;
+ sal_Bool bHidden;
while (bHOver) // nY konstant
{
--rOverX;
bHidden = pDoc->ColHidden(rOverX, nTab);
if ( !bDoMerge && !bHidden )
- return FALSE;
+ return false;
if (rOverX >= nX1 && !bHidden)
{
@@ -893,7 +893,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
@@ -905,7 +905,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
--rOverY;
bHidden = pDoc->RowHidden(rOverY, nTab);
if ( !bDoMerge && !bHidden )
- return FALSE;
+ return false;
if (nArrY>0)
--nArrY; // lokale Kopie !
@@ -920,122 +920,122 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
}
}
- return TRUE;
+ return sal_True;
}
-inline BOOL StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern )
+inline sal_Bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern )
{
DBG_ASSERT( rpNewPattern, "pNewPattern" );
if ( rpNewPattern == rpOldPattern )
- return FALSE;
+ return false;
else if ( !rpOldPattern )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT ) != &rpOldPattern->GetItem( ATTR_FONT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_HEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_WEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_FONT_POSTURE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_POSTURE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_POSTURE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_UNDERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_UNDERLINE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_OVERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_OVERLINE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_WORDLINE ) != &rpOldPattern->GetItem( ATTR_FONT_WORDLINE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_CROSSEDOUT ) != &rpOldPattern->GetItem( ATTR_FONT_CROSSEDOUT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_CONTOUR ) != &rpOldPattern->GetItem( ATTR_FONT_CONTOUR ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_SHADOWED ) != &rpOldPattern->GetItem( ATTR_FONT_SHADOWED ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_COLOR ) != &rpOldPattern->GetItem( ATTR_FONT_COLOR ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_HOR_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_VER_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_STACKED ) != &rpOldPattern->GetItem( ATTR_STACKED ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_LINEBREAK ) != &rpOldPattern->GetItem( ATTR_LINEBREAK ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_MARGIN ) != &rpOldPattern->GetItem( ATTR_MARGIN ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_ROTATE_VALUE ) != &rpOldPattern->GetItem( ATTR_ROTATE_VALUE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FORBIDDEN_RULES ) != &rpOldPattern->GetItem( ATTR_FORBIDDEN_RULES ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_EMPHASISMARK ) != &rpOldPattern->GetItem( ATTR_FONT_EMPHASISMARK ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_RELIEF ) != &rpOldPattern->GetItem( ATTR_FONT_RELIEF ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_BACKGROUND ) != &rpOldPattern->GetItem( ATTR_BACKGROUND ) )
- return TRUE; // needed with automatic text color
+ return sal_True; // needed with automatic text color
else
{
rpOldPattern = rpNewPattern;
- return FALSE;
+ return false;
}
}
-inline void lcl_CreateInterpretProgress( BOOL& bProgress, ScDocument* pDoc,
+inline void lcl_CreateInterpretProgress( sal_Bool& bProgress, ScDocument* pDoc,
ScFormulaCell* pFCell )
{
if ( !bProgress && pFCell->GetDirty() )
{
- ScProgress::CreateInterpretProgress( pDoc, TRUE );
- bProgress = TRUE;
+ ScProgress::CreateInterpretProgress( pDoc, sal_True );
+ bProgress = sal_True;
}
}
-inline BYTE GetScriptType( ScDocument* pDoc, ScBaseCell* pCell,
+inline sal_uInt8 GetScriptType( ScDocument* pDoc, ScBaseCell* pCell,
const ScPatternAttr* pPattern,
const SfxItemSet* pCondSet )
{
return pDoc->GetCellScriptType( pCell, pPattern->GetNumberFormat( pDoc->GetFormatTable(), pCondSet ) );
}
-inline BOOL IsAmbiguousScript( BYTE nScript )
+inline sal_Bool IsAmbiguousScript( sal_uInt8 nScript )
{
return ( nScript != SCRIPTTYPE_LATIN &&
nScript != SCRIPTTYPE_ASIAN &&
nScript != SCRIPTTYPE_COMPLEX );
}
-BOOL ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
+sal_Bool ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
{
// pThisRowInfo may be NULL
- BOOL bEmpty;
+ sal_Bool bEmpty;
if ( pThisRowInfo && nX <= nX2 )
bEmpty = pThisRowInfo->pCellInfo[nX+1].bEmptyCellText;
else
@@ -1046,23 +1046,23 @@ BOOL ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
// for the range nX1..nX2 in RowInfo, cell protection attribute is already evaluated
// into bEmptyCellText in ScDocument::FillInfo / lcl_HidePrint (printfun)
- BOOL bIsPrint = ( eType == OUTTYPE_PRINTER );
+ sal_Bool bIsPrint = ( eType == OUTTYPE_PRINTER );
if ( bIsPrint || bTabProtected )
{
const ScProtectionAttr* pAttr = (const ScProtectionAttr*)
pDoc->GetEffItem( nX, nY, nTab, ATTR_PROTECTION );
if ( bIsPrint && pAttr->GetHidePrint() )
- bEmpty = TRUE;
+ bEmpty = sal_True;
else if ( bTabProtected )
{
if ( pAttr->GetHideCell() )
- bEmpty = TRUE;
+ bEmpty = sal_True;
else if ( bShowFormulas && pAttr->GetHideFormula() )
{
ScBaseCell* pCell = pDoc->GetCell( ScAddress( nX, nY, nTab ) );
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
}
}
@@ -1077,7 +1077,7 @@ void ScOutputData::GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTabP, ScBaseCe
rpCell = NULL;
}
-BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
+sal_Bool ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
{
// apply the same logic here as in DrawStrings/DrawEdit:
// Stop at non-empty or merged or overlapped cell,
@@ -1086,17 +1086,17 @@ BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
const ScBaseCell* pCell = pDoc->GetCell( ScAddress( nX, nY, nTab ) );
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE && !IsEmptyCellText( NULL, nX, nY ) )
{
- return FALSE;
+ return false;
}
const ScPatternAttr* pPattern = pDoc->GetPattern( nX, nY, nTab );
if ( ((const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE)).IsMerged() ||
((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).IsOverlapped() )
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
// nX, nArrY: loop variables from DrawStrings / DrawEdit
@@ -1113,7 +1113,7 @@ BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY,
SCCOL nCellX, SCROW nCellY, long nNeeded,
const ScPatternAttr& rPattern,
- USHORT nHorJustify, bool bCellIsValue,
+ sal_uInt16 nHorJustify, bool bCellIsValue,
bool bBreak, bool bOverwrite,
OutputAreaParam& rParam )
{
@@ -1155,7 +1155,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
}
else
{
- USHORT nDocHeight = pDoc->GetRowHeight( nCompRow, nTab );
+ sal_uInt16 nDocHeight = pDoc->GetRowHeight( nCompRow, nTab );
if ( nDocHeight )
nCellPosY += (long) ( nDocHeight * nPPTY );
++nCompRow;
@@ -1164,7 +1164,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
nCellPosY -= (long) pDoc->GetScaledRowHeight( nCellY, nCompRow-1, nTab, nPPTY );
const ScMergeAttr* pMerge = (const ScMergeAttr*)&rPattern.GetItem( ATTR_MERGE );
- BOOL bMerged = pMerge->IsMerged();
+ sal_Bool bMerged = pMerge->IsMerged();
long nMergeCols = pMerge->GetColMerge();
if ( nMergeCols == 0 )
nMergeCols = 1;
@@ -1254,13 +1254,13 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
rParam.maClipRect.Right() += nAdd * nLayoutSign;
if ( rThisRowInfo.nRowNo == nCellY && nRightX >= nX1 && nRightX <= nX2 )
- rThisRowInfo.pCellInfo[nRightX].bHideGrid = TRUE;
+ rThisRowInfo.pCellInfo[nRightX].bHideGrid = sal_True;
}
while ( nLeftMissing > 0 && nLeftX > 0 && ( bOverwrite || IsAvailable( nLeftX-1, nCellY ) ) )
{
if ( rThisRowInfo.nRowNo == nCellY && nLeftX >= nX1 && nLeftX <= nX2 )
- rThisRowInfo.pCellInfo[nLeftX].bHideGrid = TRUE;
+ rThisRowInfo.pCellInfo[nLeftX].bHideGrid = sal_True;
--nLeftX;
long nAdd = (long) ( pDoc->GetColWidth( nLeftX, nTab ) * nPPTX );
@@ -1274,14 +1274,14 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
if ( nRightMissing > 0 && bMarkClipped && nRightX >= nX1 && nRightX <= nX2 && !bBreak && !bCellIsValue )
{
rThisRowInfo.pCellInfo[nRightX+1].nClipMark |= SC_CLIPMARK_RIGHT;
- bAnyClipped = TRUE;
+ bAnyClipped = sal_True;
long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX );
rParam.maClipRect.Right() -= nMarkPixel * nLayoutSign;
}
if ( nLeftMissing > 0 && bMarkClipped && nLeftX >= nX1 && nLeftX <= nX2 && !bBreak && !bCellIsValue )
{
rThisRowInfo.pCellInfo[nLeftX+1].nClipMark |= SC_CLIPMARK_LEFT;
- bAnyClipped = TRUE;
+ bAnyClipped = sal_True;
long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX );
rParam.maClipRect.Left() += nMarkPixel * nLayoutSign;
}
@@ -1291,7 +1291,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
}
else
{
- rParam.mbLeftClip = rParam.mbRightClip = FALSE;
+ rParam.mbLeftClip = rParam.mbRightClip = false;
// leave space for AutoFilter on screen
// (for automatic line break: only if not formatting for printer, as in ScColumn::GetNeededSize)
@@ -1302,7 +1302,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
{
// filter drop-down width is now independent from row height
const long nFilter = DROPDOWN_BITMAP_SIZE;
- BOOL bFit = ( nNeeded + nFilter <= nMergeSizeX );
+ sal_Bool bFit = ( nNeeded + nFilter <= nMergeSizeX );
if ( bFit || bCellIsValue )
{
// content fits even in the remaining area without the filter button
@@ -1315,7 +1315,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
// -> set clip flags, so "###" replacement is used (but also within the smaller area)
if ( !bFit )
- rParam.mbLeftClip = rParam.mbRightClip = TRUE;
+ rParam.mbLeftClip = rParam.mbRightClip = sal_True;
}
}
}
@@ -1326,7 +1326,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
rParam.maClipRect.Justify();
}
-void ScOutputData::DrawStrings( BOOL bPixelToLogic )
+void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
{
DBG_ASSERT( pDev == pRefDevice ||
pDev->GetMapMode().GetMapUnit() == pRefDevice->GetMapMode().GetMapUnit(),
@@ -1334,12 +1334,12 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
- BOOL bWasIdleDisabled = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE );
+ sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled();
+ pDoc->DisableIdle( true );
ScDrawStringsVars aVars( this, bPixelToLogic );
- BOOL bProgress = FALSE;
+ sal_Bool bProgress = false;
long nInitPosX = nScrX;
if ( bLayoutRTL )
@@ -1356,14 +1356,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// variables for GetOutputArea
OutputAreaParam aAreaParam;
- BOOL bCellIsValue = FALSE;
+ sal_Bool bCellIsValue = false;
long nNeededWidth = 0;
SvxCellHorJustify eOutHorJust = SVX_HOR_JUSTIFY_STANDARD;
const ScPatternAttr* pPattern = NULL;
const SfxItemSet* pCondSet = NULL;
const ScPatternAttr* pOldPattern = NULL;
const SfxItemSet* pOldCondSet = NULL;
- BYTE nOldScript = 0;
+ sal_uInt8 nOldScript = 0;
// alternative pattern instances in case we need to modify the pattern
// before processing the cell value.
@@ -1381,35 +1381,35 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
nPosX -= pRowInfo[0].pCellInfo[nLoopStartX+1].nWidth * nLayoutSign;
for (SCCOL nX=nLoopStartX; nX<=nX2; nX++)
{
- BOOL bMergeEmpty = FALSE;
+ sal_Bool bMergeEmpty = false;
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
- BOOL bEmpty = nX < nX1 || pInfo->bEmptyCellText;
+ sal_Bool bEmpty = nX < nX1 || pInfo->bEmptyCellText;
SCCOL nCellX = nX; // position where the cell really starts
SCROW nCellY = nY;
- BOOL bDoCell = FALSE;
- BOOL bNeedEdit = FALSE;
+ sal_Bool bDoCell = false;
+ sal_Bool bNeedEdit = false;
//
// Part of a merged cell?
//
- BOOL bOverlapped = ( pInfo->bHOverlapped || pInfo->bVOverlapped );
+ sal_Bool bOverlapped = ( pInfo->bHOverlapped || pInfo->bVOverlapped );
if ( bOverlapped )
{
- bEmpty = TRUE;
+ bEmpty = sal_True;
SCCOL nOverX; // start of the merged cells
SCROW nOverY;
- BOOL bVisChanged = !pRowInfo[nArrY-1].bChanged;
+ sal_Bool bVisChanged = !pRowInfo[nArrY-1].bChanged;
if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged ))
{
nCellX = nOverX;
nCellY = nOverY;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
else
- bMergeEmpty = TRUE;
+ bMergeEmpty = sal_True;
}
//
@@ -1427,7 +1427,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
!pDoc->HasAttrib( nTempX,nY,nTab, nX1,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
nCellX = nTempX;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
@@ -1448,7 +1448,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
!pDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
nCellX = nTempX;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
@@ -1457,14 +1457,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
//
if (!bEmpty)
- bDoCell = TRUE;
+ bDoCell = sal_True;
//
// don't output the cell that's being edited
//
if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
- bDoCell = FALSE;
+ bDoCell = false;
//
// output the cell text
@@ -1478,9 +1478,9 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
else
GetVisibleCell( nCellX, nCellY, nTab, pCell ); // get from document
if ( !pCell )
- bDoCell = FALSE;
+ bDoCell = false;
else if ( pCell->GetCellType() == CELLTYPE_EDIT )
- bNeedEdit = TRUE;
+ bNeedEdit = sal_True;
}
if (bDoCell && !bNeedEdit)
{
@@ -1516,7 +1516,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
pPattern = pAltPattern;
}
- BYTE nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet );
+ sal_uInt8 nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet );
if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
if ( pPattern != pOldPattern || pCondSet != pOldCondSet ||
nScript != nOldScript || bSyntaxMode )
@@ -1534,11 +1534,11 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// use edit engine for rotated, stacked or mixed-script text
if ( aVars.GetOrient() == SVX_ORIENTATION_STACKED ||
aVars.IsRotated() || IsAmbiguousScript(nScript) )
- bNeedEdit = TRUE;
+ bNeedEdit = sal_True;
}
if (bDoCell && !bNeedEdit)
{
- BOOL bFormulaCell = (pCell->GetCellType() == CELLTYPE_FORMULA );
+ sal_Bool bFormulaCell = (pCell->GetCellType() == CELLTYPE_FORMULA );
if ( bFormulaCell )
lcl_CreateInterpretProgress( bProgress, pDoc, (ScFormulaCell*)pCell );
if ( aVars.SetText(pCell) )
@@ -1564,9 +1564,9 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( eOutHorJust == SVX_HOR_JUSTIFY_BLOCK || eOutHorJust == SVX_HOR_JUSTIFY_REPEAT )
eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented
- BOOL bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK );
- BOOL bRepeat = aVars.IsRepeat() && !bBreak;
- BOOL bShrink = aVars.IsShrink() && !bBreak && !bRepeat;
+ sal_Bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK );
+ sal_Bool bRepeat = aVars.IsRepeat() && !bBreak;
+ sal_Bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat;
nTotalMargin =
static_cast<long>(aVars.GetLeftTotal() * nPPTX) +
@@ -1576,8 +1576,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// GetOutputArea gives justfied rectangles
GetOutputArea( nX, nArrY, nPosX, nPosY, nCellX, nCellY, nNeededWidth,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
- bCellIsValue || bRepeat || bShrink, bBreak, FALSE,
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
+ bCellIsValue || bRepeat || bShrink, bBreak, false,
aAreaParam );
if ( bShrink )
@@ -1586,7 +1586,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
{
// Only horizontal scaling is handled here.
// DrawEdit is used to vertically scale 90 deg rotated text.
- bNeedEdit = TRUE;
+ bNeedEdit = sal_True;
}
else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal
{
@@ -1600,7 +1600,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
aVars.SetShrinkScale( nScale, nOldScript );
long nNewSize = aVars.GetTextSize().Width();
- USHORT nShrinkAgain = 0;
+ sal_uInt16 nShrinkAgain = 0;
while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
{
// If the text is still too large, reduce the scale again by 10%, until it fits,
@@ -1614,7 +1614,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// If even at half the size the font still isn't rendered smaller,
// fall back to normal clipping (showing ### for numbers).
if ( nNewSize <= nAvailable )
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = FALSE;
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
pOldPattern = NULL;
}
@@ -1670,8 +1670,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// right are handled by the flag for nX2
SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2;
RowInfo* pMarkRowInfo = ( nCellY == nY ) ? pThisRowInfo : &pRowInfo[0];
- pMarkRowInfo->pCellInfo[nMarkX+1].bEditEngine = TRUE;
- bDoCell = FALSE; // don't draw here
+ pMarkRowInfo->pCellInfo[nMarkX+1].bEditEngine = sal_True;
+ bDoCell = false; // don't draw here
}
if ( bDoCell )
{
@@ -1687,7 +1687,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
(long) ( aVars.GetLeftTotal() * nPPTX ) +
(long) ( aVars.GetMargin()->GetRightMargin() * nPPTX );
if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() )
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = FALSE;
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
// If the "###" replacement doesn't fit into the cells, no clip marks
// are shown, as the "###" already denotes too little space.
@@ -1699,38 +1699,38 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
long nAvailWidth = aAreaParam.maAlignRect.GetWidth();
long nOutHeight = aAreaParam.maAlignRect.GetHeight();
- BOOL bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
+ sal_Bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
if ( aAreaParam.maClipRect.Left() < nScrX )
{
aAreaParam.maClipRect.Left() = nScrX;
- aAreaParam.mbLeftClip = TRUE;
+ aAreaParam.mbLeftClip = sal_True;
}
if ( aAreaParam.maClipRect.Right() > nScrX + nScrW )
{
aAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one?
- aAreaParam.mbRightClip = TRUE;
+ aAreaParam.mbRightClip = sal_True;
}
- BOOL bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
- BOOL bVClip = FALSE;
+ sal_Bool bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
+ sal_Bool bVClip = false;
if ( aAreaParam.maClipRect.Top() < nScrY )
{
aAreaParam.maClipRect.Top() = nScrY;
- bVClip = TRUE;
+ bVClip = sal_True;
}
if ( aAreaParam.maClipRect.Bottom() > nScrY + nScrH )
{
aAreaParam.maClipRect.Bottom() = nScrY + nScrH; //! minus one?
- bVClip = TRUE;
+ bVClip = sal_True;
}
//
// horizontalen Platz testen
//
- BOOL bRightAdjusted = FALSE; // to correct text width calculation later
- BOOL bNeedEditEngine = FALSE;
+ sal_Bool bRightAdjusted = false; // to correct text width calculation later
+ sal_Bool bNeedEditEngine = false;
if ( !bNeedEditEngine && !bOutside )
{
switch (eOutHorJust)
@@ -1741,7 +1741,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
case SVX_HOR_JUSTIFY_RIGHT:
nJustPosX += nAvailWidth - aVars.GetTextSize().Width() -
(long) ( aVars.GetMargin()->GetRightMargin() * nPPTX );
- bRightAdjusted = TRUE;
+ bRightAdjusted = sal_True;
break;
case SVX_HOR_JUSTIFY_CENTER:
nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() +
@@ -1794,7 +1794,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( eType != OUTTYPE_PRINTER ||
( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
( aVars.HasCondHeight() ) )
- bVClip = TRUE;
+ bVClip = sal_True;
}
if ( bHClip || bVClip )
@@ -1898,7 +1898,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
// PDF: whole-cell hyperlink from formula?
- BOOL bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
+ sal_Bool bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
static_cast<ScFormulaCell*>(pCell)->IsHyperLinkCell();
if ( bHasURL )
{
@@ -1921,7 +1921,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute
{
- rEngine.SetUpdateMode( FALSE );
+ rEngine.SetUpdateMode( false );
rEngine.SetText(EMPTY_STRING);
// keine Para-Attribute uebrigbehalten...
@@ -1931,22 +1931,22 @@ void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute
SfxItemSet( *rPara.GetPool(), rPara.GetRanges() ) );
}
-BOOL lcl_SafeIsValue( ScBaseCell* pCell )
+sal_Bool lcl_SafeIsValue( ScBaseCell* pCell )
{
if (!pCell)
- return FALSE;
+ return false;
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
switch ( pCell->GetCellType() )
{
case CELLTYPE_VALUE:
- bRet = TRUE;
+ bRet = sal_True;
break;
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
if ( pFCell->IsRunning() || pFCell->IsValue() )
- bRet = TRUE;
+ bRet = sal_True;
}
break;
default:
@@ -1959,21 +1959,21 @@ BOOL lcl_SafeIsValue( ScBaseCell* pCell )
void lcl_ScaleFonts( EditEngine& rEngine, long nPercent )
{
- BOOL bUpdateMode = rEngine.GetUpdateMode();
+ sal_Bool bUpdateMode = rEngine.GetUpdateMode();
if ( bUpdateMode )
- rEngine.SetUpdateMode( FALSE );
+ rEngine.SetUpdateMode( false );
- USHORT nParCount = rEngine.GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ sal_uInt16 nParCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
SvUShorts aPortions;
rEngine.GetPortions( nPar, aPortions );
- USHORT nPCount = aPortions.Count();
- USHORT nStart = 0;
- for ( USHORT nPos=0; nPos<nPCount; nPos++ )
+ sal_uInt16 nPCount = aPortions.Count();
+ sal_uInt16 nStart = 0;
+ for ( sal_uInt16 nPos=0; nPos<nPCount; nPos++ )
{
- USHORT nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
ESelection aSel( nPar, nStart, nPar, nEnd );
SfxItemSet aAttribs = rEngine.GetAttribs( aSel );
@@ -1996,10 +1996,10 @@ void lcl_ScaleFonts( EditEngine& rEngine, long nPercent )
}
if ( bUpdateMode )
- rEngine.SetUpdateMode( TRUE );
+ rEngine.SetUpdateMode( sal_True );
}
-long lcl_GetEditSize( EditEngine& rEngine, BOOL bWidth, BOOL bSwap, long nAttrRotate )
+long lcl_GetEditSize( EditEngine& rEngine, sal_Bool bWidth, sal_Bool bSwap, long nAttrRotate )
{
if ( bSwap )
bWidth = !bWidth;
@@ -2028,7 +2028,7 @@ long lcl_GetEditSize( EditEngine& rEngine, BOOL bWidth, BOOL bSwap, long nAttrRo
void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect,
long nLeftM, long nTopM, long nRightM, long nBottomM,
- BOOL bWidth, USHORT nOrient, long nAttrRotate, BOOL bPixelToLogic,
+ sal_Bool bWidth, sal_uInt16 nOrient, long nAttrRotate, sal_Bool bPixelToLogic,
long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, bool& rLeftClip, bool& rRightClip )
{
if ( !bWidth )
@@ -2043,28 +2043,28 @@ void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlig
if ( nScaleSize <= rAlignRect.GetHeight() )
return;
- BOOL bSwap = ( nOrient == SVX_ORIENTATION_TOPBOTTOM || nOrient == SVX_ORIENTATION_BOTTOMTOP );
+ sal_Bool bSwap = ( nOrient == SVX_ORIENTATION_TOPBOTTOM || nOrient == SVX_ORIENTATION_BOTTOMTOP );
long nAvailable = rAlignRect.GetHeight() - nTopM - nBottomM;
long nScale = ( nAvailable * 100 ) / nScaleSize;
lcl_ScaleFonts( rEngine, nScale );
- rEngineHeight = lcl_GetEditSize( rEngine, FALSE, bSwap, nAttrRotate );
+ rEngineHeight = lcl_GetEditSize( rEngine, false, bSwap, nAttrRotate );
long nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(0,rEngineHeight)).Height() : rEngineHeight;
- USHORT nShrinkAgain = 0;
+ sal_uInt16 nShrinkAgain = 0;
while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
{
// further reduce, like in DrawStrings
lcl_ScaleFonts( rEngine, 90 ); // reduce by 10%
- rEngineHeight = lcl_GetEditSize( rEngine, FALSE, bSwap, nAttrRotate );
+ rEngineHeight = lcl_GetEditSize( rEngine, false, bSwap, nAttrRotate );
nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(0,rEngineHeight)).Height() : rEngineHeight;
++nShrinkAgain;
}
// sizes for further processing (alignment etc):
- rEngineWidth = lcl_GetEditSize( rEngine, TRUE, bSwap, nAttrRotate );
+ rEngineWidth = lcl_GetEditSize( rEngine, sal_True, bSwap, nAttrRotate );
long nPixelWidth = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth;
rNeededPixel = nPixelWidth + nLeftM + nRightM;
@@ -2082,26 +2082,26 @@ void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlig
long nScale = ( nAvailable * 100 ) / nScaleSize;
lcl_ScaleFonts( rEngine, nScale );
- rEngineWidth = lcl_GetEditSize( rEngine, TRUE, FALSE, nAttrRotate );
+ rEngineWidth = lcl_GetEditSize( rEngine, sal_True, false, nAttrRotate );
long nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth;
- USHORT nShrinkAgain = 0;
+ sal_uInt16 nShrinkAgain = 0;
while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
{
// further reduce, like in DrawStrings
lcl_ScaleFonts( rEngine, 90 ); // reduce by 10%
- rEngineWidth = lcl_GetEditSize( rEngine, TRUE, FALSE, nAttrRotate );
+ rEngineWidth = lcl_GetEditSize( rEngine, sal_True, false, nAttrRotate );
nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth;
++nShrinkAgain;
}
if ( nNewSize <= nAvailable )
- rLeftClip = rRightClip = FALSE;
+ rLeftClip = rRightClip = false;
// sizes for further processing (alignment etc):
rNeededPixel = nNewSize + nLeftM + nRightM;
- rEngineHeight = lcl_GetEditSize( rEngine, FALSE, FALSE, nAttrRotate );
+ rEngineHeight = lcl_GetEditSize( rEngine, false, false, nAttrRotate );
}
}
@@ -2159,9 +2159,9 @@ void EditAlignmentParam::calcMargins(long& rTopM, long& rLeftM, long& rBottomM,
const SvxMarginItem& rMargin =
static_cast<const SvxMarginItem&>(mpPattern->GetItem(ATTR_MARGIN, mpCondSet));
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
if (meHorJust == SVX_HOR_JUSTIFY_LEFT)
- nIndent = lcl_GetValue<SfxUInt16Item, USHORT>(*mpPattern, ATTR_INDENT, mpCondSet);
+ nIndent = lcl_GetValue<SfxUInt16Item, sal_uInt16>(*mpPattern, ATTR_INDENT, mpCondSet);
rLeftM = static_cast<long>(((rMargin.GetLeftMargin() + nIndent) * nPPTX));
rTopM = static_cast<long>((rMargin.GetTopMargin() * nPPTY));
@@ -2363,18 +2363,18 @@ bool EditAlignmentParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
}
-void ScOutputData::DrawEdit(BOOL bPixelToLogic)
+void ScOutputData::DrawEdit(sal_Bool bPixelToLogic)
{
vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
ScModule* pScMod = SC_MOD();
sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor &&
+ sal_Bool bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ScFieldEditEngine* pEngine = NULL;
- BOOL bHyphenatorSet = FALSE;
+ sal_Bool bHyphenatorSet = false;
const ScPatternAttr* pOldPattern = NULL;
const SfxItemSet* pOldCondSet = NULL;
ScBaseCell* pCell = NULL;
@@ -2415,7 +2415,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
SCCOL nCellX = nX; // position where the cell really starts
SCROW nCellY = nY;
- BOOL bDoCell = FALSE;
+ sal_Bool bDoCell = false;
long nPosY = nRowPosY;
if ( nArrY == 0 )
@@ -2424,11 +2424,11 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
nY = pRowInfo[1].nRowNo;
SCCOL nOverX; // start of the merged cells
SCROW nOverY;
- if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, TRUE ))
+ if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, sal_True ))
{
nCellX = nOverX;
nCellY = nOverY;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
else if ( nX == nX2 && !pThisRowInfo->pCellInfo[nX+1].pCell )
@@ -2444,16 +2444,16 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
!pDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
nCellX = nTempX;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
else
{
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
- bDoCell = FALSE;
+ bDoCell = false;
const ScPatternAttr* pPattern = NULL;
const SfxItemSet* pCondSet = NULL;
@@ -2474,11 +2474,11 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
GetVisibleCell( nCellX, nCellY, nTab, pCell );
}
if ( !pCell )
- bDoCell = FALSE;
+ bDoCell = false;
}
if (bDoCell)
{
- BOOL bHidden = FALSE;
+ sal_Bool bHidden = false;
//
// Create EditEngine
@@ -2489,9 +2489,9 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// Ein RefDevice muss auf jeden Fall gesetzt werden,
// sonst legt sich die EditEngine ein VirtualDevice an!
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() );
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
pEngine->SetRefDevice( pFmtDevice ); // always set
- ULONG nCtrl = pEngine->GetControlWord();
+ sal_uLong nCtrl = pEngine->GetControlWord();
if ( bShowSpellErrors )
nCtrl |= EE_CNTRL_ONLINESPELLING;
if ( eType == OUTTYPE_PRINTER )
@@ -2505,7 +2505,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) );
}
else
- lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
+ lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False)
EditAlignmentParam aAlignParam(pPattern, pCondSet, lcl_SafeIsValue(pCell));
@@ -2528,7 +2528,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
//! Flag setzen, um die Zelle in DrawRotated wiederzufinden ?
//! (oder Flag schon bei DrawBackground, dann hier keine Abfrage)
- bHidden = TRUE; // gedreht wird getrennt ausgegeben
+ bHidden = sal_True; // gedreht wird getrennt ausgegeben
}
aAlignParam.mbAsianVertical = (aAlignParam.meOrient == SVX_ORIENTATION_STACKED) &&
@@ -2583,7 +2583,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
//! handle nArrY == 0
GetOutputArea( nXForPos, nArrYForPos, nPosX, nPosY, nCellX, nCellY, 0,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
aAlignParam.mbCellIsValue, true, false, aAreaParam );
//! special ScEditUtil handling if formatting for printer
@@ -2599,7 +2599,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
Fraction aFract(1,1);
Rectangle aUtilRect = ScEditUtil( pDoc, nCellX, nCellY, nTab, Point(0,0), pFmtDevice,
- HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, FALSE );
+ HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false );
aLogicSize.Width() = aUtilRect.GetWidth();
}
pEngine->SetPaperSize(aLogicSize);
@@ -2626,7 +2626,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
pOldPattern = pPattern;
pOldCondSet = pCondSet;
- ULONG nControl = pEngine->GetControlWord();
+ sal_uLong nControl = pEngine->GetControlWord();
if (aAlignParam.meOrient==SVX_ORIENTATION_STACKED)
nControl |= EE_CNTRL_ONECHARPERLINE;
else
@@ -2638,7 +2638,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// set hyphenator the first time it is needed
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
- bHyphenatorSet = TRUE;
+ bHyphenatorSet = sal_True;
}
Color aBackCol = ((const SvxBrushItem&)
@@ -2652,7 +2652,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// Read content from cell
- BOOL bWrapFields = FALSE;
+ sal_Bool bWrapFields = false;
if (pCell)
{
if (pCell->GetCellType() == CELLTYPE_EDIT)
@@ -2669,7 +2669,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// Fields aren't wrapped, so clipping is enabled to prevent
// a field from being drawn beyond the cell size
- bWrapFields = TRUE;
+ bWrapFields = sal_True;
}
}
else
@@ -2679,7 +2679,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
else
{
- ULONG nFormat = pPattern->GetNumberFormat(
+ sal_uLong nFormat = pPattern->GetNumberFormat(
pDoc->GetFormatTable(), pCondSet );
String aString;
Color* pColor;
@@ -2705,7 +2705,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
OSL_FAIL("pCell == NULL");
}
- pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
+ pEngine->SetUpdateMode( true ); // after SetText, before CalcTextWidth/GetTextHeight
//
// Get final output area using the calculated width
@@ -2723,15 +2723,15 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
// for break, the first GetOutputArea call is sufficient
GetOutputArea( nXForPos, nArrYForPos, nPosX, nPosY, nCellX, nCellY, nNeededPixel,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
aAlignParam.mbCellIsValue || bRepeat || bShrink, false, false, aAreaParam );
if ( bShrink )
{
- BOOL bWidth = ( aAlignParam.meOrient == SVX_ORIENTATION_STANDARD && !aAlignParam.mbAsianVertical );
+ sal_Bool bWidth = ( aAlignParam.meOrient == SVX_ORIENTATION_STANDARD && !aAlignParam.mbAsianVertical );
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect,
nLeftM, nTopM, nRightM, nBottomM, bWidth,
- sal::static_int_cast<USHORT>(aAlignParam.meOrient), 0, bPixelToLogic,
+ sal::static_int_cast<sal_uInt16>(aAlignParam.meOrient), 0, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel,
aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -2824,7 +2824,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
nStartX += nLeftM;
}
- BOOL bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
+ sal_Bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
if ( aAreaParam.maClipRect.Left() < nScrX )
{
aAreaParam.maClipRect.Left() = nScrX;
@@ -2839,23 +2839,23 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( !bHidden && !bOutside )
{
bool bClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
- BOOL bSimClip = FALSE;
+ sal_Bool bSimClip = false;
if ( bWrapFields )
{
// Fields in a cell with automatic breaks: clip to cell width
- bClip = TRUE;
+ bClip = sal_True;
}
if ( aAreaParam.maClipRect.Top() < nScrY )
{
aAreaParam.maClipRect.Top() = nScrY;
- bClip = TRUE;
+ bClip = sal_True;
}
if ( aAreaParam.maClipRect.Bottom() > nScrY + nScrH )
{
aAreaParam.maClipRect.Bottom() = nScrY + nScrH; //! minus one?
- bClip = TRUE;
+ bClip = sal_True;
}
Size aCellSize; // output area, excluding margins, in logical units
@@ -2868,7 +2868,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
const ScMergeAttr* pMerge =
(ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
- BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
+ sal_Bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
// Don't clip for text height when printing rows with optimal height,
// except when font size is from conditional formatting.
@@ -2876,10 +2876,10 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( eType != OUTTYPE_PRINTER ||
( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
( pCondSet && SFX_ITEM_SET ==
- pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
- bClip = TRUE;
+ pCondSet->GetItemState(ATTR_FONT_HEIGHT, sal_True) ) )
+ bClip = sal_True;
else
- bSimClip = TRUE;
+ bSimClip = sal_True;
// Show clip marks if height is at least 5pt too small and
// there are several lines of text.
@@ -2903,7 +2903,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
pClipMarkCell = &pThisRowInfo->pCellInfo[nX+1];
pClipMarkCell->nClipMark |= SC_CLIPMARK_RIGHT; //! also allow left?
- bAnyClipped = TRUE;
+ bAnyClipped = sal_True;
long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
@@ -3079,7 +3079,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
// For right-to-left, EditEngine always calculates its lines
// beginning from the right edge, but EditLine::nStartPosX is
- // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
+ // of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX.
Size aLogicPaper = pEngine->GetPaperSize();
if ( aLogicPaper.Width() > USHRT_MAX )
{
@@ -3098,7 +3098,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
Point aDocStart = aLogicClip.TopLeft();
aDocStart -= aLogicStart;
- pEngine->Draw( pDev, aLogicClip, aDocStart, FALSE );
+ pEngine->Draw( pDev, aLogicClip, aDocStart, false );
}
else
{
@@ -3120,7 +3120,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
// PDF: whole-cell hyperlink from formula?
- BOOL bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
+ sal_Bool bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
static_cast<ScFormulaCell*>(pCell)->IsHyperLinkCell();
if ( bHasURL )
{
@@ -3160,7 +3160,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// -------------------------------------------------------------------------------
-void ScOutputData::DrawRotated(BOOL bPixelToLogic)
+void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
{
//! nRotMax speichern
SCCOL nRotMax = nX2;
@@ -3172,11 +3172,11 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
ScModule* pScMod = SC_MOD();
sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor &&
+ sal_Bool bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ScFieldEditEngine* pEngine = NULL;
- BOOL bHyphenatorSet = FALSE;
+ sal_Bool bHyphenatorSet = false;
const ScPatternAttr* pPattern;
const SfxItemSet* pCondSet;
const ScPatternAttr* pOldPattern = NULL;
@@ -3209,10 +3209,10 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
SCROW nY = pThisRowInfo->nRowNo;
- BOOL bHidden = FALSE;
+ sal_Bool bHidden = false;
if (bEditMode)
if ( nX == nEditCol && nY == nEditRow )
- bHidden = TRUE;
+ bHidden = sal_True;
if (!bHidden)
{
@@ -3221,9 +3221,9 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
// Ein RefDevice muss auf jeden Fall gesetzt werden,
// sonst legt sich die EditEngine ein VirtualDevice an!
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() );
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
pEngine->SetRefDevice( pFmtDevice ); // always set
- ULONG nCtrl = pEngine->GetControlWord();
+ sal_uLong nCtrl = pEngine->GetControlWord();
if ( bShowSpellErrors )
nCtrl |= EE_CNTRL_ONLINESPELLING;
if ( eType == OUTTYPE_PRINTER )
@@ -3237,20 +3237,20 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) );
}
else
- lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
+ lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False)
long nPosY = nRowPosY;
- BOOL bVisChanged = FALSE;
+ sal_Bool bVisChanged = false;
//! Rest von zusammengefasster Zelle weiter oben funktioniert nicht!
- BOOL bFromDoc = FALSE;
+ sal_Bool bFromDoc = false;
pPattern = pInfo->pPatternAttr;
pCondSet = pInfo->pConditionSet;
if (!pPattern)
{
pPattern = pDoc->GetPattern( nX, nY, nTab );
- bFromDoc = TRUE;
+ bFromDoc = sal_True;
}
pCell = pInfo->pCell;
if (bFromDoc)
@@ -3260,29 +3260,29 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
GetVisibleCell( nX, nY, nTab, pCell );
if ( !pCell || IsEmptyCellText( pThisRowInfo, nX, nY ) )
- bHidden = TRUE; // nRotateDir is also set without a cell
+ bHidden = sal_True; // nRotateDir is also set without a cell
long nCellWidth = (long) pRowInfo[0].pCellInfo[nX+1].nWidth;
SvxCellHorJustify eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)
pPattern->GetItem(ATTR_HOR_JUSTIFY, pCondSet)).GetValue();
- BOOL bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) ||
+ sal_Bool bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) ||
((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue();
- BOOL bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak );
- BOOL bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&>
+ sal_Bool bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak );
+ sal_Bool bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&>
(pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue();
SvxCellOrientation eOrient = pPattern->GetCellOrientation( pCondSet );
const ScMergeAttr* pMerge =
(ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
- BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
+ sal_Bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
long nStartX = nPosX;
long nStartY = nPosY;
if (nX<nX1)
{
if ((bBreak || eOrient!=SVX_ORIENTATION_STANDARD) && !bMerged)
- bHidden = TRUE;
+ bHidden = sal_True;
else
{
nStartX = nInitPosX;
@@ -3334,7 +3334,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pOldPattern = pPattern;
pOldCondSet = pCondSet;
- ULONG nControl = pEngine->GetControlWord();
+ sal_uLong nControl = pEngine->GetControlWord();
if (eOrient==SVX_ORIENTATION_STACKED)
nControl |= EE_CNTRL_ONECHARPERLINE;
else
@@ -3346,7 +3346,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
// set hyphenator the first time it is needed
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
- bHyphenatorSet = TRUE;
+ bHyphenatorSet = sal_True;
}
Color aBackCol = ((const SvxBrushItem&)
@@ -3362,7 +3362,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
const SvxMarginItem* pMargin = (const SvxMarginItem*)
&pPattern->GetItem(ATTR_MARGIN, pCondSet);
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
if ( eHorJust == SVX_HOR_JUSTIFY_LEFT )
nIndent = ((const SfxUInt16Item&)pPattern->
GetItem(ATTR_INDENT, pCondSet)).GetValue();
@@ -3447,7 +3447,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
}
else
{
- ULONG nFormat = pPattern->GetNumberFormat(
+ sal_uLong nFormat = pPattern->GetNumberFormat(
pDoc->GetFormatTable(), pCondSet );
String aString;
Color* pColor;
@@ -3473,7 +3473,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
OSL_FAIL("pCell == NULL");
}
- pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
+ pEngine->SetUpdateMode( sal_True ); // after SetText, before CalcTextWidth/GetTextHeight
long nEngineWidth = (long) pEngine->CalcTextWidth();
long nEngineHeight = pEngine->GetTextHeight();
@@ -3492,7 +3492,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
Size(0,nEngineHeight)).Height();
long nEffHeight = nOutHeight - (long)(nEnginePixel * nAbsCos) + 2;
long nNewWidth = (long)(nEffHeight / nAbsSin) + 2;
- BOOL bFits = ( nNewWidth >= aPaperSize.Width() );
+ sal_Bool bFits = ( nNewWidth >= aPaperSize.Width() );
if ( bFits )
nSteps = 0;
else
@@ -3513,7 +3513,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pEngine->SetPaperSize(pRefDevice->PixelToLogic(aPaperSize));
else
pEngine->SetPaperSize(aPaperSize); // Scale ist immer 1
- //pEngine->QuickFormatDoc( TRUE );
+ //pEngine->QuickFormatDoc( sal_True );
nEngineWidth = (long) pEngine->CalcTextWidth();
nEngineHeight = pEngine->GetTextHeight();
}
@@ -3541,13 +3541,13 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
}
if (!nAttrRotate) // hier nur gedrehter Text
- bHidden = TRUE; //! vorher abfragen !!!
+ bHidden = sal_True; //! vorher abfragen !!!
//! weglassen, was nicht hereinragt
if (!bHidden)
{
- BOOL bClip = FALSE;
+ sal_Bool bClip = false;
Size aClipSize = Size( nScrX+nScrW-nStartX, nScrY+nScrH-nStartY );
// weiterschreiben
@@ -3559,7 +3559,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
aCellSize = Size( nOutWidth, nOutHeight ); // Scale ist 1
long nGridWidth = nEngineWidth;
- BOOL bNegative = FALSE;
+ sal_Bool bNegative = false;
if ( eRotMode != SVX_ROTATE_MODE_STANDARD )
{
nGridWidth = aCellSize.Width() +
@@ -3583,8 +3583,8 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
nNeededWidth = pRefDevice->LogicToPixel(Size(nNeededWidth,0)).Width();
GetOutputArea( nX, nArrY, nCellStartX, nPosY, nCellX, nCellY, nNeededWidth,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
- FALSE, FALSE, TRUE, aAreaParam );
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
+ false, false, sal_True, aAreaParam );
if ( bShrink )
{
@@ -3592,18 +3592,18 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pRefDevice->LogicToPixel(Size(nEngineWidth,0)).Width() : nEngineWidth;
long nNeededPixel = nPixelWidth + nLeftM + nRightM;
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = TRUE;
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = sal_True;
// always do height
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM,
- FALSE, sal::static_int_cast<USHORT>(eOrient), nAttrRotate, bPixelToLogic,
+ false, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
if ( eRotMode == SVX_ROTATE_MODE_STANDARD )
{
// do width only if rotating within the cell (standard mode)
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM,
- TRUE, sal::static_int_cast<USHORT>(eOrient), nAttrRotate, bPixelToLogic,
+ sal_True, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -3621,7 +3621,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
//! Clipping unnoetig, wenn links am Fenster
- bClip = TRUE; // nur Rest ausgeben!
+ bClip = sal_True; // nur Rest ausgeben!
if (nStartX<nScrX)
{
long nDif = nScrX - nStartX;
@@ -3636,13 +3636,13 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if ( nClipStartY < nRowPosY )
{
long nDif = nRowPosY - nClipStartY;
- bClip = TRUE;
+ bClip = sal_True;
nClipStartY = nRowPosY;
aClipSize.Height() -= nDif;
}
}
- bClip = TRUE; // always clip at the window/page border
+ bClip = sal_True; // always clip at the window/page border
//Rectangle aClipRect;
if (bClip)
@@ -3699,7 +3699,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if (eHorJust==SVX_HOR_JUSTIFY_RIGHT ||
eHorJust==SVX_HOR_JUSTIFY_CENTER)
{
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
SvxAdjust eSvxAdjust =
(eHorJust==SVX_HOR_JUSTIFY_RIGHT) ?
@@ -3713,7 +3713,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
else
pEngine->SetPaperSize(aPaperSize);
- pEngine->SetUpdateMode( TRUE );
+ pEngine->SetUpdateMode( sal_True );
}
}
else
@@ -3827,7 +3827,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
// For right-to-left, EditEngine always calculates its lines
// beginning from the right edge, but EditLine::nStartPosX is
- // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
+ // of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX.
Size aLogicPaper = pEngine->GetPaperSize();
if ( aLogicPaper.Width() > USHRT_MAX )
{
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index e98e1c93591d..fc8fb3e16444 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -210,7 +210,7 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer)
pModel->UseHyphenator();
- ULONG nOldDrawMode = pDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pDev->GetDrawMode();
if ( bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
@@ -244,7 +244,7 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer)
// #109985#
void ScOutputData::DrawingSingle(const sal_uInt16 nLayer)
{
- BOOL bHad = FALSE;
+ sal_Bool bHad = false;
SCSIZE nArrY;
for (nArrY=1; nArrY+1<nArrCount; nArrY++)
{
@@ -254,13 +254,13 @@ void ScOutputData::DrawingSingle(const sal_uInt16 nLayer)
{
if (!bHad)
{
- bHad = TRUE;
+ bHad = sal_True;
}
}
else if (bHad)
{
DrawSelectiveObjects( nLayer );
- bHad = FALSE;
+ bHad = false;
}
}
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index 5fe990aad697..9359c5425cf9 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -114,7 +114,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
if ( rMark.GetTableSelect( nTab ) )
{
ScPrintFunc aFunc( pDev, pDocSh, nTab, nFirstAttr[nTab], nTotalPages, pSelRange, &aSelection.GetOptions() );
- aFunc.SetRenderFlag( TRUE );
+ aFunc.SetRenderFlag( sal_True );
long nDisplayStart = GetDisplayStart( nTab );
@@ -126,7 +126,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
aPage.Select( aPageRange );
ScPreviewLocationData aLocData( pDoc, pDev );
- aFunc.DoPrint( aPage, nTabStart, nDisplayStart, FALSE, NULL, &aLocData );
+ aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, &aLocData );
ScRange aCellRange;
Rectangle aPixRect;
@@ -157,7 +157,7 @@ bool ScPrintFuncCache::FindLocation( const ScAddress& rCell, ScPrintPageLocation
return false; // not found
}
-BOOL ScPrintFuncCache::IsSameSelection( const ScPrintSelectionStatus& rStatus ) const
+sal_Bool ScPrintFuncCache::IsSameSelection( const ScPrintSelectionStatus& rStatus ) const
{
return aSelection == rStatus;
}
diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx
index e1d493dd3f24..1422b8a34bda 100644
--- a/sc/source/ui/view/pgbrksh.cxx
+++ b/sc/source/ui/view/pgbrksh.cxx
@@ -68,7 +68,7 @@ ScPageBreakShell::ScPageBreakShell( ScTabViewShell* pViewSh ) :
{
SetPool( &pViewSh->GetPool() );
ScViewData* pViewData = pViewSh->GetViewData();
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index c9fa7f8efbf1..ac6aaeb53575 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -76,7 +76,7 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) :
{
SetPool( &pViewSh->GetPool() );
ScViewData* pViewData = pViewSh->GetViewData();
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -144,7 +144,7 @@ void ScPivotShell::Execute( SfxRequest& rReq )
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSheetDesc( aNewDesc );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
delete pDlg;
@@ -159,10 +159,10 @@ void ScPivotShell::GetState( SfxItemSet& rSet )
{
ScDocShell* pDocSh = pViewShell->GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack();
+ sal_Bool bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index d30361494b69..a58eef8e2335 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -100,35 +100,35 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView
Window( pParent ),
nPageNo( 0 ),
nZoom( 100 ),
- bValid( FALSE ),
+ bValid( false ),
nTabsTested( 0 ),
nTab( 0 ),
nTabStart( 0 ),
nDisplayStart( 0 ),
nTotalPages( 0 ),
- bStateValid( FALSE ),
- bLocationValid( FALSE ),
+ bStateValid( false ),
+ bLocationValid( false ),
pLocationData( NULL ),
pDrawView( NULL ),
nCurTab ( ScDocShell::GetCurTab() ),
- bInPaint( FALSE ),
- bInGetState( FALSE ),
+ bInPaint( false ),
+ bInGetState( false ),
pDocShell( pDocSh ),
pViewShell( pViewSh ),
- bLeftRulerMove( FALSE ),
- bRightRulerMove( FALSE ),
- bTopRulerMove( FALSE ),
- bBottomRulerMove( FALSE ),
- bHeaderRulerMove( FALSE ),
- bFooterRulerMove( FALSE ),
- bLeftRulerChange( FALSE ),
- bRightRulerChange( FALSE ),
- bTopRulerChange( FALSE ),
- bBottomRulerChange( FALSE ),
- bHeaderRulerChange( FALSE ),
- bFooterRulerChange( FALSE ),
- bPageMargin ( FALSE ),
- bColRulerMove( FALSE ),
+ bLeftRulerMove( false ),
+ bRightRulerMove( false ),
+ bTopRulerMove( false ),
+ bBottomRulerMove( false ),
+ bHeaderRulerMove( false ),
+ bFooterRulerMove( false ),
+ bLeftRulerChange( false ),
+ bRightRulerChange( false ),
+ bTopRulerChange( false ),
+ bBottomRulerChange( false ),
+ bHeaderRulerChange( false ),
+ bFooterRulerChange( false ),
+ bPageMargin ( false ),
+ bColRulerMove( false ),
mnScale( 0 ),
nColNumberButttonDown( 0 ),
nHeaderHeight ( 0 ),
@@ -171,8 +171,8 @@ void ScPreview::UpdateDrawView() // nTab muss richtig sein
pDrawView = new FmFormView( pModel, this );
// die DrawView uebernimmt den Design-Modus vom Model
// (Einstellung "Im Entwurfsmodus oeffnen"), darum hier zuruecksetzen
- pDrawView->SetDesignMode( TRUE );
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetDesignMode( sal_True );
+ pDrawView->SetPrintPreview( sal_True );
pDrawView->ShowSdrPage(pPage);
}
}
@@ -197,7 +197,7 @@ void ScPreview::TestLastPage()
DBG_ASSERT(nPages[nTab],"alle Tabellen leer?");
nTabPage = nPages[nTab] - 1;
nTabStart = 0;
- for (USHORT i=0; i<nTab; i++)
+ for (sal_uInt16 i=0; i<nTab; i++)
nTabStart += nPages[i];
ScDocument* pDoc = pDocShell->GetDocument();
@@ -244,7 +244,7 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
ScPrintOptions aOptions = SC_MOD()->GetPrintOptions();
ScMarkData aMarkData;
- aMarkData.SelectTable( nCurTab, TRUE );
+ aMarkData.SelectTable( nCurTab, true );
for (SCTAB i=nStart; i<nAnz; i++)
{
@@ -286,8 +286,8 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
aState.nDocPages = nTotalPages;
- bValid = TRUE;
- bStateValid = TRUE;
+ bValid = sal_True;
+ bStateValid = sal_True;
DoInvalidate();
}
@@ -299,11 +299,11 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert
SCTAB nOldTab = nTab;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
while (nPageNo >= nTotalPages && nTabsTested < nTabCount)
{
CalcPages( nTabsTested );
- bDone = TRUE;
+ bDone = sal_True;
}
if (!bDone)
@@ -329,7 +329,7 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert
TestLastPage(); // testen, ob hinter letzter Seite
if ( nTab != nOldTab )
- bStateValid = FALSE;
+ bStateValid = false;
DoInvalidate();
}
@@ -348,8 +348,8 @@ 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 bValidPage = ( nPageNo < nTotalPages );
+ sal_Bool bDoPrint = ( pFillLocation == NULL );
+ sal_Bool bValidPage = ( nPageNo < nTotalPages );
ScModule* pScMod = SC_MOD();
const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig();
@@ -382,7 +382,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
pPrintFunc->SetOffset(aOffset);
pPrintFunc->SetManualZoom(nZoom);
pPrintFunc->SetDateTime(aDate,aTime);
- pPrintFunc->SetClearFlag(TRUE);
+ pPrintFunc->SetClearFlag(sal_True);
pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() );
pPrintFunc->SetDrawView( pDrawView );
@@ -409,7 +409,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
{
pPrintFunc->GetPrintState( aState );
aState.nDocPages = nTotalPages;
- bStateValid = TRUE;
+ bStateValid = sal_True;
}
delete pPrintFunc;
}
@@ -423,8 +423,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
Size aWinSize = GetOutputSize();
Point aWinEnd( aWinSize.Width(), aWinSize.Height() );
- BOOL bRight = nPageEndX <= aWinEnd.X();
- BOOL bBottom = nPageEndY <= aWinEnd.Y();
+ sal_Bool bRight = nPageEndX <= aWinEnd.X();
+ sal_Bool bBottom = nPageEndY <= aWinEnd.Y();
if (bRight || bBottom)
{
SetLineColor();
@@ -514,11 +514,11 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
long nRightMargin = 0;
long nTopMargin = 0;
long nBottomMargin = 0;
- BOOL bHeaderOn = FALSE;
- BOOL bFooterOn = FALSE;
+ sal_Bool bHeaderOn = false;
+ sal_Bool bFooterOn = false;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Size aPaintPageSize;
if ( nPageNo < nTotalPages )
@@ -534,7 +534,7 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
pPrintFunc->SetOffset(aOffset);
pPrintFunc->SetManualZoom(nZoom);
pPrintFunc->SetDateTime(aDate,aTime);
- pPrintFunc->SetClearFlag(TRUE);
+ pPrintFunc->SetClearFlag(sal_True);
pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() );
pPrintFunc->SetDrawView( pDrawView );
@@ -606,7 +606,7 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
{
pPrintFunc->GetPrintState( aState );
aState.nDocPages = nTotalPages;
- bStateValid = TRUE;
+ bStateValid = sal_True;
}
delete pPrintFunc;
@@ -617,8 +617,8 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
long nPageEndY = aPaintPageSize.Height() - aOffset.Y();
Size aWinSize = GetOutputSize();
Point aWinEnd( aWinSize.Width(), aWinSize.Height() );
- BOOL bRight = nPageEndX <= aWinEnd.X();
- BOOL bBottom = nPageEndY <= aWinEnd.Y();
+ sal_Bool bRight = nPageEndX <= aWinEnd.X();
+ sal_Bool bBottom = nPageEndY <= aWinEnd.Y();
if( bPageMargin )
{
@@ -670,10 +670,10 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
void ScPreview::Command( const CommandEvent& rCEvt )
{
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL )
{
- BOOL bDone = pViewShell->ScrollCommand( rCEvt );
+ sal_Bool bDone = pViewShell->ScrollCommand( rCEvt );
if (!bDone)
Window::Command(rCEvt);
}
@@ -690,11 +690,11 @@ void ScPreview::KeyInput( const KeyEvent& rKEvt )
// (in ScPreview, not ScPreviewShell -> only if the preview window has the focus)
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
- BOOL bHandled = FALSE;
+ sal_uInt16 nKey = rKeyCode.GetCode();
+ sal_Bool bHandled = false;
if(!rKeyCode.GetModifier())
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch(nKey)
{
case KEY_ADD: nSlot = SID_PREVIEW_ZOOMIN; break;
@@ -703,7 +703,7 @@ void ScPreview::KeyInput( const KeyEvent& rKEvt )
}
if(nSlot)
{
- bHandled = TRUE;
+ bHandled = sal_True;
pViewShell->GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON );
}
}
@@ -718,19 +718,19 @@ const ScPreviewLocationData& ScPreview::GetLocationData()
if ( !pLocationData )
{
pLocationData = new ScPreviewLocationData( pDocShell->GetDocument(), this );
- bLocationValid = FALSE;
+ bLocationValid = false;
}
if ( !bLocationValid )
{
pLocationData->Clear();
DoPrint( pLocationData );
- bLocationValid = TRUE;
+ bLocationValid = sal_True;
}
return *pLocationData;
}
-void ScPreview::DataChanged(BOOL bNewTime)
+void ScPreview::DataChanged(sal_Bool bNewTime)
{
if (bNewTime)
{
@@ -738,7 +738,7 @@ void ScPreview::DataChanged(BOOL bNewTime)
aTime = Time();
}
- bValid = FALSE;
+ bValid = false;
InvalidateLocationData( SC_HINT_DATACHANGED );
Invalidate();
}
@@ -766,7 +766,7 @@ String ScPreview::GetPosString()
}
-void ScPreview::SetZoom(USHORT nNewZoom)
+void ScPreview::SetZoom(sal_uInt16 nNewZoom)
{
if (nNewZoom < 20)
nNewZoom = 20;
@@ -783,11 +783,11 @@ void ScPreview::SetZoom(USHORT nNewZoom)
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
SetMapMode( aMMMode );
- bInPaint = TRUE; // don't scroll during SetYOffset in UpdateScrollBars
+ bInPaint = sal_True; // don't scroll during SetYOffset in UpdateScrollBars
pViewShell->UpdateScrollBars();
- bInPaint = FALSE;
+ bInPaint = false;
- bStateValid = FALSE;
+ bStateValid = false;
InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
DoInvalidate();
Invalidate();
@@ -848,7 +848,7 @@ Size lcl_GetDocPageSize( ScDocument* pDoc, SCTAB nTab )
}
-USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly)
+sal_uInt16 ScPreview::GetOptimalZoom(sal_Bool bWidthOnly)
{
double nWinScaleX = ScGlobal::nScreenPPTX / pDocShell->GetOutputFactor();
double nWinScaleY = ScGlobal::nScreenPPTY;
@@ -876,7 +876,7 @@ USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly)
if (nOptimal>400)
nOptimal = 400;
- return (USHORT) nOptimal;
+ return (sal_uInt16) nOptimal;
}
else
return nZoom;
@@ -1023,14 +1023,14 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
if( bLeftRulerChange )
{
DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR );
- bLeftRulerMove = TRUE;
- bRightRulerMove = FALSE;
+ bLeftRulerMove = sal_True;
+ bRightRulerMove = false;
}
else if( bRightRulerChange )
{
DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR );
- bLeftRulerMove = FALSE;
- bRightRulerMove = TRUE;
+ bLeftRulerMove = false;
+ bRightRulerMove = sal_True;
}
}
@@ -1040,26 +1040,26 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
if( bTopRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bTopRulerMove = TRUE;
- bBottomRulerMove = FALSE;
+ bTopRulerMove = sal_True;
+ bBottomRulerMove = false;
}
else if( bBottomRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bTopRulerMove = FALSE;
- bBottomRulerMove = TRUE;
+ bTopRulerMove = false;
+ bBottomRulerMove = sal_True;
}
else if( bHeaderRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bHeaderRulerMove = TRUE;
- bFooterRulerMove = FALSE;
+ bHeaderRulerMove = sal_True;
+ bFooterRulerMove = false;
}
else if( bFooterRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bHeaderRulerMove = FALSE;
- bFooterRulerMove = TRUE;
+ bHeaderRulerMove = false;
+ bFooterRulerMove = sal_True;
}
}
@@ -1085,7 +1085,7 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT );
DrawInvert( aButtonDownChangePoint.X(), POINTER_HSPLIT );
- bColRulerMove = TRUE;
+ bColRulerMove = sal_True;
}
}
@@ -1104,11 +1104,11 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
{
SetPointer( Pointer( POINTER_ARROW ) );
- BOOL bMoveRulerAction= TRUE;
+ sal_Bool bMoveRulerAction= sal_True;
ScDocument * pDoc = pDocShell->GetDocument();
String aOldName = pDoc->GetPageStyle( nTab );
- BOOL bUndo( pDoc->IsUndoEnabled() );
+ sal_Bool bUndo( pDoc->IsUndoEnabled() );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
@@ -1124,22 +1124,22 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if(( bLeftRulerChange || bRightRulerChange ) && ( aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth * HMM_PER_TWIPS - aOffset.X() ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint(Rectangle(0,0,10000,10000));
}
else if( bLeftRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS > nWidth - aLRItem.GetRight() - aOffset.X() / HMM_PER_TWIPS ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint(Rectangle(0,0,10000,10000));
}
else if( bRightRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS < aLRItem.GetLeft() - aOffset.X() / HMM_PER_TWIPS ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint(Rectangle(0,0,10000,10000));
}
else if( aButtonDownPt.X() == aButtonUpPt.X() )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
DrawInvert( aButtonUpPt.X(), POINTER_HSIZEBAR );
}
if( bMoveRulerAction )
@@ -1174,33 +1174,33 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
Rectangle aRect(0,0,10000,10000);
Paint( aRect );
- bLeftRulerChange = FALSE;
- bRightRulerChange = FALSE;
+ bLeftRulerChange = false;
+ bRightRulerChange = false;
}
}
- bLeftRulerMove = FALSE;
- bRightRulerMove = FALSE;
+ bLeftRulerMove = false;
+ bRightRulerMove = false;
}
if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR )
{
SetPointer( POINTER_ARROW );
- BOOL bMoveRulerAction = TRUE;
+ sal_Bool bMoveRulerAction = sal_True;
if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint( Rectangle(0,0,10000,10000) );
}
else if( aButtonDownPt.Y() == aButtonUpPt.Y() )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
DrawInvert( aButtonUpPt.Y(), POINTER_VSIZEBAR );
}
if( bMoveRulerAction )
{
ScDocument * pDoc = pDocShell->GetDocument();
- BOOL bUndo( pDoc->IsUndoEnabled() );
+ sal_Bool bUndo( pDoc->IsUndoEnabled() );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
DBG_ASSERT( pStyleSheet, "PageStyle not found" );
@@ -1216,20 +1216,20 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if( bTopRulerMove && bTopRulerChange )
{
- aULItem.SetUpperValue( (USHORT)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) );
+ aULItem.SetUpperValue( (sal_uInt16)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) );
rStyleSet.Put( aULItem );
pDocShell->SetModified(true);
}
else if( bBottomRulerMove && bBottomRulerChange )
{
- aULItem.SetLowerValue( (USHORT)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) );
+ aULItem.SetLowerValue( (sal_uInt16)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) );
rStyleSet.Put( aULItem );
pDocShell->SetModified(true);
}
else if( bHeaderRulerMove && bHeaderRulerChange )
{
const SfxPoolItem* pItem = NULL;
- if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SFX_ITEM_SET )
{
SfxItemSet& pHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
Size aHeaderSize = ((const SvxSizeItem&)pHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize();
@@ -1244,7 +1244,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
else if( bFooterRulerMove && bFooterRulerChange )
{
const SfxPoolItem* pItem = NULL;
- if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SFX_ITEM_SET )
{
SfxItemSet& pFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
Size aFooterSize = ((const SvxSizeItem&)pFooterSet.Get(ATTR_PAGE_SIZE)).GetSize();
@@ -1274,26 +1274,26 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
Rectangle aRect(0,0,10000,10000);
Paint( aRect );
- bTopRulerChange = FALSE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = false;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = false;
}
}
- bTopRulerMove = FALSE;
- bBottomRulerMove = FALSE;
- bHeaderRulerMove = FALSE;
- bFooterRulerMove = FALSE;
+ bTopRulerMove = false;
+ bBottomRulerMove = false;
+ bHeaderRulerMove = false;
+ bFooterRulerMove = false;
}
if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT )
{
SetPointer(POINTER_ARROW);
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
- BOOL bMoveRulerAction = TRUE;
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bMoveRulerAction = sal_True;
if( aButtonDownPt.X() == aButtonUpPt.X() )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
if( nColNumberButttonDown == aPageArea.aStart.Col() )
DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,POINTER_HSPLIT );
else
@@ -1320,7 +1320,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if( nNewColWidth >= 0 )
{
- aFunc.SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_DIRECT, (USHORT)nNewColWidth, TRUE, TRUE);
+ aFunc.SetWidthOrHeight( true, 1,nCols, nTab, SC_SIZE_DIRECT, (sal_uInt16)nNewColWidth, true, true);
pDocShell->SetModified(true);
}
if ( ValidTab( nTab ) )
@@ -1331,7 +1331,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
Rectangle nRect(0,0,10000,10000);
Paint( nRect );
}
- bColRulerMove = FALSE;
+ bColRulerMove = false;
}
ReleaseMouse();
}
@@ -1392,7 +1392,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
Point aHeaderLeft = LogicToPixel( Point( -aOffset.X(), nHeaderHeight ), aMMMode );
Point aFooderLeft = LogicToPixel( Point( -aOffset.X(), nFooterHeight ), aMMMode );
- BOOL bOnColRulerChange = FALSE;
+ sal_Bool bOnColRulerChange = false;
for( SCCOL i=aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
{
@@ -1402,7 +1402,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
&& ( aPixPt.Y() > aColumnTop.Y() ) && ( aPixPt.Y() < aColumnBottom.Y() ) && !bLeftRulerMove && !bRightRulerMove
&& !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
{
- bOnColRulerChange = TRUE;
+ bOnColRulerChange = sal_True;
if( !rMEvt.GetButtons() && GetPointer() == POINTER_HSPLIT )
nColNumberButttonDown = i;
break;
@@ -1411,41 +1411,41 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
if( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 ) && !bRightRulerMove )
{
- bLeftRulerChange = TRUE;
- bRightRulerChange = FALSE;
+ bLeftRulerChange = sal_True;
+ bRightRulerChange = false;
}
else if( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > ( aRightTop.X() - 2 ) && !bLeftRulerMove )
{
- bLeftRulerChange = FALSE;
- bRightRulerChange = TRUE;
+ bLeftRulerChange = false;
+ bRightRulerChange = sal_True;
}
else if( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y() > ( aTopLeft.Y() - 2 ) && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
{
- bTopRulerChange = TRUE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = sal_True;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = false;
}
else if( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) && aPixPt.Y() > ( aBottomLeft.Y() - 2 ) && !bTopRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
{
- bTopRulerChange = FALSE;
- bBottomRulerChange = TRUE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = false;
+ bBottomRulerChange = sal_True;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = false;
}
else if( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) && aPixPt.Y() > ( aHeaderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bFooterRulerMove )
{
- bTopRulerChange = FALSE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = TRUE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = false;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = sal_True;
+ bFooterRulerChange = false;
}
else if( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) && aPixPt.Y() > ( aFooderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove )
{
- bTopRulerChange = FALSE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = TRUE;
+ bTopRulerChange = false;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = sal_True;
}
if( bPageMargin )
@@ -1536,9 +1536,9 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
}
}
//Issue51656 Add resizeable margin on page preview from maoyg
-void ScPreview::InvalidateLocationData(ULONG nId)
+void ScPreview::InvalidateLocationData(sal_uLong nId)
{
- bLocationValid = FALSE;
+ bLocationValid = false;
if (pViewShell->HasAccessibilityObjects())
pViewShell->BroadcastAccessibility( SfxSimpleHint( nId ) );
}
@@ -1565,7 +1565,7 @@ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPre
}
//Issue51656 Add resizeable margin on page preview from maoyg
-void ScPreview::DragMove( long nDragMovePos, USHORT nFlags )
+void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags )
{
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
@@ -1592,7 +1592,7 @@ void ScPreview::DragMove( long nDragMovePos, USHORT nFlags )
}
}
-void ScPreview::DrawInvert( long nDragPos, USHORT nFlags )
+void ScPreview::DrawInvert( long nDragPos, sal_uInt16 nFlags )
{
long nHeight = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Height();
long nWidth = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Width();
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index f0c93d563bdb..39560477fe30 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -53,11 +53,11 @@ struct ScPreviewLocationEntry
ScPreviewLocationType eType;
Rectangle aPixelRect;
ScRange aCellRange;
- BOOL bRepeatCol;
- BOOL bRepeatRow;
+ sal_Bool bRepeatCol;
+ sal_Bool bRepeatRow;
ScPreviewLocationEntry( ScPreviewLocationType eNewType, const Rectangle& rPixel, const ScRange& rRange,
- BOOL bRepCol, BOOL bRepRow ) :
+ sal_Bool bRepCol, sal_Bool bRepRow ) :
eType( eNewType ),
aPixelRect( rPixel ),
aCellRange( rRange ),
@@ -188,7 +188,7 @@ void ScPreviewLocationData::Clear()
nDrawRanges = 0;
}
-void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, BOOL bRepCol, BOOL bRepRow,
+void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, sal_Bool bRepCol, sal_Bool bRepRow,
const MapMode& rDrawMap )
{
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
@@ -220,25 +220,25 @@ void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange&
}
}
-void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, BOOL bRepCol )
+void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, sal_Bool bRepCol )
{
SCTAB nTab = 0; //! ?
ScRange aRange( nStartCol, 0, nTab, nEndCol, 0, nTab );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, false ) );
}
-void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, BOOL bRepRow )
+void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, sal_Bool bRepRow )
{
SCTAB nTab = 0; //! ?
ScRange aRange( 0, nStartRow, nTab, 0, nEndRow, nTab );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_ROWHEADER, aPixelRect, aRange, FALSE, bRepRow ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_ROWHEADER, aPixelRect, aRange, false, bRepRow ) );
}
-void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, BOOL bHeader, BOOL bLeft )
+void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, sal_Bool bHeader, sal_Bool bLeft )
{
ScRange aRange; //! ?
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
@@ -247,7 +247,7 @@ void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, BOOL bHeade
( bLeft ? SC_PLOC_LEFTHEADER : SC_PLOC_RIGHTHEADER ) :
( bLeft ? SC_PLOC_LEFTFOOTER : SC_PLOC_RIGHTFOOTER );
- aEntries.push_front( new ScPreviewLocationEntry( eType, aPixelRect, aRange, FALSE, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( eType, aPixelRect, aRange, false, false ) );
}
void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress& rPos )
@@ -255,7 +255,7 @@ void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress
ScRange aRange( rPos );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTEMARK, aPixelRect, aRange, FALSE, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTEMARK, aPixelRect, aRange, false, false ) );
}
void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress& rPos )
@@ -263,10 +263,10 @@ void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress
ScRange aRange( rPos );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTETEXT, aPixelRect, aRange, FALSE, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTETEXT, aPixelRect, aRange, false, false ) );
}
-void ScPreviewLocationData::GetDrawRange( USHORT nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const
+void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const
{
DBG_ASSERT( nPos < nDrawRanges, "wrong position" );
if ( nPos < nDrawRanges )
@@ -301,7 +301,7 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons
SCCOL nEndCol = rCellPos.Col();
for (SCCOL nCol = rRange.aStart.Col(); nCol < nEndCol; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab );
if (nDocW)
nPosX += (long) (nDocW * nScaleX);
}
@@ -320,7 +320,7 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons
return Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel );
}
-BOOL ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const
+sal_Bool ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const
{
ScPreviewLocationEntry* pEntry = lcl_GetEntryByAddress( aEntries, rCellPos, SC_PLOC_CELLRANGE );
if ( pEntry )
@@ -330,25 +330,25 @@ BOOL ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangl
aOffsetRect.Top() + pEntry->aPixelRect.Top(),
aOffsetRect.Right() + pEntry->aPixelRect.Left(),
aOffsetRect.Bottom() + pEntry->aPixelRect.Top() );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const
+sal_Bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == SC_PLOC_CELLRANGE || it->eType == SC_PLOC_COLHEADER || it->eType == SC_PLOC_ROWHEADER )
if ( it->aPixelRect.IsOver( rVisiblePixel ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
+sal_Bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
@@ -356,14 +356,14 @@ BOOL ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
if ( it->eType == SC_PLOC_LEFTHEADER || it->eType == SC_PLOC_RIGHTHEADER )
{
rRect = it->aPixelRect;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const
+sal_Bool ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
@@ -371,48 +371,48 @@ BOOL ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const
if ( it->eType == SC_PLOC_LEFTFOOTER || it->eType == SC_PLOC_RIGHTFOOTER )
{
rRect = it->aPixelRect;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::IsHeaderLeft() const
+sal_Bool ScPreviewLocationData::IsHeaderLeft() const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == SC_PLOC_LEFTHEADER )
- return TRUE;
+ return true;
if ( it->eType == SC_PLOC_RIGHTHEADER )
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::IsFooterLeft() const
+sal_Bool ScPreviewLocationData::IsFooterLeft() const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == SC_PLOC_LEFTFOOTER )
- return TRUE;
+ return true;
if ( it->eType == SC_PLOC_RIGHTFOOTER )
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
-long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, BOOL bNoteMarks ) const
+long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, sal_Bool bNoteMarks ) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
@@ -423,35 +423,35 @@ long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel,
return nRet;
}
-BOOL ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, BOOL bNoteMarks,
+sal_Bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, sal_Bool bNoteMarks,
ScAddress& rCellPos, Rectangle& rNoteRect ) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == eType && it->aPixelRect.IsOver( rVisiblePixel ) )
{
- if ( nPos == sal::static_int_cast<ULONG>(nIndex) )
+ if ( nPos == sal::static_int_cast<sal_uLong>(nIndex) )
{
rCellPos = it->aCellRange.aStart;
rNoteRect = it->aPixelRect;
- return TRUE;
+ return true;
}
++nPos;
}
}
- return FALSE;
+ return false;
}
-Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, BOOL bNoteMarks, const ScAddress& aCellPos) const
+Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, sal_Bool bNoteMarks, const ScAddress& aCellPos) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
@@ -472,18 +472,18 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
const double nScaleY = HMM_PER_TWIPS;
// from left to right:
- BOOL bHasHeaderCol = FALSE;
- BOOL bHasRepCols = FALSE;
- BOOL bHasMainCols = FALSE;
+ sal_Bool bHasHeaderCol = false;
+ sal_Bool bHasRepCols = false;
+ sal_Bool bHasMainCols = false;
SCCOL nRepeatColStart = 0;
SCCOL nRepeatColEnd = 0;
SCCOL nMainColStart = 0;
SCCOL nMainColEnd = 0;
// from top to bottom:
- BOOL bHasHeaderRow = FALSE;
- BOOL bHasRepRows = FALSE;
- BOOL bHasMainRows = FALSE;
+ sal_Bool bHasHeaderRow = false;
+ sal_Bool bHasRepRows = false;
+ sal_Bool bHasMainRows = false;
SCROW nRepeatRowStart = 0;
SCROW nRepeatRowEnd = 0;
SCROW nMainRowStart = 0;
@@ -499,7 +499,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
{
if ( it->bRepeatCol )
{
- bHasRepCols = TRUE;
+ bHasRepCols = true;
nRepeatColStart = it->aCellRange.aStart.Col();
nRepeatColEnd = it->aCellRange.aEnd.Col();
aRepeatRect.Left() = it->aPixelRect.Left();
@@ -507,7 +507,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
}
else
{
- bHasMainCols = TRUE;
+ bHasMainCols = true;
nMainColStart = it->aCellRange.aStart.Col();
nMainColEnd = it->aCellRange.aEnd.Col();
aMainRect.Left() = it->aPixelRect.Left();
@@ -515,7 +515,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
}
if ( it->bRepeatRow )
{
- bHasRepRows = TRUE;
+ bHasRepRows = true;
nRepeatRowStart = it->aCellRange.aStart.Row();
nRepeatRowEnd = it->aCellRange.aEnd.Row();
aRepeatRect.Top() = it->aPixelRect.Top();
@@ -523,7 +523,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
}
else
{
- bHasMainRows = TRUE;
+ bHasMainRows = true;
nMainRowStart = it->aCellRange.aStart.Row();
nMainRowEnd = it->aCellRange.aEnd.Row();
aMainRect.Top() = it->aPixelRect.Top();
@@ -534,14 +534,14 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
else if ( it->eType == SC_PLOC_ROWHEADER )
{
// row headers result in an additional column
- bHasHeaderCol = TRUE;
+ bHasHeaderCol = true;
aHeaderRect.Left() = it->aPixelRect.Left();
aHeaderRect.Right() = it->aPixelRect.Right();
}
else if ( it->eType == SC_PLOC_COLHEADER )
{
// column headers result in an additional row
- bHasHeaderRow = TRUE;
+ bHasHeaderRow = true;
aHeaderRect.Top() = it->aPixelRect.Top();
aHeaderRect.Bottom() = it->aPixelRect.Bottom();
}
@@ -571,7 +571,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if ( bHasHeaderCol )
{
- pColInfo[nColPos].Set( TRUE, 0, aHeaderRect.Left(), aHeaderRect.Right() );
+ pColInfo[nColPos].Set( sal_True, 0, aHeaderRect.Left(), aHeaderRect.Right() );
++nColPos;
}
if ( bHasRepCols )
@@ -580,12 +580,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
for ( nCol=nRepeatColStart; nCol<=nRepeatColEnd; nCol++ )
if (!pDoc->ColHidden(nCol, nTab))
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab );
long nNextX = nPosX + (long) (nDocW * nScaleX);
long nPixelStart = pWindow->LogicToPixel( Size( nPosX, 0 ), aCellMapMode ).Width();
long nPixelEnd = pWindow->LogicToPixel( Size( nNextX, 0 ), aCellMapMode ).Width() - 1;
- pColInfo[nColPos].Set( FALSE, nCol,
+ pColInfo[nColPos].Set( false, nCol,
aRepeatRect.Left() + nPixelStart,
aRepeatRect.Left() + nPixelEnd );
@@ -599,12 +599,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
for ( nCol=nMainColStart; nCol<=nMainColEnd; nCol++ )
if (!pDoc->ColHidden(nCol, nTab))
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab );
long nNextX = nPosX + (long) (nDocW * nScaleX);
long nPixelStart = pWindow->LogicToPixel( Size( nPosX, 0 ), aCellMapMode ).Width();
long nPixelEnd = pWindow->LogicToPixel( Size( nNextX, 0 ), aCellMapMode ).Width() - 1;
- pColInfo[nColPos].Set( FALSE, nCol,
+ pColInfo[nColPos].Set( false, nCol,
aMainRect.Left() + nPixelStart,
aMainRect.Left() + nPixelEnd );
@@ -636,7 +636,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if ( bHasHeaderRow )
{
- pRowInfo[nRowPos].Set( TRUE, 0, aHeaderRect.Top(), aHeaderRect.Bottom() );
+ pRowInfo[nRowPos].Set( sal_True, 0, aHeaderRect.Top(), aHeaderRect.Bottom() );
++nRowPos;
}
if ( bHasRepRows )
@@ -647,12 +647,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if (pDoc->RowHidden(nRow, nTab))
continue;
- USHORT nDocH = pDoc->GetOriginalHeight( nRow, nTab );
+ sal_uInt16 nDocH = pDoc->GetOriginalHeight( nRow, nTab );
long nNextY = nPosY + (long) (nDocH * nScaleY);
long nPixelStart = pWindow->LogicToPixel( Size( 0, nPosY ), aCellMapMode ).Height();
long nPixelEnd = pWindow->LogicToPixel( Size( 0, nNextY ), aCellMapMode ).Height() - 1;
- pRowInfo[nRowPos].Set( FALSE, nRow,
+ pRowInfo[nRowPos].Set( false, nRow,
aRepeatRect.Top() + nPixelStart,
aRepeatRect.Top() + nPixelEnd );
@@ -668,12 +668,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if (pDoc->RowHidden(nRow, nTab))
continue;
- USHORT nDocH = pDoc->GetOriginalHeight( nRow, nTab );
+ sal_uInt16 nDocH = pDoc->GetOriginalHeight( nRow, nTab );
long nNextY = nPosY + (long) (nDocH * nScaleY);
long nPixelStart = pWindow->LogicToPixel( Size( 0, nPosY ), aCellMapMode ).Height();
long nPixelEnd = pWindow->LogicToPixel( Size( 0, nNextY ), aCellMapMode ).Height() - 1;
- pRowInfo[nRowPos].Set( FALSE, nRow,
+ pRowInfo[nRowPos].Set( false, nRow,
aMainRect.Top() + nPixelStart,
aMainRect.Top() + nPixelEnd );
@@ -732,7 +732,7 @@ Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) co
// GetMainCellRange is used for links in PDF export
-BOOL ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const
+sal_Bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
@@ -741,11 +741,11 @@ BOOL ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRe
{
rRange = it->aCellRange;
rPixRect = it->aPixelRect;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 2b61a8f8e97c..c6770ba27729 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -44,7 +44,6 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
@@ -121,7 +120,7 @@ void ScPreviewShell::Construct( Window* pParent )
pVerScroll = new ScrollBar(pParent, WB_VSCROLL);
// SSA: --- RTL --- no mirroring for horizontal scrollbars
- pHorScroll->EnableRTL( FALSE );
+ pHorScroll->EnableRTL( false );
pHorScroll->SetEndScrollHdl( LINK( this, ScPreviewShell, ScrollHandler ) );
pVerScroll->SetEndScrollHdl( LINK( this, ScPreviewShell, ScrollHandler ) );
@@ -130,8 +129,8 @@ void ScPreviewShell::Construct( Window* pParent )
SetPool( &SC_MOD()->GetPool() );
SetWindow( pPreview );
- StartListening(*pDocShell,TRUE);
- StartListening(*SFX_APP(),TRUE); // #i62045# #i62046# application is needed for Calc's own hints
+ StartListening(*pDocShell,sal_True);
+ StartListening(*SFX_APP(),sal_True); // #i62045# #i62046# application is needed for Calc's own hints
SfxBroadcaster* pDrawBC = pDocShell->GetDocument()->GetDrawBroadcaster();
if (pDrawBC)
StartListening(*pDrawBC);
@@ -256,9 +255,9 @@ void ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
Size( nBarW, nBarH ) );
if ( SVX_ZOOM_WHOLEPAGE == eZoom )
- pPreview->SetZoom( pPreview->GetOptimalZoom(FALSE) );
+ pPreview->SetZoom( pPreview->GetOptimalZoom(false) );
else if ( SVX_ZOOM_PAGEWIDTH == eZoom )
- pPreview->SetZoom( pPreview->GetOptimalZoom(TRUE) );
+ pPreview->SetZoom( pPreview->GetOptimalZoom(sal_True) );
UpdateScrollBars();
}
@@ -367,7 +366,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
long nTotalPages = pPreview->GetTotalPages();
long nPageNo = 0;
long nPerPageLength = 0;
- BOOL bIsDivide = TRUE;
+ sal_Bool bIsDivide = sal_True;
if( nTotalPages )
nPerPageLength = nMaxRange / nTotalPages;
@@ -377,12 +376,12 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
nPageNo = nPos / nPerPageLength;
if( nPos % nPerPageLength )
{
- bIsDivide = FALSE;
+ bIsDivide = false;
nPageNo ++;
}
}
- BOOL bHoriz = ( pScroll == pHorScroll );
+ sal_Bool bHoriz = ( pScroll == pHorScroll );
if( bHoriz )
pPreview->SetXOffset( nPos );
@@ -396,7 +395,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
Point aPos = pScroll->GetParent()->OutputToNormalizedScreenPixel( pScroll->GetPosPixel() );
String aHelpStr;
Rectangle aRect;
- USHORT nAlign;
+ sal_uInt16 nAlign;
if( nDelta < 0 )
{
@@ -414,7 +413,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
}
else if( nDelta > 0 )
{
- BOOL bAllTested = pPreview->AllTested();
+ sal_Bool bAllTested = pPreview->AllTested();
if ( nTotalPages && ( nPageNo < nTotalPages || !bAllTested ) )
pPreview->SetPageNo( nPageNo );
@@ -438,9 +437,9 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
return 0;
}
-BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
+sal_Bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const CommandWheelData* pData = rCEvt.GetWheelData();
if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM )
{
@@ -454,10 +453,10 @@ BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
if ( nNew != nOld )
{
eZoom = SVX_ZOOM_PERCENT;
- pPreview->SetZoom( (USHORT)nNew );
+ pPreview->SetZoom( (sal_uInt16)nNew );
}
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -467,12 +466,12 @@ BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
return bDone;
}
-SfxPrinter* ScPreviewShell::GetPrinter( BOOL bCreate )
+SfxPrinter* ScPreviewShell::GetPrinter( sal_Bool bCreate )
{
return pDocShell->GetPrinter(bCreate);
}
-USHORT ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
return pDocShell->SetPrinter( pNewPrinter, nDiffFlags );
}
@@ -502,8 +501,8 @@ PrintDialog* ScPreviewShell::CreatePrintDialog( Window* pParent )
pDlg->EnableRange ( PRINTDIALOG_RANGE );
pDlg->SetFirstPage ( 1 );
pDlg->SetMinPage ( 1 );
- pDlg->SetLastPage ( (USHORT)nDocPageMax );
- pDlg->SetMaxPage ( (USHORT)nDocPageMax );
+ pDlg->SetLastPage ( (sal_uInt16)nDocPageMax );
+ pDlg->SetMaxPage ( (sal_uInt16)nDocPageMax );
pDlg->EnableCollate ();
// Selektion hier nicht
@@ -526,17 +525,17 @@ void ScPreviewShell::PreparePrint( PrintDialog* pPrintDialog )
SfxViewShell::PreparePrint( pPrintDialog );
ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
+ aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), true );
pDocShell->PreparePrint( pPrintDialog, &aMarkData );
}
ErrCode ScPreviewShell::DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI )
+ PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI )
{
ErrCode nRet = ERRCODE_IO_ABORT;
ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
+ aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), true );
if ( pDocShell->CheckPrint( pPrintDialog, &aMarkData, false, bIsAPI ) )
{
@@ -547,7 +546,7 @@ ErrCode ScPreviewShell::DoPrint( SfxPrinter *pPrinter,
return nRet;
}
-USHORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog )
+sal_uInt16 ScPreviewShell::Print( SfxProgress& rProgress, sal_Bool bIsAPI, PrintDialog* pPrintDialog )
{
pDocShell->GetDocument()->SetPrintOptions(); // Optionen aus OFA am Printer setzen
@@ -555,7 +554,7 @@ USHORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog*
bool bAllTabs = ( pPrintDialog ? ( pPrintDialog->GetCheckedSheetRange() == PRINTSHEETS_ALL ) : SC_MOD()->GetPrintOptions().GetAllSheets() );
ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
+ aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), true );
uno::Sequence< sal_Int32 > aSheets;
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
@@ -576,14 +575,14 @@ USHORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog*
SetAdditionalPrintOptions( aProps );
SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog );
- pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, FALSE, bIsAPI );
+ pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, false, bIsAPI );
return 0;
}
//------------------------------------------------------------------------
-void ScPreviewShell::Activate(BOOL bMDI)
+void ScPreviewShell::Activate(sal_Bool bMDI)
{
SfxViewShell::Activate(bMDI);
@@ -598,7 +597,7 @@ void ScPreviewShell::Activate(BOOL bMDI)
}
}
-void ScPreviewShell::Deactivate(BOOL bMDI)
+void ScPreviewShell::Deactivate(sal_Bool bMDI)
{
SfxViewShell::Deactivate(bMDI);
@@ -611,7 +610,7 @@ void ScPreviewShell::Deactivate(BOOL bMDI)
void ScPreviewShell::Execute( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
switch ( nSlot )
@@ -637,7 +636,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
case SID_NEXT_TABLE: // Accelerator
case SID_PREVIEW_NEXT:
{
- BOOL bAllTested = pPreview->AllTested();
+ sal_Bool bAllTested = pPreview->AllTested();
long nPage = pPreview->GetPageNo();
long nTotal = pPreview->GetTotalPages();
if (nTotal && (nPage+1 < nTotal || !bAllTested))
@@ -668,8 +667,8 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOM:
case FID_SCALE:
{
- USHORT nZoom = 100;
- BOOL bCancel = FALSE;
+ sal_uInt16 nZoom = 100;
+ sal_Bool bCancel = false;
eZoom = SVX_ZOOM_PERCENT;
@@ -717,10 +716,10 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
{
case SVX_ZOOM_OPTIMAL:
case SVX_ZOOM_WHOLEPAGE:
- nZoom = pPreview->GetOptimalZoom(FALSE);
+ nZoom = pPreview->GetOptimalZoom(false);
break;
case SVX_ZOOM_PAGEWIDTH:
- nZoom = pPreview->GetOptimalZoom(TRUE);
+ nZoom = pPreview->GetOptimalZoom(sal_True);
break;
default:
{
@@ -735,7 +734,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
break;
case SID_PREVIEW_ZOOMIN:
{
- USHORT nNew = pPreview->GetZoom() + 20 ;
+ sal_uInt16 nNew = pPreview->GetZoom() + 20 ;
nNew -= nNew % 20;
pPreview->SetZoom( nNew );
eZoom = SVX_ZOOM_PERCENT;
@@ -744,7 +743,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
break;
case SID_PREVIEW_ZOOMOUT:
{
- USHORT nNew = pPreview->GetZoom() - 1;
+ sal_uInt16 nNew = pPreview->GetZoom() - 1;
nNew -= nNew % 20;
pPreview->SetZoom( nNew );
eZoom = SVX_ZOOM_PERCENT;
@@ -753,7 +752,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
break;
case SID_PREVIEW_MARGIN:
{
- BOOL bMargin = pPreview->GetPageMargins();
+ sal_Bool bMargin = pPreview->GetPageMargins();
pPreview->SetPageMargins( !bMargin );
pPreview->Invalidate();
rReq.Done();
@@ -763,9 +762,9 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
eZoom = SVX_ZOOM_PERCENT;
- if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, TRUE, &pItem ) )
+ if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem*)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem*)pItem)->GetValue();
if( nCurrentZoom )
{
pPreview->SetZoom( nCurrentZoom );
@@ -783,9 +782,9 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
- if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, TRUE, &pItem ) )
+ if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, sal_True, &pItem ) )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SfxItemSet& rSet = pStyleSheet->GetItemSet();
rSet.Put( SfxUInt16Item( ATTR_PAGE_SCALE, nCurrentZoom ) );
ScPrintFunc aPrintFunc( pDocShell, pDocShell->GetPrinter(), nTab );
@@ -825,16 +824,16 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
void ScPreviewShell::GetState( SfxItemSet& rSet )
{
- pPreview->SetInGetState(TRUE);
+ pPreview->SetInGetState(sal_True);
SCTAB nTab = pPreview->GetTab();
long nPage = pPreview->GetPageNo();
long nTotal = pPreview->GetTotalPages();
- USHORT nZoom = pPreview->GetZoom();
- BOOL bAllTested = pPreview->AllTested();
+ sal_uInt16 nZoom = pPreview->GetZoom();
+ sal_Bool bAllTested = pPreview->AllTested();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -895,7 +894,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
if ( pStyleSheet )
{
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
- USHORT nCurrentZoom = ((const SfxUInt16Item&)rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue();
+ sal_uInt16 nCurrentZoom = ((const SfxUInt16Item&)rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue();
if( nCurrentZoom )
{
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM_SLIDER, MAXZOOM_SLIDER, SID_PREVIEW_SCALINGFACTOR );
@@ -912,7 +911,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
rSet.Put( SfxStringItem( nWhich, pPreview->GetPosString() ) );
break;
case SID_PRINTPREVIEW:
- rSet.Put( SfxBoolItem( nWhich, TRUE ) );
+ rSet.Put( SfxBoolItem( nWhich, sal_True ) );
break;
case SID_FORMATPAGE:
case SID_PREVIEW_MARGIN:
@@ -924,7 +923,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
nWhich = aIter.NextWhich();
}
- pPreview->SetInGetState(FALSE);
+ pPreview->SetInGetState(false);
}
void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
@@ -942,7 +941,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
rData.aShortDocName = rData.aLongDocName = rData.aTitle;
rData.nPageNo = pPreview->GetPageNo() + 1;
- BOOL bAllTested = pPreview->AllTested();
+ sal_Bool bAllTested = pPreview->AllTested();
if (bAllTested)
rData.nTotalPages = pPreview->GetTotalPages();
else
@@ -951,7 +950,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
// eNumType kennt der Dialog selber
}
-void ScPreviewShell::WriteUserData(String& rData, BOOL /* bBrowse */)
+void ScPreviewShell::WriteUserData(String& rData, sal_Bool /* bBrowse */)
{
// nZoom
// nPageNo
@@ -961,13 +960,13 @@ void ScPreviewShell::WriteUserData(String& rData, BOOL /* bBrowse */)
rData += String::CreateFromInt32(pPreview->GetPageNo());
}
-void ScPreviewShell::ReadUserData(const String& rData, BOOL /* bBrowse */)
+void ScPreviewShell::ReadUserData(const String& rData, sal_Bool /* bBrowse */)
{
xub_StrLen nCount = rData.GetTokenCount();
if (nCount)
{
xub_StrLen nIndex = 0;
- pPreview->SetZoom((USHORT)rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
+ pPreview->SetZoom((sal_uInt16)rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
pPreview->SetPageNo(rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
eZoom = SVX_ZOOM_PERCENT;
}
@@ -1019,7 +1018,7 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
}
}
-void ScPreviewShell::DoScroll( USHORT nMode )
+void ScPreviewShell::DoScroll( sal_uInt16 nMode )
{
Point aCurPos, aPrevPos;
@@ -1214,7 +1213,7 @@ void ScPreviewShell::BroadcastAccessibility( const SfxHint &rHint )
pAccessibilityBroadcaster->Broadcast( rHint );
}
-BOOL ScPreviewShell::HasAccessibilityObjects()
+sal_Bool ScPreviewShell::HasAccessibilityObjects()
{
return pAccessibilityBroadcaster && pAccessibilityBroadcaster->HasListeners();
}
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index f8ec3ae261db..65d923481064 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -57,10 +57,6 @@
#define _COLDLG_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
@@ -179,16 +175,16 @@
void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- BOOL bDataChanged = FALSE;
+ sal_Bool bDataChanged = false;
if (rHint.ISA(SfxSimpleHint))
{
- ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nSlot = ((const SfxSimpleHint&)rHint).GetId();
switch ( nSlot )
{
case FID_DATACHANGED:
case SID_SCPRINTOPTIONS:
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
break;
case SC_HINT_DRWLAYER_NEW:
{
@@ -203,20 +199,20 @@ void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( ((const ScPaintHint&)rHint).GetPrintFlag() )
{
- USHORT nParts = ((const ScPaintHint&)rHint).GetParts();
+ sal_uInt16 nParts = ((const ScPaintHint&)rHint).GetParts();
if (nParts & ( PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE ))
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else if (rHint.ISA(SdrHint))
{
// SdrHints are no longer used for invalidating, thus react on objectchange instead
if(HINT_OBJCHG == ((const SdrHint&)rHint).GetKind())
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
if (bDataChanged)
- pPreview->DataChanged(TRUE);
+ pPreview->DataChanged(sal_True);
}
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 91abfe8be440..0e07dc573772 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -103,8 +103,8 @@ ScPageRowEntry::ScPageRowEntry(const ScPageRowEntry& r)
nPagesX = r.nPagesX;
if (r.pHidden && nPagesX)
{
- pHidden = new BOOL[nPagesX];
- memcpy( pHidden, r.pHidden, nPagesX * sizeof(BOOL) );
+ pHidden = new sal_Bool[nPagesX];
+ memcpy( pHidden, r.pHidden, nPagesX * sizeof(sal_Bool) );
}
else
pHidden = NULL;
@@ -119,8 +119,8 @@ const ScPageRowEntry& ScPageRowEntry::operator=(const ScPageRowEntry& r)
nPagesX = r.nPagesX;
if (r.pHidden && nPagesX)
{
- pHidden = new BOOL[nPagesX];
- memcpy( pHidden, r.pHidden, nPagesX * sizeof(BOOL) );
+ pHidden = new sal_Bool[nPagesX];
+ memcpy( pHidden, r.pHidden, nPagesX * sizeof(sal_Bool) );
}
else
pHidden = NULL;
@@ -149,15 +149,15 @@ void ScPageRowEntry::SetHidden(size_t nX)
{
if (!pHidden)
{
- pHidden = new BOOL[nPagesX];
- memset( pHidden, FALSE, nPagesX * sizeof(BOOL) );
+ pHidden = new sal_Bool[nPagesX];
+ memset( pHidden, false, nPagesX * sizeof(sal_Bool) );
}
- pHidden[nX] = TRUE;
+ pHidden[nX] = sal_True;
}
}
}
-BOOL ScPageRowEntry::IsHidden(size_t nX) const
+sal_Bool ScPageRowEntry::IsHidden(size_t nX) const
{
return nX>=nPagesX || ( pHidden && pHidden[nX] ); //! inline?
}
@@ -221,9 +221,9 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
if (!bState)
nZoom = 100;
nManualZoom = 100;
- bClearWin = FALSE;
- bUseStyleColor = FALSE;
- bIsRender = FALSE;
+ bClearWin = false;
+ bUseStyleColor = false;
+ bIsRender = false;
InitParam(pOptions);
@@ -241,10 +241,10 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTa
nPageStart ( nPage ),
nDocPages ( nDocP ),
pUserArea ( pArea ),
- bState ( FALSE ),
- bSourceRangeValid ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bState ( false ),
+ bSourceRangeValid ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
nTabPages ( 0 ),
nTotalPages ( 0 ),
pPageData ( pData )
@@ -264,10 +264,10 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
nPageStart ( nPage ),
nDocPages ( nDocP ),
pUserArea ( pArea ),
- bState ( FALSE ),
- bSourceRangeValid ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bState ( false ),
+ bSourceRangeValid ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
nTabPages ( 0 ),
nTotalPages ( 0 ),
pPageData ( NULL )
@@ -282,9 +282,9 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
pPrinter ( NULL ),
pDrawView ( NULL ),
pUserArea ( NULL ),
- bSourceRangeValid ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bSourceRangeValid ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
pPageData ( NULL )
{
pDev = pOutDev;
@@ -301,7 +301,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
nTotalPages = rState.nTotalPages;
nPageStart = rState.nPageStart;
nDocPages = rState.nDocPages;
- bState = TRUE;
+ bState = sal_True;
Construct( pOptions );
}
@@ -315,9 +315,9 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow, SCTAB nTab,
nPageStart ( nPage ),
nDocPages ( nDocP ),
pUserArea ( pArea ),
- bState ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bState ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
nTabPages ( 0 ),
nTotalPages ( 0 ),
pPageData ( NULL )
@@ -331,8 +331,8 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow,
pPrinter ( NULL ),
pDrawView ( NULL ),
pUserArea ( NULL ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
pPageData ( NULL )
{
pDev = pWindow;
@@ -349,7 +349,7 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow,
nTotalPages = rState.nTotalPages;
nPageStart = rState.nPageStart;
nDocPages = rState.nDocPages;
- bState = TRUE;
+ bState = sal_True;
Construct( pOptions );
}
@@ -370,7 +370,7 @@ void ScPrintFunc::GetPrintState( ScPrintState& rState )
rState.nDocPages = nDocPages;
}
-BOOL ScPrintFunc::GetLastSourceRange( ScRange& rRange ) const
+sal_Bool ScPrintFunc::GetLastSourceRange( ScRange& rRange ) const
{
rRange = aLastSourceRange;
return bSourceRangeValid;
@@ -380,7 +380,7 @@ void ScPrintFunc::FillPageData()
{
if (pPageData)
{
- USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() );
+ sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );
ScPrintRangeData& rData = pPageData->GetData(nCount); // hochzaehlen
rData.SetPrintRange( ScRange( nStartCol, nStartRow, nPrintTab,
@@ -436,7 +436,7 @@ void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 )
GetItem(ATTR_PROTECTION, rCellInfo.pConditionSet)).GetHidePrint())
{
pThisRowInfo->pCellInfo[nX+1].pCell = NULL;
- pThisRowInfo->pCellInfo[nX+1].bEmptyCellText = TRUE;
+ pThisRowInfo->pCellInfo[nX+1].bEmptyCellText = sal_True;
}
}
}
@@ -451,7 +451,7 @@ void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 )
// - Vorschau bei Vorlagen
void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPrintFactor */,
- const Rectangle& rBound, ScViewData* pViewData, BOOL bMetaFile )
+ const Rectangle& rBound, ScViewData* pViewData, sal_Bool bMetaFile )
{
//! nPrintFactor auswerten !!!
@@ -459,7 +459,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
if (pViewData)
nTab = pViewData->GetTabNo();
- BOOL bDoGrid, bNullVal, bFormula;
+ sal_Bool bDoGrid, bNullVal, bFormula;
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
if (pStyleSheet)
@@ -535,7 +535,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
//! Flag bei FillInfo uebergeben !!!!!
ScRange aERange;
- BOOL bEmbed = pDoc->IsEmbedded();
+ sal_Bool bEmbed = pDoc->IsEmbedded();
if (bEmbed)
{
pDoc->GetEmbedded(aERange);
@@ -546,7 +546,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
ScTableInfo aTabInfo;
pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab,
- nScaleX, nScaleY, FALSE, bFormula );
+ nScaleX, nScaleY, false, bFormula );
lcl_HidePrint( aTabInfo, nX1, nX2 );
if (bEmbed)
@@ -576,7 +576,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
{
pDrawView = new FmFormView( pModel, pDev );
pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetPrintPreview( sal_True );
aOutputData.SetDrawView( pDrawView );
}
@@ -629,7 +629,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
if (!bMetaFile && pViewData)
pDev->SetMapMode(aMode);
- aOutputData.DrawGrid( TRUE, FALSE ); // keine Seitenumbrueche
+ aOutputData.DrawGrid( sal_True, false ); // keine Seitenumbrueche
pDev->SetLineColor( COL_BLACK );
@@ -639,7 +639,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
long nRight = nScrX + aOutputData.GetScrW() - aOne.Width();
long nBottom = nScrY + aOutputData.GetScrH() - aOne.Height();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// extra line at the left edge for left-to-right, right for right-to-left
if ( bLayoutRTL )
@@ -669,7 +669,7 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
if ( pHFSet == NULL )
{
- rParam.bEnable = FALSE;
+ rParam.bEnable = false;
rParam.pBorder = NULL;
rParam.pBack = NULL;
rParam.pShadow = NULL;
@@ -683,9 +683,9 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
const SvxLRSpaceItem* pHFLR = &(const SvxLRSpaceItem&) pHFSet->Get(ATTR_LRSPACE);
long nTmp;
nTmp = pHFLR->GetLeft();
- rParam.nLeft = nTmp < 0 ? 0 : USHORT(nTmp);
+ rParam.nLeft = nTmp < 0 ? 0 : sal_uInt16(nTmp);
nTmp = pHFLR->GetRight();
- rParam.nRight = nTmp < 0 ? 0 : USHORT(nTmp);
+ rParam.nRight = nTmp < 0 ? 0 : sal_uInt16(nTmp);
rParam.pBorder = (const SvxBoxItem*) &pHFSet->Get(ATTR_BORDER);
rParam.pBack = (const SvxBrushItem*) &pHFSet->Get(ATTR_BACKGROUND);
rParam.pShadow = (const SvxShadowItem*)&pHFSet->Get(ATTR_SHADOW);;
@@ -707,27 +707,27 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
// bNew = TRUE: benutzten Bereich aus dem Dokument suchen
// bNew = FALSE: nur ganze Zeilen/Spalten begrenzen
-BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
+sal_Bool ScPrintFunc::AdjustPrintArea( sal_Bool bNew )
{
SCCOL nOldEndCol = nEndCol; // nur wichtig bei !bNew
SCROW nOldEndRow = nEndRow;
- BOOL bChangeCol = TRUE; // bei bNew werden beide angepasst
- BOOL bChangeRow = TRUE;
+ sal_Bool bChangeCol = sal_True; // bei bNew werden beide angepasst
+ sal_Bool bChangeRow = sal_True;
- BOOL bNotes = aTableParam.bNotes;
+ sal_Bool bNotes = aTableParam.bNotes;
if ( bNew )
{
nStartCol = 0;
nStartRow = 0;
if (!pDoc->GetPrintArea( nPrintTab, nEndCol, nEndRow, bNotes ))
- return FALSE; // nix
+ return false; // nix
}
else
{
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
bChangeCol = ( nStartCol == 0 && nEndCol == MAXCOL );
bChangeRow = ( nStartRow == 0 && nEndRow == MAXROW );
- BOOL bForcedChangeRow = FALSE;
+ sal_Bool bForcedChangeRow = false;
// #i53558# Crop entire column of old row limit to real print area with
// some fuzzyness.
@@ -740,11 +740,11 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
const SCROW nFuzzy = 23*42;
if (nPAEndRow + nFuzzy < nEndRow)
{
- bForcedChangeRow = TRUE;
+ bForcedChangeRow = sal_True;
nEndRow = nPAEndRow;
}
else
- bFound = TRUE; // user seems to _want_ to print some empty rows
+ bFound = sal_True; // user seems to _want_ to print some empty rows
}
// TODO: in case we extend the number of columns we may have to do the
// same for horizontal cropping.
@@ -757,14 +757,14 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
bFound = pDoc->GetPrintAreaVer( nPrintTab, nStartCol, nEndCol, nEndRow, bNotes );
if (!bFound)
- return FALSE; // leer
+ return false; // leer
if (bForcedChangeRow)
- bChangeRow = TRUE;
+ bChangeRow = sal_True;
}
pDoc->ExtendMerge( nStartCol,nStartRow, nEndCol,nEndRow, nPrintTab,
- FALSE, TRUE ); // kein Refresh, incl. Attrs
+ false, sal_True ); // kein Refresh, incl. Attrs
if ( bChangeCol )
{
@@ -786,7 +786,7 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
if (!bChangeCol) nEndCol = nOldEndCol;
if (!bChangeRow) nEndRow = nOldEndRow;
- return TRUE;
+ return sal_True;
}
long ScPrintFunc::TextHeight( const EditTextObject* pObject )
@@ -794,7 +794,7 @@ long ScPrintFunc::TextHeight( const EditTextObject* pObject )
if (!pObject)
return 0;
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
return (long) pEditEngine->GetTextHeight();
}
@@ -863,9 +863,9 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SvxLRSpaceItem* pLRItem = (const SvxLRSpaceItem*) &pParamSet->Get( ATTR_LRSPACE );
long nTmp;
nTmp = pLRItem->GetLeft();
- nLeftMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nLeftMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
nTmp = pLRItem->GetRight();
- nRightMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nRightMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
const SvxULSpaceItem* pULItem = (const SvxULSpaceItem*) &pParamSet->Get( ATTR_ULSPACE );
nTopMargin = pULItem->GetUpper();
nBottomMargin = pULItem->GetLower();
@@ -896,7 +896,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SvxSetItem* pHeaderSetItem;
const SfxItemSet* pHeaderSet = NULL;
- if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, FALSE,
+ if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, false,
(const SfxPoolItem**)&pHeaderSetItem ) == SFX_ITEM_SET )
{
pHeaderSet = &pHeaderSetItem->GetItemSet();
@@ -912,7 +912,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SvxSetItem* pFooterSetItem;
const SfxItemSet* pFooterSet = NULL;
- if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, FALSE,
+ if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, false,
(const SfxPoolItem**)&pFooterSetItem ) == SFX_ITEM_SET )
{
pFooterSet = &pFooterSetItem->GetItemSet();
@@ -931,19 +931,19 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SfxUInt16Item* pScaleToPagesItem = NULL;
SfxItemState eState;
- eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, FALSE,
+ eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, false,
(const SfxPoolItem**)&pScaleItem );
if ( SFX_ITEM_DEFAULT == eState )
pScaleItem = (const SfxUInt16Item*)
&pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALE );
- eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, FALSE,
+ eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, false,
(const SfxPoolItem**)&pScaleToItem );
if ( SFX_ITEM_DEFAULT == eState )
pScaleToItem = (const ScPageScaleToItem*)
&pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETO );
- eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE,
+ eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false,
(const SfxPoolItem**)&pScaleToPagesItem );
if ( SFX_ITEM_DEFAULT == eState )
pScaleToPagesItem = (const SfxUInt16Item*)
@@ -951,7 +951,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
DBG_ASSERT( pScaleItem && pScaleToItem && pScaleToPagesItem, "Missing ScaleItem! :-/" );
- aTableParam.bCellContent = TRUE;
+ aTableParam.bCellContent = sal_True;
aTableParam.bNotes = GET_BOOL(pParamSet,ATTR_PAGE_NOTES);
aTableParam.bGrid = GET_BOOL(pParamSet,ATTR_PAGE_GRID);
aTableParam.bHeaders = GET_BOOL(pParamSet,ATTR_PAGE_HEADERS);
@@ -964,12 +964,12 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
aTableParam.bLeftRight = !aTableParam.bLeftRight;
aTableParam.nFirstPageNo = GET_USHORT(pParamSet,ATTR_PAGE_FIRSTPAGENO);
if (!aTableParam.nFirstPageNo)
- aTableParam.nFirstPageNo = (USHORT) nPageStart; // von vorheriger Tabelle
+ aTableParam.nFirstPageNo = (sal_uInt16) nPageStart; // von vorheriger Tabelle
if ( pScaleItem && pScaleToItem && pScaleToPagesItem )
{
- UINT16 nScaleAll = pScaleItem->GetValue();
- UINT16 nScaleToPages = pScaleToPagesItem->GetValue();
+ sal_uInt16 nScaleAll = pScaleItem->GetValue();
+ sal_uInt16 nScaleToPages = pScaleToPagesItem->GetValue();
aTableParam.bScaleNone = (nScaleAll == 100);
aTableParam.bScaleAll = (nScaleAll > 0 );
@@ -982,10 +982,10 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
}
else
{
- aTableParam.bScaleNone = TRUE;
- aTableParam.bScaleAll = FALSE;
- aTableParam.bScaleTo = FALSE;
- aTableParam.bScalePageNum = FALSE;
+ aTableParam.bScaleNone = sal_True;
+ aTableParam.bScaleAll = false;
+ aTableParam.bScaleTo = false;
+ aTableParam.bScalePageNum = false;
aTableParam.nScaleAll = 0;
aTableParam.nScaleWidth = 0;
aTableParam.nScaleHeight = 0;
@@ -995,7 +995,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
// skip empty pages only if options with that flag are passed
aTableParam.bSkipEmpty = pOptions && pOptions->GetSkipEmpty();
if ( pPageData )
- aTableParam.bSkipEmpty = FALSE;
+ aTableParam.bSkipEmpty = false;
// Wenn pPageData gesetzt ist, interessieren fuer die Umbruch-Vorschau
// nur die Umbrueche, leere Seiten werden nicht speziell behandelt
@@ -1013,7 +1013,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
if ( pUserArea ) // UserArea (Selektion) hat Vorrang
{
bPrintCurrentTable =
- aAreaParam.bPrintArea = TRUE; // Selektion
+ aAreaParam.bPrintArea = sal_True; // Selektion
aAreaParam.aPrintArea = *pUserArea;
// Die Tabellen-Abfrage ist schon in DocShell::Print, hier immer
@@ -1025,7 +1025,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
if ( pPrintArea ) // mindestens eine gesetzt ?
{
bPrintCurrentTable =
- aAreaParam.bPrintArea = TRUE;
+ aAreaParam.bPrintArea = sal_True;
aAreaParam.aPrintArea = *pPrintArea;
bMultiArea = ( pDoc->GetPrintRangeCount(nPrintTab) > 1 );
@@ -1042,39 +1042,39 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
// don't print hidden tables if there's no print range defined there
if ( pDoc->IsVisible( nPrintTab ) )
{
- aAreaParam.bPrintArea = FALSE;
- bPrintCurrentTable = TRUE;
+ aAreaParam.bPrintArea = false;
+ bPrintCurrentTable = sal_True;
}
else
{
- aAreaParam.bPrintArea = TRUE; // otherwise the table is always counted
- bPrintCurrentTable = FALSE;
+ aAreaParam.bPrintArea = sal_True; // otherwise the table is always counted
+ bPrintCurrentTable = false;
}
}
if ( pRepeatCol )
{
- aAreaParam.bRepeatCol = TRUE;
+ aAreaParam.bRepeatCol = sal_True;
aAreaParam.aRepeatCol = *pRepeatCol;
nRepeatStartCol = pRepeatCol->aStart.Col();
nRepeatEndCol = pRepeatCol->aEnd .Col();
}
else
{
- aAreaParam.bRepeatCol = FALSE;
+ aAreaParam.bRepeatCol = false;
nRepeatStartCol = nRepeatEndCol = SCCOL_REPEAT_NONE;
}
if ( pRepeatRow )
{
- aAreaParam.bRepeatRow = TRUE;
+ aAreaParam.bRepeatRow = sal_True;
aAreaParam.aRepeatRow = *pRepeatRow;
nRepeatStartRow = pRepeatRow->aStart.Row();
nRepeatEndRow = pRepeatRow->aEnd .Row();
}
else
{
- aAreaParam.bRepeatRow = FALSE;
+ aAreaParam.bRepeatRow = false;
nRepeatStartRow = nRepeatEndRow = SCROW_REPEAT_NONE;
}
@@ -1175,7 +1175,7 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi
Point aPos;
Size aDrawSize = aGrfSize;
- bool bDraw = TRUE;
+ bool bDraw = true;
switch ( ePos )
{
case GPOS_LT: aPos = rOrg.TopLeft();
@@ -1258,12 +1258,12 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi
aObject.DrawTiled( pOut, rOrg, aGrfSize, Size(0,0) );
}
- bDraw = FALSE;
+ bDraw = false;
}
break;
case GPOS_NONE:
- bDraw = FALSE;
+ bDraw = false;
break;
default: DBG_ASSERT( !pOut, "new Graphic position?" );
@@ -1321,7 +1321,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
return; // leer
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor;
+ sal_Bool bCellContrast = bUseStyleColor;
if ( pBackground && !bCellContrast )
{
@@ -1396,18 +1396,18 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
if (pBorderData)
{
ScDocument* pBorderDoc = new ScDocument( SCDOCMODE_UNDO );
- pBorderDoc->InitUndo( pDoc, 0,0, TRUE,TRUE );
+ pBorderDoc->InitUndo( pDoc, 0,0, sal_True,sal_True );
if (pBorderData)
pBorderDoc->ApplyAttr( 0,0,0, *pBorderData );
ScTableInfo aTabInfo;
pBorderDoc->FillInfo( aTabInfo, 0,0, 0,0, 0,
- nScaleX, nScaleY, FALSE, FALSE );
+ nScaleX, nScaleY, false, false );
DBG_ASSERT(aTabInfo.mnArrCount,"nArrCount == 0");
- aTabInfo.mpRowInfo[1].nHeight = (USHORT) nEffHeight;
+ aTabInfo.mpRowInfo[1].nHeight = (sal_uInt16) nEffHeight;
aTabInfo.mpRowInfo[0].pCellInfo[1].nWidth =
- aTabInfo.mpRowInfo[1].pCellInfo[1].nWidth = (USHORT) nEffWidth;
+ aTabInfo.mpRowInfo[1].pCellInfo[1].nWidth = (sal_uInt16) nEffWidth;
ScOutputData aOutputData( pDev, OUTTYPE_PRINTER, aTabInfo, pBorderDoc, 0,
nScrX+nLeft, nScrY+nTop, 0,0, 0,0, nScaleX, nScaleY );
@@ -1422,7 +1422,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
Size aOnePixel = pDev->PixelToLogic(Size(1,1));
@@ -1446,7 +1446,7 @@ void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY )
for (nCol=nX1; nCol<=nX2; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab );
if (nDocW)
{
long nWidth = (long) (nDocW * nScaleX);
@@ -1475,7 +1475,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY )
long nOneX = aOnePixel.Width();
long nOneY = aOnePixel.Height();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nWidth = (long) (PRINT_HEADER_WIDTH * nScaleX);
long nEndX = nScrX + nWidth;
@@ -1490,7 +1490,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY )
for (SCROW nRow=nY1; nRow<=nY2; nRow++)
{
- USHORT nDocH = pDoc->GetRowHeight( nRow, nPrintTab );
+ sal_uInt16 nDocH = pDoc->GetRowHeight( nRow, nPrintTab );
if (nDocH)
{
long nHeight = (long) (nDocH * nScaleY);
@@ -1511,7 +1511,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY )
}
void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
- BOOL bRepCol, ScPreviewLocationData& rLocationData )
+ sal_Bool bRepCol, ScPreviewLocationData& rLocationData )
{
Size aOnePixel = pDev->PixelToLogic(Size(1,1));
long nOneX = aOnePixel.Width();
@@ -1523,7 +1523,7 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
long nPosX = nScrX - nOneX;
for (SCCOL nCol=nX1; nCol<=nX2; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab );
if (nDocW)
nPosX += (long) (nDocW * nScaleX);
}
@@ -1532,13 +1532,13 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
}
void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
- BOOL bRepRow, ScPreviewLocationData& rLocationData )
+ sal_Bool bRepRow, ScPreviewLocationData& rLocationData )
{
Size aOnePixel = pDev->PixelToLogic(Size(1,1));
long nOneX = aOnePixel.Width();
long nOneY = aOnePixel.Height();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nWidth = (long) (PRINT_HEADER_WIDTH * nScaleX);
long nEndX = nScrX + nWidth;
@@ -1552,7 +1552,7 @@ void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
}
void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- long nScrX, long nScrY, BOOL bRepCol, BOOL bRepRow,
+ long nScrX, long nScrY, sal_Bool bRepCol, sal_Bool bRepRow,
ScPreviewLocationData& rLocationData )
{
// get MapMode for drawing objects (same MapMode as in ScOutputData::PrintDrawingLayer)
@@ -1582,7 +1582,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
long nPosX = nScrX - nOneX;
for (nCol=nX1; nCol<=nX2; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab );
if (nDocW)
nPosX += (long) (nDocW * nScaleX);
}
@@ -1596,7 +1596,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
long nScrX, long nScrY,
- BOOL bShLeft, BOOL bShTop, BOOL bShRight, BOOL bShBottom )
+ sal_Bool bShLeft, sal_Bool bShTop, sal_Bool bShRight, sal_Bool bShBottom )
{
// #i47547# nothing to do if the end of the print area is before the end of
// the repeat columns/rows (don't use negative size for ScOutputData)
@@ -1605,7 +1605,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
//! Flag bei FillInfo uebergeben !!!!!
ScRange aERange;
- BOOL bEmbed = pDoc->IsEmbedded();
+ sal_Bool bEmbed = pDoc->IsEmbedded();
if (bEmbed)
{
pDoc->GetEmbedded(aERange);
@@ -1620,7 +1620,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
ScTableInfo aTabInfo;
pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nPrintTab,
- nScaleX, nScaleY, TRUE, aTableParam.bFormulas );
+ nScaleX, nScaleY, sal_True, aTableParam.bFormulas );
lcl_HidePrint( aTabInfo, nX1, nX2 );
if (bEmbed)
@@ -1681,11 +1681,11 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
aOutputData.DrawExtraShadow( bShLeft, bShTop, bShRight, bShBottom );
aOutputData.DrawFrame();
aOutputData.DrawStrings();
- aOutputData.DrawEdit(FALSE);
+ aOutputData.DrawEdit(false);
}
if (aTableParam.bGrid)
- aOutputData.DrawGrid( TRUE, FALSE ); // keine Seitenumbrueche
+ aOutputData.DrawGrid( sal_True, false ); // keine Seitenumbrueche
aOutputData.AddPDFNotes(); // has no effect if not rendering PDF with notes enabled
@@ -1701,20 +1701,20 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
aOutputData.PostPrintDrawingLayer(aMMOffset); // #i74768#
}
-BOOL ScPrintFunc::IsMirror( long nPageNo ) // Raender spiegeln ?
+sal_Bool ScPrintFunc::IsMirror( long nPageNo ) // Raender spiegeln ?
{
SvxPageUsage eUsage = (SvxPageUsage) ( nPageUsage & 0x000f );
return ( eUsage == SVX_PAGE_MIRROR && (nPageNo & 1) );
}
-BOOL ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ?
+sal_Bool ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ?
{
SvxPageUsage eUsage = (SvxPageUsage) ( nPageUsage & 0x000f );
- BOOL bLeft;
+ sal_Bool bLeft;
if (eUsage == SVX_PAGE_LEFT)
- bLeft = TRUE;
+ bLeft = sal_True;
else if (eUsage == SVX_PAGE_RIGHT)
- bLeft = FALSE;
+ bLeft = false;
else
bLeft = (nPageNo & 1) != 0;
return bLeft;
@@ -1731,9 +1731,9 @@ void ScPrintFunc::MakeEditEngine()
{
// can't use document's edit engine pool here,
// because pool must have twips as default metric
- pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE );
+ pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True );
- pEditEngine->EnableUndo(FALSE);
+ pEditEngine->EnableUndo(false);
pEditEngine->SetRefDevice( pDev );
pEditEngine->SetWordDelimiters(
ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) );
@@ -1761,14 +1761,14 @@ void ScPrintFunc::MakeEditEngine()
}
// nStartY = logic
-void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+void ScPrintFunc::PrintHF( long nPageNo, sal_Bool bHeader, long nStartY,
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
const ScPrintHFParam& rParam = bHeader ? aHdr : aFtr;
pDev->SetMapMode( aTwipMode ); // Kopf-/Fusszeilen in Twips
- BOOL bLeft = IsLeft(nPageNo) && !rParam.bShared;
+ sal_Bool bLeft = IsLeft(nPageNo) && !rParam.bShared;
const ScPageHFItem* pHFItem = bLeft ? rParam.pLeft : rParam.pRight;
long nLineStartX = aPageRect.Left() + rParam.nLeft;
@@ -1853,7 +1853,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
if (pObject)
{
pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
if (nDif > 0)
@@ -1867,7 +1867,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
if (pObject)
{
pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
if (nDif > 0)
@@ -1881,7 +1881,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
if (pObject)
{
pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
if (nDif > 0)
@@ -1899,7 +1899,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
}
}
-long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+long ScPrintFunc::DoNotes( long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
if (bDoPrint)
pDev->SetMapMode(aTwipMode);
@@ -1926,10 +1926,10 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData
long nPosY = aPageRect.Top();
long nCount = 0;
- BOOL bOk;
+ sal_Bool bOk;
do
{
- bOk = FALSE;
+ bOk = false;
ScAddress* pPos = (ScAddress*) aNotePosList.GetObject( nNoteStart+nCount );
if (pPos)
{
@@ -1965,7 +1965,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData
nPosY += nTextHeight;
nPosY += 200; // Abstand
++nCount;
- bOk = TRUE;
+ bOk = sal_True;
}
}
}
@@ -1975,7 +1975,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData
return nCount;
}
-long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
if ( nNoteStart >= (long) aNotePosList.Count() || !aTableParam.bNotes )
return 0;
@@ -2023,12 +2023,12 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr
if (aHdr.bEnable)
{
long nHeaderY = aPageRect.Top()-aHdr.nHeight;
- PrintHF( nPageNo, TRUE, nHeaderY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, sal_True, nHeaderY, bDoPrint, pLocationData );
}
if (aFtr.bEnable)
{
long nFooterY = aPageRect.Bottom()+aFtr.nDistance;
- PrintHF( nPageNo, FALSE, nFooterY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, false, nFooterY, bDoPrint, pLocationData );
}
}
@@ -2043,9 +2043,9 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr
}
void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
// nPageNo is the page number within all sheets of one "start page" setting
@@ -2084,11 +2084,11 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
if ( aAreaParam.bRepeatCol )
if ( nX1 > nRepeatStartCol && nX1 <= nRepeatEndCol )
nX1 = nRepeatEndCol + 1;
- BOOL bDoRepCol = (aAreaParam.bRepeatCol && nX1 > nRepeatEndCol);
+ sal_Bool bDoRepCol = (aAreaParam.bRepeatCol && nX1 > nRepeatEndCol);
if ( aAreaParam.bRepeatRow )
if ( nY1 > nRepeatStartRow && nY1 <= nRepeatEndRow )
nY1 = nRepeatEndRow + 1;
- BOOL bDoRepRow = (aAreaParam.bRepeatRow && nY1 > nRepeatEndRow);
+ sal_Bool bDoRepRow = (aAreaParam.bRepeatRow && nY1 > nRepeatEndRow);
// use new object hide flags in SdrPaintView
if(pDrawView)
@@ -2109,12 +2109,12 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
if (aHdr.bEnable)
{
long nHeaderY = aPageRect.Top()-aHdr.nHeight;
- PrintHF( nPageNo, TRUE, nHeaderY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, sal_True, nHeaderY, bDoPrint, pLocationData );
}
if (aFtr.bEnable)
{
long nFooterY = aPageRect.Bottom()+aFtr.nDistance;
- PrintHF( nPageNo, FALSE, nFooterY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, false, nFooterY, bDoPrint, pLocationData );
}
// Position ( Raender / zentrieren )
@@ -2281,34 +2281,34 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
{
if ( bDoPrint )
PrintArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow,
- nRepStartX,nRepStartY, TRUE,TRUE,FALSE,FALSE );
+ nRepStartX,nRepStartY, sal_True,sal_True,false,false );
if ( pLocationData )
LocateArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow,
- nRepStartX,nRepStartY, TRUE,TRUE, *pLocationData );
+ nRepStartX,nRepStartY, sal_True,sal_True, *pLocationData );
}
if (bDoRepCol)
{
if ( bDoPrint )
PrintArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY,
- TRUE,!bDoRepRow,FALSE,TRUE );
+ sal_True,!bDoRepRow,false,sal_True );
if ( pLocationData )
- LocateArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY, TRUE,FALSE, *pLocationData );
+ LocateArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY, sal_True,false, *pLocationData );
}
if (bDoRepRow)
{
if ( bDoPrint )
PrintArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY,
- !bDoRepCol,TRUE,TRUE,FALSE );
+ !bDoRepCol,sal_True,sal_True,false );
if ( pLocationData )
- LocateArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY, FALSE,TRUE, *pLocationData );
+ LocateArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY, false,sal_True, *pLocationData );
}
// Daten ausgeben
if ( bDoPrint )
- PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,TRUE,TRUE );
+ PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,sal_True,sal_True );
if ( pLocationData )
- LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY, FALSE,FALSE, *pLocationData );
+ LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY, false,false, *pLocationData );
// Spalten-/Zeilenkoepfe ausgeben
// nach den Daten (ueber evtl. weitergezeichneten Schatten)
@@ -2337,23 +2337,23 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
if ( bDoPrint )
PrintColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY );
if ( pLocationData )
- LocateColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY, TRUE, *pLocationData );
+ LocateColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY, sal_True, *pLocationData );
}
if ( bDoPrint )
PrintColHdr( nX1,nX2, nDataX,nInnerStartY );
if ( pLocationData )
- LocateColHdr( nX1,nX2, nDataX,nInnerStartY, FALSE, *pLocationData );
+ LocateColHdr( nX1,nX2, nDataX,nInnerStartY, false, *pLocationData );
if (bDoRepRow)
{
if ( bDoPrint )
PrintRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY );
if ( pLocationData )
- LocateRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY, TRUE, *pLocationData );
+ LocateRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY, sal_True, *pLocationData );
}
if ( bDoPrint )
PrintRowHdr( nY1,nY2, nInnerStartX,nDataY );
if ( pLocationData )
- LocateRowHdr( nY1,nY2, nInnerStartX,nDataY, FALSE, *pLocationData );
+ LocateRowHdr( nY1,nY2, nInnerStartX,nDataY, false, *pLocationData );
}
// einfacher Rahmen
@@ -2386,7 +2386,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
}
aLastSourceRange = ScRange( nX1, nY1, nPrintTab, nX2, nY2, nPrintTab );
- bSourceRangeValid = TRUE;
+ bSourceRangeValid = sal_True;
}
void ScPrintFunc::SetOffset( const Point& rOfs )
@@ -2394,24 +2394,24 @@ void ScPrintFunc::SetOffset( const Point& rOfs )
aSrcOffset = rOfs;
}
-void ScPrintFunc::SetManualZoom( USHORT nNewZoom )
+void ScPrintFunc::SetManualZoom( sal_uInt16 nNewZoom )
{
nManualZoom = nNewZoom;
}
-void ScPrintFunc::SetClearFlag( BOOL bFlag )
+void ScPrintFunc::SetClearFlag( sal_Bool bFlag )
{
bClearWin = bFlag;
}
-void ScPrintFunc::SetUseStyleColor( BOOL bFlag )
+void ScPrintFunc::SetUseStyleColor( sal_Bool bFlag )
{
bUseStyleColor = bFlag;
if (pEditEngine)
pEditEngine->EnableAutoColor( bUseStyleColor );
}
-void ScPrintFunc::SetRenderFlag( BOOL bFlag )
+void ScPrintFunc::SetRenderFlag( sal_Bool bFlag )
{
bIsRender = bFlag; // set when using XRenderable (PDF)
}
@@ -2432,10 +2432,10 @@ void ScPrintFunc::SetExclusivelyDrawOleAndDrawObjects()
// richtig zu setzen - immer ohne UserArea
//
-BOOL ScPrintFunc::UpdatePages()
+sal_Bool ScPrintFunc::UpdatePages()
{
if (!pParamSet)
- return FALSE;
+ return false;
// Zoom
@@ -2462,12 +2462,12 @@ BOOL ScPrintFunc::UpdatePages()
pDocShell->PostPaint(0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID);
}
- return TRUE;
+ return sal_True;
}
long ScPrintFunc::CountPages() // setzt auch nPagesX, nPagesY
{
- BOOL bAreaOk = FALSE;
+ sal_Bool bAreaOk = false;
if (pDoc->HasTable( nPrintTab ))
{
@@ -2485,13 +2485,13 @@ long ScPrintFunc::CountPages() // setzt auch nPagesX, n
nStartRow = rRange.aStart.Row();
nEndCol = rRange.aEnd .Col();
nEndRow = rRange.aEnd .Row();
- bAreaOk = AdjustPrintArea(FALSE); // begrenzen
+ bAreaOk = AdjustPrintArea(false); // begrenzen
}
else
- bAreaOk = FALSE;
+ bAreaOk = false;
}
else // aus Dokument suchen
- bAreaOk = AdjustPrintArea(TRUE);
+ bAreaOk = AdjustPrintArea(sal_True);
}
if (bAreaOk)
@@ -2500,8 +2500,8 @@ long ScPrintFunc::CountPages() // setzt auch nPagesX, n
size_t nY;
if (bMultiArea)
{
- USHORT nRCount = pDoc->GetPrintRangeCount( nPrintTab );
- for (USHORT i=0; i<nRCount; i++)
+ sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab );
+ for (sal_uInt16 i=0; i<nRCount; i++)
{
CalcZoom(i);
if ( aTableParam.bSkipEmpty )
@@ -2542,19 +2542,19 @@ long ScPrintFunc::CountNotePages()
SCCOL nCol;
SCROW nRow;
- BOOL bError = FALSE;
+ sal_Bool bError = false;
if (!aAreaParam.bPrintArea)
- bError = !AdjustPrintArea(TRUE); // komplett aus Dok suchen
+ bError = !AdjustPrintArea(sal_True); // komplett aus Dok suchen
- USHORT nRepeats = 1; // wie oft durchgehen ?
+ sal_uInt16 nRepeats = 1; // wie oft durchgehen ?
if (bMultiArea)
nRepeats = pDoc->GetPrintRangeCount(nPrintTab);
if (bError)
nRepeats = 0;
- for (USHORT nStep=0; nStep<nRepeats; nStep++)
+ for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
{
- BOOL bDoThis = TRUE;
+ sal_Bool bDoThis = sal_True;
if (bMultiArea) // alle Areas durchgehen
{
const ScRange* pThisRange = pDoc->GetPrintRange( nPrintTab, nStep );
@@ -2564,7 +2564,7 @@ long ScPrintFunc::CountNotePages()
nStartRow = pThisRange->aStart.Row();
nEndCol = pThisRange->aEnd .Col();
nEndRow = pThisRange->aEnd .Row();
- bDoThis = AdjustPrintArea(FALSE);
+ bDoThis = AdjustPrintArea(false);
}
}
@@ -2590,7 +2590,7 @@ long ScPrintFunc::CountNotePages()
long nNoteAdd;
do
{
- nNoteAdd = PrintNotes( nPages, nNoteNr, FALSE, NULL );
+ nNoteAdd = PrintNotes( nPages, nNoteNr, false, NULL );
if (nNoteAdd)
{
nNoteNr += nNoteAdd;
@@ -2650,8 +2650,8 @@ void ScPrintFunc::ApplyPrintSettings()
aEnumSize.Width() = aEnumSize.Height();
aEnumSize.Height() = nTemp;
}
- Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MAP_TWIP, TRUE );
- USHORT nPaperBin = ((const SvxPaperBinItem&)pParamSet->Get(ATTR_PAGE_PAPERBIN)).GetValue();
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MAP_TWIP, sal_True );
+ sal_uInt16 nPaperBin = ((const SvxPaperBinItem&)pParamSet->Get(ATTR_PAGE_PAPERBIN)).GetValue();
pPrinter->SetPaper( ePaper );
if ( PAPER_USER == ePaper )
@@ -2673,7 +2673,7 @@ void ScPrintFunc::ApplyPrintSettings()
// nDisplayStart = lfd. Nummer fuer Anzeige der Seitennummer
long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
- long nStartPage, long nDisplayStart, BOOL bDoPrint,
+ long nStartPage, long nDisplayStart, sal_Bool bDoPrint,
SfxProgress* pProgress, ScPreviewLocationData* pLocationData )
{
DBG_ASSERT(pDev,"Device == NULL");
@@ -2703,10 +2703,10 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
long nPrinted = 0;
long nEndPage = rPageRanges.GetTotalRange().Max();
- USHORT nRepeats = 1; // wie oft durchgehen ?
+ sal_uInt16 nRepeats = 1; // wie oft durchgehen ?
if (bMultiArea)
nRepeats = pDoc->GetPrintRangeCount(nPrintTab);
- for (USHORT nStep=0; nStep<nRepeats; nStep++)
+ for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
{
if (bMultiArea) // Bereich neu belegen ?
{
@@ -2791,7 +2791,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
{
if ( nPageNo+nStartPage <= nEndPage )
{
- BOOL bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 );
+ sal_Bool bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 );
nNoteAdd = PrintNotes( nPageNo+nStartPage, nNoteNr, bDoPrint && bPageSelected,
( bPageSelected ? pLocationData : NULL ) );
if ( nNoteAdd )
@@ -2805,7 +2805,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
if (bPageSelected)
{
++nPrinted;
- bSourceRangeValid = FALSE; // last page was no cell range
+ bSourceRangeValid = false; // last page was no cell range
}
++nPageNo;
}
@@ -2821,9 +2821,9 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
return nPrinted;
}
-void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom berechnen
+void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo ) // Zoom berechnen
{
- USHORT nRCount = pDoc->GetPrintRangeCount( nPrintTab );
+ sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab );
const ScRange* pThisRange = NULL;
if ( nRangeNo != RANGENO_NORANGE || nRangeNo < nRCount )
pThisRange = pDoc->GetPrintRange( nPrintTab, nRangeNo );
@@ -2835,7 +2835,7 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom bere
nEndRow = pThisRange->aEnd .Row();
}
- if (!AdjustPrintArea(FALSE)) // leer
+ if (!AdjustPrintArea(false)) // leer
{
nZoom = 100;
nPagesX = nPagesY = nTotalY = 0;
@@ -2847,7 +2847,7 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom bere
if (aTableParam.bScalePageNum)
{
nZoom = 100;
- USHORT nPagesToFit = aTableParam.nScalePageNum;
+ sal_uInt16 nPagesToFit = aTableParam.nScalePageNum;
sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
while (true)
@@ -2888,8 +2888,8 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom bere
else if (aTableParam.bScaleTo)
{
nZoom = 100;
- USHORT nW = aTableParam.nScaleWidth;
- USHORT nH = aTableParam.nScaleHeight;
+ sal_uInt16 nW = aTableParam.nScaleWidth;
+ sal_uInt16 nH = aTableParam.nScaleHeight;
sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
while (true)
@@ -3000,7 +3000,7 @@ void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowE
SCROW nStartRow = rPageRowEntry.GetStartRow();
SCROW nEndRow = rPageRowEntry.GetEndRow();
- BOOL bLeftIsEmpty = FALSE;
+ sal_Bool bLeftIsEmpty = false;
ScRange aTempRange;
Rectangle aTempRect = pDoc->GetMMRect( 0,0, 0,0, 0 );
@@ -3011,10 +3011,10 @@ void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowE
bLeftIsEmpty, &aTempRange, &aTempRect ) )
{
rPageRowEntry.SetHidden(i);
- bLeftIsEmpty = TRUE;
+ bLeftIsEmpty = sal_True;
}
else
- bLeftIsEmpty = FALSE;
+ bLeftIsEmpty = false;
nStartCol = nEndCol+1;
}
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 58be3b960b54..683cd3a52848 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -91,7 +91,7 @@ namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); }
#define IMPL_CHILD_CTOR(Class,sid) \
Class::Class( Window* pParentP, \
- USHORT nId, \
+ sal_uInt16 nId, \
SfxBindings* p, \
SfxChildWinInfo* pInfo ) \
: SfxChildWindow(pParentP, nId) \
@@ -109,7 +109,7 @@ namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); }
pWindow = pViewShell ? \
pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : NULL; \
if (pViewShell && !pWindow) \
- pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); \
+ pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \
}
@@ -198,15 +198,15 @@ IMPL_CHILD_CTOR( ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
// ScSimpleRefDlgWrapper
//-------------------------------------------------------------------------
-static BOOL bScSimpleRefFlag;
+static sal_Bool bScSimpleRefFlag;
static long nScSimpleRefHeight;
static long nScSimpleRefWidth;
static long nScSimpleRefX;
static long nScSimpleRefY;
-static BOOL bAutoReOpen=TRUE;
+static sal_Bool bAutoReOpen=sal_True;
ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* p,
SfxChildWinInfo* pInfo )
: SfxChildWindow(pParentP, nId)
@@ -237,11 +237,11 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP,
if (!pWindow)
{
- SC_MOD()->SetRefDialog( nId, FALSE );
+ SC_MOD()->SetRefDialog( nId, false );
}
}
-void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize, BOOL bSet)
+void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize, sal_Bool bSet)
{
bScSimpleRefFlag=bSet;
if(bScSimpleRefFlag)
@@ -264,7 +264,7 @@ String ScSimpleRefDlgWrapper::GetRefString()
return aResult;
}
-void ScSimpleRefDlgWrapper::SetAutoReOpen(BOOL bFlag)
+void ScSimpleRefDlgWrapper::SetAutoReOpen(sal_Bool bFlag)
{
bAutoReOpen=bFlag;
}
@@ -294,7 +294,7 @@ void ScSimpleRefDlgWrapper::SetUnoLinks( const Link& rDone,
}
}
-void ScSimpleRefDlgWrapper::SetFlags( BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection )
+void ScSimpleRefDlgWrapper::SetFlags( sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection )
{
if(pWindow!=NULL)
{
@@ -317,7 +317,7 @@ void ScSimpleRefDlgWrapper::StartRefInput()
//-------------------------------------------------------------------------
ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( pParentP, nId )
@@ -333,7 +333,7 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( Window* pParentP,
((ScAcceptChgDlg*)pWindow)->Initialize( pInfo );
}
if (pViewShell && !pWindow)
- pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE );
+ pViewShell->GetViewFrame()->SetChildWindow( nId, false );
}
void ScAcceptChgDlgWrapper::ReInitDlg()
@@ -370,7 +370,7 @@ namespace
}
ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP, \
- USHORT nId, \
+ sal_uInt16 nId, \
SfxBindings* p, \
SfxChildWinInfo* /*pInfo*/ ) \
: SfxChildWindow(pParentP, nId),
@@ -378,7 +378,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP,
m_bFreeWindowLock( false ),
m_pSavedWndParent( NULL )
{
- SetWantsFocus( FALSE );\
+ SetWantsFocus( false );\
ScTabViewShell* pViewShell = \
NULL != ( pWindow = ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow)->GetTabViewShell() :
lcl_GetTabViewShell( p );
@@ -386,7 +386,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP,
pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
DBG_ASSERT( pViewShell, "missing view shell :-(" ); \
if (pViewShell && !pWindow) \
- pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); \
+ pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \
if( pWindow ) m_pSavedWndParent = pWindow->GetParent();
}
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index e69903087ac9..e73e58ef032e 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -49,14 +49,14 @@
#define SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN 65
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
static Point aSwitchPos; //! Member
-static BOOL bDidSwitch = FALSE;
+static sal_Bool bDidSwitch = false;
// -----------------------------------------------------------------------
@@ -67,8 +67,8 @@ static BOOL bDidSwitch = FALSE;
ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
pEngine( NULL ),
- bAnchor( FALSE ),
- bStarted( FALSE )
+ bAnchor( false ),
+ bStarted( false )
{
DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet");
}
@@ -81,10 +81,10 @@ ScSplitPos ScViewFunctionSet::GetWhich()
return pViewData->GetActivePart();
}
-ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
+sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll )
{
- ULONG nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX;
+ sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX;
Window* pWin = pEngine->GetWindow();
Rectangle aScrRect = pWin->GetDesktopRectPixel();
Point aRootPos = pWin->OutputToAbsoluteScreenPixel(Point(0,0));
@@ -98,7 +98,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nHAccelRate > 1.0)
nHAccelRate = 1.0;
- nUpdateInterval = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
+ nUpdateInterval = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
}
if (bLeftScroll)
@@ -110,7 +110,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nHAccelRate > 1.0)
nHAccelRate = 1.0;
- ULONG nTmp = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
+ sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
if (nUpdateInterval > nTmp)
nUpdateInterval = nTmp;
}
@@ -125,7 +125,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nVAccelRate > 1.0)
nVAccelRate = 1.0;
- ULONG nTmp = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
+ sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
if (nUpdateInterval > nTmp)
nUpdateInterval = nTmp;
}
@@ -139,7 +139,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nVAccelRate > 1.0)
nVAccelRate = 1.0;
- ULONG nTmp = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
+ sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
if (nUpdateInterval > nTmp)
nUpdateInterval = nTmp;
}
@@ -183,7 +183,7 @@ void ScViewFunctionSet::BeginDrag()
}
ScModule* pScMod = SC_MOD();
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
if (!bRefMode)
{
pViewData->GetView()->FakeButtonUp( GetWhich() ); // ButtonUp is swallowed
@@ -194,7 +194,7 @@ void ScViewFunctionSet::BeginDrag()
{
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
// bApi = TRUE -> no error messages
- BOOL bCopied = pViewData->GetView()->CopyToClip( pClipDoc, FALSE, TRUE );
+ sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, true );
if ( bCopied )
{
sal_Int8 nDragActions = pViewData->GetView()->SelectionEditable() ?
@@ -244,7 +244,7 @@ void ScViewFunctionSet::CreateAnchor()
{
if (bAnchor) return;
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
SetAnchor( pViewData->GetRefStartX(), pViewData->GetRefStartY() );
else
@@ -253,22 +253,22 @@ void ScViewFunctionSet::CreateAnchor()
void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY )
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
ScTabView* pView = pViewData->GetView();
SCTAB nTab = pViewData->GetTabNo();
if (bRefMode)
{
- pView->DoneRefMode( FALSE );
+ pView->DoneRefMode( false );
aAnchorPos.Set( nPosX, nPosY, nTab );
pView->InitRefMode( aAnchorPos.Col(), aAnchorPos.Row(), aAnchorPos.Tab(),
SC_REFTYPE_REF );
- bStarted = TRUE;
+ bStarted = sal_True;
}
else if (pViewData->IsAnyFillMode())
{
aAnchorPos.Set( nPosX, nPosY, nTab );
- bStarted = TRUE;
+ bStarted = sal_True;
}
else
{
@@ -279,46 +279,46 @@ void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY )
}
else
{
- pView->DoneBlockMode( TRUE );
+ pView->DoneBlockMode( sal_True );
aAnchorPos.Set( nPosX, nPosY, nTab );
ScMarkData& rMark = pViewData->GetMarkData();
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
{
pView->InitBlockMode( aAnchorPos.Col(), aAnchorPos.Row(),
- aAnchorPos.Tab(), TRUE );
- bStarted = TRUE;
+ aAnchorPos.Tab(), sal_True );
+ bStarted = sal_True;
}
else
- bStarted = FALSE;
+ bStarted = false;
}
}
- bAnchor = TRUE;
+ bAnchor = sal_True;
}
void ScViewFunctionSet::DestroyAnchor()
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
- pViewData->GetView()->DoneRefMode( TRUE );
+ pViewData->GetView()->DoneRefMode( sal_True );
else
- pViewData->GetView()->DoneBlockMode( TRUE );
+ pViewData->GetView()->DoneBlockMode( sal_True );
- bAnchor = FALSE;
+ bAnchor = false;
}
-void ScViewFunctionSet::SetAnchorFlag( BOOL bSet )
+void ScViewFunctionSet::SetAnchorFlag( sal_Bool bSet )
{
bAnchor = bSet;
}
-BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDontSelectAtCursor */ )
+sal_Bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ )
{
if ( bDidSwitch )
{
if ( rPointPixel == aSwitchPos )
- return FALSE; // nicht auf falschem Fenster scrollen
+ return false; // nicht auf falschem Fenster scrollen
else
- bDidSwitch = FALSE;
+ bDidSwitch = false;
}
aSwitchPos = rPointPixel; // nur wichtig, wenn bDidSwitch
@@ -344,13 +344,13 @@ BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDon
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(),
- nPosX, nPosY, TRUE, TRUE ); // mit Repair
+ nPosX, nPosY, sal_True, sal_True ); // mit Repair
// fuer AutoFill in der Mitte der Zelle umschalten
// dabei aber nicht das Scrolling nach rechts/unten verhindern
if ( pViewData->IsFillMode() || pViewData->GetFillMode() == SC_FILL_MATRIX )
{
- BOOL bLeft, bTop;
+ sal_Bool bLeft, bTop;
pViewData->GetMouseQuadrant( aEffPos, GetWhich(), nPosX, nPosY, bLeft, bTop );
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
@@ -377,25 +377,25 @@ BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDon
if ( aEffPos.X() >= aWinSize.Width() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bScroll = false, bDidSwitch = sal_True;
else if ( eWhich == SC_SPLIT_BOTTOMLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = false, bDidSwitch = sal_True;
}
if ( pViewData->GetVSplitMode() == SC_SPLIT_FIX )
if ( aEffPos.Y() >= aWinSize.Height() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bScroll = false, bDidSwitch = sal_True;
else if ( eWhich == SC_SPLIT_TOPRIGHT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = false, bDidSwitch = sal_True;
}
}
if (bScroll)
{
// Adjust update interval based on how far the mouse pointer is from the edge.
- ULONG nUpdateInterval = CalcUpdateInterval(
+ sal_uLong nUpdateInterval = CalcUpdateInterval(
aWinSize, aEffPos, bLeftScroll, bTopScroll, bRightScroll, bBottomScroll);
pEngine->SetUpdateInterval(nUpdateInterval);
}
@@ -409,7 +409,7 @@ BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDon
return SetCursorAtCell( nPosX, nPosY, bScroll );
}
-BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScroll )
+sal_Bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Bool bScroll )
{
ScTabView* pView = pViewData->GetView();
SCTAB nTab = pViewData->GetTabNo();
@@ -425,19 +425,19 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
bool bSkipUnprotected = !pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS);
if ( bSkipProtected && bSkipUnprotected )
- return FALSE;
+ return false;
bool bCellProtected = pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HASATTR_PROTECTED);
if ( (bCellProtected && bSkipProtected) || (!bCellProtected && bSkipUnprotected) )
// Don't select this cell!
- return FALSE;
+ return false;
}
ScModule* pScMod = SC_MOD();
ScTabViewShell* pViewShell = pViewData->GetViewShell();
bool bRefMode = ( pViewShell ? pViewShell->IsRefInputMode() : false );
- BOOL bHide = !bRefMode && !pViewData->IsAnyFillMode() &&
+ sal_Bool bHide = !bRefMode && !pViewData->IsAnyFillMode() &&
( nPosX != (SCsCOL) pViewData->GetCurX() || nPosY != (SCsROW) pViewData->GetCurY() );
if (bHide)
@@ -461,7 +461,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
{
if (!bAnchor)
{
- pView->DoneRefMode( TRUE );
+ pView->DoneRefMode( sal_True );
pView->InitRefMode( nPosX, nPosY, pViewData->GetTabNo(), SC_REFTYPE_REF );
}
@@ -485,7 +485,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
ScRange aDelRange;
- BOOL bOldDelMark = pViewData->GetDelMark( aDelRange );
+ sal_Bool bOldDelMark = pViewData->GetDelMark( aDelRange );
if ( nPosX+1 >= (SCsCOL) nStartX && nPosX <= (SCsCOL) nEndX &&
nPosY+1 >= (SCsROW) nStartY && nPosY <= (SCsROW) nEndY &&
@@ -538,8 +538,8 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
pViewData->GetView()->UpdateShrinkOverlay();
}
- BOOL bNegX = ( nPosX < (SCsCOL) nStartX );
- BOOL bNegY = ( nPosY < (SCsROW) nStartY );
+ sal_Bool bNegX = ( nPosX < (SCsCOL) nStartX );
+ sal_Bool bNegY = ( nPosY < (SCsROW) nStartY );
long nSizeX = 0;
if ( bNegX )
@@ -573,12 +573,12 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
if ( nSizeX > nSizeY ) // Fill immer nur in einer Richtung
{
nPosY = nEndY;
- bNegY = FALSE;
+ bNegY = false;
}
else
{
nPosX = nEndX;
- bNegX = FALSE;
+ bNegX = false;
}
SCCOL nRefStX = bNegX ? nEndX : nStartX;
@@ -594,7 +594,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
else if (pViewData->IsAnyFillMode())
{
- BYTE nMode = pViewData->GetFillMode();
+ sal_uInt8 nMode = pViewData->GetFillMode();
if ( nMode == SC_FILL_EMBED_LT || nMode == SC_FILL_EMBED_RB )
{
DBG_ASSERT( pDoc->IsEmbedded(), "!pDoc->IsEmbedded()" );
@@ -634,7 +634,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
else // normales Markieren
{
- BOOL bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() ||
+ sal_Bool bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() ||
(SCROW)nPosY != pViewData->GetCurY() );
if (bHideCur)
pView->HideAllCursors(); // sonst zweimal: Block und SetCursor
@@ -643,18 +643,18 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
{
if (!bStarted)
{
- BOOL bMove = ( nPosX != (SCsCOL) aAnchorPos.Col() ||
+ sal_Bool bMove = ( nPosX != (SCsCOL) aAnchorPos.Col() ||
nPosY != (SCsROW) aAnchorPos.Row() );
if ( bMove || ( pEngine && pEngine->GetMouseEvent().IsShift() ) )
{
pView->InitBlockMode( aAnchorPos.Col(), aAnchorPos.Row(),
- aAnchorPos.Tab(), TRUE );
- bStarted = TRUE;
+ aAnchorPos.Tab(), sal_True );
+ bStarted = sal_True;
}
}
if (bStarted)
// If the selection is already started, don't set the cursor.
- pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab, FALSE, FALSE, TRUE );
+ pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab, false, false, true );
else
pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
}
@@ -663,12 +663,12 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
ScMarkData& rMark = pViewData->GetMarkData();
if (rMark.IsMarked() || rMark.IsMultiMarked())
{
- pView->DoneBlockMode(TRUE);
- pView->InitBlockMode( nPosX, nPosY, nTab, TRUE );
+ pView->DoneBlockMode(sal_True);
+ pView->InitBlockMode( nPosX, nPosY, nTab, sal_True );
pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
aAnchorPos.Set( nPosX, nPosY, nTab );
- bStarted = TRUE;
+ bStarted = sal_True;
}
// #i3875# *Hack* When a new cell is Ctrl-clicked with no pre-selected cells,
// it highlights that new cell as well as the old cell where the cursor is
@@ -679,18 +679,18 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
SCCOL nOldX = pViewData->GetCurX();
SCROW nOldY = pViewData->GetCurY();
- pView->InitBlockMode( nOldX, nOldY, nTab, TRUE );
+ pView->InitBlockMode( nOldX, nOldY, nTab, sal_True );
pView->MarkCursor( (SCCOL) nOldX, (SCROW) nOldY, nTab );
if ( nOldX != nPosX || nOldY != nPosY )
{
- pView->DoneBlockMode( TRUE );
- pView->InitBlockMode( nPosX, nPosY, nTab, TRUE );
+ pView->DoneBlockMode( sal_True );
+ pView->InitBlockMode( nPosX, nPosY, nTab, sal_True );
pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
aAnchorPos.Set( nPosX, nPosY, nTab );
}
- bStarted = TRUE;
+ bStarted = sal_True;
}
pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
}
@@ -703,17 +703,17 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
if (bHide)
pView->ShowAllCursors();
- return TRUE;
+ return sal_True;
}
-BOOL ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+sal_Bool ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
- return FALSE;
+ return false;
if (pViewData->IsAnyFillMode())
- return FALSE;
+ return false;
ScMarkData& rMark = pViewData->GetMarkData();
if (bAnchor || !rMark.IsMultiMarked())
@@ -724,7 +724,7 @@ BOOL ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
return pViewData->GetMarkData().IsCellMarked( (SCCOL) nPosX, (SCROW) nPosY );
}
- return FALSE;
+ return false;
}
void ScViewFunctionSet::DeselectAtPoint( const Point& /* rPointPixel */ )
@@ -737,18 +737,18 @@ void ScViewFunctionSet::DeselectAll()
if (pViewData->IsAnyFillMode())
return;
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
{
- pViewData->GetView()->DoneRefMode( FALSE );
+ pViewData->GetView()->DoneRefMode( false );
}
else
{
- pViewData->GetView()->DoneBlockMode( FALSE );
+ pViewData->GetView()->DoneBlockMode( false );
pViewData->GetViewShell()->UpdateInputHandler();
}
- bAnchor = FALSE;
+ bAnchor = false;
}
//------------------------------------------------------------------------
@@ -760,7 +760,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
{
// Parameter einstellen
SetSelectionMode( MULTIPLE_SELECTION );
- EnableDrag( TRUE );
+ EnableDrag( sal_True );
}
@@ -772,15 +772,15 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
ScHeaderFunctionSet::ScHeaderFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
- bColumn( FALSE ),
+ bColumn( false ),
eWhich( SC_SPLIT_TOPLEFT ),
- bAnchor( FALSE ),
+ bAnchor( false ),
nCursorPos( 0 )
{
DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet");
}
-void ScHeaderFunctionSet::SetColumn( BOOL bSet )
+void ScHeaderFunctionSet::SetColumn( sal_Bool bSet )
{
bColumn = bSet;
}
@@ -801,41 +801,41 @@ void ScHeaderFunctionSet::CreateAnchor()
return;
ScTabView* pView = pViewData->GetView();
- pView->DoneBlockMode( TRUE );
+ pView->DoneBlockMode( sal_True );
if (bColumn)
{
- pView->InitBlockMode( static_cast<SCCOL>(nCursorPos), 0, pViewData->GetTabNo(), TRUE, TRUE, FALSE );
+ pView->InitBlockMode( static_cast<SCCOL>(nCursorPos), 0, pViewData->GetTabNo(), sal_True, sal_True, false );
pView->MarkCursor( static_cast<SCCOL>(nCursorPos), MAXROW, pViewData->GetTabNo() );
}
else
{
- pView->InitBlockMode( 0, nCursorPos, pViewData->GetTabNo(), TRUE, FALSE, TRUE );
+ pView->InitBlockMode( 0, nCursorPos, pViewData->GetTabNo(), sal_True, false, sal_True );
pView->MarkCursor( MAXCOL, nCursorPos, pViewData->GetTabNo() );
}
- bAnchor = TRUE;
+ bAnchor = sal_True;
}
void ScHeaderFunctionSet::DestroyAnchor()
{
- pViewData->GetView()->DoneBlockMode( TRUE );
- bAnchor = FALSE;
+ pViewData->GetView()->DoneBlockMode( sal_True );
+ bAnchor = false;
}
-BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDontSelectAtCursor */ )
+sal_Bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ )
{
if ( bDidSwitch )
{
// die naechste gueltige Position muss vom anderen Fenster kommen
if ( rPointPixel == aSwitchPos )
- return FALSE; // nicht auf falschem Fenster scrollen
+ return false; // nicht auf falschem Fenster scrollen
else
- bDidSwitch = FALSE;
+ bDidSwitch = false;
}
// Scrolling
Size aWinSize = pViewData->GetActiveWin()->GetOutputSizePixel();
- BOOL bScroll;
+ sal_Bool bScroll;
if (bColumn)
bScroll = ( rPointPixel.X() < 0 || rPointPixel.X() >= aWinSize.Width() );
else
@@ -843,7 +843,7 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
// ueber Fixier-Grenze bewegt?
- BOOL bSwitched = FALSE;
+ sal_Bool bSwitched = false;
if ( bColumn )
{
if ( pViewData->GetHSplitMode() == SC_SPLIT_FIX )
@@ -851,9 +851,9 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if ( rPointPixel.X() > aWinSize.Width() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bSwitched = sal_True;
else if ( eWhich == SC_SPLIT_BOTTOMLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = sal_True;
}
}
}
@@ -864,17 +864,17 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if ( rPointPixel.Y() > aWinSize.Height() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bSwitched = sal_True;
else if ( eWhich == SC_SPLIT_TOPRIGHT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = sal_True;
}
}
}
if (bSwitched)
{
aSwitchPos = rPointPixel;
- bDidSwitch = TRUE;
- return FALSE; // nicht mit falschen Positionen rechnen
+ bDidSwitch = sal_True;
+ return false; // nicht mit falschen Positionen rechnen
}
//
@@ -882,7 +882,7 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
- nPosX, nPosY, FALSE );
+ nPosX, nPosY, false );
if (bColumn)
{
nCursorPos = static_cast<SCCOLROW>(nPosX);
@@ -895,7 +895,7 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
}
ScTabView* pView = pViewData->GetView();
- BOOL bHide = pViewData->GetCurX() != nPosX ||
+ sal_Bool bHide = pViewData->GetCurX() != nPosX ||
pViewData->GetCurY() != nPosY;
if (bHide)
pView->HideAllCursors();
@@ -906,11 +906,11 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if ( !bAnchor || !pView->IsBlockMode() )
{
- pView->DoneBlockMode( TRUE );
+ pView->DoneBlockMode( sal_True );
pViewData->GetMarkData().MarkToMulti(); //! wer verstellt das ???
- pView->InitBlockMode( nPosX, nPosY, pViewData->GetTabNo(), TRUE, bColumn, !bColumn );
+ pView->InitBlockMode( nPosX, nPosY, pViewData->GetTabNo(), sal_True, bColumn, !bColumn );
- bAnchor = TRUE;
+ bAnchor = sal_True;
}
pView->MarkCursor( nPosX, nPosY, pViewData->GetTabNo(), bColumn, !bColumn );
@@ -921,15 +921,15 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if (bHide)
pView->ShowAllCursors();
- return TRUE;
+ return sal_True;
}
-BOOL ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+sal_Bool ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
- nPosX, nPosY, FALSE );
+ nPosX, nPosY, false );
ScMarkData& rMark = pViewData->GetMarkData();
if (bColumn)
@@ -944,8 +944,8 @@ void ScHeaderFunctionSet::DeselectAtPoint( const Point& /* rPointPixel */ )
void ScHeaderFunctionSet::DeselectAll()
{
- pViewData->GetView()->DoneBlockMode( FALSE );
- bAnchor = FALSE;
+ pViewData->GetView()->DoneBlockMode( false );
+ bAnchor = false;
}
//------------------------------------------------------------------------
@@ -955,7 +955,7 @@ ScHeaderSelectionEngine::ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunct
{
// Parameter einstellen
SetSelectionMode( MULTIPLE_SELECTION );
- EnableDrag( FALSE );
+ EnableDrag( false );
}
diff --git a/sc/source/ui/view/selectionstate.cxx b/sc/source/ui/view/selectionstate.cxx
index 3412dd53f03a..93bcb4c68082 100644
--- a/sc/source/ui/view/selectionstate.cxx
+++ b/sc/source/ui/view/selectionstate.cxx
@@ -58,7 +58,7 @@ ScSelectionState::ScSelectionState( ScViewData& rViewData ) :
if( rMarkData.IsMultiMarked() )
{
meType = SC_SELECTTYPE_SHEET;
- rMarkData.FillRangeListWithMarks( &maSheetSel, FALSE );
+ rMarkData.FillRangeListWithMarks( &maSheetSel, false );
}
// else type is SC_SELECTTYPE_NONE - already initialized
}
@@ -70,10 +70,10 @@ bool operator==( const ScSelectionState& rL, const ScSelectionState& rR )
if( bEqual ) switch( rL.GetSelectionType() )
{
case SC_SELECTTYPE_EDITCELL:
- bEqual &= ( rL.GetEditSelection().IsEqual( rR.GetEditSelection() ) != FALSE );
+ bEqual &= ( rL.GetEditSelection().IsEqual( rR.GetEditSelection() ) != false );
// run through!
case SC_SELECTTYPE_SHEET:
- bEqual &= (rL.GetSheetSelection() == rR.GetSheetSelection()) == TRUE;
+ bEqual &= (rL.GetSheetSelection() == rR.GetSheetSelection()) == sal_True;
// run through!
case SC_SELECTTYPE_NONE:
bEqual &= rL.GetCellCursor() == rR.GetCellCursor();
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index a9c9b7a68c3f..a852f8e5f68b 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -50,7 +50,7 @@
SFX_IMPL_CHILDWINDOW( ScSpellDialogChildWindow, SID_SPELL_DIALOG )
-ScSpellDialogChildWindow::ScSpellDialogChildWindow( Window* pParentP, USHORT nId,
+ScSpellDialogChildWindow::ScSpellDialogChildWindow( Window* pParentP, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
::svx::SpellDialogChildWindow( pParentP, nId, pBindings, pInfo ),
mpViewShell( 0 ),
@@ -149,7 +149,7 @@ void ScSpellDialogChildWindow::Reset()
}
mpViewData->SetSpellingView( 0 );
- mpViewShell->KillEditView( TRUE );
+ mpViewShell->KillEditView( sal_True );
mpDocShell->PostPaintGridAll();
mpViewShell->UpdateInputHandler();
mpDoc->DisableIdle( mbOldIdleDisabled );
@@ -221,7 +221,7 @@ void ScSpellDialogChildWindow::Init()
}
mbOldIdleDisabled = mpDoc->IsIdleDisabled();
- mpDoc->DisableIdle( TRUE ); // stop online spelling
+ mpDoc->DisableIdle( true ); // stop online spelling
// *** create Undo/Redo documents *** -------------------------------------
@@ -255,7 +255,7 @@ void ScSpellDialogChildWindow::Init()
Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) );
pEditView->SetOutputArea( aRect );
mxEngine->SetControlWord( EE_CNTRL_USECHARATTRIBS );
- mxEngine->EnableUndo( FALSE );
+ mxEngine->EnableUndo( false );
mxEngine->SetPaperSize( aRect.GetSize() );
mxEngine->SetText( EMPTY_STRING );
mxEngine->ClearModifyFlag();
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 08d6b72e088d..e5e1b38da726 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -116,7 +116,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
String aNewStr = GetText();
- BOOL bMultiTab = (rMark.GetSelectCount() > 1);
+ sal_Bool bMultiTab = (rMark.GetSelectCount() > 1);
String aVisibleStr;
if( bMultiTab )
mrDoc.GetString( mnCurrCol, mnCurrRow, mnStartTab, aVisibleStr );
@@ -250,7 +250,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
if( bFound )
{
pViewShell->AlignToCursor( nNewCol, nNewRow, SC_FOLLOW_JUMP );
- pViewShell->SetCursor( nNewCol, nNewRow, TRUE );
+ pViewShell->SetCursor( nNewCol, nNewRow, sal_True );
mrViewData.GetView()->MakeEditView( this, nNewCol, nNewRow );
EditView* pEditView = mrViewData.GetSpellingView();
// maSelState.GetEditSelection() returns (0,0) if not in edit mode -> ok
@@ -330,7 +330,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView )
{
EESpellState eState = EE_SPELL_OK;
if( FindNextConversionCell() )
- eState = rEditView.StartSpeller( static_cast< BOOL >( TRUE ) );
+ eState = rEditView.StartSpeller( static_cast< sal_Bool >( sal_True ) );
DBG_ASSERT( eState != EE_SPELL_NOSPELLER, "ScSpellingEngine::Convert - no spell checker" );
if( eState == EE_SPELL_NOLANGUAGE )
@@ -341,7 +341,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView )
}
}
-BOOL ScSpellingEngine::SpellNextDocument()
+sal_Bool ScSpellingEngine::SpellNextDocument()
{
return FindNextConversionCell();
}
@@ -370,7 +370,7 @@ void ScSpellingEngine::ShowFinishDialog()
Window* ScSpellingEngine::GetDialogParent()
{
- USHORT nWinId = ScSpellDialogChildWindow::GetChildWindowId();
+ sal_uInt16 nWinId = ScSpellDialogChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = mrViewData.GetViewShell()->GetViewFrame();
if( pViewFrm->HasChildWindow( nWinId ) )
if( SfxChildWindow* pChild = pViewFrm->GetChildWindow( nWinId ) )
@@ -439,13 +439,13 @@ void ScTextConversionEngine::ConvertAll( EditView& rEditView )
{
rEditView.StartTextConversion(
maConvParam.GetSourceLang(), maConvParam.GetTargetLang(), maConvParam.GetTargetFont(),
- maConvParam.GetOptions(), maConvParam.IsInteractive(), TRUE );
+ maConvParam.GetOptions(), maConvParam.IsInteractive(), sal_True );
// #i34769# restore initial cursor position
RestoreCursorPos();
}
}
-BOOL ScTextConversionEngine::ConvertNextDocument()
+sal_Bool ScTextConversionEngine::ConvertNextDocument()
{
return FindNextConversionCell();
}
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 567937f4f5e9..1f1aca34902a 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -63,7 +63,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
pViewData( pData ),
nMouseClickPageId( TabBar::PAGE_NOT_FOUND ),
nSelPageIdByMouse( TabBar::PAGE_NOT_FOUND ),
- bErrorShown( FALSE )
+ bErrorShown( false )
{
ScDocument* pDoc = pViewData->GetDocument();
@@ -103,9 +103,9 @@ ScTabControl::~ScTabControl()
{
}
-USHORT ScTabControl::GetMaxId() const
+sal_uInt16 ScTabControl::GetMaxId() const
{
- USHORT nVisCnt = GetPageCount();
+ sal_uInt16 nVisCnt = GetPageCount();
if (nVisCnt)
return GetPageId(nVisCnt-1);
@@ -114,7 +114,7 @@ USHORT ScTabControl::GetMaxId() const
SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos )
{
- USHORT nPos = ShowDropPos(rPos);
+ sal_uInt16 nPos = ShowDropPos(rPos);
SCTAB nRealPos = static_cast<SCTAB>(nPos);
@@ -124,7 +124,7 @@ SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos )
SCTAB nCount = pDoc->GetTableCount();
- USHORT nViewPos=0;
+ sal_uInt16 nViewPos=0;
nRealPos = nCount;
for (SCTAB i=0; i<nCount; i++)
{
@@ -202,7 +202,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
// Click in the area next to the existing tabs:
// #i70320# if several sheets are selected, deselect all ecxept the current sheet,
// otherwise add new sheet
- USHORT nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE;
+ sal_uInt16 nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE;
SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher();
pDispatcher->Execute( nSlot, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
// forget page ID, to be really sure that the dialog is not called twice
@@ -238,9 +238,9 @@ void ScTabControl::Select()
return;
}
- USHORT nCurId = GetCurPageId();
+ sal_uInt16 nCurId = GetCurPageId();
if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist
- USHORT nPage = nCurId - 1;
+ sal_uInt16 nPage = nCurId - 1;
// OLE-inplace deaktivieren
if ( nPage != static_cast<sal_uInt16>(pViewData->GetTabNo()) )
@@ -248,7 +248,7 @@ void ScTabControl::Select()
// InputEnterHandler nur wenn nicht Referenzeingabe
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
if (!bRefMode)
pScMod->InputEnterHandler();
@@ -309,7 +309,7 @@ void ScTabControl::UpdateStatus()
{
ScDocument* pDoc = pViewData->GetDocument();
ScMarkData& rMark = pViewData->GetMarkData();
- BOOL bActive = pViewData->IsActive();
+ sal_Bool bActive = pViewData->IsActive();
SCTAB nCount = pDoc->GetTableCount();
SCTAB i;
@@ -317,7 +317,7 @@ void ScTabControl::UpdateStatus()
SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) );
Color aTabBgColor;
- BOOL bModified = FALSE; // Tabellen-Namen
+ sal_Bool bModified = false; // Tabellen-Namen
for (i=0; i<nMaxCnt && !bModified; i++)
{
if (pDoc->IsVisible(i))
@@ -331,7 +331,7 @@ void ScTabControl::UpdateStatus()
}
if ( (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) )
- bModified = TRUE;
+ bModified = sal_True;
}
if (bModified)
@@ -360,10 +360,10 @@ void ScTabControl::UpdateStatus()
if (bActive)
{
- bModified = FALSE; // Selektion
+ bModified = false; // Selektion
for (i=0; i<nMaxCnt && !bModified; i++)
if ( rMark.GetTableSelect(i) != IsPageSelected(static_cast<sal_uInt16>(i)+1) )
- bModified = TRUE;
+ bModified = sal_True;
// #i99576# the following loop is mis-optimized on unxsoli4 and the reason
// why this file is in NOOPTFILES.
@@ -376,23 +376,23 @@ void ScTabControl::UpdateStatus()
}
}
-void ScTabControl::ActivateView(BOOL bActivate)
+void ScTabControl::ActivateView(sal_Bool bActivate)
{
ScMarkData& rMark = pViewData->GetMarkData();
- USHORT nCurId = GetCurPageId();
+ sal_uInt16 nCurId = GetCurPageId();
if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist
- USHORT nPage = nCurId - 1;
+ sal_uInt16 nPage = nCurId - 1;
if (bActivate)
{
- SelectPage( nPage+1, TRUE );
- rMark.SelectTable( static_cast<SCTAB>(nPage), TRUE );
+ SelectPage( nPage+1, sal_True );
+ rMark.SelectTable( static_cast<SCTAB>(nPage), sal_True );
}
Invalidate();
}
-void ScTabControl::SetSheetLayoutRTL( BOOL bSheetRTL )
+void ScTabControl::SetSheetLayoutRTL( sal_Bool bSheetRTL )
{
SetEffectiveRTL( bSheetRTL );
nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND;
@@ -403,12 +403,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
{
ScModule* pScMod = SC_MOD();
ScTabViewShell* pViewSh = pViewData->GetViewShell();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
// ViewFrame erstmal aktivieren (Bug 19493):
pViewSh->SetActive();
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_CONTEXTMENU )
{
if (!bDisable)
@@ -416,19 +416,19 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
// #i18735# select the page that is under the mouse cursor
// if multiple tables are selected and the one under the cursor
// is not part of them then unselect them
- USHORT nId = GetPageId( rCEvt.GetMousePosPixel() );
+ sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() );
if (nId)
{
- BOOL bAlreadySelected = IsPageSelected( nId );
+ sal_Bool bAlreadySelected = IsPageSelected( nId );
//make the clicked page the current one
SetCurPageId( nId );
//change the selection when the current one is not already
//selected or part of a multi selection
if(!bAlreadySelected)
{
- USHORT nCount = GetMaxId();
+ sal_uInt16 nCount = GetMaxId();
- for (USHORT i=1; i<=nCount; i++)
+ for (sal_uInt16 i=1; i<=nCount; i++)
SelectPage( i, i==nId );
Select();
}
@@ -447,12 +447,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
{
ScModule* pScMod = SC_MOD();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
if (!bDisable)
{
Region aRegion( Rectangle(0,0,0,0) );
- CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, TRUE ); // needed for StartDrag
+ CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, sal_True ); // needed for StartDrag
if (TabBar::StartDrag( aCEvt, aRegion ))
DoDrag( aRegion );
}
@@ -489,9 +489,9 @@ void ScTabControl::DoDrag( const Region& /* rRegion */ )
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
-USHORT lcl_DocShellNr( ScDocument* pDoc )
+sal_uInt16 lcl_DocShellNr( ScDocument* pDoc )
{
- USHORT nShellCnt = 0;
+ sal_uInt16 nShellCnt = 0;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
while ( pShell )
{
@@ -535,7 +535,7 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE );
rData.pCellTransfer->SetDragWasInternal(); // don't delete
- return TRUE;
+ return sal_True;
}
else
Sound::Beep();
@@ -589,12 +589,12 @@ long ScTabControl::AllowRenaming()
DBG_ASSERT( pViewSh, "pViewData->GetViewShell()" );
long nRet = TABBAR_RENAMING_CANCEL;
- USHORT nId = GetEditPageId();
+ sal_uInt16 nId = GetEditPageId();
if ( nId )
{
SCTAB nTab = nId - 1;
String aNewName = GetEditText();
- BOOL bDone = pViewSh->RenameTable( aNewName, nTab );
+ sal_Bool bDone = pViewSh->RenameTable( aNewName, nTab );
if ( bDone )
nRet = TABBAR_RENAMING_YES;
else if ( bErrorShown )
@@ -613,9 +613,9 @@ long ScTabControl::AllowRenaming()
}
else
{
- bErrorShown = TRUE;
+ bErrorShown = sal_True;
pViewSh->ErrorMessage( STR_INVALIDTABNAME );
- bErrorShown = FALSE;
+ bErrorShown = false;
nRet = TABBAR_RENAMING_NO;
}
}
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index 868d7d478bdf..e60809da9d51 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -45,8 +45,8 @@ ScTabSplitter::ScTabSplitter( Window* pParent, WinBits nWinStyle, ScViewData* pD
Splitter( pParent, nWinStyle ),
pViewData(pData)
{
- SetFixed(FALSE);
- EnableRTL( FALSE );
+ SetFixed(false);
+ EnableRTL( false );
}
@@ -91,7 +91,7 @@ void ScTabSplitter::Splitting( Point& rSplitPos )
}
-void ScTabSplitter::SetFixed(BOOL bSet)
+void ScTabSplitter::SetFixed(sal_Bool bSet)
{
bFixed = bSet;
if (bSet)
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index aee6f9d41cf7..a00c71b95918 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -168,14 +168,14 @@ using namespace ::com::sun::star;
// Corner-Button
-ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional ) :
+ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional ) :
Window( pParent, WinBits( 0 ) ),
pViewData( pData ),
bAdd( bAdditional )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
SetBackground( rStyleSettings.GetFaceColor() );
- EnableRTL( FALSE );
+ EnableRTL( false );
}
ScCornerButton::~ScCornerButton()
@@ -192,7 +192,7 @@ void ScCornerButton::Paint( const Rectangle& rRect )
Window::Paint(rRect);
- BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+ sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
long nDarkX = bLayoutRTL ? 0 : nPosX;
if ( !bAdd )
@@ -256,42 +256,42 @@ void ScCornerButton::Resize()
void ScCornerButton::MouseButtonDown( const MouseEvent& rMEvt )
{
ScModule* pScMod = SC_MOD();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
if (!bDisable)
{
ScTabViewShell* pViewSh = pViewData->GetViewShell();
pViewSh->SetActive(); // Appear und SetViewFrame
pViewSh->ActiveGrabFocus();
- BOOL bControl = rMEvt.IsMod1();
+ sal_Bool bControl = rMEvt.IsMod1();
pViewSh->SelectAll( bControl );
}
}
//==================================================================
-BOOL lcl_HasColOutline( const ScViewData& rViewData )
+sal_Bool lcl_HasColOutline( const ScViewData& rViewData )
{
const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo());
if (pTable)
{
const ScOutlineArray* pArray = pTable->GetColArray();
if ( pArray->GetDepth() > 0 )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL lcl_HasRowOutline( const ScViewData& rViewData )
+sal_Bool lcl_HasRowOutline( const ScViewData& rViewData )
{
const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo());
if (pTable)
{
const ScOutlineArray* pArray = pTable->GetRowArray();
if ( pArray->GetDepth() > 0 )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//==================================================================
@@ -306,33 +306,33 @@ BOOL lcl_HasRowOutline( const ScViewData& rViewData )
pHdrSelEng( NULL ), \
aHdrFunc( &aViewData ), \
pDrawView( NULL ), \
- bDrawSelMode( FALSE ), \
+ bDrawSelMode( false ), \
aVScrollTop( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \
aVScrollBottom( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \
aHScrollLeft( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \
aHScrollRight( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \
- aCornerButton( pFrameWin, &aViewData, FALSE ), \
- aTopButton( pFrameWin, &aViewData, TRUE ), \
+ aCornerButton( pFrameWin, &aViewData, false ), \
+ aTopButton( pFrameWin, &aViewData, sal_True ), \
aScrollBarBox( pFrameWin, WB_SIZEABLE ), \
pInputHintWindow( NULL ), \
pPageBreakData( NULL ), \
pHighlightRanges( NULL ), \
pBrushDocument( NULL ), \
pDrawBrushSet( NULL ), \
- bLockPaintBrush( FALSE ), \
+ bLockPaintBrush( false ), \
pTimerWindow( NULL ), \
nTipVisible( 0 ), \
- bDragging( FALSE ), \
- bIsBlockMode( FALSE ), \
- bBlockNeg( FALSE ), \
- bBlockCols( FALSE ), \
- bBlockRows( FALSE ), \
+ bDragging( false ), \
+ bIsBlockMode( false ), \
+ bBlockNeg( false ), \
+ bBlockCols( false ), \
+ bBlockRows( false ), \
mfPendingTabBarWidth( -1.0 ), \
- bMinimized( FALSE ), \
- bInUpdateHeader( FALSE ), \
- bInActivatePart( FALSE ), \
- bInZoomUpdate( FALSE ), \
- bMoveIsShift( FALSE )
+ bMinimized( false ), \
+ bInUpdateHeader( false ), \
+ bInActivatePart( false ), \
+ bInZoomUpdate( false ), \
+ bMoveIsShift( false )
ScTabView::ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) :
@@ -383,7 +383,7 @@ IMPL_LINK( ScTabView, TimerHdl, Timer*, EMPTYARG )
// --- Resize ---------------------------------------------------------------------
void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize,
- long nTotalWidth, BOOL bLayoutRTL )
+ long nTotalWidth, sal_Bool bLayoutRTL )
{
Point aNewPos = rPos;
if ( bLayoutRTL )
@@ -399,36 +399,36 @@ void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize,
rWindow.SetPosSizePixel( aNewPos, rSize );
}
-void ScTabView::DoResize( const Point& rOffset, const Size& rSize, BOOL bInner )
+void ScTabView::DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner )
{
HideListBox();
- BOOL bHasHint = ( pInputHintWindow != NULL );
+ sal_Bool bHasHint = ( pInputHintWindow != NULL );
if (bHasHint)
RemoveHintWindow();
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
long nTotalWidth = rSize.Width();
if ( bLayoutRTL )
nTotalWidth += 2*rOffset.X();
- BOOL bVScroll = aViewData.IsVScrollMode();
- BOOL bHScroll = aViewData.IsHScrollMode();
- BOOL bTabControl = aViewData.IsTabMode();
- BOOL bHeaders = aViewData.IsHeaderMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bVScroll = aViewData.IsVScrollMode();
+ sal_Bool bHScroll = aViewData.IsHScrollMode();
+ sal_Bool bTabControl = aViewData.IsTabMode();
+ sal_Bool bHeaders = aViewData.IsHeaderMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
// Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode();
if ( eMode == SCROLLING_NO )
- bHScroll = bVScroll = FALSE;
+ bHScroll = bVScroll = false;
else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ???
- bHScroll = bVScroll = TRUE;
+ bHScroll = bVScroll = sal_True;
if ( aViewData.GetDocShell()->IsPreview() )
- bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = FALSE;
+ bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = false;
long nBarX = 0;
long nBarY = 0;
@@ -820,40 +820,40 @@ void ScTabView::UpdateVarZoom()
SvxZoomType eZoomType = GetZoomType();
if ( eZoomType != SVX_ZOOM_PERCENT && !bInZoomUpdate )
{
- bInZoomUpdate = TRUE;
+ bInZoomUpdate = sal_True;
const Fraction& rOldX = GetViewData()->GetZoomX();
const Fraction& rOldY = GetViewData()->GetZoomY();
long nOldPercent = ( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator();
- USHORT nNewZoom = CalcZoom( eZoomType, (USHORT)nOldPercent );
+ sal_uInt16 nNewZoom = CalcZoom( eZoomType, (sal_uInt16)nOldPercent );
Fraction aNew( nNewZoom, 100 );
if ( aNew != rOldX || aNew != rOldY )
{
- SetZoom( aNew, aNew, FALSE ); // always separately per sheet
+ SetZoom( aNew, aNew, false ); // always separately per sheet
PaintGrid();
PaintTop();
PaintLeft();
aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
}
- bInZoomUpdate = FALSE;
+ bInZoomUpdate = false;
}
}
void ScTabView::UpdateFixPos()
{
- BOOL bResize = FALSE;
+ sal_Bool bResize = false;
if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixX())
- bResize = TRUE;
+ bResize = sal_True;
if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixY())
- bResize = TRUE;
+ bResize = sal_True;
if (bResize)
- RepeatResize(FALSE);
+ RepeatResize(false);
}
-void ScTabView::RepeatResize( BOOL bUpdateFix )
+void ScTabView::RepeatResize( sal_Bool bUpdateFix )
{
if ( bUpdateFix )
{
@@ -879,12 +879,12 @@ void ScTabView::RepeatResize( BOOL bUpdateFix )
void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ )
{
- BOOL bScrollBars = aViewData.IsVScrollMode();
- BOOL bHeaders = aViewData.IsHeaderMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bScrollBars = aViewData.IsVScrollMode();
+ sal_Bool bHeaders = aViewData.IsHeaderMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
rBorder = SvBorder();
@@ -912,14 +912,14 @@ void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ )
IMPL_LINK( ScTabView, TabBarResize, void*, EMPTYARG )
{
- BOOL bHScrollMode = aViewData.IsHScrollMode();
+ sal_Bool bHScrollMode = aViewData.IsHScrollMode();
// Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode();
if ( eMode == SCROLLING_NO )
- bHScrollMode = FALSE;
+ bHScrollMode = false;
else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ???
- bHScrollMode = TRUE;
+ bHScrollMode = sal_True;
if( bHScrollMode )
{
@@ -1001,7 +1001,7 @@ Window* ScTabView::GetWindowByPos( ScSplitPos ePos )
void ScTabView::SetActivePointer( const Pointer& rPointer )
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetPointer( rPointer );
}
@@ -1018,7 +1018,7 @@ void ScTabView::ActiveGrabFocus()
ScSplitPos ScTabView::FindWindow( Window* pWindow ) const
{
ScSplitPos eVal = SC_SPLIT_BOTTOMLEFT; // Default
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] == pWindow )
eVal = (ScSplitPos) i;
@@ -1031,10 +1031,10 @@ Point ScTabView::GetGridOffset() const
// Groessen hier wie in DoResize
- BOOL bHeaders = aViewData.IsHeaderMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bHeaders = aViewData.IsHeaderMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
// Outline-Controls
if (bVOutline && pRowOutline[SC_SPLIT_BOTTOM])
@@ -1055,11 +1055,11 @@ Point ScTabView::GetGridOffset() const
// --- Scroll-Bars --------------------------------------------------------
-BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
+sal_Bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
{
HideNoteMarker();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const CommandWheelData* pData = rCEvt.GetWheelData();
if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM )
{
@@ -1080,7 +1080,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
{
// scroll wheel doesn't set the AppOptions default
- BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
+ sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom );
Fraction aFract( nNew, 100 );
SetZoom( aFract, aFract, bSyncZoom );
@@ -1091,7 +1091,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
aViewData.GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
else
@@ -1108,7 +1108,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
{
- BOOL bOnlineScroll = TRUE; //! Optionen
+ sal_Bool bOnlineScroll = sal_True; //! Optionen
if ( bDragging )
{
@@ -1124,7 +1124,7 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
if ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight )
{
- BOOL bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL();
+ sal_Bool bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL();
ScHSplitPos eWhich = (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT;
long nDelta = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin - aViewData.GetPosX(eWhich);
if (nDelta) ScrollX( nDelta, eWhich );
@@ -1132,20 +1132,20 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
else // VScroll...
{
ScVSplitPos eWhich = (pScroll == &aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM;
- long nDelta = GetScrollBarPos( *pScroll, FALSE ) + nScrollMin - aViewData.GetPosY(eWhich);
+ long nDelta = GetScrollBarPos( *pScroll, false ) + nScrollMin - aViewData.GetPosY(eWhich);
if (nDelta) ScrollY( nDelta, eWhich );
}
}
- bDragging = FALSE;
+ bDragging = false;
}
return 0;
}
IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
{
- BOOL bOnlineScroll = TRUE; //! Optionen
+ sal_Bool bOnlineScroll = sal_True; //! Optionen
- BOOL bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight );
+ sal_Bool bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight );
long nViewPos;
if ( bHoriz )
nViewPos = aViewData.GetPosX( (pScroll == &aHScrollLeft) ?
@@ -1154,15 +1154,15 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
nViewPos = aViewData.GetPosY( (pScroll == &aVScrollTop) ?
SC_SPLIT_TOP : SC_SPLIT_BOTTOM );
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
- BOOL bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL());
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL());
ScrollType eType = pScroll->GetType();
if ( eType == SCROLL_DRAG )
{
if (!bDragging)
{
- bDragging = TRUE;
+ bDragging = sal_True;
nPrevDragPos = nViewPos;
}
@@ -1197,7 +1197,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
String aHelpStr;
Rectangle aRect;
- USHORT nAlign;
+ sal_uInt16 nAlign;
if (bHoriz)
{
aHelpStr = ScGlobal::GetRscString(STR_COLUMN);
@@ -1300,7 +1300,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
if (nDelta)
{
- BOOL bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern
+ sal_Bool bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern
if ( bHoriz )
ScrollX( nDelta, (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT, bUpdate );
else
@@ -1311,9 +1311,9 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
return 0;
}
-void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars )
+void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars )
{
- BOOL bHasHint = ( pInputHintWindow != NULL );
+ sal_Bool bHasHint = ( pInputHintWindow != NULL );
if (bHasHint)
RemoveHintWindow();
@@ -1400,9 +1400,9 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars )
TestHintWindow(); // neu positionieren
}
-void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars )
+void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars )
{
- BOOL bHasHint = ( pInputHintWindow != NULL );
+ sal_Bool bHasHint = ( pInputHintWindow != NULL );
if (bHasHint)
RemoveHintWindow();
@@ -1560,7 +1560,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
if ( nWidth != pRowBar[SC_SPLIT_BOTTOM]->GetWidth() && !bInUpdateHeader )
{
- bInUpdateHeader = TRUE;
+ bInUpdateHeader = sal_True;
pRowBar[SC_SPLIT_BOTTOM]->SetWidth( nWidth );
if (pRowBar[SC_SPLIT_TOP])
@@ -1571,11 +1571,11 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
// auf VCL gibt's Update ohne Ende (jedes Update gilt fuer alle Fenster)
//aCornerButton.Update(); // der bekommt sonst nie ein Update
- bInUpdateHeader = FALSE;
+ bInUpdateHeader = false;
}
}
-inline void ShowHide( Window* pWin, BOOL bShow )
+inline void ShowHide( Window* pWin, sal_Bool bShow )
{
DBG_ASSERT(pWin || !bShow, "Fenster ist nicht da");
if (pWin)
@@ -1584,26 +1584,26 @@ inline void ShowHide( Window* pWin, BOOL bShow )
void ScTabView::UpdateShow()
{
- BOOL bHScrollMode = aViewData.IsHScrollMode();
- BOOL bVScrollMode = aViewData.IsVScrollMode();
- BOOL bTabMode = aViewData.IsTabMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
- BOOL bHeader = aViewData.IsHeaderMode();
+ sal_Bool bHScrollMode = aViewData.IsHScrollMode();
+ sal_Bool bVScrollMode = aViewData.IsVScrollMode();
+ sal_Bool bTabMode = aViewData.IsTabMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bHeader = aViewData.IsHeaderMode();
- BOOL bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
- BOOL bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
// Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode();
if ( eMode == SCROLLING_NO )
- bHScrollMode = bVScrollMode = FALSE;
+ bHScrollMode = bVScrollMode = false;
else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ???
- bHScrollMode = bVScrollMode = TRUE;
+ bHScrollMode = bVScrollMode = sal_True;
if ( aViewData.GetDocShell()->IsPreview() )
- bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = FALSE;
+ bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = false;
//
// Windows anlegen
@@ -1696,7 +1696,7 @@ IMPL_LINK( ScTabView, SplitHdl, Splitter*, pSplitter )
DoVSplit( pVSplitter->GetSplitPosPixel() );
if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX || aViewData.GetVSplitMode() == SC_SPLIT_FIX )
- FreezeSplitters( TRUE );
+ FreezeSplitters( sal_True );
DoResize( aBorderPos, aFrameSize );
@@ -1708,7 +1708,7 @@ void ScTabView::DoHSplit(long nSplitPos)
// nSplitPos is the real pixel position on the frame window,
// mirroring for RTL has to be done here.
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
if ( bLayoutRTL )
nSplitPos = pFrameWin->GetOutputSizePixel().Width() - nSplitPos - 1;
@@ -1748,7 +1748,7 @@ void ScTabView::DoHSplit(long nSplitPos)
long nLeftWidth = nSplitPos - pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width();
if ( nLeftWidth < 0 ) nLeftWidth = 0;
nNewDelta = nOldDelta + aViewData.CellsAtX( nOldDelta, 1, SC_SPLIT_LEFT,
- (USHORT) nLeftWidth );
+ (sal_uInt16) nLeftWidth );
if ( nNewDelta > MAXCOL )
nNewDelta = MAXCOL;
aViewData.SetPosX( SC_SPLIT_RIGHT, nNewDelta );
@@ -1762,7 +1762,7 @@ void ScTabView::DoHSplit(long nSplitPos)
// Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
@@ -1820,7 +1820,7 @@ void ScTabView::DoVSplit(long nSplitPos)
long nTopHeight = nSplitPos - pColBar[SC_SPLIT_LEFT]->GetSizePixel().Height();
if ( nTopHeight < 0 ) nTopHeight = 0;
nNewDelta = nOldDelta + aViewData.CellsAtY( nOldDelta, 1, SC_SPLIT_TOP,
- (USHORT) nTopHeight );
+ (sal_uInt16) nTopHeight );
if ( nNewDelta > MAXROW )
nNewDelta = MAXROW;
aViewData.SetPosY( SC_SPLIT_BOTTOM, nNewDelta );
@@ -1834,7 +1834,7 @@ void ScTabView::DoVSplit(long nSplitPos)
// Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
@@ -1890,7 +1890,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
long nDocX = (long)( (double) pDoc->GetColOffset( MAXCOL + 1, nTab ) * HMM_PER_TWIPS ) * nLayoutSign;
@@ -2008,7 +2008,7 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
bool bCenterHor = false;
@@ -2067,13 +2067,13 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL
return aRet;
}
-void ScTabView::LockModifiers( USHORT nModifiers )
+void ScTabView::LockModifiers( sal_uInt16 nModifiers )
{
pSelEngine->LockModifiers( nModifiers );
pHdrSelEng->LockModifiers( nModifiers );
}
-USHORT ScTabView::GetLockedModifiers() const
+sal_uInt16 ScTabView::GetLockedModifiers() const
{
return pSelEngine->GetLockedModifiers();
}
@@ -2089,7 +2089,7 @@ Point ScTabView::GetMousePosPixel()
return aPos;
}
-BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin )
+sal_Bool lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin )
{
if (pWin)
{
@@ -2100,18 +2100,18 @@ BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin )
Size aWinSize = pWin->GetOutputSizePixel();
if ( aRel.X() >= 0 && aRel.X() < aWinSize.Width() + SPLIT_HANDLE_SIZE &&
aRel.Y() >= 0 && aRel.Y() < aWinSize.Height() + SPLIT_HANDLE_SIZE )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScTabView::SnapSplitPos( Point& rScreenPosPixel )
{
- BOOL bOverWin = FALSE;
- USHORT i;
+ sal_Bool bOverWin = false;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (lcl_MouseIsOverWin(rScreenPosPixel,pGridWin[i]))
- bOverWin = TRUE;
+ bOverWin = sal_True;
if (!bOverWin)
return;
@@ -2135,19 +2135,19 @@ void ScTabView::SnapSplitPos( Point& rScreenPosPixel )
SCsCOL nPosX;
SCsROW nPosY;
// bNextIfLarge=FALSE: nicht auf naechste Zelle, wenn ausserhalb des Fensters
- aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, TRUE, FALSE, FALSE );
- BOOL bLeft;
- BOOL bTop;
+ aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, true, false, false );
+ sal_Bool bLeft;
+ sal_Bool bTop;
aViewData.GetMouseQuadrant( aMouse, ePos, nPosX, nPosY, bLeft, bTop );
if (!bLeft)
++nPosX;
if (!bTop)
++nPosY;
- aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE );
+ aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True );
rScreenPosPixel = pWin->OutputToNormalizedScreenPixel( aMouse );
}
-void ScTabView::FreezeSplitters( BOOL bFreeze )
+void ScTabView::FreezeSplitters( sal_Bool bFreeze )
{
ScSplitMode eOldH = aViewData.GetHSplitMode();
ScSplitMode eOldV = aViewData.GetVSplitMode();
@@ -2157,7 +2157,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
ePos = SC_SPLIT_TOPLEFT;
Window* pWin = pGridWin[ePos];
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
if ( bFreeze )
{
@@ -2179,8 +2179,8 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
aSplit.Y() = aViewData.GetVSplitPos() - aWinStart.Y();
aViewData.GetPosFromPixel( aSplit.X(), aSplit.Y(), ePos, nPosX, nPosY );
- BOOL bLeft;
- BOOL bTop;
+ sal_Bool bLeft;
+ sal_Bool bTop;
aViewData.GetMouseQuadrant( aSplit, ePos, nPosX, nPosY, bLeft, bTop );
if (!bLeft)
++nPosX;
@@ -2207,7 +2207,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
nBottomPos = aViewData.GetPosY(SC_SPLIT_BOTTOM);
}
- aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE );
+ aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True );
if (nPosX > aViewData.GetPosX(SC_SPLIT_LEFT)) // (aSplit.X() > 0) doesn't work for RTL
{
long nSplitPos = aSplit.X() + aWinStart.X();
@@ -2245,12 +2245,12 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
// Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
- RepeatResize(FALSE);
+ RepeatResize(false);
UpdateShow();
PaintLeft();
@@ -2281,7 +2281,7 @@ void ScTabView::SplitAtCursor()
SCCOL nPosX = aViewData.GetCurX();
SCROW nPosY = aViewData.GetCurY();
- Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, TRUE );
+ Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, sal_True );
if ( nPosX > 0 )
DoHSplit( aSplit.X() + aWinStart.X() );
else
@@ -2293,7 +2293,7 @@ void ScTabView::SplitAtCursor()
RepeatResize();
}
-void ScTabView::SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer ) // fuer API
+void ScTabView::SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer ) // fuer API
{
// Pixel ist auf die ganze View bezogen, nicht auf das erste GridWin
@@ -2330,7 +2330,7 @@ void ScTabView::SetNewVisArea()
// (auch wenn ansonsten der Edit-MapMode gesetzt ist)
MapMode aOldMode[4];
MapMode aDrawMode[4];
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
{
@@ -2380,7 +2380,7 @@ sal_Bool ScTabView::HasPageFieldDataAtCursor() const
if (pWin)
return pWin->GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE;
- return sal_False;
+ return false;
}
void ScTabView::StartDataSelect()
@@ -2417,7 +2417,7 @@ void ScTabView::StartDataSelect()
pWin->DoAutoFilterMenue(nCol, nRow, !pAttr->HasAutoFilter());
}
-void ScTabView::EnableRefInput(BOOL bFlag)
+void ScTabView::EnableRefInput(sal_Bool bFlag)
{
aHScrollLeft.EnableInput(bFlag);
aHScrollRight.EnableInput(bFlag);
@@ -2427,20 +2427,20 @@ void ScTabView::EnableRefInput(BOOL bFlag)
// ab hier dynamisch angelegte
- if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,TRUE);
+ if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,sal_True);
if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=NULL)
- pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,false);
if(pGridWin[SC_SPLIT_BOTTOMRIGHT]!=NULL)
- pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,false);
if(pGridWin[SC_SPLIT_TOPLEFT]!=NULL)
- pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,false);
if(pGridWin[SC_SPLIT_TOPRIGHT]!=NULL)
- pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,false);
if(pColBar[SC_SPLIT_RIGHT]!=NULL)
- pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,FALSE);
+ pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,false);
if(pRowBar[SC_SPLIT_TOP]!=NULL)
- pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,FALSE);
+ pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,false);
}
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 76b820cb3fbf..160945c72864 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -73,8 +73,8 @@ void ScTabView::PaintMarks(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
if (!ValidCol(nEndCol)) nEndCol = MAXCOL;
if (!ValidRow(nEndRow)) nEndRow = MAXROW;
- BOOL bLeft = (nStartCol==0 && nEndCol==MAXCOL);
- BOOL bTop = (nStartRow==0 && nEndRow==MAXROW);
+ sal_Bool bLeft = (nStartCol==0 && nEndCol==MAXCOL);
+ sal_Bool bTop = (nStartRow==0 && nEndRow==MAXROW);
if (bLeft)
PaintLeftArea( nStartRow, nEndRow );
@@ -86,7 +86,7 @@ void ScTabView::PaintMarks(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
PaintArea( nStartCol, nStartRow, nEndCol, nEndRow, SC_UPDATE_MARKS );
}
-BOOL ScTabView::IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScTabView::IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
return bIsBlockMode
&& nBlockStartX == nCol
@@ -102,7 +102,7 @@ void ScTabView::InitOwnBlockMode()
ScMarkData& rMark = aViewData.GetMarkData();
if (!rMark.IsMarked() && !rMark.IsMultiMarked())
- GetSelEngine()->CursorPosChanging( FALSE, FALSE );
+ GetSelEngine()->CursorPosChanging( false, false );
bIsBlockMode = SC_BLOCKMODE_OWN; //! Variable umbenennen!
nBlockStartX = 0;
@@ -117,7 +117,7 @@ void ScTabView::InitOwnBlockMode()
}
void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bTestNeg, BOOL bCols, BOOL bRows )
+ sal_Bool bTestNeg, sal_Bool bCols, sal_Bool bRows )
{
if (!bIsBlockMode)
{
@@ -138,7 +138,7 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
bBlockNeg = rMark.IsCellMarked( nCurX, nCurY );
}
else
- bBlockNeg = FALSE;
+ bBlockNeg = false;
rMark.SetMarkNegative(bBlockNeg);
bIsBlockMode = SC_BLOCKMODE_NORMAL; //! Variable umbenennen!
@@ -169,7 +169,7 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
}
}
-void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE
+void ScTabView::DoneBlockMode( sal_Bool bContinue ) // Default FALSE
{
// Wenn zwischen Tabellen- und Header SelectionEngine gewechselt wird,
// wird evtl. DeselectAll gerufen, weil die andere Engine keinen Anker hat.
@@ -178,8 +178,8 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE
if (bIsBlockMode && !bMoveIsShift)
{
ScMarkData& rMark = aViewData.GetMarkData();
- BOOL bFlag = rMark.GetMarkingFlag();
- rMark.SetMarking(FALSE);
+ sal_Bool bFlag = rMark.GetMarkingFlag();
+ rMark.SetMarking(false);
if (bBlockNeg && !bContinue)
rMark.MarkToMulti();
@@ -195,19 +195,19 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE
SCTAB nTab = aViewData.GetTabNo();
ScDocument* pDoc = aViewData.GetDocument();
if ( pDoc->HasTable(nTab) )
- PaintBlock( TRUE ); // TRUE -> Block loeschen
+ PaintBlock( sal_True ); // sal_True -> Block loeschen
else
rMark.ResetMark();
}
bIsBlockMode = SC_BLOCKMODE_NONE; //! Variable umbenennen!
rMark.SetMarking(bFlag);
- rMark.SetMarkNegative(FALSE);
+ rMark.SetMarkNegative(false);
}
}
void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bCols, BOOL bRows, BOOL bCellSelection )
+ sal_Bool bCols, sal_Bool bRows, sal_Bool bCellSelection )
{
if (!ValidCol(nCurX)) nCurX = MAXCOL;
if (!ValidRow(nCurY)) nCurY = MAXROW;
@@ -215,7 +215,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
if (!bIsBlockMode)
{
OSL_FAIL( "MarkCursor nicht im BlockMode" );
- InitBlockMode( nCurX, nCurY, nCurZ, FALSE, bCols, bRows );
+ InitBlockMode( nCurX, nCurY, nCurZ, false, bCols, bRows );
}
if (bCols)
@@ -235,9 +235,9 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
// (z.B. MarkToSimple, wenn per negativ alles bis auf ein Rechteck geloescht wurde)
// oder nach InitOwnBlockMode wird mit Shift-Klick weitermarkiert...
- BOOL bOldShift = bMoveIsShift;
- bMoveIsShift = FALSE; // wirklich umsetzen
- DoneBlockMode(FALSE); //! direkt Variablen setzen? (-> kein Geflacker)
+ sal_Bool bOldShift = bMoveIsShift;
+ bMoveIsShift = false; // wirklich umsetzen
+ DoneBlockMode(false); //! direkt Variablen setzen? (-> kein Geflacker)
bMoveIsShift = bOldShift;
InitBlockMode( aMarkRange.aStart.Col(), aMarkRange.aStart.Row(),
@@ -264,7 +264,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
SCsCOL nBlockStartXOffset = 0;
SCsROW nCurYOffset = 0;
SCsROW nBlockStartYOffset = 0;
- BOOL bBlockStartMerged = FALSE;
+ sal_Bool bBlockStartMerged = false;
const ScMergeAttr* pMergeAttr = NULL;
ScDocument* pDocument = aViewData.GetDocument();
@@ -290,7 +290,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
nBlockStartXOrig - nCurX + nColSpan - 1 : 0;
nCurYOffset = nCurY >= nBlockStartYOrig && nCurY < nBlockStartYOrig + nRowSpan - 1 ?
nBlockStartYOrig - nCurY + nRowSpan - 1 : 0;
- bBlockStartMerged = TRUE;
+ bBlockStartMerged = sal_True;
}
}
@@ -365,7 +365,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
}
if ( !bCols && !bRows )
- aHdrFunc.SetAnchorFlag( FALSE );
+ aHdrFunc.SetAnchorFlag( false );
}
void ScTabView::GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPageX, SCsROW& rPageY)
@@ -813,21 +813,21 @@ void ScTabView::UpdateCopySourceOverlay()
void ScTabView::UpdateSelectionOverlay()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateSelectionOverlay();
}
void ScTabView::UpdateShrinkOverlay()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateShrinkOverlay();
}
void ScTabView::UpdateAllOverlays()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateAllOverlays();
}
@@ -836,20 +836,20 @@ void ScTabView::UpdateAllOverlays()
//! PaintBlock in zwei Methoden aufteilen: RepaintBlock und RemoveBlock o.ae.
//!
-void ScTabView::PaintBlock( BOOL bReset )
+void ScTabView::PaintBlock( sal_Bool bReset )
{
ScMarkData& rMark = aViewData.GetMarkData();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bMark = rMark.IsMarked();
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMark = rMark.IsMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if (bMark || bMulti)
{
ScRange aMarkRange;
HideAllCursors();
if (bMulti)
{
- BOOL bFlag = rMark.GetMarkingFlag();
- rMark.SetMarking(FALSE);
+ sal_Bool bFlag = rMark.GetMarkingFlag();
+ rMark.SetMarking(false);
rMark.MarkToMulti();
rMark.GetMultiMarkArea(aMarkRange);
rMark.MarkToSimple();
@@ -867,7 +867,7 @@ void ScTabView::PaintBlock( BOOL bReset )
nBlockEndY = aMarkRange.aEnd.Row();
nBlockEndZ = aMarkRange.aEnd.Tab();
- BOOL bDidReset = FALSE;
+ sal_Bool bDidReset = false;
if ( nTab>=nBlockStartZ && nTab<=nBlockEndZ )
{
@@ -878,7 +878,7 @@ void ScTabView::PaintBlock( BOOL bReset )
{
rMark.ResetMark();
UpdateSelectionOverlay();
- bDidReset = TRUE;
+ bDidReset = true;
}
}
else
@@ -892,7 +892,7 @@ void ScTabView::PaintBlock( BOOL bReset )
}
}
-void ScTabView::SelectAll( BOOL bContinue )
+void ScTabView::SelectAll( sal_Bool bContinue )
{
ScMarkData& rMark = aViewData.GetMarkData();
SCTAB nTab = aViewData.GetTabNo();
@@ -921,7 +921,7 @@ void ScTabView::SelectAllTables()
if (nCount>1)
{
for (SCTAB i=0; i<nCount; i++)
- rMark.SelectTable( i, TRUE );
+ rMark.SelectTable( i, sal_True );
aViewData.GetDocShell()->PostPaintExtras();
SfxBindings& rBind = aViewData.GetBindings();
@@ -946,7 +946,7 @@ void ScTabView::DeselectAllTables()
rBind.Invalidate( FID_TAB_DESELECTALL );
}
-BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom,
+sal_Bool lcl_FitsInWindow( double fScaleX, double fScaleY, sal_uInt16 nZoom,
long nWindowX, long nWindowY, ScDocument* pDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCCOL nFixPosX, SCROW nFixPosY )
@@ -960,22 +960,22 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom,
for (nCol=0; nCol<nFixPosX; nCol++)
{
// for frozen panes, add both parts
- USHORT nColTwips = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nColTwips = pDoc->GetColWidth( nCol, nTab );
if (nColTwips)
{
nBlockX += (long)(nColTwips * fScaleX);
if (nBlockX > nWindowX)
- return FALSE;
+ return false;
}
}
for (nCol=nStartCol; nCol<=nEndCol; nCol++)
{
- USHORT nColTwips = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nColTwips = pDoc->GetColWidth( nCol, nTab );
if (nColTwips)
{
nBlockX += (long)(nColTwips * fScaleX);
if (nBlockX > nWindowX)
- return FALSE;
+ return false;
}
}
@@ -986,31 +986,31 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom,
continue;
// for frozen panes, add both parts
- USHORT nRowTwips = pDoc->GetRowHeight(nRow, nTab);
+ sal_uInt16 nRowTwips = pDoc->GetRowHeight(nRow, nTab);
if (nRowTwips)
{
nBlockY += (long)(nRowTwips * fScaleY);
if (nBlockY > nWindowY)
- return FALSE;
+ return false;
}
}
for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
{
- USHORT nRowTwips = pDoc->GetRowHeight(nRow, nTab);
+ sal_uInt16 nRowTwips = pDoc->GetRowHeight(nRow, nTab);
if (nRowTwips)
{
nBlockY += (long)(nRowTwips * fScaleY);
if (nBlockY > nWindowY)
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return sal_True;
}
-USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
+sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
{
- USHORT nZoom = 0; // Ergebnis
+ sal_uInt16 nZoom = 0; // Ergebnis
switch ( eType )
{
@@ -1081,11 +1081,11 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
double nPPTX = ScGlobal::nScreenPPTX / pDocSh->GetOutputFactor();
double nPPTY = ScGlobal::nScreenPPTY;
- USHORT nMin = MINZOOM;
- USHORT nMax = MAXZOOM;
+ sal_uInt16 nMin = MINZOOM;
+ sal_uInt16 nMax = MAXZOOM;
while ( nMax > nMin )
{
- USHORT nTest = (nMin+nMax+1)/2;
+ sal_uInt16 nTest = (nMin+nMax+1)/2;
if ( lcl_FitsInWindow(
nPPTX, nPPTY, nTest, aWinSize.Width(), aWinSize.Height(),
pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow,
@@ -1127,7 +1127,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
if ( pStyleSheet )
{
ScPrintFunc aPrintFunc( aViewData.GetDocShell(),
- aViewData.GetViewShell()->GetPrinter(TRUE),
+ aViewData.GetViewShell()->GetPrinter(sal_True),
nCurTab );
Size aPageSize = aPrintFunc.GetDataSize();
@@ -1183,7 +1183,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
if (eType == SVX_ZOOM_WHOLEPAGE && nZoomY < nNew)
nNew = nZoomY;
- nZoom = (USHORT) nNew;
+ nZoom = (sal_uInt16) nNew;
}
}
break;
@@ -1215,7 +1215,7 @@ void ScTabView::StopMarking()
void ScTabView::HideNoteMarker()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i] && pGridWin[i]->IsVisible())
pGridWin[i]->HideNoteMarker();
}
@@ -1240,7 +1240,7 @@ void ScTabView::MakeDrawLayer()
}
}
-void ScTabView::ErrorMessage( USHORT nGlobStrId )
+void ScTabView::ErrorMessage( sal_uInt16 nGlobStrId )
{
if ( SC_MOD()->IsInExecuteDrop() )
{
@@ -1252,7 +1252,7 @@ void ScTabView::ErrorMessage( USHORT nGlobStrId )
Window* pParent = aViewData.GetDialogParent();
ScWaitCursorOff aWaitOff( pParent );
- BOOL bFocus = pParent && pParent->HasFocus();
+ sal_Bool bFocus = pParent && pParent->HasFocus();
if(nGlobStrId==STR_PROTECTIONERR)
{
@@ -1268,7 +1268,7 @@ void ScTabView::ErrorMessage( USHORT nGlobStrId )
pParent->GrabFocus();
}
-Window* ScTabView::GetParentOrChild( USHORT nChildId )
+Window* ScTabView::GetParentOrChild( sal_uInt16 nChildId )
{
SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame();
@@ -1286,7 +1286,7 @@ Window* ScTabView::GetParentOrChild( USHORT nChildId )
return aViewData.GetDialogParent();
}
-void ScTabView::UpdatePageBreakData( BOOL bForcePaint )
+void ScTabView::UpdatePageBreakData( sal_Bool bForcePaint )
{
ScPageBreakData* pNewData = NULL;
@@ -1296,7 +1296,7 @@ void ScTabView::UpdatePageBreakData( BOOL bForcePaint )
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- USHORT nCount = pDoc->GetPrintRangeCount(nTab);
+ sal_uInt16 nCount = pDoc->GetPrintRangeCount(nTab);
if (!nCount)
nCount = 1;
pNewData = new ScPageBreakData(nCount);
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 89d39e290d88..28dab73660f6 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -116,17 +116,17 @@ using namespace com::sun::star;
// --- Public-Funktionen
//
-void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl )
+void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bControl )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
pDoc->SkipOverlapped(nPosX, nPosY, nTab);
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if ( bRefMode )
{
- DoneRefMode( FALSE );
+ DoneRefMode( false );
if (bControl)
SC_MOD()->AddRefEntry();
@@ -145,9 +145,9 @@ void ScTabView::UpdateAutoFillMark()
{
// single selection or cursor
ScRange aMarkRange;
- BOOL bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
+ sal_Bool bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i] && pGridWin[i]->IsVisible())
pGridWin[i]->UpdateAutoFillMark( bMarked, aMarkRange );
@@ -173,7 +173,7 @@ void ScTabView::FakeButtonUp( ScSplitPos eWhich )
void ScTabView::HideAllCursors()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
{
@@ -187,7 +187,7 @@ void ScTabView::HideAllCursors()
void ScTabView::ShowAllCursors()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
{
@@ -279,7 +279,7 @@ void ScTabView::InvalidateAttribs()
#pragma optimize ( "", off )
#endif
-void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, BOOL bNew )
+void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bNew )
{
SCCOL nOldX = aViewData.GetCurX();
SCROW nOldY = aViewData.GetCurY();
@@ -453,7 +453,7 @@ void ScTabView::SelectionChanged()
void ScTabView::CursorPosChanged()
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if ( !bRefMode ) // Abfrage, damit RefMode bei Tabellenwechsel funktioniert
aViewData.GetDocShell()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
@@ -475,7 +475,7 @@ void ScTabView::TestHintWindow()
{
// show input help window and list drop-down button for validity
- BOOL bListValButton = FALSE;
+ sal_Bool bListValButton = false;
ScAddress aListValPos;
ScDocument* pDoc = aViewData.GetDocument();
@@ -557,13 +557,13 @@ void ScTabView::TestHintWindow()
if ( pData && pData->HasSelectionList() )
{
aListValPos.Set( aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo() );
- bListValButton = TRUE;
+ bListValButton = sal_True;
}
}
else
DELETEZ(pInputHintWindow);
- for ( USHORT i=0; i<4; i++ )
+ for ( sal_uInt16 i=0; i<4; i++ )
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateListValPos( bListValButton, aListValPos );
}
@@ -620,8 +620,8 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
ScSplitPos eActive = aViewData.GetActivePart();
ScHSplitPos eActiveX = WhichH(eActive);
ScVSplitPos eActiveY = WhichV(eActive);
- BOOL bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX);
- BOOL bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX);
+ sal_Bool bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX);
+ sal_Bool bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX);
if (bHFix)
if (eActiveX == SC_SPLIT_LEFT && nCurX >= (SCsCOL)aViewData.GetFixPosX())
{
@@ -665,7 +665,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
long nSpaceY = ( aScrSize.Height() - nCellSizeY ) / 2;
// nSpaceY: desired start position of cell for FOLLOW_JUMP, modified if dialog interferes
- BOOL bForceNew = FALSE; // force new calculation of JUMP position (vertical only)
+ sal_Bool bForceNew = false; // force new calculation of JUMP position (vertical only)
// VisibleCellsY == CellsAtY( GetPosY( eWhichY ), 1, eWhichY )
@@ -680,7 +680,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
Window* pCare = lcl_GetCareWin( aViewData.GetViewShell()->GetViewFrame() );
if (pCare)
{
- BOOL bLimit = FALSE;
+ sal_Bool bLimit = false;
Rectangle aDlgPixel;
Size aWinSize;
Window* pWin = GetActiveWin();
@@ -693,7 +693,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
{
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX ||
nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
- bLimit = TRUE; // es wird sowieso gescrollt
+ bLimit = sal_True; // es wird sowieso gescrollt
else
{
// Cursor ist auf dem Bildschirm
@@ -702,14 +702,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
aViewData.GetMergeSizePixel( nCurX, nCurY, nCSX, nCSY );
Rectangle aCursor( aStart, Size( nCSX, nCSY ) );
if ( aCursor.IsOver( aDlgPixel ) )
- bLimit = TRUE; // Zelle vom Dialog ueberdeckt
+ bLimit = sal_True; // Zelle vom Dialog ueberdeckt
}
}
}
if (bLimit)
{
- BOOL bBottom = FALSE;
+ sal_Bool bBottom = false;
long nTopSpace = aDlgPixel.Top();
long nBotSpace = aWinSize.Height() - aDlgPixel.Bottom();
if ( nBotSpace > 0 && nBotSpace > nTopSpace )
@@ -724,14 +724,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurY >= nDiff ) // Pos. kann nicht negativ werden
{
nSpaceY = nDlgBot + ( nBotSpace - nCellSizeY ) / 2;
- bBottom = TRUE;
- bForceNew = TRUE;
+ bBottom = sal_True;
+ bForceNew = sal_True;
}
}
if ( !bBottom && nTopSpace > 0 )
{
nSpaceY = ( nTopSpace - nCellSizeY ) / 2;
- bForceNew = TRUE;
+ bForceNew = sal_True;
}
}
}
@@ -740,39 +740,41 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
SCsCOL nNewDeltaX = nDeltaX;
SCsROW nNewDeltaY = nDeltaY;
- BOOL bDoLine = FALSE;
+ sal_Bool bDoLine = false;
switch (eMode)
{
case SC_FOLLOW_JUMP:
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
{
- nNewDeltaX = nCurX - static_cast<SCsCOL>(aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<USHORT>(nSpaceX) ));
+ nNewDeltaX = nCurX - static_cast<SCsCOL>(aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<sal_uInt16>(nSpaceX) ));
if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY || bForceNew )
{
- nNewDeltaY = nCurY - static_cast<SCsROW>(aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<USHORT>(nSpaceY) ));
+ nNewDeltaY = nCurY - static_cast<SCsROW>(aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<sal_uInt16>(nSpaceY) ));
if (nNewDeltaY < 0) nNewDeltaY = 0;
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
- bDoLine = TRUE;
+ bDoLine = sal_True;
break;
case SC_FOLLOW_LINE:
- bDoLine = TRUE;
+ bDoLine = sal_True;
break;
case SC_FOLLOW_FIX:
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
{
nNewDeltaX = nDeltaX + nCurX - aViewData.GetCurX();
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
{
nNewDeltaY = nDeltaY + nCurY - aViewData.GetCurY();
+ if (nNewDeltaY < 0) nNewDeltaY = 0;
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
@@ -781,7 +783,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurX < nNewDeltaX || nCurX >= nNewDeltaX+nSizeX )
{
nNewDeltaX = nCurX - (nSizeX / 2);
- if (nNewDeltaX < 0) nNewDeltaY = 0;
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nNewDeltaY || nCurY >= nNewDeltaY+nSizeY )
@@ -791,7 +793,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
- bDoLine = TRUE;
+ bDoLine = sal_True;
break;
case SC_FOLLOW_NONE:
@@ -857,22 +859,22 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
}
}
-BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
// #i3875# *Hack*
- BOOL bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? TRUE : FALSE;
+ sal_Bool bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? sal_True : false;
aViewData.SetSelCtrlMouseClick( rMEvt.IsMod1() || bMod1Locked );
if ( pSelEngine )
{
bMoveIsShift = rMEvt.IsShift();
bRet = pSelEngine->SelMouseButtonDown( rMEvt );
- bMoveIsShift = FALSE;
+ bMoveIsShift = false;
}
- aViewData.SetSelCtrlMouseClick( FALSE ); // #i3875# *Hack*
+ aViewData.SetSelCtrlMouseClick( false ); // #i3875# *Hack*
return bRet;
}
@@ -882,7 +884,7 @@ BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
//
void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
- BOOL bShift, BOOL bControl, BOOL bKeepOld, BOOL bKeepSel )
+ sal_Bool bShift, sal_Bool bControl, sal_Bool bKeepOld, sal_Bool bKeepSel )
{
if (!bKeepOld)
aViewData.ResetOldCursor();
@@ -924,11 +926,11 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
SetMarkData(aData);
}
- BOOL bSame = ( nCurX == aViewData.GetCurX() && nCurY == aViewData.GetCurY() );
+ sal_Bool bSame = ( nCurX == aViewData.GetCurX() && nCurY == aViewData.GetCurY() );
bMoveIsShift = bShift;
pSelEngine->CursorPosChanging( bShift, bControl );
- bMoveIsShift = FALSE;
- aFunctionSet.SetCursorAtCell( nCurX, nCurY, FALSE );
+ bMoveIsShift = false;
+ aFunctionSet.SetCursorAtCell( nCurX, nCurY, false );
// Wenn der Cursor nicht bewegt wurde, muss das SelectionChanged fuer das
// Aufheben der Selektion hier einzeln passieren:
@@ -940,7 +942,7 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
}
void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel )
+ sal_Bool bShift, sal_Bool bKeepSel )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -983,10 +985,10 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
if (nMovY != 0 && VALIDCOLROW(nCurX,nCurY))
SkipCursorVertical(nCurX, nCurY, nOldY, nMovY);
- MoveCursorAbs( nCurX, nCurY, eMode, bShift, FALSE, TRUE, bKeepSel );
+ MoveCursorAbs( nCurX, nCurY, eMode, bShift, false, sal_True, bKeepSel );
}
-void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel )
+void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel )
{
SCsCOL nPageX;
SCsROW nPageY;
@@ -994,7 +996,7 @@ void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
MoveCursorRel( nPageX, nPageY, eMode, bShift, bKeepSel );
}
-void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel )
+void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel )
{
SCsCOL nNewX;
SCsROW nNewY;
@@ -1002,7 +1004,7 @@ void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
MoveCursorRel(nNewX, nNewY, eMode, bShift, bKeepSel);
}
-void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel )
+void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1032,7 +1034,7 @@ void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, B
MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY, eMode, bShift, bKeepSel );
}
-void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift )
+void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1066,15 +1068,15 @@ void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode
aViewData.SetOldCursor( nNewX,nNewY );
pDoc->SkipOverlapped(nNewX, nNewY, nTab);
- MoveCursorAbs( nNewX, nNewY, eMode, bShift, FALSE, TRUE );
+ MoveCursorAbs( nNewX, nNewY, eMode, bShift, false, true );
}
-void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter
+void ScTabView::MoveCursorEnter( sal_Bool bShift ) // bShift -> hoch/runter
{
const ScInputOptions& rOpt = SC_MOD()->GetInputOptions();
if (!rOpt.GetMoveSelection())
{
- aViewData.UpdateInputHandler(TRUE);
+ aViewData.UpdateInputHandler(sal_True);
return;
}
@@ -1107,14 +1109,14 @@ void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter
SCTAB nTab = aViewData.GetTabNo();
ScDocument* pDoc = aViewData.GetDocument();
- pDoc->GetNextPos( nNewX,nNewY, nTab, nMoveX,nMoveY, TRUE,FALSE, rMark );
+ pDoc->GetNextPos( nNewX,nNewY, nTab, nMoveX,nMoveY, sal_True,false, rMark );
MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY,
- SC_FOLLOW_LINE, FALSE, TRUE );
+ SC_FOLLOW_LINE, false, sal_True );
// update input line even if cursor was not moved
if ( nNewX == nCurX && nNewY == nCurY )
- aViewData.UpdateInputHandler(TRUE);
+ aViewData.UpdateInputHandler(sal_True);
}
else
{
@@ -1131,12 +1133,12 @@ void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter
}
}
- MoveCursorRel( nMoveX,nMoveY, SC_FOLLOW_LINE, FALSE );
+ MoveCursorRel( nMoveX,nMoveY, SC_FOLLOW_LINE, false );
}
}
-BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
+sal_Bool ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
{
const KeyCode& rKCode = rKeyEvent.GetKeyCode();
@@ -1145,8 +1147,8 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
(rKCode.IsMod2() ? MOD_BOTH : MOD_CTRL) :
(rKCode.IsMod2() ? MOD_ALT : MOD_NONE);
- BOOL bSel = rKCode.IsShift();
- USHORT nCode = rKCode.GetCode();
+ sal_Bool bSel = rKCode.IsShift();
+ sal_uInt16 nCode = rKCode.GetCode();
// CURSOR keys
SCsCOL nDX = 0;
@@ -1169,8 +1171,8 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
// added to avoid warnings
}
}
- // always TRUE to suppress changes of col/row size (ALT+CURSOR)
- return TRUE;
+ // always sal_True to suppress changes of col/row size (ALT+CURSOR)
+ return sal_True;
}
// PAGEUP/PAGEDOWN
@@ -1187,7 +1189,7 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
// added to avoid warnings
}
}
- return TRUE;
+ return sal_True;
}
// HOME/END
@@ -1204,20 +1206,20 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
// added to avoid warnings
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
// naechste/vorherige nicht geschuetzte Zelle
-void ScTabView::FindNextUnprot( BOOL bShift, BOOL bInSelection )
+void ScTabView::FindNextUnprot( sal_Bool bShift, sal_Bool bInSelection )
{
short nMove = bShift ? -1 : 1;
ScMarkData& rMark = aViewData.GetMarkData();
- BOOL bMarked = bInSelection && (rMark.IsMarked() || rMark.IsMultiMarked());
+ sal_Bool bMarked = bInSelection && (rMark.IsMarked() || rMark.IsMultiMarked());
SCCOL nCurX;
SCROW nCurY;
@@ -1227,14 +1229,14 @@ void ScTabView::FindNextUnprot( BOOL bShift, BOOL bInSelection )
SCTAB nTab = aViewData.GetTabNo();
ScDocument* pDoc = aViewData.GetDocument();
- pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, bMarked,TRUE, rMark );
+ pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, bMarked,sal_True, rMark );
SCCOL nTabCol = aViewData.GetTabStartCol();
if ( nTabCol == SC_TABSTART_NONE )
nTabCol = nCurX; // auf diese Spalte zurueck bei Enter
MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY,
- SC_FOLLOW_LINE, FALSE, TRUE );
+ SC_FOLLOW_LINE, false, sal_True );
// in MoveCursorRel wird die TabCol zurueckgesetzt...
aViewData.SetTabStartCol( nTabCol );
@@ -1294,7 +1296,7 @@ void ScTabView::MarkRows()
SelectionChanged();
}
-void ScTabView::MarkDataArea( BOOL bIncludeCursor )
+void ScTabView::MarkDataArea( sal_Bool bIncludeCursor )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1321,17 +1323,17 @@ void ScTabView::MarkMatrixFormula()
ScRange aMatrix;
if ( pDoc->GetMatrixFormulaRange( aCursor, aMatrix ) )
{
- MarkRange( aMatrix, FALSE ); // cursor is already within the range
+ MarkRange( aMatrix, false ); // cursor is already within the range
}
}
-void ScTabView::MarkRange( const ScRange& rRange, BOOL bSetCursor, BOOL bContinue )
+void ScTabView::MarkRange( const ScRange& rRange, sal_Bool bSetCursor, sal_Bool bContinue )
{
SCTAB nTab = rRange.aStart.Tab();
SetTabNo( nTab );
HideAllCursors();
- DoneBlockMode( bContinue ); // bContinue==TRUE -> clear old mark
+ DoneBlockMode( bContinue ); // bContinue==sal_True -> clear old mark
if (bSetCursor) // Wenn Cursor gesetzt wird, immer auch alignen
{
SCCOL nAlignX = rRange.aStart.Col();
@@ -1369,7 +1371,7 @@ void ScTabView::Unmark()
SCCOL nCurX;
SCROW nCurY;
aViewData.GetMoveCursor( nCurX,nCurY );
- MoveCursorAbs( nCurX, nCurY, SC_FOLLOW_NONE, FALSE, FALSE );
+ MoveCursorAbs( nCurX, nCurY, SC_FOLLOW_NONE, false, false );
SelectionChanged();
}
@@ -1391,7 +1393,7 @@ void ScTabView::MarkDataChanged()
UpdateSelectionOverlay();
}
-void ScTabView::SelectNextTab( short nDir, BOOL bExtendSelection )
+void ScTabView::SelectNextTab( short nDir, sal_Bool bExtendSelection )
{
if (!nDir) return;
DBG_ASSERT( nDir==-1 || nDir==1, "SelectNextTab: falscher Wert");
@@ -1420,14 +1422,14 @@ void ScTabView::SelectNextTab( short nDir, BOOL bExtendSelection )
}
}
- SetTabNo( nTab, FALSE, bExtendSelection );
+ SetTabNo( nTab, false, bExtendSelection );
PaintExtras();
}
// SetTabNo - angezeigte Tabelle
-void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
+void ScTabView::SetTabNo( SCTAB nTab, sal_Bool bNew, sal_Bool bExtendSelection, bool bSameTabButMoved )
{
if ( !ValidTab(nTab) )
{
@@ -1441,7 +1443,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
FmFormShell* pFormSh = aViewData.GetViewShell()->GetFormShell();
if (pFormSh)
{
- BOOL bAllowed = sal::static_int_cast<BOOL>( pFormSh->PrepareClose( TRUE ) );
+ sal_Bool bAllowed = sal::static_int_cast<sal_Bool>( pFormSh->PrepareClose( sal_True ) );
if (!bAllowed)
{
//! Fehlermeldung? oder macht das die FormShell selber?
@@ -1465,14 +1467,14 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
SCTAB nOldPos = nTab;
while (!pDoc->IsVisible(nTab)) // naechste sichtbare suchen
{
- BOOL bUp = (nTab>=nOldPos);
+ sal_Bool bUp = (nTab>=nOldPos);
if (bUp)
{
++nTab;
if (nTab>=nTabCount)
{
nTab = nOldPos;
- bUp = FALSE;
+ bUp = false;
}
}
@@ -1483,7 +1485,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
else
{
OSL_FAIL("keine sichtbare Tabelle");
- pDoc->SetVisible( 0, TRUE );
+ pDoc->SetVisible( 0, true );
}
}
}
@@ -1493,7 +1495,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
DrawDeselectAll();
ScModule* pScMod = SC_MOD();
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
if ( !bRefMode ) // Abfrage, damit RefMode bei Tabellenwechsel funktioniert
{
DoneBlockMode();
@@ -1502,14 +1504,14 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
}
ScSplitPos eOldActive = aViewData.GetActivePart(); // before switching
- BOOL bFocus = pGridWin[eOldActive]->HasFocus();
+ sal_Bool bFocus = pGridWin[eOldActive]->HasFocus();
aViewData.SetTabNo( nTab );
// UpdateShow noch vor SetCursor, damit UpdateAutoFillMark die richtigen
// Fenster findet (wird aus SetCursor gerufen)
UpdateShow();
aViewData.ResetOldCursor();
- SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), TRUE );
+ SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), sal_True );
SfxBindings& rBindings = aViewData.GetBindings();
ScMarkData& rMark = aViewData.GetMarkData();
@@ -1538,7 +1540,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
bExtendSelection = false;
if (bExtendSelection)
- rMark.SelectTable( nTab, TRUE );
+ rMark.SelectTable( nTab, sal_True );
else
{
rMark.SelectOneTable( nTab );
@@ -1554,7 +1556,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
if ( bRefMode ) // hide EditView if necessary (after aViewData.SetTabNo !)
{
- for (USHORT i = 0; i < 4; ++i)
+ for (sal_uInt16 i = 0; i < 4; ++i)
if (pGridWin[i] && pGridWin[i]->IsVisible())
pGridWin[i]->UpdateEditViewPos();
}
@@ -1602,13 +1604,13 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
// Fixierungen
- BOOL bResize = FALSE;
+ sal_Bool bResize = false;
if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixX())
- bResize = TRUE;
+ bResize = sal_True;
if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixY())
- bResize = TRUE;
+ bResize = sal_True;
if (bResize)
RepeatResize();
InvalidateSplit();
@@ -1618,7 +1620,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
// Form-Layer muss den sichtbaren Ausschnitt der neuen Tabelle kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
@@ -1641,7 +1643,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
if(pScMod->IsRefDialogOpen())
{
- USHORT nCurRefDlgId=pScMod->GetCurRefDlgId();
+ sal_uInt16 nCurRefDlgId=pScMod->GetCurRefDlgId();
SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame();
SfxChildWindow* pChildWnd = pViewFrm->GetChildWindow( nCurRefDlgId );
if ( pChildWnd )
@@ -1662,11 +1664,11 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
DrawDeselectAll();
if (pDrawView)
- DrawEnableAnim( FALSE );
+ DrawEnableAnim( false );
EditView* pSpellingView = aViewData.GetSpellingView();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
if ( pGridWin[i]->IsVisible() && !aViewData.HasEditView((ScSplitPos)i) )
{
@@ -1675,7 +1677,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
SCCOL nScrX = aViewData.GetPosX( eHWhich );
SCROW nScrY = aViewData.GetPosY( eVWhich );
- BOOL bPosVisible =
+ sal_Bool bPosVisible =
( nCol >= nScrX && nCol <= nScrX + aViewData.VisibleCellsX(eHWhich) + 1 &&
nRow >= nScrY && nRow <= nScrY + aViewData.VisibleCellsY(eVWhich) + 1 );
@@ -1716,7 +1718,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
void ScTabView::UpdateEditView()
{
ScSplitPos eActive = aViewData.GetActivePart();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (aViewData.HasEditView( (ScSplitPos) i ))
{
EditView* pEditView = aViewData.GetEditView( (ScSplitPos) i );
@@ -1724,22 +1726,22 @@ void ScTabView::UpdateEditView()
static_cast<ScEditEngineDefaulter*>(pEditView->GetEditEngine()),
pGridWin[i], GetViewData()->GetCurX(), GetViewData()->GetCurY() );
if ( (ScSplitPos)i == eActive )
- pEditView->ShowCursor( FALSE );
+ pEditView->ShowCursor( false );
}
}
-void ScTabView::KillEditView( BOOL bNoPaint )
+void ScTabView::KillEditView( sal_Bool bNoPaint )
{
- USHORT i;
+ sal_uInt16 i;
SCCOL nCol1 = aViewData.GetEditStartCol();
SCROW nRow1 = aViewData.GetEditStartRow();
SCCOL nCol2 = aViewData.GetEditEndCol();
SCROW nRow2 = aViewData.GetEditEndRow();
- BOOL bPaint[4];
- BOOL bNotifyAcc(false);
+ sal_Bool bPaint[4];
+ sal_Bool bNotifyAcc(false);
- BOOL bExtended = nRow1 != nRow2; // Col wird sowieso bis zum Ende gezeichnet
- BOOL bAtCursor = nCol1 <= aViewData.GetCurX() &&
+ sal_Bool bExtended = nRow1 != nRow2; // Col wird sowieso bis zum Ende gezeichnet
+ sal_Bool bAtCursor = nCol1 <= aViewData.GetCurX() &&
nCol2 >= aViewData.GetCurX() &&
nRow1 == aViewData.GetCurY();
for (i=0; i<4; i++)
@@ -1771,12 +1773,12 @@ void ScTabView::KillEditView( BOOL bNoPaint )
}
if (pDrawView)
- DrawEnableAnim( TRUE );
+ DrawEnableAnim( sal_True );
// GrabFocus immer dann, wenn diese View aktiv ist und
// die Eingabezeile den Focus hat
- BOOL bGrabFocus = FALSE;
+ sal_Bool bGrabFocus = false;
if (aViewData.IsActive())
{
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
@@ -1784,7 +1786,7 @@ void ScTabView::KillEditView( BOOL bNoPaint )
{
ScInputWindow* pInputWin = pInputHdl->GetInputWindow();
if (pInputWin && pInputWin->IsInputActive())
- bGrabFocus = TRUE;
+ bGrabFocus = sal_True;
}
}
@@ -1818,7 +1820,7 @@ void ScTabView::UpdateFormulas()
if ( aViewData.GetDocument()->IsAutoCalcShellDisabled() )
return ;
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
@@ -1839,7 +1841,7 @@ void ScTabView::UpdateFormulas()
void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
ScUpdateMode eMode )
{
- USHORT i;
+ sal_uInt16 i;
SCCOL nCol1;
SCROW nRow1;
SCCOL nCol2;
@@ -1854,7 +1856,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
{
ScHSplitPos eHWhich = WhichH( (ScSplitPos) i );
ScVSplitPos eVWhich = WhichV( (ScSplitPos) i );
- BOOL bOut = FALSE;
+ sal_Bool bOut = false;
nCol1 = nStartCol;
nRow1 = nStartRow;
@@ -1869,16 +1871,16 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
if ( eMode == SC_UPDATE_ALL ) // for UPDATE_ALL, paint anyway
nCol2 = nScrX; // (because of extending strings to the right)
else
- bOut = TRUE; // completely outside the window
+ bOut = sal_True; // completely outside the window
}
if (nRow1 < nScrY) nRow1 = nScrY;
- if (nRow2 < nScrY) bOut = TRUE;
+ if (nRow2 < nScrY) bOut = sal_True;
SCCOL nLastX = nScrX + aViewData.VisibleCellsX( eHWhich ) + 1;
SCROW nLastY = nScrY + aViewData.VisibleCellsY( eVWhich ) + 1;
- if (nCol1 > nLastX) bOut = TRUE;
+ if (nCol1 > nLastX) bOut = sal_True;
if (nCol2 > nLastX) nCol2 = nLastX;
- if (nRow1 > nLastY) bOut = TRUE;
+ if (nRow1 > nLastY) bOut = sal_True;
if (nRow2 > nLastY) nRow2 = nLastY;
if (!bOut)
@@ -1887,7 +1889,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
pGridWin[i]->Draw( nCol1, nRow1, nCol2, nRow2, eMode );
else // ALL oder MARKS
{
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
long nLayoutSign = bLayoutRTL ? -1 : 1;
Point aStart = aViewData.GetScrPos( nCol1, nRow1, (ScSplitPos) i );
@@ -1901,14 +1903,14 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
if ( eMode == SC_UPDATE_ALL && nRow2 >= MAXROW )
aEnd.Y() = pGridWin[i]->GetOutputSizePixel().Height();
- BOOL bShowChanges = TRUE; //! ...
+ sal_Bool bShowChanges = sal_True; //! ...
if (bShowChanges)
{
aStart.X() -= nLayoutSign; // include change marks
aStart.Y() -= 1;
}
- BOOL bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS );
+ sal_Bool bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS );
if (bMarkClipped)
{
// dazu muesste ScColumn::IsEmptyBlock optimiert werden
@@ -1947,8 +1949,8 @@ void ScTabView::PaintRangeFinder( long nNumber )
if ( pRangeFinder && pRangeFinder->GetDocName() == aViewData.GetDocShell()->GetTitle() )
{
SCTAB nTab = aViewData.GetTabNo();
- USHORT nCount = (USHORT)pRangeFinder->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( nNumber < 0 || nNumber == i )
{
ScRangeFindData* pData = pRangeFinder->GetObject(i);
@@ -1970,18 +1972,18 @@ void ScTabView::PaintRangeFinder( long nNumber )
// wegnehmen -> Repaint
// SC_UPDATE_MARKS: Invalidate, nicht bis zum Zeilenende
- BOOL bHiddenEdge = FALSE;
+ sal_Bool bHiddenEdge = false;
SCROW nTmp;
ScDocument* pDoc = aViewData.GetDocument();
while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab) )
{
--nCol1;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab) )
{
++nCol2;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->LastVisibleRow(0, nRow1, nTab);
if (!ValidRow(nTmp))
@@ -1989,7 +1991,7 @@ void ScTabView::PaintRangeFinder( long nNumber )
if (nTmp < nRow1)
{
nRow1 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab);
if (!ValidRow(nTmp))
@@ -1997,7 +1999,7 @@ void ScTabView::PaintRangeFinder( long nNumber )
if (nTmp > nRow2)
{
nRow2 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
if ( nCol2 - nCol1 > 1 && nRow2 - nRow1 > 1 && !bHiddenEdge )
@@ -2039,8 +2041,8 @@ void ScTabView::ClearHighlightRanges()
pHighlightRanges = NULL; // Repaint ohne Highlight
SCTAB nTab = aViewData.GetTabNo();
- ULONG nCount = pTemp->Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = pTemp->Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScHighlightEntry* pEntry = pTemp->GetObject( i );
if (pEntry)
@@ -2086,7 +2088,7 @@ void ScTabView::DoChartSelection(
void ScTabView::PaintGrid()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
@@ -2097,7 +2099,7 @@ void ScTabView::PaintGrid()
void ScTabView::PaintTop()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<2; i++)
{
if (pColBar[i])
@@ -2109,7 +2111,7 @@ void ScTabView::PaintTop()
void ScTabView::CreateAnchorHandles(SdrHdlList& rHdl, const ScAddress& rAddress)
{
- UINT16 i;
+ sal_uInt16 i;
for(i=0; i<4; i++)
{
@@ -2142,10 +2144,10 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol )
if (nStartCol>0)
--nStartCol; //! allgemeiner ?
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
long nLayoutSign = bLayoutRTL ? -1 : 1;
- for (USHORT i=0; i<2; i++)
+ for (sal_uInt16 i=0; i<2; i++)
{
ScHSplitPos eWhich = (ScHSplitPos) i;
if (pColBar[eWhich])
@@ -2170,7 +2172,7 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol )
void ScTabView::PaintLeft()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<2; i++)
{
if (pRowBar[i])
@@ -2199,7 +2201,7 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow )
if (nStartRow>0)
--nStartRow;
- for (USHORT i=0; i<2; i++)
+ for (sal_uInt16 i=0; i<2; i++)
{
ScVSplitPos eWhich = (ScVSplitPos) i;
if (pRowBar[eWhich])
@@ -2219,18 +2221,18 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow )
}
}
-BOOL ScTabView::PaintExtras()
+sal_Bool ScTabView::PaintExtras()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
if (!pDoc->HasTable(nTab)) // Tabelle geloescht ?
{
SCTAB nCount = pDoc->GetTableCount();
aViewData.SetTabNo(nCount-1);
- bRet = TRUE;
+ bRet = sal_True;
}
- pTabControl->UpdateStatus(); // TRUE = active
+ pTabControl->UpdateStatus(); // sal_True = active
return bRet;
}
@@ -2244,8 +2246,8 @@ void ScTabView::RecalcPPT()
aViewData.RefreshZoom(); // pre-calculate new PPT values
- BOOL bChangedX = ( aViewData.GetPPTX() != nOldX );
- BOOL bChangedY = ( aViewData.GetPPTY() != nOldY );
+ sal_Bool bChangedX = ( aViewData.GetPPTX() != nOldX );
+ sal_Bool bChangedY = ( aViewData.GetPPTY() != nOldY );
if ( bChangedX || bChangedY )
{
// call view SetZoom (including draw scale, split update etc)
@@ -2253,7 +2255,7 @@ void ScTabView::RecalcPPT()
Fraction aZoomX = aViewData.GetZoomX();
Fraction aZoomY = aViewData.GetZoomY();
- SetZoom( aZoomX, aZoomY, FALSE );
+ SetZoom( aZoomX, aZoomY, false );
PaintGrid();
if (bChangedX)
@@ -2263,7 +2265,7 @@ void ScTabView::RecalcPPT()
}
}
-void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst )
+void ScTabView::ActivateView( sal_Bool bActivate, sal_Bool bFirst )
{
if ( bActivate == aViewData.IsActive() && !bFirst )
{
@@ -2274,13 +2276,13 @@ void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst )
// wird nur bei MDI-(De)Activate gerufen
// aViewData.Activate hinten wegen Cursor-Show bei KillEditView
- // Markierung nicht mehr loeschen - wenn an der ViewData Activate(FALSE) gesetzt ist,
+ // Markierung nicht mehr loeschen - wenn an der ViewData Activate(sal_False) gesetzt ist,
// wird die Markierung nicht ausgegeben
if (!bActivate)
{
ScModule* pScMod = SC_MOD();
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
// Referenzeingabe nicht abbrechen, um Referenzen auf
// andere Dokumente zuzulassen
@@ -2298,7 +2300,7 @@ void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst )
aViewData.Activate(bActivate);
- PaintBlock(FALSE); // Repaint, Markierung je nach Active-Status
+ PaintBlock(false); // Repaint, Markierung je nach Active-Status
if (!bActivate)
HideAllCursors(); // Cursor
@@ -2345,9 +2347,9 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
ScSplitPos eOld = aViewData.GetActivePart();
if ( eOld != eWhich )
{
- bInActivatePart = TRUE;
+ bInActivatePart = sal_True;
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
// the HasEditView call during SetCursor would fail otherwise
if ( aViewData.HasEditView(eOld) && !bRefMode )
@@ -2357,11 +2359,11 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
ScVSplitPos eOldV = WhichV(eOld);
ScHSplitPos eNewH = WhichH(eWhich);
ScVSplitPos eNewV = WhichV(eWhich);
- BOOL bTopCap = pColBar[eOldH] && pColBar[eOldH]->IsMouseCaptured();
- BOOL bLeftCap = pRowBar[eOldV] && pRowBar[eOldV]->IsMouseCaptured();
+ sal_Bool bTopCap = pColBar[eOldH] && pColBar[eOldH]->IsMouseCaptured();
+ sal_Bool bLeftCap = pRowBar[eOldV] && pRowBar[eOldV]->IsMouseCaptured();
- BOOL bFocus = pGridWin[eOld]->HasFocus();
- BOOL bCapture = pGridWin[eOld]->IsMouseCaptured();
+ sal_Bool bFocus = pGridWin[eOld]->HasFocus();
+ sal_Bool bCapture = pGridWin[eOld]->IsMouseCaptured();
if (bCapture)
pGridWin[eOld]->ReleaseMouse();
pGridWin[eOld]->ClickExtern();
@@ -2389,8 +2391,8 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
if ( bTopCap && pColBar[eNewH] )
{
- pColBar[eOldH]->SetIgnoreMove(TRUE);
- pColBar[eNewH]->SetIgnoreMove(FALSE);
+ pColBar[eOldH]->SetIgnoreMove(sal_True);
+ pColBar[eNewH]->SetIgnoreMove(false);
pHdrSelEng->SetWindow( pColBar[eNewH] );
long nWidth = pColBar[eNewH]->GetOutputSizePixel().Width();
pHdrSelEng->SetVisibleArea( Rectangle( 0, LONG_MIN, nWidth-1, LONG_MAX ) );
@@ -2398,8 +2400,8 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
}
if ( bLeftCap && pRowBar[eNewV] )
{
- pRowBar[eOldV]->SetIgnoreMove(TRUE);
- pRowBar[eNewV]->SetIgnoreMove(FALSE);
+ pRowBar[eOldV]->SetIgnoreMove(sal_True);
+ pRowBar[eNewV]->SetIgnoreMove(false);
pHdrSelEng->SetWindow( pRowBar[eNewV] );
long nHeight = pRowBar[eNewV]->GetOutputSizePixel().Height();
pHdrSelEng->SetVisibleArea( Rectangle( LONG_MIN, 0, LONG_MAX, nHeight-1 ) );
@@ -2411,7 +2413,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
pGridWin[eWhich]->ShowCursor();
SfxInPlaceClient* pClient = aViewData.GetViewShell()->GetIPClient();
- BOOL bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
// don't switch ViewShell's active window during RefInput, because the focus
// might change, and subsequent SetReference calls wouldn't find the right EditView
@@ -2425,13 +2427,13 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
pGridWin[eWhich]->GrabFocus();
}
- bInActivatePart = FALSE;
+ bInActivatePart = false;
}
}
void ScTabView::HideListBox()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->ClickExtern();
}
@@ -2525,7 +2527,7 @@ void ScTabView::ZoomChanged()
void ScTabView::CheckNeedsRepaint()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->CheckNeedsRepaint();
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index a6b5f7fe1b1b..8f1fc44c6f85 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -47,7 +47,7 @@
#include "cell.hxx"
#include "dociter.hxx"
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
// STATIC DATA -----------------------------------------------------------
@@ -68,7 +68,7 @@ void ScTabView::HideTip()
void ScTabView::ShowRefTip()
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( aViewData.GetRefType() == SC_REFTYPE_REF && Help::IsQuickHelpEnabled() )
{
SCCOL nStartX = aViewData.GetRefStartX();
@@ -77,8 +77,8 @@ void ScTabView::ShowRefTip()
SCROW nEndY = aViewData.GetRefEndY();
if ( nEndX != nStartX || nEndY != nStartY ) // nicht fuer einzelne Zelle
{
- BOOL bLeft = ( nEndX < nStartX );
- BOOL bTop = ( nEndY < nStartY );
+ sal_Bool bLeft = ( nEndX < nStartX );
+ sal_Bool bTop = ( nEndY < nStartY );
PutInOrder( nStartX, nEndX );
PutInOrder( nStartY, nEndY );
SCCOL nCols = nEndX+1-nStartX;
@@ -99,7 +99,7 @@ void ScTabView::ShowRefTip()
Point aPos( bLeft ? aStart.X() : ( aEnd.X() + 3 ),
bTop ? aStart.Y() : ( aEnd.Y() + 3 ) );
- USHORT nFlags = ( bLeft ? QUICKHELP_RIGHT : QUICKHELP_LEFT ) |
+ sal_uInt16 nFlags = ( bLeft ? QUICKHELP_RIGHT : QUICKHELP_LEFT ) |
( bTop ? QUICKHELP_BOTTOM : QUICKHELP_TOP );
// nicht ueber die editierte Formel
@@ -117,7 +117,7 @@ void ScTabView::ShowRefTip()
HideTip();
nTipVisible = Help::ShowTip( pWin, aRect, aHelp, nFlags );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -130,7 +130,7 @@ void ScTabView::StopRefMode()
{
if (aViewData.IsRefMode())
{
- aViewData.SetRefMode( FALSE, SC_REFTYPE_NONE );
+ aViewData.SetRefMode( false, SC_REFTYPE_NONE );
HideTip();
UpdateShrinkOverlay();
@@ -150,7 +150,7 @@ void ScTabView::StopRefMode()
}
pSelEngine->Reset();
- pSelEngine->SetAddMode( FALSE ); //! sollte das nicht bei Reset passieren?
+ pSelEngine->SetAddMode( false ); //! sollte das nicht bei Reset passieren?
ScSplitPos eOld = pSelEngine->GetWhich();
ScSplitPos eNew = aViewData.GetActivePart();
@@ -172,14 +172,14 @@ void ScTabView::StopRefMode()
AlignToCursor( aViewData.GetCurX(), aViewData.GetCurY(), SC_FOLLOW_NONE );
}
-void ScTabView::DoneRefMode( BOOL bContinue )
+void ScTabView::DoneRefMode( sal_Bool bContinue )
{
ScDocument* pDoc = aViewData.GetDocument();
if ( aViewData.GetRefType() == SC_REFTYPE_REF && bContinue )
SC_MOD()->AddRefEntry();
- BOOL bWasRef = aViewData.IsRefMode();
- aViewData.SetRefMode( FALSE, SC_REFTYPE_NONE );
+ sal_Bool bWasRef = aViewData.IsRefMode();
+ aViewData.SetRefMode( false, SC_REFTYPE_NONE );
HideTip();
UpdateShrinkOverlay();
@@ -254,7 +254,7 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
PutInOrder(nStartY,nEndY);
pDoc->SetEmbedded( ScRange(nStartX,nStartY,nTab, nEndX,nEndY,nTab) );
ScDocShell* pDocSh = aViewData.GetDocShell();
- pDocSh->UpdateOle( &aViewData, TRUE );
+ pDocSh->UpdateOle( &aViewData, sal_True );
pDocSh->SetDocumentModified();
}
@@ -301,18 +301,18 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
if ( pWin )
aPos = pWin->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_TOP;
+ sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_TOP;
Help::ShowQuickHelp(pWin, aRect, aHelpStr, nAlign);
}
}
-void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType, BOOL bPaint )
+void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType, sal_Bool bPaint )
{
ScDocument* pDoc = aViewData.GetDocument();
ScMarkData& rMark = aViewData.GetMarkData();
if (!aViewData.IsRefMode())
{
- aViewData.SetRefMode( TRUE, eType );
+ aViewData.SetRefMode( sal_True, eType );
aViewData.SetRefStart( nCurX, nCurY, nCurZ );
aViewData.SetRefEnd( nCurX, nCurY, nCurZ );
@@ -334,7 +334,7 @@ void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eT
}
}
-void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, BOOL bLayoutRTL )
+void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL )
{
if ( nVisible == 0 )
nVisible = 1; // #i59893# don't use visible size 0
@@ -357,7 +357,7 @@ void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible,
}
}
-long ScTabView::GetScrollBarPos( ScrollBar& rScroll, BOOL bLayoutRTL )
+long ScTabView::GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL )
{
if ( bLayoutRTL )
return -rScroll.GetThumbPos() - rScroll.GetVisibleSize();
@@ -398,11 +398,11 @@ long lcl_GetScrollRange( SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLRO
void ScTabView::UpdateScrollBars()
{
long nDiff;
- BOOL bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
- BOOL bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bMirror = pDoc->IsLayoutRTL( nTab ) != Application::GetSettings().GetLayoutRTL();
+ sal_Bool bMirror = pDoc->IsLayoutRTL( nTab ) != Application::GetSettings().GetLayoutRTL();
SCCOL nUsedX;
SCROW nUsedY;
pDoc->GetTableArea( nTab, nUsedX, nUsedY ); //! cachen !!!!!!!!!!!!!!!
@@ -425,7 +425,7 @@ void ScTabView::UpdateScrollBars()
nVisYB = aViewData.VisibleCellsY( SC_SPLIT_BOTTOM );
long nMaxYB = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_BOTTOM), nVisYB, MAXROW, nStartY );
- SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, FALSE );
+ SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, false );
if (bRight)
{
@@ -438,7 +438,7 @@ void ScTabView::UpdateScrollBars()
{
nVisYT = aViewData.VisibleCellsY( SC_SPLIT_TOP );
long nMaxYT = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_TOP), nVisYT, MAXROW, 0 );
- SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), FALSE );
+ SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), false );
}
// Bereich testen
@@ -484,7 +484,7 @@ void ScTabView::UpdateScrollBars()
void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos )
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (WhichV((ScSplitPos)i)==eWhich)
{
ScGridWindow* pWin = pGridWin[i];
@@ -499,7 +499,7 @@ void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos )
void ScTabView::InvertVertical( ScHSplitPos eWhich, long nDragPos )
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (WhichH((ScSplitPos)i)==eWhich)
{
ScGridWindow* pWin = pGridWin[i];
@@ -524,7 +524,7 @@ void ScTabView::InterpretVisible()
return;
SCTAB nTab = aViewData.GetTabNo();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
{
// rely on gridwin pointers to find used panes
// no IsVisible test in case the whole view is not yet shown
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 2a74b2a0f8b6..ef2c621358b4 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -79,9 +79,9 @@ void ScTabView::Init()
the sheet orientation, not the UI setting. Note: controls that are
already constructed (e.g. scroll bars) have the RTL setting of the GUI.
Eventually this has to be disabled manually (see below). */
- pFrameWin->EnableRTL( FALSE );
+ pFrameWin->EnableRTL( false );
- USHORT i;
+ sal_uInt16 i;
aScrollTimer.SetTimeout(10);
aScrollTimer.SetTimeoutHdl( LINK( this, ScTabView, TimerHdl ) );
@@ -150,7 +150,7 @@ void ScTabView::Init()
ScTabView::~ScTabView()
{
- USHORT i;
+ sal_uInt16 i;
// remove selection object
ScModule* pScMod = SC_MOD();
@@ -209,14 +209,14 @@ ScTabView::~ScTabView()
delete pTabControl;
}
-void ScTabView::MakeDrawView( BYTE nForceDesignMode )
+void ScTabView::MakeDrawView( sal_uInt8 nForceDesignMode )
{
if (!pDrawView)
{
ScDrawLayer* pLayer = aViewData.GetDocument()->GetDrawLayer();
DBG_ASSERT(pLayer, "wo ist der Draw Layer ??");
- USHORT i;
+ sal_uInt16 i;
pDrawView = new ScDrawView( pGridWin[SC_SPLIT_BOTTOMLEFT], &aViewData );
for (i=0; i<4; i++)
if (pGridWin[i])
@@ -241,7 +241,7 @@ void ScTabView::MakeDrawView( BYTE nForceDesignMode )
// used when switching back from page preview: restore saved design mode state
// (otherwise, keep the default from the draw view ctor)
if ( nForceDesignMode != SC_FORCEMODE_NONE )
- pDrawView->SetDesignMode( (BOOL)nForceDesignMode );
+ pDrawView->SetDesignMode( (sal_Bool)nForceDesignMode );
// an der FormShell anmelden
FmFormShell* pFormSh = aViewData.GetViewShell()->GetFormShell();
@@ -268,13 +268,13 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
//==================================================================
-void ScTabView::TabChanged()
+void ScTabView::TabChanged( bool bSameTabButMoved )
{
if (pDrawView)
{
DrawDeselectAll(); // beendet auch Text-Edit-Modus
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
pDrawView->VCRemoveWin(pGridWin[i]); // fuer alte Page
@@ -297,7 +297,7 @@ void ScTabView::TabChanged()
// Es gibt keine einfache Moeglichkeit, alle Slots der FormShell zu invalidieren
// (fuer disablete Slots auf geschuetzten Tabellen), darum hier einfach alles...
- rBindings.InvalidateAll(FALSE);
+ rBindings.InvalidateAll(false);
if (aViewData.GetViewShell()->HasAccessibilityObjects())
{
@@ -314,7 +314,7 @@ void ScTabView::TabChanged()
{
ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
if (pImp)
- pImp->SheetChanged();
+ pImp->SheetChanged( bSameTabButMoved );
}
}
}
@@ -324,10 +324,10 @@ void ScTabView::UpdateLayerLocks()
if (pDrawView)
{
SCTAB nTab = aViewData.GetTabNo();
- BOOL bEx = aViewData.GetViewShell()->IsDrawSelMode();
- BOOL bProt = aViewData.GetDocument()->IsTabProtected( nTab ) ||
+ sal_Bool bEx = aViewData.GetViewShell()->IsDrawSelMode();
+ sal_Bool bProt = aViewData.GetDocument()->IsTabProtected( nTab ) ||
aViewData.GetSfxDocShell()->IsReadOnly();
- BOOL bShared = aViewData.GetDocShell()->IsDocShared();
+ sal_Bool bShared = aViewData.GetDocShell()->IsDocShared();
SdrLayer* pLayer;
SdrLayerAdmin& rAdmin = pDrawView->GetModel()->GetLayerAdmin();
@@ -336,7 +336,7 @@ void ScTabView::UpdateLayerLocks()
pDrawView->SetLayerLocked( pLayer->GetName(), bProt || !bEx || bShared );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN);
if (pLayer)
- pDrawView->SetLayerLocked( pLayer->GetName(), TRUE );
+ pDrawView->SetLayerLocked( pLayer->GetName(), sal_True );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT);
if (pLayer)
pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
@@ -347,7 +347,7 @@ void ScTabView::UpdateLayerLocks()
if (pLayer)
{
pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
- pDrawView->SetLayerVisible( pLayer->GetName(), sal_False);
+ pDrawView->SetLayerVisible( pLayer->GetName(), false);
}
}
}
@@ -369,16 +369,16 @@ void ScTabView::DrawDeselectAll()
pDrawView->UnmarkAll();
if (!pViewSh->IsDrawSelMode())
- pViewSh->SetDrawShell( FALSE );
+ pViewSh->SetDrawShell( false );
}
}
-BOOL ScTabView::IsDrawTextEdit() const
+sal_Bool ScTabView::IsDrawTextEdit() const
{
if (pDrawView)
return pDrawView->IsTextEdit();
else
- return FALSE;
+ return false;
}
SvxZoomType ScTabView::GetZoomType() const
@@ -386,12 +386,12 @@ SvxZoomType ScTabView::GetZoomType() const
return aViewData.GetZoomType();
}
-void ScTabView::SetZoomType( SvxZoomType eNew, BOOL bAll )
+void ScTabView::SetZoomType( SvxZoomType eNew, sal_Bool bAll )
{
aViewData.SetZoomType( eNew, bAll );
}
-void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll )
+void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll )
{
aViewData.SetZoom( rNewX, rNewY, bAll );
if (pDrawView)
@@ -407,7 +407,7 @@ void ScTabView::RefreshZoom()
ZoomChanged();
}
-void ScTabView::SetPagebreakMode( BOOL bSet )
+void ScTabView::SetPagebreakMode( sal_Bool bSet )
{
aViewData.SetPagebreakMode(bSet);
if (pDrawView)
@@ -421,7 +421,7 @@ void ScTabView::ResetDrawDragMode()
pDrawView->SetDragMode( SDRDRAG_MOVE );
}
-void ScTabView::ViewOptionsHasChanged( BOOL bHScrollChanged, BOOL bGraphicsChanged )
+void ScTabView::ViewOptionsHasChanged( sal_Bool bHScrollChanged, sal_Bool bGraphicsChanged )
{
// DrawView erzeugen, wenn Gitter angezeigt werden soll
if ( !pDrawView && aViewData.GetOptions().GetGridOptions().GetGridVisible() )
@@ -431,13 +431,13 @@ void ScTabView::ViewOptionsHasChanged( BOOL bHScrollChanged, BOOL bGraphicsChang
pDrawView->UpdateUserViewOptions();
if (bGraphicsChanged)
- DrawEnableAnim(TRUE); // DrawEnableAnim checks the options state
+ DrawEnableAnim(sal_True); // DrawEnableAnim checks the options state
// if TabBar is set to visible, make sure its size is not 0
- BOOL bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 );
+ sal_Bool bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 );
// if ScrollBar is set to visible, TabBar must make room
- BOOL bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() &&
+ sal_Bool bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() &&
pTabControl->GetSizePixel().Width() > SC_TABBAR_DEFWIDTH );
if ( bGrow || bShrink )
@@ -477,14 +477,14 @@ void ScTabView::DrawMarkRect( const Rectangle& rRect )
{
//! store rectangle for repaint during drag
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
{
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
{
RasterOp aROp = pGridWin[i]->GetRasterOp();
- BOOL bHasLine = pGridWin[i]->IsLineColor();
+ sal_Bool bHasLine = pGridWin[i]->IsLineColor();
Color aLine = pGridWin[i]->GetLineColor();
- BOOL bHasFill = pGridWin[i]->IsFillColor();
+ sal_Bool bHasFill = pGridWin[i]->IsFillColor();
Color aFill = pGridWin[i]->GetFillColor();
pGridWin[i]->SetRasterOp( ROP_INVERT );
@@ -506,9 +506,9 @@ void ScTabView::DrawMarkRect( const Rectangle& rRect )
}
}
-void ScTabView::DrawEnableAnim(BOOL bSet)
+void ScTabView::DrawEnableAnim(sal_Bool bSet)
{
- USHORT i;
+ sal_uInt16 i;
if ( pDrawView )
{
// dont start animations if display of graphics is disabled
@@ -517,7 +517,7 @@ void ScTabView::DrawEnableAnim(BOOL bSet)
{
if ( !pDrawView->IsAnimationEnabled() )
{
- pDrawView->SetAnimationEnabled(TRUE);
+ pDrawView->SetAnimationEnabled(sal_True);
// Animierte GIFs muessen wieder gestartet werden:
ScDocument* pDoc = aViewData.GetDocument();
@@ -528,7 +528,7 @@ void ScTabView::DrawEnableAnim(BOOL bSet)
}
else
{
- pDrawView->SetAnimationEnabled(FALSE);
+ pDrawView->SetAnimationEnabled(false);
}
}
}
@@ -546,7 +546,7 @@ void ScTabView::UpdateDrawTextOutliner()
void ScTabView::DigitLanguageChanged()
{
LanguageType eNewLang = SC_MOD()->GetOptDigitLanguage();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] )
pGridWin[i]->SetDigitLanguage( eNewLang );
}
@@ -637,7 +637,7 @@ void ScTabView::MakeVisible( const Rectangle& rHMMRect )
//---------------------------------------------------------------
-void ScTabView::SetBrushDocument( ScDocument* pNew, BOOL bLock )
+void ScTabView::SetBrushDocument( ScDocument* pNew, sal_Bool bLock )
{
delete pBrushDocument;
delete pDrawBrushSet;
@@ -650,7 +650,7 @@ void ScTabView::SetBrushDocument( ScDocument* pNew, BOOL bLock )
aViewData.GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
}
-void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock )
+void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock )
{
delete pBrushDocument;
delete pDrawBrushSet;
@@ -667,7 +667,7 @@ void ScTabView::ResetBrushDocument()
{
if ( HasPaintBrush() )
{
- SetBrushDocument( NULL, FALSE );
+ SetBrushDocument( NULL, false );
SetActivePointer( Pointer( POINTER_ARROW ) ); // switch pointers also when ended with escape key
}
}
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 677762efea9e..2c26815a01dc 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -57,9 +57,6 @@
#define ScTabViewShell
#include "scslots.hxx"
-#define SearchSettings
-#include <svx/svxslots.hxx>
-
TYPEINIT2(ScTabViewShell,SfxViewShell,SfxListener);
SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index d28d3cb23518..ba6c97ac7fba 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -108,7 +108,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
SdrModel* pDoc = pView->GetModel();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nNewId = rReq.GetSlot();
+ sal_uInt16 nNewId = rReq.GetSlot();
if ( nNewId == SID_DRAW_CHART )
{
@@ -125,7 +125,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if (nNewId == SID_INSERT_DRAW && pArgs)
{
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( SID_INSERT_DRAW, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pArgs->GetItemState( SID_INSERT_DRAW, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SvxDrawToolItem ) )
{
SvxDrawToolEnum eSel = (SvxDrawToolEnum)((const SvxDrawToolItem*)pItem)->GetValue();
@@ -148,7 +148,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SVX_SNAP_DRAW_CAPTION_VERTICAL: nNewId = SID_DRAW_CAPTION_VERTICAL; break;
}
}
- else // USHORT-Item vom Controller
+ else // sal_uInt16-Item vom Controller
{
rReq.Done();
return;
@@ -158,11 +158,11 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( nNewId == SID_DRAW_SELECT )
nNewId = SID_OBJECT_SELECT;
- USHORT nNewFormId = 0;
+ sal_uInt16 nNewFormId = 0;
if ( nNewId == SID_FM_CREATE_CONTROL && pArgs )
{
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SfxUInt16Item ) )
nNewFormId = ((const SfxUInt16Item*)pItem)->GetValue();
}
@@ -171,7 +171,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( pArgs )
{
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( nNewId, TRUE, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) )
+ if ( pArgs->GetItemState( nNewId, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) )
sStringItemValue = static_cast<const SfxStringItem*>(pItem)->GetValue();
}
bool bSwitchCustom = ( sStringItemValue.Len() && sDrawCustom.Len() && sStringItemValue != sDrawCustom );
@@ -182,15 +182,15 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
// CTRL-SID_OBJECT_SELECT is used to select the first object,
// but not if SID_OBJECT_SELECT is the result of clicking a create function again,
// so this must be tested before changing nNewId below.
- BOOL bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) );
+ sal_Bool bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) );
- BOOL bEx = IsDrawSelMode();
+ sal_Bool bEx = IsDrawSelMode();
if ( rReq.GetModifier() & KEY_MOD1 )
{
// always allow keyboard selection also on background layer
// also allow creation of default objects if the same object type
// was already active
- bEx = TRUE;
+ bEx = sal_True;
}
else if ( nNewId == nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL ||
nNewFormId == nFormSfxId || nNewFormId == 0 ) && !bSwitchCustom )
@@ -204,7 +204,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( nNewId == SID_FM_CREATE_CONTROL )
{
GetViewData()->GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
//! was fuer einen Slot braucht der komische Controller wirklich, um das anzuzeigen????
}
@@ -212,13 +212,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
nNewId = SID_OBJECT_SELECT;
}
else
- bEx = TRUE;
+ bEx = sal_True;
if ( nDrawSfxId == SID_FM_CREATE_CONTROL && nNewId != nDrawSfxId )
{
// Wechsel von Control- zu Zeichenfunktion -> im Control-Controller deselektieren
GetViewData()->GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
//! was fuer einen Slot braucht der komische Controller wirklich, um das anzuzeigen????
}
@@ -233,7 +233,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
{
// select first object
pView->UnmarkAllObj();
- pView->MarkNextObj(TRUE);
+ pView->MarkNextObj(sal_True);
// ...and make it visible
if(pView->AreObjectsMarked())
@@ -248,13 +248,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
{
if ( nNewId == SID_DRAW_TEXT || nNewId == SID_DRAW_TEXT_VERTICAL ||
nNewId == SID_DRAW_TEXT_MARQUEE || nNewId == SID_DRAW_NOTEEDIT )
- SetDrawTextShell( TRUE );
+ SetDrawTextShell( sal_True );
else
{
if ( bEx || pView->GetMarkedObjectList().GetMarkCount() != 0 )
SetDrawShellOrSub();
else
- SetDrawShell( FALSE );
+ SetDrawShell( false );
}
}
@@ -288,7 +288,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_CAPTION:
case SID_DRAW_CAPTION_VERTICAL:
pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq));
- pView->SetFrameDragSingles( FALSE );
+ pView->SetFrameDragSingles( false );
rBindings.Invalidate( SID_BEZIER_EDIT );
break;
@@ -313,7 +313,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
break;
case SID_FM_CREATE_CONTROL:
- SetDrawFormShell(TRUE);
+ SetDrawFormShell(sal_True);
pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, aNewReq));
nFormSfxId = nNewFormId;
break;
@@ -333,7 +333,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, aNewReq ));
if ( nNewId != SID_DRAW_CS_ID )
{
- SFX_REQUEST_ARG( rReq, pEnumCommand, SfxStringItem, nNewId, sal_False );
+ SFX_REQUEST_ARG( rReq, pEnumCommand, SfxStringItem, nNewId, false );
if ( pEnumCommand )
{
aCurrShapeEnumCommand[ nNewId - SID_DRAWTBX_CS_BASIC ] = pEnumCommand->GetValue();
@@ -410,7 +410,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
@@ -419,7 +419,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_INSERT_DRAW:
{
// SID_OBJECT_SELECT nur, wenn "harter" Selektionsmodus
- USHORT nPutId = nDrawSfxId;
+ sal_uInt16 nPutId = nDrawSfxId;
if ( nPutId == SID_OBJECT_SELECT && !IsDrawSelMode() )
nPutId = USHRT_MAX;
// nur die Images, die auch auf dem Controller liegen
@@ -451,7 +451,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_DRAW_CHART:
{
- BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace();
if ( bOle || !SvtModuleOptions().IsChart() )
rSet.DisableItem( nWhich );
}
@@ -465,13 +465,13 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
}
}
-BOOL ScTabViewShell::SelectObject( const String& rName )
+sal_Bool ScTabViewShell::SelectObject( const String& rName )
{
ScDrawView* pView = GetViewData()->GetScDrawView();
if (!pView)
- return FALSE;
+ return false;
- BOOL bFound = pView->SelectObject( rName );
+ sal_Bool bFound = pView->SelectObject( rName );
// DrawShell etc. is handled in MarkListHasChanged
return bFound;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index b1db9c4714bd..f6e7dccb45a1 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -44,7 +44,7 @@
#include <svl/ptitem.hxx>
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
-
+#include <sfx2/objface.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/vclenum.hxx>
@@ -87,7 +87,7 @@ using ::std::auto_ptr;
#define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() )
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
#define GET_STRING(nid) ((const SfxStringItem&)pReqArgs->Get(nid)).GetValue()
#define GET_UINT16(nid) ((const SfxUInt16Item&)pReqArgs->Get(nid)).GetValue()
#define GET_BOOL(nid) ((const SfxBoolItem&)pReqArgs->Get(nid)).GetValue()
@@ -97,9 +97,9 @@ using ::std::auto_ptr;
/** Try to parse the given range using Calc-style syntax first, then
Excel-style if that fails. */
-USHORT lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDoc, USHORT /* nSlot */)
+sal_uInt16 lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
{
- USHORT nResult = rScRange.Parse(aAddress, pDoc);
+ sal_uInt16 nResult = rScRange.Parse(aAddress, pDoc);
if ( (nResult & SCA_VALID) )
return nResult;
@@ -108,9 +108,9 @@ USHORT lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDo
/** Try to parse the given address using Calc-style syntax first, then
Excel-style if that fails. */
-USHORT lcl_ParseAddress(ScAddress& rScAddress, const String& aAddress, ScDocument* pDoc, USHORT /* nSlot */)
+sal_uInt16 lcl_ParseAddress(ScAddress& rScAddress, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
{
- USHORT nResult = rScAddress.Parse(aAddress, pDoc);
+ sal_uInt16 nResult = rScAddress.Parse(aAddress, pDoc);
if ( (nResult & SCA_VALID) )
return nResult;
@@ -123,7 +123,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SfxBindings& rBindings = pThisFrame->GetBindings();
ScModule* pScMod = SC_MOD();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp
HideListBox(); // Autofilter-DropDown-Listbox
@@ -134,22 +134,22 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(FID_INSERT_FILE,TRUE,&pItem) == SFX_ITEM_SET )
+ pReqArgs->GetItemState(FID_INSERT_FILE,sal_True,&pItem) == SFX_ITEM_SET )
{
String aFileName = ((const SfxStringItem*)pItem)->GetValue();
// Einfuege-Position
Point aInsertPos;
- if ( pReqArgs->GetItemState(FN_PARAM_1,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState(FN_PARAM_1,sal_True,&pItem) == SFX_ITEM_SET )
aInsertPos = ((const SfxPointItem*)pItem)->GetValue();
else
aInsertPos = GetInsertPos();
// als Link?
- BOOL bAsLink = FALSE;
- if ( pReqArgs->GetItemState(FN_PARAM_2,TRUE,&pItem) == SFX_ITEM_SET )
+ sal_Bool bAsLink = false;
+ if ( pReqArgs->GetItemState(FN_PARAM_2,sal_True,&pItem) == SFX_ITEM_SET )
bAsLink = ((const SfxBoolItem*)pItem)->GetValue();
// ausfuehren
@@ -161,10 +161,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_EDIT_PRINTAREA:
{
- USHORT nId = ScPrintAreasDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScPrintAreasDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -175,18 +175,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
String aPrintStr;
String aRowStr;
String aColStr;
- BOOL bEntire = FALSE;
+ sal_Bool bEntire = false;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET )
aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET )
aRowStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_3, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_3, sal_True, &pItem ) == SFX_ITEM_SET )
aColStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_4, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_4, sal_True, &pItem ) == SFX_ITEM_SET )
bEntire = static_cast<const SfxBoolItem*>(pItem)->GetValue();
- SetPrintRanges( bEntire, &aPrintStr, &aColStr, &aRowStr, FALSE );
+ SetPrintRanges( bEntire, &aPrintStr, &aColStr, &aRowStr, false );
rReq.Done();
}
@@ -196,18 +196,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ADD_PRINTAREA:
case SID_DEFINE_PRINTAREA: // Menue oder Basic
{
- BOOL bAdd = ( nSlot == SID_ADD_PRINTAREA );
+ sal_Bool bAdd = ( nSlot == SID_ADD_PRINTAREA );
if ( pReqArgs )
{
String aPrintStr;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET )
aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- SetPrintRanges( FALSE, &aPrintStr, NULL, NULL, bAdd );
+ SetPrintRanges( false, &aPrintStr, NULL, NULL, bAdd );
}
else
{
- SetPrintRanges( FALSE, NULL, NULL, NULL, bAdd ); // aus Selektion
+ SetPrintRanges( false, NULL, NULL, NULL, bAdd ); // aus Selektion
rReq.Done();
}
}
@@ -216,7 +216,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_DELETE_PRINTAREA:
{
String aEmpty;
- SetPrintRanges( FALSE, &aEmpty, NULL, NULL, FALSE ); // Druckbereich loeschen
+ SetPrintRanges( false, &aEmpty, NULL, NULL, false ); // Druckbereich loeschen
rReq.Done();
}
break;
@@ -249,18 +249,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
String aAddress;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
aAddress = ((const SfxStringItem*)pItem)->GetValue();
else if ( nSlot == SID_JUMPTOMARK && pReqArgs->GetItemState(
- SID_JUMPTOMARK, TRUE, &pItem ) == SFX_ITEM_SET )
+ SID_JUMPTOMARK, sal_True, &pItem ) == SFX_ITEM_SET )
aAddress = ((const SfxStringItem*)pItem)->GetValue();
// #i14927# SID_CURRENTCELL with a single cell must unmark if FN_PARAM_1
// isn't set (for recorded macros, because IsAPI is no longer available).
// ScGridWindow::MouseButtonUp no longer executes the slot for a single
// cell if there is a multi selection.
- BOOL bUnmark = ( nSlot == SID_CURRENTCELL );
- if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bUnmark = ( nSlot == SID_CURRENTCELL );
+ if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
bUnmark = ((const SfxBoolItem*)pItem)->GetValue();
bool bAlignToCursor = true;
@@ -275,15 +275,15 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
RTL_TEXTENCODING_UTF8 );
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScViewData* pViewData = GetViewData();
ScDocument* pDoc = pViewData->GetDocument();
ScMarkData& rMark = pViewData->GetMarkData();
ScRange aScRange;
ScAddress aScAddress;
- USHORT nResult = lcl_ParseRange(aScRange, aAddress, pDoc, nSlot);
+ sal_uInt16 nResult = lcl_ParseRange(aScRange, aAddress, pDoc, nSlot);
SCTAB nTab = pViewData->GetTabNo();
- BOOL bMark = TRUE;
+ sal_Bool bMark = sal_True;
// Is this a range ?
if( nResult & SCA_VALID )
@@ -312,7 +312,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
aScRange = ScRange( aScAddress, aScAddress );
// Zellen sollen nicht markiert werden
- bMark = FALSE;
+ bMark = false;
}
// Ist es benahmster Bereich (erst Namen dann DBBereiche) ?
else
@@ -340,7 +340,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
aScAddress.SetCol( pViewData->GetCurX() );
aScAddress.SetTab( nTab );
aScRange = ScRange( aScAddress, aScAddress );
- bMark = FALSE;
+ bMark = false;
nResult = SCA_VALID;
}
}
@@ -351,10 +351,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// wir haben was gefunden
if( nResult & SCA_VALID )
{
- bFound = TRUE;
+ bFound = sal_True;
SCCOL nCol = aScRange.aStart.Col();
SCROW nRow = aScRange.aStart.Row();
- BOOL bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow );
+ sal_Bool bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow );
// markieren
if( bMark )
@@ -369,18 +369,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
bNothing = ( aCurrent == aOldMark );
}
else
- bNothing = FALSE;
+ bNothing = false;
if (!bNothing)
- MarkRange( aScRange, FALSE ); // Cursor kommt hinterher...
+ MarkRange( aScRange, false ); // Cursor kommt hinterher...
}
else
{
- // remove old selection, unless bUnmark argument is FALSE (from navigator)
+ // remove old selection, unless bUnmark argument is sal_False (from navigator)
if( bUnmark )
{
MoveCursorAbs( nCol, nRow,
- SC_FOLLOW_NONE, FALSE, FALSE );
+ SC_FOLLOW_NONE, false, false );
}
}
@@ -426,7 +426,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nNameTab;
if ( pDoc->GetTable( aAddress, nNameTab ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nNameTab != nTab )
SetTabNo( nNameTab );
}
@@ -478,7 +478,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrame = NULL;
ScDocShell* pDocSh = (ScDocShell*)SfxObjectShell::GetFirst();
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
// zu aktivierenden ViewFrame suchen
@@ -543,13 +543,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_NORMALVIEWMODE:
case FID_PAGEBREAKMODE:
{
- BOOL bWantPageBreak = nSlot == FID_PAGEBREAKMODE;
+ sal_Bool bWantPageBreak = nSlot == FID_PAGEBREAKMODE;
// check whether there is an explicit argument, use it
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
{
- BOOL bItemValue = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bItemValue = ((const SfxBoolItem*)pItem)->GetValue();
bWantPageBreak = (nSlot == FID_PAGEBREAKMODE) == bItemValue;
}
@@ -557,12 +557,12 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
SetPagebreakMode( bWantPageBreak );
UpdatePageBreakData();
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
PaintGrid();
PaintTop();
PaintLeft();
rBindings.Invalidate( nSlot );
- rReq.AppendItem( SfxBoolItem( nSlot, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( nSlot, sal_True ) );
rReq.Done();
}
}
@@ -570,7 +570,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_FUNCTION_BOX:
{
- USHORT nChildId = ScFunctionChildWindow::GetChildWindowId();
+ sal_uInt16 nChildId = ScFunctionChildWindow::GetChildWindowId();
if ( rReq.GetArgs() )
pThisFrame->SetChildWindow( nChildId, ((const SfxBoolItem&) (rReq.GetArgs()->Get(FID_FUNCTION_BOX))).GetValue());
else
@@ -587,9 +587,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_TOGGLESYNTAX:
{
- BOOL bSet = !GetViewData()->IsSyntaxMode();
+ sal_Bool bSet = !GetViewData()->IsSyntaxMode();
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
GetViewData()->SetSyntaxMode( bSet );
PaintGrid();
@@ -600,9 +600,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
break;
case FID_TOGGLEHEADERS:
{
- BOOL bSet = !GetViewData()->IsHeaderMode();
+ sal_Bool bSet = !GetViewData()->IsHeaderMode();
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
GetViewData()->SetHeaderMode( bSet );
RepeatResize();
@@ -616,9 +616,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
ScViewData* pViewData = GetViewData();
const ScViewOptions& rOpts = pViewData->GetOptions();
- BOOL bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS );
+ sal_Bool bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS );
const SfxPoolItem *pItem;
- if( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bFormulaMode = ((const SfxBoolItem *)pItem)->GetValue();
ScViewOptions rSetOpts = ScViewOptions( rOpts );
@@ -635,11 +635,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_TOGGLEINPUTLINE:
{
- USHORT nId = ScInputWindowWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- BOOL bSet = ( pWnd == NULL );
+ sal_Bool bSet = ( pWnd == NULL );
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
pThisFrame->SetChildWindow( nId, bSet );
@@ -652,14 +652,14 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOM: // Statuszeile
case FID_SCALE:
{
- BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
+ sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
SvxZoomType eOldZoomType = GetZoomType();
SvxZoomType eNewZoomType = eOldZoomType;
const Fraction& rOldY = GetViewData()->GetZoomY(); // Y wird angezeigt
- USHORT nOldZoom = (USHORT)(( rOldY.GetNumerator() * 100 )
+ sal_uInt16 nOldZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 )
/ rOldY.GetDenominator());
- USHORT nZoom = nOldZoom;
- BOOL bCancel = FALSE;
+ sal_uInt16 nZoom = nOldZoom;
+ sal_Bool bCancel = false;
if ( pReqArgs )
{
@@ -675,7 +675,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SvxZoomItem aZoomItem( eOldZoomType, nOldZoom, SID_ATTR_ZOOM );
AbstractSvxZoomDialog* pDlg = NULL;
ScMarkData& rMark = GetViewData()->GetMarkData();
- USHORT nBtnFlags = SVX_ZOOM_ENABLE_50
+ sal_uInt16 nBtnFlags = SVX_ZOOM_ENABLE_50
| SVX_ZOOM_ENABLE_75
| SVX_ZOOM_ENABLE_100
| SVX_ZOOM_ENABLE_150
@@ -764,10 +764,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOMSLIDER:
{
const SfxPoolItem* pItem = NULL;
- BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
- if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem) == SFX_ITEM_SET )
+ sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
+ if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem) == SFX_ITEM_SET )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
if( nCurrentZoom )
{
SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom );
@@ -811,7 +811,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nTab;
SvULongs aIndexList( 4, 4 );
- SFX_REQUEST_ARG( rReq, pItem, SfxIntegerListItem, SID_SELECT_TABLES, sal_False );
+ SFX_REQUEST_ARG( rReq, pItem, SfxIntegerListItem, SID_SELECT_TABLES, false );
if ( pItem )
pItem->GetList( aIndexList );
else
@@ -824,7 +824,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pDlg->SetDescription(
String( ScResId( STR_DLG_SELECTTABLES_TITLE ) ),
String( ScResId( STR_DLG_SELECTTABLES_LBNAME ) ),
- SID_SELECT_TABLES, HID_SELECTTABLES );
+ GetStaticInterface()->GetSlot(SID_SELECT_TABLES)->GetCommand(), HID_SELECTTABLES );
// fill all table names with selection state
String aTabName;
@@ -854,7 +854,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nFirstVisTab = 0;
// special case: only hidden tables selected -> do nothing
- sal_Bool bVisSelected = sal_False;
+ sal_Bool bVisSelected = false;
for( nSelIx = 0; !bVisSelected && (nSelIx < nSelCount); ++nSelIx )
bVisSelected = rDoc.IsVisible( nFirstVisTab = static_cast<SCTAB>(aIndexList[nSelIx]) );
if( !bVisSelected )
@@ -864,7 +864,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if( nSelCount )
{
for( nTab = 0; nTab < nTabCount; ++nTab )
- rMark.SelectTable( nTab, sal_False );
+ rMark.SelectTable( nTab, false );
for( nSelIx = 0; nSelIx < nSelCount; ++nSelIx )
rMark.SelectTable( static_cast<SCTAB>(aIndexList[nSelIx]), sal_True );
@@ -906,7 +906,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( eHSplit == SC_SPLIT_NORMAL || eVSplit == SC_SPLIT_NORMAL ) // aufheben
RemoveSplit();
else if ( eHSplit == SC_SPLIT_FIX || eVSplit == SC_SPLIT_FIX ) // normal
- FreezeSplitters( FALSE );
+ FreezeSplitters( false );
else // erzeugen
SplitAtCursor();
rReq.Done();
@@ -922,7 +922,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( eHSplit == SC_SPLIT_FIX || eVSplit == SC_SPLIT_FIX ) // aufheben
RemoveSplit();
else
- FreezeSplitters( TRUE ); // erzeugen oder fixieren
+ FreezeSplitters( sal_True ); // erzeugen oder fixieren
rReq.Done();
InvalidateSplit();
@@ -933,10 +933,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_CHG_SHOW:
{
- USHORT nId = ScHighlightChgDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScHighlightChgDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -947,10 +947,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
rReq.Done ();
/*
- USHORT nId = ScAcceptChgDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True );
*/
}
break;
@@ -966,7 +966,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SfxStringItem ) )
{
String aComment = ((const SfxStringItem*)pItem)->GetValue();
@@ -988,7 +988,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if (!GetScDrawView())
{
GetViewData()->GetDocShell()->MakeDrawLayer();
- rBindings.InvalidateAll(FALSE);
+ rBindings.InvalidateAll(false);
}
break;
@@ -1011,7 +1011,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
ScDocProtection* pProtect = pDoc->GetDocProtection();
if (pProtect && pProtect->isProtected())
{
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = false;
String aPassword;
if (pProtect->isProtectedWithPass())
@@ -1021,19 +1021,19 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pDlg = new SfxPasswordDialog( GetDialogParent(), &aText );
pDlg->SetText( ScResId(SCSTR_UNPROTECTDOC) );
pDlg->SetMinLen( 0 );
- pDlg->SetHelpId( FID_PROTECT_DOC );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand() );
pDlg->SetEditHelpId( HID_PASSWD_DOC );
if (pDlg->Execute() == RET_OK)
aPassword = pDlg->GetPassword();
else
- bCancel = TRUE;
+ bCancel = sal_True;
delete pDlg;
}
if (!bCancel)
{
Unprotect( TABLEID_DOC, aPassword );
- rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, FALSE ) );
+ rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, false ) );
rReq.Done();
}
}
@@ -1044,7 +1044,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pDlg = new SfxPasswordDialog( GetDialogParent(), &aText );
pDlg->SetText( ScResId(SCSTR_PROTECTDOC) );
pDlg->SetMinLen( 0 );
- pDlg->SetHelpId( FID_PROTECT_DOC );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand() );
pDlg->SetEditHelpId( HID_PASSWD_DOC );
pDlg->ShowExtras( SHOWEXTRAS_CONFIRM );
@@ -1052,7 +1052,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
String aPassword = pDlg->GetPassword();
Protect( TABLEID_DOC, aPassword );
- rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, sal_True ) );
rReq.Done();
}
@@ -1093,7 +1093,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
auto_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
pDlg->SetText( ScResId(SCSTR_UNPROTECTTAB) );
pDlg->SetMinLen( 0 );
- pDlg->SetHelpId( FID_PROTECT_TABLE );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_TABLE)->GetCommand() );
pDlg->SetEditHelpId( HID_PASSWD_TABLE );
if (pDlg->Execute() == RET_OK)
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index ef78925d3dff..6df3e1b84ebf 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -47,7 +47,6 @@
#include <sfx2/request.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
#include <rtl/logfile.hxx>
@@ -108,13 +107,13 @@ using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
-USHORT ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC;
-USHORT ScTabViewShell::nInsCellsCtrlState = 0;
-USHORT ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM;
+sal_uInt16 ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC;
+sal_uInt16 ScTabViewShell::nInsCellsCtrlState = 0;
+sal_uInt16 ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM;
// -----------------------------------------------------------------------
-void ScTabViewShell::Activate(BOOL bMDI)
+void ScTabViewShell::Activate(sal_Bool bMDI)
{
SfxViewShell::Activate(bMDI);
@@ -126,7 +125,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
ScModule* pScMod = SC_MOD();
pScMod->ViewShellChanged();
- ActivateView( TRUE, bFirstActivate );
+ ActivateView( sal_True, bFirstActivate );
ActivateOlk( GetViewData() );
// AutoCorrect umsetzen, falls der Writer seins neu angelegt hat
@@ -167,12 +166,12 @@ void ScTabViewShell::Activate(BOOL bMDI)
}
}
- UpdateInputHandler( TRUE );
+ UpdateInputHandler( sal_True );
if ( bFirstActivate )
{
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) );
- bFirstActivate = FALSE;
+ bFirstActivate = false;
// ReadExtOptions (view settings from Excel import) must also be done
// after the ctor, because of the potential calls to Window::Show.
@@ -184,7 +183,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
if ( pExtOpt && pExtOpt->IsChanged() )
{
GetViewData()->ReadExtOptions(*pExtOpt); // Excel view settings
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
pExtOpt->SetChanged( false );
}
}
@@ -210,7 +209,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
if(pScMod->IsRefDialogOpen())
{
- USHORT nModRefDlgId=pScMod->GetCurRefDlgId();
+ sal_uInt16 nModRefDlgId=pScMod->GetCurRefDlgId();
SfxChildWindow* pChildWnd = pThisFrame->GetChildWindow( nModRefDlgId );
if ( pChildWnd )
{
@@ -228,7 +227,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
// beim Umschalten zwischen Dokumenten)
}
-void ScTabViewShell::Deactivate(BOOL bMDI)
+void ScTabViewShell::Deactivate(sal_Bool bMDI)
{
HideTip();
@@ -250,17 +249,17 @@ void ScTabViewShell::Deactivate(BOOL bMDI)
{
// during shell deactivation, shells must not be switched, or the loop
// through the shell stack (in SfxDispatcher::DoDeactivate_Impl) will not work
- BOOL bOldDontSwitch = bDontSwitch;
- bDontSwitch = TRUE;
+ sal_Bool bOldDontSwitch = bDontSwitch;
+ bDontSwitch = sal_True;
DeActivateOlk( GetViewData() );
- ActivateView( FALSE, FALSE );
+ ActivateView( false, false );
if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
- GetViewData()->GetDocShell()->UpdateOle(GetViewData(),TRUE);
+ GetViewData()->GetDocShell()->UpdateOle(GetViewData(),sal_True);
if ( pHdl )
- pHdl->NotifyChange( NULL, TRUE ); // Timer-verzoegert wg. Dokumentwechsel
+ pHdl->NotifyChange( NULL, sal_True ); // Timer-verzoegert wg. Dokumentwechsel
if (pScActiveViewShell == this)
pScActiveViewShell = NULL;
@@ -283,7 +282,7 @@ void ScTabViewShell::SetActive()
ActiveGrabFocus();
}
-USHORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing)
+sal_uInt16 ScTabViewShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing)
{
// Call EnterHandler even in formula mode here,
// so a formula change in an embedded object isn't lost
@@ -310,8 +309,8 @@ USHORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing)
if ( pFormShell )
{
- USHORT nRet = pFormShell->PrepareClose(bUI, bForBrowsing);
- if (nRet!=TRUE)
+ sal_uInt16 nRet = pFormShell->PrepareClose(bUI, bForBrowsing);
+ if (nRet!=sal_True)
return nRet;
}
return SfxViewShell::PrepareClose(bUI,bForBrowsing);
@@ -408,7 +407,7 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
aNewSize.Height() += aBorder.Top() + aBorder.Bottom();
}
- DoResize( rOfs, aNewSize, TRUE ); // rSize = Groesse von gridwin
+ DoResize( rOfs, aNewSize, sal_True ); // rSize = Groesse von gridwin
UpdateOleZoom(); // Zoom fuer In-Place berechnen
@@ -448,7 +447,7 @@ void ScTabViewShell::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoo
aNewY = aFrac400;
GetViewData()->UpdateScreenZoom( aNewX, aNewY );
- SetZoom( aNewX, aNewY, TRUE );
+ SetZoom( aNewX, aNewY, sal_True );
PaintGrid();
PaintTop();
@@ -471,7 +470,7 @@ void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
SCCOL nCol = pViewData->GetPosX(WhichH(ePos));
SCROW nRow = pViewData->GetPosY(WhichV(ePos));
SCTAB nTab = pViewData->GetTabNo();
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab );
if ( bNegativePage )
@@ -515,7 +514,7 @@ void ScTabViewShell::ShowCursor(bool /* bOn */)
//------------------------------------------------------------------
-void ScTabViewShell::WriteUserData(String& rData, BOOL /* bBrowse */)
+void ScTabViewShell::WriteUserData(String& rData, sal_Bool /* bBrowse */)
{
GetViewData()->WriteUserData(rData);
}
@@ -525,7 +524,7 @@ void ScTabViewShell::WriteUserDataSequence (uno::Sequence < beans::PropertyValue
GetViewData()->WriteUserDataSequence (rSettings);
}
-void ScTabViewShell::ReadUserData(const String& rData, BOOL /* bBrowse */)
+void ScTabViewShell::ReadUserData(const String& rData, sal_Bool /* bBrowse */)
{
if ( !GetViewData()->GetDocShell()->IsPreview() )
DoReadUserData( rData );
@@ -540,13 +539,13 @@ void ScTabViewShell::ReadUserDataSequence (const uno::Sequence < beans::Property
void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::PropertyValue >& rSettings )
{
Window* pOldWin = GetActiveWin();
- BOOL bFocus = pOldWin && pOldWin->HasFocus();
+ sal_Bool bFocus = pOldWin && pOldWin->HasFocus();
GetViewData()->ReadUserDataSequence(rSettings);
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
if ( GetViewData()->IsPagebreakMode() )
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
Window* pNewWin = GetActiveWin();
if (pNewWin && pNewWin != pOldWin)
@@ -575,13 +574,13 @@ void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::Proper
void ScTabViewShell::DoReadUserData( const String& rData )
{
Window* pOldWin = GetActiveWin();
- BOOL bFocus = pOldWin && pOldWin->HasFocus();
+ sal_Bool bFocus = pOldWin && pOldWin->HasFocus();
GetViewData()->ReadUserData(rData);
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
if ( GetViewData()->IsPagebreakMode() )
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
Window* pNewWin = GetActiveWin();
if (pNewWin && pNewWin != pOldWin)
@@ -610,7 +609,7 @@ void ScTabViewShell::DoReadUserData( const String& rData )
void ScTabViewShell::SetDrawShellOrSub()
{
- bActiveDrawSh = TRUE;
+ bActiveDrawSh = sal_True;
if(bActiveDrawFormSh)
{
@@ -640,7 +639,7 @@ void ScTabViewShell::SetDrawShellOrSub()
}
}
-void ScTabViewShell::SetDrawShell( BOOL bActive )
+void ScTabViewShell::SetDrawShell( sal_Bool bActive )
{
if(bActive)
{
@@ -656,17 +655,17 @@ void ScTabViewShell::SetDrawShell( BOOL bActive )
{
SetCurSubShell(OST_Cell);
}
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
}
- BOOL bWasDraw = bActiveDrawSh || bActiveDrawTextSh;
+ sal_Bool bWasDraw = bActiveDrawSh || bActiveDrawTextSh;
bActiveDrawSh = bActive;
- bActiveDrawTextSh = FALSE;
+ bActiveDrawTextSh = false;
if ( !bActive )
{
@@ -677,22 +676,22 @@ void ScTabViewShell::SetDrawShell( BOOL bActive )
{
// Aktiven Teil an Cursor anpassen, etc.
MoveCursorAbs( GetViewData()->GetCurX(), GetViewData()->GetCurY(),
- SC_FOLLOW_NONE, FALSE, FALSE, TRUE );
+ SC_FOLLOW_NONE, false, false, sal_True );
}
}
}
-void ScTabViewShell::SetDrawTextShell( BOOL bActive )
+void ScTabViewShell::SetDrawTextShell( sal_Bool bActive )
{
bActiveDrawTextSh = bActive;
if ( bActive )
{
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
- bActiveDrawSh = FALSE;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
+ bActiveDrawSh = false;
SetCurSubShell(OST_DrawText);
}
else
@@ -700,7 +699,7 @@ void ScTabViewShell::SetDrawTextShell( BOOL bActive )
}
-void ScTabViewShell::SetPivotShell( BOOL bActive )
+void ScTabViewShell::SetPivotShell( sal_Bool bActive )
{
bActivePivotSh = bActive;
@@ -711,12 +710,12 @@ void ScTabViewShell::SetPivotShell( BOOL bActive )
{
if ( bActive )
{
- bActiveDrawTextSh = bActiveDrawSh = FALSE;
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
+ bActiveDrawTextSh = bActiveDrawSh = false;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
SetCurSubShell(OST_Pivot);
}
else
@@ -724,31 +723,31 @@ void ScTabViewShell::SetPivotShell( BOOL bActive )
}
}
-void ScTabViewShell::SetAuditShell( BOOL bActive )
+void ScTabViewShell::SetAuditShell( sal_Bool bActive )
{
bActiveAuditingSh = bActive;
if ( bActive )
{
- bActiveDrawTextSh = bActiveDrawSh = FALSE;
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
+ bActiveDrawTextSh = bActiveDrawSh = false;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
SetCurSubShell(OST_Auditing);
}
else
SetCurSubShell(OST_Cell);
}
-void ScTabViewShell::SetDrawFormShell( BOOL bActive )
+void ScTabViewShell::SetDrawFormShell( sal_Bool bActive )
{
bActiveDrawFormSh = bActive;
if(bActiveDrawFormSh)
SetCurSubShell(OST_DrawForm);
}
-void ScTabViewShell::SetChartShell( BOOL bActive )
+void ScTabViewShell::SetChartShell( sal_Bool bActive )
{
bActiveChartSh = bActive;
@@ -756,7 +755,7 @@ void ScTabViewShell::SetChartShell( BOOL bActive )
SetCurSubShell(OST_Chart);
}
-void ScTabViewShell::SetGraphicShell( BOOL bActive )
+void ScTabViewShell::SetGraphicShell( sal_Bool bActive )
{
bActiveGraphicSh = bActive;
@@ -764,7 +763,7 @@ void ScTabViewShell::SetGraphicShell( BOOL bActive )
SetCurSubShell(OST_Graphic);
}
-void ScTabViewShell::SetMediaShell( BOOL bActive )
+void ScTabViewShell::SetMediaShell( sal_Bool bActive )
{
bActiveMediaSh = bActive;
@@ -772,7 +771,7 @@ void ScTabViewShell::SetMediaShell( BOOL bActive )
SetCurSubShell(OST_Media);
}
-void ScTabViewShell::SetOleObjectShell( BOOL bActive )
+void ScTabViewShell::SetOleObjectShell( sal_Bool bActive )
{
bActiveOleObjectSh = bActive;
@@ -782,7 +781,7 @@ void ScTabViewShell::SetOleObjectShell( BOOL bActive )
SetCurSubShell(OST_Cell);
}
-void ScTabViewShell::SetEditShell(EditView* pView, BOOL bActive )
+void ScTabViewShell::SetEditShell(EditView* pView, sal_Bool bActive )
{
if(bActive)
{
@@ -800,7 +799,7 @@ void ScTabViewShell::SetEditShell(EditView* pView, BOOL bActive )
bActiveEditSh = bActive;
}
-void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
+void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce)
{
ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell();
@@ -813,7 +812,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pCellShell->SetRepeatTarget( &aTarget );
}
- BOOL bPgBrk=pViewData->IsPagebreakMode();
+ sal_Bool bPgBrk=pViewData->IsPagebreakMode();
if(bPgBrk && !pPageBreakShell)
{
@@ -824,8 +823,8 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
if ( eOST!=eCurOST || bForce )
{
- BOOL bCellBrush = FALSE; // "format paint brush" allowed for cells
- BOOL bDrawBrush = FALSE; // "format paint brush" allowed for drawing objects
+ sal_Bool bCellBrush = false; // "format paint brush" allowed for cells
+ sal_Bool bDrawBrush = false; // "format paint brush" allowed for drawing objects
if(eCurOST!=OST_NONE) RemoveSubShell();
@@ -838,7 +837,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
{
AddSubShell(*pCellShell);
if(bPgBrk) AddSubShell(*pPageBreakShell);
- bCellBrush = TRUE;
+ bCellBrush = sal_True;
}
break;
case OST_Editing:
@@ -885,7 +884,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pDrawShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pDrawShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -898,7 +897,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pDrawFormShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pDrawFormShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -911,7 +910,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pChartShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pChartShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -924,7 +923,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pOleObjectShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pOleObjectShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -937,7 +936,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pGraphicShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pGraphicShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -964,7 +963,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pPivotShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pPivotShell);
- bCellBrush = TRUE;
+ bCellBrush = sal_True;
}
break;
case OST_Auditing:
@@ -980,7 +979,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pAuditingShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pAuditingShell);
- bCellBrush = TRUE;
+ bCellBrush = sal_True;
}
break;
default:
@@ -999,7 +998,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
}
}
-void ScTabViewShell::SetFormShellAtTop( BOOL bSet )
+void ScTabViewShell::SetFormShellAtTop( sal_Bool bSet )
{
if ( pFormShell && !bSet )
pFormShell->ForgetActiveControl(); // let the FormShell know it no longer has the focus
@@ -1007,14 +1006,14 @@ void ScTabViewShell::SetFormShellAtTop( BOOL bSet )
if ( bFormShellAtTop != bSet )
{
bFormShellAtTop = bSet;
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
}
}
IMPL_LINK( ScTabViewShell, FormControlActivated, FmFormShell*, EMPTYARG )
{
// a form control got the focus, so the form shell has to be on top
- SetFormShellAtTop( TRUE );
+ SetFormShellAtTop( sal_True );
return 0;
}
@@ -1028,9 +1027,9 @@ ObjectSelectionType ScTabViewShell::GetCurObjectSelectionType()
SfxShell* ScTabViewShell::GetMySubShell() const
{
- // GetSubShell() war frueher const, und GetSubShell(USHORT) sollte es auch sein...
+ // GetSubShell() war frueher const, und GetSubShell(sal_uInt16) sollte es auch sein...
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SfxShell* pSub = ((ScTabViewShell*)this)->GetSubShell(nPos);
while (pSub)
{
@@ -1046,17 +1045,17 @@ SfxShell* ScTabViewShell::GetMySubShell() const
}
-BOOL ScTabViewShell::IsDrawTextShell() const
+sal_Bool ScTabViewShell::IsDrawTextShell() const
{
return ( pDrawTextShell && ( GetMySubShell() == pDrawTextShell ) );
}
-BOOL ScTabViewShell::IsAuditShell() const
+sal_Bool ScTabViewShell::IsAuditShell() const
{
return ( pAuditingShell && ( GetMySubShell() == pAuditingShell ) );
}
-void ScTabViewShell::SetDrawTextUndo( SfxUndoManager* pNewUndoMgr )
+void ScTabViewShell::SetDrawTextUndo( ::svl::IUndoManager* pNewUndoMgr )
{
// Default: Undo-Manager der DocShell
if (!pNewUndoMgr)
@@ -1087,13 +1086,13 @@ ScTabViewShell* ScTabViewShell::GetActiveViewShell()
//------------------------------------------------------------------
-SfxPrinter* ScTabViewShell::GetPrinter( BOOL bCreate )
+SfxPrinter* ScTabViewShell::GetPrinter( sal_Bool bCreate )
{
// Drucker ist immer da (wird fuer die FontListe schon beim Starten angelegt)
return GetViewData()->GetDocShell()->GetPrinter(bCreate);
}
-USHORT ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
return GetViewData()->GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags );
}
@@ -1122,7 +1121,7 @@ PrintDialog* ScTabViewShell::CreatePrintDialog( Window *pParent )
pDocShell->UpdatePendingRowHeights( MAXTAB, true );
ScMarkData aMarkData;
- aMarkData.SelectTable( GetViewData()->GetTabNo(), TRUE );
+ aMarkData.SelectTable( GetViewData()->GetTabNo(), true );
for ( SCTAB i=0; i<nTabCount; i++ )
{
@@ -1147,8 +1146,8 @@ PrintDialog* ScTabViewShell::CreatePrintDialog( Window *pParent )
pDlg->EnableRange ( PRINTDIALOG_RANGE );
pDlg->SetFirstPage ( 1 );
pDlg->SetMinPage ( 1 );
- pDlg->SetLastPage ( (USHORT)nDocPageMax );
- pDlg->SetMaxPage ( (USHORT)nDocPageMax );
+ pDlg->SetLastPage ( (sal_uInt16)nDocPageMax );
+ pDlg->SetMaxPage ( (sal_uInt16)nDocPageMax );
pDlg->EnableCollate ();
return pDlg;
@@ -1173,7 +1172,7 @@ void ScTabViewShell::PreparePrint( PrintDialog* pPrintDialog )
}
ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI )
+ PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI )
{
// if SID_PRINTDOCDIRECT is executed and there's a selection,
// ask if only the selection should be printed
@@ -1188,7 +1187,7 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
return ERRCODE_IO_ABORT;
if ( nBtn == RET_OK )
- bPrintSelected = TRUE;
+ bPrintSelected = true;
}
ErrCode nRet = ERRCODE_IO_ABORT;
@@ -1201,7 +1200,7 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
uno::Sequence<sal_Int32> aSheets;
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
- USHORT nPrinted = 0;
+ sal_uInt16 nPrinted = 0;
for ( SCTAB nTab=0; nTab<nTabCount; nTab++ )
if ( bAllTabs || rMarkData.GetTableSelect(nTab) )
{
@@ -1219,12 +1218,12 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
nRet = SfxViewShell::DoPrint( pPrinter, pPrintDialog, bSilent, bIsAPI );
}
- bPrintSelected = FALSE;
+ bPrintSelected = false;
return nRet;
}
-USHORT ScTabViewShell::Print( SfxProgress& rProgress, BOOL bIsAPI,
+sal_uInt16 ScTabViewShell::Print( SfxProgress& rProgress, sal_Bool bIsAPI,
PrintDialog* pPrintDialog )
{
ScDocShell* pDocShell = GetViewData()->GetDocShell();
@@ -1239,7 +1238,7 @@ USHORT ScTabViewShell::Print( SfxProgress& rProgress, BOOL bIsAPI,
void ScTabViewShell::StopEditShell()
{
if ( pEditShell != NULL && !bDontSwitch )
- SetEditShell(NULL, FALSE );
+ SetEditShell(NULL, false );
}
//------------------------------------------------------------------
@@ -1257,7 +1256,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefClose, String*, EMPTYARG )
SetTabNo( GetViewData()->GetRefTabNo() );
}
- ScSimpleRefDlgWrapper::SetAutoReOpen( TRUE );
+ ScSimpleRefDlgWrapper::SetAutoReOpen( sal_True );
return 0;
}
@@ -1303,7 +1302,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefChange, String*, pResult )
void ScTabViewShell::StartSimpleRefDialog(
const String& rTitle, const String& rInitVal,
- BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection )
+ sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection )
{
SfxViewFrame* pViewFrm = GetViewFrame();
@@ -1316,9 +1315,9 @@ void ScTabViewShell::StartSimpleRefDialog(
pViewFrm->GetFrame().Appear();
}
- USHORT nId = ScSimpleRefDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId();
- SC_MOD()->SetRefDialog( nId, TRUE, pViewFrm );
+ SC_MOD()->SetRefDialog( nId, sal_True, pViewFrm );
ScSimpleRefDlgWrapper* pWnd = (ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId );
if (pWnd)
@@ -1329,7 +1328,7 @@ void ScTabViewShell::StartSimpleRefDialog(
LINK( this, ScTabViewShell, SimpleRefChange ) );
pWnd->SetRefString( rInitVal );
pWnd->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection );
- pWnd->SetAutoReOpen( FALSE );
+ pWnd->SetAutoReOpen( false );
Window* pWin = pWnd->GetWindow();
pWin->SetText( rTitle );
pWnd->StartRefInput();
@@ -1339,7 +1338,7 @@ void ScTabViewShell::StartSimpleRefDialog(
void ScTabViewShell::StopSimpleRefDialog()
{
SfxViewFrame* pViewFrm = GetViewFrame();
- USHORT nId = ScSimpleRefDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId();
ScSimpleRefDlgWrapper* pWnd = (ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId );
if (pWnd)
@@ -1352,29 +1351,29 @@ void ScTabViewShell::StopSimpleRefDialog()
//------------------------------------------------------------------
-BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
+sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
{
ScModule* pScMod = SC_MOD();
SfxViewFrame* pThisFrame = GetViewFrame();
if ( pThisFrame->GetChildWindow( SID_OPENDLG_FUNCTION ) )
- return FALSE;
+ return false;
KeyCode aCode = rKEvt.GetKeyCode();
- BOOL bShift = aCode.IsShift();
- BOOL bControl = aCode.IsMod1();
- BOOL bAlt = aCode.IsMod2();
- USHORT nCode = aCode.GetCode();
- BOOL bUsed = FALSE;
- BOOL bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles
- BOOL bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace
- BOOL bDraw = IsDrawTextEdit();
+ sal_Bool bShift = aCode.IsShift();
+ sal_Bool bControl = aCode.IsMod1();
+ sal_Bool bAlt = aCode.IsMod2();
+ sal_uInt16 nCode = aCode.GetCode();
+ sal_Bool bUsed = false;
+ sal_Bool bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles
+ sal_Bool bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace
+ sal_Bool bDraw = IsDrawTextEdit();
HideNoteMarker(); // Notiz-Anzeige
// don't do extra HideCursor/ShowCursor calls if EnterHandler will switch to a different sheet
- BOOL bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() );
- BOOL bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet;
+ sal_Bool bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() );
+ sal_Bool bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet;
if (bHideCursor)
HideAllCursors();
@@ -1387,17 +1386,17 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
{
bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe
if( !bUsed )
- bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators
+ bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators
}
else if( bAnyEdit )
{
- BOOL bIsType = FALSE;
- USHORT nModi = aCode.GetModifier();
- USHORT nGroup = aCode.GetGroup();
+ sal_Bool bIsType = false;
+ sal_uInt16 nModi = aCode.GetModifier();
+ sal_uInt16 nGroup = aCode.GetGroup();
if ( nGroup == KEYGROUP_NUM || nGroup == KEYGROUP_ALPHA || nGroup == 0 )
if ( !bControl && !bAlt )
- bIsType = TRUE;
+ bIsType = sal_True;
if ( nGroup == KEYGROUP_MISC )
switch ( nCode )
@@ -1419,14 +1418,14 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
bIsType = (nModi == 0); // nur ohne Modifier
break;
default:
- bIsType = TRUE;
+ bIsType = sal_True;
}
if( bIsType )
bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe
if( !bUsed )
- bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators
+ bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators
if ( !bUsed && !bIsType && nCode != KEY_RETURN ) // Eingabe nochmal hinterher
bUsed = pScMod->InputKeyEvent( rKEvt );
@@ -1444,20 +1443,20 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
!(eFunc == KEYFUNC_COPY && eMarkType == SC_MARK_SIMPLE_FILTERED) )
{
ErrorMessage(STR_NOMULTISELECT);
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
if (!bUsed)
- bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators
+ bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators
// during inplace editing, some slots are handled by the
// container app and are executed during Window::KeyInput.
// -> don't pass keys to input handler that would be used there
// but should call slots instead.
- BOOL bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW );
+ sal_Bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW );
if( !bUsed && !bDraw && nCode != KEY_RETURN && !bParent )
- bUsed = pScMod->InputKeyEvent( rKEvt, TRUE ); // Eingabe
+ bUsed = pScMod->InputKeyEvent( rKEvt, sal_True ); // Eingabe
}
if (!bInPlace && !bUsed && !bDraw)
@@ -1466,7 +1465,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
{
case KEY_RETURN:
{
- BOOL bNormal = !bControl && !bAlt;
+ sal_Bool bNormal = !bControl && !bAlt;
if ( !bAnyEdit && bNormal )
{
// je nach Optionen mit Enter in den Edit-Modus schalten
@@ -1475,17 +1474,17 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
if ( rOpt.GetEnterEdit() )
{
pScMod->SetInputMode( SC_INPUT_TABLE );
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
- BOOL bEditReturn = bControl && !bShift; // An Edit-Engine weiter
+ sal_Bool bEditReturn = bControl && !bShift; // An Edit-Engine weiter
if ( !bUsed && !bEditReturn )
{
if ( bOnRefSheet )
HideAllCursors();
- BYTE nMode = SC_ENTER_NORMAL;
+ sal_uInt8 nMode = SC_ENTER_NORMAL;
if ( bShift && bControl )
nMode = SC_ENTER_MATRIX;
else if ( bAlt )
@@ -1502,7 +1501,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD );
}
else
- UpdateInputHandler(TRUE);
+ UpdateInputHandler(sal_True);
if ( bOnRefSheet )
ShowAllCursors();
@@ -1511,7 +1510,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
// anderes Dokument diese ViewShell nicht die ist, auf der eingegeben
// wird!
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
break;
@@ -1522,24 +1521,24 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
if ( !bUsed && bAlt && !bControl )
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch (nCode)
{
case KEY_UP:
ModifyCellSize( DIR_TOP, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_DOWN:
ModifyCellSize( DIR_BOTTOM, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_LEFT:
ModifyCellSize( DIR_LEFT, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_RIGHT:
ModifyCellSize( DIR_RIGHT, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_PAGEUP:
nSlotId = bShift ? SID_CURSORPAGELEFT_SEL : SID_CURSORPAGELEFT_;
@@ -1551,7 +1550,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
if ( nSlotId )
{
GetViewData()->GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD );
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
@@ -1561,9 +1560,9 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
return bUsed;
}
-BOOL ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent)
+sal_Bool ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent)
{
- return sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKeyEvent ));
+ return sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKeyEvent ));
}
bool ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent )
@@ -1598,30 +1597,30 @@ bool ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent )
aTarget( this ), \
pDialogDPObject(NULL), \
pNavSettings(NULL), \
- bActiveDrawSh(FALSE), \
- bActiveDrawTextSh(FALSE), \
- bActivePivotSh(FALSE), \
- bActiveAuditingSh(FALSE), \
- bActiveDrawFormSh(FALSE), \
- bActiveOleObjectSh(FALSE), \
- bActiveChartSh(FALSE), \
- bActiveGraphicSh(FALSE), \
- bActiveMediaSh(FALSE), \
- bActiveEditSh(FALSE), \
- bFormShellAtTop(FALSE), \
- bDontSwitch(FALSE), \
- bInFormatDialog(FALSE), \
- bPrintSelected(FALSE), \
- bReadOnly(FALSE), \
+ bActiveDrawSh(false), \
+ bActiveDrawTextSh(false), \
+ bActivePivotSh(false), \
+ bActiveAuditingSh(false), \
+ bActiveDrawFormSh(false), \
+ bActiveOleObjectSh(false), \
+ bActiveChartSh(false), \
+ bActiveGraphicSh(false), \
+ bActiveMediaSh(false), \
+ bActiveEditSh(false), \
+ bFormShellAtTop(false), \
+ bDontSwitch(false), \
+ bInFormatDialog(false), \
+ bPrintSelected(false), \
+ bReadOnly(false), \
pScSbxObject(NULL), \
- bChartAreaValid(FALSE), \
+ bChartAreaValid(false), \
nCurRefDlgId(0), \
pAccessibilityBroadcaster(NULL)
//------------------------------------------------------------------
-void ScTabViewShell::Construct( BYTE nForceDesignMode )
+void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
{
SfxApplication* pSfxApp = SFX_APP();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -1636,12 +1635,12 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
pCurFrameLine = new SvxBorderLine( &aColBlack, 20, 0, 0 );
pPivotSource = new ScArea;
- StartListening(*GetViewData()->GetDocShell(),TRUE);
- StartListening(*GetViewFrame(),TRUE);
- StartListening(*pSfxApp,TRUE); // #i62045# #i62046# application is needed for Calc's own hints
+ StartListening(*GetViewData()->GetDocShell(),sal_True);
+ StartListening(*GetViewFrame(),sal_True);
+ StartListening(*pSfxApp,sal_True); // #i62045# #i62046# application is needed for Calc's own hints
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh);
- BOOL bFirstView = !pFirst
+ sal_Bool bFirstView = !pFirst
|| (pFirst == GetViewFrame() && !SfxViewFrame::GetNext(*pFirst,pDocSh));
if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
@@ -1656,19 +1655,19 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
pDoc->SetVisibleTab(nVisTab);
}
SetTabNo( nVisTab );
- BOOL bNegativePage = pDoc->IsNegativePage( nVisTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nVisTab );
// show the right cells
GetViewData()->SetScreenPos( bNegativePage ? aVisArea.TopRight() : aVisArea.TopLeft() );
if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
{
- pDocSh->SetInplace( TRUE ); // schon so initialisiert
+ pDocSh->SetInplace( sal_True ); // schon so initialisiert
if (pDoc->IsEmbedded())
pDoc->ResetEmbedded(); // keine blaue Markierung
}
else if ( bFirstView )
{
- pDocSh->SetInplace( FALSE );
+ pDocSh->SetInplace( false );
GetViewData()->RefreshZoom(); // recalculate PPT
if (!pDoc->IsEmbedded())
pDoc->SetEmbedded( aVisArea ); // VisArea markieren
@@ -1701,9 +1700,9 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
// wenn die ViewShell noch nicht kostruiert ist...
if (pDoc->GetDrawLayer())
MakeDrawView( nForceDesignMode );
- ViewOptionsHasChanged(FALSE); // legt auch evtl. DrawView an
+ ViewOptionsHasChanged(false); // legt auch evtl. DrawView an
- SfxUndoManager* pMgr = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pDocSh->GetUndoManager();
SetUndoManager( pMgr );
pFormShell->SetUndoManager( pMgr );
if ( !pDoc->IsUndoEnabled() )
@@ -1716,7 +1715,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
if ( bFirstView ) // first view?
{
- pDoc->SetDocVisible( TRUE ); // used when creating new sheets
+ pDoc->SetDocVisible( sal_True ); // used when creating new sheets
if ( pDocSh->IsEmpty() )
{
// set first sheet's RTL flag (following will already be initialized because of SetDocVisible)
@@ -1737,7 +1736,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
pDoc->MakeTable(i,false);
}
- pDocSh->SetEmpty( FALSE ); // #i6232# make sure this is done only once
+ pDocSh->SetEmpty( false ); // #i6232# make sure this is done only once
}
// ReadExtOptions is now in Activate
@@ -1758,7 +1757,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
}
if (!bLink)
if (pDoc->HasDdeLinks() || pDoc->HasAreaLinks())
- bLink = TRUE;
+ bLink = sal_True;
if (bLink)
{
if ( !pFirst )
@@ -1771,17 +1770,17 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
}
}
- BOOL bReImport = FALSE; // importierte Daten aktualisieren
+ sal_Bool bReImport = false; // importierte Daten aktualisieren
ScDBCollection* pDBColl = pDoc->GetDBCollection();
if ( pDBColl )
{
- USHORT nCount = pDBColl->GetCount();
- for (USHORT i=0; i<nCount && !bReImport; i++)
+ sal_uInt16 nCount = pDBColl->GetCount();
+ for (sal_uInt16 i=0; i<nCount && !bReImport; i++)
{
ScDBData* pData = (*pDBColl)[i];
if ( pData->IsStripData() &&
pData->HasImportParam() && !pData->HasImportSelection() )
- bReImport = TRUE;
+ bReImport = sal_True;
}
}
if (bReImport)
@@ -1802,10 +1801,10 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
// ScDispatchProviderInterceptor registers itself in ctor
xDisProvInterceptor = new ScDispatchProviderInterceptor( this );
- bFirstActivate = TRUE; // NavigatorUpdate aufschieben bis Activate()
+ bFirstActivate = sal_True; // NavigatorUpdate aufschieben bis Activate()
// #105575#; update only in the first creation of the ViewShell
- pDocSh->SetUpdateEnabled(FALSE);
+ pDocSh->SetUpdateEnabled(false);
if ( GetViewFrame()->GetFrame().IsInPlace() )
UpdateHeaderWidth(); // The implace activation requires headers to be calculated
@@ -1836,7 +1835,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
// has to be shown by the sfx. ReadUserData is deferred until the first Activate call.
// old DesignMode state from form layer must be restored, too
- BYTE nForceDesignMode = SC_FORCEMODE_NONE;
+ sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE;
if ( pOldSh && pOldSh->ISA( ScPreviewShell ) )
{
ScPreviewShell* pPreviewShell = ((ScPreviewShell*)pOldSh);
@@ -1848,13 +1847,13 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
if ( GetViewData()->GetDocShell()->IsPreview() )
{
// preview for template dialog: always show whole page
- SetZoomType( SVX_ZOOM_WHOLEPAGE, TRUE ); // zoom value is recalculated at next Resize
+ SetZoomType( SVX_ZOOM_WHOLEPAGE, sal_True ); // zoom value is recalculated at next Resize
}
else
{
Fraction aFract( rAppOpt.GetZoom(), 100 );
- SetZoom( aFract, aFract, TRUE );
- SetZoomType( rAppOpt.GetZoomType(), TRUE );
+ SetZoom( aFract, aFract, sal_True );
+ SetZoomType( rAppOpt.GetZoomType(), sal_True );
}
// make Controller known to SFX
@@ -1949,13 +1948,13 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData )
void ScTabViewShell::SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest )
{
- bChartAreaValid = TRUE;
+ bChartAreaValid = sal_True;
aChartSource = rSource;
aChartPos = rDest;
nChartDestTab = GetViewData()->GetTabNo();
}
-BOOL ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const
+sal_Bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const
{
rSource = aChartSource;
rDest = aChartPos;
@@ -1976,10 +1975,10 @@ ScNavigatorSettings* ScTabViewShell::GetNavigatorSettings()
void ScTabViewShell::ExecTbx( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxPoolItem* pItem = NULL;
if ( pReqArgs )
- pReqArgs->GetItemState( nSlot, TRUE, &pItem );
+ pReqArgs->GetItemState( nSlot, sal_True, &pItem );
switch ( nSlot )
{
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index aee5c276fdd9..030c26f3ef71 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -61,7 +61,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if (rHint.ISA(SfxSimpleHint)) // ohne Parameter
{
- ULONG nSlot = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nSlot = ((SfxSimpleHint&)rHint).GetId();
switch ( nSlot )
{
case FID_DATACHANGED:
@@ -70,13 +70,13 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case FID_REFMODECHANGED:
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (!bRefMode)
StopRefMode();
else
{
GetSelEngine()->Reset();
- GetFunctionSet()->SetAnchorFlag(TRUE);
+ GetFunctionSet()->SetAnchorFlag(sal_True);
// AnchorFlag, damit gleich mit Control angehaengt werden kann
}
}
@@ -141,7 +141,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break;
case SC_HINT_FORCESETTAB:
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
break;
default:
@@ -151,7 +151,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else if (rHint.ISA(ScPaintHint)) // neu zeichnen
{
ScPaintHint* pHint = (ScPaintHint*) &rHint;
- USHORT nParts = pHint->GetParts();
+ sal_uInt16 nParts = pHint->GetParts();
SCTAB nTab = GetViewData()->GetTabNo();
if (pHint->GetStartTab() <= nTab && pHint->GetEndTab() >= nTab)
{
@@ -209,7 +209,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
EditView* pView = GetViewData()->GetEditView(eActive); // ist nicht 0
- SetEditShell(pView ,TRUE);
+ SetEditShell(pView ,sal_True);
}
}
}
@@ -222,7 +222,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const ScTablesHint& rTabHint = (const ScTablesHint&)rHint;
SCTAB nTab1 = rTabHint.GetTab1();
SCTAB nTab2 = rTabHint.GetTab2();
- USHORT nId = rTabHint.GetId();
+ sal_uInt16 nId = rTabHint.GetId();
switch (nId)
{
case SC_TAB_INSERTED:
@@ -247,7 +247,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// kann und dann auch die aktive View umgeschaltet werden muss.
SCTAB nNewTab = nActiveTab;
- BOOL bForce = FALSE;
+ bool bStayOnActiveTab = true;
switch (nId)
{
case SC_TAB_INSERTED:
@@ -258,7 +258,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( nTab1 < nNewTab ) // vorher geloescht
--nNewTab;
else if ( nTab1 == nNewTab ) // aktuelle geloescht
- bForce = TRUE;
+ bStayOnActiveTab = false;
break;
case SC_TAB_MOVED:
if ( nNewTab == nTab1 ) // verschobene Tabelle
@@ -280,7 +280,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break;
case SC_TAB_HIDDEN:
if ( nTab1 == nNewTab ) // aktuelle ausgeblendet
- bForce = TRUE;
+ bStayOnActiveTab = false;
break;
}
@@ -288,13 +288,14 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( nNewTab >= pDoc->GetTableCount() )
nNewTab = pDoc->GetTableCount() - 1;
- SetTabNo( nNewTab, bForce );
+ sal_Bool bForce = !bStayOnActiveTab;
+ SetTabNo( nNewTab, bForce, false, bStayOnActiveTab );
}
else if (rHint.ISA(ScIndexHint))
{
const ScIndexHint& rIndexHint = (const ScIndexHint&)rHint;
- USHORT nId = rIndexHint.GetId();
- USHORT nIndex = rIndexHint.GetIndex();
+ sal_uInt16 nId = rIndexHint.GetId();
+ sal_uInt16 nIndex = rIndexHint.GetIndex();
switch (nId)
{
case SC_HINT_SHOWRANGEFINDER:
@@ -393,7 +394,7 @@ void ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc,
default:
*ppItem = new SvxNumberInfoItem(
pDoc->GetFormatTable(),
- (const USHORT)
+ (const sal_uInt16)
SID_ATTR_NUMBERFORMAT_INFO );
}
}
@@ -410,7 +411,7 @@ void ScTabViewShell::UpdateNumberFormatter(
{
const sal_uInt32* pDelArr = rInfoItem.GetDelArray();
- for ( USHORT i=0; i<nDelCount; i++ )
+ for ( sal_uInt16 i=0; i<nDelCount; i++ )
rInfoItem.GetNumberFormatter()->DeleteEntry( pDelArr[i] );
}
diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx
index ec9a30f70e31..75ce2b1d6832 100644
--- a/sc/source/ui/view/tabvwsh8.cxx
+++ b/sc/source/ui/view/tabvwsh8.cxx
@@ -61,9 +61,9 @@ void ScTabViewShell::SetDefaultFrameLine( const SvxBorderLine* pLine )
//------------------------------------------------------------------
-BOOL ScTabViewShell::HasSelection( BOOL bText ) const
+sal_Bool ScTabViewShell::HasSelection( sal_Bool bText ) const
{
- BOOL bHas = FALSE;
+ sal_Bool bHas = false;
ScViewData* pData = (ScViewData*)GetViewData(); // const weggecasted
if ( bText )
{
@@ -82,7 +82,7 @@ BOOL ScTabViewShell::HasSelection( BOOL bText ) const
if ( eMarkType == SC_MARK_SIMPLE )
bHas = ( aRange.aStart != aRange.aEnd ); // more than 1 cell
else
- bHas = TRUE; // multiple selection or filtered
+ bHas = sal_True; // multiple selection or filtered
}
return bHas;
}
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 34e521de03c7..e3d038fd4bb1 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -53,9 +53,9 @@
// forwards -> galwrap.cxx (wg. CLOOKs)
-USHORT GallerySGA_FORMAT_GRAPHIC();
+sal_uInt16 GallerySGA_FORMAT_GRAPHIC();
Graphic GalleryGetGraphic ();
-BOOL GalleryIsLinkage ();
+sal_Bool GalleryIsLinkage ();
String GalleryGetFullPath ();
String GalleryGetFilterName ();
@@ -63,7 +63,7 @@ String GalleryGetFilterName ();
class SvxIMapDlg;
-USHORT ScIMapChildWindowId();
+sal_uInt16 ScIMapChildWindowId();
SvxIMapDlg* ScGetIMapDlg();
const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg );
const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg );
@@ -72,7 +72,7 @@ const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg );
void ScTabViewShell::ExecChildWin(SfxRequest& rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_GALLERY:
@@ -90,7 +90,7 @@ void ScTabViewShell::GetChildWinState( SfxItemSet& rSet )
{
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GALLERY ) )
{
- USHORT nId = GalleryChildWindow::GetChildWindowId();
+ sal_uInt16 nId = GalleryChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_GALLERY, GetViewFrame()->HasChildWindow( nId ) ) );
}
}
@@ -104,10 +104,10 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq )
if ( pArgs )
{
const SfxPoolItem* pItem = NULL;
- SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, TRUE, &pItem);
+ SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, sal_True, &pItem);
if ( eState == SFX_ITEM_SET )
{
- UINT32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue();
/******************************************************************
* Graphik einfuegen
@@ -164,13 +164,13 @@ String ScTabViewShell::GetDescription() const
void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_IMAP:
{
SfxViewFrame* pThisFrame = GetViewFrame();
- USHORT nId = ScIMapChildWindowId();
+ sal_uInt16 nId = ScIMapChildWindowId();
pThisFrame->ToggleChildWindow( nId );
GetViewFrame()->GetBindings().Invalidate( SID_IMAP );
@@ -224,7 +224,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -233,15 +233,15 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
{
// Disabled wird nicht mehr...
- BOOL bThere = FALSE;
+ sal_Bool bThere = false;
SfxViewFrame* pThisFrame = GetViewFrame();
- USHORT nId = ScIMapChildWindowId();
+ sal_uInt16 nId = ScIMapChildWindowId();
if ( pThisFrame->KnowsChildWindow(nId) )
if ( pThisFrame->HasChildWindow(nId) )
- bThere = TRUE;
+ bThere = sal_True;
ObjectSelectionType eType=GetCurObjectSelectionType();
- BOOL bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic);
+ sal_Bool bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic);
if(!bThere && !bEnable)
{
rSet.DisableItem( nWhich );
@@ -255,7 +255,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
case SID_IMAP_EXEC:
{
- BOOL bDisable = TRUE;
+ sal_Bool bDisable = sal_True;
SdrView* pDrView = GetSdrView();
if ( pDrView )
@@ -264,7 +264,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
if ( rMarkList.GetMarkCount() == 1 )
if ( ScIMapDlgGetObj(ScGetIMapDlg()) ==
(void*) rMarkList.GetMark(0)->GetMarkedSdrObj() )
- bDisable = FALSE;
+ bDisable = false;
}
rSet.Put( SfxBoolItem( SID_IMAP_EXEC, bDisable ) );
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 3f0d6c2118ee..e245db772527 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -35,7 +35,6 @@
#define _ZFORLIST_DECLARE_TABLE
#include "scitems.hxx"
-#include <svl/slstitm.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <svl/zformat.hxx>
@@ -69,7 +68,7 @@
#include "compiler.hxx"
-BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
+sal_Bool ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
{
String aStr;
@@ -87,7 +86,7 @@ BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
return true;
}
- USHORT nGlobStrId = 0;
+ sal_uInt16 nGlobStrId = 0;
switch (eFunc)
{
case SUBTOTAL_FUNC_AVE: nGlobStrId = STR_FUN_TEXT_AVG; break;
@@ -146,10 +145,10 @@ BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
}
rFuncStr = aStr;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
@@ -171,16 +170,16 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
SCCOL nPosX = pViewData->GetCurX();
SCROW nPosY = pViewData->GetCurY();
SCTAB nTab = pViewData->GetTabNo();
- USHORT nMyId = 0;
+ sal_uInt16 nMyId = 0;
SfxViewFrame* pThisFrame = GetViewFrame();
- BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace();
SCTAB nTabCount = pDoc->GetTableCount();
SCTAB nTabSelCount = rMark.GetSelectCount();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
@@ -210,7 +209,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
if ( nTabSelCount > 1 )
{
// #i22589# also take "Print Entire Sheet" into account here
- BOOL bHas = FALSE;
+ sal_Bool bHas = false;
for (SCTAB i=0; !bHas && i<nTabCount; i++)
bHas = rMark.GetTableSelect(i) && (pDoc->GetPrintRangeCount(i) || pDoc->IsPrintEntireSheet(i));
if (!bHas)
@@ -240,7 +239,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_SEARCH_OPTIONS:
{
- USHORT nOptions = 0xffff; // alles erlaubt
+ sal_uInt16 nOptions = 0xffff; // alles erlaubt
// wenn ReadOnly, kein Ersetzen:
if (GetViewData()->GetDocShell()->IsReadOnly())
nOptions &= ~( SEARCH_OPTIONS_REPLACE | SEARCH_OPTIONS_REPLACE_ALL );
@@ -270,12 +269,12 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_TOGGLEINPUTLINE:
{
- USHORT nId = ScInputWindowWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
if ( pThisFrame->KnowsChildWindow( nId ) )
{
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- rSet.Put( SfxBoolItem( nWhich, pWnd ? TRUE : FALSE ) );
+ rSet.Put( SfxBoolItem( nWhich, pWnd ? sal_True : false ) );
}
else
rSet.DisableItem( nWhich );
@@ -299,9 +298,9 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
if ( pStyleSheet )
{
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
- USHORT nScale = ((const SfxUInt16Item&)
+ sal_uInt16 nScale = ((const SfxUInt16Item&)
rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue();
- USHORT nPages = ((const SfxUInt16Item&)
+ sal_uInt16 nPages = ((const SfxUInt16Item&)
rStyleSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
if ( nScale == 100 && nPages == 0 )
rSet.DisableItem( nWhich );
@@ -316,7 +315,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
else
{
const Fraction& rOldY = GetViewData()->GetZoomY();
- USHORT nZoom = (USHORT)(( rOldY.GetNumerator() * 100 )
+ sal_uInt16 nZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 )
/ rOldY.GetDenominator());
rSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, nZoom, nWhich ) );
}
@@ -329,7 +328,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
else
{
const Fraction& rOldY = GetViewData()->GetZoomY();
- USHORT nCurrentZoom = (USHORT)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator());
+ sal_uInt16 nCurrentZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator());
if( nCurrentZoom )
{
@@ -352,7 +351,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_TOGGLEFORMULA:
{
const ScViewOptions& rOpts = pViewData->GetOptions();
- BOOL bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
+ sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
rSet.Put(SfxBoolItem(nWhich, bFormulaMode ));
}
break;
@@ -465,7 +464,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_PRINTPREVIEW:
// Toggle-Slot braucht einen State
- rSet.Put( SfxBoolItem( nWhich, FALSE ) );
+ rSet.Put( SfxBoolItem( nWhich, false ) );
break;
case SID_READONLY_MODE:
@@ -483,7 +482,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
}
//------------------------------------------------------------------
-void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage )
+void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
{
SfxAbstractTabDialog * pDlg = NULL;
ScDocument* pDoc = GetViewData()->GetDocument();
@@ -511,7 +510,7 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage )
pOldSet->MergeRange( SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO );
pOldSet->Put(*pNumberInfoItem );
- bInFormatDialog = TRUE;
+ bInFormatDialog = true;
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -520,14 +519,14 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage )
if ( nTabPage != 0xffff )
pDlg->SetCurPageId( nTabPage );
short nResult = pDlg->Execute();
- bInFormatDialog = FALSE;
+ bInFormatDialog = false;
if ( nResult == RET_OK )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
const SfxPoolItem* pItem=NULL;
- if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,TRUE,&pItem)==SFX_ITEM_SET)
+ if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,sal_True,&pItem)==SFX_ITEM_SET)
{
UpdateNumberFormatter( pDoc,(const SvxNumberInfoItem&)*pItem);
@@ -605,7 +604,7 @@ void ScTabViewShell::ExecuteInputDirect()
//------------------------------------------------------------------
-void ScTabViewShell::UpdateInputHandler( BOOL bForce /* = FALSE */, BOOL bStopEditing /* = TRUE */ )
+void ScTabViewShell::UpdateInputHandler( sal_Bool bForce /* = sal_False */, sal_Bool bStopEditing /* = sal_True */ )
{
ScInputHandler* pHdl = pInputHandler ? pInputHandler : SC_MOD()->GetInputHdl();
@@ -633,8 +632,8 @@ void ScTabViewShell::UpdateInputHandler( BOOL bForce /* = FALSE */, BOOL bStopEd
PutInOrder( nStartRow, nEndRow );
PutInOrder( nStartTab, nEndTab );
- BOOL bHideFormula = FALSE;
- BOOL bHideAll = FALSE;
+ sal_Bool bHideFormula = false;
+ sal_Bool bHideAll = false;
if (pDoc->IsTabProtected(nTab))
{
@@ -727,7 +726,7 @@ void ScTabViewShell::GetSaveState( SfxItemSet& rSet )
SfxShell* pDocSh = GetViewData()->GetDocShell();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if ( nWhich != SID_SAVEDOC || !GetViewData()->GetDocShell()->IsDocShared() )
@@ -749,26 +748,26 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
const SfxItemSet* pReqArgs = rReq.GetArgs();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_UNDO:
case SID_REDO:
if ( pUndoManager )
{
- BOOL bIsUndo = ( nSlot == SID_UNDO );
+ sal_Bool bIsUndo = ( nSlot == SID_UNDO );
- USHORT nCount = 1;
+ sal_uInt16 nCount = 1;
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET )
nCount = ((const SfxUInt16Item*)pItem)->GetValue();
// lock paint for more than one cell undo action (not for editing within a cell)
- BOOL bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
+ sal_Bool bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
if ( bLockPaint )
pDocSh->LockPaint();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if ( bIsUndo )
pUndoManager->Undo(0);
@@ -779,7 +778,7 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
if ( bLockPaint )
pDocSh->UnlockPaint();
- GetViewFrame()->GetBindings().InvalidateAll(sal_False);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
}
break;
}
@@ -791,7 +790,7 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
SfxUndoManager* pUndoManager = pSh->GetUndoManager();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -803,9 +802,9 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
if ( pUndoManager )
{
List* pList = aStrLst.GetList();
- BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
- USHORT nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
+ sal_uInt16 nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
pUndoManager->GetRedoActionComment(i) ),
LIST_APPEND );
@@ -833,11 +832,11 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
SfxBindings& rBindings = GetViewFrame()->GetBindings();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
switch (nSlotId)
{
case SID_GRID_VISIBLE:
- if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET )
{
aGridOptions.SetGridVisible( ((const SfxBoolItem*)pItem)->GetValue() );
aViewOptions.SetGridOptions(aGridOptions);
@@ -846,7 +845,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
break;
case SID_GRID_USE:
- if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET )
{
aGridOptions.SetUseGridSnap( ((const SfxBoolItem*)pItem)->GetValue() );
aViewOptions.SetGridOptions(aGridOptions);
@@ -855,7 +854,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
break;
case SID_HELPLINES_MOVE:
- if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET )
{
aViewOptions.SetOption( VOPT_HELPLINES, ((const SfxBoolItem*)pItem)->GetValue() );
rBindings.Invalidate(SID_HELPLINES_MOVE);
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 10cd0d543c15..b744053a5c84 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -62,9 +62,11 @@
#include <sfx2/viewfrm.hxx>
#include <svtools/soerr.hxx>
#include <svl/rectitem.hxx>
+#include <svl/slstitm.hxx>
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
#include <sot/exchange.hxx>
+#include <tools/diagnose_ex.h>
#include "tabvwsh.hxx"
#include "globstr.hrc"
@@ -115,7 +117,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
}
}
-BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
+sal_Bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
{
// Gueltigkeits-Hinweisfenster nicht ueber dem Objekt stehenlassen
RemoveHintWindow();
@@ -123,7 +125,7 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
uno::Reference < embed::XEmbeddedObject > xObj = pObj->GetObjRef();
Window* pWin = GetActiveWin();
ErrCode nErr = ERRCODE_NONE;
- BOOL bErrorShown = FALSE;
+ sal_Bool bErrorShown = false;
{
SfxInPlaceClient* pClient = FindIPClient( xObj, pWin );
@@ -173,7 +175,7 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
((ScClient*)pClient)->SetGrafEdit( NULL );
nErr = pClient->DoVerb( nVerb );
- bErrorShown = TRUE;
+ bErrorShown = sal_True;
// SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an
// attach listener to selection changes in chart that affect cell
@@ -260,7 +262,7 @@ void ScTabViewShell::DeactivateOle()
void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot != SID_OBJECTRESIZE )
{
SC_MOD()->InputEnterHandler();
@@ -302,7 +304,6 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
case SID_INSERT_PLUGIN:
case SID_INSERT_SOUND:
case SID_INSERT_VIDEO:
- case SID_INSERT_APPLET:
case SID_INSERT_SMATH:
case SID_INSERT_FLOATINGFRAME:
FuInsertOLE(this, pWin, pView, pDrModel, rReq);
@@ -329,7 +330,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_OLE2)
{
@@ -361,7 +362,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
// #98721#
case SID_FM_CREATE_FIELDCONTROL:
{
- SFX_REQUEST_ARG( rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR, sal_False );
+ SFX_REQUEST_ARG( rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR, false );
DBG_ASSERT( pDescriptorItem, "SID_FM_CREATE_FIELDCONTROL: invalid request args!" );
if(pDescriptorItem)
@@ -422,13 +423,13 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
{
- BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
- BOOL bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
+ sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
ScDocShell* pDocShell = ( GetViewData() ? GetViewData()->GetDocShell() : NULL );
bool bShared = ( pDocShell ? pDocShell->IsDocShared() : false );
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -459,14 +460,6 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
break;
- case SID_INSERT_APPLET:
- // wenn SOLAR_JAVA nicht definiert ist, immer disablen
-#ifdef SOLAR_JAVA
- if (bOle || bTabProt)
-#endif
- rSet.DisableItem( nWhich );
- break;
-
case SID_INSERT_GRAPHIC:
case SID_INSERT_AVMEDIA:
case SID_FONTWORK_GALLERY_FLOATER:
@@ -486,6 +479,99 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
}
+//------------------------------------------------------------------
+
+void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
+{
+ SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
+ ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager();
+
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+ ScDocShell* pDocSh = GetViewData()->GetDocShell();
+
+ sal_uInt16 nSlot = rReq.GetSlot();
+ switch ( nSlot )
+ {
+ case SID_UNDO:
+ case SID_REDO:
+ if ( pUndoManager )
+ {
+ sal_Bool bIsUndo = ( nSlot == SID_UNDO );
+
+ sal_uInt16 nCount = 1;
+ const SfxPoolItem* pItem;
+ if ( pReqArgs && pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
+ nCount = ((const SfxUInt16Item*)pItem)->GetValue();
+
+ // lock paint for more than one cell undo action (not for editing within a cell)
+ sal_Bool bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
+ if ( bLockPaint )
+ pDocSh->LockPaint();
+
+ try
+ {
+ for (sal_uInt16 i=0; i<nCount; i++)
+ {
+ if ( bIsUndo )
+ pUndoManager->Undo();
+ else
+ pUndoManager->Redo();
+ }
+ }
+ catch ( const uno::Exception& )
+ {
+ // no need to handle. By definition, the UndoManager handled this by clearing the
+ // Undo/Redo stacks
+ }
+
+ if ( bLockPaint )
+ pDocSh->UnlockPaint();
+
+ GetViewFrame()->GetBindings().InvalidateAll(false);
+ }
+ break;
+// default:
+// GetViewFrame()->ExecuteSlot( rReq );
+ }
+}
+
+void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
+{
+ SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
+ ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager();
+
+ SfxWhichIter aIter(rSet);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ while ( nWhich )
+ {
+ switch (nWhich)
+ {
+ case SID_GETUNDOSTRINGS:
+ case SID_GETREDOSTRINGS:
+ {
+ SfxStringListItem aStrLst( nWhich );
+ if ( pUndoManager )
+ {
+ List* pList = aStrLst.GetList();
+ sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
+ size_t nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
+ for (size_t i=0; i<nCount; i++)
+ pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
+ pUndoManager->GetRedoActionComment(i) ),
+ LIST_APPEND );
+ }
+ rSet.Put( aStrLst );
+ }
+ break;
+ default:
+ // get state from sfx view frame
+ GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
+ }
+
+ nWhich = aIter.NextWhich();
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index b3c314af66a5..8e3bf1c4d24f 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -72,7 +72,7 @@
//------------------------------------------------------------------
-void ScTabViewShell::SetCurRefDlgId( USHORT nNew )
+void ScTabViewShell::SetCurRefDlgId( sal_uInt16 nNew )
{
// CurRefDlgId is stored in ScModule to find if a ref dialog is open,
// and in the view to identify the view that has opened the dialog
@@ -81,7 +81,7 @@ void ScTabViewShell::SetCurRefDlgId( USHORT nNew )
SfxModelessDialog* ScTabViewShell::CreateRefDialog(
SfxBindings* pB, SfxChildWindow* pCW, SfxChildWinInfo* pInfo,
- Window* pParent, USHORT nSlotId )
+ Window* pParent, sal_uInt16 nSlotId )
{
// Dialog nur aufmachen, wenn ueber ScModule::SetRefDialog gerufen, damit
// z.B. nach einem Absturz offene Ref-Dialoge nicht wiederkommen (#42341#).
@@ -94,14 +94,14 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
// the dialog has been opened in a different view
// -> lock the dispatcher for this view (modal mode)
- GetViewData()->GetDispatcher().Lock( TRUE ); // lock is reset when closing dialog
+ GetViewData()->GetDispatcher().Lock( sal_True ); // lock is reset when closing dialog
return NULL;
}
SfxModelessDialog* pResult = 0;
if(pCW)
- pCW->SetHideNotDelete(TRUE);
+ pCW->SetHideNotDelete(sal_True);
switch( nSlotId )
{
@@ -159,10 +159,10 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
case SID_DEFINE_DBNAME:
{
// wenn auf einem bestehenden Bereich aufgerufen, den markieren
- GetDBData( TRUE, SC_DB_OLD );
+ GetDBData( sal_True, SC_DB_OLD );
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
- MarkDataArea( FALSE );
+ MarkDataArea( false );
pResult = new ScDbNameDlg( pB, pCW, pParent, GetViewData() );
}
@@ -222,7 +222,7 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
ScRefAddress aCurPos ( pViewData->GetCurX(),
pViewData->GetCurY(),
pViewData->GetTabNo(),
- FALSE, FALSE, FALSE );
+ false, false, false );
pResult = new ScTabOpDlg( pB, pCW, pParent, pViewData->GetDocument(), aCurPos );
}
diff --git a/sc/source/ui/view/tabvwshd.cxx b/sc/source/ui/view/tabvwshd.cxx
index dd8232d72db5..e2bcd34e87d2 100644
--- a/sc/source/ui/view/tabvwshd.cxx
+++ b/sc/source/ui/view/tabvwshd.cxx
@@ -57,7 +57,7 @@
//------------------------------------------------------------------
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
//! Parent-Window fuer Dialoge
//! Problem: OLE Server!
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index b55d4f2d9098..23cab155b3ec 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -57,7 +57,7 @@
//==================================================================
-String ScTabViewShell::GetSelectionText( BOOL bWholeWord )
+String ScTabViewShell::GetSelectionText( sal_Bool bWholeWord )
{
String aStrSelection;
@@ -141,10 +141,10 @@ String ScTabViewShell::GetSelectionText( BOOL bWholeWord )
//------------------------------------------------------------------------
void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const String& rTarget,
- USHORT nMode )
+ sal_uInt16 nMode )
{
SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode;
- BOOL bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text
+ sal_Bool bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text
if ( bAsText )
{
@@ -159,11 +159,11 @@ void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const S
{
// if the view is not active, InsertURLField doesn't work
// -> use InsertBookmark to directly manipulate cell content
- // bTryReplace=TRUE -> if cell contains only one URL, replace it
+ // bTryReplace=sal_True -> if cell contains only one URL, replace it
SCCOL nPosX = GetViewData()->GetCurX();
SCROW nPosY = GetViewData()->GetCurY();
- InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, TRUE );
+ InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, sal_True );
}
}
else
@@ -199,7 +199,7 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co
ScModule* pScMod = SC_MOD();
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
- BOOL bSelectFirst = FALSE;
+ sal_Bool bSelectFirst = false;
if ( !pScMod->IsEditMode() )
{
if ( !SelectionEditable() )
@@ -245,7 +245,7 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co
void ScTabViewShell::ExecSearch( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxPoolItem* pItem;
switch ( nSlot )
@@ -253,13 +253,13 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
case FID_SEARCH_NOW:
{
if ( pReqArgs &&
- SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, FALSE, &pItem) )
+ SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem) )
{
DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" );
const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem;
ScGlobal::SetSearchItem( *pSearchItem );
- SearchAndReplace( pSearchItem, TRUE, rReq.IsAPI() );
+ SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() );
rReq.Done();
}
}
@@ -267,7 +267,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
case SID_SEARCH_ITEM:
if (pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState(SID_SEARCH_ITEM, FALSE, &pItem))
+ pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem))
{
// Search-Item merken
DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" );
@@ -283,7 +283,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
case FID_REPLACE_ALL:
case FID_SEARCH_ALL:
{
- if (pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, FALSE, &pItem))
+ if (pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, false, &pItem))
{
// SearchItem holen
@@ -292,7 +292,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
// SearchItem fuellen
aSearchItem.SetSearchString(((SfxStringItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == pReqArgs->GetItemState(FN_PARAM_1, FALSE, &pItem))
+ if(SFX_ITEM_SET == pReqArgs->GetItemState(FN_PARAM_1, false, &pItem))
aSearchItem.SetReplaceString(((SfxStringItem*)pItem)->GetValue());
if (nSlot == FID_SEARCH)
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 52bfd4213050..9975230c47c4 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -41,6 +41,7 @@
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
+#include <sfx2/objface.hxx>
#include <svx/svxdlg.hxx>
#include <editeng/colritem.hxx>
@@ -58,6 +59,7 @@
#include "tabbgcolor.hxx"
#include "tabbgcolordlg.hxx"
+#include "sccommands.h"
#include <vector>
@@ -65,7 +67,7 @@ using ::boost::scoped_ptr;
using namespace com::sun::star;
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
//------------------------------------------------------------------
@@ -76,7 +78,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
SCTAB nCurrentTab = pViewData->GetTabNo();
SCTAB nTabCount = pDoc->GetTableCount();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
HideListBox(); // Autofilter-DropDown-Listbox
@@ -88,7 +90,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
String aName;
pDoc->GetName( nCurrentTab, aName );
- BOOL bVisible=TRUE;
+ sal_Bool bVisible=sal_True;
if( pReqArgs != NULL )
{
const SfxPoolItem* pItem;
@@ -100,7 +102,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
ScMarkData& rMark = pViewData->GetMarkData();
SCTAB nTabSelCount = rMark.GetSelectCount();
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
@@ -122,7 +124,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
ScMarkData& rMark = pViewData->GetMarkData();
SCTAB nTabSelCount = rMark.GetSelectCount();
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
@@ -178,21 +180,21 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
DBG_ASSERT(pDlg, "Dialog create fail!");
String aTabName;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for ( SCTAB i=0; i != nTabCount; i++ )
{
if (!pDoc->IsVisible(i))
{
pDoc->GetName( i, aTabName );
pDlg->Insert( aTabName, bFirst );
- bFirst = FALSE;
+ bFirst = false;
}
}
if ( pDlg->Execute() == RET_OK )
{
- USHORT nCount = pDlg->GetSelectEntryCount();
- for (USHORT nPos=0; nPos<nCount; nPos++)
+ sal_uInt16 nCount = pDlg->GetSelectEntryCount();
+ for (sal_uInt16 nPos=0; nPos<nCount; nPos++)
{
aName = pDlg->GetSelectEntry(nPos);
ShowTable( aName );
@@ -217,7 +219,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( pReqArgs != NULL ) // von Basic
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
const SfxPoolItem* pTabItem;
const SfxPoolItem* pNameItem;
String aName;
@@ -252,14 +254,14 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
SCTAB nTabs[MAXTABCOUNT];
SCTAB nCount = 0;
- USHORT n = 0;
+ sal_uInt16 n = 0;
const String* pStr = pDlg->GetFirstTable( &n );
while ( pStr )
{
nTabs[nCount++] = static_cast<SCTAB>(n);
pStr = pDlg->GetNextTable( &n );
}
- BOOL bLink = pDlg->GetTablesAsLink();
+ sal_Bool bLink = pDlg->GetTablesAsLink();
if (nCount != 0)
{
if(pDlg->IsTableBefore())
@@ -370,7 +372,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if( pReqArgs != NULL )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const SfxPoolItem* pItem;
String aName;
@@ -397,22 +399,25 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else
{
- USHORT nRet = RET_OK;
- BOOL bDone = FALSE;
+ sal_uInt16 nRet = RET_OK;
+ sal_Bool bDone = false;
String aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
String aName;
String aDlgTitle;
+ const sal_Char* pHelpId = 0;
switch ( nSlot )
{
case FID_TAB_APPEND:
aDlgTitle = String(ScResId(SCSTR_APDTABLE));
pDoc->CreateValidTabName( aName );
+ pHelpId = HID_SC_APPEND_NAME;
break;
case FID_TAB_RENAME:
aDlgTitle = String(ScResId(SCSTR_RENAMETAB));
pDoc->GetName( pViewData->GetTabNo(), aName );
+ pHelpId = HID_SC_RENAME_NAME;
break;
}
@@ -476,10 +481,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( pDoc->GetChangeTrack() != NULL )
break; // bei aktiviertem ChangeTracking kein TabMove
- BOOL bDoIt = FALSE;
- USHORT nDoc = 0;
+ sal_Bool bDoIt = false;
+ sal_uInt16 nDoc = 0;
SCTAB nTab = pViewData->GetTabNo();
- BOOL bCpy = FALSE;
+ sal_Bool bCpy = false;
String aDocName;
String aTabName;
@@ -504,7 +509,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
ScDocShell* pScSh = NULL;
- USHORT i=0;
+ sal_uInt16 i=0;
while ( pSh )
{
@@ -531,7 +536,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
else // Kein Dokumentname -> neues Dokument
{
nDoc = SC_DOC_NEW;
- bDoIt = TRUE;
+ bDoIt = sal_True;
}
if ( bDoIt && nTab >= nTableCount ) // ggf. anhaengen
@@ -575,7 +580,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
pDlg->GetTabNameString( aTabName );
}
- bDoIt = TRUE;
+ bDoIt = true;
String aFoundDocName;
if ( nDoc != SC_DOC_NEW )
@@ -587,7 +592,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( !pSh->GetDocument()->IsDocEditable() )
{
ErrorMessage(STR_READONLYERR);
- bDoIt = FALSE;
+ bDoIt = false;
}
}
}
@@ -613,7 +618,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
// Parameter war ueberfluessig, weil die Methode an der Table haengt
- BOOL bDoIt = rReq.IsAPI();
+ sal_Bool bDoIt = rReq.IsAPI();
if( !bDoIt )
{
// wenn's nicht von Basic kommt, nochmal nachfragen:
@@ -634,7 +639,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
SCTAB nNewTab = nCurrentTab;
SCTAB nFirstTab=0;
- BOOL bTabFlag=FALSE;
+ sal_Bool bTabFlag=false;
ScMarkData& rMark = pViewData->GetMarkData();
std::vector<SCTAB> TheTabs;
for(SCTAB i=0;i<nTabCount;i++)
@@ -642,7 +647,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if(rMark.GetTableSelect(i) &&!pDoc->IsTabProtected(i))
{
TheTabs.push_back(i);
- bTabFlag=TRUE;
+ bTabFlag=true;
if(nNewTab==i) nNewTab++;
}
if(!bTabFlag) nFirstTab=i;
@@ -661,25 +666,25 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
ScDocShell* pDocSh = pViewData->GetDocShell();
ScDocFunc aFunc(*pDocSh);
- BOOL bSet = !pDoc->IsLayoutRTL( nCurrentTab );
+ sal_Bool bSet = !pDoc->IsLayoutRTL( nCurrentTab );
const ScMarkData& rMark = pViewData->GetMarkData();
if ( rMark.GetSelectCount() != 0 )
{
// handle several sheets
- SfxUndoManager* pUndoManager = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = pDocSh->GetUndoManager();
String aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL );
pUndoManager->EnterListAction( aUndo, aUndo );
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if ( rMark.GetTableSelect(nTab) )
- aFunc.SetLayoutRTL( nTab, bSet, FALSE );
+ aFunc.SetLayoutRTL( nTab, bSet, false );
pUndoManager->LeaveListAction();
}
else
- aFunc.SetLayoutRTL( nCurrentTab, bSet, FALSE );
+ aFunc.SetLayoutRTL( nCurrentTab, bSet, false );
}
break;
@@ -710,7 +715,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if( pReqArgs != NULL )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const SfxPoolItem* pItem;
Color aColor;
if( IS_AVAILABLE( FN_PARAM_1, &pItem ) )
@@ -745,8 +750,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else
{
- USHORT nRet = RET_OK; /// temp
- BOOL bDone = FALSE; /// temp
+ sal_uInt16 nRet = RET_OK; /// temp
+ sal_Bool bDone = false; /// temp
Color aTabBgColor;
Color aNewTabBgColor;
@@ -758,7 +763,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
String(ScResId(SCSTR_SET_TAB_BG_COLOR)),
String(ScResId(SCSTR_NO_TAB_BG_COLOR)),
aTabBgColor,
- nSlot,RID_SCDLG_TAB_BG_COLOR);
+ CMD_FID_TAB_SET_TAB_BG_COLOR,
+ RID_SCDLG_TAB_BG_COLOR);
while ( !bDone && nRet == RET_OK )
{
nRet = pDlg->Execute();
@@ -842,7 +848,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
SCTAB nTabSelCount = rMark.GetSelectCount();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
@@ -855,7 +861,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
case FID_TABLE_HIDE:
{
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
@@ -867,10 +873,10 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
case FID_TABLE_SHOW:
{
- BOOL bHasHidden = FALSE;
+ sal_Bool bHasHidden = false;
for ( SCTAB i=0; i < nTabCount && !bHasHidden; i++ )
if (!pDoc->IsVisible(i))
- bHasHidden = TRUE;
+ bHasHidden = sal_True;
if ( !bHasHidden || pDoc->IsDocProtected() || nTabSelCount > 1 )
rSet.DisableItem( nWhich );
}
@@ -882,7 +888,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
rSet.DisableItem( nWhich );
else
{
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 7c55632fdbd8..b77352846ca8 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -73,7 +73,7 @@ void ScTabViewShell::GetSbxState( SfxItemSet& /* rSet */ )
void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
{
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
// Objekte aktivieren/deaktivieren immer auf der sichtbaren View
@@ -116,9 +116,9 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
case SID_OBJECT_WIDTH:
case SID_OBJECT_HEIGHT:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState( nSlotId, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState( nSlotId, sal_True, &pItem ) == SFX_ITEM_SET )
{
long nNewVal = ((const SfxInt32Item*)pItem)->GetValue();
if ( nNewVal < 0 )
@@ -147,7 +147,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
pDrView->ResizeMarkedObj( aRect.TopLeft(),
Fraction( 1, 1 ),
Fraction( nNewVal, aRect.GetHeight() ) );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -184,7 +184,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet )
// SID_OLE_OBJECT - removed (old Basic)
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -268,7 +268,7 @@ void ScTabViewShell::BroadcastAccessibility( const SfxHint &rHint )
pAccessibilityBroadcaster->Broadcast( rHint );
}
-BOOL ScTabViewShell::HasAccessibilityObjects()
+sal_Bool ScTabViewShell::HasAccessibilityObjects()
{
return pAccessibilityBroadcaster != NULL;
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 52c3c6cc12e6..b7c2e3c14a05 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -77,8 +77,8 @@ using namespace com::sun::star;
#define TAG_TABBARWIDTH "tw:"
-static BOOL bMoveArea = FALSE; //! Member?
-USHORT nEditAdjust = SVX_ADJUST_LEFT; //! Member !!!
+static sal_Bool bMoveArea = false; //! Member?
+sal_uInt16 nEditAdjust = SVX_ADJUST_LEFT; //! Member !!!
ScViewDataTable::ScViewDataTable() :
eZoomType( SVX_ZOOM_PERCENT ),
@@ -96,7 +96,7 @@ ScViewDataTable::ScViewDataTable() :
nCurX( 0 ),
nCurY( 0 ),
bShowGrid( true ),
- bOldCurValid( FALSE )
+ bOldCurValid( false )
{
nPosX[0]=nPosX[1]=0;
nPosY[0]=nPosY[1]=0;
@@ -313,21 +313,21 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh )
nRefTabNo ( 0 ),
nPasteFlags ( SC_PASTE_NONE ),
eEditActivePart( SC_SPLIT_BOTTOMLEFT ),
- bActive ( TRUE ), //! wie initialisieren?
- bIsRefMode ( FALSE ),
- bDelMarkValid( FALSE ),
+ bActive ( sal_True ), //! wie initialisieren?
+ bIsRefMode ( false ),
+ bDelMarkValid( false ),
nFillMode ( SC_FILL_NONE ),
- bPagebreak ( FALSE ),
- bSelCtrlMouseClick( FALSE )
+ bPagebreak ( false ),
+ bSelCtrlMouseClick( false )
{
- SetGridMode ( TRUE );
- SetSyntaxMode ( FALSE );
- SetHeaderMode ( TRUE );
- SetTabMode ( TRUE );
- SetVScrollMode ( TRUE );
- SetHScrollMode ( TRUE );
- SetOutlineMode ( TRUE );
+ SetGridMode ( sal_True );
+ SetSyntaxMode ( false );
+ SetHeaderMode ( sal_True );
+ SetTabMode ( sal_True );
+ SetVScrollMode ( sal_True );
+ SetHScrollMode ( sal_True );
+ SetOutlineMode ( sal_True );
aScrSize = Size( (long) ( STD_COL_WIDTH * PIXEL_PER_TWIPS * OLE_STD_CELLS_X ),
(long) ( ScGlobal::nStdRowHeight * PIXEL_PER_TWIPS * OLE_STD_CELLS_Y ) );
@@ -335,10 +335,10 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh )
for ( SCTAB i = 1; i <= MAXTAB; i++ )
pTabData[i] = NULL;
pThisTab = pTabData[nTabNo];
- for (USHORT j=0; j<4; j++)
+ for (sal_uInt16 j=0; j<4; j++)
{
pEditView[j] = NULL;
- bEditActive[j] = FALSE;
+ bEditActive[j] = false;
}
nEditEndCol = nEditStartCol = nEditCol = 0;
@@ -381,9 +381,9 @@ ScViewData::ScViewData( const ScViewData& rViewData )
nTabNo ( rViewData.nTabNo ),
nRefTabNo ( rViewData.nTabNo ), // kein RefMode
eEditActivePart( rViewData.eEditActivePart ),
- bActive ( TRUE ), //! wie initialisieren?
- bIsRefMode ( FALSE ),
- bDelMarkValid( FALSE ),
+ bActive ( sal_True ), //! wie initialisieren?
+ bIsRefMode ( false ),
+ bDelMarkValid( false ),
nFillMode ( SC_FILL_NONE ),
bPagebreak ( rViewData.bPagebreak ),
bSelCtrlMouseClick( rViewData.bSelCtrlMouseClick )
@@ -404,10 +404,10 @@ ScViewData::ScViewData( const ScViewData& rViewData )
else
pTabData[i] = NULL;
pThisTab = pTabData[nTabNo];
- for (USHORT j=0; j<4; j++)
+ for (sal_uInt16 j=0; j<4; j++)
{
pEditView[j] = NULL;
- bEditActive[j] = FALSE;
+ bEditActive[j] = false;
}
nEditEndCol = nEditStartCol = nEditCol = 0;
@@ -550,7 +550,7 @@ void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs )
void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
{
- BOOL bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.size() == 0 );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
@@ -577,7 +577,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
}
}
-void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll )
+void ScViewData::SetZoomType( SvxZoomType eNew, sal_Bool bAll )
{
std::vector< SCTAB > vTabs; // Empty for all tabs
if ( !bAll ) // get selected tabs
@@ -594,7 +594,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll )
void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs )
{
- BOOL bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.size() == 0 );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
Fraction aFrac20( 1,5 );
@@ -666,7 +666,7 @@ void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vec
RefreshZoom();
}
-void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll )
+void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll )
{
std::vector< SCTAB > vTabs;
if ( !bAll ) // get selected tabs
@@ -698,7 +698,7 @@ void ScViewData::RefreshZoom()
aLogicMode.SetScaleY( GetZoomY() );
}
-void ScViewData::SetPagebreakMode( BOOL bSet )
+void ScViewData::SetPagebreakMode( sal_Bool bSet )
{
bPagebreak = bSet;
@@ -765,7 +765,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const
ScMarkData aNewMark( aMarkData ); // use a local copy for MarkToSimple
- BOOL bMulti = aNewMark.IsMultiMarked();
+ sal_Bool bMulti = aNewMark.IsMultiMarked();
if (bMulti)
{
aNewMark.MarkToSimple();
@@ -774,7 +774,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const
if (bMulti)
{
rRange = new ScRangeList;
- aNewMark.FillRangeListWithMarks( rRange, FALSE );
+ aNewMark.FillRangeListWithMarks( rRange, false );
}
else
{
@@ -785,7 +785,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const
}
}
-BOOL ScViewData::SimpleColMarked()
+sal_Bool ScViewData::SimpleColMarked()
{
SCCOL nStartCol;
SCROW nStartRow;
@@ -795,12 +795,12 @@ BOOL ScViewData::SimpleColMarked()
SCTAB nEndTab;
if (GetSimpleArea(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) == SC_MARK_SIMPLE)
if (nStartRow==0 && nEndRow==MAXROW)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScViewData::SimpleRowMarked()
+sal_Bool ScViewData::SimpleRowMarked()
{
SCCOL nStartCol;
SCROW nStartRow;
@@ -810,12 +810,12 @@ BOOL ScViewData::SimpleRowMarked()
SCTAB nEndTab;
if (GetSimpleArea(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) == SC_MARK_SIMPLE)
if (nStartCol==0 && nEndCol==MAXCOL)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScViewData::IsMultiMarked()
+sal_Bool ScViewData::IsMultiMarked()
{
// Test for "real" multi selection, calling MarkToSimple on a local copy,
// and taking filtered in simple area marks into account.
@@ -835,7 +835,7 @@ void ScViewData::SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, S
}
void ScViewData::SetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- BYTE nMode )
+ sal_uInt8 nMode )
{
nFillMode = nMode;
nFillStartX = nStartCol;
@@ -878,19 +878,19 @@ void ScViewData::SetOldCursor( SCCOL nNewX, SCROW nNewY )
{
pThisTab->nOldCurX = nNewX;
pThisTab->nOldCurY = nNewY;
- pThisTab->bOldCurValid = TRUE;
+ pThisTab->bOldCurValid = sal_True;
}
void ScViewData::ResetOldCursor()
{
- pThisTab->bOldCurValid = FALSE;
+ pThisTab->bOldCurValid = false;
}
Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY,
Window* pWin, const ScPatternAttr* pPattern,
- BOOL bForceToTop )
+ sal_Bool bForceToTop )
{
- return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, GetScrPos(nPosX,nPosY,eWhich,TRUE),
+ return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, GetScrPos(nPosX,nPosY,eWhich,sal_True),
pWin, nPPTX, nPPTY, GetZoomX(), GetZoomY() ).
GetEditArea( pPattern, bForceToTop );
}
@@ -899,16 +899,16 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
ScEditEngineDefaulter* pNewEngine,
Window* pWin, SCCOL nNewX, SCROW nNewY )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
ScHSplitPos eHWhich = WhichH(eWhich);
- BOOL bWasThere = FALSE;
+ sal_Bool bWasThere = false;
if (pEditView[eWhich])
{
// Wenn die View schon da ist, nichts aufrufen, was die Cursorposition aendert
if (bEditActive[eWhich])
- bWasThere = TRUE;
+ bWasThere = sal_True;
else
pEditView[eWhich]->SetEditEngine(pNewEngine);
@@ -925,26 +925,26 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// bei IdleFormat wird manchmal ein Cursor gemalt, wenn die View schon weg ist (23576)
- ULONG nEC = pNewEngine->GetControlWord();
+ sal_uLong nEC = pNewEngine->GetControlWord();
pNewEngine->SetControlWord(nEC & ~EE_CNTRL_DOIDLEFORMAT);
- ULONG nVC = pEditView[eWhich]->GetControlWord();
+ sal_uLong nVC = pEditView[eWhich]->GetControlWord();
pEditView[eWhich]->SetControlWord(nVC & ~EV_CNTRL_AUTOSCROLL);
- bEditActive[eWhich] = TRUE;
+ bEditActive[eWhich] = sal_True;
const ScPatternAttr* pPattern = pDoc->GetPattern( nNewX, nNewY, nTabNo );
SvxCellHorJustify eJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)
pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
- BOOL bBreak = ( eJust == SVX_HOR_JUSTIFY_BLOCK ) ||
+ sal_Bool bBreak = ( eJust == SVX_HOR_JUSTIFY_BLOCK ) ||
((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue();
- BOOL bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler
+ sal_Bool bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler
Rectangle aPixRect = ScEditUtil( pDoc, nNewX,nNewY,nTabNo, GetScrPos(nNewX,nNewY,eWhich),
pWin, nPPTX,nPPTY,GetZoomX(),GetZoomY() ).
- GetEditArea( pPattern, TRUE );
+ GetEditArea( pPattern, sal_True );
// when right-aligned, leave space for the cursor
// in vertical mode, editing is always right-aligned
@@ -974,13 +974,13 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// For growing use only the alignment value from the attribute, numbers
// (existing or started) with default aligment extend to the right.
- BOOL bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
- BOOL bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
- BOOL bGrowBackwards = bGrowToLeft; // logical left
+ sal_Bool bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
+ sal_Bool bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
+ sal_Bool bGrowBackwards = bGrowToLeft; // logical left
if ( bLayoutRTL )
bGrowBackwards = !bGrowBackwards; // invert on RTL sheet
if ( bAsianVertical )
- bGrowCentered = bGrowToLeft = bGrowBackwards = FALSE; // keep old behavior for asian mode
+ bGrowCentered = bGrowToLeft = bGrowBackwards = false; // keep old behavior for asian mode
long nSizeXPix;
if (bBreak && !bAsianVertical)
@@ -1018,7 +1018,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
Fraction aFract(1,1);
Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin,
- HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, FALSE );
+ HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false );
aPaperSize.Width() = aUtilRect.GetWidth();
}
pNewEngine->SetPaperSize( aPaperSize );
@@ -1035,7 +1035,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
else if ( nEditAdjust == SVX_ADJUST_CENTER )
{
aVis.Right() = ( aPaper.Width() - 1 + nDiff ) / 2;
- bMoveArea = TRUE; // always
+ bMoveArea = sal_True; // always
}
else
{
@@ -1052,11 +1052,11 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
pEditView[eWhich]->SetVisArea(aVis);
// UpdateMode has been disabled in ScInputHandler::StartTable
// must be enabled before EditGrowY (GetTextHeight)
- pNewEngine->SetUpdateMode( TRUE );
+ pNewEngine->SetUpdateMode( sal_True );
pNewEngine->SetStatusEventHdl( LINK( this, ScViewData, EditEngineHdl ) );
- EditGrowY( TRUE ); // adjust to existing text content
+ EditGrowY( sal_True ); // adjust to existing text content
EditGrowX();
Point aDocPos = pEditView[eWhich]->GetWindowPosTopLeft(0);
@@ -1091,7 +1091,7 @@ IMPL_LINK_INLINE_END( ScViewData, EmptyEditHdl, EditStatus *, EMPTYARG )
IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus )
{
- ULONG nStatus = pStatus->GetStatusWord();
+ sal_uLong nStatus = pStatus->GetStatusWord();
if (nStatus & (EE_STAT_HSCROLL | EE_STAT_TEXTHEIGHTCHANGED | EE_STAT_TEXTWIDTHCHANGED | EE_STAT_CURSOROUT))
{
EditGrowY();
@@ -1101,7 +1101,7 @@ IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus )
{
ScSplitPos eWhich = GetActivePart();
if (pEditView[eWhich])
- pEditView[eWhich]->ShowCursor(FALSE);
+ pEditView[eWhich]->ShowCursor(false);
}
}
return 0;
@@ -1118,7 +1118,7 @@ void ScViewData::EditGrowX()
if ( !pCurView || !bEditActive[eWhich])
return;
- BOOL bLayoutRTL = pLocalDoc->IsLayoutRTL( nTabNo );
+ sal_Bool bLayoutRTL = pLocalDoc->IsLayoutRTL( nTabNo );
ScEditEngineDefaulter* pEngine =
(ScEditEngineDefaulter*) pCurView->GetEditEngine();
@@ -1134,22 +1134,22 @@ void ScViewData::EditGrowX()
// Margin ist schon bei der urspruenglichen Breite beruecksichtigt
long nTextWidth = pEngine->CalcTextWidth();
- BOOL bChanged = FALSE;
- BOOL bAsianVertical = pEngine->IsVertical();
+ sal_Bool bChanged = false;
+ sal_Bool bAsianVertical = pEngine->IsVertical();
// get bGrow... variables the same way as in SetEditEngine
const ScPatternAttr* pPattern = pLocalDoc->GetPattern( nEditCol, nEditRow, nTabNo );
SvxCellHorJustify eJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)
pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
- BOOL bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
- BOOL bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
- BOOL bGrowBackwards = bGrowToLeft; // logical left
+ sal_Bool bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
+ sal_Bool bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
+ sal_Bool bGrowBackwards = bGrowToLeft; // logical left
if ( bLayoutRTL )
bGrowBackwards = !bGrowBackwards; // invert on RTL sheet
if ( bAsianVertical )
- bGrowCentered = bGrowToLeft = bGrowBackwards = FALSE; // keep old behavior for asian mode
+ bGrowCentered = bGrowToLeft = bGrowBackwards = false; // keep old behavior for asian mode
- BOOL bUnevenGrow = FALSE;
+ sal_Bool bUnevenGrow = false;
if ( bGrowCentered )
{
while (aArea.GetWidth() + 0 < nTextWidth && ( nEditStartCol > nLeft || nEditEndCol < nRight ) )
@@ -1180,9 +1180,9 @@ void ScViewData::EditGrowX()
aArea.Right() = nCenter + aSize.Width() - nHalf - 1;
}
- bChanged = TRUE;
+ bChanged = sal_True;
if ( nLogicLeft != nLogicRight )
- bUnevenGrow = TRUE;
+ bUnevenGrow = sal_True;
}
}
else if ( bGrowBackwards )
@@ -1205,7 +1205,7 @@ void ScViewData::EditGrowX()
aArea.Right() = aArea.Left() + aSize.Width() - 1;
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -1228,7 +1228,7 @@ void ScViewData::EditGrowX()
aArea.Right() = aArea.Left() + aSize.Width() - 1;
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -1269,7 +1269,7 @@ void ScViewData::EditGrowX()
aVis.Right() -= nMove;
}
pCurView->SetVisArea( aVis );
- bMoveArea = FALSE;
+ bMoveArea = false;
}
pCurView->SetOutputArea(aArea);
@@ -1289,7 +1289,7 @@ void ScViewData::EditGrowX()
}
}
-void ScViewData::EditGrowY( BOOL bInitial )
+void ScViewData::EditGrowY( sal_Bool bInitial )
{
ScSplitPos eWhich = GetActivePart();
ScVSplitPos eVWhich = WhichV(eWhich);
@@ -1298,7 +1298,7 @@ void ScViewData::EditGrowY( BOOL bInitial )
if ( !pCurView || !bEditActive[eWhich])
return;
- ULONG nControl = pEditView[eWhich]->GetControlWord();
+ sal_uLong nControl = pEditView[eWhich]->GetControlWord();
if ( nControl & EV_CNTRL_AUTOSCROLL )
{
// if end of screen had already been reached and scrolling enabled,
@@ -1330,13 +1330,13 @@ void ScViewData::EditGrowY( BOOL bInitial )
// because this occurs in the normal progress of editing a formula.
// Subsequent calls with empty text might involve changed attributes (including
// font height), so they are treated like normal text.
- String aText = pEngine->GetText( (USHORT) 0 );
+ String aText = pEngine->GetText( (sal_uInt16) 0 );
if ( ( aText.Len() == 0 && bInitial ) || aText.GetChar(0) == (sal_Unicode)'=' )
nAllowedExtra = SC_GROWY_BIG_EXTRA;
}
- BOOL bChanged = FALSE;
- BOOL bMaxReached = FALSE;
+ sal_Bool bChanged = false;
+ sal_Bool bMaxReached = false;
while (aArea.GetHeight() + nAllowedExtra < nTextHeight && nEditEndRow < nBottom && !bMaxReached)
{
++nEditEndRow;
@@ -1347,10 +1347,10 @@ void ScViewData::EditGrowY( BOOL bInitial )
if ( aArea.Bottom() > aArea.Top() + aSize.Height() - 1 )
{
aArea.Bottom() = aArea.Top() + aSize.Height() - 1;
- bMaxReached = TRUE; // don't occupy more cells beyond paper size
+ bMaxReached = sal_True; // don't occupy more cells beyond paper size
}
- bChanged = TRUE;
+ bChanged = sal_True;
nAllowedExtra = SC_GROWY_SMALL_EXTRA; // larger value is only for first row
}
@@ -1372,7 +1372,7 @@ void ScViewData::EditGrowY( BOOL bInitial )
void ScViewData::ResetEditView()
{
EditEngine* pEngine = NULL;
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pEditView[i])
{
if (bEditActive[i])
@@ -1381,7 +1381,7 @@ void ScViewData::ResetEditView()
pEngine->RemoveView(pEditView[i]);
pEditView[i]->SetOutputArea( Rectangle() );
}
- bEditActive[i] = FALSE;
+ bEditActive[i] = false;
}
if (pEngine)
@@ -1390,7 +1390,7 @@ void ScViewData::ResetEditView()
void ScViewData::KillEditView()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pEditView[i])
{
if (bEditActive[i])
@@ -1465,7 +1465,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich )
}
Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
- BOOL bAllowNeg ) const
+ sal_Bool bAllowNeg ) const
{
ScHSplitPos eWhichX = SC_SPLIT_LEFT;
ScVSplitPos eWhichY = SC_SPLIT_BOTTOM;
@@ -1495,7 +1495,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
}
- USHORT nTSize;
+ sal_uInt16 nTSize;
SCCOL nPosX = GetPosX(eWhichX);
SCCOL nX;
@@ -1583,7 +1583,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
// Number of cells on a screen
//
-SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHORT nScrSizeX ) const
+SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeX ) const
{
DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
@@ -1591,27 +1591,27 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHO
((ScViewData*)this)->aScrSize.Width() = pView->GetGridWidth(eWhichX);
SCsCOL nX;
- USHORT nScrPosX = 0;
- if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (USHORT) aScrSize.Width();
+ sal_uInt16 nScrPosX = 0;
+ if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (sal_uInt16) aScrSize.Width();
if (nDir==1)
nX = nPosX; // vorwaerts
else
nX = nPosX-1; // rueckwaerts
- BOOL bOut = FALSE;
+ sal_Bool bOut = false;
for ( ; nScrPosX<=nScrSizeX && !bOut; nX = sal::static_int_cast<SCsCOL>(nX + nDir) )
{
SCsCOL nColNo = nX;
if ( nColNo < 0 || nColNo > MAXCOL )
- bOut = TRUE;
+ bOut = sal_True;
else
{
- USHORT nTSize = pDoc->GetColWidth( nColNo, nTabNo );
+ sal_uInt16 nTSize = pDoc->GetColWidth( nColNo, nTabNo );
if (nTSize)
{
long nSizeXPix = ToPixel( nTSize, nPPTX );
- nScrPosX = sal::static_int_cast<USHORT>( nScrPosX + (USHORT) nSizeXPix );
+ nScrPosX = sal::static_int_cast<sal_uInt16>( nScrPosX + (sal_uInt16) nSizeXPix );
}
}
}
@@ -1625,14 +1625,14 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHO
return nX;
}
-SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHORT nScrSizeY ) const
+SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeY ) const
{
DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
if (pView)
((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
- if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = (USHORT) aScrSize.Height();
+ if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = (sal_uInt16) aScrSize.Height();
SCROW nY;
@@ -1684,7 +1684,7 @@ SCROW ScViewData::PrevCellsY( ScVSplitPos eWhichY ) const
}
-BOOL ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix )
+sal_Bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix )
{
const ScMergeAttr* pMerge = (const ScMergeAttr*) pDoc->GetAttr( nX,nY,nTabNo, ATTR_MERGE );
if ( pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1 )
@@ -1705,25 +1705,25 @@ BOOL ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r
continue;
}
- USHORT nHeight = pDoc->GetRowHeight(nRow, nTabNo);
+ sal_uInt16 nHeight = pDoc->GetRowHeight(nRow, nTabNo);
nOutHeight += ToPixel(nHeight, nPPTY);
}
rSizeXPix = nOutWidth;
rSizeYPix = nOutHeight;
- return TRUE;
+ return sal_True;
}
else
{
rSizeXPix = ToPixel( pDoc->GetColWidth( nX, nTabNo ), nPPTX );
rSizeYPix = ToPixel( pDoc->GetRowHeight( nY, nTabNo ), nPPTY );
- return FALSE;
+ return false;
}
}
-BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
+sal_Bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
SCsCOL& rPosX, SCsROW& rPosY,
- BOOL bTestMerge, BOOL bRepair, BOOL bNextIfLarge )
+ sal_Bool bTestMerge, sal_Bool bRepair, sal_Bool bNextIfLarge )
{
// special handling of 0 is now in ScViewFunctionSet::SetCursorAtPoint
@@ -1820,23 +1820,23 @@ BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
pDoc->RemoveFlagsTab( 0,0, MAXCOL,MAXROW, nTabNo, SC_MF_HOR | SC_MF_VER );
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
- pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, TRUE, FALSE );
+ pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, sal_True, false );
if (pDocShell)
pDocShell->PostPaint( ScRange(0,0,nTabNo,MAXCOL,MAXROW,nTabNo), PAINT_GRID );
}
}
}
- return FALSE;
+ return false;
}
void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
- SCsCOL nPosX, SCsROW nPosY, BOOL& rLeft, BOOL& rTop )
+ SCsCOL nPosX, SCsROW nPosY, sal_Bool& rLeft, sal_Bool& rTop )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
long nLayoutSign = bLayoutRTL ? -1 : 1;
- Point aCellStart = GetScrPos( nPosX, nPosY, eWhich, TRUE );
+ Point aCellStart = GetScrPos( nPosX, nPosY, eWhich, sal_True );
long nSizeX;
long nSizeY;
GetMergeSizePixel( nPosX, nPosY, nSizeX, nSizeY );
@@ -1857,14 +1857,14 @@ void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
{
long nThis = pDoc->GetColWidth( i,nTabNo );
nTPosX -= nThis;
- nPixPosX -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTX);
+ nPixPosX -= ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTX);
}
else
for ( i=nNewPosX; i<nOldPosX; i++ )
{
long nThis = pDoc->GetColWidth( i,nTabNo );
nTPosX += nThis;
- nPixPosX += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTX);
+ nPixPosX += ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTX);
}
pThisTab->nPosX[eWhich] = nNewPosX;
@@ -1894,7 +1894,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
SCROW nRows = std::min( nNewPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY -= nThis * nRows;
- nPixPosY -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows;
+ nPixPosY -= ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTY) * nRows;
}
else
for ( i=nNewPosY; i<nOldPosY; i++ )
@@ -1903,7 +1903,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
SCROW nRows = std::min( nOldPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY += nThis * nRows;
- nPixPosY += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows;
+ nPixPosY += ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTY) * nRows;
}
pThisTab->nPosY[eWhich] = nNewPosY;
@@ -1920,7 +1920,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
void ScViewData::RecalcPixPos() // nach Zoom-Aenderungen
{
- for (USHORT eWhich=0; eWhich<2; eWhich++)
+ for (sal_uInt16 eWhich=0; eWhich<2; eWhich++)
{
long nPixPosX = 0;
SCCOL nPosX = pThisTab->nPosX[eWhich];
@@ -1953,7 +1953,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
SCCOL nCol;
SCROW nRow;
- USHORT nTSize;
+ sal_uInt16 nTSize;
long nSizePix;
long nScrPosX = 0;
long nScrPosY = 0;
@@ -1968,7 +1968,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
if (nTSize)
{
nSizePix = ToPixel( nTSize, nPPTX );
- nScrPosX += (USHORT) nSizePix;
+ nScrPosX += (sal_uInt16) nSizePix;
}
}
@@ -1978,7 +1978,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
if (nTSize)
{
nSizePix = ToPixel( nTSize, nPPTY );
- nScrPosY += (USHORT) nSizePix;
+ nScrPosY += (sal_uInt16) nSizePix;
}
}
@@ -1990,14 +1990,14 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart )
long nSize;
long nTwips;
long nAdd;
- BOOL bEnd;
+ sal_Bool bEnd;
nSize = 0;
nTwips = (long) (rVisAreaStart.X() / HMM_PER_TWIPS);
if ( pDoc->IsLayoutRTL( nTabNo ) )
nTwips = -nTwips;
SCCOL nX1 = 0;
- bEnd = FALSE;
+ bEnd = false;
while (!bEnd)
{
nAdd = (long) pDoc->GetColWidth(nX1,nTabNo);
@@ -2007,13 +2007,13 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart )
++nX1;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
nSize = 0;
nTwips = (long) (rVisAreaStart.Y() / HMM_PER_TWIPS);
SCROW nY1 = 0;
- bEnd = FALSE;
+ bEnd = false;
while (!bEnd)
{
nAdd = (long) pDoc->GetRowHeight(nY1,nTabNo);
@@ -2023,7 +2023,7 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart )
++nY1;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
SetActivePart( SC_SPLIT_BOTTOMLEFT );
@@ -2082,7 +2082,7 @@ ScDrawView* ScViewData::GetScDrawView()
return pView->GetScDrawView();
}
-BOOL ScViewData::IsMinimized()
+sal_Bool ScViewData::IsMinimized()
{
DBG_ASSERT( pView, "IsMinimized() ohne View" );
return pView->IsMinimized();
@@ -2093,7 +2093,7 @@ void ScViewData::UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY
Fraction aOldX = GetZoomX();
Fraction aOldY = GetZoomY();
- SetZoom( rNewX, rNewY, FALSE );
+ SetZoom( rNewX, rNewY, false );
Fraction aWidth = GetZoomX();
aWidth *= Fraction( aScrSize.Width(),1 );
@@ -2126,7 +2126,7 @@ void ScViewData::CalcPPT()
if (nEndCol<20)
nEndCol = 20; // same end position as when determining draw scale
- USHORT nTwips = pDoc->GetCommonWidth( nEndCol, nTabNo );
+ sal_uInt16 nTwips = pDoc->GetCommonWidth( nEndCol, nTabNo );
if ( nTwips )
{
double fOriginal = nTwips * nPPTX;
@@ -2160,10 +2160,10 @@ void ScViewData::WriteUserData(String& rData)
// PosX[links]/PosX[rechts]/PosY[oben]/PosY[unten]
// wenn Zeilen groesser 8192, "+" statt "/"
- USHORT nZoom = (USHORT)((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator());
+ sal_uInt16 nZoom = (sal_uInt16)((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator());
rData = String::CreateFromInt32( nZoom );
rData += '/';
- nZoom = (USHORT)((pThisTab->aPageZoomY.GetNumerator() * 100) / pThisTab->aPageZoomY.GetDenominator());
+ nZoom = (sal_uInt16)((pThisTab->aPageZoomY.GetNumerator() * 100) / pThisTab->aPageZoomY.GetDenominator());
rData += String::CreateFromInt32( nZoom );
rData += '/';
if (bPagebreak)
@@ -2247,10 +2247,10 @@ void ScViewData::ReadUserData(const String& rData)
Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; //! evaluate (all sheets?)
String aZoomStr = rData.GetToken(0); // Zoom/PageZoom/Modus
- USHORT nNormZoom = sal::static_int_cast<USHORT>(aZoomStr.GetToken(0,'/').ToInt32());
+ sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.GetToken(0,'/').ToInt32());
if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM )
aZoomX = aZoomY = Fraction( nNormZoom, 100 ); // "normaler" Zoom (immer)
- USHORT nPageZoom = sal::static_int_cast<USHORT>(aZoomStr.GetToken(1,'/').ToInt32());
+ sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.GetToken(1,'/').ToInt32());
if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM )
aPageZoomX = aPageZoomY = Fraction( nPageZoom, 100 ); // Pagebreak-Zoom, wenn gesetzt
sal_Unicode cMode = aZoomStr.GetToken(2,'/').GetChar(0); // 0 oder "0"/"1"
@@ -2420,7 +2420,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
// sheet selection and selected ranges
const ScMarkData& rMarkData = GetMarkData();
rTabSett.mbSelected = rMarkData.GetTableSelect( nTab );
- rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, TRUE );
+ rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, sal_True );
// grid color
rTabSett.maGridColor.SetColor( COL_AUTO );
@@ -2713,7 +2713,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
sal_Int32 nCount(rSettings.getLength());
sal_Int32 nTemp32(0);
sal_Int16 nTemp16(0);
- sal_Bool bPageMode(sal_False);
+ sal_Bool bPageMode(false);
for (sal_Int32 i = 0; i < nCount; i++)
{
// SC_VIEWID has to parse and use by mba
@@ -2875,11 +2875,11 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
void ScViewData::SetOptions( const ScViewOptions& rOpt )
{
// if visibility of horiz. ScrollBar is changed, TabBar may have to be resized...
- BOOL bHScrollChanged = ( rOpt.GetOption(VOPT_HSCROLL) != pOptions->GetOption(VOPT_HSCROLL) );
+ sal_Bool bHScrollChanged = ( rOpt.GetOption(VOPT_HSCROLL) != pOptions->GetOption(VOPT_HSCROLL) );
// if graphics are turned on or off, animation has to be started or stopped
// graphics are controlled by VOBJ_TYPE_OLE
- BOOL bGraphicsChanged = ( pOptions->GetObjMode(VOBJ_TYPE_OLE) !=
+ sal_Bool bGraphicsChanged = ( pOptions->GetObjMode(VOBJ_TYPE_OLE) !=
rOpt.GetObjMode(VOBJ_TYPE_OLE) );
*pOptions = rOpt;
@@ -2897,34 +2897,34 @@ Point ScViewData::GetMousePosPixel()
return pView->GetMousePosPixel();
}
-void ScViewData::UpdateInputHandler( BOOL bForce, BOOL bStopEditing )
+void ScViewData::UpdateInputHandler( sal_Bool bForce, sal_Bool bStopEditing )
{
if (pViewShell)
pViewShell->UpdateInputHandler( bForce, bStopEditing );
}
-BOOL ScViewData::IsOle()
+sal_Bool ScViewData::IsOle()
{
return pDocShell && pDocShell->IsOle();
}
-BOOL ScViewData::UpdateFixX( SCTAB nTab ) // TRUE = Wert geaendert
+sal_Bool ScViewData::UpdateFixX( SCTAB nTab ) // sal_True = Wert geaendert
{
if (!ValidTab(nTab)) // Default
nTab=nTabNo; // akuelle Tabelle
if (!pView || pTabData[nTab]->eHSplitMode != SC_SPLIT_FIX)
- return FALSE;
+ return false;
ScDocument* pLocalDoc = GetDocument();
if (!pLocalDoc->HasTable(nTab)) // if called from reload, the sheet may not exist
- return FALSE;
+ return false;
SCCOL nFix = pTabData[nTab]->nFixPosX;
long nNewPos = 0;
for (SCCOL nX=pTabData[nTab]->nPosX[SC_SPLIT_LEFT]; nX<nFix; nX++)
{
- USHORT nTSize = pLocalDoc->GetColWidth( nX, nTab );
+ sal_uInt16 nTSize = pLocalDoc->GetColWidth( nX, nTab );
if (nTSize)
{
long nPix = ToPixel( nTSize, nPPTX );
@@ -2937,29 +2937,29 @@ BOOL ScViewData::UpdateFixX( SCTAB nTab ) // TRUE = Wert geaendert
pTabData[nTab]->nHSplitPos = nNewPos;
if (nTab == nTabNo)
RecalcPixPos(); //! sollte nicht noetig sein !!!
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScViewData::UpdateFixY( SCTAB nTab ) // TRUE = Wert geaendert
+sal_Bool ScViewData::UpdateFixY( SCTAB nTab ) // sal_True = Wert geaendert
{
if (!ValidTab(nTab)) // Default
nTab=nTabNo; // akuelle Tabelle
if (!pView || pTabData[nTab]->eVSplitMode != SC_SPLIT_FIX)
- return FALSE;
+ return false;
ScDocument* pLocalDoc = GetDocument();
if (!pLocalDoc->HasTable(nTab)) // if called from reload, the sheet may not exist
- return FALSE;
+ return false;
SCROW nFix = pTabData[nTab]->nFixPosY;
long nNewPos = 0;
for (SCROW nY=pTabData[nTab]->nPosY[SC_SPLIT_TOP]; nY<nFix; nY++)
{
- USHORT nTSize = pLocalDoc->GetRowHeight( nY, nTab );
+ sal_uInt16 nTSize = pLocalDoc->GetRowHeight( nY, nTab );
if (nTSize)
{
long nPix = ToPixel( nTSize, nPPTY );
@@ -2972,18 +2972,18 @@ BOOL ScViewData::UpdateFixY( SCTAB nTab ) // TRUE = Wert geaendert
pTabData[nTab]->nVSplitPos = nNewPos;
if (nTab == nTabNo)
RecalcPixPos(); //! sollte nicht noetig sein !!!
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScViewData::UpdateOutlinerFlags( Outliner& rOutl ) const
{
ScDocument* pLocalDoc = GetDocument();
- BOOL bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell();
+ sal_Bool bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell();
- ULONG nCntrl = rOutl.GetControlWord();
+ sal_uLong nCntrl = rOutl.GetControlWord();
nCntrl |= EE_CNTRL_URLSFXEXECUTE;
nCntrl |= EE_CNTRL_MARKFIELDS;
nCntrl |= EE_CNTRL_AUTOCORRECT;
@@ -3022,7 +3022,7 @@ void ScViewData::AddPixelsWhile( long & rScrY, long nEndPixels, SCROW & rPosY,
while (rScrY <= nEndPixels && nRow <= nEndRow)
{
SCROW nHeightEndRow;
- USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow);
if (nHeightEndRow > nEndRow)
nHeightEndRow = nEndRow;
if (!nHeight)
@@ -3062,7 +3062,7 @@ void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
while (rScrY <= nEndPixels && nRow >= nStartRow)
{
SCROW nHeightStartRow;
- USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
if (nHeightStartRow < nStartRow)
nHeightStartRow = nStartRow;
if (!nHeight)
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index f3cf8dd7ee73..8b3f7657ef99 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -115,7 +115,7 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName );
//----------------------------------------------------------------------------
-BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData )
+sal_Bool ScViewFunc::AdjustBlockHeight( sal_Bool bPaint, ScMarkData* pMarkData )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
if (!pMarkData)
@@ -143,25 +143,25 @@ BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData )
aZoomX = aZoomY = Fraction( 1, 1 );
}
- BOOL bAnyChanged = FALSE;
+ sal_Bool bAnyChanged = false;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
if (pMarkData->GetTableSelect(nTab))
{
SCCOLROW* pOneRange = pRanges;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
SCROW nPaintY = 0;
for (SCROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++)
{
SCROW nStartNo = *(pOneRange++);
SCROW nEndNo = *(pOneRange++);
if (pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, 0, aProv.GetDevice(),
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE ))
+ nPPTX, nPPTY, aZoomX, aZoomY, false ))
{
if (!bChanged)
nPaintY = nStartNo;
- bAnyChanged = bChanged = TRUE;
+ bAnyChanged = bChanged = sal_True;
}
}
if ( bPaint && bChanged )
@@ -180,7 +180,7 @@ BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData )
//----------------------------------------------------------------------------
-BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint )
+sal_Bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -189,9 +189,9 @@ BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint )
double nPPTY = GetViewData()->GetPPTY();
Fraction aZoomX = GetViewData()->GetZoomX();
Fraction aZoomY = GetViewData()->GetZoomY();
- USHORT nOldPixel = 0;
+ sal_uInt16 nOldPixel = 0;
if (nStartRow == nEndRow)
- nOldPixel = (USHORT) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
+ nOldPixel = (sal_uInt16) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
ScSizeDeviceProvider aProv(pDocSh);
if (aProv.IsPrinter())
@@ -200,14 +200,14 @@ BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint )
nPPTY = aProv.GetPPTY();
aZoomX = aZoomY = Fraction( 1, 1 );
}
- BOOL bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ sal_Bool bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
if (bChanged && ( nStartRow == nEndRow ))
{
- USHORT nNewPixel = (USHORT) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
+ sal_uInt16 nNewPixel = (sal_uInt16) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
if ( nNewPixel == nOldPixel )
- bChanged = FALSE;
+ bChanged = false;
}
if ( bPaint && bChanged )
@@ -258,7 +258,7 @@ ScAutoSum lcl_IsAutoSumData( ScDocument* pDoc, SCCOL nCol, SCROW nRow,
ScAutoSum lcl_SeekAutoSumData( ScDocument* pDoc, SCCOL& nCol, SCROW& nRow,
SCTAB nTab, ScDirection eDir, SCCOLROW& nExtend )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while (nCount < SC_AUTOSUM_MAXCOUNT)
{
if ( eDir == DIR_TOP )
@@ -414,7 +414,7 @@ bool lcl_GetAutoSumForRowRange( ScDocument* pDoc, ScRangeList& rRangeList, const
//----------------------------------------------------------------------------
-BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
+sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
{
ScDocument* pDoc = GetViewData()->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -430,8 +430,8 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
SCROW nSeekRow = nRow;
SCCOLROW nExtend; // will become valid via reference for ScAutoSumSum
- BOOL bCol = FALSE;
- BOOL bRow = FALSE;
+ sal_Bool bCol = false;
+ sal_Bool bRow = false;
ScAutoSum eSum;
if ( nRow != 0
@@ -441,19 +441,19 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData )
)
{
- bRow = TRUE;
+ bRow = sal_True;
nSeekRow = nRow - 1;
}
else if ( nCol != 0 && (eSum = lcl_IsAutoSumData( pDoc, nCol-1, nRow, nTab,
DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData )
{
- bCol = TRUE;
+ bCol = sal_True;
nSeekCol = nCol - 1;
}
else if ( (eSum = lcl_SeekAutoSumData( pDoc, nCol, nSeekRow, nTab, DIR_TOP, nExtend /*out*/ )) != ScAutoSumNone )
- bRow = TRUE;
+ bRow = sal_True;
else if (( eSum = lcl_SeekAutoSumData( pDoc, nSeekCol, nRow, nTab, DIR_LEFT, nExtend /*out*/ )) != ScAutoSumNone )
- bCol = TRUE;
+ bCol = sal_True;
if ( bCol || bRow )
{
@@ -473,7 +473,7 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
else
nEndCol = nCol - 1; // maybe extend data area to the right
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = false;
do
{
if ( eSum == ScAutoSumData )
@@ -513,9 +513,9 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
}
}
} while ( bContinue );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------
@@ -718,7 +718,7 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor
// set new mark range and cursor position
const ScRange aMarkRange( nStartCol, nStartRow, nTab, nMarkEndCol, nMarkEndRow, nTab );
- MarkRange( aMarkRange, FALSE, bContinue );
+ MarkRange( aMarkRange, false, bContinue );
if ( bSetCursor )
{
SetCursor( nMarkEndCol, nMarkEndRow );
@@ -836,8 +836,8 @@ void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData
pInsDoc->SetClipArea( ScRange(aPos) );
// insert Block, with Undo etc.
- if ( PasteFromClip( IDF_CONTENTS, pInsDoc, PASTE_NOFUNC, FALSE, FALSE,
- FALSE, INS_NONE, IDF_ATTRIB ) )
+ if ( PasteFromClip( IDF_CONTENTS, pInsDoc, PASTE_NOFUNC, false, false,
+ false, INS_NONE, IDF_ATTRIB ) )
{
const SfxUInt32Item* pItem = (SfxUInt32Item*) pInsDoc->GetAttr(
nCol, nRow, nTab, ATTR_VALUE_FORMAT );
@@ -862,8 +862,8 @@ void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData
//----------------------------------------------------------------------------
// manual page break
-void ScViewFunc::InsertPageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* pPos,
- BOOL bSetModified )
+void ScViewFunc::InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos,
+ sal_Bool bSetModified )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aCursor;
@@ -872,18 +872,18 @@ void ScViewFunc::InsertPageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* p
else
aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab );
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- InsertPageBreak( bColumn, aCursor, bRecord, bSetModified, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ InsertPageBreak( bColumn, aCursor, bRecord, bSetModified, false );
if ( bSuccess && bSetModified )
- UpdatePageBreakData( TRUE ); // for PageBreak-Mode
+ UpdatePageBreakData( true ); // for PageBreak-Mode
}
//----------------------------------------------------------------------------
-void ScViewFunc::DeletePageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* pPos,
- BOOL bSetModified )
+void ScViewFunc::DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos,
+ sal_Bool bSetModified )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aCursor;
@@ -892,11 +892,11 @@ void ScViewFunc::DeletePageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* p
else
aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab );
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- RemovePageBreak( bColumn, aCursor, bRecord, bSetModified, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ RemovePageBreak( bColumn, aCursor, bRecord, bSetModified, false );
if ( bSuccess && bSetModified )
- UpdatePageBreakData( TRUE ); // for PageBreak-Mode
+ UpdatePageBreakData( true ); // for PageBreak-Mode
}
//----------------------------------------------------------------------------
@@ -906,13 +906,13 @@ void ScViewFunc::RemoveManualBreaks()
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if (bUndo)
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pUndoDoc );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) );
}
@@ -920,14 +920,14 @@ void ScViewFunc::RemoveManualBreaks()
pDoc->RemoveManualBreaks(nTab);
pDoc->UpdatePageBreaks(nTab);
- UpdatePageBreakData( TRUE );
+ UpdatePageBreakData( sal_True );
pDocSh->SetDocumentModified();
pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
}
//----------------------------------------------------------------------------
-void ScViewFunc::SetPrintZoom(USHORT nScale, USHORT nPages)
+void ScViewFunc::SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -944,9 +944,9 @@ void ScViewFunc::AdjustPrintZoom()
//----------------------------------------------------------------------------
-void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
+void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint,
const String* pRepCol, const String* pRepRow,
- BOOL bAddPrint )
+ sal_Bool bAddPrint )
{
// on all selected tables
@@ -955,7 +955,7 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
SCTAB nTabCount = pDoc->GetTableCount();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTab;
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver();
@@ -980,8 +980,8 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
if ( pPrint->Len() )
{
const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
- USHORT nTCount = pPrint->GetTokenCount(sep);
- for (USHORT i=0; i<nTCount; i++)
+ sal_uInt16 nTCount = pPrint->GetTokenCount(sep);
+ for (sal_uInt16 i=0; i<nTCount; i++)
{
String aToken = pPrint->GetToken(i, sep);
if ( aRange.ParseAny( aToken, pDoc, aDetails ) & SCA_VALID )
@@ -999,7 +999,7 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
{
rMark.MarkToMulti();
ScRangeListRef pList( new ScRangeList );
- rMark.FillRangeListWithMarks( pList, FALSE );
+ rMark.FillRangeListWithMarks( pList, false );
for (size_t i = 0, n = pList->size(); i < n; ++i)
{
ScRange* pR = (*pList)[i];
@@ -1055,9 +1055,9 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
//----------------------------------------------------------------------------
// Merge cells
-BOOL ScViewFunc::TestMergeCells() // pre-test (for menu)
+sal_Bool ScViewFunc::TestMergeCells() // pre-test (for menu)
{
- // simple test: TRUE if there's a selection but no multi selection and not filtered
+ // simple test: sal_True if there's a selection but no multi selection and not filtered
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
@@ -1066,13 +1066,13 @@ BOOL ScViewFunc::TestMergeCells() // pre-test (for menu)
return GetViewData()->GetSimpleArea( aDummy) == SC_MARK_SIMPLE;
}
else
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------
-BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bCenter )
+sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord, sal_Bool bCenter )
{
// Editable- and Being-Nested- test must be at the beginning (in DocFunc too),
// so that the Contents-QueryBox won't appear
@@ -1080,7 +1080,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -1088,7 +1088,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if (!rMark.IsMarked())
{
ErrorMessage(STR_NOMULTISELECT);
- return FALSE;
+ return false;
}
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -1105,14 +1105,14 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if ( nStartCol == nEndCol && nStartRow == nEndRow )
{
// nothing to do
- return TRUE;
+ return true;
}
if ( pDoc->HasAttrib( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{ // "Don't nest merging !"
ErrorMessage(STR_MSSG_MERGECELLS_0);
- return FALSE;
+ return false;
}
// Check for the contents of all selected tables.
@@ -1132,7 +1132,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
bAskDialog = true;
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = true;
if (bAskDialog)
{
@@ -1142,12 +1142,12 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
WinBits(WB_YES_NO_CANCEL | WB_DEF_NO),
ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ),
ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) );
- USHORT nRetVal = aBox.Execute();
+ sal_uInt16 nRetVal = aBox.Execute();
if ( nRetVal == RET_YES )
- rDoContents = TRUE;
+ rDoContents = sal_True;
else if ( nRetVal == RET_CANCEL )
- bOk = FALSE;
+ bOk = false;
}
}
@@ -1160,7 +1160,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if (bOk)
{
SetCursor( nStartCol, nStartRow );
- //DoneBlockMode( FALSE);
+ //DoneBlockMode( sal_False);
Unmark();
pDocSh->UpdateOle(GetViewData());
@@ -1174,15 +1174,15 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
//----------------------------------------------------------------------------
-BOOL ScViewFunc::TestRemoveMerge()
+sal_Bool ScViewFunc::TestRemoveMerge()
{
- BOOL bMerged = FALSE;
+ sal_Bool bMerged = false;
ScRange aRange;
if (GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE)
{
ScDocument* pDoc = GetViewData()->GetDocument();
if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) )
- bMerged = TRUE;
+ bMerged = sal_True;
}
return bMerged;
}
@@ -1216,14 +1216,14 @@ static bool lcl_extendMergeRange(ScCellMergeOption& rOption, const ScRange& rRan
return bExtended;
}
-BOOL ScViewFunc::RemoveMerge( BOOL bRecord )
+sal_Bool ScViewFunc::RemoveMerge( sal_Bool bRecord )
{
ScRange aRange;
ScEditableTester aTester( this );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
else if (GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE)
{
@@ -1258,7 +1258,7 @@ BOOL ScViewFunc::RemoveMerge( BOOL bRecord )
while (bExtended);
HideCursor();
- BOOL bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, bRecord, FALSE );
+ sal_Bool bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, bRecord, false );
aExtended = aOption.getFirstSingleRange();
MarkRange( aExtended );
ShowCursor();
@@ -1266,19 +1266,19 @@ BOOL ScViewFunc::RemoveMerge( BOOL bRecord )
if (bOk)
pDocSh->UpdateOle(GetViewData());
}
- return TRUE; //! bOk ??
+ return sal_True; //! bOk ??
}
//----------------------------------------------------------------------------
-void ScViewFunc::FillSimple( FillDir eDir, BOOL bRecord )
+void ScViewFunc::FillSimple( FillDir eDir, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, bRecord, false );
if (bSuccess)
{
pDocSh->UpdateOle(GetViewData());
@@ -1292,16 +1292,16 @@ void ScViewFunc::FillSimple( FillDir eDir, BOOL bRecord )
//----------------------------------------------------------------------------
void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
- double fStart, double fStep, double fMax, BOOL bRecord )
+ double fStart, double fStep, double fMax, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().
+ sal_Bool bSuccess = pDocSh->GetDocFunc().
FillSeries( aRange, &rMark, eDir, eCmd, eDateCmd,
- fStart, fStep, fMax, bRecord, FALSE );
+ fStart, fStep, fMax, bRecord, false );
if (bSuccess)
{
pDocSh->UpdateOle(GetViewData());
@@ -1324,18 +1324,18 @@ void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
//----------------------------------------------------------------------------
void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord )
+ SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScRange aRange( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab );
ScRange aSourceRange( aRange );
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().
- FillAuto( aRange, &rMark, eDir, nCount, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().
+ FillAuto( aRange, &rMark, eDir, nCount, bRecord, false );
if (bSuccess)
{
- MarkRange( aRange, FALSE ); // aRange was modified in FillAuto
+ MarkRange( aRange, false ); // aRange was modified in FillAuto
pDocSh->UpdateOle(GetViewData());
UpdateScrollBars();
@@ -1381,7 +1381,7 @@ void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
//----------------------------------------------------------------------------
-void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL bAsLink )
+void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink )
{
//! allow source sheet to be protected
ScEditableTester aTester( this );
@@ -1395,11 +1395,11 @@ void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL
ScDocument* pDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTab = GetViewData()->GetTabNo();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScRange aMarkRange;
rMark.MarkToSimple();
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if (bMulti)
rMark.GetMultiMarkArea( aMarkRange );
else if (rMark.IsMarked())
@@ -1535,8 +1535,8 @@ void ScViewFunc::TransliterateText( sal_Int32 nType )
aFuncMark.SetMarkArea( ScRange( aCursor ) );
}
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- TransliterateText( aFuncMark, nType, TRUE, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ TransliterateText( aFuncMark, nType, sal_True, false );
if (bSuccess)
{
GetViewData()->GetViewShell()->UpdateInputHandler();
@@ -1570,7 +1570,7 @@ ScAutoFormatData* ScViewFunc::CreateAutoFormatData()
//----------------------------------------------------------------------------
-void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
+void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
@@ -1578,7 +1578,7 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, false );
if (bSuccess)
pDocSh->UpdateOle(GetViewData());
}
@@ -1591,21 +1591,21 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
// Suchen & Ersetzen
void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
- BOOL bAddUndo, BOOL bIsApi )
+ sal_Bool bAddUndo, sal_Bool bIsApi )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
if (bAddUndo && !pDoc->IsUndoEnabled())
- bAddUndo = FALSE;
+ bAddUndo = false;
SCCOL nCol = GetViewData()->GetCurX();
SCROW nRow = GetViewData()->GetCurY();
SCTAB nTab = GetViewData()->GetTabNo();
- USHORT nCommand = pSearchItem->GetCommand();
- BOOL bAllTables = pSearchItem->IsAllTables();
- BOOL* pOldSelectedTables = NULL;
- USHORT nOldSelectedCount = 0;
+ sal_uInt16 nCommand = pSearchItem->GetCommand();
+ sal_Bool bAllTables = pSearchItem->IsAllTables();
+ sal_Bool* pOldSelectedTables = NULL;
+ sal_uInt16 nOldSelectedCount = 0;
SCTAB nOldTab = nTab;
SCTAB nLastTab = pDoc->GetTableCount() - 1;
SCTAB nStartTab, nEndTab;
@@ -1613,7 +1613,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
{
nStartTab = 0;
nEndTab = nLastTab;
- pOldSelectedTables = new BOOL [ nEndTab + 1 ];
+ pOldSelectedTables = new sal_Bool [ nEndTab + 1 ];
for ( SCTAB j = 0; j <= nEndTab; j++ )
{
pOldSelectedTables[j] = rMark.GetTableSelect( j );
@@ -1649,7 +1649,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
if ( nCommand == SVX_SEARCHCMD_FIND
|| nCommand == SVX_SEARCHCMD_FIND_ALL)
- bAddUndo = FALSE;
+ bAddUndo = false;
//! account for bAttrib during Undo !!!
@@ -1670,26 +1670,26 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
{ //! select all, after pUndoMark has been created
for ( SCTAB j = nStartTab; j <= nEndTab; j++ )
{
- rMark.SelectTable( j, TRUE );
+ rMark.SelectTable( j, sal_True );
}
}
- DoneBlockMode(TRUE); // don't delete mark
+ DoneBlockMode(true); // don't delete mark
InitOwnBlockMode();
// If search starts at the beginning don't ask again whether it shall start at the beginning
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = true;
if ( nCol == 0 && nRow == 0 && nTab == nStartTab && !pSearchItem->GetBackward() )
- bFirst = FALSE;
+ bFirst = false;
- BOOL bFound = FALSE;
- while (TRUE)
+ sal_Bool bFound = false;
+ while (sal_True)
{
GetFrameWin()->EnterWait();
if (pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, rMark, aUndoStr, pUndoDoc ) )
{
- bFound = TRUE;
- bFirst = TRUE;
+ bFound = sal_True;
+ bFirst = sal_True;
if (bAddUndo)
{
GetViewData()->GetDocShell()->GetUndoManager()->AddUndoAction(
@@ -1704,8 +1704,8 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
else if ( bFirst && (nCommand == SVX_SEARCHCMD_FIND ||
nCommand == SVX_SEARCHCMD_REPLACE) )
{
- bFirst = FALSE;
- USHORT nRetVal;
+ bFirst = false;
+ sal_uInt16 nRetVal;
GetFrameWin()->LeaveWait();
if ( bIsApi )
nRetVal = RET_NO;
@@ -1713,7 +1713,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
{
// search dialog as parent (if available)
Window* pParent = GetParentOrChild(SID_SEARCH_DLG);
- USHORT nStrId;
+ sal_uInt16 nStrId;
if ( pSearchItem->GetBackward() )
{
if ( nStartTab == nEndTab )
@@ -1766,7 +1766,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
break; // break 'while (TRUE)'
}
- } // of while TRUE
+ } // of while sal_True
if ( pOldSelectedTables )
{ // restore originally selected table
@@ -1776,11 +1776,11 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
}
if ( bFound )
{ // if a table is selected as a "match" it remains (selected)
- rMark.SelectTable( nTab, TRUE );
+ rMark.SelectTable( nTab, true );
// It's a swap if only one table was selected before
//! otherwise now one table more might be selected
if ( nOldSelectedCount == 1 && nTab != nOldTab )
- rMark.SelectTable( nOldTab, FALSE );
+ rMark.SelectTable( nOldTab, false );
}
delete [] pOldSelectedTables;
}
@@ -1795,10 +1795,10 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
// if nothing is marked, DoneBlockMode, then marking can start
// directly from this place via Shift-Cursor
if (!rMark.IsMarked() && !rMark.IsMultiMarked())
- DoneBlockMode(TRUE);
+ DoneBlockMode(sal_True);
AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
- SetCursor( nCol, nRow, TRUE );
+ SetCursor( nCol, nRow, sal_True );
if ( nCommand == SVX_SEARCHCMD_REPLACE
|| nCommand == SVX_SEARCHCMD_REPLACE_ALL )
@@ -1849,7 +1849,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
GetFrameWin()->EnterWait();
- BOOL bExact =
+ sal_Bool bExact =
pDoc->Solver(
rParam.aRefFormulaCell.Col(),
rParam.aRefFormulaCell.Row(),
@@ -1861,7 +1861,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
GetFrameWin()->LeaveWait();
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const ScPatternAttr* pPattern = pDoc->GetPattern( nDestCol, nDestRow, nDestTab );
if ( pPattern )
nFormat = pPattern->GetNumberFormat( pFormatter );
@@ -1887,12 +1887,12 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
MessBox aBox( GetViewData()->GetDialogParent(),
WinBits(WB_YES_NO | WB_DEF_NO),
ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr );
- USHORT nRetVal = aBox.Execute();
+ sal_uInt16 nRetVal = aBox.Execute();
if ( RET_YES == nRetVal )
EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult );
- GetViewData()->GetViewShell()->UpdateInputHandler( TRUE );
+ GetViewData()->GetViewShell()->UpdateInputHandler( sal_True );
}
}
@@ -1900,14 +1900,14 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
//----------------------------------------------------------------------------
// multi operation
-void ScViewFunc::TabOp( const ScTabOpParam& rParam, BOOL bRecord )
+void ScViewFunc::TabOp( const ScTabOpParam& rParam, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- pDocSh->GetDocFunc().TabOp( aRange, &rMark, rParam, bRecord, FALSE );
+ pDocSh->GetDocFunc().TabOp( aRange, &rMark, rParam, bRecord, false );
}
else
ErrorMessage(STR_NOMULTISELECT);
@@ -1917,7 +1917,7 @@ void ScViewFunc::TabOp( const ScTabOpParam& rParam, BOOL bRecord )
//----------------------------------------------------------------------------
void ScViewFunc::MakeScenario( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -1925,7 +1925,7 @@ void ScViewFunc::MakeScenario( const String& rName, const String& rComment,
SCTAB nNewTab = pDocSh->MakeScenario( nTab, rName, rComment, rColor, nFlags, rMark );
if (nFlags & SC_SCENARIO_COPYALL)
- SetTabNo( nNewTab, TRUE ); // SC_SCENARIO_COPYALL -> visible
+ SetTabNo( nNewTab, true ); // SC_SCENARIO_COPYALL -> visible
else
{
SfxBindings& rBindings = GetViewData()->GetBindings();
@@ -1953,7 +1953,7 @@ void ScViewFunc::ExtendScenario()
ScDocument* pDoc = GetViewData()->GetDocument();
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
ApplySelectionPattern(aPattern);
}
@@ -1974,13 +1974,13 @@ void ScViewFunc::UseScenario( const String& rName )
//----------------------------------------------------------------------------
// Insert table
-BOOL ScViewFunc::InsertTable( const String& rName, SCTAB nTab, BOOL bRecord )
+sal_Bool ScViewFunc::InsertTable( const String& rName, SCTAB nTab, sal_Bool bRecord )
{
// Order Tabl/Name is inverted for DocFunc
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- InsertTable( nTab, rName, bRecord, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ InsertTable( nTab, rName, bRecord, false );
if (bSuccess)
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
return bSuccess;
}
@@ -1988,13 +1988,13 @@ BOOL ScViewFunc::InsertTable( const String& rName, SCTAB nTab, BOOL bRecord )
//----------------------------------------------------------------------------
// Insert tables
-BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
- SCTAB nCount, BOOL bRecord )
+sal_Bool ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
+ SCTAB nCount, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SvStrings *pNameList= NULL;
@@ -2006,7 +2006,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
pDoc->BeginDrawUndo(); // InsertTab creates a SdrUndoNewPage
}
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
String aValTabName;
String *pStr;
@@ -2015,7 +2015,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
{
if(pNames!=NULL)
{
- pStr=pNames->GetObject(static_cast<USHORT>(i));
+ pStr=pNames->GetObject(static_cast<sal_uInt16>(i));
}
else
{
@@ -2026,7 +2026,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
if(pDoc->InsertTab( nTab+i,*pStr))
{
- bFlag=TRUE;
+ bFlag=sal_True;
pDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab+i ) );
}
else
@@ -2043,31 +2043,31 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
{
if (bRecord)
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoInsertTables( pDocSh, nTab, FALSE, pNameList));
+ new ScUndoInsertTables( pDocSh, nTab, false, pNameList));
// Update views
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
pDocSh->PostPaintExtras();
pDocSh->SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return false;
}
}
//----------------------------------------------------------------------------
-BOOL ScViewFunc::AppendTable( const String& rName, BOOL bRecord )
+sal_Bool ScViewFunc::AppendTable( const String& rName, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
WaitObject aWait( GetFrameWin() );
@@ -2079,55 +2079,55 @@ BOOL ScViewFunc::AppendTable( const String& rName, BOOL bRecord )
SCTAB nTab = pDoc->GetTableCount()-1;
if (bRecord)
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoInsertTab( pDocSh, nTab, TRUE, rName));
+ new ScUndoInsertTab( pDocSh, nTab, sal_True, rName));
GetViewData()->InsertTab( nTab );
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
pDocSh->PostPaintExtras();
pDocSh->SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return false;
}
}
//----------------------------------------------------------------------------
-BOOL ScViewFunc::DeleteTable( SCTAB nTab, BOOL bRecord )
+sal_Bool ScViewFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, false );
if (bSuccess)
{
SCTAB nNewTab = nTab;
if ( nNewTab >= pDoc->GetTableCount() )
--nNewTab;
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
}
return bSuccess;
}
-BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
+sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : FALSE;
+ sal_Bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false;
SCTAB nNewTab = TheTabs[0];
WaitObject aWait( GetFrameWin() );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( bVbaEnabled )
- bRecord = FALSE;
+ bRecord = false;
while ( nNewTab > 0 && !pDoc->IsVisible( nNewTab ) )
--nNewTab;
- BOOL bWasLinked = FALSE;
+ sal_Bool bWasLinked = false;
ScDocument* pUndoDoc = NULL;
ScRefUndoData* pUndoData = NULL;
if (bRecord)
@@ -2140,16 +2140,16 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
{
SCTAB nTab = TheTabs[i];
if (i==0)
- pUndoDoc->InitUndo( pDoc, nTab,nTab, TRUE,TRUE ); // incl. column/fow flags
+ pUndoDoc->InitUndo( pDoc, nTab,nTab, true,true ); // incl. column/fow flags
else
- pUndoDoc->AddUndoTab( nTab,nTab, TRUE,TRUE ); // incl. column/fow flags
+ pUndoDoc->AddUndoTab( nTab,nTab, true,true ); // incl. column/fow flags
- pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pUndoDoc );
+ pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
pDoc->GetName( nTab, aOldName );
- pUndoDoc->RenameTab( nTab, aOldName, FALSE );
+ pUndoDoc->RenameTab( nTab, aOldName, false );
if (pDoc->IsLinked(nTab))
{
- bWasLinked = TRUE;
+ bWasLinked = sal_True;
pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab),
pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab),
pDoc->GetLinkTab(nTab),
@@ -2157,13 +2157,13 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
}
if ( pDoc->IsScenario(nTab) )
{
- pUndoDoc->SetScenario( nTab, TRUE );
+ pUndoDoc->SetScenario( nTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario( nTab );
+ sal_Bool bActive = pDoc->IsActiveScenario( nTab );
pUndoDoc->SetActiveScenario( nTab, bActive );
}
pUndoDoc->SetVisible( nTab, pDoc->IsVisible( nTab ) );
@@ -2184,15 +2184,15 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
pUndoData = new ScRefUndoData( pDoc );
}
- BOOL bDelDone = FALSE;
+ sal_Bool bDelDone = false;
for(int i=TheTabs.size()-1; i>=0; --i)
{
String sCodeName;
- BOOL bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName );
+ sal_Bool bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName );
if (pDoc->DeleteTab( TheTabs[i], pUndoDoc ))
{
- bDelDone = TRUE;
+ bDelDone = sal_True;
if( bVbaEnabled )
{
if( bHasCodeName )
@@ -2216,7 +2216,7 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
if ( nNewTab >= pDoc->GetTableCount() )
nNewTab = pDoc->GetTableCount() - 1;
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
if (bWasLinked)
{
@@ -2244,11 +2244,11 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
//----------------------------------------------------------------------------
-BOOL ScViewFunc::RenameTable( const String& rName, SCTAB nTab )
+sal_Bool ScViewFunc::RenameTable( const String& rName, SCTAB nTab )
{
// order Table/Name is inverted for DocFunc
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- RenameTable( nTab, rName, TRUE, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ RenameTable( nTab, rName, true, false );
if (bSuccess)
{
// the table name might be part of a formula
@@ -2262,7 +2262,7 @@ BOOL ScViewFunc::RenameTable( const String& rName, SCTAB nTab )
bool ScViewFunc::SetTabBgColor( const Color& rColor, SCTAB nTab )
{
- bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( nTab, rColor, TRUE, FALSE );
+ bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( nTab, rColor, sal_True, false );
if (bSuccess)
{
GetViewData()->GetViewShell()->UpdateInputHandler();
@@ -2272,7 +2272,7 @@ bool ScViewFunc::SetTabBgColor( const Color& rColor, SCTAB nTab )
bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList )
{
- bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, TRUE, FALSE );
+ bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, sal_True, false );
if (bSuccess)
{
GetViewData()->GetViewShell()->UpdateInputHandler();
@@ -2284,7 +2284,7 @@ bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfo
void ScViewFunc::InsertAreaLink( const String& rFile,
const String& rFilter, const String& rOptions,
- const String& rSource, ULONG nRefresh )
+ const String& rSource, sal_uLong nRefresh )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCCOL nPosX = GetViewData()->GetCurX();
@@ -2292,7 +2292,7 @@ void ScViewFunc::InsertAreaLink( const String& rFile,
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aPos( nPosX, nPosY, nTab );
- pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, nRefresh, FALSE, FALSE );
+ pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, nRefresh, false, false );
}
@@ -2325,7 +2325,7 @@ void ScViewFunc::InsertTableLink( const String& rFile,
}
if ( nTab <= MAXTAB )
- ImportTables( pSrcSh, 1, &nTab, TRUE,
+ ImportTables( pSrcSh, 1, &nTab, sal_True,
GetViewData()->GetTabNo() );
}
}
@@ -2335,17 +2335,17 @@ void ScViewFunc::InsertTableLink( const String& rFile,
// Copy/link tables from another document
void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
- SCTAB nCount, const SCTAB* pSrcTabs, BOOL bLink,SCTAB nTab )
+ SCTAB nCount, const SCTAB* pSrcTabs, sal_Bool bLink,SCTAB nTab )
{
ScDocument* pSrcDoc = pSrcShell->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
- BOOL bError = FALSE;
- BOOL bRefs = FALSE;
- BOOL bName = FALSE;
+ sal_Bool bError = false;
+ sal_Bool bRefs = false;
+ sal_Bool bName = false;
if (pSrcDoc->GetDrawLayer())
pDocSh->MakeDrawLayer();
@@ -2362,7 +2362,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
pDoc->CreateValidTabName( aName );
if ( !pDoc->InsertTab( nTab+i, aName ) )
{
- bError = TRUE; // total error
+ bError = sal_True; // total error
break; // for
}
++nInsCount;
@@ -2371,22 +2371,22 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
{
SCTAB nSrcTab = pSrcTabs[i];
SCTAB nDestTab1=nTab+i;
- ULONG nErrVal = pDocSh->TransferTab( *pSrcShell, nSrcTab, nDestTab1,
- FALSE, FALSE ); // no insert
+ sal_uLong nErrVal = pDocSh->TransferTab( *pSrcShell, nSrcTab, nDestTab1,
+ false, false ); // no insert
switch (nErrVal)
{
case 0: // internal error or full of errors
- bError = TRUE;
+ bError = true;
break;
case 2:
- bRefs = TRUE;
+ bRefs = sal_True;
break;
case 3:
- bName = TRUE;
+ bName = sal_True;
break;
case 4:
- bRefs = bName = TRUE;
+ bRefs = bName = sal_True;
break;
}
@@ -2403,9 +2403,9 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
aFilterName = pMed->GetFilter()->GetFilterName();
String aOptions = ScDocumentLoader::GetOptions(*pMed);
- BOOL bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions );
+ sal_Bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions );
- ULONG nRefresh = 0;
+ sal_uLong nRefresh = 0;
String aTabStr;
for (i=0; i<nInsCount; i++)
{
@@ -2417,10 +2417,10 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
if (!bWasThere) // Insert link only once per source document
{
ScTableLink* pLink = new ScTableLink( pDocSh, aFileName, aFilterName, aOptions, nRefresh );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SfxBindings& rBindings = GetViewData()->GetBindings();
rBindings.Invalidate( SID_LINKS );
@@ -2436,7 +2436,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
for (i=0; i<nInsCount; i++)
GetViewData()->InsertTab(nTab);
- SetTabNo(nTab,TRUE);
+ SetTabNo(nTab,sal_True);
pDocSh->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB,
PAINT_GRID | PAINT_TOP | PAINT_LEFT | PAINT_EXTRAS );
@@ -2458,17 +2458,17 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
//----------------------------------------------------------------------------
// Move/Copy table to another document
-void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pNewTabName )
+void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocShell = GetViewData()->GetDocShell();
ScDocument* pDestDoc = NULL;
ScDocShell* pDestShell = NULL;
ScTabViewShell* pDestViewSh = NULL;
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
bool bRename = pNewTabName && pNewTabName->Len();
- BOOL bNewDoc = ( nDestDocNo == SC_DOC_NEW );
+ sal_Bool bNewDoc = ( nDestDocNo == SC_DOC_NEW );
if ( bNewDoc )
{
nDestTab = 0; // firstly insert
@@ -2525,7 +2525,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
pDestDoc->DeleteTab(0);
pDestDoc->RenameTab( 0,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("______42_____")),
- FALSE );
+ false );
}
SCTAB nTabCount = pDoc->GetTableCount();
@@ -2561,11 +2561,11 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
if (!bNewDoc && bUndo)
pDestDoc->BeginDrawUndo(); // drawing layer must do its own undo actions
- ULONG nErrVal =1;
+ sal_uLong nErrVal =1;
if(nDestTab==SC_TAB_APPEND)
nDestTab=pDestDoc->GetTableCount();
SCTAB nDestTab1=nDestTab;
- for( USHORT j=0; j<TheTabs.size(); ++j, ++nDestTab1 )
+ for( sal_uInt16 j=0; j<TheTabs.size(); ++j, ++nDestTab1 )
{ // insert sheets first and update all references
String aName;
if (bRename)
@@ -2583,9 +2583,9 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
if ( nErrVal > 0 )
{
nDestTab1 = nDestTab;
- for(USHORT i=0; i<TheTabs.size();++i)
+ for(sal_uInt16 i=0; i<TheTabs.size();++i)
{
- nErrVal = pDestShell->TransferTab( *pDocShell, TheTabs[i], static_cast<SCTAB>(nDestTab1), FALSE, FALSE );
+ nErrVal = pDestShell->TransferTab( *pDocShell, TheTabs[i], static_cast<SCTAB>(nDestTab1), false, false );
nDestTab1++;
}
}
@@ -2595,7 +2595,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
pDestDoc->GetName(nDestTab, sName);
pDestShell->GetUndoManager()->AddUndoAction(
new ScUndoImportTab( pDestShell, nDestTab,
- static_cast<SCTAB>(TheTabs.size()), FALSE));
+ static_cast<SCTAB>(TheTabs.size()), false));
}
else
@@ -2715,20 +2715,20 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
{
nDestTab1=nTabCount;
}
- pDocShell->MoveTable( nMovTab, nDestTab1, bCopy, FALSE ); // Undo is here
+ pDocShell->MoveTable( nMovTab, nDestTab1, bCopy, false ); // Undo is here
if(bCopy && pDoc->IsScenario(nMovTab))
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData(nMovTab, aComment,aColor, nFlags);
- pDoc->SetScenario(nDestTab1,TRUE);
+ pDoc->SetScenario(nDestTab1,sal_True);
pDoc->SetScenarioData(nDestTab1,aComment,aColor,nFlags);
- BOOL bActive = pDoc->IsActiveScenario(nMovTab );
+ sal_Bool bActive = pDoc->IsActiveScenario(nMovTab );
pDoc->SetActiveScenario( nDestTab1, bActive );
- BOOL bVisible=pDoc->IsVisible(nMovTab);
+ sal_Bool bVisible=pDoc->IsVisible(nMovTab);
pDoc->SetVisible(nDestTab1,bVisible );
}
@@ -2788,7 +2788,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
else if (!bCopy && nTab<nDestTab)
nNewTab--;
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
//#i29848# adjust references to data on the copied sheet
if( bCopy )
@@ -2803,8 +2803,8 @@ void ScViewFunc::ShowTable( const String& rName )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
- BOOL bFound = FALSE;
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bFound = false;
SCTAB nPos = 0;
String aTabName;
SCTAB nCount = pDoc->GetTableCount();
@@ -2814,18 +2814,18 @@ void ScViewFunc::ShowTable( const String& rName )
if ( aTabName == rName )
{
nPos = i;
- bFound = TRUE;
+ bFound = sal_True;
}
}
if (bFound)
{
- pDoc->SetVisible( nPos, TRUE );
+ pDoc->SetVisible( nPos, sal_True );
if (bUndo)
{
- pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nPos, TRUE ) );
+ pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nPos, sal_True ) );
}
- SetTabNo( nPos, TRUE );
+ SetTabNo( nPos, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
pDocSh->SetDocumentModified();
@@ -2841,7 +2841,7 @@ void ScViewFunc::HideTable( SCTAB nTab )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
SCTAB nVisible = 0;
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nCount; i++)
@@ -2852,16 +2852,16 @@ void ScViewFunc::HideTable( SCTAB nTab )
if (nVisible > 1)
{
- pDoc->SetVisible( nTab, FALSE );
+ pDoc->SetVisible( nTab, false );
if (bUndo)
{
- pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nTab, FALSE ) );
+ pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nTab, false ) );
}
// Update views
pDocSh->Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) );
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
pDocSh->SetDocumentModified();
@@ -2892,7 +2892,7 @@ void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont )
ATTR_FONT );
// if string contains WEAK characters, set all fonts
- BYTE nScript;
+ sal_uInt8 nScript;
ScDocument* pDoc = GetViewData()->GetDocument();
if ( pDoc->HasStringWeakCharacters( rStr ) )
nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
@@ -2913,7 +2913,7 @@ void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont )
void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine,
const SvxBorderLine* pDestLine,
const SvxBorderLine* pSrcLine,
- BOOL bColor )
+ sal_Bool bColor )
{
if ( pSrcLine && pDestLine )
{
@@ -2954,10 +2954,10 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine,
//----------------------------------------------------------------------------
void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
- BOOL bColorOnly )
+ sal_Bool bColorOnly )
{
// Not editable only due to a matrix? Attribute is ok anyhow.
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2972,13 +2972,13 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
const SfxItemSet& rSelItemSet = pSelAttrs->GetItemSet();
const SfxPoolItem* pBorderAttr = NULL;
- SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, TRUE, &pBorderAttr );
+ SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, sal_True, &pBorderAttr );
const SfxPoolItem* pTLBRItem = 0;
- SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, TRUE, &pTLBRItem );
+ SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pTLBRItem );
const SfxPoolItem* pBLTRItem = 0;
- SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, TRUE, &pBLTRItem );
+ SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pBLTRItem );
// any of the lines visible?
if( (eItemState != SFX_ITEM_DEFAULT) || (eTLBRState != SFX_ITEM_DEFAULT) || (eBLTRState != SFX_ITEM_DEFAULT) )
@@ -3074,7 +3074,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
void ScViewFunc::SetConditionalFormat( const ScConditionalFormat& rNew )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- ULONG nIndex = pDoc->AddCondFormat(rNew); // for it there is no Undo
+ sal_uLong nIndex = pDoc->AddCondFormat(rNew); // for it there is no Undo
SfxUInt32Item aItem( ATTR_CONDITIONAL, nIndex );
ApplyAttr( aItem ); // with Paint and Undo...
@@ -3086,7 +3086,7 @@ void ScViewFunc::SetConditionalFormat( const ScConditionalFormat& rNew )
void ScViewFunc::SetValidation( const ScValidationData& rNew )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- ULONG nIndex = pDoc->AddValidationEntry(rNew); // for it there is no Undo
+ sal_uLong nIndex = pDoc->AddValidationEntry(rNew); // for it there is no Undo
SfxUInt32Item aItem( ATTR_VALIDDATA, nIndex );
ApplyAttr( aItem ); // with Paint and Undo...
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 10e197d7e5c4..d877815238ed 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -35,10 +35,6 @@
#define _SV_NOXSOUND
-#ifdef WIN
- #define _MENUBTN_HXX
-#endif
-
#define _BASE_DLGS_HXX
#define _BIGINT_HXX
#define _CACHESTR_HXX
@@ -139,6 +135,9 @@
#include "scitems.hxx"
#include <svx/dbexch.hrc>
#include <svx/svdetc.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdoole2.hxx>
+#include <svx/svdpage.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <svl/stritem.hxx>
@@ -195,7 +194,7 @@ using namespace com::sun::star;
//----------------------------------------------------------------------------
// C U T
-void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
+void ScViewFunc::CutToClip( ScDocument* pClipDoc, sal_Bool bIncludeObjects )
{
UpdateInputLine();
@@ -212,7 +211,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- const BOOL bRecord(pDoc->IsUndoEnabled()); // Undo/Redo
+ const sal_Bool bRecord(pDoc->IsUndoEnabled()); // Undo/Redo
ScDocShellModificator aModificator( *pDocSh );
@@ -224,10 +223,10 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
MarkDataChanged();
}
- CopyToClip( pClipDoc, TRUE, FALSE, bIncludeObjects ); // Ab ins Clipboard
+ CopyToClip( pClipDoc, sal_True, false, bIncludeObjects ); // Ab ins Clipboard
ScAddress aOldEnd( aRange.aEnd ); // Zusammengefasste Zellen im Bereich?
- pDoc->ExtendMerge( aRange, TRUE );
+ pDoc->ExtendMerge( aRange, sal_True );
ScDocument* pUndoDoc = NULL;
if ( bRecord )
@@ -238,11 +237,11 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
ScRange aCopyRange = aRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(pDoc->GetTableCount()-1);
- pDoc->CopyToDocument( aCopyRange, (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aCopyRange, (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS, false, pUndoDoc );
pDoc->BeginDrawUndo();
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocSh->UpdatePaintExt( nExtFlags, aRange );
HideCursor(); // Cursor aendert sich !
@@ -274,9 +273,9 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
//----------------------------------------------------------------------------
// C O P Y
-BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bIncludeObjects, BOOL bStopEdit )
+sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, sal_Bool bCut, sal_Bool bApi, sal_Bool bIncludeObjects, sal_Bool bStopEdit )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bStopEdit )
UpdateInputLine();
@@ -291,11 +290,11 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
aRange.aEnd.Col(), aRange.aEnd.Row(),
rMark ) )
{
- BOOL bSysClip = FALSE;
+ sal_Bool bSysClip = false;
if ( !pClipDoc ) // no clip doc specified
{
pClipDoc = new ScDocument( SCDOCMODE_CLIP ); // create one (deleted by ScTransferObj)
- bSysClip = TRUE; // and copy into system
+ bSysClip = sal_True; // and copy into system
}
if ( !bCut )
@@ -307,20 +306,41 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
if ( bSysClip && bIncludeObjects )
{
- BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
+ sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
// update ScGlobal::pDrawClipDocShellRef
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
}
ScClipParam aClipParam(aRange, bCut);
+ aClipParam.setSourceDocID( pDoc->GetDocumentID() );
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects);
+
+ if ( pDoc && pClipDoc )
+ {
+ ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer();
+ if ( pDrawLayer )
+ {
+ ScClipParam& rClipParam = pClipDoc->GetClipParam();
+ ScRangeListVector& rRangesVector = rClipParam.maProtectedChartRangesVector;
+ SCTAB nTabCount = pClipDoc->GetTableCount();
+ for ( SCTAB nTab = 0; nTab < nTabCount; ++nTab )
+ {
+ SdrPage* pPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
+ if ( pPage )
+ {
+ ScChartHelper::FillProtectedChartRangesVector( rRangesVector, pDoc, pPage );
+ }
+ }
+ }
+ }
+
if (bSysClip)
{
ScDrawLayer::SetGlobalDrawPersist(NULL);
ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) );
}
- pClipDoc->ExtendMerge( aRange, TRUE );
+ pClipDoc->ExtendMerge( aRange, sal_True );
if (bSysClip)
{
@@ -343,7 +363,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
SC_MOD()->SetClipObject( pTransferObj, NULL ); // internal clipboard
}
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -480,9 +500,9 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
}
// Copy the content of the Range into clipboard. Adding this method for VBA API: Range.Copy().
-BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL bCut, BOOL bApi, BOOL bIncludeObjects, BOOL bStopEdit )
+sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, sal_Bool bCut, sal_Bool bApi, sal_Bool bIncludeObjects, sal_Bool bStopEdit )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bStopEdit )
UpdateInputLine();
@@ -490,12 +510,12 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
ScDocument* pDoc = GetViewData()->GetDocument();
if ( pDoc && !pDoc->HasSelectedBlockMatrixFragment( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() ) )
{
- BOOL bSysClip = FALSE;
+ sal_Bool bSysClip = false;
if ( !pClipDoc )
{
// Create one (deleted by ScTransferObj).
pClipDoc = new ScDocument( SCDOCMODE_CLIP );
- bSysClip = TRUE;
+ bSysClip = true;
}
if ( !bCut )
{
@@ -506,7 +526,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
if ( bSysClip && bIncludeObjects )
{
- BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange );
+ sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange );
// Update ScGlobal::pDrawClipDocShellRef.
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
}
@@ -518,7 +538,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
ScDrawLayer::SetGlobalDrawPersist(NULL);
ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) );
}
- pClipDoc->ExtendMerge( aRange, TRUE );
+ pClipDoc->ExtendMerge( aRange, true );
if ( bSysClip )
{
@@ -538,7 +558,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
SC_MOD()->SetClipObject( pTransferObj, NULL );
}
- bDone = TRUE;
+ bDone = true;
}
else
{
@@ -563,14 +583,14 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
{
ScDocument *pClipDoc = new ScDocument( SCDOCMODE_CLIP ); // create one (deleted by ScTransferObj)
- BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
+ sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
ScClipParam aClipParam(aRange, false);
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, true);
ScDrawLayer::SetGlobalDrawPersist(NULL);
- pClipDoc->ExtendMerge( aRange, TRUE );
+ pClipDoc->ExtendMerge( aRange, sal_True );
ScDocShell* pDocSh = GetViewData()->GetDocShell();
TransferableObjectDescriptor aObjDesc;
@@ -597,7 +617,7 @@ void ScViewFunc::PasteDraw()
pViewData->GetActivePart() ) );
ScDrawTransferObj* pDrawClip = ScDrawTransferObj::GetOwnClipboard( pWin );
if (pDrawClip)
- PasteDraw( aPos, pDrawClip->GetModel(), FALSE,
+ PasteDraw( aPos, pDrawClip->GetModel(), false,
pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
@@ -614,8 +634,8 @@ void ScViewFunc::PasteFromSystem()
// keep a reference in case the clipboard is changed during PasteFromClip
uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
- TRUE ); // allow warning dialog
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
+ sal_True ); // allow warning dialog
}
else if (pDrawClip)
PasteDraw();
@@ -624,9 +644,9 @@ void ScViewFunc::PasteFromSystem()
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
{
- ULONG nBiff8 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff8 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff8")));
- ULONG nBiff5 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff5 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff5")));
// als erstes SvDraw-Model, dann Grafik
@@ -654,7 +674,7 @@ void ScViewFunc::PasteFromSystem()
// it probably is spreadsheet cells that have been put
// on the clipboard by OOo, so use the SYLK. (fdo#31077)
- BOOL bDoRtf = FALSE;
+ sal_Bool bDoRtf = false;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) )
{
@@ -726,8 +746,8 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
if (pOwnClip)
{
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
- TRUE ); // allow warning dialog
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
+ sal_True ); // allow warning dialog
}
else if (pDrawClip)
{
@@ -736,17 +756,17 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
SCROW nPosY = pViewData->GetCurY();
Window* pWin = GetActiveWin();
Point aPos = pWin->PixelToLogic( pViewData->GetScrPos( nPosX, nPosY, pViewData->GetActivePart() ) );
- PasteDraw( aPos, pDrawClip->GetModel(), FALSE, pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
+ PasteDraw( aPos, pDrawClip->GetModel(), false, pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
else
{
TransferableDataHelper aDataHelper( rxTransferable );
{
- ULONG nBiff8 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff8 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff8")));
- ULONG nBiff5 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff5 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff5")));
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
// als erstes SvDraw-Model, dann Grafik
// (Grafik darf nur bei einzelner Grafik drinstehen)
@@ -757,7 +777,7 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ))
{
// If it's a Writer object, insert RTF instead of OLE
- BOOL bDoRtf = FALSE;
+ sal_Bool bDoRtf = false;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) )
{
@@ -804,16 +824,16 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
PasteDataFormat( nFormatId, aDataHelper.GetTransferable(),
GetViewData()->GetCurX(), GetViewData()->GetCurY(),
- NULL, FALSE, FALSE );
+ NULL, false, false );
}
}
}
-BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi )
+sal_Bool ScViewFunc::PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi )
{
UpdateInputLine();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
Window* pWin = GetActiveWin();
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
if ( nFormatId == 0 && pOwnClip )
@@ -821,18 +841,18 @@ BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi )
// keep a reference in case the clipboard is changed during PasteFromClip
uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
!bApi ); // allow warning dialog
}
else
{
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
if ( !aDataHelper.GetTransferable().is() )
- return FALSE;
+ return false;
bRet = PasteDataFormat( nFormatId, aDataHelper.GetTransferable(),
GetViewData()->GetCurX(), GetViewData()->GetCurY(),
- NULL, FALSE, !bApi ); // allow warning dialog
+ NULL, false, !bApi ); // allow warning dialog
if ( !bRet && !bApi )
ErrorMessage(STR_PASTE_ERROR);
@@ -844,10 +864,10 @@ BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi )
//----------------------------------------------------------------------------
// P A S T E
-BOOL ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransferable>& rxTransferable,
- SdrObject* pHitObj, BOOL bLink )
+sal_Bool ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransferable>& rxTransferable,
+ SdrObject* pHitObj, sal_Bool bLink )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if ( bLink )
{
TransferableDataHelper aDataHelper( rxTransferable );
@@ -881,14 +901,14 @@ BOOL ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransfer
return bRet;
}
-BOOL lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rTabSelection, USHORT nMask )
+sal_Bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ const ScMarkData& rTabSelection, sal_uInt16 nMask )
{
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if ( rTabSelection.GetTableSelect(nTab) && pDoc->HasAttrib( nCol1, nRow1, nTab, nCol2, nRow2, nTab, nMask ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return false;
}
//
@@ -943,26 +963,26 @@ bool lcl_checkDestRangeForOverwrite(const ScRange& rDestRange, const ScDocument*
}
-BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
- USHORT nFunction, BOOL bSkipEmpty,
- BOOL bTranspose, BOOL bAsLink,
- InsCellCmd eMoveMode, USHORT nUndoExtraFlags,
- BOOL bAllowDialogs )
+sal_Bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
+ sal_uInt16 nFunction, sal_Bool bSkipEmpty,
+ sal_Bool bTranspose, sal_Bool bAsLink,
+ InsCellCmd eMoveMode, sal_uInt16 nUndoExtraFlags,
+ sal_Bool bAllowDialogs )
{
if (!pClipDoc)
{
OSL_FAIL("PasteFromClip: pClipDoc=0 not allowed");
- return FALSE;
+ return false;
}
// fuer Undo etc. immer alle oder keine Inhalte sichern
- USHORT nContFlags = IDF_NONE;
+ sal_uInt16 nContFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nContFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
nContFlags |= IDF_ATTRIB;
// evtl. Attribute ins Undo ohne sie vom Clip ins Doc zu kopieren
- USHORT nUndoFlags = nContFlags;
+ sal_uInt16 nUndoFlags = nContFlags;
if (nUndoExtraFlags & IDF_ATTRIB)
nUndoFlags |= IDF_ATTRIB;
// do not copy note captions into undo document
@@ -974,11 +994,11 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
nFlags, pClipDoc, nFunction, bSkipEmpty, bTranspose, bAsLink, bAllowDialogs,
eMoveMode, nContFlags, nUndoFlags);
- BOOL bCutMode = pClipDoc->IsCutMode(); // if transposing, take from original clipdoc
- BOOL bIncludeFiltered = bCutMode;
+ sal_Bool bCutMode = pClipDoc->IsCutMode(); // if transposing, take from original clipdoc
+ sal_Bool bIncludeFiltered = bCutMode;
// paste drawing: also if IDF_NOTE is set (to create drawing layer for note captions)
- BOOL bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (IDF_OBJECTS|IDF_NOTE) ) );
+ sal_Bool bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (IDF_OBJECTS|IDF_NOTE) ) );
ScDocShellRef aTransShellRef; // for objects in xTransClip - must remain valid as long as xTransClip
ScDocument* pOrigClipDoc = NULL;
@@ -988,12 +1008,12 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
SCCOL nX;
SCROW nY;
// include filtered rows until TransposeClip can skip them
- bIncludeFiltered = TRUE;
- pClipDoc->GetClipArea( nX, nY, TRUE );
+ bIncludeFiltered = sal_True;
+ pClipDoc->GetClipArea( nX, nY, sal_True );
if ( nY > static_cast<sal_Int32>(MAXCOL) ) // zuviele Zeilen zum Transponieren
{
ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
pOrigClipDoc = pClipDoc; // fuer Referenzen
@@ -1019,7 +1039,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
SCTAB nEndTab;
SCCOL nClipSizeX;
SCROW nClipSizeY;
- pClipDoc->GetClipArea( nClipSizeX, nClipSizeY, TRUE ); // size in clipboard doc
+ pClipDoc->GetClipArea( nClipSizeX, nClipSizeY, sal_True ); // size in clipboard doc
// size in target doc: include filtered rows only if CutMode is set
SCCOL nDestSizeX;
@@ -1029,8 +1049,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
- const BOOL bRecord(pDoc->IsUndoEnabled());
+ ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
+ const sal_Bool bRecord(pDoc->IsUndoEnabled());
ScDocShellModificator aModificator( *pDocSh );
@@ -1082,7 +1102,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (bNoPaste)
{
ErrorMessage(STR_MSSG_PASTEFROMCLIP_0);
- return FALSE;
+ return false;
}
SCROW nUnfilteredRows = aMarkRange.aEnd.Row() - aMarkRange.aStart.Row() + 1;
@@ -1090,7 +1110,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (bMarkIsFiltered)
{
ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc);
- aFilteredMark.FillRangeListWithMarks( &aRangeList, FALSE);
+ aFilteredMark.FillRangeListWithMarks( &aRangeList, false);
nUnfilteredRows = 0;
size_t ListSize = aRangeList.size();
for ( size_t i = 0; i < ListSize; ++i )
@@ -1107,7 +1127,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
{
/* FIXME: this should be a more descriptive error message then. */
ErrorMessage(STR_MSSG_PASTEFROMCLIP_0);
- return FALSE;
+ return false;
}
#endif
}
@@ -1133,7 +1153,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
WinBits(WB_YES_NO | WB_DEF_NO), aMessage );
if ( aBox.Execute() != RET_YES )
{
- return FALSE;
+ return false;
}
}
@@ -1157,7 +1177,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (!ScViewUtil::FitToUnfilteredRows( aMarkRange, pDoc, nDestSizeY+1))
{
ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
}
aMarkRange.GetVars( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab);
@@ -1165,7 +1185,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (bMarkIsFiltered)
{
ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc);
- aFilteredMark.FillRangeListWithMarks( &aRangeList, TRUE);
+ aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_True);
}
}
}
@@ -1187,7 +1207,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
// Sollen Zellen eingefuegt werden?
// (zu grosse nEndCol/nEndRow werden weiter unten erkannt)
- BOOL bInsertCells = ( eMoveMode != INS_NONE && !bOffLimits );
+ sal_Bool bInsertCells = ( eMoveMode != INS_NONE && !bOffLimits );
if ( bInsertCells )
{
// Instead of EnterListAction, the paste undo action is merged into the
@@ -1196,10 +1216,10 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
MarkRange( aUserRange ); // wird vor CopyFromClip sowieso gesetzt
// CutMode is reset on insertion of cols/rows but needed again on cell move
- BOOL bCut = pClipDoc->IsCutMode();
- if (!InsertCells( eMoveMode, bRecord, TRUE )) // is inserting possible?
+ sal_Bool bCut = pClipDoc->IsCutMode();
+ if (!InsertCells( eMoveMode, bRecord, true )) // is inserting possible?
{
- return FALSE;
+ return false;
// #i21036# EnterListAction isn't used, and InsertCells doesn't insert
// its undo action on failure, so no undo handling is needed here
}
@@ -1208,7 +1228,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
}
else if (!bOffLimits)
{
- BOOL bAskIfNotEmpty = bAllowDialogs &&
+ sal_Bool bAskIfNotEmpty = bAllowDialogs &&
( nFlags & IDF_CONTENTS ) &&
nFunction == PASTE_NOFUNC &&
SC_MOD()->GetInputOptions().GetReplaceCellsWarn();
@@ -1224,14 +1244,14 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pClipDoc->GetClipStart( nClipStartX, nClipStartY );
SCCOL nUndoEndCol = nClipStartX + nClipSizeX;
SCROW nUndoEndRow = nClipStartY + nClipSizeY; // end of source area in clipboard document
- BOOL bClipOver = FALSE;
+ sal_Bool bClipOver = false;
// #i68690# ExtendMerge for the clip doc must be called with the clipboard's sheet numbers.
// The same end column/row can be used for all calls because the clip doc doesn't contain
// content outside the clip area.
for (SCTAB nClipTab=0; nClipTab<=MAXTAB; nClipTab++)
if ( pClipDoc->HasTable(nClipTab) )
- if ( pClipDoc->ExtendMerge( nClipStartX,nClipStartY, nUndoEndCol,nUndoEndRow, nClipTab, FALSE ) )
- bClipOver = TRUE;
+ if ( pClipDoc->ExtendMerge( nClipStartX,nClipStartY, nUndoEndCol,nUndoEndRow, nClipTab, false ) )
+ bClipOver = sal_True;
nUndoEndCol -= nClipStartX + nClipSizeX;
nUndoEndRow -= nClipStartY + nClipSizeY; // now contains only the difference added by ExtendMerge
nUndoEndCol = sal::static_int_cast<SCCOL>( nUndoEndCol + nEndCol );
@@ -1240,10 +1260,10 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (nUndoEndCol>MAXCOL || nUndoEndRow>MAXROW)
{
ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
- pDoc->ExtendMergeSel( nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, FALSE );
+ pDoc->ExtendMergeSel( nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, false );
// Test auf Zellschutz
@@ -1251,7 +1271,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
//! Test auf Ueberlappung
@@ -1282,8 +1302,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
{
ScRange aRange(nCol, nRow1, nStartTab);
pDoc->ExtendOverlapped(aRange);
- pDoc->ExtendMerge(aRange, TRUE, TRUE);
- rDocFunc.UnmergeCells(aRange, bRecord, TRUE);
+ pDoc->ExtendMerge(aRange, sal_True, sal_True);
+ rDocFunc.UnmergeCells(aRange, bRecord, sal_True);
}
}
}
@@ -1295,8 +1315,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pChangeTrack->ResetLastCut(); // kein CutMode mehr
}
- BOOL bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
- BOOL bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
+ sal_Bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
+ sal_Bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
ScDocument* pUndoDoc = NULL;
ScDocument* pRefUndoDoc = NULL;
@@ -1311,18 +1331,18 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
// all sheets - CopyToDocument skips those that don't exist in pUndoDoc
SCTAB nTabCount = pDoc->GetTableCount();
pDoc->CopyToDocument( nStartCol, nStartRow, 0, nUndoEndCol, nUndoEndRow, nTabCount-1,
- nUndoFlags, FALSE, pUndoDoc );
+ nUndoFlags, false, pUndoDoc );
if ( bCutMode )
{
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
pUndoData = new ScRefUndoData( pDoc );
}
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab,
nEndCol, nEndRow, nEndTab ); // content before the change
@@ -1349,7 +1369,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pMixDoc = new ScDocument( SCDOCMODE_UNDO );
pMixDoc->InitUndo( pDoc, nStartTab, nEndTab );
pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
- IDF_CONTENTS, FALSE, pMixDoc );
+ IDF_CONTENTS, false, pMixDoc );
}
}
@@ -1362,12 +1382,12 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if ( bRecord )
pDoc->BeginDrawUndo();
- USHORT nNoObjFlags = nFlags & ~IDF_OBJECTS;
+ sal_uInt16 nNoObjFlags = nFlags & ~IDF_OBJECTS;
if (!bAsLink)
{
// copy normally (original range)
pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags,
- pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered,
+ pRefUndoDoc, pClipDoc, sal_True, false, bIncludeFiltered,
bSkipEmpty, (bMarkIsFiltered ? &aRangeList : NULL) );
// bei Transpose Referenzen per Hand anpassen
@@ -1378,7 +1398,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
{
// copy with bAsLink=TRUE
pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags, pRefUndoDoc, pClipDoc,
- TRUE, TRUE, bIncludeFiltered, bSkipEmpty );
+ sal_True, sal_True, bIncludeFiltered, bSkipEmpty );
}
else
{
@@ -1388,9 +1408,9 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
- rDocFunc.UnmergeCells( aUserRange, FALSE, TRUE );
+ rDocFunc.UnmergeCells( aUserRange, false, sal_True );
- pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, TRUE ); // Refresh
+ pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, sal_True ); // Refresh
// und Bereich neu
if ( pMixDoc ) // Rechenfunktionen mit Original-Daten auszufuehren ?
@@ -1401,12 +1421,23 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
AdjustBlockHeight(); // update row heights before pasting objects
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ SdrPage* pPage = NULL;
+
if ( nFlags & IDF_OBJECTS )
{
+ ScDrawView* pScDrawView = GetScDrawView();
+ SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : NULL );
+ pPage = ( pModel ? pModel->GetPage( static_cast< sal_uInt16 >( nStartTab ) ) : NULL );
+ if ( pPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
+ }
+
// Paste the drawing objects after the row heights have been updated.
pDoc->CopyFromClip( aUserRange, aFilteredMark, IDF_OBJECTS, pRefUndoDoc, pClipDoc,
- TRUE, FALSE, bIncludeFiltered );
+ sal_True, false, bIncludeFiltered );
}
@@ -1448,7 +1479,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pUndoDoc->AddUndoTab( 0, nTabCount-1 );
pRefUndoDoc->DeleteArea( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, IDF_ALL );
pRefUndoDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
delete pRefUndoDoc;
}
@@ -1467,21 +1498,21 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
nUndoEndCol, nUndoEndRow, nEndTab, aFilteredMark,
pUndoDoc, pRedoDoc, nFlags | nUndoFlags,
pUndoData, NULL, NULL, NULL,
- FALSE, &aOptions ); // FALSE = Redo data not yet copied
+ false, &aOptions ); // sal_False = Redo data not yet copied
if ( bInsertCells )
{
// Merge the paste undo action into the insert action.
// Use ScUndoWrapper so the ScUndoPaste pointer can be stored in the insert action.
- pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), TRUE );
+ pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), sal_True );
}
else
pUndoMgr->AddUndoAction( pUndo );
pUndoMgr->LeaveListAction();
}
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
if (bColInfo)
{
nPaint |= PAINT_TOP;
@@ -1498,7 +1529,20 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
aModificator.SetDocumentModified();
PostPasteFromClip(aUserRange, rMark);
- return TRUE;
+
+ if ( nFlags & IDF_OBJECTS )
+ {
+ ScModelObj* pModelObj = ( pDocSh ? ScModelObj::getImplementation( pDocSh->GetModel() ) : NULL );
+ if ( pDoc && pPage && pModelObj )
+ {
+ bool bSameDoc = ( rClipParam.getSourceDocID() == pDoc->GetDocumentID() );
+ const ScRangeListVector& rProtectedChartRangesVector( rClipParam.maProtectedChartRangesVector );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDoc, pPage, pModelObj, nStartTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDoc );
+ }
+ }
+
+ return sal_True;
}
bool ScViewFunc::PasteMultiRangesFromClip(
@@ -1631,7 +1675,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
if (pDoc->IsUndoEnabled())
{
- SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
String aUndo = ScGlobal::GetRscString(
pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY);
pUndoMgr->EnterListAction(aUndo, aUndo);
@@ -1699,13 +1743,13 @@ void ScViewFunc::PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData&
//
// innerhalb des Dokuments
-BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi )
+sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
HideAllCursors(); // wegen zusammengefassten
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SCTAB nDestTab = rDestPos.Tab();
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( rSource.aStart.Tab() == nDestTab && rSource.aEnd.Tab() == nDestTab && rMark.GetSelectCount() > 1 )
@@ -1764,7 +1808,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
rDestPos.Row() + rSource.aEnd.Row() - rSource.aStart.Row(),
nDestTab );
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
// find number of non-filtered rows
@@ -1776,7 +1820,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
aDestEnd.SetRow( rDestPos.Row() + nPastedCount - 1 );
}
- MarkRange( ScRange( rDestPos, aDestEnd ), FALSE ); //! FALSE ???
+ MarkRange( ScRange( rDestPos, aDestEnd ), false ); //! sal_False ???
pDocSh->UpdateOle(GetViewData());
SelectionChanged();
@@ -1786,7 +1830,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
// Link innerhalb des Dokuments
-BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, BOOL bApi )
+sal_Bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi )
{
// Test auf Ueberlappung
@@ -1800,7 +1844,7 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B
{
if (!bApi)
ErrorMessage( STR_ERR_LINKOVERLAP );
- return FALSE;
+ return false;
}
}
@@ -1817,15 +1861,15 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B
if ( GetViewData()->GetTabNo() != rDestPos.Tab() )
SetTabNo( rDestPos.Tab() );
- MoveCursorAbs( rDestPos.Col(), rDestPos.Row(), SC_FOLLOW_NONE, FALSE, FALSE );
+ MoveCursorAbs( rDestPos.Col(), rDestPos.Row(), SC_FOLLOW_NONE, false, false );
// Paste
- PasteFromClip( IDF_ALL, pClipDoc, PASTE_NOFUNC, FALSE, FALSE, TRUE ); // als Link
+ PasteFromClip( IDF_ALL, pClipDoc, PASTE_NOFUNC, false, false, sal_True ); // als Link
delete pClipDoc;
- return TRUE;
+ return sal_True;
}
void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
@@ -1841,7 +1885,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
if ( pDoc )
{
- const BOOL bRecord( pDoc->IsUndoEnabled());
+ const sal_Bool bRecord( pDoc->IsUndoEnabled());
ScDocument* pUndoDoc = NULL;
ScDocument* pRedoDoc = NULL;
ScRefUndoData* pUndoData = NULL;
@@ -1855,19 +1899,19 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
pChangeTrack->ResetLastCut(); // kein CutMode mehr
}
ScRange aUserRange( nStartCol, nCurrentRow, nStartTab, nEndCol, nCurrentRow, nEndTab );
- BOOL bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
- BOOL bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
+ sal_Bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
+ sal_Bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
SCCOL nUndoEndCol = nStartCol+aColLength-1;
SCROW nUndoEndRow = nCurrentRow;
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndoSelected( pDoc , rMark , bColInfo , bRowInfo );
- pDoc->CopyToDocument( aUserRange , 1 , FALSE , pUndoDoc );
+ pDoc->CopyToDocument( aUserRange , 1 , false , pUndoDoc );
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab , nEndCol, nEndRow, nEndTab ); // content before the change
pDoc->BeginDrawUndo();
@@ -1885,10 +1929,10 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
nUndoEndCol, nUndoEndRow, nEndTab, rMark,
pUndoDoc, pRedoDoc, nUndoFlags,
pUndoData, NULL, NULL, NULL,
- FALSE ); // FALSE = Redo data not yet copied
- pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), TRUE );
+ false ); // FALSE = Redo data not yet copied
+ pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), true );
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
if (bColInfo)
{
nPaint |= PAINT_TOP;
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 22c1aba2290b..a9d9364a7208 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -86,7 +86,7 @@ using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
-BOOL bPasteIsDrop = FALSE;
+sal_Bool bPasteIsDrop = false;
//==================================================================
@@ -104,11 +104,11 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
- const BOOL bRecord (pDoc->IsUndoEnabled());
+ const sal_Bool bRecord (pDoc->IsUndoEnabled());
const ScPatternAttr* pPattern = pDoc->GetPattern( nStartCol, nStartRow, nTab );
ScTabEditEngine* pEngine = new ScTabEditEngine( *pPattern, pDoc->GetEnginePool() );
- pEngine->EnableUndo( FALSE );
+ pEngine->EnableUndo( false );
Window* pActWin = GetActiveWin();
if (pActWin)
@@ -120,10 +120,10 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
// same method now for clipboard or drag&drop
// mba: clipboard always must contain absolute URLs (could be from alien source)
- aEditView.InsertText( rxTransferable, String(), TRUE );
+ aEditView.InsertText( rxTransferable, String(), sal_True );
}
- ULONG nParCnt = pEngine->GetParagraphCount();
+ sal_uLong nParCnt = pEngine->GetParagraphCount();
if (nParCnt)
{
SCROW nEndRow = nStartRow + static_cast<SCROW>(nParCnt) - 1;
@@ -134,14 +134,14 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
}
SCROW nRow = nStartRow;
- for( USHORT n = 0; n < nParCnt; n++ )
+ for( sal_uInt16 n = 0; n < nParCnt; n++ )
{
EditTextObject* pObject = pEngine->CreateTextObject( n );
- EnterData( nStartCol, nRow, nTab, pObject, FALSE, TRUE );
+ EnterData( nStartCol, nRow, nTab, pObject, false, sal_True );
// kein Undo, auf einfache Strings testen
delete pObject;
if( ++nRow > MAXROW )
@@ -152,7 +152,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, false, pRedoDoc );
ScMarkData aDestMark;
aDestMark.SelectOneTable( nTab );
@@ -187,17 +187,17 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
ShowAllCursors();
}
}
-void ScViewFunc::DoRefConversion( BOOL bRecord )
+void ScViewFunc::DoRefConversion( sal_Bool bRecord )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTabCount = pDoc->GetTableCount();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScRange aMarkRange;
rMark.MarkToSimple();
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if (bMulti)
rMark.GetMultiMarkArea( aMarkRange );
else if (rMark.IsMarked())
@@ -216,7 +216,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord )
}
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
ScDocument* pUndoDoc = NULL;
if (bRecord)
@@ -271,7 +271,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord )
ScFormulaCell* pNewCell = new ScFormulaCell( pDoc, aPos,
pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE );
pDoc->PutCell( aPos, pNewCell );
- bOk = TRUE;
+ bOk = sal_True;
}
}
pCell = aIter.GetNext();
@@ -310,7 +310,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord )
ErrorMessage(STR_ERR_NOREF);
}
// Thesaurus - Undo ok
-void ScViewFunc::DoThesaurus( BOOL bRecord )
+void ScViewFunc::DoThesaurus( sal_Bool bRecord )
{
SCCOL nCol;
SCROW nRow;
@@ -328,9 +328,9 @@ void ScViewFunc::DoThesaurus( BOOL bRecord )
EditView* pEditView = NULL;
ESelection* pEditSel = NULL;
ScEditEngineDefaulter* pThesaurusEngine;
- BOOL bIsEditMode = GetViewData()->HasEditView(eWhich);
+ sal_Bool bIsEditMode = GetViewData()->HasEditView(eWhich);
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if (bIsEditMode) // Edit-Mode aktiv
{
GetViewData()->GetEditView(eWhich, pEditView, nCol, nRow);
@@ -453,7 +453,7 @@ void ScViewFunc::DoThesaurus( BOOL bRecord )
}
delete pNewTObj;
}
- KillEditView(TRUE);
+ KillEditView(sal_True);
delete pEditDefaults;
delete pThesaurusEngine;
delete pOldTObj;
@@ -461,13 +461,13 @@ void ScViewFunc::DoThesaurus( BOOL bRecord )
pDocSh->PostPaintGridAll();
}
-void ScViewFunc::DoHangulHanjaConversion( BOOL bRecord )
+void ScViewFunc::DoHangulHanjaConversion( sal_Bool bRecord )
{
ScConversionParam aConvParam( SC_CONVERSION_HANGULHANJA, LANGUAGE_KOREAN, 0, true );
DoSheetConversion( aConvParam, bRecord );
}
-void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bRecord )
+void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Bool bRecord )
{
SCCOL nCol;
SCROW nRow;
@@ -478,9 +478,9 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
ScMarkData& rMark = rViewData.GetMarkData();
ScSplitPos eWhich = rViewData.GetActivePart();
EditView* pEditView = NULL;
- BOOL bIsEditMode = rViewData.HasEditView(eWhich);
+ sal_Bool bIsEditMode = rViewData.HasEditView(eWhich);
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if (bIsEditMode) // Edit-Mode aktiv
{
rViewData.GetEditView(eWhich, pEditView, nCol, nRow);
@@ -496,7 +496,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
nTab = rViewData.GetTabNo();
rMark.MarkToMulti();
- BOOL bMarked = rMark.IsMultiMarked();
+ sal_Bool bMarked = rMark.IsMultiMarked();
if (bMarked)
{
ScEditableTester aTester( pDoc, rMark );
@@ -530,8 +530,8 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
// ab hier kein return mehr
- BOOL bOldDis = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE ); // stop online spelling
+ sal_Bool bOldDis = pDoc->IsIdleDisabled();
+ pDoc->DisableIdle( true ); // stop online spelling
// *** create and init the edit engine *** --------------------------------
@@ -559,7 +559,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) );
pEditView->SetOutputArea( aRect );
pEngine->SetControlWord( EE_CNTRL_USECHARATTRIBS );
- pEngine->EnableUndo( FALSE );
+ pEngine->EnableUndo( false );
pEngine->SetPaperSize( aRect.GetSize() );
pEngine->SetText( EMPTY_STRING );
@@ -594,7 +594,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
// *** final cleanup *** --------------------------------------------------
rViewData.SetSpellingView( NULL );
- KillEditView(TRUE);
+ KillEditView(sal_True);
delete pEngine;
pDocSh->PostPaintGridAll();
rViewData.GetViewShell()->UpdateInputHandler();
@@ -604,7 +604,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
// Pasten von FORMAT_FILE-Items
// wird nicht direkt aus Drop aufgerufen, sondern asynchron -> Dialoge sind erlaubt
-BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
+sal_Bool ScViewFunc::PasteFile( const Point& rPos, const String& rFile, sal_Bool bLink )
{
INetURLObject aURL;
aURL.SetSmartURL( rFile );
@@ -614,7 +614,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
if( ::avmedia::MediaWindow::isMediaURL( aStrURL ) )
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aStrURL );
- return BOOL( 0 != GetViewData()->GetDispatcher().Execute(
+ return sal_Bool( 0 != GetViewData()->GetDispatcher().Execute(
SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON,
&aMediaURLItem, 0L ) );
}
@@ -626,10 +626,10 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// nur nach eigenen Filtern suchen, ohne Auswahlbox (wie in ScDocumentLoader)
SfxFilterMatcher aMatcher( ScDocShell::Factory().GetFilterContainer()->GetName() );
- SfxMedium aSfxMedium( aStrURL, (STREAM_READ | STREAM_SHARE_DENYNONE), FALSE );
+ SfxMedium aSfxMedium( aStrURL, (STREAM_READ | STREAM_SHARE_DENYNONE), false );
// #i73992# GuessFilter no longer calls UseInteractionHandler.
// This is UI, so it can be called here.
- aSfxMedium.UseInteractionHandler(TRUE);
+ aSfxMedium.UseInteractionHandler(sal_True);
ErrCode nErr = aMatcher.GuessFilter( aSfxMedium, &pFlt );
if ( pFlt && !nErr )
@@ -643,7 +643,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// Asynchron oeffnen, kann naemlich auch aus D&D heraus passieren
// und das bekommt dem MAC nicht so gut ...
- return BOOL( 0 != rDispatcher.Execute( SID_OPENDOC,
+ return sal_Bool( 0 != rDispatcher.Execute( SID_OPENDOC,
SFX_CALLMODE_ASYNCHRON, &aFileNameItem, &aFilterItem, &aTargetItem, 0L) );
}
}
@@ -651,7 +651,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// 2. Kann die Datei ueber die Grafik-Filter eingefuegt werden?
// (als Link, weil Gallery das so anbietet)
- USHORT nFilterFormat;
+ sal_uInt16 nFilterFormat;
Graphic aGraphic;
GraphicFilter* pGraphicFilter = GraphicFilter::GetGraphicFilter();
@@ -680,7 +680,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
SCROW nPosY = aRange.aStart.Row();
InsertBookmark( aStrURL, aStrURL, nPosX, nPosY );
- return TRUE;
+ return sal_True;
}
else
{
@@ -703,11 +703,11 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// If an OLE object can't be created, insert a URL button
GetViewData()->GetViewShell()->InsertURLButton( aStrURL, aStrURL, EMPTY_STRING, &rPos );
- return TRUE;
+ return sal_True;
}
}
-BOOL ScViewFunc::PasteBookmark( ULONG nFormatId,
+sal_Bool ScViewFunc::PasteBookmark( sal_uLong nFormatId,
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY )
@@ -715,15 +715,15 @@ BOOL ScViewFunc::PasteBookmark( ULONG nFormatId,
INetBookmark aBookmark;
TransferableDataHelper aDataHelper( rxTransferable );
if ( !aDataHelper.GetINetBookmark( nFormatId, aBookmark ) )
- return FALSE;
+ return false;
InsertBookmark( aBookmark.GetDescription(), aBookmark.GetURL(), nPosX, nPosY );
- return TRUE;
+ return sal_True;
}
void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL,
SCCOL nPosX, SCROW nPosY, const String* pTarget,
- BOOL bTryReplace )
+ sal_Bool bTryReplace )
{
ScViewData* pViewData = GetViewData();
if ( pViewData->HasEditView( pViewData->GetActivePart() ) &&
@@ -763,7 +763,7 @@ void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL,
}
}
- USHORT nPara = aEngine.GetParagraphCount();
+ sal_uInt16 nPara = aEngine.GetParagraphCount();
if (nPara)
--nPara;
xub_StrLen nTxtLen = aEngine.GetTextLen(nPara);
@@ -787,7 +787,7 @@ void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL,
delete pData;
}
-BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
+sal_Bool ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
{
ScAddress aPos( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
ScDocument* pDoc = GetViewData()->GetDocShell()->GetDocument();
@@ -798,7 +798,7 @@ BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
const EditTextObject* pData = ((ScEditCell*)pCell)->GetData();
if (pData)
{
- BOOL bField = pData->IsFieldObject();
+ sal_Bool bField = pData->IsFieldObject();
if (bField)
{
const SvxFieldItem* pFieldItem = pData->GetField();
@@ -814,13 +814,13 @@ BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
pContent->SetURL( pURLField->GetURL() );
pContent->SetTargetFrame( pURLField->GetTargetFrame() );
}
- return TRUE;
+ return sal_True;
}
}
}
}
}
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 371688918df1..00d0d380eda6 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -86,12 +86,12 @@ using namespace com::sun::star;
//------------------------------------------------------------------
-BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
+sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
const uno::Reference<datatransfer::XTransferable>& rxTransferable,
- SCCOL nPosX, SCROW nPosY, Point* pLogicPos, BOOL bLink, BOOL bAllowDialogs )
+ SCCOL nPosX, SCROW nPosY, Point* pLogicPos, sal_Bool bLink, sal_Bool bAllowDialogs )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- pDoc->SetPastingDrawFromOtherDoc( TRUE );
+ pDoc->SetPastingDrawFromOtherDoc( sal_True );
Point aPos; // inserting position (1/100 mm)
if (pLogicPos)
@@ -99,7 +99,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
else
{
// inserting position isn't needed for text formats
- BOOL bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) ||
+ sal_Bool bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) ||
nFormatId == FORMAT_RTF );
if ( !bIsTextFormat )
{
@@ -111,13 +111,13 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
nXT += pDoc->GetColWidth(i,nTab);
if (pDoc->IsNegativePage(nTab))
nXT = -nXT;
- ULONG nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab);
+ sal_uLong nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab);
aPos = Point( (long)(nXT * HMM_PER_TWIPS), (long)(nYT * HMM_PER_TWIPS) );
}
}
TransferableDataHelper aDataHelper( rxTransferable );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
//
// handle individual formats
@@ -173,10 +173,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
SetCursor( nPosX, nPosY );
Unmark();
PasteFromClip( IDF_ALL, pClipDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bAllowDialogs );
delete pClipDoc;
- bRet = TRUE;
+ bRet = sal_True;
}
xDocShRef->DoClose();
@@ -191,7 +191,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// insert replacement image ( if there is one ) into the object helper
if ( nGrFormat )
@@ -203,7 +203,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
else
PasteObject( aPos, xObj, &aObjDesc.maSize );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -252,7 +252,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -276,7 +276,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
// let object stay in loaded state after insertion
SdrOle2Obj::Unload( xObj, embed::Aspects::MSOLE_CONTENT );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -296,7 +296,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// use EditView's PasteSpecial / Drop
PasteRTF( nPosX, nPosY, rxTransferable );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -352,10 +352,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
// Content was partially pasted, which can be undone by
// the user though.
if (aObj.IsOverflow())
- bRet = FALSE;
+ bRet = false;
}
else
- bRet = TRUE;
+ bRet = sal_True;
// Yes, no failure, don't raise a "couldn't paste"
// dialog if user cancelled.
delete pDlg;
@@ -382,7 +382,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
- ClickCursor(nPosX, nPosY, FALSE); // set cursor position
+ ClickCursor(nPosX, nPosY, false); // set cursor position
// Creation of database area "Import1" isn't here, but in the DocShell
// slot execute, so it can be added to the undo action
@@ -398,7 +398,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
}
SfxStringItem aTarget(FN_PARAM_1, sTarget);
- BOOL bAreaIsNew = !pDBData;
+ sal_Bool bAreaIsNew = !pDBData;
SfxBoolItem aAreaNew(FN_PARAM_2, bAreaIsNew);
::svx::ODataAccessDescriptor aDesc;
@@ -416,7 +416,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
rDisp.Execute(SID_SBA_IMPORT, SFX_CALLMODE_ASYNCHRON,
&aDataDesc, &aTarget, &aAreaNew, pCursorItem.get(), (void*)0 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if (nFormatId == SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE)
@@ -459,8 +459,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
pScDrawView->InsertObjectSafe(pObj, *pScDrawView->GetSdrPageView());
- GetViewData()->GetViewShell()->SetDrawShell( TRUE );
- bRet = TRUE;
+ GetViewData()->GetViewShell()->SetDrawShell( sal_True );
+ bRet = sal_True;
}
}
}
@@ -507,9 +507,9 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
SvxDrawingLayerImport( pModel, xInputStream );
// set everything to right layer:
- ULONG nObjCount = 0;
- USHORT nPages = pModel->GetPageCount();
- for (USHORT i=0; i<nPages; i++)
+ sal_uLong nObjCount = 0;
+ sal_uInt16 nPages = pModel->GetPageCount();
+ for (sal_uInt16 i=0; i<nPages; i++)
{
SdrPage* pPage = pModel->GetPage(i);
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -529,7 +529,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
PasteDraw( aPos, pModel, (nObjCount > 1) ); // grouped if more than 1 object
delete pModel;
aDragShellRef->DoClose();
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( (nFormatId == SOT_FORMATSTR_ID_BIFF_5) || (nFormatId == SOT_FORMATSTR_ID_BIFF_8) )
@@ -579,17 +579,17 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
if ( pLogicPos )
{
// position specified (Drag&Drop) - change selection
- MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE );
+ MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false );
Unmark();
}
pInsDoc->SetClipArea( aSource );
PasteFromClip( IDF_ALL, pInsDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bAllowDialogs );
delete pInsDoc;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -604,8 +604,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
FileList aFileList;
if ( aDataHelper.GetFileList( nFormatId, aFileList ) )
{
- ULONG nCount = aFileList.Count();
- for( ULONG i = 0; i < nCount ; i++ )
+ sal_uLong nCount = aFileList.Count();
+ for( sal_uLong i = 0; i < nCount ; i++ )
{
String aFile = aFileList.GetFile( i );
@@ -614,7 +614,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
aPos.X() += 400;
aPos.Y() += 400;
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( nFormatId == SOT_FORMATSTR_ID_SOLK ||
@@ -625,7 +625,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
bRet = PasteBookmark( nFormatId, rxTransferable, nPosX, nPosY );
}
- pDoc->SetPastingDrawFromOtherDoc( FALSE );
+ pDoc->SetPastingDrawFromOtherDoc( false );
return bRet;
}
@@ -640,7 +640,7 @@ ByteString lcl_GetSubString( sal_Char* pData, long nStart, long nDataSize )
return ByteString( pData + nStart );
}
-BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
+sal_Bool ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
{
TransferableDataHelper aDataHelper( rxTransferable );
@@ -651,13 +651,13 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx
if ( !aDataHelper.GetSequence( SOT_FORMATSTR_ID_LINK, aSequence ) )
{
OSL_FAIL("DDE Data not found.");
- return FALSE;
+ return false;
}
// check size (only if string is available in transferable)
- USHORT nCols = 1;
- USHORT nRows = 1;
+ sal_uInt16 nCols = 1;
+ sal_uInt16 nRows = 1;
if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) )
{
String aDataStr;
@@ -730,7 +730,7 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx
EnterMatrix( aFormula );
CursorPosChanged();
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 90e42b2ead28..0fe9c04c0294 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -67,7 +67,7 @@ using ::std::vector;
void ScViewFunc::DetectiveAddPred()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveAddPred( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -78,7 +78,7 @@ void ScViewFunc::DetectiveAddPred()
void ScViewFunc::DetectiveDelPred()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveDelPred( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -89,7 +89,7 @@ void ScViewFunc::DetectiveDelPred()
void ScViewFunc::DetectiveAddSucc()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveAddSucc( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -100,7 +100,7 @@ void ScViewFunc::DetectiveAddSucc()
void ScViewFunc::DetectiveDelSucc()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveDelSucc( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -111,7 +111,7 @@ void ScViewFunc::DetectiveDelSucc()
void ScViewFunc::DetectiveAddError()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveAddError( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -122,7 +122,7 @@ void ScViewFunc::DetectiveAddError()
void ScViewFunc::DetectiveDelAll()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveDelAll( GetViewData()->GetTabNo() );
if (!bDone)
Sound::Beep();
@@ -133,7 +133,7 @@ void ScViewFunc::DetectiveDelAll()
void ScViewFunc::DetectiveMarkInvalid()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveMarkInvalid( GetViewData()->GetTabNo() );
if (!bDone)
Sound::Beep();
@@ -144,7 +144,7 @@ void ScViewFunc::DetectiveMarkInvalid()
void ScViewFunc::DetectiveRefresh()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().DetectiveRefresh();
+ sal_Bool bDone = pDocSh->GetDocFunc().DetectiveRefresh();
if (!bDone)
Sound::Beep();
@@ -156,7 +156,7 @@ static void lcl_jumpToRange(const ScRange& rRange, ScViewData* pView, ScDocument
String aAddrText;
rRange.Format(aAddrText, SCR_ABS_3D, pDoc);
SfxStringItem aPosItem(SID_CURRENTCELL, aAddrText);
- SfxBoolItem aUnmarkItem(FN_PARAM_1, TRUE); // remove existing selection
+ SfxBoolItem aUnmarkItem(FN_PARAM_1, true); // remove existing selection
pView->GetDispatcher().Execute(
SID_CURRENTCELL, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD,
&aPosItem, &aUnmarkItem, 0L);
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 79d36b57e924..9ff8e204fd3b 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -57,12 +57,16 @@
#include "drwlayer.hxx"
#include "drwtrans.hxx"
#include "globstr.hrc"
+#include "chartlis.hxx"
+#include "docuno.hxx"
+#include "docsh.hxx"
+#include "convuno.hxx"
extern Point aDragStartDiff;
// STATIC DATA -----------------------------------------------------------
-BOOL bPasteIsMove = FALSE;
+sal_Bool bPasteIsMove = false;
using namespace com::sun::star;
@@ -87,7 +91,7 @@ void lcl_AdjustInsertPos( ScViewData* pData, Point& rPos, Size& rSize )
}
void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
- BOOL bGroup, BOOL bSameDocClipboard )
+ sal_Bool bGroup, sal_Bool bSameDocClipboard )
{
MakeDrawLayer();
Point aPos( rLogicPos );
@@ -102,7 +106,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
pRef->SetMapMode( MapMode(MAP_100TH_MM) );
}
- BOOL bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() );
+ sal_Bool bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() );
SdrView* pDragEditView = NULL;
ScModule* pScMod = SC_MOD();
@@ -128,7 +132,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if (bGroup)
pScDrawView->BegUndo( ScGlobal::GetRscString( STR_UNDO_PASTE ) );
- BOOL bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() );
+ sal_Bool bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() );
if (bSameDoc)
{
// lokal kopieren - incl. Charts
@@ -144,18 +148,25 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
pDragEditView->GetSdrPageView()->GetPage() )
{
if ( nDiffX != 0 || nDiffY != 0 )
- pDragEditView->MoveAllMarked(Size(nDiffX,nDiffY), FALSE);
+ pDragEditView->MoveAllMarked(Size(nDiffX,nDiffY), false);
}
else
{
SdrModel* pDrawModel = pDragEditView->GetModel();
- SdrPage* pDestPage = pDrawModel->GetPage( static_cast<sal_uInt16>(GetViewData()->GetTabNo()) );
+ SCTAB nTab = GetViewData()->GetTabNo();
+ SdrPage* pDestPage = pDrawModel->GetPage( static_cast< sal_uInt16 >( nTab ) );
DBG_ASSERT(pDestPage,"nanu, Page?");
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ if ( pDestPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pDestPage );
+ }
+
SdrMarkList aMark = pDragEditView->GetMarkedObjectList();
aMark.ForceSort();
- ULONG nMarkAnz=aMark.GetMarkCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ sal_uLong nMarkAnz=aMark.GetMarkCount();
+ for (sal_uLong nm=0; nm<nMarkAnz; nm++) {
const SdrMark* pM=aMark.GetMark(nm);
const SdrObject* pObj=pM->GetMarkedSdrObj();
@@ -182,11 +193,21 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if (bPasteIsMove)
pDragEditView->DeleteMarked();
+
+ ScDocument* pDocument = GetViewData()->GetDocument();
+ ScDocShell* pDocShell = GetViewData()->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ if ( pDocument && pDestPage && pModelObj && pDrawTrans )
+ {
+ const ScRangeListVector& rProtectedChartRangesVector( pDrawTrans->GetProtectedChartRangesVector() );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pDestPage, pModelObj, nTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDoc );
+ }
}
}
else
{
- bPasteIsMove = FALSE; // kein internes Verschieben passiert
+ bPasteIsMove = false; // kein internes Verschieben passiert
SdrView aView(pModel); // #i71529# never create a base class of SdrView directly!
SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0));
@@ -197,7 +218,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// Markierung nicht aendern, wenn Ole-Objekt aktiv
// (bei Drop aus Ole-Objekt wuerde sonst mitten im ExecuteDrag deaktiviert!)
- ULONG nOptions = 0;
+ sal_uLong nOptions = 0;
SfxInPlaceClient* pClient = GetViewData()->GetViewShell()->GetIPClient();
if ( pClient && pClient->IsObjectInPlaceActive() )
nOptions |= SDRINSERT_DONTMARK;
@@ -205,19 +226,15 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// Set flag for ScDocument::UpdateChartListeners() which is
// called during paste.
if ( !bSameDocClipboard )
- GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( TRUE );
+ GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( sal_True );
pScDrawView->Paste( *pModel, aPos, NULL, nOptions );
if ( !bSameDocClipboard )
- GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( FALSE );
+ GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( false );
// Paste puts all objects on the active (front) layer
// controls must be on SC_LAYER_CONTROLS
-
- SCTAB nTab = GetViewData()->GetTabNo();
- SdrPage* pPage = pScDrawView->GetModel()->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page?");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -232,6 +249,18 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// all graphics objects must have names
GetViewData()->GetDocument()->EnsureGraphicNames();
+
+ ScDocument* pDocument = GetViewData()->GetDocument();
+ ScDocShell* pDocShell = GetViewData()->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard( NULL );
+ if ( pDocument && pPage && pModelObj && ( pTransferObj || pDrawTrans ) )
+ {
+ const ScRangeListVector& rProtectedChartRangesVector(
+ pTransferObj ? pTransferObj->GetProtectedChartRangesVector() : pDrawTrans->GetProtectedChartRangesVector() );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pPage, pModelObj, nTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDocClipboard );
+ }
}
if (bGroup)
@@ -252,7 +281,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
}
-BOOL ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj,
+sal_Bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj,
const Size* pDescSize, const Graphic* pReplGraph, const ::rtl::OUString& aMediaType, sal_Int64 nAspect )
{
MakeDrawLayer();
@@ -328,28 +357,28 @@ BOOL ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X
SdrPageView* pPV = pDrView->GetSdrPageView();
pDrView->InsertObjectSafe( pSdrObj, *pPV ); // nicht markieren wenn Ole
- GetViewData()->GetViewShell()->SetDrawShell( TRUE );
- return TRUE;
+ GetViewData()->GetViewShell()->SetDrawShell( sal_True );
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-BOOL ScViewFunc::PasteBitmap( const Point& rPos, const Bitmap& rBmp )
+sal_Bool ScViewFunc::PasteBitmap( const Point& rPos, const Bitmap& rBmp )
{
String aEmpty;
Graphic aGraphic(rBmp);
return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty );
}
-BOOL ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
+sal_Bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
{
String aEmpty;
Graphic aGraphic(rMtf);
return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty );
}
-BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
+sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
const String& rFile, const String& rFilter )
{
MakeDrawLayer();
@@ -375,7 +404,7 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
if ( GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ) )
aPos.X() -= aSize.Width();
- GetViewData()->GetViewShell()->SetDrawShell( TRUE );
+ GetViewData()->GetViewShell()->SetDrawShell( sal_True );
Rectangle aRect(aPos, aSize);
SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect);
@@ -397,12 +426,12 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
if (rFile.Len())
pGrafObj->SetGraphicLink( rFile, rFilter );
- return TRUE;
+ return sal_True;
}
-BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGraphic )
+sal_Bool ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGraphic )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
SdrGrafObj* pNewGrafObj = NULL;
ScDrawView* pScDrawView = GetScDrawView();
@@ -424,7 +453,7 @@ BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGrap
pScDrawView->ReplaceObjectAtView(pPickObj, *pPV, pNewGrafObj);
pScDrawView->EndUndo();
- bRet = TRUE;
+ bRet = sal_True;
}
else if (pPickObj->IsClosedObj() && !pPickObj->ISA(SdrOle2Obj))
{
@@ -443,7 +472,7 @@ BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGrap
pPickObj->SetMergedItemSetAndBroadcast(aSet);
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index ab7a8b8d9425..2918410d0923 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -109,7 +109,7 @@ static void lcl_PostRepaintCondFormat( const ScConditionalFormat *pCondFmt, ScDo
ScViewFunc::ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) :
ScTabView( pParent, rDocSh, pViewShell ),
- bFormatValid( FALSE )
+ bFormatValid( false )
{
}
@@ -127,37 +127,37 @@ void ScViewFunc::StartFormatArea()
// start only with single cell (marked or cursor position)
ScRange aMarkRange;
- BOOL bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
+ sal_Bool bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
if ( bOk && aMarkRange.aStart != aMarkRange.aEnd )
- bOk = FALSE;
+ bOk = false;
if (bOk)
{
- bFormatValid = TRUE;
+ bFormatValid = sal_True;
aFormatSource = aMarkRange.aStart;
aFormatArea = ScRange( aFormatSource );
}
else
- bFormatValid = FALSE; // keinen alten Bereich behalten
+ bFormatValid = false; // keinen alten Bereich behalten
}
-BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged )
+sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged )
{
// ueberhaupt aktiviert?
if ( !SC_MOD()->GetInputOptions().GetExtendFormat() )
- return FALSE;
+ return false;
// Test: Eingabe mit Zahlformat (bAttrChanged) immer als neue Attributierung behandeln
// (alte Area verwerfen). Wenn das nicht gewollt ist, den if-Teil weglassen:
if ( bAttrChanged )
{
StartFormatArea();
- return FALSE;
+ return false;
}
//! Abfrage, ob Zelle leer war ???
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScRange aNewRange = aFormatArea;
if ( bFormatValid && nTab == aFormatSource.Tab() )
{
@@ -166,18 +166,18 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
// innerhalb ?
if ( nCol >= aFormatArea.aStart.Col() && nCol <= aFormatArea.aEnd.Col() )
{
- bFound = TRUE; // Bereich nicht aendern
+ bFound = sal_True; // Bereich nicht aendern
}
// links ?
if ( nCol+1 == aFormatArea.aStart.Col() )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aStart.SetCol( nCol );
}
// rechts ?
if ( nCol == aFormatArea.aEnd.Col()+1 )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aEnd.SetCol( nCol );
}
}
@@ -186,13 +186,13 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
// oben ?
if ( nRow+1 == aFormatArea.aStart.Row() )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aStart.SetRow( nRow );
}
// unten ?
if ( nRow == aFormatArea.aEnd.Row()+1 )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aEnd.SetRow( nRow );
}
}
@@ -202,7 +202,7 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
aFormatArea = aNewRange; // erweitern
else
{
- bFormatValid = FALSE; // ausserhalb -> abbrechen
+ bFormatValid = false; // ausserhalb -> abbrechen
if ( bAttrChanged ) // Wert mit Zahlformat eingegeben?
StartFormatArea(); // dann ggf. neu starten
}
@@ -211,12 +211,12 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
}
void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
- BOOL bAttrChanged, BOOL bAddUndo )
+ sal_Bool bAttrChanged, sal_Bool bAddUndo )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
if (bAddUndo && !pDoc->IsUndoEnabled())
- bAddUndo = FALSE;
+ bAddUndo = false;
const ScPatternAttr* pSource = pDoc->GetPattern(
aFormatSource.Col(), aFormatSource.Row(), nTab );
@@ -233,7 +233,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
if ( pSrcStyle && pSrcStyle != pDocOld->GetStyleSheet() )
pDoc->ApplyStyle( nCol, nRow, nTab, *pSrcStyle );
pDoc->ApplyPattern( nCol, nRow, nTab, *pSource );
- AdjustRowHeight( nRow, nRow, TRUE ); //! nicht doppelt ?
+ AdjustRowHeight( nRow, nRow, sal_True ); //! nicht doppelt ?
if ( bAddUndo )
{
@@ -242,7 +242,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoCursorAttr( pDocSh, nCol, nRow, nTab,
pOldPattern, pNewPattern, pSource,
- TRUE ) );
+ sal_True ) );
delete pOldPattern; // wird im Undo kopiert (Pool)
}
@@ -256,7 +256,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
// Hilfsroutinen
-USHORT ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula )
+sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -275,14 +275,14 @@ USHORT ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula )
aZoomX = aZoomY = Fraction( 1, 1 );
}
- USHORT nTwips = pDoc->GetOptimalColWidth( nCol, nTab, aProv.GetDevice(),
+ sal_uInt16 nTwips = pDoc->GetOptimalColWidth( nCol, nTab, aProv.GetDevice(),
nPPTX, nPPTY, aZoomX, aZoomY, bFormula, &rMark );
return nTwips;
}
-BOOL ScViewFunc::SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ )
+sal_Bool ScViewFunc::SelectionEditable( sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ )
{
- BOOL bRet;
+ sal_Bool bRet;
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
if (rMark.IsMarked() || rMark.IsMultiMarked())
@@ -302,50 +302,50 @@ BOOL ScViewFunc::SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ )
#define LRU_MAX 10
#endif
-BOOL lcl_FunctionKnown( USHORT nOpCode )
+sal_Bool lcl_FunctionKnown( sal_uInt16 nOpCode )
{
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
- ULONG nCount = pFuncList->GetCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = pFuncList->GetCount();
+ for (sal_uLong i=0; i<nCount; i++)
if ( pFuncList->GetFunction(i)->nFIndex == nOpCode )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL lcl_AddFunction( ScAppOptions& rAppOpt, USHORT nOpCode )
+sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode )
{
- USHORT nOldCount = rAppOpt.GetLRUFuncListCount();
- USHORT* pOldList = rAppOpt.GetLRUFuncList();
- USHORT nPos;
+ sal_uInt16 nOldCount = rAppOpt.GetLRUFuncListCount();
+ sal_uInt16* pOldList = rAppOpt.GetLRUFuncList();
+ sal_uInt16 nPos;
for (nPos=0; nPos<nOldCount; nPos++)
if (pOldList[nPos] == nOpCode) // is the function already in the list?
{
if ( nPos == 0 )
- return FALSE; // already at the top -> no change
+ return false; // already at the top -> no change
// count doesn't change, so the original array is modified
- for (USHORT nCopy=nPos; nCopy>0; nCopy--)
+ for (sal_uInt16 nCopy=nPos; nCopy>0; nCopy--)
pOldList[nCopy] = pOldList[nCopy-1];
pOldList[0] = nOpCode;
- return TRUE; // list has changed
+ return sal_True; // list has changed
}
if ( !lcl_FunctionKnown( nOpCode ) )
- return FALSE; // not in function list -> no change
+ return false; // not in function list -> no change
- USHORT nNewCount = Min( (USHORT)(nOldCount + 1), (USHORT)LRU_MAX );
- USHORT nNewList[LRU_MAX];
+ sal_uInt16 nNewCount = Min( (sal_uInt16)(nOldCount + 1), (sal_uInt16)LRU_MAX );
+ sal_uInt16 nNewList[LRU_MAX];
nNewList[0] = nOpCode;
for (nPos=1; nPos<nNewCount; nPos++)
nNewList[nPos] = pOldList[nPos-1];
rAppOpt.SetLRUFuncList( nNewList, nNewCount );
- return TRUE; // list has changed
+ return sal_True; // list has changed
}
// eigentliche Funktionen
@@ -353,7 +353,7 @@ BOOL lcl_AddFunction( ScAppOptions& rAppOpt, USHORT nOpCode )
// Eingabe - Undo OK
void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
- BOOL bRecord, const EditTextObject* pData )
+ sal_Bool bRecord, const EditTextObject* pData )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -361,7 +361,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
SCTAB nSelCount = rMark.GetSelectCount();
SCTAB i;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocShellModificator aModificator( *pDocSh );
@@ -369,20 +369,20 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScEditableTester aTester( pDoc, nCol,nRow, nCol,nRow, rMark );
if (aTester.IsEditable())
{
- BOOL bEditDeleted = FALSE;
- BYTE nOldScript = 0;
+ sal_Bool bEditDeleted = false;
+ sal_uInt8 nOldScript = 0;
ScBaseCell** ppOldCells = NULL;
- BOOL* pHasFormat = NULL;
- ULONG* pOldFormats = NULL;
+ sal_Bool* pHasFormat = NULL;
+ sal_uLong* pOldFormats = NULL;
SCTAB* pTabs = NULL;
SCTAB nUndoPos = 0;
EditTextObject* pUndoData = NULL;
if ( bRecord )
{
ppOldCells = new ScBaseCell*[nSelCount];
- pHasFormat = new BOOL[nSelCount];
- pOldFormats = new ULONG[nSelCount];
+ pHasFormat = new sal_Bool[nSelCount];
+ pOldFormats = new sal_uLong[nSelCount];
pTabs = new SCTAB[nSelCount];
nUndoPos = 0;
@@ -396,13 +396,13 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
{
ppOldCells[nUndoPos] = pDocCell->CloneWithoutNote( *pDoc );
if ( pDocCell->GetCellType() == CELLTYPE_EDIT )
- bEditDeleted = TRUE;
+ bEditDeleted = sal_True;
- BYTE nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell );
+ sal_uInt8 nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell );
if ( nOldScript == 0 )
nOldScript = nDocScript;
else if ( nDocScript != nOldScript )
- bEditDeleted = TRUE;
+ bEditDeleted = sal_True;
}
else
{
@@ -412,13 +412,13 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
const SfxPoolItem* pItem;
const ScPatternAttr* pPattern = pDoc->GetPattern(nCol, nRow, i);
if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState(
- ATTR_VALUE_FORMAT,FALSE,&pItem) )
+ ATTR_VALUE_FORMAT,false,&pItem) )
{
- pHasFormat[nUndoPos] = TRUE;
+ pHasFormat[nUndoPos] = sal_True;
pOldFormats[nUndoPos] = ((const SfxUInt32Item*)pItem)->GetValue();
}
else
- pHasFormat[nUndoPos] = FALSE;
+ pHasFormat[nUndoPos] = false;
++nUndoPos;
}
@@ -466,7 +466,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
}
}
- BOOL bNumFmtChanged = FALSE;
+ sal_Bool bNumFmtChanged = false;
if ( bFormula )
{ // Formel, compile mit AutoCorrection
for (i=0; i<nTabCount; i++)
@@ -476,27 +476,27 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScCompiler aComp( pDoc, aPos);
aComp.SetGrammar(pDoc->GetGrammar());
//2do: AutoCorrection via CalcOptions abschaltbar machen
- aComp.SetAutoCorrection( TRUE );
+ aComp.SetAutoCorrection( sal_True );
if ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' )
{
aComp.SetExtendedErrorDetection( true );
}
String aFormula( rString );
ScTokenArray* pArr;
- BOOL bAgain;
+ sal_Bool bAgain;
do
{
- bAgain = FALSE;
- BOOL bAddEqual = FALSE;
+ bAgain = false;
+ sal_Bool bAddEqual = false;
ScTokenArray* pArrFirst = pArr = aComp.CompileString( aFormula );
- BOOL bCorrected = aComp.IsCorrected();
+ sal_Bool bCorrected = aComp.IsCorrected();
if ( bCorrected )
{ // probieren, mit erster Parser-Korrektur neu zu parsen
pArr = aComp.CompileString( aComp.GetCorrectedFormula() );
}
if ( !pArr->GetCodeError() )
{
- bAddEqual = TRUE;
+ bAddEqual = sal_True;
aComp.CompileTokenArray();
bCorrected |= aComp.IsCorrected();
}
@@ -526,7 +526,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
aFormula = aCorrectedFormula;
if ( pArr != pArrFirst )
delete pArrFirst;
- bAgain = TRUE;
+ bAgain = sal_True;
}
else
{
@@ -545,7 +545,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
// Zellen RPN geloescht und der Fehler explizit gesetzt werden, da
// via FormulaCell copy-ctor und Interpreter das, wenn moeglich,
// wieder glattgebuegelt wird, zu intelligent.. z.B.: =1))
- USHORT nError = pArr->GetCodeError();
+ sal_uInt16 nError = pArr->GetCodeError();
if ( !nError )
{
// update list of recent functions with all functions that
@@ -553,12 +553,12 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScModule* pScMod = SC_MOD();
ScAppOptions aAppOpt = pScMod->GetAppOptions();
- BOOL bOptChanged = FALSE;
+ sal_Bool bOptChanged = false;
formula::FormulaToken** ppToken = pArr->GetArray();
- USHORT nTokens = pArr->GetLen();
- USHORT nLevel = 0;
- for (USHORT nTP=0; nTP<nTokens; nTP++)
+ sal_uInt16 nTokens = pArr->GetLen();
+ sal_uInt16 nLevel = 0;
+ for (sal_uInt16 nTP=0; nTP<nTokens; nTP++)
{
formula::FormulaToken* pTok = ppToken[nTP];
OpCode eOp = pTok->GetOpCode();
@@ -567,8 +567,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
else if ( eOp == ocClose && nLevel )
--nLevel;
if ( nLevel == 0 && pTok->IsFunction() &&
- lcl_AddFunction( aAppOpt, sal::static_int_cast<USHORT>( eOp ) ) )
- bOptChanged = TRUE;
+ lcl_AddFunction( aAppOpt, sal::static_int_cast<sal_uInt16>( eOp ) ) )
+ bOptChanged = sal_True;
}
if ( bOptChanged )
@@ -580,14 +580,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScFormulaCell aCell( pDoc, aPos, pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE );
delete pArr;
- BOOL bAutoCalc = pDoc->GetAutoCalc();
+ sal_Bool bAutoCalc = pDoc->GetAutoCalc();
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
for ( ; i<nTabCount; i++)
{
if (rMark.GetTableSelect(i))
{
aPos.SetTab( i );
- ULONG nIndex = (ULONG) ((SfxUInt32Item*) pDoc->GetAttr(
+ sal_uLong nIndex = (sal_uLong) ((SfxUInt32Item*) pDoc->GetAttr(
nCol, nRow, i, ATTR_VALUE_FORMAT ))->GetValue();
if ( pFormatter->GetType( nIndex ) == NUMBERFORMAT_TEXT ||
( ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' ) && nError && rString.Equals( aFormula ) ) )
@@ -612,7 +612,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
pCell->GetCode()->DelRPN();
pCell->SetErrCode( nError );
if(pCell->GetCode()->IsHyperLink())
- pCell->GetCode()->SetHyperLink(FALSE);
+ pCell->GetCode()->SetHyperLink(false);
}
pDoc->PutCell( aPos, pCell );
if ( !bAutoCalc )
@@ -631,21 +631,21 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
for (i=0; i<nTabCount; i++)
if (rMark.GetTableSelect(i))
if (pDoc->SetString( nCol, nRow, i, rString ))
- bNumFmtChanged = TRUE;
+ bNumFmtChanged = sal_True;
}
// row height must be changed if new text has a different script type
for (i=0; i<nTabCount && !bEditDeleted; i++)
if (rMark.GetTableSelect(i))
if ( pDoc->GetScriptType( nCol, nRow, i ) != nOldScript )
- bEditDeleted = TRUE;
+ bEditDeleted = sal_True;
HideAllCursors();
if (bEditDeleted || pDoc->HasAttrib( nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_NEEDHEIGHT ))
AdjustRowHeight(nRow,nRow);
- BOOL bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged);
+ sal_Bool bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged);
if (bAutoFormat)
DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged, bRecord);
@@ -696,7 +696,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if ( pDoc && pDocSh )
{
@@ -707,7 +707,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
{
ScAddress aPos( nCol, nRow, nTab );
ScBaseCell* pOldCell = pDoc->GetCell( aPos );
- BOOL bNeedHeight = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_EDIT )
+ sal_Bool bNeedHeight = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_EDIT )
|| pDoc->HasAttrib(
nCol,nRow,nTab, nCol,nRow,nTab, HASATTR_NEEDHEIGHT );
@@ -733,13 +733,13 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
}
void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject* pData,
- BOOL bRecord, BOOL bTestSimple )
+ sal_Bool bRecord, sal_Bool bTestSimple )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
ScDocument* pDoc = pDocSh->GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
@@ -749,8 +749,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb
//
// Test auf Attribute
//
- BOOL bSimple = FALSE;
- BOOL bCommon = FALSE;
+ sal_Bool bSimple = false;
+ sal_Bool bCommon = false;
ScPatternAttr* pCellAttrs = NULL;
EditTextObject* pNewData = NULL;
String aString;
@@ -770,9 +770,9 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb
if ( !bSimple && aEngine.GetParagraphCount() == 1 )
{
- String aParStr = aEngine.GetText( (USHORT) 0 );
+ String aParStr = aEngine.GetText( (sal_uInt16) 0 );
if ( aParStr.GetChar(0) == '=' )
- bSimple = TRUE;
+ bSimple = sal_True;
}
if (bCommon) // Attribute fuer Tabelle
@@ -921,7 +921,7 @@ void ScViewFunc::EnterMatrix( const String& rString )
ScRange aResult( nCol, nRow, nTab,
sal::static_int_cast<SCCOL>(nCol+nSizeX-1),
sal::static_int_cast<SCROW>(nRow+nSizeY-1), nTab );
- MarkRange( aResult, FALSE );
+ MarkRange( aResult, false );
}
}
@@ -929,7 +929,7 @@ void ScViewFunc::EnterMatrix( const String& rString )
if (pData->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = pData->GetDocShell();
- BOOL bSuccess = pDocSh->GetDocFunc().EnterMatrix( aRange, &rMark, NULL, rString, FALSE, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().EnterMatrix( aRange, &rMark, NULL, rString, false, false, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT );
if (bSuccess)
pDocSh->UpdateOle(GetViewData());
}
@@ -937,9 +937,9 @@ void ScViewFunc::EnterMatrix( const String& rString )
ErrorMessage(STR_NOMULTISELECT);
}
-BYTE ScViewFunc::GetSelectionScriptType()
+sal_uInt8 ScViewFunc::GetSelectionScriptType()
{
- BYTE nScript = 0;
+ sal_uInt8 nScript = 0;
ScDocument* pDoc = GetViewData()->GetDocument();
const ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -953,7 +953,7 @@ BYTE ScViewFunc::GetSelectionScriptType()
else
{
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
size_t nCount = aRanges.size();
for ( size_t i=0; i < nCount; i++ )
{
@@ -1026,9 +1026,9 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter,
rLineOuter = (const SvxBoxItem&) (pAttrs->GetItem( ATTR_BORDER ));
rLineInner = (const SvxBoxInfoItem&)(pAttrs->GetItem( ATTR_BORDER_INNER ));
- rLineInner.SetTable(FALSE);
- rLineInner.SetDist(TRUE);
- rLineInner.SetMinDist(FALSE);
+ rLineInner.SetTable(false);
+ rLineInner.SetDist(sal_True);
+ rLineInner.SetMinDist(false);
}
}
@@ -1040,10 +1040,10 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter,
void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
const SfxItemSet* pOldSet,
- BOOL bRecord )
+ sal_Bool bRecord )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1103,17 +1103,17 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
*
*/
- BOOL bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT)
+ sal_Bool bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT)
|| (pDialogSet->GetItemState( ATTR_BORDER_INNER ) != SFX_ITEM_DEFAULT);
if ( pNewOuter==pOldOuter && pNewInner==pOldInner )
- bFrame = FALSE;
+ bFrame = false;
// das sollte doch der Pool abfangen: ?!??!??
if ( bFrame && pNewOuter && pNewInner )
if ( *pNewOuter == *pOldOuter && *pNewInner == *pOldInner )
- bFrame = FALSE;
+ bFrame = false;
if ( pNewInner )
{
@@ -1126,7 +1126,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
|| pNewInner->IsValid(VALID_VERT) );
}
else
- bFrame = FALSE;
+ bFrame = false;
if (!bFrame)
ApplySelectionPattern( aNewAttrs, bRecord ); // nur normale
@@ -1135,8 +1135,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
// wenn neue Items Default-Items sind, so muessen die
// alten Items geputtet werden:
- BOOL bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() );
- BOOL bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() );
+ sal_Bool bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() );
+ sal_Bool bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() );
ApplyPatternLines( aNewAttrs,
bDefNewOuter ? pOldOuter : pNewOuter,
@@ -1156,7 +1156,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1181,17 +1181,17 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem )
// Pattern und Rahmen
void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter,
- const SvxBoxInfoItem* pNewInner, BOOL bRecord )
+ const SvxBoxInfoItem* pNewInner, sal_Bool bRecord )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData aFuncMark( GetViewData()->GetMarkData() ); // local copy for UnmarkFiltered
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScRange aMarkRange;
aFuncMark.MarkToSimple();
- BOOL bMulti = aFuncMark.IsMultiMarked();
+ sal_Bool bMulti = aFuncMark.IsMultiMarked();
if (bMulti)
aFuncMark.GetMultiMarkArea( aMarkRange );
else if (aFuncMark.IsMarked())
@@ -1233,7 +1233,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
pUndoDoc, bMulti, &rAttr, pNewOuter, pNewInner ) );
}
- USHORT nExt = SC_PF_TESTMERGE;
+ sal_uInt16 nExt = SC_PF_TESTMERGE;
pDocSh->UpdatePaintExt( nExt, aMarkRange ); // content before the change
pDoc->ApplySelectionFrame( aFuncMark, pNewOuter, pNewInner );
@@ -1254,7 +1254,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
// nur Pattern
void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
- BOOL bRecord, BOOL bCursorOnly )
+ sal_Bool bRecord, sal_Bool bCursorOnly )
{
ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell();
@@ -1263,18 +1263,18 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
// State from old ItemSet doesn't matter for paint flags, as any change will be
// from SFX_ITEM_SET in the new ItemSet (default is ignored in ApplyPattern).
// New alignment is checked (check in PostPaint isn't enough) in case a right
// alignment is changed to left.
const SfxItemSet& rNewSet = rAttr.GetItemSet();
- BOOL bSetLines = rNewSet.GetItemState( ATTR_BORDER, TRUE ) == SFX_ITEM_SET ||
- rNewSet.GetItemState( ATTR_SHADOW, TRUE ) == SFX_ITEM_SET;
- BOOL bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, TRUE ) == SFX_ITEM_SET;
+ sal_Bool bSetLines = rNewSet.GetItemState( ATTR_BORDER, sal_True ) == SFX_ITEM_SET ||
+ rNewSet.GetItemState( ATTR_SHADOW, sal_True ) == SFX_ITEM_SET;
+ sal_Bool bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) == SFX_ITEM_SET;
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if ( bSetLines )
nExtFlags |= SC_PF_LINES;
if ( bSetAlign )
@@ -1282,9 +1282,9 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
ScDocShellModificator aModificator( *pDocSh );
- BOOL bMulti = aFuncMark.IsMultiMarked();
+ sal_Bool bMulti = aFuncMark.IsMultiMarked();
aFuncMark.MarkToMulti();
- BOOL bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1);
+ sal_Bool bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1);
if (bOnlyTab)
{
SCCOL nCol = pViewData->GetCurX();
@@ -1400,10 +1400,10 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
sal_Int32 nCount = 0;
const SfxItemPropertyMap* pMap = ScCellObj::GetCellPropertyMap();
PropertyEntryVector_t aPropVector = pMap->getPropertyEntries();
- for ( USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
+ for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
{
const SfxPoolItem* pItem = 0;
- if ( rNewSet.GetItemState( nWhich, TRUE, &pItem ) == SFX_ITEM_SET && pItem )
+ if ( rNewSet.GetItemState( nWhich, sal_True, &pItem ) == SFX_ITEM_SET && pItem )
{
PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
while ( aIt != aPropVector.end())
@@ -1431,7 +1431,7 @@ void ScViewFunc::ApplyUserItemSet( const SfxItemSet& rItemSet )
{
// ItemSet from UI, may have different pool
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1440,7 +1440,7 @@ void ScViewFunc::ApplyUserItemSet( const SfxItemSet& rItemSet )
ScPatternAttr aNewAttrs( GetViewData()->GetDocument()->GetPool() );
SfxItemSet& rNewSet = aNewAttrs.GetItemSet();
- rNewSet.Put( rItemSet, FALSE );
+ rNewSet.Put( rItemSet, false );
ApplySelectionPattern( aNewAttrs );
AdjustBlockHeight();
@@ -1466,10 +1466,10 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked()
return pSheet;
}
-void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord )
+void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRecord )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1486,7 +1486,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
SCTAB nTabCount = pDoc->GetTableCount();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
@@ -1508,7 +1508,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pUndoDoc, &aFuncMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, &aFuncMark );
aFuncMark.MarkToMulti();
String aName = pStyleSheet->GetName();
@@ -1538,7 +1538,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
pUndoDoc->AddUndoTab( i, i );
ScRange aCopyRange( nCol, nRow, 0, nCol, nRow, nTabCount-1 );
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pUndoDoc );
ScRange aMarkRange ( nCol, nRow, nTab );
ScMarkData aUndoMark = aFuncMark;
@@ -1564,7 +1564,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
}
-void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
+void ScViewFunc::RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
{
if ( !pStyleSheet) return;
// -------------------------------------------------------------------
@@ -1577,7 +1577,7 @@ void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
VirtualDevice aVirtDev;
aVirtDev.SetMapMode(MAP_PIXEL);
- pDoc->StyleSheetChanged( pStyleSheet, TRUE, &aVirtDev,
+ pDoc->StyleSheetChanged( pStyleSheet, sal_True, &aVirtDev,
pViewData->GetPPTX(),
pViewData->GetPPTY(),
pViewData->GetZoomX(),
@@ -1591,7 +1591,7 @@ void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
pHdl->ForgetLastPattern();
}
-void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet )
+void ScViewFunc::UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
{
if ( !pStyleSheet) return;
// -------------------------------------------------------------------
@@ -1604,7 +1604,7 @@ void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet )
VirtualDevice aVirtDev;
aVirtDev.SetMapMode(MAP_PIXEL);
- pDoc->StyleSheetChanged( pStyleSheet, FALSE, &aVirtDev,
+ pDoc->StyleSheetChanged( pStyleSheet, false, &aVirtDev,
pViewData->GetPPTX(),
pViewData->GetPPTY(),
pViewData->GetZoomX(),
@@ -1620,14 +1620,14 @@ void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet )
// Zellen einfuegen - Undo OK
-BOOL ScViewFunc::InsertCells( InsCellCmd eCmd, BOOL bRecord, BOOL bPartOfPaste )
+sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bPartOfPaste )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, FALSE, bPartOfPaste );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, false, bPartOfPaste );
if (bSuccess)
{
pDocSh->UpdateOle(GetViewData());
@@ -1653,13 +1653,13 @@ BOOL ScViewFunc::InsertCells( InsCellCmd eCmd, BOOL bRecord, BOOL bPartOfPaste )
else
{
ErrorMessage(STR_NOMULTISELECT);
- return FALSE;
+ return false;
}
}
// Zellen loeschen - Undo OK
-void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
+void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
{
ScRange aRange;
if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
@@ -1682,13 +1682,13 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
}
while ( nCount > 0 )
{
- pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, bRecord, FALSE );
+ pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, bRecord, false );
--nCount;
}
}
else
{
- pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, bRecord, FALSE );
+ pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, bRecord, false );
}
pDocSh->UpdateOle(GetViewData());
@@ -1721,9 +1721,9 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
else
{
if (eCmd == DEL_DELCOLS)
- DeleteMulti( FALSE, bRecord );
+ DeleteMulti( false, bRecord );
else if (eCmd == DEL_DELROWS)
- DeleteMulti( TRUE, bRecord );
+ DeleteMulti( sal_True, bRecord );
else
ErrorMessage(STR_NOMULTISELECT);
}
@@ -1731,7 +1731,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
Unmark();
}
-void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
+void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocShellModificator aModificator( *pDocSh );
@@ -1741,7 +1741,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCCOLROW* pRanges = new SCCOLROW[MAXCOLROWCOUNT];
SCCOLROW nRangeCnt = bRows ? aFuncMark.GetMarkRowRanges( pRanges ) :
aFuncMark.GetMarkColumnRanges( pRanges );
@@ -1754,8 +1754,8 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
// Test ob erlaubt
SCCOLROW* pOneRange = pRanges;
- USHORT nErrorId = 0;
- BOOL bNeedRefresh = FALSE;
+ sal_uInt16 nErrorId = 0;
+ sal_Bool bNeedRefresh = false;
SCCOLROW nRangeNo;
for (nRangeNo=0; nRangeNo<nRangeCnt && !nErrorId; nRangeNo++)
{
@@ -1807,7 +1807,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
{
// detect if the start of a merged cell is deleted, so the merge flags can be refreshed
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
}
}
@@ -1835,17 +1835,17 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
SCCOLROW nStart = *(pOneRange++);
SCCOLROW nEnd = *(pOneRange++);
if (bRows)
- pDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,FALSE,pUndoDoc );
+ pDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,false,pUndoDoc );
else
pDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab,
static_cast<SCCOL>(nEnd),MAXROW,nTab,
- IDF_ALL,FALSE,pUndoDoc );
+ IDF_ALL,false,pUndoDoc );
}
// alle Formeln wegen Referenzen
SCTAB nTabCount = pDoc->GetTableCount();
- pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
- pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA,FALSE,pUndoDoc );
+ pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
+ pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA,false,pUndoDoc );
pUndoData = new ScRefUndoData( pDoc );
@@ -1873,7 +1873,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
SCROW nEndRow = MAXROW;
pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True );
}
if (bRecord)
@@ -1911,15 +1911,15 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
// Inhalte loeschen
-void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
+void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
{
ScViewData* pViewData = GetViewData();
pViewData->SetPasteMode( SC_PASTE_NONE );
pViewData->GetViewShell()->UpdateCopySourceOverlay();
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
- BOOL bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix );
+ sal_Bool bOnlyNotBecauseOfMatrix;
+ sal_Bool bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix );
if ( !bEditable )
{
if ( !(bOnlyNotBecauseOfMatrix &&
@@ -1931,7 +1931,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
}
ScRange aMarkRange;
- BOOL bSimple = FALSE;
+ sal_Bool bSimple = false;
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -1939,7 +1939,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
@@ -1954,16 +1954,16 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
aFuncMark.SetMarkArea( aMarkRange );
}
else
- bSimple = TRUE;
+ bSimple = sal_True;
}
- aFuncMark.SetMarking(FALSE); // for MarkToMulti
+ aFuncMark.SetMarking(false); // for MarkToMulti
aFuncMark.MarkToSimple(); // before bMulti test below
DBG_ASSERT( aFuncMark.IsMarked() || aFuncMark.IsMultiMarked() || bSimple, "delete what?" );
ScDocument* pUndoDoc = NULL;
- BOOL bMulti = !bSimple && aFuncMark.IsMultiMarked();
+ sal_Bool bMulti = !bSimple && aFuncMark.IsMultiMarked();
if (!bSimple)
{
aFuncMark.MarkToMulti();
@@ -1972,22 +1972,22 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
ScRange aExtendedRange(aMarkRange);
if (!bSimple)
{
- if ( pDoc->ExtendMerge( aExtendedRange, TRUE ) )
- bMulti = FALSE;
+ if ( pDoc->ExtendMerge( aExtendedRange, sal_True ) )
+ bMulti = false;
}
// keine Objekte auf geschuetzten Tabellen
- BOOL bObjects = FALSE;
+ sal_Bool bObjects = false;
if ( nFlags & IDF_OBJECTS )
{
- bObjects = TRUE;
+ bObjects = sal_True;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aFuncMark.GetTableSelect(nTab) && pDoc->IsTabProtected(nTab))
- bObjects = FALSE;
+ bObjects = false;
}
- USHORT nExtFlags = 0; // extra flags are needed only if attributes are deleted
+ sal_uInt16 nExtFlags = 0; // extra flags are needed only if attributes are deleted
if ( nFlags & IDF_ATTRIB )
pDocSh->UpdatePaintExt( nExtFlags, aMarkRange );
@@ -1998,7 +1998,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
// 4) Inhalte loeschen
// 5) Undo-Aktion anlegen
- BOOL bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes
+ sal_Bool bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes
if ( bDrawUndo && bRecord )
pDoc->BeginDrawUndo();
@@ -2027,7 +2027,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
// bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument
// nur mit IDF_HARDATTR zu langsam ist:
- USHORT nUndoDocFlags = nFlags;
+ sal_uInt16 nUndoDocFlags = nFlags;
if (nFlags & IDF_ATTRIB)
nUndoDocFlags |= IDF_ATTRIB;
if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
@@ -2072,7 +2072,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
}
else
{
- aFuncMark.FillRangeListWithMarks( &aChangeRanges, FALSE );
+ aFuncMark.FillRangeListWithMarks( &aChangeRanges, false );
}
pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aChangeRanges );
}
@@ -2092,9 +2092,9 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
// Spaltenbreiten/Zeilenhoehen (ueber Header) - Undo OK
-void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
- ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bPaint, ScMarkData* pMarkData )
+void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bPaint, ScMarkData* pMarkData )
{
if (nRangeCnt == 0)
return;
@@ -2110,17 +2110,17 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
SCTAB nCurTab = GetViewData()->GetTabNo();
SCTAB nTab;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
- BOOL bAllowed = TRUE;
+ sal_Bool bAllowed = sal_True;
for (nTab=0; nTab<nTabCount && bAllowed; nTab++)
if (pMarkData->GetTableSelect(nTab))
{
for ( SCCOLROW i=0; i<nRangeCnt && bAllowed; i++ )
{
- BOOL bOnlyMatrix;
+ sal_Bool bOnlyMatrix;
if (bWidth)
bAllowed = pDoc->IsBlockEditable( nTab,
static_cast<SCCOL>(pRanges[2*i]),0,
@@ -2144,7 +2144,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
SCCOLROW nStart = pRanges[0];
SCCOLROW nEnd = pRanges[2*nRangeCnt-1];
- BOOL bFormula = FALSE;
+ sal_Bool bFormula = false;
if ( eMode == SC_SIZE_OPTIMAL )
{
const ScViewOptions& rOpts = GetViewData()->GetOptions();
@@ -2166,20 +2166,20 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
if (bWidth)
{
if ( nTab == nFirstTab )
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
else
- pUndoDoc->AddUndoTab( nTab, nTab, TRUE, FALSE );
+ pUndoDoc->AddUndoTab( nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE,
- FALSE, pUndoDoc );
+ false, pUndoDoc );
}
else
{
if ( nTab == nFirstTab )
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
else
- pUndoDoc->AddUndoTab( nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->AddUndoTab( nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
}
@@ -2195,8 +2195,8 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
pMarkData->MarkToMulti();
- BOOL bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
- BOOL bOutline = FALSE;
+ sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
+ sal_Bool bOutline = false;
for (nTab=0; nTab<nTabCount; nTab++)
if (pMarkData->GetTableSelect(nTab))
@@ -2213,7 +2213,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
{
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
{
- BOOL bAll = ( eMode==SC_SIZE_OPTIMAL );
+ sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL );
if (!bAll)
{
// fuer alle eingeblendeten CR_MANUALSIZE loeschen,
@@ -2227,7 +2227,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
continue;
}
- BYTE nOld = pDoc->GetRowFlags(nRow, nTab);
+ sal_uInt8 nOld = pDoc->GetRowFlags(nRow, nTab);
if (nOld & CR_MANUALSIZE)
pDoc->SetRowFlags(nRow, nTab, nOld & ~CR_MANUALSIZE);
}
@@ -2249,9 +2249,9 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, nSizeTwips, aProv.GetDevice(),
nPPTX, nPPTY, aZoomX, aZoomY, bAll );
if (bAll)
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
- // Manual-Flag wird bei bAll=TRUE schon in SetOptimalHeight gesetzt
+ // Manual-Flag wird bei bAll=sal_True schon in SetOptimalHeight gesetzt
// (an bei Extra-Height, sonst aus).
}
else if ( eMode==SC_SIZE_DIRECT )
@@ -2259,13 +2259,13 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
if (nSizeTwips)
{
pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips );
- pDoc->SetManualHeight( nStartNo, nEndNo, nTab, TRUE ); // height was set manually
+ pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually
}
pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 );
}
else if ( eMode==SC_SIZE_SHOW )
{
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
}
}
else // Spaltenbreiten
@@ -2274,7 +2274,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
{
if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) )
{
- USHORT nThisSize = nSizeTwips;
+ sal_uInt16 nThisSize = nSizeTwips;
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
nThisSize = nSizeTwips + GetOptimalColWidth( nCol, nTab, bFormula );
@@ -2292,12 +2292,12 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
{
if ( pDoc->UpdateOutlineCol( static_cast<SCCOL>(nStartNo),
static_cast<SCCOL>(nEndNo), nTab, bShow ) )
- bOutline = TRUE;
+ bOutline = sal_True;
}
else
{
if ( pDoc->UpdateOutlineRow( nStartNo, nEndNo, nTab, bShow ) )
- bOutline = TRUE;
+ bOutline = sal_True;
}
}
pDoc->SetDrawPageSize(nTab);
@@ -2387,8 +2387,8 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
// Spaltenbreiten/Zeilenhoehen (ueber Blockmarken)
-void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bPaint )
+void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bPaint )
{
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -2400,7 +2400,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT n
SCTAB nTab = GetViewData()->GetTabNo();
DoneBlockMode();
InitOwnBlockMode();
- rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), TRUE );
+ rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), sal_True );
MarkDataChanged();
}
@@ -2418,22 +2418,22 @@ void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT n
rMark.MarkToSimple();
}
-void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
+void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal )
{
//! Schrittweiten einstellbar
// Schrittweite ist auch Minimum
- USHORT nStepX = STD_COL_WIDTH / 5;
- USHORT nStepY = ScGlobal::nStdRowHeight;
+ sal_uInt16 nStepX = STD_COL_WIDTH / 5;
+ sal_uInt16 nStepY = ScGlobal::nStdRowHeight;
ScModule* pScMod = SC_MOD();
- BOOL bAnyEdit = pScMod->IsInputMode();
+ sal_Bool bAnyEdit = pScMod->IsInputMode();
SCCOL nCol = GetViewData()->GetCurX();
SCROW nRow = GetViewData()->GetCurY();
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bAllowed, bOnlyMatrix;
+ sal_Bool bAllowed, bOnlyMatrix;
if ( eDir == DIR_LEFT || eDir == DIR_RIGHT )
bAllowed = pDoc->IsBlockEditable( nTab, nCol,0, nCol,MAXROW, &bOnlyMatrix );
else
@@ -2446,8 +2446,8 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
HideAllCursors();
- USHORT nWidth = pDoc->GetColWidth( nCol, nTab );
- USHORT nHeight = pDoc->GetRowHeight( nRow, nTab );
+ sal_uInt16 nWidth = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTab );
SCCOLROW nRange[2];
if ( eDir == DIR_LEFT || eDir == DIR_RIGHT )
{
@@ -2464,13 +2464,13 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
const SvxMarginItem& rMItem =
(const SvxMarginItem&)pPattern->GetItem(ATTR_MARGIN);
- USHORT nMargin = rMItem.GetLeftMargin() + rMItem.GetRightMargin();
+ sal_uInt16 nMargin = rMItem.GetLeftMargin() + rMItem.GetRightMargin();
if ( ((const SvxHorJustifyItem&) pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_LEFT )
- nMargin = sal::static_int_cast<USHORT>(
+ nMargin = sal::static_int_cast<sal_uInt16>(
nMargin + ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue() );
- nWidth = (USHORT)(nEdit * pDocSh->GetOutputFactor() / HMM_PER_TWIPS)
+ nWidth = (sal_uInt16)(nEdit * pDocSh->GetOutputFactor() / HMM_PER_TWIPS)
+ nMargin + STD_EXTRA_WIDTH;
}
}
@@ -2490,8 +2490,8 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
}
long nPixel = pDoc->GetNeededSize( nCol, nRow, nTab, aProv.GetDevice(),
- nPPTX, nPPTY, aZoomX, aZoomY, TRUE );
- USHORT nTwips = (USHORT)( nPixel / nPPTX );
+ nPPTX, nPPTY, aZoomX, aZoomY, sal_True );
+ sal_uInt16 nTwips = (sal_uInt16)( nPixel / nPPTX );
if (nTwips != 0)
nWidth = nTwips + STD_EXTRA_WIDTH;
else
@@ -2501,21 +2501,21 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
else // vergroessern / verkleinern
{
if ( eDir == DIR_RIGHT )
- nWidth = sal::static_int_cast<USHORT>( nWidth + nStepX );
+ nWidth = sal::static_int_cast<sal_uInt16>( nWidth + nStepX );
else if ( nWidth > nStepX )
- nWidth = sal::static_int_cast<USHORT>( nWidth - nStepX );
+ nWidth = sal::static_int_cast<sal_uInt16>( nWidth - nStepX );
if ( nWidth < nStepX ) nWidth = nStepX;
if ( nWidth > MAX_COL_WIDTH ) nWidth = MAX_COL_WIDTH;
}
nRange[0] = nRange[1] = nCol;
- SetWidthOrHeight( TRUE, 1, nRange, SC_SIZE_DIRECT, nWidth );
+ SetWidthOrHeight( sal_True, 1, nRange, SC_SIZE_DIRECT, nWidth );
// hier bei Breite auch Hoehe anpassen (nur die eine Zeile)
if (!bAnyEdit)
{
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
- BOOL bNeedHeight =
+ sal_Bool bNeedHeight =
((const SfxBoolItem&)pPattern->GetItem( ATTR_LINEBREAK )).GetValue() ||
((const SvxHorJustifyItem&)pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK;
@@ -2535,15 +2535,15 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
{
eMode = SC_SIZE_DIRECT;
if ( eDir == DIR_BOTTOM )
- nHeight = sal::static_int_cast<USHORT>( nHeight + nStepY );
+ nHeight = sal::static_int_cast<sal_uInt16>( nHeight + nStepY );
else if ( nHeight > nStepY )
- nHeight = sal::static_int_cast<USHORT>( nHeight - nStepY );
+ nHeight = sal::static_int_cast<sal_uInt16>( nHeight - nStepY );
if ( nHeight < nStepY ) nHeight = nStepY;
if ( nHeight > MAX_COL_HEIGHT ) nHeight = MAX_COL_HEIGHT;
//! MAX_COL_HEIGHT umbenennen in MAX_ROW_HEIGHT in global.hxx !!!!!!
}
nRange[0] = nRange[1] = nRow;
- SetWidthOrHeight( FALSE, 1, nRange, eMode, nHeight );
+ SetWidthOrHeight( false, 1, nRange, eMode, nHeight );
}
if ( bAnyEdit )
@@ -2596,10 +2596,10 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScDocFunc aFunc(*pDocSh);
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
- aFunc.Protect( nTab, rPassword, FALSE );
+ aFunc.Protect( nTab, rPassword, false );
else
{
// modifying several tables is handled here
@@ -2613,7 +2613,7 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
SCTAB nCount = pDocSh->GetDocument()->GetTableCount();
for ( SCTAB i=0; i<nCount; i++ )
if ( rMark.GetTableSelect(i) )
- aFunc.Protect( i, rPassword, FALSE );
+ aFunc.Protect( i, rPassword, false );
if (bUndo)
pDocSh->GetUndoManager()->LeaveListAction();
@@ -2622,17 +2622,17 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
UpdateLayerLocks(); //! broadcast to all views
}
-BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
+sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
{
ScMarkData& rMark = GetViewData()->GetMarkData();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScDocFunc aFunc(*pDocSh);
- BOOL bChanged = FALSE;
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bChanged = false;
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
- bChanged = aFunc.Unprotect( nTab, rPassword, FALSE );
+ bChanged = aFunc.Unprotect( nTab, rPassword, false );
else
{
// modifying several tables is handled here
@@ -2646,8 +2646,8 @@ BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
SCTAB nCount = pDocSh->GetDocument()->GetTableCount();
for ( SCTAB i=0; i<nCount; i++ )
if ( rMark.GetTableSelect(i) )
- if ( aFunc.Unprotect( i, rPassword, FALSE ) )
- bChanged = TRUE;
+ if ( aFunc.Unprotect( i, rPassword, false ) )
+ bChanged = sal_True;
if (bUndo)
pDocSh->GetUndoManager()->LeaveListAction();
@@ -2661,18 +2661,18 @@ BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
void ScViewFunc::SetNoteText( const ScAddress& rPos, const String& rNoteText )
{
- GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, FALSE );
+ GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, false );
}
void ScViewFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate )
{
- GetViewData()->GetDocShell()->GetDocFunc().ReplaceNote( rPos, rNoteText, pAuthor, pDate, FALSE );
+ GetViewData()->GetDocShell()->GetDocFunc().ReplaceNote( rPos, rNoteText, pAuthor, pDate, false );
}
-void ScViewFunc::SetNumberFormat( short nFormatType, ULONG nAdd )
+void ScViewFunc::SetNumberFormat( short nFormatType, sal_uLong nAdd )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2702,13 +2702,13 @@ void ScViewFunc::SetNumberFormat( short nFormatType, ULONG nAdd )
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
// ATTR_LANGUAGE_FORMAT nicht
- ApplySelectionPattern( aNewAttrs, TRUE );
+ ApplySelectionPattern( aNewAttrs, sal_True );
}
void ScViewFunc::SetNumFmtByStr( const String& rCode )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2729,7 +2729,7 @@ void ScViewFunc::SetNumFmtByStr( const String& rCode )
// Index fuer String bestimmen
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
sal_uInt32 nNumberFormat = pFormatter->GetEntryKey( rCode, eLanguage );
if ( nNumberFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
{
@@ -2747,16 +2747,16 @@ void ScViewFunc::SetNumFmtByStr( const String& rCode )
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
rSet.Put( SvxLanguageItem( eLanguage, ATTR_LANGUAGE_FORMAT ) );
- ApplySelectionPattern( aNewAttrs, TRUE );
+ ApplySelectionPattern( aNewAttrs, sal_True );
}
//! sonst Fehler zuerueckgeben / Meldung ausgeben ???
}
-void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
+void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2782,11 +2782,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
// was haben wir denn da?
sal_uInt32 nNewFormat = nOldFormat;
- BOOL bError = FALSE;
+ sal_Bool bError = false;
LanguageType eLanguage = pOldEntry->GetLanguage();
- BOOL bThousand, bNegRed;
- USHORT nPrecision, nLeading;
+ sal_Bool bThousand, bNegRed;
+ sal_uInt16 nPrecision, nLeading;
pOldEntry->GetFormatSpecialInfo( bThousand, bNegRed, nPrecision, nLeading );
short nOldType = pOldEntry->GetType();
@@ -2795,11 +2795,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
{
// Datum, Zeit, Bruch, logisch, Text kann nicht angepasst werden
//! bei Wisssenschaftlich kann es der Numberformatter auch nicht
- bError = TRUE;
+ bError = sal_True;
}
//! Das SvNumberformat hat einen Member bStandard, verraet ihn aber nicht
- BOOL bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) );
+ sal_Bool bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) );
if (bWasStandard)
{
// bei "Standard" die Nachkommastellen abhaengig vom Zellinhalt
@@ -2814,7 +2814,7 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
nPrecision = 0;
// 'E' fuer Exponential ist fest im Numberformatter
if ( aOut.Search('E') != STRING_NOTFOUND )
- bError = TRUE; // Exponential nicht veraendern
+ bError = sal_True; // Exponential nicht veraendern
else
{
String aDecSep( pFormatter->GetFormatDecimalSep( nOldFormat ) );
@@ -2832,14 +2832,14 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
if (nPrecision<20)
++nPrecision; // erhoehen
else
- bError = TRUE; // 20 ist Maximum
+ bError = sal_True; // 20 ist Maximum
}
else
{
if (nPrecision)
--nPrecision; // vermindern
else
- bError = TRUE; // weniger als 0 geht nicht
+ bError = sal_True; // weniger als 0 geht nicht
}
}
@@ -2854,11 +2854,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
{
xub_StrLen nErrPos = 0;
short nNewType = 0;
- BOOL bOk = pFormatter->PutEntry( aNewPicture, nErrPos,
+ sal_Bool bOk = pFormatter->PutEntry( aNewPicture, nErrPos,
nNewType, nNewFormat, eLanguage );
DBG_ASSERT( bOk, "falsches Zahlformat generiert" );
if (!bOk)
- bError = TRUE;
+ bError = sal_True;
}
}
@@ -2868,13 +2868,13 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
// ATTR_LANGUAGE_FORMAT nicht
- ApplySelectionPattern( aNewAttrs, TRUE );
+ ApplySelectionPattern( aNewAttrs, sal_True );
}
else
Sound::Beep(); // war nix
}
-void ScViewFunc::ChangeIndent( BOOL bIncrement )
+void ScViewFunc::ChangeIndent( sal_Bool bIncrement )
{
ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell();
@@ -2891,7 +2891,7 @@ void ScViewFunc::ChangeIndent( BOOL bIncrement )
aWorkMark.SetMultiMarkArea( ScRange(nCol,nRow,nTab) );
}
- BOOL bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, false );
if (bSuccess)
{
pDocSh->UpdateOle(pViewData);
@@ -2899,13 +2899,13 @@ void ScViewFunc::ChangeIndent( BOOL bIncrement )
}
}
-BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
+sal_Bool ScViewFunc::InsertName( const String& rName, const String& rSymbol,
const String& rType )
{
// Type = P,R,C,F (und Kombinationen)
//! Undo...
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -2931,7 +2931,7 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
{
ScDocShellModificator aModificator( *pDocSh );
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( sal_True ); // CreateFormulaString
// Eintrag bereits vorhanden? Dann vorher entfernen (=Aendern)
ScRangeData* pData = pList->findByName(rName);
@@ -2944,10 +2944,10 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
if ( pList->insert( pNewEntry ) )
{
pNewEntry = NULL; // nicht loeschen
- bOk = TRUE;
+ bOk = sal_True;
}
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( false ); // CompileFormulaString
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
}
@@ -2956,20 +2956,20 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
return bOk;
}
-void ScViewFunc::CreateNames( USHORT nFlags )
+void ScViewFunc::CreateNames( sal_uInt16 nFlags )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScRange aRange;
if ( GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE )
- bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, FALSE );
+ bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, false );
if (!bDone)
ErrorMessage(STR_CREATENAME_MARKERR);
}
-USHORT ScViewFunc::GetCreateNameFlags()
+sal_uInt16 ScViewFunc::GetCreateNameFlags()
{
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
@@ -2978,44 +2978,44 @@ USHORT ScViewFunc::GetCreateNameFlags()
{
ScDocument* pDoc = GetViewData()->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
- BOOL bOk;
+ sal_Bool bOk;
SCCOL i;
SCROW j;
- bOk = TRUE;
+ bOk = sal_True;
SCCOL nFirstCol = nStartCol;
SCCOL nLastCol = nEndCol;
if (nStartCol+1 < nEndCol) { ++nFirstCol; --nLastCol; }
for (i=nFirstCol; i<=nLastCol && bOk; i++)
if (!pDoc->HasStringData( i,nStartRow,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_TOP;
else // Bottom nur wenn nicht Top
{
- bOk = TRUE;
+ bOk = sal_True;
for (i=nFirstCol; i<=nLastCol && bOk; i++)
if (!pDoc->HasStringData( i,nEndRow,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_BOTTOM;
}
- bOk = TRUE;
+ bOk = sal_True;
SCROW nFirstRow = nStartRow;
SCROW nLastRow = nEndRow;
if (nStartRow+1 < nEndRow) { ++nFirstRow; --nLastRow; }
for (j=nFirstRow; j<=nLastRow && bOk; j++)
if (!pDoc->HasStringData( nStartCol,j,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_LEFT;
else // Right nur wenn nicht Left
{
- bOk = TRUE;
+ bOk = sal_True;
for (j=nFirstRow; j<=nLastRow && bOk; j++)
if (!pDoc->HasStringData( nEndCol,j,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_RIGHT;
}
@@ -3033,7 +3033,7 @@ void ScViewFunc::InsertNameList()
{
ScAddress aPos( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- if ( pDocSh->GetDocFunc().InsertNameList( aPos, FALSE ) )
+ if ( pDocSh->GetDocFunc().InsertNameList( aPos, false ) )
pDocSh->UpdateOle(GetViewData());
}
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 953270ce1803..c89d9dac1455 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -65,7 +65,7 @@
//==================================================================
void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet,
- USHORT nWhichId, USHORT nScript )
+ sal_uInt16 nWhichId, sal_uInt16 nScript )
{
// take the effective item from rCoreSet according to nScript
// and put in rShellSet under the (base) nWhichId
@@ -82,12 +82,12 @@ void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSe
rShellSet.InvalidateItem( nWhichId );
}
-USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos )
+sal_uInt16 ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos )
{
// used for thesaurus
- BYTE nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() );
- USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
+ sal_uInt8 nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() );
+ sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? ATTR_CTL_FONT_LANGUAGE : ATTR_FONT_LANGUAGE );
const SfxPoolItem* pItem = pDoc->GetAttr( rPos.Col(), rPos.Row(), rPos.Tab(), nWhich);
SvxLanguageItem* pLangIt = PTR_CAST( SvxLanguageItem, pItem );
@@ -111,7 +111,7 @@ USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos )
return eLnge;
}
-sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID )
+sal_Int32 ScViewUtil::GetTransliterationType( sal_uInt16 nSlotID )
{
sal_Int32 nType = 0;
switch ( nSlotID )
@@ -147,7 +147,7 @@ sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID )
return nType;
}
-BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
+sal_Bool ScViewUtil::IsActionShown( const ScChangeAction& rAction,
const ScChangeViewSettings& rSettings,
ScDocument& rDocument )
{
@@ -155,10 +155,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
// die Reihenfolge von ShowRejected/ShowAccepted ist deswegen wichtig
if ( !rSettings.IsShowRejected() && rAction.IsRejecting() )
- return FALSE;
+ return false;
if ( !rSettings.IsShowAccepted() && rAction.IsAccepted() && !rAction.IsRejecting() )
- return FALSE;
+ return false;
if ( rSettings.HasAuthor() )
{
@@ -167,10 +167,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
// GetUser() am ChangeTrack ist der aktuelle Benutzer
ScChangeTrack* pTrack = rDocument.GetChangeTrack();
if ( !pTrack || rAction.GetUser() == pTrack->GetUser() )
- return FALSE;
+ return false;
}
else if ( rAction.GetUser() != rSettings.GetTheAuthorToShow() )
- return FALSE;
+ return false;
}
if ( rSettings.HasComment() )
@@ -181,12 +181,12 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
aComStr+=')';
if(!rSettings.IsValidComment(&aComStr))
- return FALSE;
+ return false;
}
if ( rSettings.HasRange() )
if ( !rSettings.GetTheRangeList().Intersects( rAction.GetBigRange().MakeRange() ) )
- return FALSE;
+ return false;
if ( rSettings.HasDate() && rSettings.GetTheDateMode() != SCDM_NO_DATEMODE )
{
@@ -197,23 +197,23 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
{ // korrespondiert mit ScHighlightChgDlg::OKBtnHdl
case SCDM_DATE_BEFORE:
if ( aDateTime > rFirst )
- return FALSE;
+ return false;
break;
case SCDM_DATE_SINCE:
if ( aDateTime < rFirst )
- return FALSE;
+ return false;
break;
case SCDM_DATE_EQUAL:
case SCDM_DATE_BETWEEN:
if ( aDateTime < rFirst || aDateTime > rLast )
- return FALSE;
+ return false;
break;
case SCDM_DATE_NOTEQUAL:
if ( aDateTime >= rFirst && aDateTime <= rLast )
- return FALSE;
+ return false;
break;
case SCDM_DATE_SAVE:
@@ -221,7 +221,7 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
ScChangeTrack* pTrack = rDocument.GetChangeTrack();
if ( !pTrack || pTrack->GetLastSavedActionNumber() >=
rAction.GetActionNumber() )
- return FALSE;
+ return false;
}
break;
@@ -234,17 +234,17 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
if ( rSettings.HasActionRange() )
{
- ULONG nAction = rAction.GetActionNumber();
- ULONG nFirstAction;
- ULONG nLastAction;
+ sal_uLong nAction = rAction.GetActionNumber();
+ sal_uLong nFirstAction;
+ sal_uLong nLastAction;
rSettings.GetTheActionRange( nFirstAction, nLastAction );
if ( nAction < nFirstAction || nAction > nLastAction )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return sal_True;
}
void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc )
@@ -312,7 +312,7 @@ bool ScViewUtil::HasFiltered( const ScRange& rRange, ScDocument* pDoc )
return false;
}
-void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId )
+void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId )
{
SvtCJKOptions aCJKOptions;
SvtCTLOptions aCTLOptions;
@@ -351,28 +351,28 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USH
//==================================================================
-BOOL ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
+sal_Bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
SfxViewFrame& rFrame,
SvxFontItem& rNewFont,
String& rString )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
- aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if ( pDlg->Execute() == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, false );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, false );
if ( pItem )
rString = pItem->GetValue();
if ( pFontItem )
rNewFont = SvxFontItem( pFontItem->GetFamily(), pFontItem->GetFamilyName(), pFontItem->GetStyleName(), pFontItem->GetPitch(), pFontItem->GetCharSet(), rNewFont.Which() );
- bRet = TRUE;
+ bRet = sal_True;
}
delete pDlg;
}
@@ -423,7 +423,7 @@ void ScUpdateRect::SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 )
nNewEndY = nY2;
}
-BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
+sal_Bool ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
{
if ( nNewStartX == nOldStartX && nNewEndX == nOldEndX &&
nNewStartY == nOldStartY && nNewEndY == nOldEndY )
@@ -432,7 +432,7 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
rY1 = nNewStartY;
rX2 = nNewStartX;
rY2 = nNewStartY;
- return FALSE;
+ return false;
}
rX1 = Min(nNewStartX,nOldStartX);
@@ -467,7 +467,7 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
}
}
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */